From patchwork Fri Jun 22 15:46:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Jason A. Donenfeld" X-Patchwork-Id: 10482597 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1E62C6023A for ; Fri, 22 Jun 2018 15:46:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EA71828D2D for ; Fri, 22 Jun 2018 15:46:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DE2F228F67; Fri, 22 Jun 2018 15:46:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E408828D2D for ; Fri, 22 Jun 2018 15:46:33 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 217A16B0006; Fri, 22 Jun 2018 11:46:33 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 1C5F86B0008; Fri, 22 Jun 2018 11:46:33 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0B6A06B000A; Fri, 22 Jun 2018 11:46:33 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org 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) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:from:to:cc:subject:date :message-id:in-reply-to:references; bh=jpZnm1YyIdLqnSXPTxrZgdSED/90cNSisvGzPI6ptbU=; b=D4OptH1Ao05YOeH71TEs4pksGJghpeeX2eHkFgb42bayoAIXxzTQ4BWmdJoGrt+14s VwBYAPC4gH07bWCLcNH8wAlIP2fHmp7qjhaGZPC/kjQ9rJ9U37xxuUlfO7vLvOMPXT3n SKQ+Ly4zj7Gu1B3qL4lAcXgOjdO4CD0t2p3kBK/NfJW1fFqMxXKbXi4D0UsJGWnrvbxu XA997sDGcUVVEHmTN84zV2859FEHORlHzj2aS1sCOuLdbqlcFm2WwWKGsDw6pDZaqyol wh+1vrn97KV5PVbbrLFbkH/ZoynZ4IlwiZZn/7LLoaplAgboE4dae24A7XeBXUsCFozO RP/g== X-Gm-Message-State: APt69E24K08y1kb5r0ZDlWYFxL/ddYwlGnT+NmiVQ5L2dzPq4AnXCwKf NUiMRJHh1feULkTngrYmLMi73/hFtJfyr0MYqvdc2L21XVB1Uu5OkEHODFg8NT4H7BDzFwIthjw BuSeYeoiH0Lt+je8TNVxICgaBRvxpasB1kdTjqjUY+/0Z7AmvhUsO1qqbAgX0Extyyw== X-Received: by 2002:ac8:30c9:: with SMTP id w9-v6mr1777745qta.160.1529682392591; Fri, 22 Jun 2018 08:46:32 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcGv10yrmYoPpv8yqC56uyrqWe349yXtiDbnmT26qY9b4+dIe+kMygsJ6xivVyTZXTM/X98 X-Received: by 2002:ac8:30c9:: with SMTP id w9-v6mr1777709qta.160.1529682392049; Fri, 22 Jun 2018 08:46:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529682392; cv=none; d=google.com; s=arc-20160816; b=gx4fS235SnBuKrpgeTWtLj1YciFrCpTy7tYowMzKbYhMCeN+OD9Z2yVQKqDq23oq5l fWE46lJSngzBY4wbczR9oGjZ+EWXDbSNTW2l8LfPCEw9I55tRtU87PNtJKlIhNbW06zo 0X/l9sLAOoIwFZVCvsJITCPhnNKXIOFcbXjTnz1RpQyhT+SLRU2PMnJKWJ4pFagPmyoa 9yM7/KJTO2bVRm38vdKKEcoJK2FISPBjkbGSblyMSVurbnZmtM1UCMClQ+0/2XpAXnsL 0Ete5B7dpUw/foIvyLaeZhOnxWbJhHYS84xeUdfcCy+Wogbmhu/VAum2ZltJ2KZyDT2i D3+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=jpZnm1YyIdLqnSXPTxrZgdSED/90cNSisvGzPI6ptbU=; b=kOiZqop13lbjuFPlIkWygqiRz/m3sRyoKWbPNK6CF6bQrQGvEVeEYQKMQl3xc7ZTOR UnJszU4RimKojDH7PBmJXd2ojiVX01WWLRM6i5hMSrhP7sZC53wx0IzntP6sp0Aa/Djd ao6Zdg1VP8iBuBVAsGMjoxgYf3O3NBlAcbUD6eYM9A5kJYT14PmgGtMkBklfgIjluylb zlanYebtPL0g+iIg2ZyG5nH0dJsbCU1SWe1pZOaT0o5dHvo2C6k2EXGe8PAn+7u9Z8gV xw81+0Jq6a2+d30Me3VVGZ1RjVmy8Sv4Q0DcoOAMcpT9P89L6Zqep6rHu24ZyUMS0YW0 uM6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=mail header.b=ffNjqBT1; spf=pass (google.com: domain of jason@zx2c4.com designates 192.95.5.64 as permitted sender) smtp.mailfrom=Jason@zx2c4.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zx2c4.com 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) Received-SPF: pass (google.com: domain of jason@zx2c4.com designates 192.95.5.64 as permitted sender) client-ip=192.95.5.64; Authentication-Results: mx.google.com; dkim=pass header.i=@zx2c4.com header.s=mail header.b=ffNjqBT1; spf=pass (google.com: domain of jason@zx2c4.com designates 192.95.5.64 as permitted sender) smtp.mailfrom=Jason@zx2c4.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zx2c4.com Received: by frisell.zx2c4.com (ZX2C4 Mail Server) with ESMTP id b6585bef; Fri, 22 Jun 2018 15:40:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=zx2c4.com; h=from:to:cc :subject:date:message-id:in-reply-to:references; s=mail; bh=KW60 zVfrC8Hwr589uxTW8kpYXS0=; b=ffNjqBT1w6jjw84lejxF+5ntbUZqSN56rWHf HFe/wfV7l16uX3hZk+Xr7Aj1M2VW6nIDGwhGDslEId54vCDcXiTiQ6djPGYNSXbE EmiaraXNeTzD3DaoxZ6lhm10xdHqAkLQ+JLLmRl0ZvWEfk+DUQzD74hIZWeluvHK 2Z1/qUCCYGRt9lXbnclZT4nTiNuJXuvUqptkvAh/WkM7R5crP1JACs31AwlByHsO 2LUKBN8sy+n7m9nmqOSh30gxyIQNbUQgerrRNboDr8W3n4Mpac31Pb6SyJ6GBF1p uvAYP4RIuOBMF1QW2MUCoaPkkSe4GziWp7xOOjoIGrFFDhs7NQ== Received: by frisell.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id 00b1b5ac (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); Fri, 22 Jun 2018 15:40:15 +0000 (UTC) From: "Jason A. Donenfeld" 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 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: X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP 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 Acked-by: Michal Hocko Reviewed-by: Shakeel Butt --- 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