All of lore.kernel.org
 help / color / mirror / Atom feed
* copy_file_range return value on FUSE
@ 2025-08-04  9:41 Florian Weimer
  2025-08-04 13:30 ` [fuse-devel] " Miklos Szeredi
  0 siblings, 1 reply; 3+ messages in thread
From: Florian Weimer @ 2025-08-04  9:41 UTC (permalink / raw)
  To: fuse-devel, linux-api, linux-fsdevel, linux-kernel

The FUSE protocol uses struct fuse_write_out to convey the return value
of copy_file_range, which is restricted to uint32_t.  But the
copy_file_range interface supports a 64-bit copy operation.  Given that
copy_file_range is expected to clone huge files, large copies are not
unexpected, so this appears to be a real limitation.

There is another wrinkle: we'd need to check if the process runs in
32-bit compat mode, and reject size_t arguments larger than INT_MAX in
this case (with EOVERFLOW presumably).  But perhaps this should be
handled on the kernel side?  Currently, this doesn't seem to happen, and
we can get copy_file_range results in the in-band error range.
Applications have no way to disambiguate this.

Thanks,
Florian


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-08-04 14:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-04  9:41 copy_file_range return value on FUSE Florian Weimer
2025-08-04 13:30 ` [fuse-devel] " Miklos Szeredi
2025-08-04 14:30   ` Florian Weimer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.