summaryrefslogtreecommitdiffstats
path: root/arch
Commit message (Collapse)AuthorAgeFilesLines
* bury _TIF_RESTORE_SIGMASKAl Viro2012-10-0117-17/+0Star
| | | | | | never used... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* unicore32: unobfuscate _TIF_WORK_MASKAl Viro2012-10-011-1/+2
| | | | | | bits 3..7 in flags are never set there, so this 0xff is pointless Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* mips: NOTIFY_RESUME is not needed in TIF masksAl Viro2012-10-011-2/+1Star
| | | | | | | If it's set, SIGPENDING is also set. And SIGPENDING is present in the masks... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* mips: merge the identical "return from syscall" per-ABI codeAl Viro2012-10-015-51/+13Star
| | | | | | | No need to keep 4 copies of that stuff; merged and taken to entry.S, unused public symbols there killed off. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* mips: unobfuscate _TIF..._MASKAl Viro2012-10-011-3/+4
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* mips: prevent hitting do_notify_resume() with !user_mode(regs)Al Viro2012-10-012-8/+3Star
| | | | | | too late to do anything there... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* ia64: can't reach do_signal() when returning to kernel modeAl Viro2012-10-011-8/+0Star
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* score: fix bogus restarts on sigreturn()Al Viro2012-10-011-0/+1
| | | | | | | | | we *really* don't want to have restart logics hit when we are returning from sigreturn() - random replacement of %r4 with -4 just because a signal had been noticed from timer interrupt that came when %r4 happened to contain -514 is not nice at all. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* mn10300: get rid of calling do_notify_resume() when returning to kernel modeAl Viro2012-10-012-5/+4Star
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* xtensa: can't get to do_notify_resume() when user_mode(regs) is not trueAl Viro2012-10-011-3/+0Star
| | | | | | asm glue checks that Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* c6x: switch to generic kernel_thread()Al Viro2012-10-013-21/+6Star
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* c6x: switch to generic sys_execveMark Salter2012-10-014-50/+1Star
| | | | | Signed-off-by: Mark Salter <msalter@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* c6x: switch to generic kernel_execveMark Salter2012-10-012-7/+8
| | | | | Signed-off-by: Mark Salter <msalter@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* c6x: add ret_from_kernel_thread(), simplify kernel_thread()Mark Salter2012-10-012-26/+32
| | | | | Signed-off-by: Mark Salter <msalter@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* mn10300: convert to generic kernel_thread()Al Viro2012-10-013-36/+19Star
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* mn10300: switch to generic kernel_execve()Al Viro2012-10-016-49/+13Star
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* mn10300: switch to generic sys_execve()Al Viro2012-10-013-16/+2Star
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* mn10300: split ret_from_fork, simplify kernel_thread()Al Viro2012-10-015-71/+27Star
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* frv: switch to generic kernel_thread()Al Viro2012-10-013-23/+20Star
|
* frv: switch to generic kernel_execveAl Viro2012-10-015-39/+10Star
| | | | | Acked-by: David Howells <dhowells@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* frv: switch to generic sys_execve()Al Viro2012-10-013-19/+2Star
| | | | | | | current_pt_regs() here is simply __frame Acked-by: David Howells <dhowells@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* frv: split ret_from_fork, simplify kernel_thread() a lotAl Viro2012-10-015-100/+32Star
| | | | | Acked-by: David Howells <dhowells@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* m68k: switch to generic sys_execve()/kernel_execve()Al Viro2012-10-015-37/+9Star
| | | | | | | | | | | | | | The tricky part here is that task_pt_regs() on m68k works *only* for process inside do_signal(). However, we need something much simpler - pt_regs of a process inside do_signal() may be at different offsets from the stack bottom, depending on the way we'd entered the kernel, but for a task inside sys_execve() it *is* at constant offset. Moreover, for a kernel thread about to become a userland process the same location is also fine - setting sp to that will leave the kernel stack pointer at the very bottom of the kernel stack when we finally switch to userland. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* m68k: split ret_from_fork(), simplify kernel_thread()Al Viro2012-10-014-62/+36Star
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* m68k: always set stack frame format for ColdFire on thread startGreg Ungerer2012-10-011-11/+12
| | | | | | | | | | | | | | | | The stack frame "format" field needs to be explicitly set on thread creation on ColdFire. For a normal long word aligned user stack pointer the frame format is 0x4. We were doing this for non-MMU ColdFire, but not for the case with MMU enabled. So fix it so we always do it if targeting ColdFire. The old code happend to rely on the stack frame format being inhereted from the process calling exec. Furture changes means that may not always work, so we really do want to set it explicitly. Signed-off-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* powerpc: switch to generic sys_execve()/kernel_execve()Al Viro2012-10-018-51/+21Star
| | | | | | | | the only non-obvious part is that current_pt_regs() is really needed here - task_pt_regs() is NULL for kernel threads; it's OK for ptrace uses (the thing task_pt_regs() is intended for), but not for us. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* powerpc: split ret_from_forkAl Viro2012-10-018-84/+43Star
| | | | | | ... and get rid of in-kernel syscalls in kernel_thread() Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* s390: convert to generic kernel_execve()Al Viro2012-10-013-49/+13Star
| | | | | | same situation as with alpha and arm - only massage needed Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* s390: switch to generic kernel_thread()Al Viro2012-10-013-40/+34Star
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* s390: fold kernel_thread_helper() into ret_from_fork()Al Viro2012-10-013-16/+28
| | | | | | | ... and don't bother with syscall return path in case of kernel threads. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* s390: fold execve_tail() into start_thread(), convert to generic sys_execve()Al Viro2012-10-019-61/+5Star
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* um: switch to generic kernel_thread()Al Viro2012-10-013-16/+4Star
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* x86, um/x86: switch to generic sys_execve and kernel_execveAl Viro2012-10-0117-158/+34Star
| | | | | | | | | 32bit wrapper is lost on that; 64bit one is *not*, since we need to arrange for full pt_regs on stack when we call sys_execve() and we need to load callee-saved ones from there afterwards. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* x86: split ret_from_forkAl Viro2012-10-017-85/+67Star
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* alpha: introduce ret_from_kernel_execve(), switch to generic kernel_execve()Al Viro2012-10-013-19/+14Star
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* alpha: switch to generic kernel_thread()Al Viro2012-10-015-72/+31Star
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* alpha: switch to generic sys_execve()Al Viro2012-10-013-30/+1Star
| | | | | | get rid of sys_execve() wrapper, while we are at it Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* arm: get rid of execve wrapper, switch to generic execve() implementationAl Viro2012-10-014-26/+2Star
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* arm: optimized current_pt_regs()Al Viro2012-10-011-0/+5
| | | | | | | | | | | | | | | | ... no need to read current_thread_info()->task only to feed it to task_thread_page() immediately afterwards. Moreover, not using current_thread_info() at all ends up with better assembler - we need a location very close to the top of kernel stack page and it's actually better to do or with 0x1fff, followed be subtracting a small constant than and with ~0x1fff, followed by adding a large one. Both & and | would be a couple of insns (mvn lsr/mvn lsl for |, a pair of bic for &), but the following addition would cost a pair of add while the subtraction ends up as a single sub. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* arm: introduce ret_from_kernel_execve(), switch to generic kernel_execve()Al Viro2012-10-013-42/+13Star
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* arm: split ret_from_fork, simplify kernel_thread() [based on patch by rmk]Al Viro2012-10-014-67/+26Star
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* preparation for generic kernel_thread()Al Viro2012-09-301-0/+3
| | | | | | | | | Let architectures select GENERIC_KERNEL_THREAD and have their copy_thread() treat NULL regs as "it came from kernel_thread(), sp argument contains the function new thread will be calling and stack_size - the argument for that function". Switching the architectures begins shortly... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* um: kill thread->forkingAl Viro2012-09-207-66/+29Star
| | | | | | | | | | we only use that to tell copy_thread() done by syscall from that done by kernel_thread(). However, it's easier to do simply by checking PF_KTHREAD in thread flags. Merge sys_clone() guts for 32bit and 64bit, while we are at it... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* um: let signal_delivered() do SIGTRAP on singlestepping into handlerAl Viro2012-09-202-7/+5Star
| | | | | | | ... rather than duplicating that in sigframe setup code (and doing that inconsistently, at that) Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* um: don't leak floating point state and segment registers on execve()Al Viro2012-09-201-0/+1
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* um: take cleaning singlestep to start_thread()Al Viro2012-09-201-19/+5Star
| | | | | | ... assuming it's needed to be done at all Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* don't bother exporting kernel_execve()Al Viro2012-09-203-3/+0Star
| | | | | | | most of the architectures don't and there's not a single caller outside of core kernel. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* the only place that needs to include asm/exec.h is linux/binfmts.hAl Viro2012-09-201-1/+0Star
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* get rid of generic instances of asm/exec.hAl Viro2012-09-2036-195/+22Star
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* x86: get rid of TIF_IRET hackeryAl Viro2012-09-205-17/+8Star
| | | | | | | | | | TIF_NOTIFY_RESUME will work in precisely the same way; all that is achieved by TIF_IRET is appearing that there's some work to be done, so we end up on the iret exit path. Just use NOTIFY_RESUME. And for execve() do that in 32bit start_thread(), not sys_execve() itself. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>