Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ioctl07 fails on powerpc #1193

Open
andree182 opened this issue Sep 17, 2024 · 1 comment
Open

ioctl07 fails on powerpc #1193

andree182 opened this issue Sep 17, 2024 · 1 comment

Comments

@andree182
Copy link

The test calls ioctl with invalid address (-1), however
https://github.com/lattera/glibc/blob/master/sysdeps/unix/sysv/linux/tcgetattr.c called from the ioctl wrapper https://github.com/lattera/glibc/blob/master/sysdeps/unix/sysv/linux/powerpc/ioctl.c has no safeguards against bad address and causes some stack damage or whatever:

ioctl01
tst_test.c:1690: TINFO: LTP version: 20230929
tst_test.c:1574: TINFO: Timeout per run is 0h 00m 30s
ioctl01.c:62: TPASS: File descriptor is invalid (termio) : EBADF (9)
ioctl01.c:62: TPASS: File descriptor is invalid (termios) : EBADF (9)
ioctl01.c:62: TPASS: Termio address is invalid : EFAULT (14)
tst_test.c:1634: TBROK: Test killed by SIGSEGV!
[   10.736126] ioctl01[61]: segfault (11) at 3 nip 3c3718 lr 3c369c code 1 in libc.so.6[290000+217000]
[   10.736578] ioctl01[61]: code: 3920f000 7c034840 41c100b0 2c030000 40c2007c 80010014 81610018 80a1001c 
[   10.736627] ioctl01[61]: code: 80c10010 88e10033 80810024 81810038 <901f0004> 917f0008 80010034 81610020 

Perhaps the test should be disabled on powerpc?

@metan-ucw
Copy link
Member

What we usually do in these cases is to run the test in a child process and pass it if child segfaulted as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants