From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 091E2C433F5 for ; Wed, 23 Mar 2022 15:11:50 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 420116B0072; Wed, 23 Mar 2022 11:11:49 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3D0716B0073; Wed, 23 Mar 2022 11:11:49 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 298766B0074; Wed, 23 Mar 2022 11:11:49 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.25]) by kanga.kvack.org (Postfix) with ESMTP id 1B8CC6B0072 for ; Wed, 23 Mar 2022 11:11:49 -0400 (EDT) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id D792924491 for ; Wed, 23 Mar 2022 15:11:48 +0000 (UTC) X-FDA: 79275990696.07.5AEFD31 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf11.hostedemail.com (Postfix) with ESMTP id CA5D340013 for ; Wed, 23 Mar 2022 15:11:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=mbYKYLyioxmza+e6kvwBLRa+wBIGtShUFd+o0R6xiJk=; b=r/jOVR6MXN/nWXyZ48Dv3k4bvG ilab5Md7xTipHLs97i2tJVNYIUv/657Y21wb82u6qTibtgVu7+yCvdoL2nxomXv9Z4UxHucGsmTxh 4LRecorV9C2zwyVYV4vACW8YS5JQuo26kRmYLS5SA4Qxsk2lj4LtvuksYQwUzsmnCsoBz/25yUP2W 7zV//YSFNTnBlaSr3mZodcH4WesAJdXlGJFOSPXpmN4rBhqgq5ddk1DCrPZfgUOCQ80e3n+F2IYCH DG+CuJA2O23DrmkrVrDqjantyZx+XGk3+86cTFGvGiB1mpPYf44enzE/O8HvzWpCAtuIt+ToXbRNF RE7EZjOA==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nX2e5-00Ccu6-3N; Wed, 23 Mar 2022 15:11:33 +0000 Date: Wed, 23 Mar 2022 15:11:33 +0000 From: Matthew Wilcox To: Vlastimil Babka Cc: Andrey Konovalov , Sebastian Andrzej Siewior , Andrew Morton , andrey.konovalov@linux.dev, Marco Elver , Alexander Potapenko , Dmitry Vyukov , Andrey Ryabinin , kasan-dev , Linux Memory Management List , Vincenzo Frascino , Catalin Marinas , Will Deacon , Mark Rutland , Linux ARM , Peter Collingbourne , Evgenii Stepanov , LKML , Andrey Konovalov Subject: Re: [PATCH v6 27/39] kasan, mm: only define ___GFP_SKIP_KASAN_POISON with HW_TAGS Message-ID: References: <44e5738a584c11801b2b8f1231898918efc8634a.1643047180.git.andreyknvl@google.com> <63704e10-18cf-9a82-cffb-052c6046ba7d@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Stat-Signature: odzm1bbaq3duz7wmecuqpxu6gw96user Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b="r/jOVR6M"; spf=none (imf11.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none X-Rspam-User: X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: CA5D340013 X-HE-Tag: 1648048307-299295 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: On Wed, Mar 23, 2022 at 02:57:30PM +0100, Vlastimil Babka wrote: > I guess it's the simplest thing to do for now. For the future we can > still improve and handle all combinations of kasan/lockdep to occupy as > few bits as possible and set the shift/mask appropriately. Or consider > first if it's necessary anyway. I don't know if we really expect at any > point to start triggering the BUILD_BUG_ON() in radix_tree_init() and > then only some combination of configs will reduce the flags to a number > that works. Or is there anything else that depends on __GFP_BITS_SHIFT? The correct long-term solution is to transition all the radix tree users to the XArray, which has the GFP flags specified in the correct place (ie at the call site) instead of embedding the GFP flags in the data structure. I've paused work on that while I work on folios; by my count there are about 60 users left. What I really need is something which prevents any attempt to add new users. Maybe that's a job for checkpatch.