Re: [PATCH 3/3] vfs: return -EOVERFLOW in generic_remap_checks() when overflow check fails

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Sep 20, 2024 at 07:37:27AM -0700, Darrick J. Wong wrote:
> On Fri, Sep 20, 2024 at 07:19:28AM -0700, Christoph Hellwig wrote:
> > On Fri, Sep 20, 2024 at 08:30:22PM +0800, Julian Sun wrote:
> > > Keep it consistent with the handling of the same check within
> > > generic_copy_file_checks().
> > > Also, returning -EOVERFLOW in this case is more appropriate.
> > 
> > Maybe:
> > 
> > Keep the errno value consistent with the equivalent check in
> > generic_copy_file_checks() that returns -EOVERFLOW, which feels like the
> > more appropriate value to return compared to the overly generic -EINVAL.
> 
> The manpage for clone/dedupe/exchange don't say anything about
> EOVERFLOW, but they do have this to say about EINVAL:
> 
> EINVAL
> The  filesystem  does  not  support  reflinking the ranges of the given
> files.

Which isn't exactly the integer overflow case described here :)

> Does this errno code change cause any regressions in fstests?

Given our rather sparse test coverage of it I doubt it, but it
would be great to have that confirmed by the submitter.

While we're talking about that - a simple exerciser for the overflow
condition for xfstests would be very useful to have.





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux