[PATCH 02/24] bsd-user: FreeBSD needs this too, so drop linux ifdef

Warner Losh posted 24 patches 3 days, 14 hours ago
Maintainers: Warner Losh <imp@bsdimp.com>, Kyle Evans <kevans@freebsd.org>, Riku Voipio <riku.voipio@iki.fi>, Paolo Bonzini <pbonzini@redhat.com>, "Marc-André Lureau" <marcandre.lureau@redhat.com>, "Daniel P. Berrangé" <berrange@redhat.com>, "Philippe Mathieu-Daudé" <philmd@linaro.org>
There is a newer version of this series
[PATCH 02/24] bsd-user: FreeBSD needs this too, so drop linux ifdef
Posted by Warner Losh 3 days, 14 hours ago
This is more of a toolchain than an OS issue, and all the toolchains are
headed to requiring this. There's nothing Linux specific about it.

Signed-off-by: Warner Losh <imp@bsdimp.com>
---
 common-user/safe-syscall.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common-user/safe-syscall.S b/common-user/safe-syscall.S
index 74f7e35694..2f714cfbe8 100644
--- a/common-user/safe-syscall.S
+++ b/common-user/safe-syscall.S
@@ -22,6 +22,6 @@
  * assembly needs an executable stack and the whole QEMU binary will
  * needlessly end up with one. This should be the last thing in this file.
  */
-#if defined(__linux__) && defined(__ELF__)
+#if defined(__ELF__)
 .section        .note.GNU-stack, "", %progbits
 #endif

-- 
2.52.0
Re: [PATCH 02/24] bsd-user: FreeBSD needs this too, so drop linux ifdef
Posted by Richard Henderson 3 days, 9 hours ago
On 2/6/26 03:26, Warner Losh wrote:
> This is more of a toolchain than an OS issue, and all the toolchains are
> headed to requiring this. There's nothing Linux specific about it.
> 
> Signed-off-by: Warner Losh <imp@bsdimp.com>
> ---
>   common-user/safe-syscall.S | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/common-user/safe-syscall.S b/common-user/safe-syscall.S
> index 74f7e35694..2f714cfbe8 100644
> --- a/common-user/safe-syscall.S
> +++ b/common-user/safe-syscall.S
> @@ -22,6 +22,6 @@
>    * assembly needs an executable stack and the whole QEMU binary will
>    * needlessly end up with one. This should be the last thing in this file.
>    */
> -#if defined(__linux__) && defined(__ELF__)
> +#if defined(__ELF__)
>   .section        .note.GNU-stack, "", %progbits
>   #endif
> 

It feels like you dropped the actual subject line, letting the first line of the 
description become the new subject.  Perhaps

common-user: Drop __linux__ around .note.GNU-stack

Anyway,
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~
Re: [PATCH 02/24] bsd-user: FreeBSD needs this too, so drop linux ifdef
Posted by Warner Losh 3 days, 8 hours ago
On Thu, Feb 5, 2026 at 3:51 PM Richard Henderson <
richard.henderson@linaro.org> wrote:

> On 2/6/26 03:26, Warner Losh wrote:
> > This is more of a toolchain than an OS issue, and all the toolchains are
> > headed to requiring this. There's nothing Linux specific about it.
> >
> > Signed-off-by: Warner Losh <imp@bsdimp.com>
> > ---
> >   common-user/safe-syscall.S | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/common-user/safe-syscall.S b/common-user/safe-syscall.S
> > index 74f7e35694..2f714cfbe8 100644
> > --- a/common-user/safe-syscall.S
> > +++ b/common-user/safe-syscall.S
> > @@ -22,6 +22,6 @@
> >    * assembly needs an executable stack and the whole QEMU binary will
> >    * needlessly end up with one. This should be the last thing in this
> file.
> >    */
> > -#if defined(__linux__) && defined(__ELF__)
> > +#if defined(__ELF__)
> >   .section        .note.GNU-stack, "", %progbits
> >   #endif
> >
>
> It feels like you dropped the actual subject line, letting the first line
> of the
> description become the new subject.  Perhaps
>
> common-user: Drop __linux__ around .note.GNU-stack
>

Oh! That's a good idea. Thanks!


> Anyway,
> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
>
>
> r~
>
Re: [PATCH 02/24] bsd-user: FreeBSD needs this too, so drop linux ifdef
Posted by Philippe Mathieu-Daudé 3 days, 11 hours ago
On 5/2/26 18:26, Warner Losh wrote:
> This is more of a toolchain than an OS issue, and all the toolchains are
> headed to requiring this. There's nothing Linux specific about it.
> 
> Signed-off-by: Warner Losh <imp@bsdimp.com>
> ---
>   common-user/safe-syscall.S | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>