* [kvm-unit-tests PATCH v1] s390x: explicitly mark stack as not executable
@ 2023-08-09 9:17 Nico Boehr
2023-08-09 10:38 ` Claudio Imbrenda
2023-08-13 9:50 ` Thomas Huth
0 siblings, 2 replies; 4+ messages in thread
From: Nico Boehr @ 2023-08-09 9:17 UTC (permalink / raw)
To: frankja, imbrenda, thuth; +Cc: kvm, linux-s390
With somewhat recent GCC versions, we get this warning on s390x:
/usr/bin/ld: warning: s390x/cpu.o: missing .note.GNU-stack section implies executable stack
/usr/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
We don't really care whether stack is executable or not since we set it
up ourselves and we're running DAT off mostly anyways.
Silence the warning by explicitly marking the stack as not executable.
Signed-off-by: Nico Boehr <nrb@linux.ibm.com>
---
s390x/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/s390x/Makefile b/s390x/Makefile
index 706be7920406..afa47ccbeb93 100644
--- a/s390x/Makefile
+++ b/s390x/Makefile
@@ -79,7 +79,7 @@ CFLAGS += -O2
CFLAGS += -march=zEC12
CFLAGS += -mbackchain
CFLAGS += -fno-delete-null-pointer-checks
-LDFLAGS += -nostdlib -Wl,--build-id=none
+LDFLAGS += -nostdlib -Wl,--build-id=none -z noexecstack
# We want to keep intermediate files
.PRECIOUS: %.o %.lds
--
2.41.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [kvm-unit-tests PATCH v1] s390x: explicitly mark stack as not executable
2023-08-09 9:17 [kvm-unit-tests PATCH v1] s390x: explicitly mark stack as not executable Nico Boehr
@ 2023-08-09 10:38 ` Claudio Imbrenda
2023-08-13 9:50 ` Thomas Huth
1 sibling, 0 replies; 4+ messages in thread
From: Claudio Imbrenda @ 2023-08-09 10:38 UTC (permalink / raw)
To: Nico Boehr; +Cc: frankja, thuth, kvm, linux-s390
On Wed, 9 Aug 2023 11:17:08 +0200
Nico Boehr <nrb@linux.ibm.com> wrote:
> With somewhat recent GCC versions, we get this warning on s390x:
>
> /usr/bin/ld: warning: s390x/cpu.o: missing .note.GNU-stack section implies executable stack
> /usr/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
>
> We don't really care whether stack is executable or not since we set it
> up ourselves and we're running DAT off mostly anyways.
>
> Silence the warning by explicitly marking the stack as not executable.
>
> Signed-off-by: Nico Boehr <nrb@linux.ibm.com>
Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
> ---
> s390x/Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/s390x/Makefile b/s390x/Makefile
> index 706be7920406..afa47ccbeb93 100644
> --- a/s390x/Makefile
> +++ b/s390x/Makefile
> @@ -79,7 +79,7 @@ CFLAGS += -O2
> CFLAGS += -march=zEC12
> CFLAGS += -mbackchain
> CFLAGS += -fno-delete-null-pointer-checks
> -LDFLAGS += -nostdlib -Wl,--build-id=none
> +LDFLAGS += -nostdlib -Wl,--build-id=none -z noexecstack
>
> # We want to keep intermediate files
> .PRECIOUS: %.o %.lds
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [kvm-unit-tests PATCH v1] s390x: explicitly mark stack as not executable
2023-08-09 9:17 [kvm-unit-tests PATCH v1] s390x: explicitly mark stack as not executable Nico Boehr
2023-08-09 10:38 ` Claudio Imbrenda
@ 2023-08-13 9:50 ` Thomas Huth
2023-09-04 6:40 ` Nico Boehr
1 sibling, 1 reply; 4+ messages in thread
From: Thomas Huth @ 2023-08-13 9:50 UTC (permalink / raw)
To: Nico Boehr, frankja, imbrenda
Cc: kvm, linux-s390, Sean Christopherson, Paolo Bonzini
On 09/08/2023 11.17, Nico Boehr wrote:
> With somewhat recent GCC versions, we get this warning on s390x:
>
> /usr/bin/ld: warning: s390x/cpu.o: missing .note.GNU-stack section implies executable stack
> /usr/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
>
> We don't really care whether stack is executable or not since we set it
> up ourselves and we're running DAT off mostly anyways.
>
> Silence the warning by explicitly marking the stack as not executable.
>
> Signed-off-by: Nico Boehr <nrb@linux.ibm.com>
> ---
> s390x/Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/s390x/Makefile b/s390x/Makefile
> index 706be7920406..afa47ccbeb93 100644
> --- a/s390x/Makefile
> +++ b/s390x/Makefile
> @@ -79,7 +79,7 @@ CFLAGS += -O2
> CFLAGS += -march=zEC12
> CFLAGS += -mbackchain
> CFLAGS += -fno-delete-null-pointer-checks
> -LDFLAGS += -nostdlib -Wl,--build-id=none
> +LDFLAGS += -nostdlib -Wl,--build-id=none -z noexecstack
I already did a similar patch some weeks ago:
https://lore.kernel.org/kvm/20230623125416.481755-1-thuth@redhat.com/
... we need it for x86, too, so I guess I should go ahead and commit it -
and ask Sean to respin his conflicting series.
Thomas
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [kvm-unit-tests PATCH v1] s390x: explicitly mark stack as not executable
2023-08-13 9:50 ` Thomas Huth
@ 2023-09-04 6:40 ` Nico Boehr
0 siblings, 0 replies; 4+ messages in thread
From: Nico Boehr @ 2023-09-04 6:40 UTC (permalink / raw)
To: Thomas Huth, frankja, imbrenda
Cc: kvm, linux-s390, Sean Christopherson, Paolo Bonzini
Quoting Thomas Huth (2023-08-13 11:50:00)
> On 09/08/2023 11.17, Nico Boehr wrote:
> > With somewhat recent GCC versions, we get this warning on s390x:
> >
> > /usr/bin/ld: warning: s390x/cpu.o: missing .note.GNU-stack section implies executable stack
> > /usr/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
> >
> > We don't really care whether stack is executable or not since we set it
> > up ourselves and we're running DAT off mostly anyways.
> >
> > Silence the warning by explicitly marking the stack as not executable.
> >
> > Signed-off-by: Nico Boehr <nrb@linux.ibm.com>
> > ---
> > s390x/Makefile | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/s390x/Makefile b/s390x/Makefile
> > index 706be7920406..afa47ccbeb93 100644
> > --- a/s390x/Makefile
> > +++ b/s390x/Makefile
> > @@ -79,7 +79,7 @@ CFLAGS += -O2
> > CFLAGS += -march=zEC12
> > CFLAGS += -mbackchain
> > CFLAGS += -fno-delete-null-pointer-checks
> > -LDFLAGS += -nostdlib -Wl,--build-id=none
> > +LDFLAGS += -nostdlib -Wl,--build-id=none -z noexecstack
>
> I already did a similar patch some weeks ago:
>
> https://lore.kernel.org/kvm/20230623125416.481755-1-thuth@redhat.com/
>
> ... we need it for x86, too, so I guess I should go ahead and commit it -
> and ask Sean to respin his conflicting series.
Thanks!
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-09-04 6:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-09 9:17 [kvm-unit-tests PATCH v1] s390x: explicitly mark stack as not executable Nico Boehr
2023-08-09 10:38 ` Claudio Imbrenda
2023-08-13 9:50 ` Thomas Huth
2023-09-04 6:40 ` Nico Boehr
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox