[PATCH slab/for-next v2 07/14] arm64/mm: specify SLAB_MAY_ACCOUNT for pgd_cache

Hao Li hao.li at linux.dev
Thu Dec 3 14:53:47 UTC 2026


On Wed, Nov 25, 2026 at 09:37:08PM +0000, Harry Yoo (Meta) wrote:
> When PGD_SIZE != PAGE_SIZE, user PGDs are allocated from pgd_cache
> with GFP_PGTABLE_USER, which includes __GFP_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 (e.g. 64K pages): copy_process() -> mm_init() -> pgd_alloc()
>   -> kmem_cache_alloc(pgd_cache, GFP_PGTABLE_USER)
> 
> Cc: Catalin Marinas <catalin.marinas at arm.com>
> Cc: Will Deacon <will at kernel.org>
> Cc: Mark Rutland <mark.rutland at arm.com>
> Cc: Anshuman Khandual <anshuman.khandual at arm.com>
> Cc: linux-arm-kernel at lists.infradead.org
> Signed-off-by: Harry Yoo (Meta) <harry at kernel.org>
> ---
>  arch/arm64/mm/pgd.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

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

-- 
Thanks,
Hao



More information about the Linux-security-module-archive mailing list