2023-03-19 13:51:36

by Willy Tarreau

[permalink] [raw]
Subject: [PATCH 0/1] tools/nolibc: always disable stack protector for tests

Hello Paul,

Thomas noticed that nolibc-test fails to build on compilers that enable
stack protectors by default. Passing -fno-stack-protector when supported
addresses the problem.

I verified that all supported archs continue to work after his patch is
applied, and that it applies without conflict (and works) both on top of
your latest dev tree and on top of Linus' master branch. Thus I think it
can make sense to queue it with your next series of fixes and have it for
6.3 given that it addresses build issues for some developers.

Thanks!
Willy
---
Thomas Weißschuh (1):
tools/nolibc: always disable stack protector for tests

tools/testing/selftests/nolibc/Makefile | 3 +++
1 file changed, 3 insertions(+)

--
2.17.5



2023-03-19 18:05:22

by Paul E. McKenney

[permalink] [raw]
Subject: Re: [PATCH 0/1] tools/nolibc: always disable stack protector for tests

On Sun, Mar 19, 2023 at 02:50:59PM +0100, Willy Tarreau wrote:
> Hello Paul,
>
> Thomas noticed that nolibc-test fails to build on compilers that enable
> stack protectors by default. Passing -fno-stack-protector when supported
> addresses the problem.
>
> I verified that all supported archs continue to work after his patch is
> applied, and that it applies without conflict (and works) both on top of
> your latest dev tree and on top of Linus' master branch. Thus I think it
> can make sense to queue it with your next series of fixes and have it for
> 6.3 given that it addresses build issues for some developers.

Queued and pushed, thank you both!

Just to make sure I understand, you would like me to add this to the
serieses from Vincent, yourself, and Feiyang that are set up to go into
the next merge window, correct?

If you instead would like me to push it to Linus directly into the v6.3
release as a regression fix late this coming week, please let me know.

Thanx, Paul

> Thanks!
> Willy
> ---
> Thomas Wei?schuh (1):
> tools/nolibc: always disable stack protector for tests
>
> tools/testing/selftests/nolibc/Makefile | 3 +++
> 1 file changed, 3 insertions(+)
>
> --
> 2.17.5
>

2023-03-19 20:11:41

by Willy Tarreau

[permalink] [raw]
Subject: Re: [PATCH 0/1] tools/nolibc: always disable stack protector for tests

Hi Paul,

On Sun, Mar 19, 2023 at 11:05:15AM -0700, Paul E. McKenney wrote:
> Queued and pushed, thank you both!

Thank you!

> Just to make sure I understand, you would like me to add this to the
> serieses from Vincent, yourself, and Feiyang that are set up to go into
> the next merge window, correct?
>
> If you instead would like me to push it to Linus directly into the v6.3
> release as a regression fix late this coming week, please let me know.

It would indeed be preferable for 6.3 as it fixes issues, but it's not
critical at all, just an annoyance for some developers. So if you have a
series of fixes pending to be sent soon, it would be nice to add it there.

Thanks!
Willy

2023-03-19 23:55:02

by Paul E. McKenney

[permalink] [raw]
Subject: Re: [PATCH 0/1] tools/nolibc: always disable stack protector for tests

On Sun, Mar 19, 2023 at 09:11:19PM +0100, Willy Tarreau wrote:
> Hi Paul,
>
> On Sun, Mar 19, 2023 at 11:05:15AM -0700, Paul E. McKenney wrote:
> > Queued and pushed, thank you both!
>
> Thank you!
>
> > Just to make sure I understand, you would like me to add this to the
> > serieses from Vincent, yourself, and Feiyang that are set up to go into
> > the next merge window, correct?
> >
> > If you instead would like me to push it to Linus directly into the v6.3
> > release as a regression fix late this coming week, please let me know.
>
> It would indeed be preferable for 6.3 as it fixes issues, but it's not
> critical at all, just an annoyance for some developers. So if you have a
> series of fixes pending to be sent soon, it would be nice to add it there.

Very well, here is what I currently have for nolibc, from newest to
oldest:

7712ec32cbda selftests/nolibc: Adjust indentation for Makefile
96218cfc79eb selftests/nolibc: Add support for LoongArch
cab6bbd00f2a tools/nolibc: Add support for LoongArch
496921e4724c tools/nolibc: Add statx() and make stat() rely on statx() if necessary
97a15c47b98c tools/nolibc: Include linux/fcntl.h and remove duplicate code
de06f2fe1aac tools/nolibc: check for S_I* macros before defining them
7fb54b517d44 selftests/nolibc: skip the chroot_root and link_dir tests when not privileged
296659c6e551 tools/nolibc: add getuid() and geteuid()
bd9a87d64994 tools/nolibc: add tests for the integer limits in stdint.h
2d1813a7ef67 tools/nolibc: enlarge column width of tests
5dbcbb2da574 tools/nolibc: add integer types and integer limit macros
111bb94f67eb tools/nolibc: add stdint.h
2dbf8575b2da tools/nolibc: Add gitignore to avoid git complaints about sysroot

I will take the new commit, rebase it to precede the first of the above,
so that the stack will look like this:

7712ec32cbda selftests/nolibc: Adjust indentation for Makefile
96218cfc79eb selftests/nolibc: Add support for LoongArch
cab6bbd00f2a tools/nolibc: Add support for LoongArch
496921e4724c tools/nolibc: Add statx() and make stat() rely on statx() if necessary
97a15c47b98c tools/nolibc: Include linux/fcntl.h and remove duplicate code
de06f2fe1aac tools/nolibc: check for S_I* macros before defining them
7fb54b517d44 selftests/nolibc: skip the chroot_root and link_dir tests when not privileged
296659c6e551 tools/nolibc: add getuid() and geteuid()
bd9a87d64994 tools/nolibc: add tests for the integer limits in stdint.h
2d1813a7ef67 tools/nolibc: enlarge column width of tests
5dbcbb2da574 tools/nolibc: add integer types and integer limit macros
111bb94f67eb tools/nolibc: add stdint.h
2dbf8575b2da tools/nolibc: Add gitignore to avoid git complaints about sysroot
???????????? tools/nolibc: always disable stack protector for tests

Then if tests, -next, and kernel test robot are kind, I will send a
pull request to Linus for the "always disable stack protector for tests"
commit. The rest I send for the upcoming merge window.

Please let me know if I am missing something.

Thanx, Paul

2023-03-20 03:05:23

by Willy Tarreau

[permalink] [raw]
Subject: Re: [PATCH 0/1] tools/nolibc: always disable stack protector for tests

On Sun, Mar 19, 2023 at 04:54:53PM -0700, Paul E. McKenney wrote:
> On Sun, Mar 19, 2023 at 09:11:19PM +0100, Willy Tarreau wrote:
> > Hi Paul,
> >
> > On Sun, Mar 19, 2023 at 11:05:15AM -0700, Paul E. McKenney wrote:
> > > Queued and pushed, thank you both!
> >
> > Thank you!
> >
> > > Just to make sure I understand, you would like me to add this to the
> > > serieses from Vincent, yourself, and Feiyang that are set up to go into
> > > the next merge window, correct?
> > >
> > > If you instead would like me to push it to Linus directly into the v6.3
> > > release as a regression fix late this coming week, please let me know.
> >
> > It would indeed be preferable for 6.3 as it fixes issues, but it's not
> > critical at all, just an annoyance for some developers. So if you have a
> > series of fixes pending to be sent soon, it would be nice to add it there.
>
> Very well, here is what I currently have for nolibc, from newest to
> oldest:
>
> 7712ec32cbda selftests/nolibc: Adjust indentation for Makefile
> 96218cfc79eb selftests/nolibc: Add support for LoongArch
> cab6bbd00f2a tools/nolibc: Add support for LoongArch
> 496921e4724c tools/nolibc: Add statx() and make stat() rely on statx() if necessary
> 97a15c47b98c tools/nolibc: Include linux/fcntl.h and remove duplicate code
> de06f2fe1aac tools/nolibc: check for S_I* macros before defining them
> 7fb54b517d44 selftests/nolibc: skip the chroot_root and link_dir tests when not privileged
> 296659c6e551 tools/nolibc: add getuid() and geteuid()
> bd9a87d64994 tools/nolibc: add tests for the integer limits in stdint.h
> 2d1813a7ef67 tools/nolibc: enlarge column width of tests
> 5dbcbb2da574 tools/nolibc: add integer types and integer limit macros
> 111bb94f67eb tools/nolibc: add stdint.h
> 2dbf8575b2da tools/nolibc: Add gitignore to avoid git complaints about sysroot
>
> I will take the new commit, rebase it to precede the first of the above,
> so that the stack will look like this:
>
> 7712ec32cbda selftests/nolibc: Adjust indentation for Makefile
> 96218cfc79eb selftests/nolibc: Add support for LoongArch
> cab6bbd00f2a tools/nolibc: Add support for LoongArch
> 496921e4724c tools/nolibc: Add statx() and make stat() rely on statx() if necessary
> 97a15c47b98c tools/nolibc: Include linux/fcntl.h and remove duplicate code
> de06f2fe1aac tools/nolibc: check for S_I* macros before defining them
> 7fb54b517d44 selftests/nolibc: skip the chroot_root and link_dir tests when not privileged
> 296659c6e551 tools/nolibc: add getuid() and geteuid()
> bd9a87d64994 tools/nolibc: add tests for the integer limits in stdint.h
> 2d1813a7ef67 tools/nolibc: enlarge column width of tests
> 5dbcbb2da574 tools/nolibc: add integer types and integer limit macros
> 111bb94f67eb tools/nolibc: add stdint.h
> 2dbf8575b2da tools/nolibc: Add gitignore to avoid git complaints about sysroot
> ???????????? tools/nolibc: always disable stack protector for tests
>
> Then if tests, -next, and kernel test robot are kind, I will send a
> pull request to Linus for the "always disable stack protector for tests"
> commit. The rest I send for the upcoming merge window.
>
> Please let me know if I am missing something.

This is perfect, thank you very much, Paul!

Willy

2023-03-20 16:50:25

by Paul E. McKenney

[permalink] [raw]
Subject: Re: [PATCH 0/1] tools/nolibc: always disable stack protector for tests

On Mon, Mar 20, 2023 at 04:05:02AM +0100, Willy Tarreau wrote:
> On Sun, Mar 19, 2023 at 04:54:53PM -0700, Paul E. McKenney wrote:
> > On Sun, Mar 19, 2023 at 09:11:19PM +0100, Willy Tarreau wrote:
> > > Hi Paul,
> > >
> > > On Sun, Mar 19, 2023 at 11:05:15AM -0700, Paul E. McKenney wrote:
> > > > Queued and pushed, thank you both!
> > >
> > > Thank you!
> > >
> > > > Just to make sure I understand, you would like me to add this to the
> > > > serieses from Vincent, yourself, and Feiyang that are set up to go into
> > > > the next merge window, correct?
> > > >
> > > > If you instead would like me to push it to Linus directly into the v6.3
> > > > release as a regression fix late this coming week, please let me know.
> > >
> > > It would indeed be preferable for 6.3 as it fixes issues, but it's not
> > > critical at all, just an annoyance for some developers. So if you have a
> > > series of fixes pending to be sent soon, it would be nice to add it there.
> >
> > Very well, here is what I currently have for nolibc, from newest to
> > oldest:
> >
> > 7712ec32cbda selftests/nolibc: Adjust indentation for Makefile
> > 96218cfc79eb selftests/nolibc: Add support for LoongArch
> > cab6bbd00f2a tools/nolibc: Add support for LoongArch
> > 496921e4724c tools/nolibc: Add statx() and make stat() rely on statx() if necessary
> > 97a15c47b98c tools/nolibc: Include linux/fcntl.h and remove duplicate code
> > de06f2fe1aac tools/nolibc: check for S_I* macros before defining them
> > 7fb54b517d44 selftests/nolibc: skip the chroot_root and link_dir tests when not privileged
> > 296659c6e551 tools/nolibc: add getuid() and geteuid()
> > bd9a87d64994 tools/nolibc: add tests for the integer limits in stdint.h
> > 2d1813a7ef67 tools/nolibc: enlarge column width of tests
> > 5dbcbb2da574 tools/nolibc: add integer types and integer limit macros
> > 111bb94f67eb tools/nolibc: add stdint.h
> > 2dbf8575b2da tools/nolibc: Add gitignore to avoid git complaints about sysroot
> >
> > I will take the new commit, rebase it to precede the first of the above,
> > so that the stack will look like this:
> >
> > 7712ec32cbda selftests/nolibc: Adjust indentation for Makefile
> > 96218cfc79eb selftests/nolibc: Add support for LoongArch
> > cab6bbd00f2a tools/nolibc: Add support for LoongArch
> > 496921e4724c tools/nolibc: Add statx() and make stat() rely on statx() if necessary
> > 97a15c47b98c tools/nolibc: Include linux/fcntl.h and remove duplicate code
> > de06f2fe1aac tools/nolibc: check for S_I* macros before defining them
> > 7fb54b517d44 selftests/nolibc: skip the chroot_root and link_dir tests when not privileged
> > 296659c6e551 tools/nolibc: add getuid() and geteuid()
> > bd9a87d64994 tools/nolibc: add tests for the integer limits in stdint.h
> > 2d1813a7ef67 tools/nolibc: enlarge column width of tests
> > 5dbcbb2da574 tools/nolibc: add integer types and integer limit macros
> > 111bb94f67eb tools/nolibc: add stdint.h
> > 2dbf8575b2da tools/nolibc: Add gitignore to avoid git complaints about sysroot
> > ???????????? tools/nolibc: always disable stack protector for tests
> >
> > Then if tests, -next, and kernel test robot are kind, I will send a
> > pull request to Linus for the "always disable stack protector for tests"
> > commit. The rest I send for the upcoming merge window.
> >
> > Please let me know if I am missing something.
>
> This is perfect, thank you very much, Paul!

Done!

Thanx, Paul