From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=91.218.175.218 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796310041; b=lO/hdJuKhs6jrTIHv2wouC1lI6v7eSQKZ5G6DdMyzYrWy2L0CpPTxRwyTZOS2DTnGyia f8Qw7JiOIAmjlIfxFqIl7g+YisuWjeg69cmkgihaI1os7gg423bPoWfX5+RhoQT3kIOqP RLGwH7MT80p38JDvENBg1/j0IX9q4ccCBZfwelxAZGxtVW6CjkXqCG74ith73xcmsgs/3 IJDqbOw64XKkvrgfLIrH8hkkGiIWIbFnHoibKPuVJu/kxLb6XYrYCC93tR9N/wJWoKYO/ Pb0kWpNP7zspElAHmQuBMFCPHCG+Ur1O1MdWPDSG64MjP+EJJ0trg3Y0SL3zfEcr+Hg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796310041; h=DMARC-Filter:X-Envelope-To:DKIM-Signature:X-Envelope-To:Received: X-Mizu-Trace-ID:X-Migadu-Flow:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=jRQATDvTtzT7vRg87orGDwrUhnC02dLg0/D9TYRWRwk=; b=vUPCs/yt6WFxY75dLh9zpLa2bXHnwkAge2s4CKHS/rX3ZDB5g74QhwXqr4qe5I2x7au8 jv9/4etwgr8aWaEJDJJh24qSA8vGpWolWYS6zCOyX6Jg3m7gFrM2GUwbz2Ayj6xV/R1uY xGyM3JJBIy53KRHPVxbkq/T4b9vQENW+S3wEp+P16bjPix3gnGGYkLbCcdMhYptsZw7Zi x1C6R//OtPHKWc+QgICJX+glWgfaxLqRVGsh/5SOg+lU/kFJONGpzKY8z2Bvn0wiG7q1/ qvdIVUKWpNyc5MHxnhlH+ox/pCqA5wbZ3ObxRqWyrXXC/xcK5Q+R2yryQBs/QVeuKng== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=txB1CSoa; arc=none smtp.remote-ip=91.218.175.218 Received: from mta0.migadu.com (out-218.mta0.migadu.com [91.218.175.218]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9F8126072C6E for ; Thu, 3 Dec 2026 15:00:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 9F8126072C6E Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=txB1CSoa X-Envelope-To: linux-security-module@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=AC/uyxytAGkOIejkJl5QnKG+bcfmt4CB6pLRoCbuB5g=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1796310038; v=1; x=1796914838; b=txB1CSoaVdoOP2UPlQztkW2SvYILba/UHStl3E6SUi8ifwugnt+W3sPKKpvwqBw2eJL3cNcJ 2LRPIRqVfhi+BmK5kuEg321gSFKuet8bp5Yi7dwfBm88oqcmx/sQmTcFWEjzKR7//ANHx0sKifx cFHiDl6uK9HdxxZRE06ze/js= X-Envelope-To: linux-security-module@vger.kernel.org Received: by smtp.migadu.com with ESMTPS id 3d21167791563ecd; Thu, 03 Dec 2026 15:00:24 +0000 X-Mizu-Trace-ID: 3d21167791563ecd X-Migadu-Flow: FLOW_OUT Date: Thu, 3 Dec 2026 15:00:01 +0000 From: Hao Li To: "Harry Yoo (Meta)" Cc: Vlastimil Babka , Andrew Morton , Suren Baghdasaryan , Johannes Weiner , Michal Hocko , Shakeel Butt , Roman Gushchin , Christoph Lameter , David Rientjes , Muchun Song , Hao Ge , Pedro Falcato , linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel-team@meta.com, "Liam R. Howlett" , Alice Ryhl , Andrew Ballance , Matthew Wilcox , linux-fsdevel@vger.kernel.org, Alexander Viro , Christian Brauner , Jan Kara , "David S. Miller" , Jakub Kicinski , Sebastian Andrzej Siewior , Jiayuan Chen , netdev@vger.kernel.org, Kees Cook , David Hildenbrand , Lorenzo Stoakes , Catalin Marinas , Will Deacon , Mark Rutland , Madhavan Srinivasan , Michael Ellerman , Nicholas Piggin , Robin Murphy , "Joerg Roedel (AMD)" , Amir Goldstein , Casey Schaufler , Paul Moore , James Morris , "Serge E. Hallyn" , linux-security-module@vger.kernel.org, Richard Weinberger , Anton Ivanov , Johannes Berg , Eric Dumazet Subject: Re: [PATCH slab/for-next v2 10/14] fanotify: specify SLAB_MAY_ACCOUNT for event caches Message-ID: References: <20261125-memalloc-prof-dont-waste-slabobj-ext-metadata-v2-0-7c680f02a734@kernel.org> <20261125-memalloc-prof-dont-waste-slabobj-ext-metadata-v2-10-7c680f02a734@kernel.org> X-Mailing-List: linux-security-module@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20261125-memalloc-prof-dont-waste-slabobj-ext-metadata-v2-10-7c680f02a734@kernel.org> On Wed, Nov 25, 2026 at 09:37:11PM +0000, Harry Yoo (Meta) wrote: > fanotify events are allocated with GFP_KERNEL_ACCOUNT and charged to > the memcg of the listener. Specify SLAB_MAY_ACCOUNT when the object > may be charged to a memcg. __GFP_ACCOUNT without SLAB_MAY_ACCOUNT > will not be allowed. > > Path: fsnotify() -> fanotify_handle_event() > -> fanotify_alloc_event(GFP_KERNEL_ACCOUNT) > -> kmem_cache_alloc(fanotify_{fid,path,perm,mnt}_event_cachep) > > Cc: Jan Kara > Cc: Amir Goldstein > Cc: linux-fsdevel@vger.kernel.org > Signed-off-by: Harry Yoo (Meta) > --- > fs/notify/fanotify/fanotify_user.c | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) Looks good to me. Reviewed-by: Hao Li -- Thanks, Hao