[PATCH] nptl: Fix SYSCALL_CANCEL for return values larger than INT_MAX (BZ 33245)
Sam James
sam@gentoo.org
Sat Aug 2 10:41:16 GMT 2025
Adhemerval Zanella <adhemerval.zanella@linaro.org> writes:
> The SYSCALL_CANCEL calls __syscall_cancel, which in turn
> calls __internal_syscall_cancel with an 'int' return instead of the
> expected 'long int'. This causes issues with syscalls that return
> values larger than INT_MAX, such as copy_file_range [1].
>
> Checked on x86_64-linux-gnu.
>
> [1] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=79139
The patch is OK:
Reviewed-by: Sam James <sam@gentoo.org>
> ---
> nptl/cancellation.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
but I have a question about some other instances, though I didn't look
afresh yet today, just from last night.
Do we need something like the attached? I think the readlink one doesn't
actually matter because of path sizes.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: a.patch
Type: text/x-patch
Size: 2276 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/libc-alpha/attachments/20250802/9c4f68dd/attachment.bin>
-------------- next part --------------
(Completely untested, it's just from the audit I did earlier.)
> [...]
sam
More information about the Libc-alpha
mailing list