Merge branch 'fixes' of git://git.linaro.org/people/rmk/linux-arm
Pull ARM fixes from Russell King: "This is mainly audit fixes, found by folks who happened to enable this feature and then found it broke their user applications." * 'fixes' of git://git.linaro.org/people/rmk/linux-arm: ARM: 7414/1: SMP: prevent use of the console when using idmap_pgd ARM: 7412/1: audit: use only AUDIT_ARCH_ARM regardless of endianness ARM: 7411/1: audit: fix treatment of saved ip register during syscall tracing ARM: 7410/1: Add extra clobber registers for assembly in kernel_execve
This commit is contained in:
commit
301cdf5c75
|
@ -906,27 +906,14 @@ long arch_ptrace(struct task_struct *child, long request,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __ARMEB__
|
|
||||||
#define AUDIT_ARCH_NR AUDIT_ARCH_ARMEB
|
|
||||||
#else
|
|
||||||
#define AUDIT_ARCH_NR AUDIT_ARCH_ARM
|
|
||||||
#endif
|
|
||||||
|
|
||||||
asmlinkage int syscall_trace(int why, struct pt_regs *regs, int scno)
|
asmlinkage int syscall_trace(int why, struct pt_regs *regs, int scno)
|
||||||
{
|
{
|
||||||
unsigned long ip;
|
unsigned long ip;
|
||||||
|
|
||||||
/*
|
if (why)
|
||||||
* Save IP. IP is used to denote syscall entry/exit:
|
|
||||||
* IP = 0 -> entry, = 1 -> exit
|
|
||||||
*/
|
|
||||||
ip = regs->ARM_ip;
|
|
||||||
regs->ARM_ip = why;
|
|
||||||
|
|
||||||
if (!ip)
|
|
||||||
audit_syscall_exit(regs);
|
audit_syscall_exit(regs);
|
||||||
else
|
else
|
||||||
audit_syscall_entry(AUDIT_ARCH_NR, scno, regs->ARM_r0,
|
audit_syscall_entry(AUDIT_ARCH_ARM, scno, regs->ARM_r0,
|
||||||
regs->ARM_r1, regs->ARM_r2, regs->ARM_r3);
|
regs->ARM_r1, regs->ARM_r2, regs->ARM_r3);
|
||||||
|
|
||||||
if (!test_thread_flag(TIF_SYSCALL_TRACE))
|
if (!test_thread_flag(TIF_SYSCALL_TRACE))
|
||||||
|
@ -936,6 +923,13 @@ asmlinkage int syscall_trace(int why, struct pt_regs *regs, int scno)
|
||||||
|
|
||||||
current_thread_info()->syscall = scno;
|
current_thread_info()->syscall = scno;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* IP is used to denote syscall entry/exit:
|
||||||
|
* IP = 0 -> entry, =1 -> exit
|
||||||
|
*/
|
||||||
|
ip = regs->ARM_ip;
|
||||||
|
regs->ARM_ip = why;
|
||||||
|
|
||||||
/* the 0x80 provides a way for the tracing parent to distinguish
|
/* the 0x80 provides a way for the tracing parent to distinguish
|
||||||
between a syscall stop and SIGTRAP delivery */
|
between a syscall stop and SIGTRAP delivery */
|
||||||
ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD)
|
ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD)
|
||||||
|
|
|
@ -251,8 +251,6 @@ asmlinkage void __cpuinit secondary_start_kernel(void)
|
||||||
struct mm_struct *mm = &init_mm;
|
struct mm_struct *mm = &init_mm;
|
||||||
unsigned int cpu = smp_processor_id();
|
unsigned int cpu = smp_processor_id();
|
||||||
|
|
||||||
printk("CPU%u: Booted secondary processor\n", cpu);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* All kernel threads share the same mm context; grab a
|
* All kernel threads share the same mm context; grab a
|
||||||
* reference and switch to it.
|
* reference and switch to it.
|
||||||
|
@ -264,6 +262,8 @@ asmlinkage void __cpuinit secondary_start_kernel(void)
|
||||||
enter_lazy_tlb(mm, current);
|
enter_lazy_tlb(mm, current);
|
||||||
local_flush_tlb_all();
|
local_flush_tlb_all();
|
||||||
|
|
||||||
|
printk("CPU%u: Booted secondary processor\n", cpu);
|
||||||
|
|
||||||
cpu_init();
|
cpu_init();
|
||||||
preempt_disable();
|
preempt_disable();
|
||||||
trace_hardirqs_off();
|
trace_hardirqs_off();
|
||||||
|
|
|
@ -115,7 +115,7 @@ int kernel_execve(const char *filename,
|
||||||
"Ir" (THREAD_START_SP - sizeof(regs)),
|
"Ir" (THREAD_START_SP - sizeof(regs)),
|
||||||
"r" (®s),
|
"r" (®s),
|
||||||
"Ir" (sizeof(regs))
|
"Ir" (sizeof(regs))
|
||||||
: "r0", "r1", "r2", "r3", "ip", "lr", "memory");
|
: "r0", "r1", "r2", "r3", "r8", "r9", "ip", "lr", "memory");
|
||||||
|
|
||||||
out:
|
out:
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Reference in New Issue