From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3132E386180E; Wed, 5 Aug 2020 14:20:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3132E386180E From: "adhemerval.zanella at linaro dot org" To: glibc-bugs@sourceware.org Subject: [Bug build/26338] io/tst-copy_file_range fails on RHEL 7.8 hosts Date: Wed, 05 Aug 2020 14:20:19 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: build X-Bugzilla-Version: 2.33 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: adhemerval.zanella at linaro dot org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: glibc-bugs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-bugs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Aug 2020 14:20:20 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D26338 --- Comment #6 from Adhemerval Zanella --- (In reply to Florian Weimer from comment #5) > (In reply to Adhemerval Zanella from comment #4) > > So I don't think ENOSYS as RHEL 7.8 is doing is the correct way to adve= rtise > > the syscall does not work depending of the underlying filesystem (at le= ast > > it seems not what upstream is doing). >=20 > It would break cp from coreutils, which only recognizes ENOSYS, EINVAL, > EBADF, EXDEV as soft errors. >=20 > The EOPNOTSUPPs you listed should not leak into userspace because they > trigger generic splice-based copy_file_range fallback, and splice apparen= tly > fails with EINVAL in case of missing file system support. >=20 > It's true that ENOSYS breaks programs that cache the availability of the > system call and assume that the error is parameter-independent. EINVAL mi= ght > have been the better choice for that reason. It seems that in very simplified mode the call sequence is: copy_file_range \_ vfs_copy_file_range \_ remap_file_range \_ do_copy_file_range \_ file_out->f_op->copy_file_range \_ generic_copy_file_range However on do_copy_file_range the generic_copy_file_range is not actually called is the filesystem one fails. The vfs_copy_file_range does WARN_ON_ON= CE on EOPNOTSUPP, but afaiu it indeed might leak to userspace (although it mig= ht characterize as a bug). But I agree that EINVAL is indeed a better return code and it is what generic_copy_file_range does for such cases. --=20 You are receiving this mail because: You are on the CC list for the bug.=