2020-02-25 23:31:56

by Thomas Gleixner

[permalink] [raw]
Subject: [patch 1/8] x86/entry/64: Trace irqflags unconditionally on when returing to user space

User space cannot longer disable interrupts so trace return to user space
unconditionally as IRQS_ON.

Signed-off-by: Thomas Gleixner <[email protected]>
---
arch/x86/entry/entry_64.S | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

--- a/arch/x86/entry/entry_64.S
+++ b/arch/x86/entry/entry_64.S
@@ -174,7 +174,7 @@ SYM_INNER_LABEL(entry_SYSCALL_64_after_h
movq %rsp, %rsi
call do_syscall_64 /* returns with IRQs disabled */

- TRACE_IRQS_IRETQ /* we're about to change IF */
+ TRACE_IRQS_ON /* return enables interrupts */

/*
* Try to use SYSRET instead of IRET if we're returning to
@@ -619,7 +619,7 @@ SYM_CODE_START_LOCAL(common_interrupt)
.Lretint_user:
mov %rsp,%rdi
call prepare_exit_to_usermode
- TRACE_IRQS_IRETQ
+ TRACE_IRQS_ON

SYM_INNER_LABEL(swapgs_restore_regs_and_return_to_usermode, SYM_L_GLOBAL)
#ifdef CONFIG_DEBUG_ENTRY


2020-02-27 19:49:59

by Borislav Petkov

[permalink] [raw]
Subject: Re: [patch 1/8] x86/entry/64: Trace irqflags unconditionally on when returing to user space

Just formulations improvements:

> Subject: [patch 1/8] x86/entry/64: Trace irqflags unconditionally on when returing to user space

s/on //

On Tue, Feb 25, 2020 at 11:08:02PM +0100, Thomas Gleixner wrote:
> User space cannot longer disable interrupts so trace return to user space

"Userspace cannot disable interrupts any longer... "

> unconditionally as IRQS_ON.
>
> Signed-off-by: Thomas Gleixner <[email protected]>

...

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette

2020-02-27 22:45:55

by Frederic Weisbecker

[permalink] [raw]
Subject: Re: [patch 1/8] x86/entry/64: Trace irqflags unconditionally on when returing to user space

On Tue, Feb 25, 2020 at 11:08:02PM +0100, Thomas Gleixner wrote:
> User space cannot longer disable interrupts so trace return to user space
> unconditionally as IRQS_ON.
>
> Signed-off-by: Thomas Gleixner <[email protected]>

Reviewed-by: Frederic Weisbecker <[email protected]>

2020-02-28 09:00:15

by Alexandre Chartre

[permalink] [raw]
Subject: Re: [patch 1/8] x86/entry/64: Trace irqflags unconditionally on when returing to user space


On 2/25/20 11:08 PM, Thomas Gleixner wrote:
> User space cannot longer disable interrupts so trace return to user space
> unconditionally as IRQS_ON.
>
> Signed-off-by: Thomas Gleixner <[email protected]>
> ---
> arch/x86/entry/entry_64.S | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>

Reviewed-by: Alexandre Chartre <[email protected]>

alex.