summaryrefslogtreecommitdiff
path: root/arch/sh/include/asm
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2023-03-06 01:20:30 +0000
committerLinus Torvalds <torvalds@linux-foundation.org>2023-03-09 10:01:59 -0800
commit573b22ccb7ce9ab7f0539a2e11a9d3609a8783f5 (patch)
tree480cccbd7ade3dbf849ba6873e6b2722ac456e30 /arch/sh/include/asm
parent6a98c9cae232800c319ed69e1063480d31430887 (diff)
sh: sanitize the flags on sigreturn
We fetch %SR value from sigframe; it might have been modified by signal handler, so we can't trust it with any bits that are not modifiable in user mode. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Cc: Rich Felker <dalias@libc.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/sh/include/asm')
-rw-r--r--arch/sh/include/asm/processor_32.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/sh/include/asm/processor_32.h b/arch/sh/include/asm/processor_32.h
index 27aebf1e75a2..3ef7adf739c8 100644
--- a/arch/sh/include/asm/processor_32.h
+++ b/arch/sh/include/asm/processor_32.h
@@ -50,6 +50,7 @@
#define SR_FD 0x00008000
#define SR_MD 0x40000000
+#define SR_USER_MASK 0x00000303 // M, Q, S, T bits
/*
* DSP structure and data
*/