Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp1017414imm; Fri, 22 Jun 2018 08:59:51 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKY4mzePQdXhOf+Fxu6uB/bpIqCdVVbOWeHXNFnVKfJHoQXg6/gV2vfjyJLwBNKtXkzTJ2S X-Received: by 2002:a65:66c6:: with SMTP id c6-v6mr1959636pgw.76.1529683191759; Fri, 22 Jun 2018 08:59:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529683191; cv=none; d=google.com; s=arc-20160816; b=Us2D1Bhr9BeI7w33YHERfBU7NosaQWjOj6jckB4qo77tCTYTkpZRAqt7NJAPAsjy8D 4O5V5hEqeWOfU5JguBak4aRx3HrePs+XMxGw3NEyH8Qg3RvGuow29jN4VWbOrGDxAgSF q8d6R0EPuANWcw1b75VO5bZKLoaSxoR8OR8PPjSn1VMU/Au/0HG6g4JFCuyw5rRule/0 pEhER8NoM5uRYi1aHuqTIjVk9XluUdyVSKILrj50YbQZPoLpbKzskWBhJBuxLyyvdDX1 OcFRljqWJ+Ngq9R84hGOyUTj+JmWAtE9lPsH9d7UrQHyntW8PfMuuZILx97QSD9rgpaE 1XdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=m5ZNJTcCTEDr/Gg/9LXtDbv93NzyfCkppJIm2TPiaT0=; b=IScfNjB4JquIx2/Yrcdv6giHUMlYd85yrwLN/rCi53/Y4jRnwJM5km5F3WRigb8oBZ FTEsAvOHDkKSSOdEgCWoWAh9uN10GJLWvbyTd9+InG+O/0DTOOtqncMZCbqcyXjZPqD6 iR9k3w14mj8KG2LP/0RDucXA5qExP16nC914IH8KXP6jVJyaV8ZCgtLIVxh2ExEd9PN9 uMyEChXtFwhiW7HfXcqbw54aYyDry4LAsSITeiZSfVnvYGrYf3eZvcItEBXzJ79onYUI E6LCI1P3nARCbMWJXTxwDSIb+kuTkk5d588oveWbfZGekUm9oCK9x8cSNGbcmpXppBIy dhPw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b9-v6si7784500plx.286.2018.06.22.08.59.37; Fri, 22 Jun 2018 08:59:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934118AbeFVP6o (ORCPT + 99 others); Fri, 22 Jun 2018 11:58:44 -0400 Received: from mx2.suse.de ([195.135.220.15]:57715 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933853AbeFVP6m (ORCPT ); Fri, 22 Jun 2018 11:58:42 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext-too.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 6F752AD5C; Fri, 22 Jun 2018 15:58:41 +0000 (UTC) Date: Fri, 22 Jun 2018 17:58:39 +0200 From: Michal Hocko To: "Jason A. Donenfeld" Cc: Shakeel Butt , 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 Subject: Re: [PATCH] kasan: depend on CONFIG_SLUB_DEBUG Message-ID: <20180622155839.GF10465@dhcp22.suse.cz> References: <20180622154623.25388-1-Jason@zx2c4.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180622154623.25388-1-Jason@zx2c4.com> User-Agent: Mutt/1.9.5 (2018-04-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri 22-06-18 17:46:23, Jason A. Donenfeld wrote: > 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 This is the simplest way to do but I strongly suspect that the whole SLUB_DEBUG is not really necessary Acked-by: Michal Hocko > --- > 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 -- Michal Hocko SUSE Labs