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: <0c2aed26-fa46-592c-7fab-209929246215@gnuweeb.org>
Date:   Sat, 8 Jan 2022 07:38:16 +0700
From:   Ammar Faizi <ammarfaizi2@...weeb.org>
To:     Andy Lutomirski <luto@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        "H. Peter Anvin" <hpa@...or.com>
Cc:     x86-ml <x86@...nel.org>, lkml <linux-kernel@...r.kernel.org>,
        GNU/Weeb Mailing List <gwml@...weeb.org>,
        Michael Matz <matz@...e.de>, "H.J. Lu" <hjl.tools@...il.com>,
        Jonathan Corbet <corbet@....net>, Willy Tarreau <w@....eu>
Subject: Re: [PATCH v1 3/3] Documentation: x86-64: Document registers on entry
 and exit

On 1/8/22 7:02 AM, Andy Lutomirski wrote:
> On 1/7/22 15:52, Ammar Faizi wrote:
>> There was a controversial discussion about the wording in the System
>> V ABI document regarding what registers the kernel is allowed to
>> clobber when the userspace executes syscall.
>>
>> The resolution of the discussion was reviewing the clobber list in
>> the glibc source. For a historical reason in the glibc source, the
>> kernel must restore all registers before returning to the userspace
>> (except for rax, rcx and r11).
>>
[...]
>> diff --git a/Documentation/x86/entry_64.rst b/Documentation/x86/entry_64.rst
>> index e433e08f7018..3f2007e2a938 100644
>> --- a/Documentation/x86/entry_64.rst
>> +++ b/Documentation/x86/entry_64.rst
>> @@ -108,3 +108,50 @@ We try to only use IST entries and the paranoid entry code for vectors
>>   that absolutely need the more expensive check for the GS base - and we
>>   generate all 'normal' entry points with the regular (faster) paranoid=0
>>   variant.
>> +
>> +
>> +Registers on entry:
>> +-------------------
>
> This is SYSCALL64 registers on entry, not general registers on entry.
> Also, this has little to do with the entry logic, so it probably
> doesn't belong in this file.

Ah right, I should be more specific saying it's for syscall64 entry
as there are 6 entries mentioned in this document.

Should syscall64 entry topic be documented? If not I will drop it,
otherwise suggest me a place for it.

I think we can document it here, but it needs to be more specific
saying it's for syscall64 entry.

Jonathan?

-- 
Ammar Faizi

Download attachment "OpenPGP_signature" of type "application/pgp-signature" (496 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ