Thread (22 messages) 22 messages, 3 authors, 2021-09-20

Re: [PATCH v2 1/3] x86/mce: Avoid infinite loop for copy from user recovery

From: Borislav Petkov <bp@alien8.de>
Date: 2021-08-22 14:45:39
Also in: linux-edac, lkml

Possibly related (same subject, not in this thread)

On Fri, Aug 20, 2021 at 01:33:56PM -0700, Luck, Tony wrote:
The new version (thanks to All fixing iov_iter.c) now does
exactly what POSIX says should happen.  If I have a buffer
with poison at offset 213, and I do this:

	ret = write(fd, buf, 512);

Then the return from write is 213, and the first 213 bytes
from the buffer appear in the file, and the file size is
incremented by 213 (assuming the write started with the lseek
offset at the original size of the file).
... and the user still gets a SIGBUS so that it gets a chance to handle
the encountered poison? I.e., not retry the write for the remaining 512
- 213 bytes?

If so, do we document that somewhere so that application writers can
know what they should do in such cases?

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help