From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt0-f197.google.com (mail-qt0-f197.google.com [209.85.216.197]) by kanga.kvack.org (Postfix) with ESMTP id D06606B0006 for ; Fri, 22 Jun 2018 11:46:32 -0400 (EDT) Received: by mail-qt0-f197.google.com with SMTP id n10-v6so5451696qtp.11 for ; Fri, 22 Jun 2018 08:46:32 -0700 (PDT) Received: from frisell.zx2c4.com (frisell.zx2c4.com. [192.95.5.64]) by mx.google.com with ESMTPS id j3-v6si1009674qtp.72.2018.06.22.08.46.31 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 22 Jun 2018 08:46:32 -0700 (PDT) From: "Jason A. Donenfeld" Subject: [PATCH] kasan: depend on CONFIG_SLUB_DEBUG Date: Fri, 22 Jun 2018 17:46:23 +0200 Message-Id: <20180622154623.25388-1-Jason@zx2c4.com> In-Reply-To: References: Sender: owner-linux-mm@kvack.org List-ID: To: Shakeel Butt Cc: "Jason A. Donenfeld" , David Rientjes , Christoph Lameter , Pekka Enberg , Joonsoo Kim , Andrew Morton , Andrey Ryabinin , stable@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org KASAN depends on having access to some of the accounting that SLUB_DEBUG does; without it, there are immediate crashes [1]. So, the natural thing to do is to make KASAN select SLUB_DEBUG. [1] http://lkml.kernel.org/r/CAHmME9rtoPwxUSnktxzKso14iuVCWT7BE_-_8PAC=pGw1iJnQg@mail.gmail.com Fixes: f9e13c0a5a33 ("slab, slub: skip unnecessary kasan_cache_shutdown()") Cc: Shakeel Butt Cc: David Rientjes Cc: Christoph Lameter Cc: Pekka Enberg Cc: Joonsoo Kim Cc: Andrew Morton Cc: Andrey Ryabinin Cc: Cc: Cc: Signed-off-by: Jason A. Donenfeld --- lib/Kconfig.kasan | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Kconfig.kasan b/lib/Kconfig.kasan index 3d35d062970d..c253c1b46c6b 100644 --- a/lib/Kconfig.kasan +++ b/lib/Kconfig.kasan @@ -6,6 +6,7 @@ if HAVE_ARCH_KASAN config KASAN bool "KASan: runtime memory debugger" depends on SLUB || (SLAB && !DEBUG_SLAB) + select SLUB_DEBUG if SLUB select CONSTRUCTORS select STACKDEPOT help -- 2.17.1