Messages in this thread | | | Date | Thu, 12 Nov 2015 13:17:41 -0800 | From | "Luck, Tony" <> | Subject | Re: [PATCH 1/3] x86, ras: Add new infrastructure for machine check fixup tables |
| |
On Thu, Nov 12, 2015 at 12:04:36PM -0800, Andy Lutomirski wrote: > > We already have code to recover from machine checks encountered > > while the processor is executing ring3 code. > > I meant failures during copy_from_user, copy_to_user, etc.
Yes. copy_from_user() will be pretty interesting from a coverage point of view. We can recover by sending a SIGBUS to the process just like we would have if the process had accessed the data directly rather than passing the address to the kernel to acccess it.
copy_to_user() is a lot harder. The machine check is on the kernel side of the copy. If we are copying from page cache as part of a read(2) syscall from a regular file we can probably nuke the page from the cache and return -EIO to the user. Other cases may be possible, but I don't immediately see any way to do it as a general case.
-Tony
| |