lkml.org 
[lkml]   [2015]   [Sep]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[RFC 12/30] x86/entry/64/compat: Disable SYSENTER and SYSCALL32 entries
    Date
    We've disabled the vDSO helpers to call them, so turn off the
    entries entirely (temporarily) in preparation for cleaning them up.

    Signed-off-by: Andy Lutomirski <luto@kernel.org>
    ---
    arch/x86/entry/entry_64_compat.S | 13 +++++++++++++
    1 file changed, 13 insertions(+)

    diff --git a/arch/x86/entry/entry_64_compat.S b/arch/x86/entry/entry_64_compat.S
    index 1432d60a1f4a..e11aa38696fe 100644
    --- a/arch/x86/entry/entry_64_compat.S
    +++ b/arch/x86/entry/entry_64_compat.S
    @@ -103,6 +103,14 @@ ENTRY(entry_SYSENTER_compat)
    jnz sysenter_fix_flags
    sysenter_flags_fixed:

    + /* Temporary: SYSENTER is disabled. */
    +#ifdef CONFIG_CONTEXT_TRACKING
    + call enter_from_user_mode
    +#endif
    + ENABLE_INTERRUPTS(CLBR_NONE)
    + movl $11, %edi
    + call do_exit
    +
    /*
    * Re-enable interrupts. IRQ tracing already thinks that IRQs are
    * on (since we treat user mode as having IRQs on), and the
    @@ -324,6 +332,11 @@ ENTRY(entry_SYSCALL_compat)
    * it is too small to ever cause noticeable irq latency.
    */
    SWAPGS_UNSAFE_STACK
    +
    + /* Temporary: SYSCALL32 is disabled. */
    + movl $-ENOSYS, %eax
    + USERGS_SYSRET32
    +
    movl %esp, %r8d
    movq PER_CPU_VAR(cpu_current_top_of_stack), %rsp
    ENABLE_INTERRUPTS(CLBR_NONE)
    --
    2.4.3


    \
     
     \ /
      Last update: 2015-09-02 01:01    [W:4.141 / U:0.376 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site