linux: Ignore sigaction(2) flags SA_UNSUPPORTED and SA_EXPOSE_TAGBITS

SA_UNSUPPORTED was introduced in Linux 5.11 to probe support
for other flags such as SA_EXPOSE_TAGBITS, introduced
at the same time. Ignore both.

Signed-off-by:	Ricardo Branco <[email protected]>
PR:		289285
Reviewed by:	pouria, kib
Pull-Request:	https://github.com/freebsd/freebsd-src/pull/2163

(cherry picked from commit fdea83a5f6)
This commit is contained in:
Ricardo Branco authored and Pouria Mousavizadeh Tehrani committed 2026-10-26 01:21:33 +03:30
1 parent 6e8786bafd
commit 29b79c586b
5 files changed
+16

No files matched your search

+2
View File
@@ -154,6 +154,8 @@ struct l_newstat {
#define LINUX_SA_NOCLDSTOP 0x00000001
#define LINUX_SA_NOCLDWAIT 0x00000002
#define LINUX_SA_SIGINFO 0x00000004
#define LINUX_SA_UNSUPPORTED 0x00000400
#define LINUX_SA_EXPOSE_TAGBITS 0x00000800
#define LINUX_SA_RESTORER 0x04000000
#define LINUX_SA_ONSTACK 0x08000000
#define LINUX_SA_RESTART 0x10000000
+2
View File
@@ -255,6 +255,8 @@ struct l_statfs64 {
#define LINUX_SA_NOCLDSTOP 0x00000001
#define LINUX_SA_NOCLDWAIT 0x00000002
#define LINUX_SA_SIGINFO 0x00000004
#define LINUX_SA_UNSUPPORTED 0x00000400
#define LINUX_SA_EXPOSE_TAGBITS 0x00000800
#define LINUX_SA_RESTORER 0x04000000
#define LINUX_SA_ONSTACK 0x08000000
#define LINUX_SA_RESTART 0x10000000
+2
View File
@@ -150,6 +150,8 @@ struct l_newstat {
#define LINUX_SA_NOCLDSTOP 0x00000001
#define LINUX_SA_NOCLDWAIT 0x00000002
#define LINUX_SA_SIGINFO 0x00000004
#define LINUX_SA_UNSUPPORTED 0x00000400
#define LINUX_SA_EXPOSE_TAGBITS 0x00000800
#define LINUX_SA_RESTORER 0x04000000
#define LINUX_SA_ONSTACK 0x08000000
#define LINUX_SA_RESTART 0x10000000
+8
View File
@@ -129,6 +129,14 @@ linux_to_bsd_sigaction(l_sigaction_t *lsa, struct sigaction *bsa)
bsa->sa_flags |= SA_NODEFER;
}
/*
* SA_UNSUPPORTED was introduced in Linux 5.11 to probe support for
* other flags such as SA_EXPOSE_TAGBITS, introduced at the same time.
* Ignore both.
*/
if (lsa->lsa_flags & (LINUX_SA_UNSUPPORTED | LINUX_SA_EXPOSE_TAGBITS))
flags &= ~(LINUX_SA_UNSUPPORTED | LINUX_SA_EXPOSE_TAGBITS);
if (flags != 0)
linux_msg(curthread, "unsupported sigaction flag %#lx", flags);
}
+2
View File
@@ -227,6 +227,8 @@ struct l_statfs64 {
#define LINUX_SA_NOCLDSTOP 0x00000001
#define LINUX_SA_NOCLDWAIT 0x00000002
#define LINUX_SA_SIGINFO 0x00000004
#define LINUX_SA_UNSUPPORTED 0x00000400
#define LINUX_SA_EXPOSE_TAGBITS 0x00000800
#define LINUX_SA_RESTORER 0x04000000
#define LINUX_SA_ONSTACK 0x08000000
#define LINUX_SA_RESTART 0x10000000