RE: [PATCH] x86/mce: deal with UCE when copy clean pagecache to user space
From: Luck, Tony
Date: Fri Sep 26 2025 - 12:07:13 EST
> Based on copy_from_user, extending the goal to unmap,discard,
> and remap when errors occur in clean pagecache.
This looks to be covering the case where an application does:
n = read(fd, buf, size);
and the kernel gets a machine check because the data in the page
cache has an uncorrected error, which the kernel consumes while
copying out to user space.
I think this patch solves the immediate problem by avoiding a system
crash from that machine check.
But shouldn't the kernel be able to do better? The page is clean, so
the kernel could drop it from the page cache, allocate a new page,
fill the page by reading from filesystem, and then let the read(2)
syscall resume, copying the freshly acquired copy of the page.
-Tony