Thread (32 messages) 32 messages, 7 authors, 2023-07-24

Re: [RFC PATCH 1/4] splice: Fix corruption of spliced data after splice() returns

From: Matt Whitlock <hidden>
Date: 2023-07-19 18:02:00
Also in: linux-fsdevel, linux-mm, lkml

On Wednesday, 19 July 2023 06:17:51 EDT, Miklos Szeredi wrote:
On Thu, 29 Jun 2023 at 17:56, David Howells [off-list ref] wrote:
quoted
Splicing data from, say, a file into a pipe currently leaves the source
pages in the pipe after splice() returns - but this means that those pages
can be subsequently modified by shared-writable mmap(), write(),
fallocate(), etc. before they're consumed.
What is this trying to fix?   The above behavior is well known, so
it's not likely to be a problem.
Respectfully, it's not well-known, as it's not documented. If the splice(2) 
man page had mentioned that pages can be mutated after they're already 
ostensibly at rest in the output pipe buffer, then my nightly backups 
wouldn't have been incurring corruption silently for many months.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help