Re-visiting SKIP_TEST_BOGUS_ADDR in tests/ipc_msg.c

Ruinland ChuanTzu Tsai ruinland at andestech.com
Fri Sep 11 10:10:35 UTC 2020


Hi all,

In glibc's 2.32 implementation, the syscall wrapper code now will ac-
cess the `buf` for transforming data types into kernel desired ones :

https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/msgctl.c;h=0776472d5e01dea3d4a90e5f025f5074e10d0250;hb=HEAD

which is introduced in the commit 3283f711 :
https://sourceware.org/git/?p=glibc.git;a=commit;f=sysdeps/unix/sysv/linux/msgctl.c;h=3283f711132eaadc4f04bd8c1d84c910c29ba066

This will definitely triggers the segmentation fault in user space
first instead of triggering EFAULT inside Linux kernel on _every_
platform.

So I'm thinking whether we should either enforce` SKIP_TEST_BOGUS_ADDR`
as default now or discuss this behavior with glibc developers ?

Personally I think it's not glibc's (or any libc's) responsibilty to 
check whether a passed address is valid/accessible or not. If it's
necessary, I guess someone should ask around the committee of The Open
Group to change the standrad.

Sincerely,
Ruinland


More information about the Strace-devel mailing list