diff options
| author | Ricardo Branco <rbranco@suse.de> | 2026-04-26 09:44:53 +0000 |
|---|---|---|
| committer | Pouria Mousavizadeh Tehrani <pouria@FreeBSD.org> | 2026-04-27 11:50:39 +0000 |
| commit | fdea83a5f63b881ade91c6cc9dfbf173137512c5 (patch) | |
| tree | 86cd1a93bd530a9f54ed9d96448d26259cd76b0a | |
| parent | 04e4268f60e432097427e3d757aac6bc0ae24044 (diff) | |
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 <rbranco@suse.de>
PR: 289285
Reviewed by: pouria, kib
Pull-Request: https://github.com/freebsd/freebsd-src/pull/2163
| -rw-r--r-- | sys/amd64/linux/linux.h | 2 | ||||
| -rw-r--r-- | sys/amd64/linux32/linux.h | 2 | ||||
| -rw-r--r-- | sys/arm64/linux/linux.h | 2 | ||||
| -rw-r--r-- | sys/compat/linux/linux_signal.c | 8 | ||||
| -rw-r--r-- | sys/i386/linux/linux.h | 2 |
5 files changed, 16 insertions, 0 deletions
diff --git a/sys/amd64/linux/linux.h b/sys/amd64/linux/linux.h index 918b9129f47b..fb7aaa2d731c 100644 --- a/sys/amd64/linux/linux.h +++ b/sys/amd64/linux/linux.h @@ -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 diff --git a/sys/amd64/linux32/linux.h b/sys/amd64/linux32/linux.h index 5542df1b3185..737f785905fa 100644 --- a/sys/amd64/linux32/linux.h +++ b/sys/amd64/linux32/linux.h @@ -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 diff --git a/sys/arm64/linux/linux.h b/sys/arm64/linux/linux.h index 00a70fabc54f..b44512e51ed1 100644 --- a/sys/arm64/linux/linux.h +++ b/sys/arm64/linux/linux.h @@ -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 diff --git a/sys/compat/linux/linux_signal.c b/sys/compat/linux/linux_signal.c index 9a84700b3949..2318cfcccc1e 100644 --- a/sys/compat/linux/linux_signal.c +++ b/sys/compat/linux/linux_signal.c @@ -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); } diff --git a/sys/i386/linux/linux.h b/sys/i386/linux/linux.h index 914dc9c9ae84..f547ddfae8fd 100644 --- a/sys/i386/linux/linux.h +++ b/sys/i386/linux/linux.h @@ -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 |
