* 2) Invoke context tracking if enabled to reactivate RCU
* 3) Trace interrupts off state
*/
-static noinstr void enter_from_user_mode(void)
+static noinstr void enter_from_user_mode(struct pt_regs *regs)
{
enum ctx_state state = ct_state();
+ check_user_regs(regs);
lockdep_hardirqs_off(CALLER_ADDR0);
user_exit_irqoff();
instrumentation_end();
}
#else
-static __always_inline void enter_from_user_mode(void)
+static __always_inline void enter_from_user_mode(struct pt_regs *regs)
{
+ check_user_regs(regs);
lockdep_hardirqs_off(CALLER_ADDR0);
instrumentation_begin();
trace_hardirqs_off_finish();
{
struct thread_info *ti;
- check_user_regs(regs);
-
- enter_from_user_mode();
+ enter_from_user_mode(regs);
instrumentation_begin();
local_irq_enable();
/* Handles int $0x80 */
__visible noinstr void do_int80_syscall_32(struct pt_regs *regs)
{
- check_user_regs(regs);
-
- enter_from_user_mode();
+ enter_from_user_mode(regs);
instrumentation_begin();
local_irq_enable();
vdso_image_32.sym_int80_landing_pad;
bool success;
- check_user_regs(regs);
-
/*
* SYSENTER loses EIP, and even SYSCALL32 needs us to skip forward
* so that 'regs->ip -= 2' lands back on an int $0x80 instruction.
*/
regs->ip = landing_pad;
- enter_from_user_mode();
+ enter_from_user_mode(regs);
instrumentation_begin();
local_irq_enable();
};
if (user_mode(regs)) {
- check_user_regs(regs);
- enter_from_user_mode();
+ enter_from_user_mode(regs);
return ret;
}
*/
void noinstr idtentry_enter_user(struct pt_regs *regs)
{
- check_user_regs(regs);
- enter_from_user_mode();
+ enter_from_user_mode(regs);
}
/**