From: David Hildenbrand <david@redhat.com>
To: Kefeng Wang <wangkefeng.wang@huawei.com>,
Andrew Morton <akpm@linux-foundation.org>
Cc: Matthew Wilcox <willy@infradead.org>,
Muchun Song <muchun.song@linux.dev>,
"Huang, Ying" <ying.huang@intel.com>,
linux-mm@kvack.org
Subject: Re: [PATCH v3 2/2] mm: use aligned address in copy_user_gigantic_page()
Date: Tue, 29 Oct 2024 10:51:23 +0100 [thread overview]
Message-ID: <0429a803-beab-479c-bfdc-f9310a19c465@redhat.com> (raw)
In-Reply-To: <20241028145656.932941-2-wangkefeng.wang@huawei.com>
On 28.10.24 15:56, Kefeng Wang wrote:
> In current kernel, hugetlb_wp() calls copy_user_large_folio() with the
> fault address. Where the fault address may be not aligned with the huge
> page size. Then, copy_user_large_folio() may call copy_user_gigantic_page()
> with the address, while copy_user_gigantic_page() requires the address
> to be huge page size aligned. So, this may cause memory corruption or
> information leak, addtional, use more obvious naming 'addr_hint' instead
> of 'addr' for copy_user_gigantic_page().
>
> Fixes: 530dd9926dc1 ("mm: memory: improve copy_user_large_folio()")
> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
> ---
Reviewed-by: David Hildenbrand <david@redhat.com>
--
Cheers,
David / dhildenb
next prev parent reply other threads:[~2024-10-29 9:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-28 14:56 [PATCH v3 1/2] mm: use aligned address in clear_gigantic_page() Kefeng Wang
2024-10-28 14:56 ` [PATCH v3 2/2] mm: use aligned address in copy_user_gigantic_page() Kefeng Wang
2024-10-29 9:51 ` David Hildenbrand [this message]
2024-10-29 1:22 ` [PATCH v3 1/2] mm: use aligned address in clear_gigantic_page() Huang, Ying
2024-10-29 8:42 ` David Hildenbrand
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0429a803-beab-479c-bfdc-f9310a19c465@redhat.com \
--to=david@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=linux-mm@kvack.org \
--cc=muchun.song@linux.dev \
--cc=wangkefeng.wang@huawei.com \
--cc=willy@infradead.org \
--cc=ying.huang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox