From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=91.218.175.244 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796310086; b=Txy4BHQ/6EcIVyX6Fvr9oYoFUDDCZs0Q5buYApz0vnVRx5zOQTitADh29XlQfmLWRHxE m6h7XwXj9ZdFu5w8Se322GFBcjjgJ7GlmcX/OSj8VYWLnewtsyjHJt0wCyC+UxK6Me/Yi HBNcbA3CoUJkXv5UgwE3COSXVXM835DOHrrcuAjntvFY+fTIuxiB11cEGaaEdaHVplggR Pnonfp55E7l5QOq1kWd1n9wNRFfTI4CtU4DGVz7P8vBifdjw80HFDdYICTpaIr8bw6I/s u91f101hxAfBgYl5VB/belJda7e0FZ+DgXHNF/CxJSmc+smqvgfU2a9R+n4Yc+J+nrg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796310086; 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=T8QG7tm8vW222A65PmGFA8JUzQDRWT8MKE7FozTwyvI=; b=UU3rEBT/NzfQVzlhCfkTbxkAq6PT/1uBD/pH/+XiuGuxLT+dbPP38bwIGg3iKgwqxXiC hR1d5YajAc2tG1gGVzva3VSK0fNGcYfAbBrNMnAKpuzRphDPynEe7IZSxtKOJfIKpxXWy wKBi6kq+4JqQO3jSck07XcFKYCto2NPWQhXCLb4UQ2QZH+U/y6+S1q1uPpAww5iBNfD5C VybTLC+8905+K86f4ltpOlXm37wTh/JPepVVFlpSGgvtTutbdOeukEizrwGXBvue9Rngu x+vcnXRsEiFN1Mx/RAfldh8UeihKcQut0h1OFaEaVkqyiwZKGdUGsrJ3YcrvphrZCGA== 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=XIGYMy9W; arc=none smtp.remote-ip=91.218.175.244 Received: from mta0.migadu.com (out-244.mta0.migadu.com [91.218.175.244]) (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 13982606A681 for ; Thu, 3 Dec 2026 15:01:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 13982606A681 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=XIGYMy9W X-Envelope-To: netdev@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=qN0UP3JSXiTggxHt9vQzkC+Pr01SuIbbRfzUHP6FY8o=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1796310084; v=1; x=1796914884; b=XIGYMy9WcyuYKvNoI2yINc2NR/OQZsYmNifRZ0scJB2eKOu+OmVNDMCs6obF1hgK61+4BaEb Dxd2qUno36RzDZisjHW9pwS+m3ue8LIiK3A/fSVO5cnQjbsSVWh0igKUHpaEkUTZkDYW+e+EJr9 hw3JN3UKrCR8E/Az0iYj2uuE= X-Envelope-To: netdev@vger.kernel.org Received: by smtp.migadu.com with ESMTPS id fcec87ee07399798; Thu, 03 Dec 2026 15:01:23 +0000 X-Mizu-Trace-ID: fcec87ee07399798 X-Migadu-Flow: FLOW_OUT Date: Thu, 3 Dec 2026 15:01:03 +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 11/14] smack: specify SLAB_MAY_ACCOUNT for smack_rule cache 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-11-7c680f02a734@kernel.org> X-Mailing-List: netdev@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-11-7c680f02a734@kernel.org> On Wed, Nov 25, 2026 at 09:37:12PM +0000, Harry Yoo (Meta) wrote: > smk_copy_rules() allocates rules with the gfp passed from > security_prepare_creds(), which is GFP_KERNEL_ACCOUNT. Specify > SLAB_MAY_ACCOUNT when the object may be charged to a memcg. > __GFP_ACCOUNT without SLAB_MAY_ACCOUNT will not be allowed. > > Path: fork() -> copy_creds() -> prepare_creds() > -> security_prepare_creds(GFP_KERNEL_ACCOUNT) -> smack_cred_prepare() > -> smk_copy_rules() -> kmem_cache_zalloc(smack_rule_cache) > > Cc: Casey Schaufler > Cc: Paul Moore > Cc: James Morris > Cc: "Serge E. Hallyn" > Cc: linux-security-module@vger.kernel.org > Reviewed-by: Casey Schaufler > Signed-off-by: Harry Yoo (Meta) > --- > security/smack/smack_lsm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Looks good to me. Reviewed-by: Hao Li -- Thanks, Hao