aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/um/signal.c
AgeCommit message (Collapse)AuthorFilesLines
2016-12-24Replace <asm/uaccess.h> with <linux/uaccess.h> globallyLinus Torvalds1-1/+1
This was entirely automated, using the script by Al: PATT='^[[:blank:]]*#[[:blank:]]*include[[:blank:]]*<asm/uaccess.h>' sed -i -e "s!$PATT!#include <linux/uaccess.h>!" \ $(git grep -l "$PATT"|grep -v ^include/linux/uaccess.h) to do the replacement at the end of the merge window. Requested-by: Al Viro <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2016-05-21um: extend fpstate to _xstate to support YMM registersEli Cooper1-12/+11
Extends fpstate to _xstate, in order to hold AVX/YMM registers. To avoid oversized stack frame, the following functions have been refactored by using malloc. - sig_handler_common - timer_real_alarm_handler Signed-off-by: Eli Cooper <[email protected]>
2016-05-21um: fix FPU state preservation around signal handlersEli Cooper1-15/+3
This patch makes UML saves/restores FPU state from/to the fpstate in pt_regs when setting up or returning from a signal stack, rather than calling ptrace directly. This ensures that FPU state is correctly preserved around signal handlers in a multi-threaded scenario. Signed-off-by: Eli Cooper <[email protected]>
2015-12-22um: Fix pointer castMickaël Salaün1-1/+1
Fix a pointer cast typo introduced in v4.4-rc5 especially visible for the i386 subarchitecture where it results in a kernel crash. [ Also removed pointless cast as per Al Viro - Linus ] Fixes: 8090bfd2bb9a ("um: Fix fpstate handling") Signed-off-by: Mickaël Salaün <[email protected]> Cc: Jeff Dike <[email protected]> Acked-by: Richard Weinberger <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2015-12-08um: Fix fpstate handlingRichard Weinberger1-8/+10
The x86 FPU cleanup changed fpstate to a plain integer. UML on x86 has to deal with that too. Signed-off-by: Richard Weinberger <[email protected]>
2015-05-31um: Fix warning in setup_signal_stack_si()Richard Weinberger1-1/+2
Fixes: arch/x86/um/signal.c: In function ‘setup_signal_stack_si’: include/asm-generic/uaccess.h:146:27: warning: initialization from incompatible pointer type [enabled by default] __typeof__(*(ptr)) __x = (x); \ ^ arch/x86/um/signal.c:544:10: note: in expansion of macro ‘__put_user’ err |= __put_user(ksig->ka.sa.sa_restorer, Signed-off-by: Richard Weinberger <[email protected]>
2015-04-12um: Remove signal translation and exec_domainRichard Weinberger1-7/+0
As execution domain support is gone we can remove signal translation from the signal code and remove exec_domain from thread_info. Signed-off-by: Richard Weinberger <[email protected]>
2015-02-12all arches, signal: move restart_block to struct task_structAndy Lutomirski1-1/+1
If an attacker can cause a controlled kernel stack overflow, overwriting the restart block is a very juicy exploit target. This is because the restart_block is held in the same memory allocation as the kernel stack. Moving the restart block to struct task_struct prevents this exploit by making the restart_block harder to locate. Note that there are other fields in thread_info that are also easy targets, at least on some architectures. It's also a decent simplification, since the restart code is more or less identical on all architectures. [[email protected]: metag: align thread_info::supervisor_stack] Signed-off-by: Andy Lutomirski <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Al Viro <[email protected]> Cc: "H. Peter Anvin" <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Kees Cook <[email protected]> Cc: David Miller <[email protected]> Acked-by: Richard Weinberger <[email protected]> Cc: Richard Henderson <[email protected]> Cc: Ivan Kokshaysky <[email protected]> Cc: Matt Turner <[email protected]> Cc: Vineet Gupta <[email protected]> Cc: Russell King <[email protected]> Cc: Catalin Marinas <[email protected]> Cc: Will Deacon <[email protected]> Cc: Haavard Skinnemoen <[email protected]> Cc: Hans-Christian Egtvedt <[email protected]> Cc: Steven Miao <[email protected]> Cc: Mark Salter <[email protected]> Cc: Aurelien Jacquiot <[email protected]> Cc: Mikael Starvik <[email protected]> Cc: Jesper Nilsson <[email protected]> Cc: David Howells <[email protected]> Cc: Richard Kuo <[email protected]> Cc: "Luck, Tony" <[email protected]> Cc: Geert Uytterhoeven <[email protected]> Cc: Michal Simek <[email protected]> Cc: Ralf Baechle <[email protected]> Cc: Jonas Bonn <[email protected]> Cc: "James E.J. Bottomley" <[email protected]> Cc: Helge Deller <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: Paul Mackerras <[email protected]> Acked-by: Michael Ellerman <[email protected]> (powerpc) Tested-by: Michael Ellerman <[email protected]> (powerpc) Cc: Martin Schwidefsky <[email protected]> Cc: Heiko Carstens <[email protected]> Cc: Chen Liqin <[email protected]> Cc: Lennox Wu <[email protected]> Cc: Chris Metcalf <[email protected]> Cc: Guan Xuetao <[email protected]> Cc: Chris Zankel <[email protected]> Cc: Max Filippov <[email protected]> Cc: Oleg Nesterov <[email protected]> Cc: Guenter Roeck <[email protected]> Signed-off-by: James Hogan <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2014-08-06um: Use get_signal() signal_setup_done()Richard Weinberger1-24/+21
Use the more generic functions get_signal() signal_setup_done() for signal delivery. Signed-off-by: Richard Weinberger <[email protected]>
2013-07-19um: remove dead codeRichard Weinberger1-1/+0
"me" is not used. Signed-off-by: Richard Weinberger <[email protected]>
2013-02-03x86: get rid of pt_regs argument in sigreturn variantsAl Viro1-13/+2
Signed-off-by: Al Viro <[email protected]>
2012-12-19new helpers: __save_altstack/__compat_save_altstack, switch x86 and um to thoseAl Viro1-7/+2
note that they are relying on access_ok() already checked by caller. Signed-off-by: Al Viro <[email protected]>
2012-10-09um: get rid of pointless include "..." where include <...> will doAl Viro1-2/+2
Signed-off-by: Al Viro <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
2012-09-27um: let signal_delivered() do SIGTRAP on singlestepping into handlerAl Viro1-6/+0
... rather than duplicating that in sigframe setup code (and doing that inconsistently, at that) Signed-off-by: Al Viro <[email protected]>
2012-06-01most of set_current_blocked() callers want SIGKILL/SIGSTOP removed from setAl Viro1-2/+0
Only 3 out of 63 do not. Renamed the current variant to __set_current_blocked(), added set_current_blocked() that will exclude unblockable signals, switched open-coded instances to it. Signed-off-by: Al Viro <[email protected]>
2012-05-21um: missing checks of __put_user()/__get_user() return valuesAl Viro1-2/+2
Signed-off-by: Al Viro <[email protected]>
2012-05-21um/x86: merge (and trim) 32- and 64-bit variants of ptrace.hAl Viro1-11/+11
Signed-off-by: Al Viro <[email protected]>
2012-05-21um: ->restart_block.fn needs to be reset on sigreturnAl Viro1-0/+3
Signed-off-by: Al Viro <[email protected]>
2011-11-02um: merge signal_{32,64}.cAl Viro1-0/+624
Signed-off-by: Al Viro <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>