bug#60489: Programs should exit after EIO from FICLONE or copy_file_range()

2023-01-02 Thread Noah Misch
Because Debian coreutils 9.1-1 "cp" silently falls back to copy_file_range() after FICLONE reports EIO, "cp" can transfer incorrect bytes. Linux syscalls having a file descriptor parameter report EIO after a fault in the underlying device. The affected file is not recoverable in the general case,

bug#60489: Programs should exit after EIO from FICLONE or copy_file_range()

2023-01-02 Thread Pádraig Brady
On 02/01/2023 06:36, Noah Misch wrote: Because Debian coreutils 9.1-1 "cp" silently falls back to copy_file_range() after FICLONE reports EIO, "cp" can transfer incorrect bytes. Linux syscalls having a file descriptor parameter report EIO after a fault in the underlying device. The affected fil

bug#60489: Programs should exit after EIO from FICLONE or copy_file_range()

2023-01-02 Thread Andreas Schwab
On Jan 02 2023, Pádraig Brady wrote: > + /* Note error set is consistent with copy_file_range(). */ > + bool no_clone_attempted = errno == ENOSYS || is_ENOTSUP (errno) > +|| errno == EINVAL || errno == EBADF > +

bug#60489: Programs should exit after EIO from FICLONE or copy_file_range()

2023-01-02 Thread Pádraig Brady
On 02/01/2023 13:28, Andreas Schwab wrote: On Jan 02 2023, Pádraig Brady wrote: + /* Note error set is consistent with copy_file_range(). */ + bool no_clone_attempted = errno == ENOSYS || is_ENOTSUP (errno) +|| errno == EINVAL || errno == E

bug#58521: human readable still wrong output (after 20+ years?)

2023-01-02 Thread Paul Eggert
On 2022-10-14 09:24, chandler wrote: Please no excuses about how this will break other programs Unfortunately backward-compatibility concerns are real, which means we're not likely to make a big change to -h's behavior at this point. You can use --si instead. Assuming you're talking about '

bug#58521: human readable still wrong output (after 20+ years?)

2023-01-02 Thread Paul Eggert
On 2023-01-02 13:22, Chandler Sobel-Sorenson wrote: Unfortunately backward-compatibility concerns are real, Such as? I imagine lots of programs read the current output format. GNU 'sort' does. I haven't investigated all such programs. The current behavior has been in place since Larry Mc

bug#59382: cp(1) tries to allocate too much memory if filesystem blocksizes are unusual

2023-01-02 Thread Pádraig Brady
On 20/11/2022 03:50, Paul Eggert wrote: Although we inadvertently removed support for weird devices in 2009 by commit 55efc5f3ee485b3e31a91c331f07c89aeccc4e89, and nobody seems to care (because people use dd or whatever to deal with weird devices), I think it'd be better to limit the fix to regul

bug#59382: cp(1) tries to allocate too much memory if filesystem blocksizes are unusual

2023-01-02 Thread Paul Eggert
On 2023-01-02 15:03, Pádraig Brady wrote: On 20/11/2022 03:50, Paul Eggert wrote: Although we inadvertently removed support for weird devices in 2009 by commit 55efc5f3ee485b3e31a91c331f07c89aeccc4e89, and nobody seems to care (because people use dd or whatever to deal with weird devices), I thi

bug#59382: cp(1) tries to allocate too much memory if filesystem blocksizes are unusual

2023-01-02 Thread Pádraig Brady
On 02/01/2023 23:18, Paul Eggert wrote: On 2023-01-02 15:03, Pádraig Brady wrote: On 20/11/2022 03:50, Paul Eggert wrote: Although we inadvertently removed support for weird devices in 2009 by commit 55efc5f3ee485b3e31a91c331f07c89aeccc4e89, and nobody seems to care (because people use dd or wh

bug#58521: human readable still wrong output (after 20+ years?)

2023-01-02 Thread Chandler Sobel-Sorenson
Paul Eggert wrote on 1/2/23 1:28 PM: Unfortunately backward-compatibility concerns are real, Such as? which means we're not likely to make a big change to -h's behavior at this point. You can use --si instead. While --si produces correct output, this does not address the subject of this b