coreutils
[Top][All Lists]
Advanced

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

Re: [PATCH] copy: disallow copy_file_range() on Linux kernels before 5.3


From: Pádraig Brady
Subject: Re: [PATCH] copy: disallow copy_file_range() on Linux kernels before 5.3
Date: Wed, 19 May 2021 08:56:27 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:84.0) Gecko/20100101 Thunderbird/84.0

On 18/05/2021 19:47, Kaz Kylheku (Coreutils) wrote:
On 2021-05-12 16:09, Pádraig Brady wrote:
copy_file_range() before Linux kernel release 5.3 had many issues,

Remark: although there is nothing wrong with the patch, and it is
necessary, this seems like an issue for the C library to handle,
as well.

- The GNU C library provides the function copy_file_range. The
    fact that this is a linux kernel feature is abstracted by the library.

- The GNU C library knows what version of the kernel it is running on,
    and provides workarounds in relation to that (or possibly refuses
    to run at all).

So, arguably, the responsibility of somehow working around this lies
with glibc; glibc is the purveyor of the API.

Unfortunately, I don't see any discussions about the issue in
libc-alpha mailing list.

The situation is not acceptable that a GNU program is working around
broken GNU library functions, with no action being taken in the
GNU library (even if that program will need to carry those workarounds
anyway).

There is some validity to handling this in glibc.
However it would also have to be handled in musl libc etc. to be able to rely 
on that.
Also some uses of copy_file_range() might have been ok,
so precluding all uses may have been too restrictive.
Only a general copy program like cp needs to be careful as to use.
BTW I think Centos 7 disabled this at the glibc level due to general brokenness.

cheers,
Pádraig



reply via email to

[Prev in Thread] Current Thread [Next in Thread]