[Bug 8611] syscalls with 6 arguments broken on x86 32bit
bugzilla at busybox.net
bugzilla at busybox.net
Tue Jan 26 10:47:51 UTC 2016
https://bugs.busybox.net/show_bug.cgi?id=8611
--- Comment #1 from Ronald Wahl <ronald.wahl at raritan.com> ---
Created attachment 6291
--> https://bugs.busybox.net/attachment.cgi?id=6291&action=edit
small test tool that helps to verify the fix
The example is incomplete as there might be more 6arg syscalls like fallocate
that I havn't in this example. The file can be compiled with gcc on a 32bit x86
platform.
gcc -o syscall6-test syscall6-test.c
Prerequirement:
kernel 4.3+
uClibc build against kernel headers of linux 4.3+
strace 4.11+ (not sure if rebuild against linux 4.3 is necessary)
The interesting value is not the return value but the 6th parameter of the last
parameter of the syscalls below which is not as specified in the fail case
except for sync_file_range.
Fail case:
$ strace -e splice,sync_file_range,sendto,recvfrom syscall6_test
splice(10, NULL, 11, NULL, 0, 0) = 0
sync_file_range(10, 0, 0,
SYNC_FILE_RANGE_WAIT_BEFORE|SYNC_FILE_RANGE_WAIT_AFTER) = -1 EBADF (Bad file
descriptor)
sendto(4,
"\250\0\0\0\374_y\267xX\256\277(Uy\2674X\256\277\0\20y\267\0\0\0\0\0\20y\267"...,
1024, 0, 0xbfae5780, 0) = -1 EINVAL (Invalid argument)
sendto() failed
+++ exited with 0 +++
Working case:
$ strace -e splice,sync_file_range,sendto,recvfrom syscall6_test
splice(10, NULL, 11, NULL, 0,
SPLICE_F_MOVE|SPLICE_F_NONBLOCK|SPLICE_F_MORE|SPLICE_F_GIFT) = 0
sync_file_range(10, 0, 0,
SYNC_FILE_RANGE_WAIT_BEFORE|SYNC_FILE_RANGE_WAIT_AFTER) = -1 EBADF (Bad file
descriptor)
sendto(4,
"\250\0\0\0\374\237p\267\330\224\223\277(\225p\267\224\224\223\277\0Pp\267\0\0\0\0\0Pp\267"...,
1024, 0, {sa_family=AF_INET, sin_port=htons(46279),
sin_addr=inet_addr("127.0.0.1")}, 16) = 1024
recvfrom(3,
"\250\0\0\0\374\237p\267\330\224\223\277(\225p\267\224\224\223\277\0Pp\267\0\0\0\0\0Pp\267"...,
1024, 0, {sa_family=AF_INET, sin_port=htons(40050),
sin_addr=inet_addr("127.0.0.1")}, [16]) = 1024
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the uClibc-cvs
mailing list