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: <CAPcyv4hpn+fmeZT+=EiD0G0Hw1iYqhUh4_cdhnT1i-BBcN_tsQ@mail.gmail.com>
Date:   Wed, 19 May 2021 17:40:03 -0700
From:   Dan Williams <dan.j.williams@...el.com>
To:     "Kuppuswamy, Sathyanarayanan" 
        <sathyanarayanan.kuppuswamy@...ux.intel.com>
Cc:     Peter Zijlstra <peterz@...radead.org>,
        Andy Lutomirski <luto@...nel.org>,
        Dave Hansen <dave.hansen@...el.com>,
        Tony Luck <tony.luck@...el.com>,
        Andi Kleen <ak@...ux.intel.com>,
        Kirill Shutemov <kirill.shutemov@...ux.intel.com>,
        Kuppuswamy Sathyanarayanan <knsathya@...nel.org>,
        Raj Ashok <ashok.raj@...el.com>,
        Sean Christopherson <seanjc@...gle.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Sean Christopherson <sean.j.christopherson@...el.com>,
        Kai Huang <kai.huang@...el.com>
Subject: Re: [RFC v2-fix 1/1] x86/boot: Add a trampoline for APs booting in
 64-bit mode

On Wed, May 19, 2021 at 5:19 PM Kuppuswamy, Sathyanarayanan
<sathyanarayanan.kuppuswamy@...ux.intel.com> wrote:
>
> Hi Dan,
>
> On 5/17/21 9:08 PM, Dan Williams wrote:
> >> SYM_DATA_START_LOCAL(tr_idt)
> >>           .short  0
> >>           .quad   0
> >> SYM_DATA_END(tr_idt)
> > This format implies that tr_idt is reserving space for 2 distinct data
> > structure attributes of those sizes, can you just put those names here
> > as comments? Otherwise the .fill format is more compact.
>
> Initially its 6 bytes (2 bytes for IDT limit, 4 bytes for 32 bit linear
> start address). This patch extends it by another 4 bytes for supporting
> 64 bit mode.
>
> 2 bytes IDT limit (.short)
> 8 bytes for 64 bit IDT start address (.quad)
>
> This info is included in commit log. But I will add comment here as you
> have mentioned.

Thanks. I only read commit logs when code comments fail.

>
> Will following comment log do ?
>
> /* Use 10 bytes for IDT (in 64 bit mode), 8 bytes for IDT start address
>     2 bytes for IDT limit size */

I would clarify how the boot code uses this:

"When a bootloader hands off to the kernel in 32-bit mode an IDT with
a 2-byte limit and 4-byte base is needed. When a boot loader hands off
to a kernel 64-bit mode the base address extends to 8-bytes. Reserve
enough space for either scenario."

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ