Re: [PATCH v9 1/2] mm/khugepaged: recover from poisoned anonymous memory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Feb 7, 2023 at 7:20 PM Jiaqi Yan <jiaqiyan@xxxxxxxxxx> wrote:
>
> Pinging KMSAN experts, for the general guidance of
> kmsan_copy_page_meta vs kmsan_unpoison_memory

Oh, sorry, I've missed the previous email.

copy_mc_user_highpage() is expected to copy data from the user page,
for which no metadata is ever allocated.
Therefore we just initialize the destination shadow with zeros instead
of copying anything.

kmsan_copy_page_meta() is used when the metadata is copied between two
kernel pages, therefore it handles the cases when page->kmsan_shadow
is NULL for the source and destination pages.

It might be a good idea to use kmsan_copy_page_meta() in both cases,
but to do that I want to better understand what happens when
kmap_local_page(from) is called in copy_mc_user_highpage().
Where does the corresponding struct page come from?




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux