[PATCH v6] x86-64: Allocate state buffer space for RDI, RSI and RBX
H.J. Lu
hjl.tools@gmail.com
Tue Mar 19 12:26:50 GMT 2024
On Tue, Mar 19, 2024 at 5:17 AM Florian Weimer <fweimer@redhat.com> wrote:
>
> * Andreas Schwab:
>
> > On Mär 19 2024, H.J. Lu wrote:
> >
> >> On Tue, Mar 19, 2024 at 1:31 AM Andreas Schwab <schwab@suse.de> wrote:
> >>>
> >>> On Mär 18 2024, H.J. Lu wrote:
> >>>
> >>> > diff --git a/sysdeps/x86_64/tst-gnu2-tls2mod1.S b/sysdeps/x86_64/tst-gnu2-tls2mod1.S
> >>> > new file mode 100644
> >>> > index 0000000000..1d636669ba
> >>> > --- /dev/null
> >>> > +++ b/sysdeps/x86_64/tst-gnu2-tls2mod1.S
> >>> > @@ -0,0 +1,87 @@
> >>> > +/* Check if TLSDESC relocation preserves %rdi, %rsi and %rbx.
> >>> > + Copyright (C) 2024 Free Software Foundation, Inc.
> >>> > + This file is part of the GNU C Library.
> >>> > +
> >>> > + The GNU C Library is free software; you can redistribute it and/or
> >>> > + modify it under the terms of the GNU Lesser General Public
> >>> > + License as published by the Free Software Foundation; either
> >>> > + version 2.1 of the License, or (at your option) any later version.
> >>> > +
> >>> > + The GNU C Library is distributed in the hope that it will be useful,
> >>> > + but WITHOUT ANY WARRANTY; without even the implied warranty of
> >>> > + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> >>> > + Lesser General Public License for more details.
> >>> > +
> >>> > + You should have received a copy of the GNU Lesser General Public
> >>> > + License along with the GNU C Library; if not, see
> >>> > + <http://www.gnu.org/licenses/>. */
> >>> > +
> >>> > +#include <sysdep.h>
> >>>
> >>> A testsuite module cannot include non-installed headers.
> >>>
> >>
> >> This is a very special case. Does it cause any issues?
> >
> > sysdep.h generally depends on definitions in config.h.
>
> It seems to be a downstream-specific patch:
>
> [ 1518s] In file included from ../sysdeps/unix/x86_64/sysdep.h:19,
> [ 1518s] from ../sysdeps/unix/sysv/linux/x86_64/sysdep.h:23,
> [ 1518s] from ../sysdeps/x86_64/tst-gnu2-tls2mod1.S:19:
> [ 1518s] ../sysdeps/x86_64/sysdep.h:56:5: error: "ENABLE_USERSPACE_LIVEPATCH" is not defined, evaluates to 0 [-Werror=undef]
> [ 1518s] 56 | #if ENABLE_USERSPACE_LIVEPATCH
> [ 1518s] | ^~~~~~~~~~~~~~~~~~~~~~~~~~
> [ 1518s] cc1: some warnings being treated as errors
>
> I think the module using <sysdep.h> needs to be added to the
> test-internal-extras Makefile variable.
I will fix it if I can reproduce it. If a glibc patch is needed, I
will need it.
--
H.J.
More information about the Libc-alpha
mailing list