diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-10-04 17:23:26 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-10-04 17:23:30 -0400 |
commit | a9fda02bfc91a281cd812ae15dabe6bfb9574f90 (patch) | |
tree | d7be703f341870f15f87a59a63976f650078b4d6 /arch/arm/kernel | |
parent | aa3090005d27f3c7fba915ccea36b97b669fa3ab (diff) | |
parent | ec706dab290c486837d4a825870ab052bf200279 (diff) |
Merge branch 'for_rmk' of git://git.linaro.org/kernel/linux-linaro-next into devel-stable
Diffstat (limited to 'arch/arm/kernel')
-rw-r--r-- | arch/arm/kernel/entry-common.S | 17 | ||||
-rw-r--r-- | arch/arm/kernel/process.c | 21 |
2 files changed, 36 insertions, 2 deletions
diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S index 1b560825e1cf..0385a8207b67 100644 --- a/arch/arm/kernel/entry-common.S +++ b/arch/arm/kernel/entry-common.S | |||
@@ -48,6 +48,8 @@ work_pending: | |||
48 | beq no_work_pending | 48 | beq no_work_pending |
49 | mov r0, sp @ 'regs' | 49 | mov r0, sp @ 'regs' |
50 | mov r2, why @ 'syscall' | 50 | mov r2, why @ 'syscall' |
51 | tst r1, #_TIF_SIGPENDING @ delivering a signal? | ||
52 | movne why, #0 @ prevent further restarts | ||
51 | bl do_notify_resume | 53 | bl do_notify_resume |
52 | b ret_slow_syscall @ Check work again | 54 | b ret_slow_syscall @ Check work again |
53 | 55 | ||
@@ -293,7 +295,6 @@ ENTRY(vector_swi) | |||
293 | 295 | ||
294 | get_thread_info tsk | 296 | get_thread_info tsk |
295 | adr tbl, sys_call_table @ load syscall table pointer | 297 | adr tbl, sys_call_table @ load syscall table pointer |
296 | ldr ip, [tsk, #TI_FLAGS] @ check for syscall tracing | ||
297 | 298 | ||
298 | #if defined(CONFIG_OABI_COMPAT) | 299 | #if defined(CONFIG_OABI_COMPAT) |
299 | /* | 300 | /* |
@@ -310,8 +311,20 @@ ENTRY(vector_swi) | |||
310 | eor scno, scno, #__NR_SYSCALL_BASE @ check OS number | 311 | eor scno, scno, #__NR_SYSCALL_BASE @ check OS number |
311 | #endif | 312 | #endif |
312 | 313 | ||
314 | ldr r10, [tsk, #TI_FLAGS] @ check for syscall tracing | ||
313 | stmdb sp!, {r4, r5} @ push fifth and sixth args | 315 | stmdb sp!, {r4, r5} @ push fifth and sixth args |
314 | tst ip, #_TIF_SYSCALL_TRACE @ are we tracing syscalls? | 316 | |
317 | #ifdef CONFIG_SECCOMP | ||
318 | tst r10, #_TIF_SECCOMP | ||
319 | beq 1f | ||
320 | mov r0, scno | ||
321 | bl __secure_computing | ||
322 | add r0, sp, #S_R0 + S_OFF @ pointer to regs | ||
323 | ldmia r0, {r0 - r3} @ have to reload r0 - r3 | ||
324 | 1: | ||
325 | #endif | ||
326 | |||
327 | tst r10, #_TIF_SYSCALL_TRACE @ are we tracing syscalls? | ||
315 | bne __sys_trace | 328 | bne __sys_trace |
316 | 329 | ||
317 | cmp scno, #NR_syscalls @ check upper syscall limit | 330 | cmp scno, #NR_syscalls @ check upper syscall limit |
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c index 401e38be1f78..66ac9c926200 100644 --- a/arch/arm/kernel/process.c +++ b/arch/arm/kernel/process.c | |||
@@ -458,3 +458,24 @@ unsigned long arch_randomize_brk(struct mm_struct *mm) | |||
458 | unsigned long range_end = mm->brk + 0x02000000; | 458 | unsigned long range_end = mm->brk + 0x02000000; |
459 | return randomize_range(mm->brk, range_end, 0) ? : mm->brk; | 459 | return randomize_range(mm->brk, range_end, 0) ? : mm->brk; |
460 | } | 460 | } |
461 | |||
462 | /* | ||
463 | * The vectors page is always readable from user space for the | ||
464 | * atomic helpers and the signal restart code. Let's declare a mapping | ||
465 | * for it so it is visible through ptrace and /proc/<pid>/mem. | ||
466 | */ | ||
467 | |||
468 | int vectors_user_mapping(void) | ||
469 | { | ||
470 | struct mm_struct *mm = current->mm; | ||
471 | return install_special_mapping(mm, 0xffff0000, PAGE_SIZE, | ||
472 | VM_READ | VM_EXEC | | ||
473 | VM_MAYREAD | VM_MAYEXEC | | ||
474 | VM_ALWAYSDUMP | VM_RESERVED, | ||
475 | NULL); | ||
476 | } | ||
477 | |||
478 | const char *arch_vma_name(struct vm_area_struct *vma) | ||
479 | { | ||
480 | return (vma->vm_start == 0xffff0000) ? "[vectors]" : NULL; | ||
481 | } | ||