Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1173947pxb; Thu, 24 Mar 2022 14:21:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzRkCwbDfi8qQP4onMe5pwPoelrWFjDCIqsudSr//C9dbFfqPl1WF1f2SjPvUJ6mH5jfVoi X-Received: by 2002:a17:90a:d0c4:b0:1bc:b02e:ed75 with SMTP id y4-20020a17090ad0c400b001bcb02eed75mr21177496pjw.104.1648156870762; Thu, 24 Mar 2022 14:21:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648156870; cv=none; d=google.com; s=arc-20160816; b=XxYpEInYgp8Q2ph4LQVKLlbwYwCApr8K+McKvNxewazdtnmEqB1sZyjIvgkVAlgr9c Ze+QkR3vjqO1rmuSpkRlMtKnHxc7//9UhvRQabOWCD4wcoLWXp795dXK5WAu3QPmxTca 5Zr1S6Z3h5SdkzTK9yNa8WKfRWrh3vsGiQXS2uWuKVT3x8SETcjj1i6ZI1ebUIv2Bb4H eWSYvspA1zaiUg4KE2H3xrEqUL2wrs0b8SBKHZREXB+uI4HmKnARfADHhkbttNx2AfaD aNJrJcwzvfyL4UpTR/qgqIOl2sDECy7plgRhuiLVn1hClZz6z9xxkaCXWbdfVOoI7bFd Y8og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=mbYKYLyioxmza+e6kvwBLRa+wBIGtShUFd+o0R6xiJk=; b=ehjJdMX0Yi8eAWlEVYCWA+9R2SSfQIWUMEc5x84m89FLTCmITK5BO0r5rGsU7kpRtf 7gXanEHs8zELPJe9YgNjSSSWUKSX29WqOON3N/49hM7NkYnP66MVkc73qqSLUMBLbyGZ T5RfdbCz7u2Mt7SN/YKV7XJCHA5ASeFW5noToPvmRVgKytynlF60HaaZ7A/dGAsjuG9F CqtELLoxYris3mwDLzv6WegIJbVyBt7qln/eKt7+6oAeiZOcrpoK6lkwn8CnyIR3d4Cd P6dAQZEwC7dLdUacSG8PcICkWtteXV6C8SOIFfxhdCXpkTN/p5PZiHEDnwpn4i54w0fz nkOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="r/jOVR6M"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g14-20020a65594e000000b003820fac6c22si485148pgu.340.2022.03.24.14.20.56; Thu, 24 Mar 2022 14:21:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="r/jOVR6M"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245033AbiCWPNW (ORCPT + 99 others); Wed, 23 Mar 2022 11:13:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45454 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234324AbiCWPNV (ORCPT ); Wed, 23 Mar 2022 11:13:21 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A1CAE03D for ; Wed, 23 Mar 2022 08:11:50 -0700 (PDT) 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-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.