Merge branch 'devel-stable' into devel
This commit is contained in:
@@ -334,7 +334,6 @@ ENTRY(vector_swi)
|
||||
|
||||
get_thread_info tsk
|
||||
adr tbl, sys_call_table @ load syscall table pointer
|
||||
ldr ip, [tsk, #TI_FLAGS] @ check for syscall tracing
|
||||
|
||||
#if defined(CONFIG_OABI_COMPAT)
|
||||
/*
|
||||
@@ -351,8 +350,20 @@ ENTRY(vector_swi)
|
||||
eor scno, scno, #__NR_SYSCALL_BASE @ check OS number
|
||||
#endif
|
||||
|
||||
ldr r10, [tsk, #TI_FLAGS] @ check for syscall tracing
|
||||
stmdb sp!, {r4, r5} @ push fifth and sixth args
|
||||
tst ip, #_TIF_SYSCALL_TRACE @ are we tracing syscalls?
|
||||
|
||||
#ifdef CONFIG_SECCOMP
|
||||
tst r10, #_TIF_SECCOMP
|
||||
beq 1f
|
||||
mov r0, scno
|
||||
bl __secure_computing
|
||||
add r0, sp, #S_R0 + S_OFF @ pointer to regs
|
||||
ldmia r0, {r0 - r3} @ have to reload r0 - r3
|
||||
1:
|
||||
#endif
|
||||
|
||||
tst r10, #_TIF_SYSCALL_TRACE @ are we tracing syscalls?
|
||||
bne __sys_trace
|
||||
|
||||
cmp scno, #NR_syscalls @ check upper syscall limit
|
||||
|
@@ -1162,11 +1162,12 @@ space_cccc_001x(kprobe_opcode_t insn, struct arch_specific_insn *asi)
|
||||
{
|
||||
/*
|
||||
* MSR : cccc 0011 0x10 xxxx xxxx xxxx xxxx xxxx
|
||||
* Undef : cccc 0011 0x00 xxxx xxxx xxxx xxxx xxxx
|
||||
* Undef : cccc 0011 0100 xxxx xxxx xxxx xxxx xxxx
|
||||
* ALU op with S bit and Rd == 15 :
|
||||
* cccc 001x xxx1 xxxx 1111 xxxx xxxx xxxx
|
||||
*/
|
||||
if ((insn & 0x0f900000) == 0x03200000 || /* MSR & Undef */
|
||||
if ((insn & 0x0fb00000) == 0x03200000 || /* MSR */
|
||||
(insn & 0x0ff00000) == 0x03400000 || /* Undef */
|
||||
(insn & 0x0e10f000) == 0x0210f000) /* ALU s-bit, R15 */
|
||||
return INSN_REJECTED;
|
||||
|
||||
@@ -1177,7 +1178,7 @@ space_cccc_001x(kprobe_opcode_t insn, struct arch_specific_insn *asi)
|
||||
* *S (bit 20) updates condition codes
|
||||
* ADC/SBC/RSC reads the C flag
|
||||
*/
|
||||
insn &= 0xfff00fff; /* Rn = r0, Rd = r0 */
|
||||
insn &= 0xffff0fff; /* Rd = r0 */
|
||||
asi->insn[0] = insn;
|
||||
asi->insn_handler = (insn & (1 << 20)) ? /* S-bit */
|
||||
emulate_alu_imm_rwflags : emulate_alu_imm_rflags;
|
||||
|
@@ -482,3 +482,24 @@ unsigned long arch_randomize_brk(struct mm_struct *mm)
|
||||
unsigned long range_end = mm->brk + 0x02000000;
|
||||
return randomize_range(mm->brk, range_end, 0) ? : mm->brk;
|
||||
}
|
||||
|
||||
/*
|
||||
* The vectors page is always readable from user space for the
|
||||
* atomic helpers and the signal restart code. Let's declare a mapping
|
||||
* for it so it is visible through ptrace and /proc/<pid>/mem.
|
||||
*/
|
||||
|
||||
int vectors_user_mapping(void)
|
||||
{
|
||||
struct mm_struct *mm = current->mm;
|
||||
return install_special_mapping(mm, 0xffff0000, PAGE_SIZE,
|
||||
VM_READ | VM_EXEC |
|
||||
VM_MAYREAD | VM_MAYEXEC |
|
||||
VM_ALWAYSDUMP | VM_RESERVED,
|
||||
NULL);
|
||||
}
|
||||
|
||||
const char *arch_vma_name(struct vm_area_struct *vma)
|
||||
{
|
||||
return (vma->vm_start == 0xffff0000) ? "[vectors]" : NULL;
|
||||
}
|
||||
|
Reference in New Issue
Block a user