[File] The seccomp filter on any ppc architecture may fail
Dr. Werner Fink
werner at suse.de
Thu Mar 20 13:38:49 UTC 2025
Hi,
I had a bug report that on physical terminals like /dev/console the
seccomp filter cause a SIGSYS due to not allowd TCGETS ioctl. This
ioctl is performed by glibc its self by its tcgetattr(3) call.
The problem is that the TCGETS get by the includes
#include <termios.h>
#include <sys/ioctl.h>
are wrong on ppc based architectures and will not be fixed by the glibc
people (see https://sourceware.org/bugzilla/show_bug.cgi?id=32806)
A workaround is here for
#ifdef __powerpc64__
# include <asm/termbits.h>
#else
# include <termios.h>
#endif
#include <sys/ioctl.h>
where <asm/termbits.h> if includes before <sys/ioctl.h>
In the attachment is my patch for this
Werner
--
"Having a smoking section in a restaurant is like having
a peeing section in a swimming pool." -- Edward Burr
-------------- next part --------------
A non-text attachment was scrubbed...
Name: file-seccomp-ppc.patch
Type: text/x-patch
Size: 871 bytes
Desc: not available
URL: <https://mailman.astron.com/pipermail/file/attachments/20250320/0a42e816/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 894 bytes
Desc: not available
URL: <https://mailman.astron.com/pipermail/file/attachments/20250320/0a42e816/attachment.asc>
More information about the File
mailing list