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]
Date:   Tue, 12 Oct 2021 23:51:38 +0200
From:   Borislav Petkov <bp@...en8.de>
To:     Willy Tarreau <w@....eu>
Cc:     Ammar Faizi <ammar.faizi@...dents.amikom.ac.id>,
        Paul Walmsley <paul.walmsley@...ive.com>,
        Palmer Dabbelt <palmer@...belt.com>,
        Albert Ou <aou@...s.berkeley.edu>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Andy Lutomirski <luto@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, x86@...nel.org,
        "H. Peter Anvin" <hpa@...or.com>
Subject: Re: [PATCH] tools/nolibc: x86: Remove `r8`, `r9` and `r10` from the
 clobber list

On Tue, Oct 12, 2021 at 10:29:55PM +0200, Borislav Petkov wrote:
> On Tue, Oct 12, 2021 at 11:06:38AM +0200, Willy Tarreau wrote:
> > Let's indeed wait for any of the x86 maintainers to confirm your
> > analysis.
> 
> I guess the official doc you guys are looking for is the x86-64 ABI:
> 
> https://gitlab.com/x86-psABIs/x86-64-ABI/
> 
> and recent pdfs are here:
> 
> https://gitlab.com/x86-psABIs/x86-64-ABI/-/wikis/x86-64-psABI
> 
> and there you scroll to
> 
> "A.2 AMD64 Linux Kernel Conventions
> 
> ...
> 
> A.2.1 Calling Conventions"
> 
> and that section explains which regs go where.

Ok, that didn't point to the exact answer - I realize now. I believe
what you're looking for in that doc is "Figure 3.4: Register Usage"
which has a column "callee saved" and says that the syscall arg
registers are all not callee-saved.

And I think that table is valid for the kernel too because the link
to it says "The Linux AMD64 kernel uses internally the same calling
conventions as user-level applications (see section 3.2.3 for details)."

HTH.

-- 
Regards/Gruss,
    Boris.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ