lkml.org 
[lkml]   [2023]   [Mar]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] mm: kfence: fix handling discontiguous page
From
Date


> On Mar 24, 2023, at 06:18, Andrew Morton <akpm@linux-foundation.org> wrote:
>
> On Thu, 23 Mar 2023 10:50:03 +0800 Muchun Song <songmuchun@bytedance.com> wrote:
>
>> The struct pages could be discontiguous when the kfence pool is allocated
>> via alloc_contig_pages() with CONFIG_SPARSEMEM and !CONFIG_SPARSEMEM_VMEMMAP.
>> So, the iteration should use nth_page().
>
> What are the user-visible runtime effects of this flaw?

Set the PG_slab and memcg_data to a arbitrary address (may be not used as a struct
page), so the worst case may corrupt the kernel.

Thanks.

>
> Thanks.

\
 
 \ /
  Last update: 2023-03-27 01:16    [W:0.049 / U:0.440 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site