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: Sat, 23 Mar 2024 16:37:27 +0000
From: Koakuma <koachan@...tonmail.com>
To: Sam Ravnborg <sam@...nborg.org>
Cc: "sparclinux@...r.kernel.org" <sparclinux@...r.kernel.org>, "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, "davem@...emloft.net" <davem@...emloft.net>, "ndesaulniers@...gle.com" <ndesaulniers@...gle.com>, "arnd@...db.de" <arnd@...db.de>
Subject: Re: [sparc] Use of -fcall-used-* flags in Makefile?

Hello Sam,

Sam Ravnborg <sam@...nborg.org> wrote:

> Hi Koakuma,
> Looking at https://github.com/gcc-mirror/gcc/blob/master/gcc/config/sparc/sparc.h
> I read that:
> 
> On v9 systems:
> g1,g5 are free to use as temporaries, and are free to use between calls
> ...
> g6-g7 are reserved for the operating system (or application in
> embedded case).
> 
> Based on the above I would assume gcc do not change behaviour with or
> without -fcall-used-g7.
> [...]
> For sparc32 the above file says:
> 
> g5 through g7 are reserved for the operating system.
> 
> So again - it looks like -fcall-used-g5 -fcall-used-g7 should have no
> effect here and verification on a real target would be nice.
> 
> Sam

>From my understanding (and looking at the codegen results) those flags
forces GCC to treat the named register as volatile, despite what the ABI
says. However, I also believe that removing them wouldn't be harmful?

To quote my reasoning in the LLVM tracker:
> omitting the flags shouldn't be harmful either - compilers will now
> simply refuse to touch them, and any assembly code that happens
> to touch them would still work like usual (because Linux' conventions
> already treats them as volatile anyway).

But I am not entirely sure about it, that is why it'd be great if there's
some explaination on why those flags were added in the first place.

> I do not have a sparc64 system at my hands - and for this qemu may not
> cut it. But it would be super if someone with a working sparc64 target
> could verify if the kernel could be built and works without
> -fcall-used-g7.

I am currently running a build with those flags taken out on a T5120,
and the kernel seems to be running okay for what I do (LLVM development),
but I don't know if there are more comprehensive test suite for me
to try on.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ