Bug 24744

Summary: Remove copy_file_range emulation
Product: glibc Reporter: Florian Weimer <fweimer>
Component: libcAssignee: Florian Weimer <fweimer>
Status: RESOLVED FIXED    
Severity: normal CC: drepper.fsp
Priority: P2 Flags: fweimer: security-
Version: 2.30   
Target Milestone: 2.30   
See Also: https://bugzilla.redhat.com/show_bug.cgi?id=1724975
https://bugzilla.redhat.com/show_bug.cgi?id=1724976
Host: Target:
Build: Last reconfirmed:

Description Florian Weimer 2019-06-28 07:38:49 UTC
The kernel is evolving this interface rapidly, and our emulation is no longer faithful: Among other things, we do not detect overlapping copies (which is quite hard outside the kernel).  The kernel also plans to support cross-device copies.
Comment 1 Sourceware Commits 2019-06-28 08:10:57 UTC
The master branch has been updated by Florian Weimer <fw@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=5a659ccc0ec217ab02a4c273a1f6d346a359560a

commit 5a659ccc0ec217ab02a4c273a1f6d346a359560a
Author: Florian Weimer <fweimer@redhat.com>
Date:   Fri Jun 28 09:39:21 2019 +0200

    io: Remove copy_file_range emulation [BZ #24744]
    
    The kernel is evolving this interface (e.g., removal of the
    restriction on cross-device copies), and keeping up with that
    is difficult.  Applications which need the function should
    run kernels which support the system call instead of relying on
    the imperfect glibc emulation.
    
    Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Comment 2 Florian Weimer 2019-06-28 08:11:21 UTC
Fixed in glibc 2.30.
Comment 3 Sourceware Commits 2019-07-09 08:24:03 UTC
The release/2.29/master branch has been updated by Florian Weimer <fw@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=da347f4aa3a67e018f19e51a7ece6add87dba5cf

commit da347f4aa3a67e018f19e51a7ece6add87dba5cf
Author: Florian Weimer <fweimer@redhat.com>
Date:   Fri Jun 28 09:39:21 2019 +0200

    io: Remove copy_file_range emulation [BZ #24744]
    
    The kernel is evolving this interface (e.g., removal of the
    restriction on cross-device copies), and keeping up with that
    is difficult.  Applications which need the function should
    run kernels which support the system call instead of relying on
    the imperfect glibc emulation.
    
    Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
    (cherry picked from commit 5a659ccc0ec217ab02a4c273a1f6d346a359560a)
Comment 4 Sourceware Commits 2019-07-09 08:47:01 UTC
The release/2.27/master branch has been updated by Florian Weimer <fw@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=949da7f2fd0bc0f8dca91892e5c926504a7d11c2

commit 949da7f2fd0bc0f8dca91892e5c926504a7d11c2
Author: Florian Weimer <fweimer@redhat.com>
Date:   Fri Jun 28 09:39:21 2019 +0200

    io: Remove copy_file_range emulation [BZ #24744]
    
    The kernel is evolving this interface (e.g., removal of the
    restriction on cross-device copies), and keeping up with that
    is difficult.  Applications which need the function should
    run kernels which support the system call instead of relying on
    the imperfect glibc emulation.
    
    Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
    (cherry picked from commit 5a659ccc0ec217ab02a4c273a1f6d346a359560a)
Comment 5 Sourceware Commits 2019-07-09 09:25:02 UTC
The release/2.28/master branch has been updated by Florian Weimer <fw@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=5f7fa9ac30048bcc1d883cf52a544ea182882ee9

commit 5f7fa9ac30048bcc1d883cf52a544ea182882ee9
Author: Florian Weimer <fweimer@redhat.com>
Date:   Fri Jun 28 09:39:21 2019 +0200

    io: Remove copy_file_range emulation [BZ #24744]
    
    The kernel is evolving this interface (e.g., removal of the
    restriction on cross-device copies), and keeping up with that
    is difficult.  Applications which need the function should
    run kernels which support the system call instead of relying on
    the imperfect glibc emulation.
    
    Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
    (cherry picked from commit 5a659ccc0ec217ab02a4c273a1f6d346a359560a)