lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <19292905-9cfc-ff36-217b-73b944e41442@amazon.com>
Date:   Wed, 26 Aug 2020 15:51:05 +0200
From:   Alexander Graf <graf@...zon.com>
To:     Josh Poimboeuf <jpoimboe@...hat.com>
CC:     X86 ML <x86@...nel.org>, Andy Lutomirski <luto@...nel.org>,
        "Thomas Gleixner" <tglx@...utronix.de>,
        LKML <linux-kernel@...r.kernel.org>,
        "Andrew Cooper" <andrew.cooper3@...rix.com>,
        "Paul E. McKenney" <paulmck@...nel.org>,
        Alexandre Chartre <alexandre.chartre@...cle.com>,
        Frederic Weisbecker <frederic@...nel.org>,
        Paolo Bonzini <pbonzini@...hat.com>,
        "Sean Christopherson" <sean.j.christopherson@...el.com>,
        Masami Hiramatsu <mhiramat@...nel.org>,
        Petr Mladek <pmladek@...e.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Joel Fernandes <joel@...lfernandes.org>,
        "Boris Ostrovsky" <boris.ostrovsky@...cle.com>,
        Juergen Gross <jgross@...e.com>,
        Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
        Will Deacon <will@...nel.org>,
        Tom Lendacky <thomas.lendacky@....com>,
        Wei Liu <wei.liu@...nel.org>,
        Michael Kelley <mikelley@...rosoft.com>,
        Jason Chen CJ <jason.cj.chen@...el.com>,
        Zhao Yakui <yakui.zhao@...el.com>,
        "Peter Zijlstra (Intel)" <peterz@...radead.org>,
        Avi Kivity <avi@...lladb.com>,
        "Herrenschmidt, Benjamin" <benh@...zon.com>, <robketr@...zon.de>,
        <amos@...lladb.com>, Brian Gerst <brgerst@...il.com>,
        <stable@...r.kernel.org>
Subject: Re: [PATCH] x86/irq: Preserve vector in orig_ax for APIC code



On 26.08.20 15:22, Josh Poimboeuf wrote:
> 
> On Wed, Aug 26, 2020 at 01:53:57PM +0200, Alexander Graf wrote:
>> -.macro idtentry_body cfunc has_error_code:req
>> +.macro idtentry_body cfunc has_error_code:req preserve_error_code:req
>>
>>        call    error_entry
>>        UNWIND_HINT_REGS
>> @@ -328,7 +328,9 @@ SYM_CODE_END(ret_from_fork)
>>
>>        .if \has_error_code == 1
>>                movq    ORIG_RAX(%rsp), %rsi    /* get error code into 2nd argument*/
>> -             movq    $-1, ORIG_RAX(%rsp)     /* no syscall to restart */
>> +             .if \preserve_error_code == 0
>> +                     movq    $-1, ORIG_RAX(%rsp)     /* no syscall to restart */
>> +             .endif
> 
> When does this happen (has_error_code=1 && preserve_error_code=0)?  I
> don't see any users of this macro (or idtentry) with this combination.

It's well hidden in arch/x86/include/asm/idtentry.h:

#define DECLARE_IDTENTRY_ERRORCODE(vector, func)                        \
         idtentry vector asm_##func func has_error_code=1

/* Simple exception entries with error code pushed by hardware */
DECLARE_IDTENTRY_ERRORCODE(X86_TRAP_TS, exc_invalid_tss);
DECLARE_IDTENTRY_ERRORCODE(X86_TRAP_NP, exc_segment_not_present);
DECLARE_IDTENTRY_ERRORCODE(X86_TRAP_SS, exc_stack_segment);
DECLARE_IDTENTRY_ERRORCODE(X86_TRAP_GP, exc_general_protection);
DECLARE_IDTENTRY_ERRORCODE(X86_TRAP_AC, exc_alignment_check);
[...]
DECLARE_IDTENTRY_RAW_ERRORCODE(X86_TRAP_PF,     exc_page_fault);


Alex



Amazon Development Center Germany GmbH
Krausenstr. 38
10117 Berlin
Geschaeftsfuehrung: Christian Schlaeger, Jonathan Weiss
Eingetragen am Amtsgericht Charlottenburg unter HRB 149173 B
Sitz: Berlin
Ust-ID: DE 289 237 879


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ