Received: by 2002:a05:7412:a9a8:b0:f9:92ae:e617 with SMTP id o40csp49880rdh; Wed, 20 Dec 2023 15:45:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IFIi9DeXZZP+GZ3lc4wY+nvjlZDGXo+WI5hMZ6X7xAhjvYvhvDe+TiaDIIkqYak2dV1vEIq X-Received: by 2002:a17:907:ca12:b0:a1e:3a14:e84b with SMTP id uk18-20020a170907ca1200b00a1e3a14e84bmr3190086ejc.44.1703115926577; Wed, 20 Dec 2023 15:45:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703115926; cv=none; d=google.com; s=arc-20160816; b=QcN+PWuVPXfN/X5u7oDnouQaU/Y4gSWvlaBoCK0IS4BPtmYokQ5zg4rpD6Fx5GhLwa KVPK76V106Hm1wUfNDbnEVWw/6DAe0FOElnuVBG3UjkKsalSIfhUZvwmhA0S0Rt+h2pq B9dOVMoG6kgHVX+INFXGr7+n96DtOHlz8ojmckHLUe2CF0/+FtU+/enGWRbfle8enNxz bdOcX3uLqloniHWglZ+f0bbHBsblx0G9VxU2GLBfdT1rBuwUp2fKoGtdWtQGAumqIjx6 ujITVZfOiwrMzN5UXQav2M9aVh2e22WoYm7vyzap5/9KmIg5kMxd9d99ajlqGgR6fzFL u8Sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=BRiqn6qJxrITE4e2Ib4uvsrQtS1W15KSJpparCjQXiQ=; fh=mGRWHM9mAFtFUvHFzLTD+JuZeg3vpXmrMrpkkbhYbTs=; b=BMeI5mtwexb133EWEIhSWG2iDH+6O3KIy8qwmtw9sFGAAj+u3bdbGN7CJ9nu39V9hY LFjTTM5YwsYStmBZwJTL4vz9S5mkrZvCANraiUF8YrOax/MhVgeY2TQbTHneODt4CnoD ys+h93bBGW0v4PRqLfpK77vViAc5sFXyNKxy8dVK023RJ+WfcQ7EsR1n6a8MuUNcoKhI BbJf/FXiUa9voUBYIoHu/OdW5O393Uu+rLb0zTV1jtCdk6V+Rp9lJQU6OK5zay87WnMe MQi+4xvfxnrybF+j/v+B6yv+Qc3GBfsxyXagT30TzXGTUm9OTf4Z9Sv3Abytw5/f2L+q vz5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=VAgtexFs; spf=pass (google.com: domain of linux-kernel+bounces-7647-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-7647-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id f16-20020a170906561000b00a2352bc25f5si284171ejq.634.2023.12.20.15.45.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 15:45:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-7647-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=VAgtexFs; spf=pass (google.com: domain of linux-kernel+bounces-7647-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-7647-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 576931F23F68 for ; Wed, 20 Dec 2023 23:45:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5138649F66; Wed, 20 Dec 2023 23:44:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="VAgtexFs" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-oa1-f47.google.com (mail-oa1-f47.google.com [209.85.160.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4555E45C09 for ; Wed, 20 Dec 2023 23:44:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-oa1-f47.google.com with SMTP id 586e51a60fabf-203ae9903a6so102981fac.0 for ; Wed, 20 Dec 2023 15:44:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703115890; x=1703720690; 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=BRiqn6qJxrITE4e2Ib4uvsrQtS1W15KSJpparCjQXiQ=; b=VAgtexFsIjLFn3kKdorFLTJ3qjUaG7fEI2MEPHX+g+n++pITAn6AVsikod4otn3VNH WYfM9zgKJWi8R7FufWBhldLTnOTZdnkjEtM+a3Kt5+jdzsKG7HoU5ujZ/Fha+K+azWCm stcRdseDr2v4dvjoPXC0aNNNvA92wmcXHd9i83ko5H6Ctc+Hif/JR+Lu1WjZoLHd3Ixl BrKTzDttM7lDafZrFC5kN5XmI4QVV1Jb9BHMg0P1Tj6rTpxoBmGphX80dO36sowig3rW NoLEpSyrva3IRhQxLy7JQq4WiLTTaq5x1gFujTXfv/crocOEo1oDeUPHqvAyazqQE4H1 ePgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703115890; x=1703720690; 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=BRiqn6qJxrITE4e2Ib4uvsrQtS1W15KSJpparCjQXiQ=; b=Ucj65A2pCUsp5n9Gf773QlwHrs4sZe5Rs1OQUobpqRhBWU1UPFOcyMa9dmVWGSIOO1 vLA8oq5u9T92rl2iOmjBQqOJ8sAtp2DvgnZreC2AuFzThxnsqYh5fFMil2OuX64zXTPU 4dtb2D9hy19Ukr8bE/OVGGvJZHLGtGETZZBm2kTDK4/09ILZc9FbI4H9QF0HASJHxfdQ ohRjUNB9uUtv+PwZg4iJFkyLwbm3ToflAUcv419VtvsFlRVCvUNW7JmlAI13Bku3mi9S B8UEyDWjwb2kqmJrXDlzDV9KhV8qGxeYvvspJJWDoxnfpdljV2CiV0h/NT/RqvkXTCWY A0+Q== X-Gm-Message-State: AOJu0YyrVvVD7Qh+R+MQHH749LrTocZq2FN3ySgIsddwsO1zyQsqCpG5 pdvzkOuphnmh6km1beALaxtwt459enDkVlOmNAI= X-Received: by 2002:a05:6871:288:b0:204:1ae1:e538 with SMTP id i8-20020a056871028800b002041ae1e538mr546549oae.6.1703115890207; Wed, 20 Dec 2023 15:44:50 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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: Thu, 21 Dec 2023 00:44:39 +0100 Message-ID: Subject: Re: [PATCH 4/4] mm/slub: free KFENCE objects in slab_free_hook() To: Vlastimil Babka Cc: Marco Elver , Chengming Zhou , 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 On Tue, Dec 12, 2023 at 12:42=E2=80=AFPM Vlastimil Babka w= rote: > > On 12/11/23 23:11, Andrey Konovalov wrote: > > On Wed, Dec 6, 2023 at 3:45=E2=80=AFPM Marco Elver w= rote: > >> > >> The is_kfence_address() implementation tolerates tagged addresses, > >> i.e. if it receives a tagged non-kfence address, it will never return > >> true. > > So just to be sure, it can't happen that a genuine kfence address would t= hen > become KASAN tagged and handed out, and thus when tested by > is_kfence_address() it would be a false negative? No, this should not happen. KFENCE objects never get tags assigned to them.