Re: [PATCH v5 09/17] x86/crash: Fix massive out-of-bounds write on 32-bit Highmem

[email protected]
Newsgroups gmane.linux.kernel
Message-ID <20260918101633.F39531F000FF__46967.6696973451$1789728020$gmane$org@smtp.kernel.org>
> On 32-bit x86 systems with HIGHMEM, kmap_local_page() only maps a single
> 4KB page. However, the elfcorehdr segment can span several pages (up to
> hundreds of kilobytes).
> 
> The original code blindly copies 'elfsz' bytes at once via
> memcpy_flushcache(), overwriting adjacent fixmap entries or critical
> virtual addresses.
> 
> Fix this by copying the new elfcorehdr page by page.
> 
> Cc: Thomas Gleixner <[email protected]>
> Cc: Ingo Molnar <[email protected]>
> Cc: Borislav Petkov <[email protected]>
> Cc: Dave Hansen <[email protected]>
> Cc: "H. Peter Anvin" <[email protected]>
> Cc: "Mike Rapoport (Microsoft)" <[email protected]>
> Cc: Vishal Verma <[email protected]>
> Cc: Baoquan He <[email protected]>
> Cc: Chao Gao <[email protected]>
> Cc: Sean Christopherson <[email protected]>
> Cc: Eric DeVolder <[email protected]>
> Cc: Hari Bathini <[email protected]>
> Cc: Andrew Morton <[email protected]>
> Cc: Sourabh Jain <[email protected]>
> Cc: [email protected]
> Fixes: ea53ad9cf73b ("x86/crash: add x86 crash hotplug support")
> Link: https://sashiko.dev/#/patchset/20260907125404.922123-1-ruanjinjie%40huawei.com
> Signed-off-by: Jinjie Ruan <[email protected]>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=9
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.