Linus Torvalds writes: (Summary)
- for a user access the IO error flag potentially causes a SIGBUS as you
mention, but even there it's not 100% clear that's necessarily possible or
a good idea (I'm assuming that it can be damned hard to figure out _who_
caused the problem if it was a cached write that causes an MCE much much
later).
later).
- for the kernel, the "IO error flag" can hopefully be then (again, assuming you can correlate the MCE with the right process) be turned into EIO.
EIO.
See above: if you can handle user space errors "gracefully" (ie with a SIGBUS, no crazy "system fatal (reboot)" garbage), then I really don't see why you can't do the same for the kernel accesses.
why you can't do the same for the kernel accesses.
IOW, why do we need that special "copy_to_iter_mcsafe()", when a normal "copy_to_iter()" should just work (and basically _has_ to work) anyway?
later).
- for the kernel, the "IO error flag" can hopefully be then (again, assuming you can correlate the MCE with the right process) be turned into EIO.
EIO.
[...]
in your view?See above: if you can handle user space errors "gracefully" (ie with a SIGBUS, no crazy "system fatal (reboot)" garbage), then I really don't see why you can't do the same for the kernel accesses.
why you can't do the same for the kernel accesses.
IOW, why do we need that special "copy_to_iter_mcsafe()", when a normal "copy_to_iter()" should just work (and basically _has_ to work) anyway?