--- zzzz-none-000/linux-3.10.107/arch/mips/kernel/scall32-o32.S 2017-06-27 09:49:32.000000000 +0000 +++ vr9-7490-729/linux-3.10.107/arch/mips/kernel/scall32-o32.S 2021-11-10 11:53:54.000000000 +0000 @@ -52,7 +52,11 @@ stack_done: lw t0, TI_FLAGS($28) # syscall tracing enabled? + +# mapom patch von 3.10.28 nach 3.10.73 +# li t1, _TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT | _TIF_SECCOMP li t1, _TIF_WORK_SYSCALL_ENTRY + and t0, t1 bnez t0, syscall_trace_entry # -> yes @@ -77,7 +81,18 @@ SAVE_STATIC move s0, t2 move a0, sp - jal syscall_trace_enter + + /* + * syscall number is in v0 unless we called syscall(__NR_###) + * where the real syscall number is in a0 + */ + addiu a1, v0, __NR_O32_Linux + bnez v0, 1f /* __NR_syscall at offset 0 */ + lw a1, PT_R4(sp) + +1: jal syscall_trace_enter + + bltz v0, 2f # seccomp failed? Skip syscall move t0, s0 RESTORE_STATIC @@ -97,7 +112,7 @@ sw t1, PT_R0(sp) # save it for syscall restarting 1: sw v0, PT_R2(sp) # result - j syscall_exit +2: j syscall_exit /* ------------------------------------------------------------------------ */ @@ -125,17 +140,39 @@ la t1, 5f # load up to 3 arguments subu t1, t3 -1: lw t5, 16(t0) # argument #5 from usp - .set push - .set noreorder +#ifndef CONFIG_EVA +1: lw t5, 16(t0) # argument #5 from usp + .set push + .set noreorder .set nomacro jr t1 addiu t1, 6f - 5f -2: lw t8, 28(t0) # argument #8 from usp -3: lw t7, 24(t0) # argument #7 from usp -4: lw t6, 20(t0) # argument #6 from usp -5: jr t1 +2: .insn + lw t8, 28(t0) # argument #8 from usp +3: .insn + lw t7, 24(t0) # argument #7 from usp +4: .insn + lw t6, 20(t0) # argument #6 from usp +5: .insn +#else + .set eva +1: lwe t5, 16(t0) # argument #5 from usp + .set push + .set noreorder + .set nomacro + jr t1 + addiu t1, 6f - 5f + +2: .insn + lwe t8, 28(t0) # argument #8 from usp +3: .insn + lwe t7, 24(t0) # argument #7 from usp +4: .insn + lwe t6, 20(t0) # argument #6 from usp +5: .insn +#endif /* CONFIG_EVA */ + jr t1 sw t5, 16(sp) # argument #5 to ksp #ifdef CONFIG_CPU_MICROMIPS @@ -150,7 +187,7 @@ sw t7, 24(sp) # argument #7 to ksp sw t6, 20(sp) # argument #6 to ksp #endif -6: j stack_done # go back +6: j stack_done # go back nop .set pop