Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp4272265rdb; Mon, 11 Dec 2023 14:12:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IHt24ZoPH9tXBZ9vubcqhkNj1ongd93AwkWwqM9No4cjC/kb3CwYoDGUjFiABcTpjA1JbJ+ X-Received: by 2002:a17:902:d48e:b0:1d0:9f40:7a82 with SMTP id c14-20020a170902d48e00b001d09f407a82mr2766879plg.97.1702332745363; Mon, 11 Dec 2023 14:12:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702332745; cv=none; d=google.com; s=arc-20160816; b=vJrP0Tc4e0xGq1sPGLrQbPs/cC0s8F8sdDMmRsZl5LczyJp+UUa9+kFq4QebnQUEii AaRflEjWDtror14XgDVyY4QlTeVRLgHq7cyiX6MHxAOQnbdAHKhNryclTfMIdDZdzbun 2teElODgybSOEP8eKZOQrFC6Gnaw+vFSM+FlwJfU+7Gk4WysCqxrxHT1/M1MC/qfpqpW SKMHvTUwyFl9OdC0xGCPwh/CMEDP7P1KacvDFLhk5HlqS45WEFaOtpEErW0liYy7Mu/o 7FFijb0EA3LGDYeKg92rkC2/rJpA3q06hk92/X1PKl84LwS7zjyqg9FZ8Q3V+W8jRsJH 9BpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=DBxEKBNamMvlGFbzwl1mFmti5qczGRc6ilz0oKWYU1E=; fh=ADibHOfys6xCMvdJRYGsAbL9u3TxDPeun2r5P3g1MR0=; b=x3CHfY/d0huLkz8bI6/LpaSnZFmUC15NEw0fVFir9/b68hkT/KybAEoFhtfmL7eHnw h5TjJyc0U3JKkiPXDTyWR7jTZobkTeAN/focrUWbhPK134EZiCvmARcmT5AFssW9GY7t 6mPz5E8O4ZsTMjrsJ9VGfmPAd8+iLOVD/1BcYvDN04uNFIah2nQFDGsRZGy0zDs/VQbI P4kRW5fYbEg9fiYwn9oezUHiRxbfvykeqV5cy1QPO+AJukvjy6z9S+/gg3IgvSVZ/hIe RTgkkmA1pLRcaDGwe7JdzzHpmJPEhtHnCqPBM/SyA4nNf4Ba2ON5olN2TRkmCzdMQK7t dh1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=lJrOZ85H; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id k17-20020a170902c41100b001cfe100a99fsi6929026plk.487.2023.12.11.14.12.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 14:12:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=lJrOZ85H; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 18EA38097175; Mon, 11 Dec 2023 14:12:23 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345629AbjLKWL4 (ORCPT + 99 others); Mon, 11 Dec 2023 17:11:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50084 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345598AbjLKWLz (ORCPT ); Mon, 11 Dec 2023 17:11:55 -0500 Received: from mail-pg1-x536.google.com (mail-pg1-x536.google.com [IPv6:2607:f8b0:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9BE23E4 for ; Mon, 11 Dec 2023 14:12:01 -0800 (PST) Received: by mail-pg1-x536.google.com with SMTP id 41be03b00d2f7-5c701bd98f3so953044a12.1 for ; Mon, 11 Dec 2023 14:12:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702332721; x=1702937521; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=DBxEKBNamMvlGFbzwl1mFmti5qczGRc6ilz0oKWYU1E=; b=lJrOZ85HmMUw7bVFmAwdaiCubnbw+AxFUcMy2GU6Re419Nc0AkSEdN3fdxyKYyejMJ UltylsbKsDj1/hr9IOInLIiK/9PphdpPltbr14ghcEBbyxcYv69EloHj11sBHBFfbXbC uSQXe86ntETSvmsnXUgdX9fQXtAlcOFxmLJezJ3wBFqv7kQCu7uo8irfQ0l52RulGvi7 J6jc60rnIc57rOUeA/R+Wb/bf3PcPC9Zh7cO7yAERr1qQuw8JM2GP809ZNaaVrrA1+2E BNZarUlpYKfofqdcYxDH/EA09rfXZd4wqxPmdvrMu+GMJjHzO839ERnEd21sHl7Q8zp4 zmcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702332721; x=1702937521; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DBxEKBNamMvlGFbzwl1mFmti5qczGRc6ilz0oKWYU1E=; b=Vh3ZlI1Wng2T16D2O3nzludQNC9UgVbDxojfW4WPJLQwP9fYzC7RstyNwrpZzKz3Ap X+Hie897IjSM2wq8rieHhS7QYZlpJKOW08lOFH0FKsuAT6c6U1qE+zb6mD5UHyj6OOxl DmfPsFc9yZjGniArNXXbAdUuW4qJ8jMfRIzAV6Jj0cUPOtz8X8lBrDthjTjcn3tdIpAl ClDj51fnBXh1zbL+mrJdyKh5MjaKoAZRY0eNXAuy3mszPWW6VBwT29K8ueLA/7WGMsu4 3mShRE2G5wZI9kpt6CSVYKNlRhKYuMR5sYZ5BkrUpOkuvm4MaQYkcfgKT3RDEi05mvC4 OLdw== X-Gm-Message-State: AOJu0YzhN+wj5kVyuGDEpog3200EUV3HmspuX1nyNgDwN1xpaY7WudST XkT7BU+irD9fcBsQZaMoUih5SdhPE6YN3I8qQ0c= X-Received: by 2002:a17:90b:2204:b0:286:6cc1:28a with SMTP id kw4-20020a17090b220400b002866cc1028amr2291102pjb.85.1702332721019; Mon, 11 Dec 2023 14:12:01 -0800 (PST) MIME-Version: 1.0 References: <20231204-slub-cleanup-hooks-v1-0-88b65f7cd9d5@suse.cz> <20231204-slub-cleanup-hooks-v1-4-88b65f7cd9d5@suse.cz> <44421a37-4343-46d0-9e5c-17c2cd038cf2@linux.dev> <79e29576-12a2-a423-92f3-d8a7bcd2f0ce@suse.cz> In-Reply-To: From: Andrey Konovalov Date: Mon, 11 Dec 2023 23:11:50 +0100 Message-ID: Subject: Re: [PATCH 4/4] mm/slub: free KFENCE objects in slab_free_hook() To: Marco Elver Cc: Chengming Zhou , Vlastimil Babka , Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , Roman Gushchin , Hyeonggon Yoo <42.hyeyoo@gmail.com>, Alexander Potapenko , Dmitry Vyukov , linux-mm@kvack.org, linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Mon, 11 Dec 2023 14:12:23 -0800 (PST) On Wed, Dec 6, 2023 at 3:45=E2=80=AFPM Marco Elver wrote= : > > The is_kfence_address() implementation tolerates tagged addresses, > i.e. if it receives a tagged non-kfence address, it will never return > true. > > The KASAN_HW_TAGS patches and KFENCE patches were in development > concurrently, and at the time there was some conflict resolution that > happened when both were merged. The > is_kfence_address(kasan_reset_tag(..)) initially came from [1] but was > squashed into 2b8305260fb. > > [1] https://lore.kernel.org/all/9dc196006921b191d25d10f6e611316db7da2efc.= 1611946152.git.andreyknvl@google.com/ > > Andrey, do you recall what issue you encountered that needed kasan_reset_= tag()? I don't remember at this point, but this could have been just a safety meas= ure. If is_kfence_address tolerates tagged addresses, we should be able to drop these kasan_reset_tag calls.