From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lb0-f171.google.com (mail-lb0-f171.google.com [209.85.217.171]) by kanga.kvack.org (Postfix) with ESMTP id 911A06B006E for ; Fri, 21 Nov 2014 02:32:44 -0500 (EST) Received: by mail-lb0-f171.google.com with SMTP id b6so3558088lbj.2 for ; Thu, 20 Nov 2014 23:32:43 -0800 (PST) Received: from mail-lb0-x233.google.com (mail-lb0-x233.google.com. [2a00:1450:4010:c04::233]) by mx.google.com with ESMTPS id v4si4093293laj.106.2014.11.20.23.32.43 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 20 Nov 2014 23:32:43 -0800 (PST) Received: by mail-lb0-f179.google.com with SMTP id l4so3525237lbv.24 for ; Thu, 20 Nov 2014 23:32:42 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <20141120150033.4cd1ca25be4a9b00a7074149@linux-foundation.org> References: <1404905415-9046-1-git-send-email-a.ryabinin@samsung.com> <1415199241-5121-1-git-send-email-a.ryabinin@samsung.com> <5461B906.1040803@samsung.com> <20141118125843.434c216540def495d50f3a45@linux-foundation.org> <20141120090356.GA6690@gmail.com> <20141120150033.4cd1ca25be4a9b00a7074149@linux-foundation.org> From: Dmitry Vyukov Date: Fri, 21 Nov 2014 11:32:22 +0400 Message-ID: Subject: Re: [PATCH v6 00/11] Kernel address sanitizer - runtime memory debugger. Content-Type: text/plain; charset=UTF-8 Sender: owner-linux-mm@kvack.org List-ID: To: Andrew Morton Cc: Ingo Molnar , Andrey Ryabinin , Andrey Ryabinin , Konstantin Serebryany , Dmitry Chernenkov , Andrey Konovalov , Yuri Gribov , Konstantin Khlebnikov , Sasha Levin , Michal Marek , Thomas Gleixner , Ingo Molnar , Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Dave Hansen , Andi Kleen , Vegard Nossum , "H. Peter Anvin" , "x86@kernel.org" , "linux-mm@kvack.org" , Randy Dunlap , Peter Zijlstra , Alexander Viro , Dave Jones , Jonathan Corbet , Joe Perches , LKML , Linus Torvalds On Fri, Nov 21, 2014 at 2:00 AM, Andrew Morton wrote: > On Thu, 20 Nov 2014 20:32:30 +0400 Dmitry Vyukov wrote: > >> Let me provide some background first. > > Well that was useful. Andrey, please slurp Dmitry's info into the 0/n > changelog? > > Also, some quantitative info about the kmemleak overhead would be > useful. > > In this discussion you've mentioned a few planned kasan enhancements. > Please also list those and attempt to describe the amount of effort and > complexity levels. Partly so other can understand the plans and partly > so we can see what we're semi-committing ourselves to if we merge this > stuff. The enhancements are: 1. Detection of stack out-of-bounds. This is done mostly in the compiler. Kernel only needs adjustments in reporting. 2. Detection of global out-of-bounds. Kernel will need to process compiler-generated list of globals during bootstrap. Complexity is very low and it is isolated in Asan code. 3. Heap quarantine (delayed reuse of heap blocks). We will need to hook into slub, queue freed blocks in an efficient/scalable way and integrate with memory shrinker (register_shrinker). This will be somewhat complex and touch production kernel code. Konstantin Khlebnikov wants to make the quarantine available independently of Asan, as part of slub debug that can be enabled at runtime. 4. Port Asan to slAb. 5. Do various tuning of allocator integration, redzones sizes, speeding up what is currently considered debug-only paths in malloc/free, etc. 6. Some people also expressed interest in ARM port. The user-space Asan codebase is mostly stable for the last two years, so it's not that we have infinite plans. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org