🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #26451

Re: [PATCH slab/for-next v2 11/14] smack: specify SLAB_MAY_ACCOUNT for smack_rule cache

#26451
From: Hao Li
Date: Thu, 03 Dec 2026 15:01
28 lines
11121 bytes
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 <casey@schaufler-ca.com>
> Cc: Paul Moore <paul@paul-moore.com>
> Cc: James Morris <jmorris@namei.org>
> Cc: "Serge E. Hallyn" <serge@hallyn.com>
> Cc: linux-security-module@vger.kernel.org
> Reviewed-by: Casey Schaufler <casey@schaufler-ca.com>
> Signed-off-by: Harry Yoo (Meta) <harry@kernel.org>
> ---
>  security/smack/smack_lsm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Looks good to me.
Reviewed-by: Hao Li <hao.li@linux.dev>

-- 
Thanks,
Hao
Technical Details
Message-ID: <axGEHmj68V7T2p39@fedora>
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu.MISMATCH!feed-us-txt.newsdeef.eu!feed-us-ny.newsdeef.eu!srv.newsdeef.eu!feed-eu-txt.newsdeef.eu!feed-eu-ch.newsdeef.eu!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-376692-linux-kernel-netdev=dewy.ru
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>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu.MISMATCH!feed-us-txt.newsdeef.eu!feed-us-ny.newsdeef.eu!srv.newsdeef.eu!feed-eu-txt.newsdeef.eu!feed-eu-ch.newsdeef.eu!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-376692-linux-kernel-netdev=dewy.ru
From: hao.li@linux.dev (Hao Li)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH slab/for-next v2 11/14] smack: specify SLAB_MAY_ACCOUNT
 for smack_rule cache
Date: Thu, 3 Dec 2026 15:01:03 +0000
Organization: Usenet Network
Message-ID: <axGEHmj68V7T2p39@fedora>
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>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: usenet.network;
	logging-data="2522169"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:AuyrjXVvwCNcA6hrjkQ7P3FNAN0= sha256:FQXhZs5Pfz2RlVTZU27c9OsNJ3FklEn7p86AxJncP/4=
	sha1:LlWiycGAA5qJ8Jz8nb6qbm+5ZGc= sha256:LsPa002lAZwCPphlTjt6vfxuo/yyIXVOtSArGd5NgOU=
Content-Disposition: inline
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 7BC1A11794E; Thu,  3 Dec 2026 18:04:17 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.299
X-Spam-Status: No, score=-3.299 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (1024-bit key)
	header.d=linux.dev
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id PFZehI-cTmu1;
	Thu,  3 Dec 2026 18:04:15 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=netdev+bounces-376692-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=linux.dev
X-Received: from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4])
	by mail.dewy.ru (Postfix) with ESMTPS id A3ABF117998; Thu,  3 Dec 2026 18:03:58 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sin.lore.kernel.org (Postfix) with ESMTP id C042E29612; Thu,  3 Dec 2026 15:03:27 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1796310087;
	b=shW6zvwxx9/ClmR82Su6wyOA+XNgRaGt9atKZHJioFvVsznGaGvssDRSJc6T5t4lkrYU
	 rOSIPUcVG2R03Wg4TaMiP54CnvnM1+dAT+AkHc8zCCHTtliLsLpJbxxSxce0alvSkGUEu
	 +CFWUO8pXFTsnyJlTa1hqLEXKvHWc/VF3YOEiwd05xdV8/2MiKW1WV+NI10zdmNBK27t4
	 45eG0KZ1JmqsYrXc6ic+rxz3/LbUFWaJXNxKYe8glqCpZNX37Z0bb9El5yYkb3KD6o5xD
	 cZxeaw3yz1KrAGDE8ZEy3u8wCirjpzEpAoH/CHkLvw3Pe+Jrq5qv+QApaAHmFxIfrOQ==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796310087;
	h=X-Original-To:Received: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:X-Mailing-List:List-Id:List-Post:
	 List-Help:List-Subscribe:List-Unsubscribe:List-Owner:Precedence:
	 MIME-Version:Content-Type:Content-Disposition:In-Reply-To;
	bh=T8QG7tm8vW222A65PmGFA8JUzQDRWT8MKE7FozTwyvI=;
	b=OWKov2WSINC9qatC+sf6RtVBhMvLDT/wJjENprDNH2a9qpvvzMSLErf0q9OyAEJCu6y6
	 /5Mg4EYmA6U6u5XEbCyMm0hgu2VbYa0eRSS4wq7hvv0K0o1U0prUscRYFUGil331ZGosf
	 DVG3+ksgmLLQh5NrwTjUhv3i3WADpG1avRXZmAQEPXc/ZorM6mAW0E19SwAMVvF0d0Tn+
	 /xnh/Jon8XJUP3Bpzpq+7wT6SR9n9kFbnuAqQDypJTZFmiNahOjLC2l5MX42JpUgCwZia
	 JKVo2ZvNnXmPNCPcWu/ih41uO6yV6qIel+IRz+r6Gj05ef2cvhotVRx+SEeMoOTg6/Q==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=XIGYMy9W;
	dmarc=pass header.from=linux.dev;
	spf=pass smtp.mailfrom=linux.dev;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 8A4A4606B252;
	Thu,  3 Dec 2026 15:01:27 +0000 (UTC)
X-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-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=91.218.175.244
X-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==
X-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==
X-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
X-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 <netdev@vger.kernel.org>; Thu,  3 Dec 2026 15:01:25 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 13982606A681
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev
X-Envelope-To: netdev@vger.kernel.org
X-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
X-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
X-Cc: Vlastimil Babka <vbabka@kernel.org>, 
	Andrew Morton <akpm@linux-foundation.org>, Suren Baghdasaryan <surenb@google.com>, 
	Johannes Weiner <hannes@cmpxchg.org>, Michal Hocko <mhocko@kernel.org>, 
	Shakeel Butt <shakeel.butt@linux.dev>, Roman Gushchin <roman.gushchin@linux.dev>, 
	Christoph Lameter <cl@gentwo.org>, David Rientjes <rientjes@google.com>, 
	Muchun Song <muchun.song@linux.dev>, Hao Ge <hao.ge@linux.dev>, Pedro Falcato <pfalcato@suse.de>, 
	linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel-team@meta.com, 
	"Liam R. Howlett" <liam@infradead.org>, Alice Ryhl <aliceryhl@google.com>, 
	Andrew Ballance <andrewjballance@gmail.com>, Matthew Wilcox <willy@infradead.org>, 
	linux-fsdevel@vger.kernel.org, Alexander Viro <viro@zeniv.linux.org.uk>, 
	Christian Brauner <brauner@kernel.org>, Jan Kara <jack@suse.cz>, "David S. Miller" <davem@davemloft.net>, 
	Jakub Kicinski <kuba@kernel.org>, Sebastian Andrzej Siewior <bigeasy@linutronix.de>, 
	Jiayuan Chen <jiayuan.chen@linux.dev>, netdev@vger.kernel.org, Kees Cook <kees@kernel.org>, 
	David Hildenbrand <david@kernel.org>, Lorenzo Stoakes <ljs@kernel.org>, 
	Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will@kernel.org>, 
	Mark Rutland <mark.rutland@arm.com>, Madhavan Srinivasan <maddy@linux.ibm.com>, 
	Michael Ellerman <mpe@ellerman.id.au>, Nicholas Piggin <npiggin@gmail.com>, 
	Robin Murphy <robin.murphy@arm.com>, "Joerg Roedel (AMD)" <joro@8bytes.org>, 
	Amir Goldstein <amir73il@gmail.com>, Casey Schaufler <casey@schaufler-ca.com>, 
	Paul Moore <paul@paul-moore.com>, James Morris <jmorris@namei.org>, 
	"Serge E. Hallyn" <serge@hallyn.com>, linux-security-module@vger.kernel.org, 
	Richard Weinberger <richard@nod.at>, Anton Ivanov <anton.ivanov@cambridgegreys.com>, 
	Johannes Berg <johannes@sipsolutions.net>, Eric Dumazet <edumazet@kernel.org>
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list
X-In-Reply-To: <20261125-memalloc-prof-dont-waste-slabobj-ext-metadata-v2-11-7c680f02a734@kernel.org>