public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [RFC PATCH 00/34] The rest of the x86_64-gnu port
@ 2023-03-19 15:09 Sergey Bugaev
  2023-03-19 15:09 ` [RFC PATCH gnumach 01/34] Add i386_fsgs_base_state Sergey Bugaev
                   ` (36 more replies)
  0 siblings, 37 replies; 140+ messages in thread
From: Sergey Bugaev @ 2023-03-19 15:09 UTC (permalink / raw)
  To: libc-alpha, bug-hurd; +Cc: Samuel Thibault, Sergey Bugaev, Luca

Hello!

(Naturally, the subject line is a reference to the "How to draw an owl" meme.)

It's been more than a month since I've tried to run ./configure
--host=x86_64-gnu and see what would come out of it, and here we are now:
with these patches, glibc fully builds, and even somewhat "works"!

On testing
==========

By "works", I mean:

I was unable to actually get it running on GNU Mach. It either never gets
started, or crashes soon enough. The latter is actually to be expected, since
the kernel does not actually support i386_fsgs_base_state yet. I was unable
to investigate what exactly happens, because in addition to the troubles with
actually running GNU Mach on qemu-system-x86_64 (-kernel doesn't work..., you
really have to build an image with GRUB) and attaching a debugger to it
(either GDB or QEMU get utterly confused be the switch to the long mode...),
I had troubles with actually spawning the task while breaking on its first
instruction (a la starti). In particular prompt-task-resume didn't seem to
work for me, nor did breaking somewhere before the task should have been
resumed.

So I would appreciate some help with both testing this patchset (i.e. if you
do have a working x86_64 Mach + userspace setup, build glibc and try to run
it), and some general tips about how I would go about debugging the bootstrap
task from the first instruction onwards with x86_64 GNU Mach, QEMU, and GDB.

Anyone? Luca (cc'ed), perhaps you could help me with testing & give me some
tips?

Instead of testing on GNU Mach, I settled for the next best thing and tested
it on GNU/Linux, under GDB. I had to skip over the syscalls and emulate their
effects, either in my head (e.g. the return value of mach_reply_prot ()), by
writing $fs_base in GDB for thread_set_state (i386_fsgs_base_state), or by
making a Linux syscall to mmap some anonymous memory (for vm_map). Obviously
this is not the same thing as running it on the Mach for real, but -- it went
fine, and reached main ()! This means there likely aren't any catastrophic
issues with early startup (think init-first.c), TLS setup / accesses, etc.

On assembly and registers
=========================

This patchset involves code that has to deal inline assembly and/or registers,
such as intr-msg.h, longjmp, and sigreturn. I have written *something* that
looks like it might work, but without actual testing, it's hard to know if it
does. We can't really test any signal-related code until there's enough of the
Hurd running to have a proc server, etc.

As for sigreturn specifically: I'm concerned about the possibility that
putting the register dump onto the user's stack (or at %rsp - 128, on x86_64)
may clobber the data trampoline.c puts there (unless an altstack is used),
including the very sigcontext. This applies to both i386 and x86_64.
Empirically, we know this works out fine for i386 -- maybe sigcontext doesn't
actually get overwritten, or gets overwritten in just the right way (think
memmove, although i386/sigreturn.c actually uses memcpy...).

I also haven't given much thought to FP state manipulation, since I know very
little about it. It might be that it's broken entirely.

In any case, it wouldn't hurt if you review my attempts at asm & register
manipulation extra carefully.

On TLS and microoptimization
============================

As you can see, I've done a bunch of changes to how TLS-related things work,
on both x86_64 and i386. The reasons for this are:

1. I wanted to minimizae <hurd/threadvar.h> and its usages, so every line
   dropped from <hurd/threadvar.h> is a small win. In the end, only
   __hurd_sigthread_stack_{base,end} remain. I think these could be moved
   to <hurd/signal.h>, and we should be able to rid ourselves of
   <hurd/threadvar.h> for good.

2. I have discovered that the way __hurd_local_reply_port is declared is prone
   to GCC miscompiling accesses to it (reported here: [0]). Even when not
   miscompiled, this resulted in pretty inefficient code generation. Since two
   of the three places where __hurd_local_reply_port was used were in signal
   code where we know for sure that TLS is already working (since we must be
   running the signal thread), they could access tcb->reply_port directly
   (using the appropriate THREAD_*MEM accessor macros), and the rest of
   __hurd_local_reply_port / __LIBC_NO_TLS logic could be moved into
   mig-reply.c (and improved/specialized there), so that's what I've done.

   [0]: https://sourceware.org/pipermail/libc-alpha/2023-March/146304.html

3. Disabling / compiling out support for the no-TLS case in libc.so (and
   libpthread.so, etc.) -- but not in static builds, and not in ld.so. This
   turned out to be kind of required for x86_64 (more on that below), but it
   is a nice optimization in and of itself.

To illistrate the overall effect of these optimizations, here's a comparision
of the code generated for mig_get_reply_port () in libc.so for i386:

Before the changes (as shipped in Debian GNU/Hurd):

Dump of assembler code for function __GI___mig_get_reply_port:
   0x0001c0a0 <+0>:       push   %ebp
   0x0001c0a1 <+1>:       mov    %ds,%dx
   0x0001c0a4 <+4>:       mov    %gs,%ax
   0x0001c0a7 <+7>:       mov    %esp,%ebp
   0x0001c0a9 <+9>:       push   %esi
   0x0001c0aa <+10>:      call   0x1e1bc5 <__x86.get_pc_thunk.si>
   0x0001c0af <+15>:      add    $0x24af45,%esi
   0x0001c0b5 <+21>:      push   %ebx
   0x0001c0b6 <+22>:      cmp    %ax,%dx
   0x0001c0b9 <+25>:      je     0x1c130 <__GI___mig_get_reply_port+144>
   0x0001c0bb <+27>:      mov    %gs:0x0,%eax
   0x0001c0c1 <+33>:      mov    0x38(%eax),%eax
   0x0001c0c4 <+36>:      test   %eax,%eax
   0x0001c0c6 <+38>:      je     0x1c110 <__GI___mig_get_reply_port+112>
   0x0001c0c8 <+40>:      mov    %ds,%dx
   0x0001c0cb <+43>:      mov    %gs,%ax
   0x0001c0ce <+46>:      cmp    %ax,%dx
   0x0001c0d1 <+49>:      je     0x1c0f8 <__GI___mig_get_reply_port+88>
   0x0001c0d3 <+51>:      lea    0x1798(%esi),%edx
   0x0001c0d9 <+57>:      mov    %gs:0x0,%eax
   0x0001c0df <+63>:      lea    0x38(%eax),%ecx
   0x0001c0e2 <+66>:      cmp    %edx,%ecx
   0x0001c0e4 <+68>:      je     0x1c0f8 <__GI___mig_get_reply_port+88>
   0x0001c0e6 <+70>:      mov    %ds,%bx
   0x0001c0e9 <+73>:      mov    %gs,%cx
   0x0001c0ec <+76>:      cmp    %cx,%bx
   0x0001c0ef <+79>:      je     0x1c110 <__GI___mig_get_reply_port+112>
   0x0001c0f1 <+81>:      mov    0x38(%eax),%eax
   0x0001c0f4 <+84>:      cmp    %eax,(%edx)
   0x0001c0f6 <+86>:      je     0x1c110 <__GI___mig_get_reply_port+112>
   0x0001c0f8 <+88>:      mov    %ds,%dx
   0x0001c0fb <+91>:      mov    %gs,%ax
   0x0001c0fe <+94>:      cmp    %ax,%dx
   0x0001c101 <+97>:      je     0x1c140 <__GI___mig_get_reply_port+160>
   0x0001c103 <+99>:      pop    %ebx
   0x0001c104 <+100>:     pop    %esi
   0x0001c105 <+101>:     mov    %gs:0x0,%eax
   0x0001c10b <+107>:     pop    %ebp
   0x0001c10c <+108>:     mov    0x38(%eax),%eax
   0x0001c10f <+111>:     ret
   0x0001c110 <+112>:     mov    %ds,%dx
   0x0001c113 <+115>:     mov    %gs,%ax
   0x0001c116 <+118>:     cmp    %ax,%dx
   0x0001c119 <+121>:     je     0x1c150 <__GI___mig_get_reply_port+176>
   0x0001c11b <+123>:     mov    %gs:0x0,%ebx
   0x0001c122 <+130>:     add    $0x38,%ebx
   0x0001c125 <+133>:     call   0x1b7b0 <__GI___mach_reply_port>
   0x0001c12a <+138>:     mov    %eax,(%ebx)
   0x0001c12c <+140>:     jmp    0x1c0f8 <__GI___mig_get_reply_port+88>
   0x0001c12e <+142>:     xchg   %ax,%ax
   0x0001c130 <+144>:     lea    0x1798(%esi),%eax
   0x0001c136 <+150>:     mov    (%eax),%eax
   0x0001c138 <+152>:     jmp    0x1c0c4 <__GI___mig_get_reply_port+36>
   0x0001c13a <+154>:     lea    0x0(%esi),%esi
   0x0001c140 <+160>:     lea    0x1798(%esi),%eax
   0x0001c146 <+166>:     pop    %ebx
   0x0001c147 <+167>:     pop    %esi
   0x0001c148 <+168>:     pop    %ebp
   0x0001c149 <+169>:     mov    (%eax),%eax
   0x0001c14b <+171>:     ret
   0x0001c14c <+172>:     lea    0x0(%esi,%eiz,1),%esi
   0x0001c150 <+176>:     lea    0x1798(%esi),%ebx
   0x0001c156 <+182>:     jmp    0x1c125 <__GI___mig_get_reply_port+133>
End of assembler dump.

After the changes:

Dump of assembler code for function __GI___mig_get_reply_port:
   0x00020060 <+0>:	mov    %gs:0x38,%eax
   0x00020066 <+6>:	test   %eax,%eax
   0x00020068 <+8>:	je     0x20070 <__GI___mig_get_reply_port+16>
   0x0002006a <+10>:	ret
   0x0002006b <+11>:	lea    0x0(%esi,%eiz,1),%esi
   0x0002006f <+15>:	nop
   0x00020070 <+16>:	sub    $0xc,%esp
   0x00020073 <+19>:	call   0x1f790 <__GI___mach_reply_port>
   0x00020078 <+24>:	mov    %eax,%gs:0x38
   0x0002007e <+30>:	add    $0xc,%esp
   0x00020081 <+33>:	ret
End of assembler dump.

I think that this is pretty nice :) Note that I didn't focus on optimizing
mig_get_reply_port () specifically, and also that the versions in ld.so and
in libc.a are more complex (but still nowhere near as complex as the original).

Now, the horror story about __LIBC_NO_TLS () and __libc_tls_initialized:

Last time, when I realized that ld.so is lazily pulling object files out of
libc that something references, I understood that just putting the
__libc_tls_initialized into init-first.c would not work, for two reasons: for
one, that would cause ld.so to have it's own local copy of
__libc_tls_initialized -- we wouldn't want that, we want ld.so and rtld to
have a consistent idea of whether or not the TLS is initialized. Secondly,
this would pull in init-first.o into rtld, which is very wrong, and in fact
init-first.c even contains code to intentionally cause a linking error if this
ever happens.

The latter could be solved by just declaring __libc_tls_initialized outside of
init-first.c, but the former, I thought, actually required defining it into
ldsodefs.h, to be renamed dl_tls_initialized and accessed using the GL()
macro. When I asked [1], nobody discouraged me from going this way.

[1]: https://sourceware.org/pipermail/libc-alpha/2023-March/146254.html

But in trying to implement that, I ran into trouble with including
<ldsodefs.h> in <tls.h>. Namely, it turned out that there's an inverse
dependency between these two headers already. <ldsodefs.h> was explicitly (and
needlessly) including <tls.h> -- that was easy to get rid of -- but also
implicitly depending on it in several ways. First, it includes <link.h> (for
struct link_map), and that needs <tls.h> to define FORCED_DYNAMIC_TLS_OFFSET
or something like that. Second, it needs to define some locks, so it includes
<libc-lock.h>, and that immediately needs <tls.h> for __libc_lock_owner_self.
Moreover, <libc-lock.h> includes <lowlevellock.h>, and that includes
<atomic.h>, and then <x86/atomic-machine.h> again includes <tls.h> for the
tcbhead_t definition.

So as you can see, there are quite a few ways that <ldsodefs.h> wants to
include <tls.h>! And naturally, including <ldsodefs.h> in <tls.h> then fails
inside <ldsodefs.h>, where it discovers that __rtld_lock_define_recursive is
not defined and so on.

So... I came up with three (!) different ways to work around that, before
coming up with the fourth one, as included in this patch set.

The first way I implemented this was with a pair of out-of-line functions,
__libc_no_tls () and __libc_set_tls_initialized (), whose implementation in a
separate file could freely include <ldsodefs.h>. __libc_no_tls () had to be
exported out of libc.so, @@GLIBC_PRIVATE, but other than that, it seemed to
work. But then I happened to take a look at the generated code and naturally
discovered that it didn't get LTO-inlined (and why would it, if I'm not
building with LTO -- nor would LTO work cross-DSO in any case). Doing an extra
function call (through PLT if we're talking about libpthread.so...) for a
function that is literally a load of a single byte sounded bad. Really, how
could I settle for bad code generated -- all becuase I couldn't figure out
some stupid header dependencies?

So for the second attempt, I forced the headers to work the way I needed them.
This involved some unpretty kludges; for instance here's how the kludge in
<tls.h> looked:

/* If we're not being included from inside (or after) these few headers,
   include ldsodefs.h for the GL macro.  Otherwise, those headers will
   include (or have already included) ldsodefs.h themselves. This is done
   in this weird way because of issues with circular dependencies between
   these headers.  */
#if !defined (_LIBC_LOCK_H) && !defined (_MACH_LOWLEVELLOCK_H) \
    && !defined (_LOCK_INTERN_H) && !defined (_LINK_H) \
    && !defined (_X86_ATOMIC_MACHINE_H)
# include <ldsodefs.h>
#endif

add to this more instances of #include <ldsodefs.h> (guarded by similar
include guards) scattered across various random headers, and -- it builds.
The generated code now was what I wanted it to be (a direct access to
GL(dl_tls_initialized)), but this was obviously not pretty or nice.

A much cleaner solution, I thought, would be to split the various headers
involved into more granular parts. For instance, <ldsodefs.h> only really
needs to declare the locks, but not to actually lock and unlock them. If we
moved the lock declaration macros to a new, smaller header, say,
<libc-lock-def.h>, then that would not need <tls.h>. A smiliar split would be
nedded for <lowlevellock.h>. <tls.h> itself could be split: NPTL already has
a separate <tcb-access.h> where THREAD_{G,S}ETMEM macros are; but I was
imagining making it more granular still: for instance, we could have
<tls/tcb.h> which only defines the tcbhead_t layout (and that's what
<x86/atomic-machine.h> would include), <tls/access.h> which defines the
accessors, <tls/setup.h> which defines the various functions to set up TLS for
a thread, <tls/gscope.h> for the GSCOPE decls, and on the Hurd, <tls/no-tls.h>
for __LIBC_NO_TLS (). Each of the headers will be small and only bring in what
it really needs, and not everything and the kitchen sink.

This would be a clean and nice solution -- but it would be quite invasive,
and require changes in all the ports. And I have neither the hardware nor the
capacity to test that this breaks nothing on architectures I know nothing
about. (For instance, what's or1k or nios2? I've no idea.) And it's unlikely
that such a large, but poorly executed and tested reorganization would be
accepted simply because it would be convenient to the Hurd port.

Still, this seemed like the best way to pursue, so I half-implemented a
limited form of this (only splitting the locking headers). This was enough to
get x86_64-gnu to build without the include guard kludges. But then again, I
would need to do the same changes to NPTL, and without a way to really test
them, I didn't feel confident enough.

So that's when I had a small epiphany: TLS for the initial thread is always
set up inside rtld, before it passes control over to libc! There's no need to
share the flag with libc.so, since inside libc.so, it's always initialized!
We can just defined __LIBC_NO_TLS () to 0 outside of rtld (in shared builds).
This instantly solves the issue of circular includes (no longer need to use
ldsodefs!), and also makes the generated code even smaller / more efficient
at runtime, since we can statically compile out the no-TLS branches.

This logic *might* be broken for ifunc resolvers (I don't know -- is it?),
but then apparently they're not able to use most of the normal libc
functionality anyway, so hopefully this is not a big deal.

So much about the TLS, let's finally jump to the

Conclusion
==========

So, yeah, this is "the rest of the x86_64-gnu port". Please do review, try to
build it, and try to run it if you can. And teach *me* to run it, if you know
how to. I have tested that i686-gnu still builds and works, but more testing
is needed.

Some things are still missing, for instance I haven't looked at implementing
{get,set,make,swap}context. It seems they aren't required for basic operation.
And naturally, once we start running/using this for real, we'll discover what
else is missing or broken.

I hope I didn't screw up the rebasing anywhere, but this is a pretty large
patchset, so I might have. If you see a commit that doesn't make sense, or
some "AMENDME" or "fixup" in the commit message or some such, please let me
know :)

I have also started a port of the Hurd proper to x86_64, but I am not sending
out the patches for that yet.

Sergey

^ permalink raw reply	[flat|nested] 140+ messages in thread

* [RFC PATCH gnumach 01/34] Add i386_fsgs_base_state
  2023-03-19 15:09 [RFC PATCH 00/34] The rest of the x86_64-gnu port Sergey Bugaev
@ 2023-03-19 15:09 ` Sergey Bugaev
  2023-04-02 22:43   ` Samuel Thibault
  2023-03-19 15:09 ` [RFC PATCH gnumach 02/34] Remove bootstrap.defs Sergey Bugaev
                   ` (35 subsequent siblings)
  36 siblings, 1 reply; 140+ messages in thread
From: Sergey Bugaev @ 2023-03-19 15:09 UTC (permalink / raw)
  To: libc-alpha, bug-hurd; +Cc: Samuel Thibault, Sergey Bugaev

---
 i386/include/mach/i386/thread_status.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/i386/include/mach/i386/thread_status.h b/i386/include/mach/i386/thread_status.h
index 3de22ff3..32e40686 100644
--- a/i386/include/mach/i386/thread_status.h
+++ b/i386/include/mach/i386/thread_status.h
@@ -57,6 +57,7 @@
 #define	i386_V86_ASSIST_STATE	4
 #define	i386_REGS_SEGS_STATE	5
 #define	i386_DEBUG_STATE	6
+#define	i386_FSGS_BASE_STATE	7
 
 /*
  * This structure is used for both
@@ -179,4 +180,11 @@ struct i386_debug_state {
 #define	i386_DEBUG_STATE_COUNT \
 	    (sizeof(struct i386_debug_state)/sizeof(unsigned int))
 
+struct i386_fsgs_base_state {
+	unsigned long fs_base;
+	unsigned long gs_base;
+};
+#define i386_FSGS_BASE_STATE_COUNT \
+	    (sizeof(struct i386_fsgs_base_state)/sizeof(unsigned int))
+
 #endif	/* _MACH_I386_THREAD_STATUS_H_ */
-- 
2.39.2


^ permalink raw reply	[flat|nested] 140+ messages in thread

* [RFC PATCH gnumach 02/34] Remove bootstrap.defs
  2023-03-19 15:09 [RFC PATCH 00/34] The rest of the x86_64-gnu port Sergey Bugaev
  2023-03-19 15:09 ` [RFC PATCH gnumach 01/34] Add i386_fsgs_base_state Sergey Bugaev
@ 2023-03-19 15:09 ` Sergey Bugaev
  2023-04-02 22:43   ` Samuel Thibault
  2023-03-19 15:09 ` [RFC PATCH gnumach 03/34] Make exception subcode a long Sergey Bugaev
                   ` (34 subsequent siblings)
  36 siblings, 1 reply; 140+ messages in thread
From: Sergey Bugaev @ 2023-03-19 15:09 UTC (permalink / raw)
  To: libc-alpha, bug-hurd; +Cc: Samuel Thibault, Sergey Bugaev

As far as I can see, this file was imported in the very beginning of GNU Mach
history, and unused since then. Nobody implements or uses this interface. GNU
Mach uses a different way to pass the privileged ports to the bootstrap tasks:
instead of the task(s) actively asking for the ports in an RPC, the ports are
preemptively inserted into the IPC space(s) of the task(s), as configured by
the boot script.

Remove bootstrap.defs so as to not confuse anyone into thinking it works.
---
 Makefrag.am                 |  1 -
 include/mach/bootstrap.defs | 49 -------------------------------------
 2 files changed, 50 deletions(-)
 delete mode 100644 include/mach/bootstrap.defs

diff --git a/Makefrag.am b/Makefrag.am
index 358f8db3..5d4f2c48 100644
--- a/Makefrag.am
+++ b/Makefrag.am
@@ -367,7 +367,6 @@ include_device_HEADERS = \
 
 include_machdir = $(includedir)/mach
 include_mach_HEADERS = \
-	include/mach/bootstrap.defs \
 	include/mach/default_pager.defs \
 	include/mach/default_pager_helper.defs \
 	include/mach/default_pager_types.defs \
diff --git a/include/mach/bootstrap.defs b/include/mach/bootstrap.defs
deleted file mode 100644
index 0b233e4a..00000000
--- a/include/mach/bootstrap.defs
+++ /dev/null
@@ -1,49 +0,0 @@
-/* 
- * Mach Operating System
- * Copyright (c) 1992 Carnegie Mellon University
- * All Rights Reserved.
- * 
- * Permission to use, copy, modify and distribute this software and its
- * documentation is hereby granted, provided that both the copyright
- * notice and this permission notice appear in all copies of the
- * software, derivative works or modified versions, and any portions
- * thereof, and that both notices appear in supporting documentation.
- * 
- * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
- * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
- * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- * 
- * Carnegie Mellon requests users of this software to return to
- * 
- *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
- *  School of Computer Science
- *  Carnegie Mellon University
- *  Pittsburgh PA 15213-3890
- * 
- * any improvements or extensions that they make and grant Carnegie Mellon 
- * the rights to redistribute these changes.
- */
-
-subsystem bootstrap 999999;
-
-#include <mach/std_types.defs>
-
-ServerPrefix do_;
-
-/*
- *	The old form of the bootstrap_privileged_ports RPC
- *	is not expressible in Mig syntax, because the reply
- *	message doesn't have a return code.
- */
-
-skip;	/* old bootstrap_privileged_ports */
-
-/*
- *	The startup task can make this call on its bootstrap port
- *	to get the privileged ports.
- */
-
-routine bootstrap_privileged_ports(
-		bootstrap		: mach_port_t;
-	out	priv_host		: mach_port_t;
-	out	priv_device		: mach_port_t);
-- 
2.39.2


^ permalink raw reply	[flat|nested] 140+ messages in thread

* [RFC PATCH gnumach 03/34] Make exception subcode a long
  2023-03-19 15:09 [RFC PATCH 00/34] The rest of the x86_64-gnu port Sergey Bugaev
  2023-03-19 15:09 ` [RFC PATCH gnumach 01/34] Add i386_fsgs_base_state Sergey Bugaev
  2023-03-19 15:09 ` [RFC PATCH gnumach 02/34] Remove bootstrap.defs Sergey Bugaev
@ 2023-03-19 15:09 ` Sergey Bugaev
  2023-04-02 22:45   ` Samuel Thibault
  2023-03-19 15:09 ` [RFC PATCH glibc 04/34] hurd: " Sergey Bugaev
                   ` (33 subsequent siblings)
  36 siblings, 1 reply; 140+ messages in thread
From: Sergey Bugaev @ 2023-03-19 15:09 UTC (permalink / raw)
  To: libc-alpha, bug-hurd; +Cc: Samuel Thibault, Sergey Bugaev

On EXC_BAD_ACCESS, exception subcode is used to pass the faulting memory
address, so it needs to be (at least) pointer-sized. Thus, make it into
a long.

This requires matching changes in glibc and the Hurd.
---

NOTE: Most of this was a pretty mechanical change, but I'm not very sure
I got the exc_subcode_proto right; please do check.

 doc/mach.texi         |  4 ++--
 i386/i386/trap.c      |  2 +-
 i386/i386/trap.h      |  2 +-
 include/mach/exc.defs |  2 +-
 kern/exception.c      | 40 ++++++++++++++++++++++++++++------------
 kern/exception.h      |  6 +++---
 kern/thread.h         |  2 +-
 7 files changed, 37 insertions(+), 21 deletions(-)

diff --git a/doc/mach.texi b/doc/mach.texi
index 2c22fa38..fdc36d45 100644
--- a/doc/mach.texi
+++ b/doc/mach.texi
@@ -4830,11 +4830,11 @@ argument set to @code{THREAD_EXCEPTION_PORT}.
 @node Exceptions
 @subsection Exceptions
 
-@deftypefun kern_return_t catch_exception_raise (@w{mach_port_t @var{exception_port}}, @w{thread_t @var{thread}}, @w{task_t @var{task}}, @w{int @var{exception}}, @w{int @var{code}}, @w{int @var{subcode}})
+@deftypefun kern_return_t catch_exception_raise (@w{mach_port_t @var{exception_port}}, @w{thread_t @var{thread}}, @w{task_t @var{task}}, @w{int @var{exception}}, @w{int @var{code}}, @w{long @var{subcode}})
 XXX Fixme
 @end deftypefun
 
-@deftypefun kern_return_t exception_raise (@w{mach_port_t @var{exception_port}}, @w{mach_port_t @var{thread}}, @w{mach_port_t @var{task}}, @w{integer_t @var{exception}}, @w{integer_t @var{code}}, @w{integer_t @var{subcode}})
+@deftypefun kern_return_t exception_raise (@w{mach_port_t @var{exception_port}}, @w{mach_port_t @var{thread}}, @w{mach_port_t @var{task}}, @w{integer_t @var{exception}}, @w{integer_t @var{code}}, @w{long_integer_t @var{subcode}})
 XXX Fixme
 @end deftypefun
 
diff --git a/i386/i386/trap.c b/i386/i386/trap.c
index 34ccb6a5..f7bd8e38 100644
--- a/i386/i386/trap.c
+++ b/i386/i386/trap.c
@@ -628,7 +628,7 @@ void
 i386_exception(
 	int	exc,
 	int	code,
-	int	subcode)
+	long	subcode)
 {
 	spl_t	s;
 
diff --git a/i386/i386/trap.h b/i386/i386/trap.h
index d9df7afa..e82164d0 100644
--- a/i386/i386/trap.h
+++ b/i386/i386/trap.h
@@ -40,7 +40,7 @@ void
 i386_exception(
 	int	exc,
 	int	code,
-	int	subcode) __attribute__ ((noreturn));
+	long	subcode) __attribute__ ((noreturn));
 
 extern void
 thread_kdb_return(void);
diff --git a/include/mach/exc.defs b/include/mach/exc.defs
index 94af828c..28638e2f 100644
--- a/include/mach/exc.defs
+++ b/include/mach/exc.defs
@@ -44,4 +44,4 @@ routine		exception_raise(
 			task		: mach_port_t;
 			exception	: integer_t;
 			code		: integer_t;
-			subcode		: integer_t);
+			subcode		: rpc_long_integer_t);
diff --git a/kern/exception.c b/kern/exception.c
index 1014b3ed..10435b5c 100644
--- a/kern/exception.c
+++ b/kern/exception.c
@@ -85,9 +85,9 @@ boolean_t debug_user_with_kdb = FALSE;
 
 void
 exception(
-	integer_t _exception, 
-	integer_t code, 
-	integer_t subcode)
+	integer_t _exception,
+	integer_t code,
+	long_integer_t subcode)
 {
 	ipc_thread_t self = current_thread();
 	ipc_port_t exc_port;
@@ -157,9 +157,9 @@ exception(
 
 void
 exception_try_task(
-	integer_t _exception, 
-	integer_t code, 
-	integer_t subcode)
+	integer_t _exception,
+	integer_t code,
+	long_integer_t subcode)
 {
 	ipc_thread_t self = current_thread();
 	task_t task = self->task;
@@ -277,11 +277,17 @@ struct mach_exception {
 	mach_msg_type_t		codeType;
 	integer_t		code;
 	mach_msg_type_t		subcodeType;
-	integer_t		subcode;
+	rpc_long_integer_t	subcode;
 };
 
 #define	INTEGER_T_SIZE_IN_BITS	(8 * sizeof(integer_t))
 #define	INTEGER_T_TYPE		MACH_MSG_TYPE_INTEGER_T
+#define RPC_LONG_INTEGER_T_SIZE_IN_BITS	(8 * sizeof(rpc_long_integer_t))
+#if defined(__x86_64__) && !defined(USER32)
+#define RPC_LONG_INTEGER_T_TYPE	MACH_MSG_TYPE_INTEGER_64
+#else
+#define RPC_LONG_INTEGER_T_TYPE	MACH_MSG_TYPE_INTEGER_32
+#endif
 					/* in mach/machine/vm_types.h */
 
 mach_msg_type_t exc_port_proto = {
@@ -304,6 +310,16 @@ mach_msg_type_t exc_code_proto = {
 	/* msgt_unused = */		0
 };
 
+mach_msg_type_t exc_subcode_proto = {
+	/* msgt_name = */		RPC_LONG_INTEGER_T_TYPE,
+	/* msgt_size = */		RPC_LONG_INTEGER_T_SIZE_IN_BITS,
+	/* msgt_number = */		1,
+	/* msgt_inline = */		TRUE,
+	/* msgt_longform = */		FALSE,
+	/* msgt_deallocate = */		FALSE,
+	/* msgt_unused = */		0
+};
+
 /*
  *	Routine:	exception_raise
  *	Purpose:
@@ -329,9 +345,9 @@ exception_raise(
 	ipc_port_t 	dest_port,
 	ipc_port_t 	thread_port,
 	ipc_port_t 	task_port,
-	integer_t 	_exception, 
-	integer_t 	code, 
-	integer_t 	subcode)
+	integer_t 	_exception,
+	integer_t 	code,
+	long_integer_t 	subcode)
 {
 	ipc_thread_t self = current_thread();
 	ipc_thread_t receiver;
@@ -521,7 +537,7 @@ exception_raise(
 	exc->exception = _exception;
 	exc->codeType = exc_code_proto;
 	exc->code = code;
-	exc->subcodeType = exc_code_proto;
+	exc->subcodeType = exc_subcode_proto;
 	exc->subcode = subcode;
 
 	/*
@@ -725,7 +741,7 @@ exception_raise(
 	exc->exception = _exception;
 	exc->codeType = exc_code_proto;
 	exc->code = code;
-	exc->subcodeType = exc_code_proto;
+	exc->subcodeType = exc_subcode_proto;
 	exc->subcode = subcode;
 
 	ipc_mqueue_send_always(kmsg);
diff --git a/kern/exception.h b/kern/exception.h
index 55902dd1..36138da8 100644
--- a/kern/exception.h
+++ b/kern/exception.h
@@ -26,13 +26,13 @@ extern void
 exception(
 	integer_t 	_exception,
 	integer_t	code,
-	integer_t	subcode) __attribute__ ((noreturn));
+	long_integer_t	subcode) __attribute__ ((noreturn));
 
 extern void
 exception_try_task(
 	integer_t 	_exception,
 	integer_t	code,
-	integer_t	subcode) __attribute__ ((noreturn));
+	long_integer_t	subcode) __attribute__ ((noreturn));
 
 extern void
 exception_no_server(void) __attribute__ ((noreturn));
@@ -44,7 +44,7 @@ exception_raise(
 	ipc_port_t task_port,
 	integer_t  _exception,
 	integer_t  code,
-	integer_t  subcode) __attribute__ ((noreturn));
+	long_integer_t  subcode) __attribute__ ((noreturn));
 
 extern kern_return_t
 exception_parse_reply(ipc_kmsg_t kmsg);
diff --git a/kern/thread.h b/kern/thread.h
index f8989f45..3485f6af 100644
--- a/kern/thread.h
+++ b/kern/thread.h
@@ -190,7 +190,7 @@ struct thread {
 			struct ipc_port *port;
 			int exc;
 			int code;
-			int subcode;
+			long subcode;
 		} exception;
 		void *other;		/* catch-all for other state */
 	} saved;
-- 
2.39.2


^ permalink raw reply	[flat|nested] 140+ messages in thread

* [RFC PATCH glibc 04/34] hurd: Make exception subcode a long
  2023-03-19 15:09 [RFC PATCH 00/34] The rest of the x86_64-gnu port Sergey Bugaev
                   ` (2 preceding siblings ...)
  2023-03-19 15:09 ` [RFC PATCH gnumach 03/34] Make exception subcode a long Sergey Bugaev
@ 2023-03-19 15:09 ` Sergey Bugaev
  2023-04-02 22:52   ` Samuel Thibault
  2023-03-19 15:09 ` [RFC PATCH glibc 05/34] hurd: Remove __hurd_threadvar_stack_{offset,mask} Sergey Bugaev
                   ` (32 subsequent siblings)
  36 siblings, 1 reply; 140+ messages in thread
From: Sergey Bugaev @ 2023-03-19 15:09 UTC (permalink / raw)
  To: libc-alpha, bug-hurd; +Cc: Samuel Thibault, Sergey Bugaev

On EXC_BAD_ACCESS, exception subcode is used to pass the faulting memory
address, so it needs to be (at least) pointer-sized. Thus, make it into
a long. This matches the corresponding change in GNU Mach.
---
 hurd/catch-exc.c   | 2 +-
 hurd/hurd/signal.h | 5 +++--
 hurd/hurdfault.c   | 2 +-
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/hurd/catch-exc.c b/hurd/catch-exc.c
index e8a9c798..5ee2233a 100644
--- a/hurd/catch-exc.c
+++ b/hurd/catch-exc.c
@@ -31,7 +31,7 @@ _S_catch_exception_raise (mach_port_t port,
 			  mach_msg_type_number_t codeCnt
 #else				/* Vanilla Mach 3.0 interface.  */
 			  integer_t exception,
-			  integer_t code, integer_t subcode
+			  integer_t code, long_integer_t subcode
 #endif
 			  )
 {
diff --git a/hurd/hurd/signal.h b/hurd/hurd/signal.h
index 4e9f79b1..c33f974b 100644
--- a/hurd/hurd/signal.h
+++ b/hurd/hurd/signal.h
@@ -51,9 +51,10 @@ struct hurd_signal_preemptor;	/* <hurd/sigpreempt.h> */
 struct hurd_signal_detail
   {
     /* Codes from origination Mach exception_raise message.  */
-    integer_t exc, exc_code, exc_subcode;
+    integer_t exc, exc_code;
+    long_integer_t exc_subcode;
     /* Sigcode as passed or computed from exception codes.  */
-    integer_t code;
+    long_integer_t code;
     /* Error code as passed or extracted from exception codes.  */
     error_t error;
   };
diff --git a/hurd/hurdfault.c b/hurd/hurdfault.c
index 069c1c26..a81e7280 100644
--- a/hurd/hurdfault.c
+++ b/hurd/hurdfault.c
@@ -45,7 +45,7 @@ _hurdsig_fault_catch_exception_raise (mach_port_t port,
 				      mach_msg_type_number_t codeCnt
 #else				/* Vanilla Mach 3.0 interface.  */
 				      integer_t exception,
-				      integer_t code, integer_t subcode
+				      integer_t code, long_integer_t subcode
 #endif
 				      )
 {
-- 
2.39.2


^ permalink raw reply	[flat|nested] 140+ messages in thread

* [RFC PATCH glibc 05/34] hurd: Remove __hurd_threadvar_stack_{offset,mask}
  2023-03-19 15:09 [RFC PATCH 00/34] The rest of the x86_64-gnu port Sergey Bugaev
                   ` (3 preceding siblings ...)
  2023-03-19 15:09 ` [RFC PATCH glibc 04/34] hurd: " Sergey Bugaev
@ 2023-03-19 15:09 ` Sergey Bugaev
  2023-04-02 22:53   ` Samuel Thibault
  2023-03-19 15:09 ` [RFC PATCH glibc 06/34] hurd: Swap around two function calls Sergey Bugaev
                   ` (31 subsequent siblings)
  36 siblings, 1 reply; 140+ messages in thread
From: Sergey Bugaev @ 2023-03-19 15:09 UTC (permalink / raw)
  To: libc-alpha, bug-hurd; +Cc: Samuel Thibault, Sergey Bugaev

Noone is or should be using __hurd_threadvar_stack_{offset,mask}, we
have proper TLS now. These two remaining variables are never set to
anything other than zero, so any code that would try to use them as
described would just dereference a zero pointer and crash. So remove
them entirely.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
---
 hurd/Versions                       |  5 -----
 hurd/hurd/threadvar.h               | 15 ---------------
 sysdeps/mach/hurd/Versions          |  3 ---
 sysdeps/mach/hurd/_Fork.c           | 20 ++------------------
 sysdeps/mach/hurd/i386/libc.abilist |  2 --
 sysdeps/mach/hurd/x86/init-first.c  |  3 ---
 6 files changed, 2 insertions(+), 46 deletions(-)

diff --git a/hurd/Versions b/hurd/Versions
index 7e4f1c56..3d8b412d 100644
--- a/hurd/Versions
+++ b/hurd/Versions
@@ -1,8 +1,5 @@
 libc {
   GLIBC_2.0 {
-    # variables used in macros & inline functions
-    __hurd_threadvar_stack_mask; __hurd_threadvar_stack_offset;
-
     # functions used in libmachuser and libhurduser
     _S_catch_exception_raise;
     _S_catch_exception_raise_state;
@@ -129,8 +126,6 @@ libc {
     _hurd_fd_error_signal; _hurd_fd_error;
     __hurd_dfail; __hurd_sockfail;
     _hurd_port_locked_set;
-    __hurd_threadvar_location_from_sp;
-    __hurd_threadvar_location;
     _hurd_userlink_link; _hurd_userlink_unlink; _hurd_userlink_clear;
   }
   GLIBC_2.29 {
diff --git a/hurd/hurd/threadvar.h b/hurd/hurd/threadvar.h
index 2a94f4de..f5c6a278 100644
--- a/hurd/hurd/threadvar.h
+++ b/hurd/hurd/threadvar.h
@@ -22,21 +22,6 @@
 #include <features.h>
 #include <tls.h>
 
-/* The per-thread variables are found by ANDing this mask
-   with the value of the stack pointer and then adding this offset.
-
-   In the multi-threaded case, cthreads initialization sets
-   __hurd_threadvar_stack_mask to ~(cthread_stack_size - 1), a mask which
-   finds the base of the fixed-size cthreads stack; and
-   __hurd_threadvar_stack_offset to a small offset that skips the data
-   cthreads itself maintains at the base of each thread's stack.
-
-   In the single-threaded or libpthread case, __hurd_threadvar_stack_mask is
-   zero, so the stack pointer is ignored. */
-
-extern unsigned long int __hurd_threadvar_stack_mask;
-extern unsigned long int __hurd_threadvar_stack_offset;
-
 /* The variables __hurd_sigthread_stack_base and
    __hurd_sigthread_stack_end define the bounds of the stack used by the
    signal thread, so that thread can always be specifically identified.  */
diff --git a/sysdeps/mach/hurd/Versions b/sysdeps/mach/hurd/Versions
index d75e674b..bf2e870a 100644
--- a/sysdeps/mach/hurd/Versions
+++ b/sysdeps/mach/hurd/Versions
@@ -33,9 +33,6 @@ libc {
 
 ld {
   GLIBC_2.0 {
-    # variables that must be shared with libc
-    __hurd_threadvar_stack_mask;  __hurd_threadvar_stack_offset;
-
     # functions that must be shared with libc
     __close; __getpid;
     __mmap; __open; __read; __sbrk; __strtoul_internal;
diff --git a/sysdeps/mach/hurd/_Fork.c b/sysdeps/mach/hurd/_Fork.c
index 4984cecd..77cd2917 100644
--- a/sysdeps/mach/hurd/_Fork.c
+++ b/sysdeps/mach/hurd/_Fork.c
@@ -482,25 +482,9 @@ retry:
 				    (natural_t *) &state, &statecount))
 	LOSE;
 #ifdef STACK_GROWTH_UP
-      if (__hurd_sigthread_stack_base == 0)
-	{
-	  state.SP &= __hurd_threadvar_stack_mask;
-	  state.SP += __hurd_threadvar_stack_offset;
-	}
-      else
-	state.SP = __hurd_sigthread_stack_base;
+      state.SP = __hurd_sigthread_stack_base;
 #else
-      if (__hurd_sigthread_stack_end == 0)
-	{
-	  /* The signal thread has a stack assigned by pthread.
-	     The threadvar_stack variables conveniently tell us how
-	     to get to the highest address in the stack, just below
-	     the per-thread variables.  */
-	  state.SP &= __hurd_threadvar_stack_mask;
-	  state.SP += __hurd_threadvar_stack_offset;
-	}
-      else
-	state.SP = __hurd_sigthread_stack_end;
+      state.SP = __hurd_sigthread_stack_end;
 #endif
       MACHINE_THREAD_STATE_SET_PC (&state,
 				   (unsigned long int) _hurd_msgport_receive);
diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist
index ed0c4789..da1cad67 100644
--- a/sysdeps/mach/hurd/i386/libc.abilist
+++ b/sysdeps/mach/hurd/i386/libc.abilist
@@ -279,8 +279,6 @@ GLIBC_2.2.6 __gettimeofday F
 GLIBC_2.2.6 __gmtime_r F
 GLIBC_2.2.6 __h_errno_location F
 GLIBC_2.2.6 __hurd_fail F
-GLIBC_2.2.6 __hurd_threadvar_stack_mask D 0x4
-GLIBC_2.2.6 __hurd_threadvar_stack_offset D 0x4
 GLIBC_2.2.6 __isalnum_l F
 GLIBC_2.2.6 __isalpha_l F
 GLIBC_2.2.6 __isascii_l F
diff --git a/sysdeps/mach/hurd/x86/init-first.c b/sysdeps/mach/hurd/x86/init-first.c
index 75a5c842..6ca27155 100644
--- a/sysdeps/mach/hurd/x86/init-first.c
+++ b/sysdeps/mach/hurd/x86/init-first.c
@@ -34,9 +34,6 @@
 extern void __mach_init (void);
 extern void __init_misc (int, char **, char **);
 
-unsigned long int __hurd_threadvar_stack_offset;
-unsigned long int __hurd_threadvar_stack_mask;
-
 extern int __libc_argc attribute_hidden;
 extern char **__libc_argv attribute_hidden;
 extern char **_dl_argv;
-- 
2.39.2


^ permalink raw reply	[flat|nested] 140+ messages in thread

* [RFC PATCH glibc 06/34] hurd: Swap around two function calls
  2023-03-19 15:09 [RFC PATCH 00/34] The rest of the x86_64-gnu port Sergey Bugaev
                   ` (4 preceding siblings ...)
  2023-03-19 15:09 ` [RFC PATCH glibc 05/34] hurd: Remove __hurd_threadvar_stack_{offset,mask} Sergey Bugaev
@ 2023-03-19 15:09 ` Sergey Bugaev
  2023-04-02 22:54   ` Samuel Thibault
  2023-03-19 15:09 ` [RFC PATCH glibc 07/34] hurd: Fix file name in #error Sergey Bugaev
                   ` (30 subsequent siblings)
  36 siblings, 1 reply; 140+ messages in thread
From: Sergey Bugaev @ 2023-03-19 15:09 UTC (permalink / raw)
  To: libc-alpha, bug-hurd; +Cc: Samuel Thibault, Sergey Bugaev

...to keep `sigexc' port initialization in one place, and match what the
comments say.

No functional change.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
---
 hurd/hurdfault.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/hurd/hurdfault.c b/hurd/hurdfault.c
index a81e7280..4340897d 100644
--- a/hurd/hurdfault.c
+++ b/hurd/hurdfault.c
@@ -174,14 +174,14 @@ _hurdsig_fault_init (void)
   err = __mach_port_allocate (__mach_task_self (),
 			      MACH_PORT_RIGHT_RECEIVE, &sigexc);
   assert_perror (err);
-  err = __mach_port_allocate (__mach_task_self (),
-			      MACH_PORT_RIGHT_RECEIVE, &forward_sigexc);
+  err = __mach_port_insert_right (__mach_task_self (), sigexc,
+				  sigexc, MACH_MSG_TYPE_MAKE_SEND);
   assert_perror (err);
 
   /* Allocate a port to receive the exception msgs forwarded
      from the proc server.  */
-  err = __mach_port_insert_right (__mach_task_self (), sigexc,
-				  sigexc, MACH_MSG_TYPE_MAKE_SEND);
+  err = __mach_port_allocate (__mach_task_self (),
+			      MACH_PORT_RIGHT_RECEIVE, &forward_sigexc);
   assert_perror (err);
 
   /* Set the queue limit for this port to just one.  The proc server will
-- 
2.39.2


^ permalink raw reply	[flat|nested] 140+ messages in thread

* [RFC PATCH glibc 07/34] hurd: Fix file name in #error
  2023-03-19 15:09 [RFC PATCH 00/34] The rest of the x86_64-gnu port Sergey Bugaev
                   ` (5 preceding siblings ...)
  2023-03-19 15:09 ` [RFC PATCH glibc 06/34] hurd: Swap around two function calls Sergey Bugaev
@ 2023-03-19 15:09 ` Sergey Bugaev
  2023-04-02 22:55   ` Samuel Thibault
  2023-03-19 15:09 ` [RFC PATCH glibc 08/34] hurd: Disable O_TRUNC and FS_RETRY_MAGICAL in rtld Sergey Bugaev
                   ` (29 subsequent siblings)
  36 siblings, 1 reply; 140+ messages in thread
From: Sergey Bugaev @ 2023-03-19 15:09 UTC (permalink / raw)
  To: libc-alpha, bug-hurd; +Cc: Samuel Thibault, Sergey Bugaev

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
---
 hurd/longjmp-ts.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hurd/longjmp-ts.c b/hurd/longjmp-ts.c
index bc4add32..0032d747 100644
--- a/hurd/longjmp-ts.c
+++ b/hurd/longjmp-ts.c
@@ -27,5 +27,5 @@ _hurd_longjmp_thread_state (void *state, jmp_buf env, int val)
   /* Set all the registers in *STATE to the values described by ENV and
      RETVAL.  After this, setting that thread's state to STATE should be
      just like calling `longjmp (ENV, RETVAL)'.  */
-  #error "Need to write sysdeps/mach/hurd/MACHINE/longjmp-ctx.c"
+  #error "Need to write sysdeps/mach/hurd/MACHINE/longjmp-ts.c"
 }
-- 
2.39.2


^ permalink raw reply	[flat|nested] 140+ messages in thread

* [RFC PATCH glibc 08/34] hurd: Disable O_TRUNC and FS_RETRY_MAGICAL in rtld
  2023-03-19 15:09 [RFC PATCH 00/34] The rest of the x86_64-gnu port Sergey Bugaev
                   ` (6 preceding siblings ...)
  2023-03-19 15:09 ` [RFC PATCH glibc 07/34] hurd: Fix file name in #error Sergey Bugaev
@ 2023-03-19 15:09 ` Sergey Bugaev
  2023-04-02 22:57   ` Samuel Thibault
  2023-03-19 15:09 ` [RFC PATCH glibc 09/34] hurd: Fix _hurd_setup_sighandler () signature Sergey Bugaev
                   ` (28 subsequent siblings)
  36 siblings, 1 reply; 140+ messages in thread
From: Sergey Bugaev @ 2023-03-19 15:09 UTC (permalink / raw)
  To: libc-alpha, bug-hurd; +Cc: Samuel Thibault, Sergey Bugaev

hurd/lookup-retry.c is compiled into rtld, the dynamic linker/loader. To
avoid pulling in file_set_size, file_utimens, tty/ctty stuff, more
string/memory code (memmove, strncpy, strcpy), and more strtoul/itoa
code, compile out support for O_TRUNC and FS_RETRY_MAGICAL when building
hurd/lookup-retry.c for rtld. None of that functionality is useful to
rtld during startup anyway. Keep support for FS_RETRY_MAGICAL("/"),
since that does not pull in much, and is required for following absolute
symlinks.

The large number of extra code being pulled into rtld was noticed by
reviewing librtld.map & elf/librtld.os.map in the build tree.

It is worth noting that once libc.so is loaded, the real __open, __stat,
etc. replace the minimal versions used initially by rtld -- this is
especially important in the Hurd port, where the minimal rtld versions
do not use the dtable and just pass real Mach port names as fds. Thus,
once libc.so is loaded, rtld will gain access to the full
__hurd_file_name_lookup_retry () version, complete with FS_RETRY_MAGICAL
support, which is important in case the program decides to
dlopen ("/proc/self/fd/...") or some such.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
---
 hurd/lookup-retry.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/hurd/lookup-retry.c b/hurd/lookup-retry.c
index 8850c4fd..99c98104 100644
--- a/hurd/lookup-retry.c
+++ b/hurd/lookup-retry.c
@@ -177,7 +177,7 @@ __hurd_file_name_lookup_retry (error_t (*use_init_port)
 
 	      /* We got a successful translation.  Now apply any open-time
 		 action flags we were passed.  */
-
+#if !IS_IN (rtld)
 	      if (!err && (flags & O_TRUNC))
 		{
 		  /* Asked to truncate the file.  */
@@ -189,6 +189,7 @@ __hurd_file_name_lookup_retry (error_t (*use_init_port)
 		      __file_utimens (*result, atime, mtime);
 		    }
 		}
+#endif
 
 	      if (err)
 		__mach_port_deallocate (__mach_task_self (), *result);
@@ -214,6 +215,7 @@ __hurd_file_name_lookup_retry (error_t (*use_init_port)
 	      file_name = &retryname[1];
 	      break;
 
+#if !IS_IN (rtld)
 	    case 'f':
 	      if (retryname[1] == 'd' && retryname[2] == '/')
 		{
@@ -358,8 +360,9 @@ __hurd_file_name_lookup_retry (error_t (*use_init_port)
 		goto bad_magic;
 	      break;
 
-	    default:
 	    bad_magic:
+#endif /* !IS_IN (rtld) */
+	    default:
 	      err = EGRATUITOUS;
 	      goto out;
 	    }
-- 
2.39.2


^ permalink raw reply	[flat|nested] 140+ messages in thread

* [RFC PATCH glibc 09/34] hurd: Fix _hurd_setup_sighandler () signature
  2023-03-19 15:09 [RFC PATCH 00/34] The rest of the x86_64-gnu port Sergey Bugaev
                   ` (7 preceding siblings ...)
  2023-03-19 15:09 ` [RFC PATCH glibc 08/34] hurd: Disable O_TRUNC and FS_RETRY_MAGICAL in rtld Sergey Bugaev
@ 2023-03-19 15:09 ` Sergey Bugaev
  2023-04-02 22:58   ` Samuel Thibault
  2023-03-19 15:09 ` [RFC PATCH glibc 10/34] stdio-common: Fix building when !IS_IN (libc) Sergey Bugaev
                   ` (27 subsequent siblings)
  36 siblings, 1 reply; 140+ messages in thread
From: Sergey Bugaev @ 2023-03-19 15:09 UTC (permalink / raw)
  To: libc-alpha, bug-hurd; +Cc: Samuel Thibault, Sergey Bugaev

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
---
 hurd/trampoline.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/hurd/trampoline.c b/hurd/trampoline.c
index a0639a20..5bd8dec9 100644
--- a/hurd/trampoline.c
+++ b/hurd/trampoline.c
@@ -26,11 +26,11 @@
    that structure.  */
 
 struct sigcontext *
-_hurd_setup_sighandler (int flags,
-			__sighandler_t handler,
-			stack_t *sigaltstack,
-			int signo, int sigcode,
-			void *state)
+_hurd_setup_sighandler (struct hurd_sigstate *ss, const struct sigaction *action,
+                        __sighandler_t handler,
+                        int signo, struct hurd_signal_detail *detail,
+                        volatile int rpc_wait,
+                        struct machine_thread_all_state *state)
 {
 #error "Need to write sysdeps/mach/hurd/MACHINE/trampoline.c"
 }
-- 
2.39.2


^ permalink raw reply	[flat|nested] 140+ messages in thread

* [RFC PATCH glibc 10/34] stdio-common: Fix building when !IS_IN (libc)
  2023-03-19 15:09 [RFC PATCH 00/34] The rest of the x86_64-gnu port Sergey Bugaev
                   ` (8 preceding siblings ...)
  2023-03-19 15:09 ` [RFC PATCH glibc 09/34] hurd: Fix _hurd_setup_sighandler () signature Sergey Bugaev
@ 2023-03-19 15:09 ` Sergey Bugaev
  2023-04-02 23:01   ` Samuel Thibault
  2023-03-19 15:09 ` [RFC PATCH glibc 11/34] mach, hurd: Drop __libc_lock_self0 Sergey Bugaev
                   ` (26 subsequent siblings)
  36 siblings, 1 reply; 140+ messages in thread
From: Sergey Bugaev @ 2023-03-19 15:09 UTC (permalink / raw)
  To: libc-alpha, bug-hurd; +Cc: Samuel Thibault, Sergey Bugaev

In this case, _itoa_word () is already defined inline in the header (see
sysdeps/generic/_itoa.h), and the second definition causes an error.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
---
 stdio-common/_itoa.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/stdio-common/_itoa.c b/stdio-common/_itoa.c
index 27285193..3037b0f5 100644
--- a/stdio-common/_itoa.c
+++ b/stdio-common/_itoa.c
@@ -157,6 +157,7 @@ const struct base_table_t _itoa_base_table[] attribute_hidden =
 };
 #endif
 
+#if IS_IN (libc)
 char *
 _itoa_word (_ITOA_WORD_TYPE value, char *buflim,
 	    unsigned int base, int upper_case)
@@ -185,6 +186,7 @@ _itoa_word (_ITOA_WORD_TYPE value, char *buflim,
   return buflim;
 }
 #undef SPECIAL
+#endif /* IS_IN (libc) */
 
 
 #if _ITOA_NEEDED
-- 
2.39.2


^ permalink raw reply	[flat|nested] 140+ messages in thread

* [RFC PATCH glibc 11/34] mach, hurd: Drop __libc_lock_self0
  2023-03-19 15:09 [RFC PATCH 00/34] The rest of the x86_64-gnu port Sergey Bugaev
                   ` (9 preceding siblings ...)
  2023-03-19 15:09 ` [RFC PATCH glibc 10/34] stdio-common: Fix building when !IS_IN (libc) Sergey Bugaev
@ 2023-03-19 15:09 ` Sergey Bugaev
  2023-04-02 23:02   ` Samuel Thibault
  2023-03-19 15:09 ` [RFC PATCH glibc 12/34] hurd: More 64-bit integer casting fixes Sergey Bugaev
                   ` (25 subsequent siblings)
  36 siblings, 1 reply; 140+ messages in thread
From: Sergey Bugaev @ 2023-03-19 15:09 UTC (permalink / raw)
  To: libc-alpha, bug-hurd; +Cc: Samuel Thibault, Sergey Bugaev

This was used for the value of libc-lock's owner when TLS is not yet set
up, so THREAD_SELF can not be used. Since the value need not be anything
specific -- it just has to be non-NULL -- we can just use a plain
constant, such as (void *) 1, for this. This avoids accessing the symbol
through GOT, and exporting it from libc.so in the first place.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
---
 sysdeps/mach/hurd/Versions   | 4 ++--
 sysdeps/mach/hurd/cthreads.c | 4 ----
 sysdeps/mach/libc-lock.h     | 3 +--
 3 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/sysdeps/mach/hurd/Versions b/sysdeps/mach/hurd/Versions
index bf2e870a..20ac0067 100644
--- a/sysdeps/mach/hurd/Versions
+++ b/sysdeps/mach/hurd/Versions
@@ -20,7 +20,7 @@ libc {
     __open_nocancel;
     __read_nocancel; __pread64_nocancel;
     __write_nocancel;
-    __libc_lock_self0; __getcwd;
+    __getcwd;
     __stat64;
 
     _dl_init_first;
@@ -61,7 +61,7 @@ ld {
     __open_nocancel;
     __read_nocancel; __pread64_nocancel;
     __write_nocancel;
-    __libc_lock_self0; __getcwd;
+    __getcwd;
     __stat64; __fstat64;
   }
 }
diff --git a/sysdeps/mach/hurd/cthreads.c b/sysdeps/mach/hurd/cthreads.c
index 9f17cfe4..87b6c06b 100644
--- a/sysdeps/mach/hurd/cthreads.c
+++ b/sysdeps/mach/hurd/cthreads.c
@@ -20,10 +20,6 @@
 #include <stdlib.h>
 #include <pthreadP.h>
 
-/* This serves as stub "self" pointer for libc locks when TLS is not initialized
-   yet.  */
-char __libc_lock_self0[0];
-
 /* Placeholder for key creation routine from Hurd cthreads library.  */
 int
 weak_function
diff --git a/sysdeps/mach/libc-lock.h b/sysdeps/mach/libc-lock.h
index 14248a05..c5c2553c 100644
--- a/sysdeps/mach/libc-lock.h
+++ b/sysdeps/mach/libc-lock.h
@@ -34,9 +34,8 @@ typedef struct
 
 typedef __libc_lock_recursive_t __rtld_lock_recursive_t;
 
-extern char __libc_lock_self0[0];
 #define __libc_lock_owner_self()   \
-  (__LIBC_NO_TLS () ? (void *)&__libc_lock_self0 : THREAD_SELF)
+  (__LIBC_NO_TLS () ? (void *) 1 : THREAD_SELF)
 
 #else
 typedef struct __libc_lock_opaque__ __libc_lock_t;
-- 
2.39.2


^ permalink raw reply	[flat|nested] 140+ messages in thread

* [RFC PATCH glibc 12/34] hurd: More 64-bit integer casting fixes
  2023-03-19 15:09 [RFC PATCH 00/34] The rest of the x86_64-gnu port Sergey Bugaev
                   ` (10 preceding siblings ...)
  2023-03-19 15:09 ` [RFC PATCH glibc 11/34] mach, hurd: Drop __libc_lock_self0 Sergey Bugaev
@ 2023-03-19 15:09 ` Sergey Bugaev
  2023-04-02 23:03   ` Samuel Thibault
  2023-03-19 15:09 ` [RFC PATCH glibc 13/34] x86-64: Disable prefer_map_32bit_exec tunable on non-Linux Sergey Bugaev
                   ` (24 subsequent siblings)
  36 siblings, 1 reply; 140+ messages in thread
From: Sergey Bugaev @ 2023-03-19 15:09 UTC (permalink / raw)
  To: libc-alpha, bug-hurd; +Cc: Samuel Thibault, Sergey Bugaev

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
---
 sysdeps/mach/hurd/ioctl.c          | 4 ++--
 sysdeps/mach/hurd/x86/init-first.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/sysdeps/mach/hurd/ioctl.c b/sysdeps/mach/hurd/ioctl.c
index 0f5de5d3..ab913a59 100644
--- a/sysdeps/mach/hurd/ioctl.c
+++ b/sysdeps/mach/hurd/ioctl.c
@@ -149,10 +149,10 @@ __ioctl (int fd, unsigned long int request, ...)
 	     Rather than pointing to the value, ARG is the value itself.  */
 #ifdef MACH_MSG_TYPE_BIT
 	  *t++ = io2mach_type (1, _IOTS (integer_t));
-	  *(integer_t *) t = (integer_t) arg;
+	  *(integer_t *) t = (integer_t) (intptr_t) arg;
 	  t = (void *) t + sizeof (integer_t);
 #else
-	  *(integer_t *) p = (integer_t) arg;
+	  *(integer_t *) p = (integer_t) (intptr_t) arg;
 	  p = (void *) p + sizeof (integer_t);
 #endif
 	}
diff --git a/sysdeps/mach/hurd/x86/init-first.c b/sysdeps/mach/hurd/x86/init-first.c
index 6ca27155..48c330ec 100644
--- a/sysdeps/mach/hurd/x86/init-first.c
+++ b/sysdeps/mach/hurd/x86/init-first.c
@@ -1,4 +1,4 @@
-/* Initialization code run first thing by the ELF startup code.  For i386/Hurd.
+/* Initialization code run first thing by the ELF startup code.  For x86/Hurd.
    Copyright (C) 1995-2023 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -92,7 +92,7 @@ posixland_init (int argc, char **argv, char **envp)
 static void
 init (void **data)
 {
-  int argc = (int) *data;
+  int argc = (int) (uintptr_t) *data;
   char **argv = (void *) (data + 1);
   char **envp = &argv[argc + 1];
   struct hurd_startup_data *d;
-- 
2.39.2


^ permalink raw reply	[flat|nested] 140+ messages in thread

* [RFC PATCH glibc 13/34] x86-64: Disable prefer_map_32bit_exec tunable on non-Linux
  2023-03-19 15:09 [RFC PATCH 00/34] The rest of the x86_64-gnu port Sergey Bugaev
                   ` (11 preceding siblings ...)
  2023-03-19 15:09 ` [RFC PATCH glibc 12/34] hurd: More 64-bit integer casting fixes Sergey Bugaev
@ 2023-03-19 15:09 ` Sergey Bugaev
  2023-04-02 23:09   ` Samuel Thibault
  2023-03-19 15:09 ` [RFC PATCH glibc 14/34] hurd: Move rtld-strncpy-c.c out of mach/hurd/ Sergey Bugaev
                   ` (23 subsequent siblings)
  36 siblings, 1 reply; 140+ messages in thread
From: Sergey Bugaev @ 2023-03-19 15:09 UTC (permalink / raw)
  To: libc-alpha, bug-hurd; +Cc: Samuel Thibault, Sergey Bugaev

While we could/should implement MAP_32BIT for the Hurd port by setting
all the high bits of mask in a vm_map () call, neither MAP_32BIT nor
glibc.cpu.prefer_map_32bit_exec exist on the Hurd as of now. Compile
this code out to fix build failures.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
---
 sysdeps/x86/cpu-features.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sysdeps/x86/cpu-features.c b/sysdeps/x86/cpu-features.c
index 822688e2..78631d7a 100644
--- a/sysdeps/x86/cpu-features.c
+++ b/sysdeps/x86/cpu-features.c
@@ -27,7 +27,7 @@
 extern void TUNABLE_CALLBACK (set_hwcaps) (tunable_val_t *)
   attribute_hidden;
 
-# ifdef __LP64__
+# if defined (__LP64__) && defined (__linux__)
 static void
 TUNABLE_CALLBACK (set_prefer_map_32bit_exec) (tunable_val_t *valp)
 {
@@ -715,7 +715,7 @@ no_cpuid:
 #if HAVE_TUNABLES
   TUNABLE_GET (hwcaps, tunable_val_t *, TUNABLE_CALLBACK (set_hwcaps));
 
-# ifdef __LP64__
+# if defined (__LP64__) && defined (__linux__)
   TUNABLE_GET (prefer_map_32bit_exec, tunable_val_t *,
 	       TUNABLE_CALLBACK (set_prefer_map_32bit_exec));
 # endif
-- 
2.39.2


^ permalink raw reply	[flat|nested] 140+ messages in thread

* [RFC PATCH glibc 14/34] hurd: Move rtld-strncpy-c.c out of mach/hurd/
  2023-03-19 15:09 [RFC PATCH 00/34] The rest of the x86_64-gnu port Sergey Bugaev
                   ` (12 preceding siblings ...)
  2023-03-19 15:09 ` [RFC PATCH glibc 13/34] x86-64: Disable prefer_map_32bit_exec tunable on non-Linux Sergey Bugaev
@ 2023-03-19 15:09 ` Sergey Bugaev
  2023-04-02 23:10   ` Samuel Thibault
  2023-03-19 15:09 ` [RFC PATCH glibc 15/34] hurd: Use uintptr_t for register values in trampoline.c Sergey Bugaev
                   ` (22 subsequent siblings)
  36 siblings, 1 reply; 140+ messages in thread
From: Sergey Bugaev @ 2023-03-19 15:09 UTC (permalink / raw)
  To: libc-alpha, bug-hurd; +Cc: Samuel Thibault, Sergey Bugaev

There's nothing Mach- or Hurd-specific about it; any port that ends
up with rtld pulling in strncpy will need this.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
---
 sysdeps/{mach/hurd => }/i386/i686/multiarch/rtld-strncpy-c.c | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 rename sysdeps/{mach/hurd => }/i386/i686/multiarch/rtld-strncpy-c.c (100%)

diff --git a/sysdeps/mach/hurd/i386/i686/multiarch/rtld-strncpy-c.c b/sysdeps/i386/i686/multiarch/rtld-strncpy-c.c
similarity index 100%
rename from sysdeps/mach/hurd/i386/i686/multiarch/rtld-strncpy-c.c
rename to sysdeps/i386/i686/multiarch/rtld-strncpy-c.c
-- 
2.39.2


^ permalink raw reply	[flat|nested] 140+ messages in thread

* [RFC PATCH glibc 15/34] hurd: Use uintptr_t for register values in trampoline.c
  2023-03-19 15:09 [RFC PATCH 00/34] The rest of the x86_64-gnu port Sergey Bugaev
                   ` (13 preceding siblings ...)
  2023-03-19 15:09 ` [RFC PATCH glibc 14/34] hurd: Move rtld-strncpy-c.c out of mach/hurd/ Sergey Bugaev
@ 2023-03-19 15:09 ` Sergey Bugaev
  2023-04-02 23:13   ` Samuel Thibault
  2023-03-19 15:09 ` [RFC PATCH glibc 16/34] hurd: Add sys/ucontext.h and sigcontext.h for x86_64 Sergey Bugaev
                   ` (21 subsequent siblings)
  36 siblings, 1 reply; 140+ messages in thread
From: Sergey Bugaev @ 2023-03-19 15:09 UTC (permalink / raw)
  To: libc-alpha, bug-hurd; +Cc: Samuel Thibault, Sergey Bugaev

This is more correct, if only because these fields are defined as having
the type unsigned int in the Mach headers, so casting them to a signed
int and then back is suboptimal.

Also, remove an extra reassignment of uesp -- this is another remnant of
the ecx kludge.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
---
 sysdeps/mach/hurd/i386/trampoline.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/sysdeps/mach/hurd/i386/trampoline.c b/sysdeps/mach/hurd/i386/trampoline.c
index 8f481e79..ab67fb9c 100644
--- a/sysdeps/mach/hurd/i386/trampoline.c
+++ b/sysdeps/mach/hurd/i386/trampoline.c
@@ -270,24 +270,23 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, const struct sigaction *action
 
       _hurdsig_end_catch_fault ();
 
-      state->basic.eip = (int) rpc_wait_trampoline;
+      state->basic.eip = (uintptr_t) rpc_wait_trampoline;
       /* The reply-receiving trampoline code runs initially on the original
 	 user stack.  We pass it the signal stack pointer in %ebx.  */
-      state->basic.uesp = state->basic.esp; /* Restore mach_msg syscall SP.  */
-      state->basic.ebx = (int) sigsp;
+      state->basic.ebx = (uintptr_t) sigsp;
       /* After doing the message receive, the trampoline code will need to
 	 update the %eax value to be restored by sigreturn.  To simplify
 	 the assembly code, we pass the address of its slot in SCP to the
 	 trampoline code in %ecx.  */
-      state->basic.ecx = (int) &scp->sc_eax;
+      state->basic.ecx = (uintptr_t) &scp->sc_eax;
     }
   else
     {
-      state->basic.eip = (int) trampoline;
-      state->basic.uesp = (int) sigsp;
+      state->basic.eip = (uintptr_t) trampoline;
+      state->basic.uesp = (uintptr_t) sigsp;
     }
   /* We pass the handler function to the trampoline code in %edx.  */
-  state->basic.edx = (int) handler;
+  state->basic.edx = (uintptr_t) handler;
 
   /* The x86 ABI says the DF bit is clear on entry to any function.  */
   state->basic.efl &= ~EFL_DF;
-- 
2.39.2


^ permalink raw reply	[flat|nested] 140+ messages in thread

* [RFC PATCH glibc 16/34] hurd: Add sys/ucontext.h and sigcontext.h for x86_64
  2023-03-19 15:09 [RFC PATCH 00/34] The rest of the x86_64-gnu port Sergey Bugaev
                   ` (14 preceding siblings ...)
  2023-03-19 15:09 ` [RFC PATCH glibc 15/34] hurd: Use uintptr_t for register values in trampoline.c Sergey Bugaev
@ 2023-03-19 15:09 ` Sergey Bugaev
  2023-04-10 18:39   ` Samuel Thibault
  2023-04-10 18:58   ` Samuel Thibault
  2023-03-19 15:10 ` [RFC PATCH glibc 17/34] hurd: Implement x86_64/intr-msg.h Sergey Bugaev
                   ` (20 subsequent siblings)
  36 siblings, 2 replies; 140+ messages in thread
From: Sergey Bugaev @ 2023-03-19 15:09 UTC (permalink / raw)
  To: libc-alpha, bug-hurd; +Cc: Samuel Thibault, Sergey Bugaev

This is based on the Linux port's version, but laid out to match Mach's
struct i386_thread_state, much like the i386 version does.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
---

I'm not very sure about the FP stuff, nor about any of this, really. Please
do review.

 sysdeps/mach/hurd/x86_64/bits/sigcontext.h | 131 +++++++++++++++++
 sysdeps/mach/hurd/x86_64/sys/ucontext.h    | 157 +++++++++++++++++++++
 sysdeps/mach/hurd/x86_64/ucontext_i.sym    |  38 +++++
 3 files changed, 326 insertions(+)
 create mode 100644 sysdeps/mach/hurd/x86_64/bits/sigcontext.h
 create mode 100644 sysdeps/mach/hurd/x86_64/sys/ucontext.h
 create mode 100644 sysdeps/mach/hurd/x86_64/ucontext_i.sym

diff --git a/sysdeps/mach/hurd/x86_64/bits/sigcontext.h b/sysdeps/mach/hurd/x86_64/bits/sigcontext.h
new file mode 100644
index 00000000..3a3b34bc
--- /dev/null
+++ b/sysdeps/mach/hurd/x86_64/bits/sigcontext.h
@@ -0,0 +1,131 @@
+/* Machine-dependent signal context structure for GNU Hurd.  x86_64 version.
+   Copyright (C) 1991-2023 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
+   <https://www.gnu.org/licenses/>.  */
+
+#ifndef _BITS_SIGCONTEXT_H
+#define _BITS_SIGCONTEXT_H 1
+
+#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H
+# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
+#endif
+
+/* Signal handlers are actually called:
+   void handler (int sig, int code, struct sigcontext *scp);  */
+
+#include <bits/types/__sigset_t.h>
+#include <mach/machine/fp_reg.h>
+
+/* State of this thread when the signal was taken.  */
+struct sigcontext
+  {
+    /* These first members are machine-independent.  */
+
+    int sc_onstack;		/* Nonzero if running on sigstack.  */
+    __sigset_t sc_mask;		/* Blocked signals to restore.  */
+
+    /* MiG reply port this thread is using.  */
+    unsigned int sc_reply_port;
+
+    /* Port this thread is doing an interruptible RPC on.  */
+    unsigned int sc_intr_port;
+
+    /* Error code associated with this signal (interpreted as `error_t').  */
+    int sc_error;
+
+    /* All following members are machine-dependent.  The rest of this
+       structure is written to be laid out identically to:
+       {
+	 struct i386_thread_state basic;
+	 struct i386_float_state fpu;
+       }
+       trampoline.c knows this, so it must be changed if this changes.  */
+
+#define sc_i386_thread_state sc_gs /* Beginning of correspondence.  */
+    /* Segment registers.  */
+    int sc_gs;
+    int sc_fs;
+    int sc_es;
+    int sc_ds;
+
+    long sc_r8;
+    long sc_r9;
+    long sc_r10;
+    long sc_r11;
+    long sc_r12;
+    long sc_r13;
+    long sc_r14;
+    long sc_r15;
+    long sc_rdi;
+    long sc_rsi;
+    long sc_rbp;
+    long sc_rsp;		/* Not used; sc_ursp is used instead.  */
+    long sc_rbx;
+    long sc_rdx;
+    long sc_rcx;
+    long sc_rax;
+    long sc_rip;		/* Instruction pointer.  */
+
+    int sc_cs;			/* Code segment register.  */
+
+    long sc_rfl;		/* Processor flags.  */
+
+    long sc_ursp;		/* This stack pointer is used.  */
+    int sc_ss;			/* Stack segment register.  */
+
+    /* Following mimics struct i386_float_state.  Structures and symbolic
+       values can be found in <mach/i386/fp_reg.h>.  */
+#define sc_i386_float_state sc_fpkind
+    int sc_fpkind;		/* FP_NO, FP_387, etc.  */
+    int sc_fpused;		/* If zero, ignore rest of float state.  */
+    struct i386_fp_save sc_fpsave;
+    struct i386_fp_regs sc_fpregs;
+    int sc_fpexcsr;		/* FPSR including exception bits.  */
+  };
+
+/* Traditional BSD names for some members.  */
+#define sc_sp	sc_ursp		/* Stack pointer.  */
+#define sc_fp	sc_rbp		/* Frame pointer.  */
+#define sc_pc	sc_rip		/* Process counter.  */
+#define sc_ps	sc_rfl
+
+
+/* The deprecated sigcode values below are passed as an extra, non-portable
+   argument to regular signal handlers.  You should use SA_SIGINFO handlers
+   instead, which use the standard POSIX signal codes.  */
+
+/* Codes for SIGFPE.  */
+#define FPE_INTOVF_TRAP		0x1 /* integer overflow */
+#define FPE_INTDIV_FAULT	0x2 /* integer divide by zero */
+#define FPE_FLTOVF_FAULT	0x3 /* floating overflow */
+#define FPE_FLTDIV_FAULT	0x4 /* floating divide by zero */
+#define FPE_FLTUND_FAULT	0x5 /* floating underflow */
+#define FPE_SUBRNG_FAULT	0x7 /* BOUNDS instruction failed */
+#define FPE_FLTDNR_FAULT	0x8 /* denormalized operand */
+#define FPE_FLTINX_FAULT	0x9 /* floating loss of precision */
+#define FPE_EMERR_FAULT		0xa /* mysterious emulation error 33 */
+#define FPE_EMBND_FAULT		0xb /* emulation BOUNDS instruction failed */
+
+/* Codes for SIGILL.  */
+#define ILL_INVOPR_FAULT	0x1 /* invalid operation */
+#define ILL_STACK_FAULT		0x2 /* fault on microkernel stack access */
+#define ILL_FPEOPR_FAULT	0x3 /* invalid floating operation */
+
+/* Codes for SIGTRAP.  */
+#define DBG_SINGLE_TRAP		0x1 /* single step */
+#define DBG_BRKPNT_FAULT	0x2 /* breakpoint instruction */
+
+#endif /* bits/sigcontext.h */
diff --git a/sysdeps/mach/hurd/x86_64/sys/ucontext.h b/sysdeps/mach/hurd/x86_64/sys/ucontext.h
new file mode 100644
index 00000000..d73a8937
--- /dev/null
+++ b/sysdeps/mach/hurd/x86_64/sys/ucontext.h
@@ -0,0 +1,157 @@
+/* Copyright (C) 2001-2023 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
+   <https://www.gnu.org/licenses/>.  */
+
+#ifndef _SYS_UCONTEXT_H
+#define _SYS_UCONTEXT_H	1
+
+#include <features.h>
+
+#include <bits/types.h>
+#include <bits/types/sigset_t.h>
+#include <bits/types/stack_t.h>
+
+
+#ifdef __USE_MISC
+# define __ctx(fld) fld
+#else
+# define __ctx(fld) __ ## fld
+#endif
+
+/* Type for general register.  */
+__extension__ typedef long long int greg_t;
+
+/* Number of general registers.  */
+#define __NGREG	23
+#ifdef __USE_MISC
+# define NGREG	__NGREG
+#endif
+
+/* Container for all general registers.  */
+typedef greg_t gregset_t[__NGREG];
+
+#ifdef __USE_GNU
+/* Number of each register in the `gregset_t' array.  */
+enum
+{
+  REG_GSFS = 0,		/* Actually int gs, fs.  */
+# define REG_GSFS	REG_GSFS
+  REG_ESDS,		/* Actually int es, ds.  */
+# define REG_ESDS	REG_ESDS
+  REG_R8,
+# define REG_R8		REG_R8
+  REG_R9,
+# define REG_R9		REG_R9
+  REG_R10,
+# define REG_R10	REG_R10
+  REG_R11,
+# define REG_R11	REG_R11
+  REG_R12,
+# define REG_R12	REG_R12
+  REG_R13,
+# define REG_R13	REG_R13
+  REG_R14,
+# define REG_R14	REG_R14
+  REG_R15,
+# define REG_R15	REG_R15
+  REG_RDI,
+# define REG_RDI	REG_RDI
+  REG_RSI,
+# define REG_RSI	REG_RSI
+  REG_RBP,
+# define REG_RBP	REG_RBP
+  REG_RSP,
+# define REG_RSP	REG_RSP
+  REG_RBX,
+# define REG_RBX	REG_RBX
+  REG_RDX,
+# define REG_RDX	REG_RDX
+  REG_RCX,
+# define REG_RCX	REG_RCX
+  REG_RAX,
+# define REG_RAX	REG_RAX
+  REG_RIP,
+# define REG_RIP	REG_RIP
+  REG_CS,		/* Actually int cs, pad.  */
+# define REG_CS		REG_CS
+  REG_RFL,
+# define REG_RFL	REG_RFL
+  REG_ERR,
+# define REG_ERR	REG_ERR
+  REG_TRAPNO,
+# define REG_TRAPNO	REG_TRAPNO
+  REG_OLDMASK,
+# define REG_OLDMASK	REG_OLDMASK
+  REG_CR2
+# define REG_CR2	REG_CR2
+};
+#endif
+
+struct _libc_fpxreg
+{
+  unsigned short int __ctx(significand)[4];
+  unsigned short int __ctx(exponent);
+  unsigned short int __glibc_reserved1[3];
+};
+
+struct _libc_xmmreg
+{
+  __uint32_t	__ctx(element)[4];
+};
+
+struct _libc_fpstate
+{
+  /* 64-bit FXSAVE format.  */
+  __uint16_t		__ctx(cwd);
+  __uint16_t		__ctx(swd);
+  __uint16_t		__ctx(ftw);
+  __uint16_t		__ctx(fop);
+  __uint64_t		__ctx(rip);
+  __uint64_t		__ctx(rdp);
+  __uint32_t		__ctx(mxcsr);
+  __uint32_t		__ctx(mxcr_mask);
+  struct _libc_fpxreg	_st[8];
+  struct _libc_xmmreg	_xmm[16];
+  __uint32_t		__glibc_reserved1[24];
+};
+
+/* Structure to describe FPU registers.  */
+typedef struct _libc_fpstate *fpregset_t;
+
+/* Context to describe whole processor state.  */
+typedef struct
+  {
+    gregset_t __ctx(gregs);
+    /* Note that fpregs is a pointer.  */
+    fpregset_t __ctx(fpregs);
+    __extension__ unsigned long long __reserved1 [8];
+} mcontext_t;
+
+/* Userlevel context.  */
+typedef struct ucontext_t
+  {
+    unsigned long int __ctx(uc_flags);
+    struct ucontext_t *uc_link;
+    stack_t uc_stack;
+    mcontext_t uc_mcontext;
+    sigset_t uc_sigmask;
+    struct _libc_fpstate __fpregs_mem;
+    __extension__ unsigned long long int __ssp[4];
+  } ucontext_t;
+
+#undef __ctx
+
+#endif /* sys/ucontext.h */
diff --git a/sysdeps/mach/hurd/x86_64/ucontext_i.sym b/sysdeps/mach/hurd/x86_64/ucontext_i.sym
new file mode 100644
index 00000000..7e536956
--- /dev/null
+++ b/sysdeps/mach/hurd/x86_64/ucontext_i.sym
@@ -0,0 +1,38 @@
+#include <stddef.h>
+#include <signal.h>
+#include <sys/ucontext.h>
+
+--
+
+SIG_BLOCK
+SIG_SETMASK
+
+_NSIG8		(_NSIG / 8)
+
+#define ucontext(member)	offsetof (ucontext_t, member)
+#define mcontext(member)	ucontext (uc_mcontext.member)
+#define mreg(reg)		mcontext (gregs[REG_##reg])
+
+oRBP		mreg (RBP)
+oRSP		mreg (RSP)
+oRBX		mreg (RBX)
+oR8		mreg (R8)
+oR9		mreg (R9)
+oR10		mreg (R10)
+oR11		mreg (R11)
+oR12		mreg (R12)
+oR13		mreg (R13)
+oR14		mreg (R14)
+oR15		mreg (R15)
+oRDI		mreg (RDI)
+oRSI		mreg (RSI)
+oRDX		mreg (RDX)
+oRAX		mreg (RAX)
+oRCX		mreg (RCX)
+oRIP		mreg (RIP)
+oRFL		mreg (RFL)
+oFPREGS		mcontext (fpregs)
+oSIGMASK	ucontext (uc_sigmask)
+oFPREGSMEM	ucontext (__fpregs_mem)
+oMXCSR		ucontext (__fpregs_mem.mxcsr)
+oSSP		ucontext (__ssp)
-- 
2.39.2


^ permalink raw reply	[flat|nested] 140+ messages in thread

* [RFC PATCH glibc 17/34] hurd: Implement x86_64/intr-msg.h
  2023-03-19 15:09 [RFC PATCH 00/34] The rest of the x86_64-gnu port Sergey Bugaev
                   ` (15 preceding siblings ...)
  2023-03-19 15:09 ` [RFC PATCH glibc 16/34] hurd: Add sys/ucontext.h and sigcontext.h for x86_64 Sergey Bugaev
@ 2023-03-19 15:10 ` Sergey Bugaev
  2023-04-10 18:41   ` Samuel Thibault
  2023-03-19 15:10 ` [RFC PATCH glibc 18/34] hurd: Port trampoline.c to x86_64 Sergey Bugaev
                   ` (19 subsequent siblings)
  36 siblings, 1 reply; 140+ messages in thread
From: Sergey Bugaev @ 2023-03-19 15:10 UTC (permalink / raw)
  To: libc-alpha, bug-hurd; +Cc: Samuel Thibault, Sergey Bugaev

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
---

This is a prelimenary version of intr-msg.h. I can't know whether or not
it works until we can test it. The code relies on syscall preserving values
of the registers used to pass syscall arguments. The code in SYSCALL_EXAMINE
that just compares two bytes to the encoded syscall instruction is sure to
give many false positives; we're going to need to come up with a more reliable
scheme.

 sysdeps/mach/hurd/x86_64/intr-msg.h | 119 ++++++++++++++++++++++++++++
 1 file changed, 119 insertions(+)
 create mode 100644 sysdeps/mach/hurd/x86_64/intr-msg.h

diff --git a/sysdeps/mach/hurd/x86_64/intr-msg.h b/sysdeps/mach/hurd/x86_64/intr-msg.h
new file mode 100644
index 00000000..5d94c85f
--- /dev/null
+++ b/sysdeps/mach/hurd/x86_64/intr-msg.h
@@ -0,0 +1,119 @@
+/* Machine-dependent details of interruptible RPC messaging.  x86_64 version.
+   Copyright (C) 1995-2023 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
+   <https://www.gnu.org/licenses/>.  */
+
+
+/* Note that we must mark OPTION and TIMEOUT as outputs of this operation,
+   to indicate that the signal thread might mutate them as part
+   of sending us to a signal handler.  */
+
+#define INTR_MSG_TRAP(msg, option, send_size, rcv_size, rcv_name, timeout, notify, cancel_p, intr_port_p) \
+({									      \
+  error_t err;								      \
+  register uintptr_t rcv_size_r10 asm ("r10") = rcv_size;		      \
+  register uintptr_t rcv_name_r8 asm ("r8") = rcv_name;			      \
+  register uintptr_t timeout_r9 asm ("r9") = timeout;			      \
+  asm volatile (							      \
+       ".globl _hurd_intr_rpc_msg_about_to\n"				      \
+       ".globl _hurd_intr_rpc_msg_setup_done\n"				      \
+       ".globl _hurd_intr_rpc_msg_in_trap\n"				      \
+       /* Clear rax before we do the check for cancel below.  This is to
+          detect rax being set to non-zero (actually MACH_SEND_INTERRUPTED)
+          from the outside (namely, _hurdsig_abort_rpcs), which signals us
+          to skip the trap we were about to enter.  */			      \
+       "				xor %[err], %[err]\n"		      \
+       "_hurd_intr_rpc_msg_about_to:"					      \
+       /* We need to make a last check of cancel, in case we got interrupted
+          right before _hurd_intr_rpc_msg_about_to.  */			      \
+       "				cmpl $0, %[cancel]\n"		      \
+       "				jz _hurd_intr_rpc_msg_do\n"	      \
+       /* We got interrupted, note so and return EINTR.  */		      \
+       "				movl $0, %[intr_port]\n"	      \
+       "				movl %[eintr], %[err]\n"	      \
+       "				jmp _hurd_intr_rpc_msg_sp_restored\n" \
+       "_hurd_intr_rpc_msg_do:"						      \
+       /* Ok, prepare the mach_msg_trap arguments.  We pass the first 6 args
+          in registers, and push the last one and a fake return address.  */  \
+       "				pushq %[notify]\n"		      \
+       "				pushq $0\n"			      \
+       "_hurd_intr_rpc_msg_setup_done:"					      \
+       /* From here on, it is safe to make us jump over the syscall.  Now
+          check if we have been told to skip the syscall while running
+          the above.  */						      \
+       "				test %[err], %[err]\n"		      \
+       "				jnz _hurd_intr_rpc_msg_in_trap\n"     \
+       /* Do the actual syscall.  */					      \
+       "				movq $-25, %%rax\n"		      \
+       "_hurd_intr_rpc_msg_do_trap:	syscall # status in %[err]\n"	      \
+       "_hurd_intr_rpc_msg_in_trap:"					      \
+       /* Clean the arguments.  */					      \
+       "				addq $16, %%rsp\n"		      \
+       "_hurd_intr_rpc_msg_sp_restored:"				      \
+       : [err] "=&a" (err), "+S" (option), [intr_port] "=m" (*intr_port_p),   \
+         "+r" (timeout_r9)						      \
+       : "D" (msg), "d" (send_size), "r" (rcv_size_r10), "r" (rcv_name_r8),   \
+         [notify] "rm" ((uintptr_t) notify), [cancel] "m" (*cancel_p),	      \
+         [eintr] "i" (EINTR)						      \
+       : "rcx", "r11");							      \
+  timeout = timeout_r9;							      \
+  err;									      \
+})
+\f
+#include "hurdfault.h"
+
+/* This cannot be an inline function because it calls setjmp.  */
+#define SYSCALL_EXAMINE(state, callno)					      \
+({									      \
+  struct { unsigned char c[2]; } *p = (void *) ((state)->rip - 2);	      \
+  int result;								      \
+  if (_hurdsig_catch_memory_fault (p))					      \
+    return 0;								      \
+  if (result = p->c[0] == 0xf && p->c[1] == 0x5)			      \
+    /* The PC appears to be just after a `syscall' instruction.		      \
+       This is a system call in progress; %rax holds the call number.  */     \
+    *(callno) = (state)->rax;						      \
+  _hurdsig_end_catch_fault ();						      \
+  result;								      \
+})
+
+
+/* This cannot be an inline function because it calls setjmp.  */
+#define MSG_EXAMINE(state, msgid, rcvname, send_name, opt, tmout)	      \
+({									      \
+  int ret = 0;								      \
+  const struct machine_thread_state *s = (state);			      \
+  const mach_msg_header_t *msg = (const void *) s->rdi;			      \
+  *(rcvname) = s->r8;							      \
+  *(opt) = s->rsi;							      \
+  *(tmout) = s->r9;							      \
+  if (msg == 0)								      \
+    {									      \
+      *(send_name) = MACH_PORT_NULL;					      \
+      *(msgid) = 0;							      \
+    }									      \
+  else									      \
+    {									      \
+      ret = _hurdsig_catch_memory_fault (msg) ? -1 : 0;			      \
+      if (ret == 0)							      \
+        {								      \
+          *(send_name) = msg->msgh_remote_port;				      \
+          *(msgid) = msg->msgh_id;					      \
+          _hurdsig_end_catch_fault ();					      \
+	}								      \
+    }									      \
+  ret;									      \
+})
-- 
2.39.2


^ permalink raw reply	[flat|nested] 140+ messages in thread

* [RFC PATCH glibc 18/34] hurd: Port trampoline.c to x86_64
  2023-03-19 15:09 [RFC PATCH 00/34] The rest of the x86_64-gnu port Sergey Bugaev
                   ` (16 preceding siblings ...)
  2023-03-19 15:10 ` [RFC PATCH glibc 17/34] hurd: Implement x86_64/intr-msg.h Sergey Bugaev
@ 2023-03-19 15:10 ` Sergey Bugaev
  2023-04-03 11:56   ` [PATCH v2 18.0/34] Alignment-respecting x86_64 trampoline.c Sergey Bugaev
  2023-03-19 15:10 ` [RFC PATCH glibc 19/34] hurd: Move a couple of singal-related files to x86 Sergey Bugaev
                   ` (18 subsequent siblings)
  36 siblings, 1 reply; 140+ messages in thread
From: Sergey Bugaev @ 2023-03-19 15:10 UTC (permalink / raw)
  To: libc-alpha, bug-hurd; +Cc: Samuel Thibault, Sergey Bugaev

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
---

Same as for intr-msg.h, can't know whether this works until we try it.

 sysdeps/mach/hurd/{i386 => x86}/trampoline.c | 139 ++++++++++++++++++-
 1 file changed, 132 insertions(+), 7 deletions(-)
 rename sysdeps/mach/hurd/{i386 => x86}/trampoline.c (71%)

diff --git a/sysdeps/mach/hurd/i386/trampoline.c b/sysdeps/mach/hurd/x86/trampoline.c
similarity index 71%
rename from sysdeps/mach/hurd/i386/trampoline.c
rename to sysdeps/mach/hurd/x86/trampoline.c
index ab67fb9c..894c9f2c 100644
--- a/sysdeps/mach/hurd/i386/trampoline.c
+++ b/sysdeps/mach/hurd/x86/trampoline.c
@@ -1,4 +1,4 @@
-/* Set thread_state for sighandler, and sigcontext to recover.  i386 version.
+/* Set thread_state for sighandler, and sigcontext to recover.  x86 version.
    Copyright (C) 1994-2023 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -46,7 +46,13 @@ static void fill_siginfo (siginfo_t *si, int signo,
   if (detail->exc == EXC_BAD_ACCESS)
     si->si_addr = (void *) detail->exc_subcode;
   else
-    si->si_addr = (void *) state->basic.eip;
+    {
+#ifdef __x86_64__
+      si->si_addr = (void *) state->basic.rip;
+#else
+      si->si_addr = (void *) state->basic.eip;
+#endif
+    }
 
   /* XXX On SIGCHLD, this should be the exit status of the child
    * process.  We would need a protocol change for the proc server
@@ -63,17 +69,26 @@ static void fill_ucontext (ucontext_t *uc, const struct sigcontext *sc)
   uc->uc_flags = 0;
   uc->uc_link = NULL;
   uc->uc_sigmask = sc->sc_mask;
+#ifdef __x86_64__
+  uc->uc_stack.ss_sp = (__ptr_t) sc->sc_ursp;
+#else
   uc->uc_stack.ss_sp = (__ptr_t) sc->sc_uesp;
+#endif
   uc->uc_stack.ss_size = 0;
   uc->uc_stack.ss_flags = 0;
 
   /* Registers.  */
+#ifdef __x86_64__
+  memcpy (&uc->uc_mcontext.gregs[REG_GSFS], &sc->sc_gs,
+          (REG_ERR - REG_GSFS) * sizeof (long));
+#else
   memcpy (&uc->uc_mcontext.gregs[REG_GS], &sc->sc_gs,
-	  (REG_TRAPNO - REG_GS) * sizeof (int));
-  uc->uc_mcontext.gregs[REG_TRAPNO] = 0;
-  uc->uc_mcontext.gregs[REG_ERR] = 0;
+          (REG_TRAPNO - REG_GS) * sizeof (int));
   memcpy (&uc->uc_mcontext.gregs[REG_EIP], &sc->sc_eip,
 	  (NGREG - REG_EIP) * sizeof (int));
+#endif
+  uc->uc_mcontext.gregs[REG_TRAPNO] = 0;
+  uc->uc_mcontext.gregs[REG_ERR] = 0;
 
   /* XXX FPU state.  */
   memset (&uc->uc_mcontext.fpregs, 0, sizeof (fpregset_t));
@@ -93,7 +108,14 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, const struct sigaction *action
   struct sigcontext *scp;
   struct
     {
-      int signo;
+      union
+        {
+          int signo;
+          /* Make sure signo takes up a pointer-sized slot on the stack.
+             (This should already be the case considering the siginfop
+             pointer below, but better be explicit.)  */
+          void *_pointer_sized;
+        };
       union
 	{
 	  /* Extra arguments for traditional signal handlers */
@@ -142,7 +164,11 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, const struct sigaction *action
   /* Save the original SP in the gratuitous `esp' slot.
      We may need to reset the SP (the `uesp' slot) to avoid clobbering an
      interrupted RPC frame.  */
+#ifdef __x86_64__
+  state->basic.rsp = state->basic.ursp;
+#else
   state->basic.esp = state->basic.uesp;
+#endif
 
   if ((action->sa_flags & SA_ONSTACK)
       && !(ss->sigaltstack.ss_flags & (SS_DISABLE|SS_ONSTACK)))
@@ -151,7 +177,15 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, const struct sigaction *action
       ss->sigaltstack.ss_flags |= SS_ONSTACK;
     }
   else
-    sigsp = (char *) state->basic.uesp;
+    {
+#ifdef __x86_64__
+      /* Per the ABI, we're not supposed to clobber 128 bytes below
+         SP -- the red zone.  */
+      sigsp = (char *) state->basic.ursp - 128;
+#else
+      sigsp = (char *) state->basic.uesp;
+#endif
+    }
 
   /* Push the arguments to call `trampoline' on the stack.  */
   sigsp -= sizeof (*stackframe);
@@ -238,6 +272,52 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, const struct sigaction *action
     }
 
   /* Modify the thread state to call the trampoline code on the new stack.  */
+#ifdef __x86_64__
+  if (rpc_wait)
+    {
+      /* The signalee thread was blocked in a mach_msg_trap system call,
+         still waiting for a reply.  We will have it run the special
+         trampoline code which retries the message receive before running
+         the signal handler.
+
+         To do this we change the OPTION argument (in rsi) to enable only
+         message reception, since the request message has already been
+         sent.  */
+
+      assert (state->basic.rsi & MACH_RCV_MSG);
+      /* Disable the message-send, since it has already completed.  The
+         calls we retry need only wait to receive the reply message.  */
+      state->basic.rsi &= ~MACH_SEND_MSG;
+
+      /* Limit the time to receive the reply message, in case the server
+         claimed that `interrupt_operation' succeeded but in fact the RPC
+         is hung.  */
+      state->basic.rsi |= MACH_RCV_TIMEOUT;
+      state->basic.r9 = _hurd_interrupted_rpc_timeout;
+
+      state->basic.rip = (uintptr_t) rpc_wait_trampoline;
+      /* The reply-receiving trampoline code runs initially on the original
+         user stack.  We pass it the signal stack pointer in %rbx.  */
+      state->basic.rbx = (uintptr_t) sigsp;
+      /* After doing the message receive, the trampoline code will need to
+         update the %rax value to be restored by sigreturn.  To simplify
+         the assembly code, we pass the address of its slot in SCP to the
+         trampoline code in %r12.  */
+      state->basic.r12 = (uintptr_t) &scp->sc_rax;
+    }
+  else
+    {
+      state->basic.rip = (uintptr_t) trampoline;
+      state->basic.ursp = (uintptr_t) sigsp;
+    }
+  /* We pass the handler function to the trampoline code in %r13.  */
+  state->basic.r13 = (uintptr_t) handler;
+
+  /* The x86 ABI says the DF bit is clear on entry to any function.  */
+  state->basic.rfl &= ~EFL_DF;
+
+#else
+
   if (rpc_wait)
     {
       /* The signalee thread was blocked in a mach_msg_trap system call,
@@ -290,6 +370,7 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, const struct sigaction *action
 
   /* The x86 ABI says the DF bit is clear on entry to any function.  */
   state->basic.efl &= ~EFL_DF;
+#endif
 
   return scp;
 }
@@ -301,6 +382,49 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, const struct sigaction *action
    - in gcc: libgcc/config/i386/gnu-unwind.h x86_gnu_fallback_frame_state,
    - in gdb: gdb/i386-gnu-tdep.c gnu_sigtramp_code.  */
 
+#ifdef __x86_64__
+asm ("rpc_wait_trampoline:\n"
+  /* This is the entry point when we have an RPC reply message to receive
+     before running the handler.  The MACH_MSG_SEND bit has already been
+     cleared in the OPTION argument on our stack.  The interrupted user
+     stack pointer has not been changed, so the system call can find its
+     arguments; the signal stack pointer is in %rbx.  For our convenience,
+     %r12 points to the sc_rax member of the sigcontext.  */
+     "movq $-25, %rax\n"	/* mach_msg_trap */
+     "syscall\n"
+     /* When the sigcontext was saved, %rax was MACH_RCV_INTERRUPTED.  But
+        now the message receive has completed and the original caller of
+        the RPC (i.e. the code running when the signal arrived) needs to
+        see the final return value of the message receive in %rax.  So
+        store the new %rax value into the sc_rax member of the sigcontext
+        (whose address is in %r12 to make this code simpler).  */
+     "movq %rax, (%r12)\n"
+     /* Switch to the signal stack.  */
+     "movq %rbx, %rsp\n"
+
+     "trampoline:\n"
+     /* Entry point for running the handler normally.  The arguments to the
+        handler function are on the top of the stack, same as in the i386
+        version:
+
+        0(%rsp)  SIGNO
+        8(%rsp)  SIGCODE
+        16(%rsp) SCP
+
+        Pop them off to the registers, to pass as arguments to the handler.
+     */
+     "popq %rdi\n"
+     "popq %rsi\n"
+     "popq %rdx\n"
+     "call *%r13\n"		/* Call the handler function.  */
+     /* The word at the top of stack is &__sigreturn; following are a dummy
+        word to fill the slot for the address for __sigreturn to return to,
+        and a copy of SCP for __sigreturn's argument.  Load the SCP as for a
+        call, and "return" to calling __sigreturn (SCP); this call never
+        returns.  */
+     "movq 16(%rsp), %rdi\n"
+     "ret");
+#else
 asm ("rpc_wait_trampoline:\n");
   /* This is the entry point when we have an RPC reply message to receive
      before running the handler.  The MACH_MSG_SEND bit has already been
@@ -336,6 +460,7 @@ asm ("call *%edx\n"		/* Call the handler function.  */
 	and a copy of SCP for __sigreturn's argument.  "Return" to calling
 	__sigreturn (SCP); this call never returns.  */
      "ret");
+#endif
 
 asm ("firewall:\n"
      "hlt");
-- 
2.39.2


^ permalink raw reply	[flat|nested] 140+ messages in thread

* [RFC PATCH glibc 19/34] hurd: Move a couple of singal-related files to x86
  2023-03-19 15:09 [RFC PATCH 00/34] The rest of the x86_64-gnu port Sergey Bugaev
                   ` (17 preceding siblings ...)
  2023-03-19 15:10 ` [RFC PATCH glibc 18/34] hurd: Port trampoline.c to x86_64 Sergey Bugaev
@ 2023-03-19 15:10 ` Sergey Bugaev
  2023-04-02 23:15   ` Samuel Thibault
  2023-03-19 15:10 ` [RFC PATCH glibc 20/34] htl: Add tcb-offsets.sym for x86_64 Sergey Bugaev
                   ` (17 subsequent siblings)
  36 siblings, 1 reply; 140+ messages in thread
From: Sergey Bugaev @ 2023-03-19 15:10 UTC (permalink / raw)
  To: libc-alpha, bug-hurd; +Cc: Samuel Thibault, Sergey Bugaev

These do not need any changes to be used on x86_64.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
---
 sysdeps/mach/hurd/{i386 => x86}/exc2signal.c       | 0
 sysdeps/mach/hurd/{i386 => x86}/signal-defines.sym | 0
 2 files changed, 0 insertions(+), 0 deletions(-)
 rename sysdeps/mach/hurd/{i386 => x86}/exc2signal.c (100%)
 rename sysdeps/mach/hurd/{i386 => x86}/signal-defines.sym (100%)

diff --git a/sysdeps/mach/hurd/i386/exc2signal.c b/sysdeps/mach/hurd/x86/exc2signal.c
similarity index 100%
rename from sysdeps/mach/hurd/i386/exc2signal.c
rename to sysdeps/mach/hurd/x86/exc2signal.c
diff --git a/sysdeps/mach/hurd/i386/signal-defines.sym b/sysdeps/mach/hurd/x86/signal-defines.sym
similarity index 100%
rename from sysdeps/mach/hurd/i386/signal-defines.sym
rename to sysdeps/mach/hurd/x86/signal-defines.sym
-- 
2.39.2


^ permalink raw reply	[flat|nested] 140+ messages in thread

* [RFC PATCH glibc 20/34] htl: Add tcb-offsets.sym for x86_64
  2023-03-19 15:09 [RFC PATCH 00/34] The rest of the x86_64-gnu port Sergey Bugaev
                   ` (18 preceding siblings ...)
  2023-03-19 15:10 ` [RFC PATCH glibc 19/34] hurd: Move a couple of singal-related files to x86 Sergey Bugaev
@ 2023-03-19 15:10 ` Sergey Bugaev
  2023-04-02 23:16   ` Samuel Thibault
  2023-03-19 15:10 ` [RFC PATCH glibc 21/34] x86_64: Add rtld-stpncpy & rtld-strncpy Sergey Bugaev
                   ` (16 subsequent siblings)
  36 siblings, 1 reply; 140+ messages in thread
From: Sergey Bugaev @ 2023-03-19 15:10 UTC (permalink / raw)
  To: libc-alpha, bug-hurd; +Cc: Samuel Thibault, Sergey Bugaev

The source code is the same as sysdeps/i386/htl/tcb-offsets.sym, but of
course the produced tcb-offsets.h will be different.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
---
 sysdeps/x86_64/htl/Makefile        | 20 ++++++++++++++++++++
 sysdeps/x86_64/htl/tcb-offsets.sym |  8 ++++++++
 2 files changed, 28 insertions(+)
 create mode 100644 sysdeps/x86_64/htl/Makefile
 create mode 100644 sysdeps/x86_64/htl/tcb-offsets.sym

diff --git a/sysdeps/x86_64/htl/Makefile b/sysdeps/x86_64/htl/Makefile
new file mode 100644
index 00000000..1ced1d12
--- /dev/null
+++ b/sysdeps/x86_64/htl/Makefile
@@ -0,0 +1,20 @@
+# Copyright (C) 2020-2023 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
+# <https://www.gnu.org/licenses/>.
+
+ifeq ($(subdir),csu)
+gen-as-const-headers += tcb-offsets.sym
+endif
diff --git a/sysdeps/x86_64/htl/tcb-offsets.sym b/sysdeps/x86_64/htl/tcb-offsets.sym
new file mode 100644
index 00000000..7b7c7193
--- /dev/null
+++ b/sysdeps/x86_64/htl/tcb-offsets.sym
@@ -0,0 +1,8 @@
+#include <sysdep.h>
+#include <tls.h>
+#include <kernel-features.h>
+
+MULTIPLE_THREADS_OFFSET offsetof (tcbhead_t, multiple_threads)
+SYSINFO_OFFSET          offsetof (tcbhead_t, sysinfo)
+POINTER_GUARD           offsetof (tcbhead_t, pointer_guard)
+SIGSTATE_OFFSET         offsetof (tcbhead_t, _hurd_sigstate)
-- 
2.39.2


^ permalink raw reply	[flat|nested] 140+ messages in thread

* [RFC PATCH glibc 21/34] x86_64: Add rtld-stpncpy & rtld-strncpy
  2023-03-19 15:09 [RFC PATCH 00/34] The rest of the x86_64-gnu port Sergey Bugaev
                   ` (19 preceding siblings ...)
  2023-03-19 15:10 ` [RFC PATCH glibc 20/34] htl: Add tcb-offsets.sym for x86_64 Sergey Bugaev
@ 2023-03-19 15:10 ` Sergey Bugaev
  2023-04-02 23:18   ` Samuel Thibault
  2023-03-19 15:10 ` [RFC PATCH glibc 22/34] htl: Implement thread_set_pcsptp for x86_64 Sergey Bugaev
                   ` (15 subsequent siblings)
  36 siblings, 1 reply; 140+ messages in thread
From: Sergey Bugaev @ 2023-03-19 15:10 UTC (permalink / raw)
  To: libc-alpha, bug-hurd; +Cc: Samuel Thibault, Sergey Bugaev

Just like the other existing rtld-str* files, this provides rtld with
usable versions of stpncpy and strncpy.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
---
 sysdeps/x86_64/multiarch/rtld-stpncpy.S | 18 ++++++++++++++++++
 sysdeps/x86_64/multiarch/rtld-strncpy.S | 18 ++++++++++++++++++
 2 files changed, 36 insertions(+)
 create mode 100644 sysdeps/x86_64/multiarch/rtld-stpncpy.S
 create mode 100644 sysdeps/x86_64/multiarch/rtld-strncpy.S

diff --git a/sysdeps/x86_64/multiarch/rtld-stpncpy.S b/sysdeps/x86_64/multiarch/rtld-stpncpy.S
new file mode 100644
index 00000000..1c6780a1
--- /dev/null
+++ b/sysdeps/x86_64/multiarch/rtld-stpncpy.S
@@ -0,0 +1,18 @@
+/* Copyright (C) 2022-2023 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
+   <https://www.gnu.org/licenses/>.  */
+
+#include "../stpncpy.S"
diff --git a/sysdeps/x86_64/multiarch/rtld-strncpy.S b/sysdeps/x86_64/multiarch/rtld-strncpy.S
new file mode 100644
index 00000000..500a1002
--- /dev/null
+++ b/sysdeps/x86_64/multiarch/rtld-strncpy.S
@@ -0,0 +1,18 @@
+/* Copyright (C) 2022-2023 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
+   <https://www.gnu.org/licenses/>.  */
+
+#include "../strncpy.S"
-- 
2.39.2


^ permalink raw reply	[flat|nested] 140+ messages in thread

* [RFC PATCH glibc 22/34] htl: Implement thread_set_pcsptp for x86_64
  2023-03-19 15:09 [RFC PATCH 00/34] The rest of the x86_64-gnu port Sergey Bugaev
                   ` (20 preceding siblings ...)
  2023-03-19 15:10 ` [RFC PATCH glibc 21/34] x86_64: Add rtld-stpncpy & rtld-strncpy Sergey Bugaev
@ 2023-03-19 15:10 ` Sergey Bugaev
  2023-04-02 23:19   ` Samuel Thibault
  2023-03-19 15:10 ` [RFC PATCH glibc 23/34] elf: Stop including tls.h in ldsodefs.h Sergey Bugaev
                   ` (14 subsequent siblings)
  36 siblings, 1 reply; 140+ messages in thread
From: Sergey Bugaev @ 2023-03-19 15:10 UTC (permalink / raw)
  To: libc-alpha, bug-hurd; +Cc: Samuel Thibault, Sergey Bugaev

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
---
 sysdeps/mach/hurd/x86_64/htl/pt-machdep.c | 73 +++++++++++++++++++++++
 1 file changed, 73 insertions(+)
 create mode 100644 sysdeps/mach/hurd/x86_64/htl/pt-machdep.c

diff --git a/sysdeps/mach/hurd/x86_64/htl/pt-machdep.c b/sysdeps/mach/hurd/x86_64/htl/pt-machdep.c
new file mode 100644
index 00000000..69094d3b
--- /dev/null
+++ b/sysdeps/mach/hurd/x86_64/htl/pt-machdep.c
@@ -0,0 +1,73 @@
+/* Machine dependent pthreads code.  Hurd/x86_64 version.
+   Copyright (C) 2000-2023 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
+   <https://www.gnu.org/licenses/>.  */
+
+#include <errno.h>
+#include <assert.h>
+
+#include <mach.h>
+#include <mach/machine/thread_status.h>
+#include <mach/machine/mach_i386.h>
+#include <mach/mig_errors.h>
+#include <mach/thread_status.h>
+
+int
+__thread_set_pcsptp (thread_t thread,
+                     int set_ip, void *ip,
+                     int set_sp, void *sp,
+                     int set_tp, void *tp)
+{
+  error_t err;
+  struct i386_thread_state state;
+  struct i386_fsgs_base_state fsgs_state;
+  mach_msg_type_number_t state_count;
+
+  state_count = i386_THREAD_STATE_COUNT;
+
+  err = __thread_get_state (thread, i386_REGS_SEGS_STATE,
+                            (thread_state_t) &state, &state_count);
+  if (err)
+    return err;
+  assert (state_count == i386_THREAD_STATE_COUNT);
+
+  if (set_sp)
+    state.ursp = (uintptr_t) sp;
+  if (set_ip)
+    state.rip = (uintptr_t) ip;
+
+  err = __thread_set_state (thread, i386_REGS_SEGS_STATE,
+                            (thread_state_t) &state, i386_THREAD_STATE_COUNT);
+  if (err)
+    return err;
+
+  if (set_tp)
+    {
+      state_count = i386_FSGS_BASE_STATE_COUNT;
+      err = __thread_get_state (thread, i386_FSGS_BASE_STATE,
+                                (thread_state_t) &fsgs_state, &state_count);
+      if (err)
+        return err;
+      assert (state_count == i386_FSGS_BASE_STATE_COUNT);
+      fsgs_state.fs_base = (uintptr_t) tp;
+      err = __thread_set_state (thread, i386_FSGS_BASE_STATE,
+                                (thread_state_t) &fsgs_state, state_count);
+      if (err)
+        return err;
+    }
+
+  return 0;
+}
-- 
2.39.2


^ permalink raw reply	[flat|nested] 140+ messages in thread

* [RFC PATCH glibc 23/34] elf: Stop including tls.h in ldsodefs.h
  2023-03-19 15:09 [RFC PATCH 00/34] The rest of the x86_64-gnu port Sergey Bugaev
                   ` (21 preceding siblings ...)
  2023-03-19 15:10 ` [RFC PATCH glibc 22/34] htl: Implement thread_set_pcsptp for x86_64 Sergey Bugaev
@ 2023-03-19 15:10 ` Sergey Bugaev
  2023-04-02 23:20   ` Samuel Thibault
  2023-04-10 21:26   ` Samuel Thibault
  2023-03-19 15:10 ` [RFC PATCH glibc 24/34] hurd: Only check for TLS initialization inside rtld or in static builds Sergey Bugaev
                   ` (13 subsequent siblings)
  36 siblings, 2 replies; 140+ messages in thread
From: Sergey Bugaev @ 2023-03-19 15:10 UTC (permalink / raw)
  To: libc-alpha, bug-hurd; +Cc: Samuel Thibault, Sergey Bugaev

Nothing in there needs tls.h

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
---
 sysdeps/generic/ldsodefs.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h
index c99dad77..5f21bc63 100644
--- a/sysdeps/generic/ldsodefs.h
+++ b/sysdeps/generic/ldsodefs.h
@@ -38,7 +38,6 @@
 #include <dl-fixup-attribute.h>
 #include <libc-lock.h>
 #include <hp-timing.h>
-#include <tls.h>
 #include <list_t.h>
 
 __BEGIN_DECLS
-- 
2.39.2


^ permalink raw reply	[flat|nested] 140+ messages in thread

* [RFC PATCH glibc 24/34] hurd: Only check for TLS initialization inside rtld or in static builds
  2023-03-19 15:09 [RFC PATCH 00/34] The rest of the x86_64-gnu port Sergey Bugaev
                   ` (22 preceding siblings ...)
  2023-03-19 15:10 ` [RFC PATCH glibc 23/34] elf: Stop including tls.h in ldsodefs.h Sergey Bugaev
@ 2023-03-19 15:10 ` Sergey Bugaev
  2023-04-10 21:33   ` Samuel Thibault
                     ` (2 more replies)
  2023-03-19 15:10 ` [RFC PATCH glibc 25/34] hurd: Improve reply port handling when exiting signal handlers Sergey Bugaev
                   ` (12 subsequent siblings)
  36 siblings, 3 replies; 140+ messages in thread
From: Sergey Bugaev @ 2023-03-19 15:10 UTC (permalink / raw)
  To: libc-alpha, bug-hurd; +Cc: Samuel Thibault, Sergey Bugaev

When glibc is built as a shared library, TLS is always initialized by
the call of TLS_INIT_TP () macro made inside the dynamic loader, prior
to running the main program (see dl-call_tls_init_tp.h). We can take
advantage of this: we know for sure that __LIBC_NO_TLS () will evaluate
to 0 in all other cases, so let the compiler know that explicitly too.

Also, only define _hurd_tls_init () and TLS_INIT_TP () under the same
conditions (either !SHARED or inside rtld), to statically assert that
this is the case.

Other than a microoptimization, this also helps with avoiding awkward
sharing of the __libc_tls_initialized variable between ld.so and libc.so
that we would have to do otherwise -- we know for sure that no sharing
is required, simply because __libc_tls_initialized would always be set
to true inside libc.so.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
---
 sysdeps/mach/hurd/Makefile                    |  4 ++
 sysdeps/mach/hurd/i386/dl-tls-initialized.c   | 21 +++++++++
 sysdeps/mach/hurd/i386/tls.h                  | 43 +++++++++++--------
 sysdeps/mach/hurd/x86/init-first.c            | 11 +----
 sysdeps/mach/hurd/x86_64/dl-tls-initialized.c | 21 +++++++++
 sysdeps/mach/hurd/x86_64/tls.h                | 19 +++++---
 6 files changed, 85 insertions(+), 34 deletions(-)
 create mode 100644 sysdeps/mach/hurd/i386/dl-tls-initialized.c
 create mode 100644 sysdeps/mach/hurd/x86_64/dl-tls-initialized.c

diff --git a/sysdeps/mach/hurd/Makefile b/sysdeps/mach/hurd/Makefile
index d5584930..f43e92ba 100644
--- a/sysdeps/mach/hurd/Makefile
+++ b/sysdeps/mach/hurd/Makefile
@@ -197,6 +197,10 @@ ifeq (hurd, $(subdir))
 sysdep_routines += cthreads
 endif
 
+ifeq (elf, $(subdir))
+sysdep-dl-routines += dl-tls-initialized
+endif
+
 ifeq (io, $(subdir))
 sysdep_routines += f_setlk close_nocancel close_nocancel_nostatus \
 		   fcntl_nocancel open_nocancel openat_nocancel read_nocancel \
diff --git a/sysdeps/mach/hurd/i386/dl-tls-initialized.c b/sysdeps/mach/hurd/i386/dl-tls-initialized.c
new file mode 100644
index 00000000..493ec239
--- /dev/null
+++ b/sysdeps/mach/hurd/i386/dl-tls-initialized.c
@@ -0,0 +1,21 @@
+/* Determine whether TLS is initialized, for i386/Hurd.
+   Copyright (C) 1995-2023 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
+   <https://www.gnu.org/licenses/>.  */
+
+#ifndef SHARED
+unsigned short __init1_desc;
+#endif
diff --git a/sysdeps/mach/hurd/i386/tls.h b/sysdeps/mach/hurd/i386/tls.h
index 0f8dd241..ee7b8004 100644
--- a/sysdeps/mach/hurd/i386/tls.h
+++ b/sysdeps/mach/hurd/i386/tls.h
@@ -69,18 +69,6 @@ _Static_assert (offsetof (tcbhead_t, __private_ss) == 0x30,
                   |  (desc->high_word & 0xff000000));			      \
   })
 
-/* Return 1 if TLS is not initialized yet.  */
-#ifndef SHARED
-extern unsigned short __init1_desc;
-#define __HURD_DESC_INITIAL(gs, ds) ((gs) == (ds) || (gs) == __init1_desc)
-#else
-#define __HURD_DESC_INITIAL(gs, ds) ((gs) == (ds))
-#endif
-
-#define __LIBC_NO_TLS()							      \
-  ({ unsigned short ds, gs;						      \
-     asm ("movw %%ds,%w0; movw %%gs,%w1" : "=q" (ds), "=q" (gs));	      \
-     __builtin_expect(__HURD_DESC_INITIAL(gs, ds), 0); })
 #endif
 
 /* The TCB can have any size and the memory following the address the
@@ -125,6 +113,28 @@ extern unsigned short __init1_desc;
 
 # define HURD_SEL_LDT(sel) (__builtin_expect ((sel) & 4, 0))
 
+#ifndef SHARED
+extern unsigned short __init1_desc;
+# define __HURD_DESC_INITIAL(gs, ds) ((gs) == (ds) || (gs) == __init1_desc)
+#else
+# define __HURD_DESC_INITIAL(gs, ds) ((gs) == (ds))
+#endif
+
+#if !defined (SHARED) || IS_IN (rtld)
+/* Return 1 if TLS is not initialized yet.  */
+extern inline bool __attribute__ ((unused))
+__LIBC_NO_TLS (void)
+{
+  unsigned short ds, gs;
+  asm ("movw %%ds, %w0\n"
+       "movw %%gs, %w1"
+       : "=q" (ds), "=q" (gs));
+  return __glibc_unlikely (__HURD_DESC_INITIAL (gs, ds));
+}
+
+/* Code to initially initialize the thread pointer.  This might need
+   special attention since 'errno' is not yet available and if the
+   operation can cause a failure 'errno' must not be touched.  */
 static inline bool __attribute__ ((unused))
 _hurd_tls_init (tcbhead_t *tcb)
 {
@@ -168,11 +178,10 @@ out:
   return success;
 }
 
-/* Code to initially initialize the thread pointer.  This might need
-   special attention since 'errno' is not yet available and if the
-   operation can cause a failure 'errno' must not be touched.  */
-# define TLS_INIT_TP(descr) \
-    _hurd_tls_init ((tcbhead_t *) (descr))
+# define TLS_INIT_TP(descr) _hurd_tls_init ((tcbhead_t *) (descr))
+#else /* defined (SHARED) && !IS_IN (rtld) */
+# define __LIBC_NO_TLS() 0
+#endif
 
 # if __GNUC_PREREQ (6, 0)
 
diff --git a/sysdeps/mach/hurd/x86/init-first.c b/sysdeps/mach/hurd/x86/init-first.c
index 48c330ec..89a5f44c 100644
--- a/sysdeps/mach/hurd/x86/init-first.c
+++ b/sysdeps/mach/hurd/x86/init-first.c
@@ -40,13 +40,6 @@ extern char **_dl_argv;
 
 #ifndef SHARED
 static tcbhead_t __init1_tcbhead;
-# ifndef __x86_64__
-unsigned short __init1_desc;
-# endif
-#endif
-
-#ifdef __x86_64__
-unsigned char __libc_tls_initialized;
 #endif
 
 /* Things that want to be run before _hurd_init or much anything else.
@@ -166,9 +159,7 @@ first_init (void)
   _hurd_tls_init (&__init1_tcbhead);
 
   /* Make sure __LIBC_NO_TLS () keeps evaluating to 1.  */
-# ifdef __x86_64__
-  __libc_tls_initialized = 0;
-# else
+# ifndef __x86_64__
   asm ("movw %%gs,%w0" : "=m" (__init1_desc));
 # endif
 #endif
diff --git a/sysdeps/mach/hurd/x86_64/dl-tls-initialized.c b/sysdeps/mach/hurd/x86_64/dl-tls-initialized.c
new file mode 100644
index 00000000..d0766f95
--- /dev/null
+++ b/sysdeps/mach/hurd/x86_64/dl-tls-initialized.c
@@ -0,0 +1,21 @@
+/* Determine whether TLS is initialized, for x86_64/Hurd.
+   Copyright (C) 1995-2023 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
+   <https://www.gnu.org/licenses/>.  */
+
+#if !defined (SHARED) || IS_IN (rtld)
+unsigned short __libc_tls_initialized;
+#endif
diff --git a/sysdeps/mach/hurd/x86_64/tls.h b/sysdeps/mach/hurd/x86_64/tls.h
index cf74e1f4..da504d9c 100644
--- a/sysdeps/mach/hurd/x86_64/tls.h
+++ b/sysdeps/mach/hurd/x86_64/tls.h
@@ -68,10 +68,6 @@ _Static_assert (offsetof (tcbhead_t, stack_guard) == 0x28,
 _Static_assert (offsetof (tcbhead_t, __private_ss) == 0x70,
                 "split stack pointer offset");
 
-extern unsigned char __libc_tls_initialized;
-
-# define __LIBC_NO_TLS() __builtin_expect (!__libc_tls_initialized, 0)
-
 /* The TCB can have any size and the memory following the address the
    thread pointer points to is unspecified.  Allocate the TCB there.  */
 # define TLS_TCB_AT_TP	1
@@ -87,8 +83,6 @@ extern unsigned char __libc_tls_initialized;
 # define TCB_ALIGNMENT	64
 
 
-# define TLS_INIT_TP(descr) _hurd_tls_init ((tcbhead_t *) (descr))
-
 # define THREAD_SELF							\
   (*(tcbhead_t * __seg_fs *) offsetof (tcbhead_t, tcb))
 /* Read member of the thread descriptor directly.  */
@@ -174,6 +168,10 @@ _hurd_tls_new (thread_t child, tcbhead_t *tcb)
                              i386_FSGS_BASE_STATE_COUNT);
 }
 
+# if !defined (SHARED) || IS_IN (rtld)
+extern unsigned char __libc_tls_initialized;
+#  define __LIBC_NO_TLS() __builtin_expect (!__libc_tls_initialized, 0)
+
 static inline bool __attribute__ ((unused))
 _hurd_tls_init (tcbhead_t *tcb)
 {
@@ -184,11 +182,18 @@ _hurd_tls_init (tcbhead_t *tcb)
   tcb->multiple_threads = 1;
 
   err = _hurd_tls_new (self, tcb);
+  if (err == 0)
+    __libc_tls_initialized = 1;
   __mach_port_deallocate (__mach_task_self (), self);
-  __libc_tls_initialized = 1;
   return err == 0;
 }
 
+#  define TLS_INIT_TP(descr) _hurd_tls_init ((tcbhead_t *) (descr))
+# else /* defined (SHARED) && !IS_IN (rtld) */
+#  define __LIBC_NO_TLS() 0
+# endif
+
+
 
 /* Global scope switch support.  */
 # define THREAD_GSCOPE_FLAG_UNUSED 0
-- 
2.39.2


^ permalink raw reply	[flat|nested] 140+ messages in thread

* [RFC PATCH glibc 25/34] hurd: Improve reply port handling when exiting signal handlers
  2023-03-19 15:09 [RFC PATCH 00/34] The rest of the x86_64-gnu port Sergey Bugaev
                   ` (23 preceding siblings ...)
  2023-03-19 15:10 ` [RFC PATCH glibc 24/34] hurd: Only check for TLS initialization inside rtld or in static builds Sergey Bugaev
@ 2023-03-19 15:10 ` Sergey Bugaev
  2023-04-10 22:03   ` Samuel Thibault
  2023-04-12 22:54   ` Samuel Thibault
  2023-03-19 15:10 ` [RFC PATCH glibc 26/34] hurd: Remove __hurd_local_reply_port Sergey Bugaev
                   ` (11 subsequent siblings)
  36 siblings, 2 replies; 140+ messages in thread
From: Sergey Bugaev @ 2023-03-19 15:10 UTC (permalink / raw)
  To: libc-alpha, bug-hurd; +Cc: Samuel Thibault, Sergey Bugaev

If we're doing signals, that means we've already got the signal thread
running, and that implies TLS having been set up. So we know that
__hurd_local_reply_port will resolve to THREAD_SELF->reply_port, and can
access that directly using the THREAD_GETMEM and THREAD_SETMEM macros.
This avoids potential miscompilations, and should also be a tiny bit
faster.

Also, use mach_port_mod_refs () and not mach_port_destroy () to destroy
the receive right. mach_port_destroy () should *never* be used on
mach_task_self (); this can easily lead to port use-after-free
vulnerabilities if the task has any other references to the same port.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
---

NOTE: I don't really understand why sigunwind wants to destroy both its
current reply port and user's reply port. Prior to commit
fb304035c41c7ee2afede51e5e8568974549ba5e, it was *restoring* the user's
reply port, in which case it actually made sense to destroy the current
reply port. Post-fb304035c41c7ee2afede51e5e8568974549ba5e, wouldn't it
be better to just keep using the current reply port, destroying the
user's one?

 hurd/sigunwind.c                   | 24 +++++++++++-------------
 sysdeps/mach/hurd/i386/sigreturn.c | 21 +++++----------------
 2 files changed, 16 insertions(+), 29 deletions(-)

diff --git a/hurd/sigunwind.c b/hurd/sigunwind.c
index edd40b14..399e6900 100644
--- a/hurd/sigunwind.c
+++ b/hurd/sigunwind.c
@@ -18,7 +18,6 @@
 
 #include <hurd.h>
 #include <thread_state.h>
-#include <hurd/threadvar.h>
 #include <jmpbuf-unwind.h>
 #include <assert.h>
 #include <stdint.h>
@@ -39,19 +38,18 @@ _hurdsig_longjmp_from_handler (void *data, jmp_buf env, int val)
     {
       /* Destroy the MiG reply port used by the signal handler, and restore
 	 the reply port in use by the thread when interrupted.  */
-      mach_port_t *reply_port = &__hurd_local_reply_port;
-      if (*reply_port)
-	{
-	  mach_port_t port = *reply_port;
-	  /* Assigning MACH_PORT_DEAD here tells libc's mig_get_reply_port
-	     not to get another reply port, but avoids mig_dealloc_reply_port
-	     trying to deallocate it after the receive fails (which it will,
-	     because the reply port will be bogus, regardless).  */
-	  *reply_port = MACH_PORT_DEAD;
-	  __mach_port_destroy (__mach_task_self (), port);
-	}
+      mach_port_t reply_port = THREAD_GETMEM (THREAD_SELF, reply_port);
+      /* Assigning MACH_PORT_DEAD here tells libc's mig_get_reply_port not to
+         get another reply port, but avoids mig_dealloc_reply_port trying to
+         deallocate it after the receive fails (which it will, because the
+         reply port will be bogus, regardless).  */
+      THREAD_SETMEM (THREAD_SELF, reply_port, MACH_PORT_DEAD);
+      if (MACH_PORT_VALID (reply_port))
+        __mach_port_mod_refs (__mach_task_self (), reply_port,
+                              MACH_PORT_RIGHT_RECEIVE, -1);
       if (scp->sc_reply_port)
-	__mach_port_destroy (__mach_task_self (), scp->sc_reply_port);
+        __mach_port_mod_refs (__mach_task_self (), scp->sc_reply_port,
+                              MACH_PORT_RIGHT_RECEIVE, -1);
     }
 
   __spin_lock (&ss->lock);
diff --git a/sysdeps/mach/hurd/i386/sigreturn.c b/sysdeps/mach/hurd/i386/sigreturn.c
index db1a01f3..29c9629f 100644
--- a/sysdeps/mach/hurd/i386/sigreturn.c
+++ b/sysdeps/mach/hurd/i386/sigreturn.c
@@ -19,7 +19,6 @@ register int *sp asm ("%esp");
 
 #include <hurd.h>
 #include <hurd/signal.h>
-#include <hurd/threadvar.h>
 #include <hurd/msg.h>
 #include <stdlib.h>
 #include <string.h>
@@ -59,7 +58,7 @@ __sigreturn (struct sigcontext *scp)
 {
   struct hurd_sigstate *ss;
   struct hurd_userlink *link = (void *) &scp[1];
-  mach_port_t *reply_port;
+  mach_port_t reply_port;
 
   if (scp == NULL || (scp->sc_mask & _SIG_CANT_MASK))
     {
@@ -101,20 +100,10 @@ __sigreturn (struct sigcontext *scp)
 
   /* Destroy the MiG reply port used by the signal handler, and restore the
      reply port in use by the thread when interrupted.  */
-  reply_port = &__hurd_local_reply_port;
-  if (*reply_port)
-    {
-      mach_port_t port = *reply_port;
-
-      /* Assigning MACH_PORT_DEAD here tells libc's mig_get_reply_port not to
-	 get another reply port, but avoids mig_dealloc_reply_port trying to
-	 deallocate it after the receive fails (which it will, because the
-	 reply port will be bogus, whether we do this or not).  */
-      *reply_port = MACH_PORT_DEAD;
-
-      __mach_port_destroy (__mach_task_self (), port);
-    }
-  *reply_port = scp->sc_reply_port;
+  reply_port = THREAD_GETMEM (THREAD_SELF, reply_port);
+  THREAD_SETMEM (THREAD_SELF, reply_port, scp->sc_reply_port);
+  __mach_port_mod_refs (__mach_task_self (), reply_port,
+                        MACH_PORT_RIGHT_RECEIVE, -1);
 
   if (scp->sc_fpused)
     /* Restore the FPU state.  Mach conveniently stores the state
-- 
2.39.2


^ permalink raw reply	[flat|nested] 140+ messages in thread

* [RFC PATCH glibc 26/34] hurd: Remove __hurd_local_reply_port
  2023-03-19 15:09 [RFC PATCH 00/34] The rest of the x86_64-gnu port Sergey Bugaev
                   ` (24 preceding siblings ...)
  2023-03-19 15:10 ` [RFC PATCH glibc 25/34] hurd: Improve reply port handling when exiting signal handlers Sergey Bugaev
@ 2023-03-19 15:10 ` Sergey Bugaev
  2023-04-10 22:07   ` Samuel Thibault
  2023-03-19 15:10 ` [RFC PATCH glibc 27/34] hurd: Don't leak __hurd_reply_port0 Sergey Bugaev
                   ` (10 subsequent siblings)
  36 siblings, 1 reply; 140+ messages in thread
From: Sergey Bugaev @ 2023-03-19 15:10 UTC (permalink / raw)
  To: libc-alpha, bug-hurd; +Cc: Samuel Thibault, Sergey Bugaev

Now that the signal code no longer accesses it, the only real user of it
was mig-reply.c, so move the logic for managing the port there.

If we're in SHARED and outside of rtld, we know that __LIBC_NO_TLS ()
always evaluates to 0, and a TLS reply port will always be used, not
__hurd_reply_port0. Still, the compiler does not see that
__hurd_reply_port0 is never used due to its address being taken. To deal
with this, explicitly compile out __hurd_reply_port0 when we know we
won't use it.

Also, instead of accessing the port via THREAD_SELF->reply_port, this
uses THREAD_GETMEM and THREAD_SETMEM directly, avoiding possible
miscompilations.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
---
 hurd/hurd/threadvar.h         |  7 ------
 sysdeps/mach/hurd/mig-reply.c | 43 +++++++++++++++++++++++++++--------
 2 files changed, 33 insertions(+), 17 deletions(-)

diff --git a/hurd/hurd/threadvar.h b/hurd/hurd/threadvar.h
index f5c6a278..c476d988 100644
--- a/hurd/hurd/threadvar.h
+++ b/hurd/hurd/threadvar.h
@@ -29,11 +29,4 @@
 extern unsigned long int __hurd_sigthread_stack_base;
 extern unsigned long int __hurd_sigthread_stack_end;
 
-/* Store the MiG reply port reply port until we enable TLS.  */
-extern mach_port_t __hurd_reply_port0;
-
-/* This returns either the TLS reply port variable, or a single-thread variable
-   when TLS is not initialized yet.  */
-#define __hurd_local_reply_port (*(__LIBC_NO_TLS () ? &__hurd_reply_port0 : &THREAD_SELF->reply_port))
-
 #endif	/* hurd/threadvar.h */
diff --git a/sysdeps/mach/hurd/mig-reply.c b/sysdeps/mach/hurd/mig-reply.c
index 33ff260e..d3c5a958 100644
--- a/sysdeps/mach/hurd/mig-reply.c
+++ b/sysdeps/mach/hurd/mig-reply.c
@@ -17,32 +17,55 @@
 
 #include <mach.h>
 #include <mach/mig_support.h>
-#include <hurd/threadvar.h>
+#include <tls.h>
 
 /* These functions are called by MiG-generated code.  */
 
+#if !defined (SHARED) || IS_IN (rtld)
 mach_port_t __hurd_reply_port0;
+#endif
+
+static mach_port_t
+get_reply_port (void)
+{
+#if !defined (SHARED) || IS_IN (rtld)
+  if (__LIBC_NO_TLS ())
+    return __hurd_reply_port0;
+#endif
+  return THREAD_GETMEM (THREAD_SELF, reply_port);
+}
+
+static void
+set_reply_port (mach_port_t port)
+{
+#if !defined (SHARED) || IS_IN (rtld)
+  if (__LIBC_NO_TLS ())
+    __hurd_reply_port0 = port;
+  else
+#endif
+    THREAD_SETMEM (THREAD_SELF, reply_port, port);
+}
 
 /* Called by MiG to get a reply port.  */
 mach_port_t
 __mig_get_reply_port (void)
 {
-  if (__hurd_local_reply_port == MACH_PORT_NULL
-      || (&__hurd_local_reply_port != &__hurd_reply_port0
-	  && __hurd_local_reply_port == __hurd_reply_port0))
-    __hurd_local_reply_port = __mach_reply_port ();
-
-  return __hurd_local_reply_port;
+  mach_port_t port = get_reply_port ();
+  if (__glibc_unlikely (port == MACH_PORT_NULL))
+    {
+      port = __mach_reply_port ();
+      set_reply_port (port);
+    }
+  return port;
 }
 weak_alias (__mig_get_reply_port, mig_get_reply_port)
 libc_hidden_def (__mig_get_reply_port)
 
 /* Called by MiG to deallocate the reply port.  */
 void
-__mig_dealloc_reply_port (mach_port_t arg)
+__mig_dealloc_reply_port (mach_port_t port)
 {
-  mach_port_t port = __hurd_local_reply_port;
-  __hurd_local_reply_port = MACH_PORT_NULL;	/* So the mod_refs RPC won't use it.  */
+  set_reply_port (MACH_PORT_NULL);	/* So the mod_refs RPC won't use it.  */
 
   if (MACH_PORT_VALID (port))
     __mach_port_mod_refs (__mach_task_self (), port,
-- 
2.39.2


^ permalink raw reply	[flat|nested] 140+ messages in thread

* [RFC PATCH glibc 27/34] hurd: Don't leak __hurd_reply_port0
  2023-03-19 15:09 [RFC PATCH 00/34] The rest of the x86_64-gnu port Sergey Bugaev
                   ` (25 preceding siblings ...)
  2023-03-19 15:10 ` [RFC PATCH glibc 26/34] hurd: Remove __hurd_local_reply_port Sergey Bugaev
@ 2023-03-19 15:10 ` Sergey Bugaev
  2023-04-10 22:25   ` Samuel Thibault
  2023-03-19 15:10 ` [RFC PATCH glibc 28/34] hurd: Implement _hurd_longjmp_thread_state for x86_64 Sergey Bugaev
                   ` (9 subsequent siblings)
  36 siblings, 1 reply; 140+ messages in thread
From: Sergey Bugaev @ 2023-03-19 15:10 UTC (permalink / raw)
  To: libc-alpha, bug-hurd; +Cc: Samuel Thibault, Sergey Bugaev

Previously, once we set up TLS, we would implicitly switch from using
__hurd_reply_port0 to reply_port inside the TCB, leaving the former
unused. But we never deallocated it, so it got leaked.

Instead, migrate the port into the new TCB's reply_port slot. This
avoids both the port leak and an extra syscall to create a new reply
port for the TCB.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
---
 sysdeps/mach/hurd/i386/tls.h   | 5 +++++
 sysdeps/mach/hurd/x86_64/tls.h | 9 ++++++++-
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/sysdeps/mach/hurd/i386/tls.h b/sysdeps/mach/hurd/i386/tls.h
index ee7b8004..0ac8917a 100644
--- a/sysdeps/mach/hurd/i386/tls.h
+++ b/sysdeps/mach/hurd/i386/tls.h
@@ -141,12 +141,15 @@ _hurd_tls_init (tcbhead_t *tcb)
   HURD_TLS_DESC_DECL (desc, tcb);
   thread_t self = __mach_thread_self ();
   bool success = true;
+  extern mach_port_t __hurd_reply_port0;
 
   /* This field is used by TLS accesses to get our "thread pointer"
      from the TLS point of view.  */
   tcb->tcb = tcb;
   /* We always at least start the sigthread anyway.  */
   tcb->multiple_threads = 1;
+  /* Take over the reply port we've been using.  */
+  tcb->reply_port = __hurd_reply_port0;
 
   /* Get the first available selector.  */
   int sel = -1;
@@ -172,6 +175,8 @@ _hurd_tls_init (tcbhead_t *tcb)
 
   /* Now install the new selector.  */
   asm volatile ("mov %w0, %%gs" :: "q" (sel));
+  /* This port is now owned by the TCB.  */
+  __hurd_reply_port0 = MACH_PORT_NULL;
 
 out:
   __mach_port_deallocate (__mach_task_self (), self);
diff --git a/sysdeps/mach/hurd/x86_64/tls.h b/sysdeps/mach/hurd/x86_64/tls.h
index da504d9c..2b7135f6 100644
--- a/sysdeps/mach/hurd/x86_64/tls.h
+++ b/sysdeps/mach/hurd/x86_64/tls.h
@@ -177,13 +177,20 @@ _hurd_tls_init (tcbhead_t *tcb)
 {
   error_t err;
   thread_t self = __mach_thread_self ();
+  extern mach_port_t __hurd_reply_port0;
 
   /* We always at least start the sigthread anyway.  */
   tcb->multiple_threads = 1;
+  /* Take over the reply port we've been using.  */
+  tcb->reply_port = __hurd_reply_port0;
 
   err = _hurd_tls_new (self, tcb);
   if (err == 0)
-    __libc_tls_initialized = 1;
+    {
+      __libc_tls_initialized = 1;
+      /* This port is now owned by the TCB.  */
+      __hurd_reply_port0 = MACH_PORT_NULL;
+    }
   __mach_port_deallocate (__mach_task_self (), self);
   return err == 0;
 }
-- 
2.39.2


^ permalink raw reply	[flat|nested] 140+ messages in thread

* [RFC PATCH glibc 28/34] hurd: Implement _hurd_longjmp_thread_state for x86_64
  2023-03-19 15:09 [RFC PATCH 00/34] The rest of the x86_64-gnu port Sergey Bugaev
                   ` (26 preceding siblings ...)
  2023-03-19 15:10 ` [RFC PATCH glibc 27/34] hurd: Don't leak __hurd_reply_port0 Sergey Bugaev
@ 2023-03-19 15:10 ` Sergey Bugaev
  2023-04-02 23:23   ` Samuel Thibault
  2023-03-19 15:10 ` [RFC PATCH glibc 29/34] hurd: Add vm_param.h " Sergey Bugaev
                   ` (8 subsequent siblings)
  36 siblings, 1 reply; 140+ messages in thread
From: Sergey Bugaev @ 2023-03-19 15:10 UTC (permalink / raw)
  To: libc-alpha, bug-hurd; +Cc: Samuel Thibault, Sergey Bugaev

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
---
 sysdeps/mach/hurd/x86_64/longjmp-ts.c | 41 +++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)
 create mode 100644 sysdeps/mach/hurd/x86_64/longjmp-ts.c

diff --git a/sysdeps/mach/hurd/x86_64/longjmp-ts.c b/sysdeps/mach/hurd/x86_64/longjmp-ts.c
new file mode 100644
index 00000000..2c57d26a
--- /dev/null
+++ b/sysdeps/mach/hurd/x86_64/longjmp-ts.c
@@ -0,0 +1,41 @@
+/* Perform a `longjmp' on a Mach thread_state.  x86_64 version.
+   Copyright (C) 1991-2023 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
+   <https://www.gnu.org/licenses/>.  */
+
+#include <hurd/signal.h>
+#include <setjmp.h>
+#include <jmpbuf-offsets.h>
+#include <mach/thread_status.h>
+
+
+/* Set up STATE to do the equivalent of `longjmp (ENV, VAL);'.  */
+
+void
+_hurd_longjmp_thread_state (void *state, jmp_buf env, int val)
+{
+  struct i386_thread_state *ts = state;
+
+  ts->rbx = env[0].__jmpbuf[JB_RBX];
+  ts->rbp = env[0].__jmpbuf[JB_RBP];
+  ts->r12 = env[0].__jmpbuf[JB_R12];
+  ts->r13 = env[0].__jmpbuf[JB_R13];
+  ts->r14 = env[0].__jmpbuf[JB_R14];
+  ts->r15 = env[0].__jmpbuf[JB_R15];
+  ts->ursp = env[0].__jmpbuf[JB_RSP];
+  ts->rip = env[0].__jmpbuf[JB_PC];
+  ts->rax = val ?: 1;
+}
-- 
2.39.2


^ permalink raw reply	[flat|nested] 140+ messages in thread

* [RFC PATCH glibc 29/34] hurd: Add vm_param.h for x86_64
  2023-03-19 15:09 [RFC PATCH 00/34] The rest of the x86_64-gnu port Sergey Bugaev
                   ` (27 preceding siblings ...)
  2023-03-19 15:10 ` [RFC PATCH glibc 28/34] hurd: Implement _hurd_longjmp_thread_state for x86_64 Sergey Bugaev
@ 2023-03-19 15:10 ` Sergey Bugaev
  2023-04-02 23:24   ` Samuel Thibault
  2023-03-19 15:10 ` [RFC PATCH glibc 30/34] hurd: Implement longjmp " Sergey Bugaev
                   ` (7 subsequent siblings)
  36 siblings, 1 reply; 140+ messages in thread
From: Sergey Bugaev @ 2023-03-19 15:10 UTC (permalink / raw)
  To: libc-alpha, bug-hurd; +Cc: Samuel Thibault, Sergey Bugaev

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
---
 sysdeps/mach/hurd/x86_64/vm_param.h | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
 create mode 100644 sysdeps/mach/hurd/x86_64/vm_param.h

diff --git a/sysdeps/mach/hurd/x86_64/vm_param.h b/sysdeps/mach/hurd/x86_64/vm_param.h
new file mode 100644
index 00000000..f269afb3
--- /dev/null
+++ b/sysdeps/mach/hurd/x86_64/vm_param.h
@@ -0,0 +1,24 @@
+/* Copyright (C) 2020-2023 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
+   <https://www.gnu.org/licenses/>.  */
+
+#ifndef _X86_86_VM_PARAM_H
+#define _X86_64_VM_PARAM_H
+
+/* Arbitrary start of the brk. This is after usual binary and library mappings.  */
+#define BRK_START	0x200000000000
+
+#endif /* x86_64/vm_param.h */
-- 
2.39.2


^ permalink raw reply	[flat|nested] 140+ messages in thread

* [RFC PATCH glibc 30/34] hurd: Implement longjmp for x86_64
  2023-03-19 15:09 [RFC PATCH 00/34] The rest of the x86_64-gnu port Sergey Bugaev
                   ` (28 preceding siblings ...)
  2023-03-19 15:10 ` [RFC PATCH glibc 29/34] hurd: Add vm_param.h " Sergey Bugaev
@ 2023-03-19 15:10 ` Sergey Bugaev
  2023-03-19 15:10 ` [RFC PATCH glibc 31/34] hurd: Microoptimize _hurd_self_sigstate () Sergey Bugaev
                   ` (6 subsequent siblings)
  36 siblings, 0 replies; 140+ messages in thread
From: Sergey Bugaev @ 2023-03-19 15:10 UTC (permalink / raw)
  To: libc-alpha, bug-hurd; +Cc: Samuel Thibault, Sergey Bugaev

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
---
 sysdeps/mach/hurd/x86_64/____longjmp_chk.S | 134 +++++++++++++++++++++
 sysdeps/mach/hurd/x86_64/__longjmp.S       | 102 ++++++++++++++++
 2 files changed, 236 insertions(+)
 create mode 100644 sysdeps/mach/hurd/x86_64/____longjmp_chk.S
 create mode 100644 sysdeps/mach/hurd/x86_64/__longjmp.S

diff --git a/sysdeps/mach/hurd/x86_64/____longjmp_chk.S b/sysdeps/mach/hurd/x86_64/____longjmp_chk.S
new file mode 100644
index 00000000..29f6c8c3
--- /dev/null
+++ b/sysdeps/mach/hurd/x86_64/____longjmp_chk.S
@@ -0,0 +1,134 @@
+/* Checked longjmp support.  x86_64 Hurd version.
+   Copyright (C) 2001-2023 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
+   <https://www.gnu.org/licenses/>.  */
+
+#include <sysdep.h>
+#include <pointer_guard.h>
+#include <jmpbuf-offsets.h>
+#include <asm-syntax.h>
+#include <tcb-offsets.h>
+#include <jmp_buf-ssp.h>
+#include <signal-defines.h>
+
+#define SS_ONSTACK 1
+
+/* Don't restore shadow stack register if shadow stack isn't enabled.  */
+#if !SHSTK_ENABLED
+# undef SHADOW_STACK_POINTER_OFFSET
+#endif
+
+	.section .rodata.str1.1,"aMS",@progbits,1
+	.type	longjmp_msg,@object
+longjmp_msg:
+	.string "longjmp causes uninitialized stack frame"
+	.size	longjmp_msg, .-longjmp_msg
+
+
+#ifdef PIC
+# define CALL_FAIL	sub	$8, %RSP_LP;				      \
+			cfi_remember_state;				      \
+			cfi_def_cfa_offset(16);				      \
+			lea	longjmp_msg(%rip), %RDI_LP;		      \
+			call	HIDDEN_JUMPTARGET(__fortify_fail);	      \
+			nop;						      \
+			cfi_restore_state
+#else
+# define CALL_FAIL	sub	$8, %RSP_LP;				      \
+			cfi_remember_state;				      \
+			cfi_def_cfa_offset(16);				      \
+			mov	$longjmp_msg, %RDI_LP;			      \
+			call	HIDDEN_JUMPTARGET(__fortify_fail);	      \
+			nop;						      \
+			cfi_restore_state
+#endif
+
+/* Jump to the position specified by ENV, causing the
+   setjmp call there to return VAL, or 1 if VAL is 0.
+   void __longjmp (__jmp_buf env, int val).  */
+	.text
+ENTRY(____longjmp_chk)
+	/* Restore registers.  */
+	mov	(JB_RSP*8)(%rdi), %R8_LP
+	mov	(JB_RBP*8)(%rdi),%R9_LP
+	mov	(JB_PC*8)(%rdi), %RDX_LP
+#ifdef PTR_DEMANGLE
+	PTR_DEMANGLE (%R8_LP)
+	PTR_DEMANGLE (%R9_LP)
+	PTR_DEMANGLE (%RDX_LP)
+#endif
+
+#if !defined (SHARED) || IS_IN (rtld)
+# ifdef PIC
+	movb	__libc_tls_initialized(%rip), %r10b
+# else
+	mobv	$__libc_tls_initialized, %r10b
+# endif
+	testb	%r10b, %r10b
+	jz	.Lok		/* TLS not initialized yet */
+#endif
+
+	movq %fs:SIGSTATE_OFFSET, %R10_LP
+	testq %R10_LP, %R10_LP
+	jz	.Lok		/* sigstate not initialized yet */
+
+	testl	$SS_ONSTACK, (HURD_SIGSTATE__SIGALTSTACK__OFFSET + SIGALTSTACK__SS_FLAGS__OFFSET)(%R10_LP)
+	jnz	.Lonstack
+
+	/* We were on the main stack.  Jumping to a higher-address
+           frame is always allowed, otherwise it's not allowed.  */
+	cmp	%R8_LP, %RSP_LP
+	jbe	.Lok
+
+.Lfail:	CALL_FAIL
+
+.Lonstack:
+	cmpq	(HURD_SIGSTATE__SIGALTSTACK__OFFSET + SIGALTSTACK__SS_SP__OFFSET)(%R10_LP), %R8_LP
+	jb	.Loks		/* Jumping below the altstack, switch */
+
+	movq	(HURD_SIGSTATE__SIGALTSTACK__OFFSET + SIGALTSTACK__SS_SP__OFFSET)(%R10_LP), %R11_LP
+	addq	(HURD_SIGSTATE__SIGALTSTACK__OFFSET + SIGALTSTACK__SS_SIZE__OFFSET)(%R10_LP), %R11_LP
+	cmpq	%R11_LP, %R8_LP
+	jb	.Lok		/* Jumping inside the altstack, do not switch */
+
+	/* Jumping above the altstack, switch */
+
+.Loks:
+	andl	$~(SS_ONSTACK), (HURD_SIGSTATE__SIGALTSTACK__OFFSET + SIGALTSTACK__SS_FLAGS__OFFSET)(%R10_LP)
+
+.Lok:
+	/* We add unwind information for the target here.  */
+	cfi_def_cfa(%rdi, 0)
+	cfi_register(%rsp,%r8)
+	cfi_register(%rbp,%r9)
+	cfi_register(%rip,%rdx)
+	cfi_offset(%rbx,JB_RBX*8)
+	cfi_offset(%r12,JB_R12*8)
+	cfi_offset(%r13,JB_R13*8)
+	cfi_offset(%r14,JB_R14*8)
+	cfi_offset(%r15,JB_R15*8)
+	movq	(JB_RBX*8)(%rdi), %rbx
+	movq	(JB_R12*8)(%rdi), %r12
+	movq	(JB_R13*8)(%rdi), %r13
+	movq	(JB_R14*8)(%rdi), %r14
+	movq	(JB_R15*8)(%rdi), %r15
+	/* Set return value for setjmp.  */
+	movl	%esi, %eax
+	mov	%R8_LP, %RSP_LP
+	movq	%r9,%rbp
+	jmpq	*%rdx
+END (____longjmp_chk)
diff --git a/sysdeps/mach/hurd/x86_64/__longjmp.S b/sysdeps/mach/hurd/x86_64/__longjmp.S
new file mode 100644
index 00000000..9bbcfb2f
--- /dev/null
+++ b/sysdeps/mach/hurd/x86_64/__longjmp.S
@@ -0,0 +1,102 @@
+/* longjmp support.  x86_64/Hurd version.
+   Copyright (C) 2001-2023 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
+   <https://www.gnu.org/licenses/>.  */
+
+#include <sysdep.h>
+#include <pointer_guard.h>
+#include <jmpbuf-offsets.h>
+#include <asm-syntax.h>
+#include <tcb-offsets.h>
+#include <jmp_buf-ssp.h>
+#include <signal-defines.h>
+
+#define SS_ONSTACK 1
+
+/* Don't restore shadow stack register if shadow stack isn't enabled.  */
+#if !SHSTK_ENABLED
+# undef SHADOW_STACK_POINTER_OFFSET
+#endif
+
+/* Jump to the position specified by ENV, causing the
+   setjmp call there to return VAL, or 1 if VAL is 0.
+   void __longjmp (__jmp_buf env, int val).  */
+	.text
+ENTRY(__longjmp)
+	/* Restore registers.  */
+	mov	(JB_RSP*8)(%rdi), %R8_LP
+	mov	(JB_RBP*8)(%rdi),%R9_LP
+	mov	(JB_PC*8)(%rdi), %RDX_LP
+#ifdef PTR_DEMANGLE
+	PTR_DEMANGLE (%R8_LP)
+	PTR_DEMANGLE (%R9_LP)
+	PTR_DEMANGLE (%RDX_LP)
+#endif
+
+#if !defined (SHARED) || IS_IN (rtld)
+# ifdef PIC
+	movb	__libc_tls_initialized(%rip), %r10b
+# else
+	mobv	$__libc_tls_initialized, %r10b
+# endif
+	testb	%r10b, %r10b
+	jz	.Lok		/* TLS not initialized yet */
+#endif
+
+	movq %fs:SIGSTATE_OFFSET, %R10_LP
+	testq %R10_LP, %R10_LP
+	jz	.Lok		/* sigstate not initialized yet */
+
+	testl	$SS_ONSTACK, (HURD_SIGSTATE__SIGALTSTACK__OFFSET + SIGALTSTACK__SS_FLAGS__OFFSET)(%R10_LP)
+	jz	.Lok
+
+.Lonstack:
+	cmpq	(HURD_SIGSTATE__SIGALTSTACK__OFFSET + SIGALTSTACK__SS_SP__OFFSET)(%R10_LP), %R8_LP
+	jb	.Loks		/* Jumping below the altstack, switch */
+
+	movq	(HURD_SIGSTATE__SIGALTSTACK__OFFSET + SIGALTSTACK__SS_SP__OFFSET)(%R10_LP), %R11_LP
+	addq	(HURD_SIGSTATE__SIGALTSTACK__OFFSET + SIGALTSTACK__SS_SIZE__OFFSET)(%R10_LP), %R11_LP
+	cmpq	%R11_LP, %R8_LP
+	jb	.Lok		/* Jumping inside the altstack, do not switch */
+
+	/* Jumping above the altstack, switch */
+
+.Loks:
+	andl	$~(SS_ONSTACK), (HURD_SIGSTATE__SIGALTSTACK__OFFSET + SIGALTSTACK__SS_FLAGS__OFFSET)(%R10_LP)
+
+.Lok:
+	/* We add unwind information for the target here.  */
+	cfi_def_cfa(%rdi, 0)
+	cfi_register(%rsp,%r8)
+	cfi_register(%rbp,%r9)
+	cfi_register(%rip,%rdx)
+	cfi_offset(%rbx,JB_RBX*8)
+	cfi_offset(%r12,JB_R12*8)
+	cfi_offset(%r13,JB_R13*8)
+	cfi_offset(%r14,JB_R14*8)
+	cfi_offset(%r15,JB_R15*8)
+	movq	(JB_RBX*8)(%rdi), %rbx
+	movq	(JB_R12*8)(%rdi), %r12
+	movq	(JB_R13*8)(%rdi), %r13
+	movq	(JB_R14*8)(%rdi), %r14
+	movq	(JB_R15*8)(%rdi), %r15
+	/* Set return value for setjmp.  */
+	movl	%esi, %eax
+	mov	%R8_LP, %RSP_LP
+	movq	%r9,%rbp
+	jmpq	*%rdx
+END (__longjmp)
-- 
2.39.2


^ permalink raw reply	[flat|nested] 140+ messages in thread

* [RFC PATCH glibc 31/34] hurd: Microoptimize _hurd_self_sigstate ()
  2023-03-19 15:09 [RFC PATCH 00/34] The rest of the x86_64-gnu port Sergey Bugaev
                   ` (29 preceding siblings ...)
  2023-03-19 15:10 ` [RFC PATCH glibc 30/34] hurd: Implement longjmp " Sergey Bugaev
@ 2023-03-19 15:10 ` Sergey Bugaev
  2023-04-02 23:26   ` Samuel Thibault
  2023-03-19 15:10 ` [RFC PATCH glibc 32/34] hurd: Implement sigreturn for x86_64 Sergey Bugaev
                   ` (5 subsequent siblings)
  36 siblings, 1 reply; 140+ messages in thread
From: Sergey Bugaev @ 2023-03-19 15:10 UTC (permalink / raw)
  To: libc-alpha, bug-hurd; +Cc: Samuel Thibault, Sergey Bugaev

When THREAD_GETMEM is defined with inline assembly, the compiler may not
optimize away the two reads of _hurd_sigstate. Help it out a little bit
by only reading it once. This also makes for a slightly cleaner code.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
---
 hurd/hurd/signal.h | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/hurd/hurd/signal.h b/hurd/hurd/signal.h
index c33f974b..662e955e 100644
--- a/hurd/hurd/signal.h
+++ b/hurd/hurd/signal.h
@@ -166,13 +166,15 @@ extern void _hurd_sigstate_delete (thread_t thread);
 _HURD_SIGNAL_H_EXTERN_INLINE struct hurd_sigstate *
 _hurd_self_sigstate (void)
 {
-  if (THREAD_GETMEM (THREAD_SELF, _hurd_sigstate) == NULL)
+  struct hurd_sigstate *ss = THREAD_GETMEM (THREAD_SELF, _hurd_sigstate);
+  if (__glibc_unlikely (ss == NULL))
     {
       thread_t self = __mach_thread_self ();
-      THREAD_SETMEM (THREAD_SELF, _hurd_sigstate, _hurd_thread_sigstate (self));
+      ss = _hurd_thread_sigstate (self);
+      THREAD_SETMEM (THREAD_SELF, _hurd_sigstate, ss);
       __mach_port_deallocate (__mach_task_self (), self);
     }
-  return THREAD_GETMEM (THREAD_SELF, _hurd_sigstate);
+  return ss;
 }
 # endif
 #endif
-- 
2.39.2


^ permalink raw reply	[flat|nested] 140+ messages in thread

* [RFC PATCH glibc 32/34] hurd: Implement sigreturn for x86_64
  2023-03-19 15:09 [RFC PATCH 00/34] The rest of the x86_64-gnu port Sergey Bugaev
                   ` (30 preceding siblings ...)
  2023-03-19 15:10 ` [RFC PATCH glibc 31/34] hurd: Microoptimize _hurd_self_sigstate () Sergey Bugaev
@ 2023-03-19 15:10 ` Sergey Bugaev
  2023-04-03 11:47   ` [PATCH v2] " Sergey Bugaev
  2023-03-19 15:10 ` [RFC PATCH glibc 33/34] hurd: Create abilist files for lib{mach,hurd}user Sergey Bugaev
                   ` (4 subsequent siblings)
  36 siblings, 1 reply; 140+ messages in thread
From: Sergey Bugaev @ 2023-03-19 15:10 UTC (permalink / raw)
  To: libc-alpha, bug-hurd; +Cc: Samuel Thibault, Sergey Bugaev

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
---
 sysdeps/mach/hurd/x86_64/sigreturn.c | 155 +++++++++++++++++++++++++++
 1 file changed, 155 insertions(+)
 create mode 100644 sysdeps/mach/hurd/x86_64/sigreturn.c

diff --git a/sysdeps/mach/hurd/x86_64/sigreturn.c b/sysdeps/mach/hurd/x86_64/sigreturn.c
new file mode 100644
index 00000000..b8c62e53
--- /dev/null
+++ b/sysdeps/mach/hurd/x86_64/sigreturn.c
@@ -0,0 +1,155 @@
+/* Copyright (C) 1991-2023 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
+   <https://www.gnu.org/licenses/>.  */
+
+#include <hurd.h>
+#include <hurd/signal.h>
+#include <hurd/msg.h>
+#include <stdlib.h>
+
+/* This is run on the thread stack after restoring it, to be able to
+   unlock SS off sigstack.  */
+void
+__sigreturn2 (struct hurd_sigstate *ss)
+{
+  _hurd_sigstate_unlock (ss);
+
+  /* We get jumped into, not called normally.  The register dump starts where
+     our return address would normally be.  */
+  uintptr_t *usp = (uintptr_t *) __builtin_frame_address (0) + 1;
+
+  asm volatile (
+                /* Point the stack to the register dump.  */
+                "movq %0, %%rsp\n"
+                /* Pop off the registers.  */
+                "popq %%r8\n"
+                "popq %%r9\n"
+                "popq %%r10\n"
+                "popq %%r11\n"
+                "popq %%r12\n"
+                "popq %%r13\n"
+                "popq %%r14\n"
+                "popq %%r15\n"
+                "popq %%rdi\n"
+                "popq %%rsi\n"
+                "popq %%rbp\n"
+                "popq %%rbx\n"
+                "popq %%rdx\n"
+                "popq %%rcx\n"
+                "popq %%rax\n"
+                "popfq\n"
+                /* Restore %rip and %rsp with a single instruction.  */
+                "retq $128" :
+                : "rm" (usp));
+  __builtin_unreachable ();
+}
+
+int
+__sigreturn (struct sigcontext *scp)
+{
+  struct hurd_sigstate *ss;
+  struct hurd_userlink *link = (void *) &scp[1];
+  mach_port_t reply_port;
+
+  if (scp == NULL || (scp->sc_mask & _SIG_CANT_MASK))
+    {
+      errno = EINVAL;
+      return -1;
+    }
+
+  ss = _hurd_self_sigstate ();
+  _hurd_sigstate_lock (ss);
+
+  /* Remove the link on the `active resources' chain added by
+     _hurd_setup_sighandler.  Its purpose was to make sure
+     that we got called; now we have, it is done.  */
+  _hurd_userlink_unlink (link);
+
+  /* Restore the set of blocked signals, and the intr_port slot.  */
+  ss->blocked = scp->sc_mask;
+  ss->intr_port = scp->sc_intr_port;
+
+  /* Check for pending signals that were blocked by the old set.  */
+  if (_hurd_sigstate_pending (ss) & ~ss->blocked)
+    {
+      /* There are pending signals that just became unblocked.  Wake up the
+	 signal thread to deliver them.  But first, squirrel away SCP where
+	 the signal thread will notice it if it runs another handler, and
+	 arrange to have us called over again in the new reality.  */
+      ss->context = scp;
+      _hurd_sigstate_unlock (ss);
+      __msg_sig_post (_hurd_msgport, 0, 0, __mach_task_self ());
+      /* If a pending signal was handled, sig_post never returned.
+	 If it did return, the pending signal didn't run a handler;
+	 proceed as usual.  */
+      _hurd_sigstate_lock (ss);
+      ss->context = NULL;
+    }
+
+  if (scp->sc_onstack)
+    ss->sigaltstack.ss_flags &= ~SS_ONSTACK;
+
+  /* Destroy the MiG reply port used by the signal handler, and restore the
+     reply port in use by the thread when interrupted.  */
+  reply_port = THREAD_GETMEM (THREAD_SELF, reply_port);
+  THREAD_SETMEM (THREAD_SELF, reply_port, scp->sc_reply_port);
+  __mach_port_mod_refs (__mach_task_self (), reply_port,
+                        MACH_PORT_RIGHT_RECEIVE, -1);
+
+  if (scp->sc_fpused)
+    /* Restore the FPU state.  Mach conveniently stores the state
+       in the format the i387 `frstor' instruction uses to restore it.  */
+    asm volatile ("frstor %0" : : "m" (scp->sc_fpsave));
+
+  {
+    /* There are convenient instructions to pop state off the stack, so we
+       copy the registers onto the user's stack, switch there, pop and
+       return.  */
+
+    uintptr_t *usp = (uintptr_t *) scp->sc_ursp - 128;
+
+    *--usp = scp->sc_rip;
+    *--usp = scp->sc_rfl;
+    *--usp = scp->sc_rax;
+    *--usp = scp->sc_rcx;
+    *--usp = scp->sc_rdx;
+    *--usp = scp->sc_rbx;
+    *--usp = scp->sc_rbp;
+    *--usp = scp->sc_rsi;
+    *--usp = scp->sc_rdi;
+    *--usp = scp->sc_r15;
+    *--usp = scp->sc_r14;
+    *--usp = scp->sc_r13;
+    *--usp = scp->sc_r12;
+    *--usp = scp->sc_r11;
+    *--usp = scp->sc_r10;
+    *--usp = scp->sc_r9;
+    *--usp = scp->sc_r8;
+
+    /* Switch to the user's stack that we have just prepared, and jump off to
+       __sigreturn2.  Clobber "memory" to make sure GCC flushes the stack
+       setup to actual memory.  XXX: This ignores stack alignment requirements;
+       hopefully it's not going to matter since __sigreturn2 must not use the
+       FPU.  */
+    asm volatile ("movq %0, %%rsp\n"
+                  "jmp __sigreturn2" :
+                  : "rm" (usp), "D" (ss)
+                  : "memory");
+    __builtin_unreachable ();
+  }
+}
+
+weak_alias (__sigreturn, sigreturn)
-- 
2.39.2


^ permalink raw reply	[flat|nested] 140+ messages in thread

* [RFC PATCH glibc 33/34] hurd: Create abilist files for lib{mach,hurd}user
  2023-03-19 15:09 [RFC PATCH 00/34] The rest of the x86_64-gnu port Sergey Bugaev
                   ` (31 preceding siblings ...)
  2023-03-19 15:10 ` [RFC PATCH glibc 32/34] hurd: Implement sigreturn for x86_64 Sergey Bugaev
@ 2023-03-19 15:10 ` Sergey Bugaev
  2023-03-19 15:19   ` Samuel Thibault
  2023-03-19 15:10 ` [RFC PATCH glibc 34/34] hurd: Add expected abilist files for x86_64 Sergey Bugaev
                   ` (3 subsequent siblings)
  36 siblings, 1 reply; 140+ messages in thread
From: Sergey Bugaev @ 2023-03-19 15:10 UTC (permalink / raw)
  To: libc-alpha, bug-hurd; +Cc: Samuel Thibault, Sergey Bugaev

It looks like each specific port is supposed to provide abilist files
for all the built shared objects in its most nested sysdeps directory.
Do just that for libmachuser and libhurduser.

This was done by running 'make update-abi' and then moving the generated
files from sysdeps/mach/ and sysdeps/mach/hurd/ down to
sysdeps/mach/hurd/i386/, while keeping the base abilist versions empty.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
---
 sysdeps/mach/hurd/i386/libhurduser.abilist | 754 +++++++++++++++++++++
 sysdeps/mach/hurd/i386/libmachuser.abilist | 336 +++++++++
 2 files changed, 1090 insertions(+)
 create mode 100644 sysdeps/mach/hurd/i386/libhurduser.abilist
 create mode 100644 sysdeps/mach/hurd/i386/libmachuser.abilist

diff --git a/sysdeps/mach/hurd/i386/libhurduser.abilist b/sysdeps/mach/hurd/i386/libhurduser.abilist
new file mode 100644
index 00000000..39bf680b
--- /dev/null
+++ b/sysdeps/mach/hurd/i386/libhurduser.abilist
@@ -0,0 +1,754 @@
+Base _S_msg_server F
+Base _S_msg_server_routines D 0x64
+Base __auth_getids F
+Base __auth_makeauth F
+Base __auth_server_authenticate F
+Base __auth_user_authenticate F
+Base __crash_dump_task F
+Base __dir_link F
+Base __dir_lookup F
+Base __dir_mkdir F
+Base __dir_mkfile F
+Base __dir_notice_changes F
+Base __dir_readdir F
+Base __dir_rename F
+Base __dir_rmdir F
+Base __dir_unlink F
+Base __exec_exec F
+Base __exec_exec_paths F
+Base __exec_init F
+Base __exec_setexecdata F
+Base __exec_startup_get_info F
+Base __file_chauthor F
+Base __file_check_access F
+Base __file_chflags F
+Base __file_chmod F
+Base __file_chown F
+Base __file_exec F
+Base __file_exec_paths F
+Base __file_get_fs_options F
+Base __file_get_storage_info F
+Base __file_get_translator F
+Base __file_get_translator_cntl F
+Base __file_getcontrol F
+Base __file_getfh F
+Base __file_getlinknode F
+Base __file_lock F
+Base __file_lock_stat F
+Base __file_notice_changes F
+Base __file_record_lock F
+Base __file_reparent F
+Base __file_set_size F
+Base __file_set_translator F
+Base __file_statfs F
+Base __file_sync F
+Base __file_syncfs F
+Base __file_utimens F
+Base __file_utimes F
+Base __fsys_forward F
+Base __fsys_get_children F
+Base __fsys_get_options F
+Base __fsys_get_source F
+Base __fsys_getfile F
+Base __fsys_getpriv F
+Base __fsys_getroot F
+Base __fsys_goaway F
+Base __fsys_init F
+Base __fsys_set_options F
+Base __fsys_startup F
+Base __fsys_syncfs F
+Base __gsync_wait_intr F
+Base __ifsock_getsockaddr F
+Base __interrupt_operation F
+Base __io_async F
+Base __io_async_reply F
+Base __io_async_request F
+Base __io_clear_some_openmodes F
+Base __io_clear_some_openmodes_reply F
+Base __io_clear_some_openmodes_request F
+Base __io_duplicate F
+Base __io_duplicate_reply F
+Base __io_duplicate_request F
+Base __io_eofnotify F
+Base __io_eofnotify_reply F
+Base __io_eofnotify_request F
+Base __io_get_conch F
+Base __io_get_conch_reply F
+Base __io_get_conch_request F
+Base __io_get_icky_async_id F
+Base __io_get_icky_async_id_reply F
+Base __io_get_icky_async_id_request F
+Base __io_get_openmodes F
+Base __io_get_openmodes_reply F
+Base __io_get_openmodes_request F
+Base __io_get_owner F
+Base __io_get_owner_reply F
+Base __io_get_owner_request F
+Base __io_identity F
+Base __io_identity_reply F
+Base __io_identity_request F
+Base __io_map F
+Base __io_map_cntl F
+Base __io_map_cntl_reply F
+Base __io_map_cntl_request F
+Base __io_map_reply F
+Base __io_map_request F
+Base __io_mod_owner F
+Base __io_mod_owner_reply F
+Base __io_mod_owner_request F
+Base __io_pathconf F
+Base __io_pathconf_reply F
+Base __io_pathconf_request F
+Base __io_postnotify F
+Base __io_postnotify_reply F
+Base __io_postnotify_request F
+Base __io_prenotify F
+Base __io_prenotify_reply F
+Base __io_prenotify_request F
+Base __io_read F
+Base __io_read_reply F
+Base __io_read_request F
+Base __io_readable F
+Base __io_readable_reply F
+Base __io_readable_request F
+Base __io_readnotify F
+Base __io_readnotify_reply F
+Base __io_readnotify_request F
+Base __io_readsleep F
+Base __io_readsleep_reply F
+Base __io_readsleep_request F
+Base __io_reauthenticate F
+Base __io_release_conch F
+Base __io_release_conch_reply F
+Base __io_release_conch_request F
+Base __io_restrict_auth F
+Base __io_restrict_auth_reply F
+Base __io_restrict_auth_request F
+Base __io_revoke F
+Base __io_revoke_reply F
+Base __io_revoke_request F
+Base __io_seek F
+Base __io_seek_reply F
+Base __io_seek_request F
+Base __io_select F
+Base __io_select_reply F
+Base __io_select_request F
+Base __io_select_timeout F
+Base __io_select_timeout_reply F
+Base __io_select_timeout_request F
+Base __io_server_version F
+Base __io_server_version_reply F
+Base __io_server_version_request F
+Base __io_set_all_openmodes F
+Base __io_set_all_openmodes_reply F
+Base __io_set_all_openmodes_request F
+Base __io_set_some_openmodes F
+Base __io_set_some_openmodes_reply F
+Base __io_set_some_openmodes_request F
+Base __io_sigio F
+Base __io_sigio_reply F
+Base __io_sigio_request F
+Base __io_stat F
+Base __io_stat_reply F
+Base __io_stat_request F
+Base __io_write F
+Base __io_write_reply F
+Base __io_write_request F
+Base __login_get_idle_time F
+Base __login_get_input_devices F
+Base __login_get_location F
+Base __login_get_login_collection F
+Base __login_message_user F
+Base __msg_add_auth F
+Base __msg_del_auth F
+Base __msg_describe_ports F
+Base __msg_get_dtable F
+Base __msg_get_env_variable F
+Base __msg_get_environment F
+Base __msg_get_fd F
+Base __msg_get_init_int F
+Base __msg_get_init_ints F
+Base __msg_get_init_port F
+Base __msg_get_init_ports F
+Base __msg_proc_newids F
+Base __msg_report_wait F
+Base __msg_set_dtable F
+Base __msg_set_env_variable F
+Base __msg_set_environment F
+Base __msg_set_fd F
+Base __msg_set_init_int F
+Base __msg_set_init_ints F
+Base __msg_set_init_port F
+Base __msg_set_init_ports F
+Base __msg_sig_post F
+Base __msg_sig_post_reply F
+Base __msg_sig_post_request F
+Base __msg_sig_post_untraced F
+Base __msg_sig_post_untraced_reply F
+Base __msg_sig_post_untraced_request F
+Base __password_check_group F
+Base __password_check_user F
+Base __pci_conf_read F
+Base __pci_conf_write F
+Base __pci_get_dev_regions F
+Base __pci_get_dev_rom F
+Base __pci_get_ndevs F
+Base __pfinet_getroutes F
+Base __pfinet_siocgifconf F
+Base __proc_child F
+Base __proc_child_request F
+Base __proc_dostop F
+Base __proc_dostop_request F
+Base __proc_execdata_notify F
+Base __proc_execdata_notify_request F
+Base __proc_get_arg_locations F
+Base __proc_get_arg_locations_request F
+Base __proc_get_code F
+Base __proc_get_code_request F
+Base __proc_get_entry F
+Base __proc_get_exe F
+Base __proc_get_tty F
+Base __proc_get_tty_request F
+Base __proc_getallpids F
+Base __proc_getallpids_request F
+Base __proc_getexecdata F
+Base __proc_getexecdata_request F
+Base __proc_getlogin F
+Base __proc_getlogin_request F
+Base __proc_getloginid F
+Base __proc_getloginid_request F
+Base __proc_getloginpids F
+Base __proc_getloginpids_request F
+Base __proc_getmsgport F
+Base __proc_getmsgport_request F
+Base __proc_getnports F
+Base __proc_getnports_request F
+Base __proc_getpgrp F
+Base __proc_getpgrp_request F
+Base __proc_getpgrppids F
+Base __proc_getpgrppids_request F
+Base __proc_getpids F
+Base __proc_getpids_request F
+Base __proc_getprivports F
+Base __proc_getprivports_request F
+Base __proc_getprocargs F
+Base __proc_getprocargs_request F
+Base __proc_getprocenv F
+Base __proc_getprocenv_request F
+Base __proc_getprocinfo F
+Base __proc_getprocinfo_request F
+Base __proc_getsessionpgids F
+Base __proc_getsessionpgids_request F
+Base __proc_getsessionpids F
+Base __proc_getsessionpids_request F
+Base __proc_getsid F
+Base __proc_getsid_request F
+Base __proc_getsidport F
+Base __proc_getsidport_request F
+Base __proc_handle_exceptions F
+Base __proc_handle_exceptions_request F
+Base __proc_is_important F
+Base __proc_is_important_request F
+Base __proc_make_login_coll F
+Base __proc_make_login_coll_request F
+Base __proc_make_task_namespace F
+Base __proc_make_task_namespace_request F
+Base __proc_mark_cont F
+Base __proc_mark_cont_request F
+Base __proc_mark_exec F
+Base __proc_mark_exec_request F
+Base __proc_mark_exit F
+Base __proc_mark_exit_request F
+Base __proc_mark_important F
+Base __proc_mark_important_request F
+Base __proc_mark_stop F
+Base __proc_mark_stop_request F
+Base __proc_mark_traced F
+Base __proc_mark_traced_request F
+Base __proc_mod_stopchild F
+Base __proc_mod_stopchild_request F
+Base __proc_pid2proc F
+Base __proc_pid2proc_request F
+Base __proc_pid2task F
+Base __proc_pid2task_request F
+Base __proc_proc2task F
+Base __proc_proc2task_request F
+Base __proc_reassign F
+Base __proc_reassign_request F
+Base __proc_reauthenticate F
+Base __proc_reauthenticate_complete F
+Base __proc_reauthenticate_reassign F
+Base __proc_reauthenticate_request F
+Base __proc_register_version F
+Base __proc_register_version_request F
+Base __proc_set_arg_locations F
+Base __proc_set_arg_locations_request F
+Base __proc_set_code F
+Base __proc_set_code_request F
+Base __proc_set_entry F
+Base __proc_set_exe F
+Base __proc_set_init_task F
+Base __proc_set_init_task_request F
+Base __proc_setexecdata F
+Base __proc_setexecdata_request F
+Base __proc_setlogin F
+Base __proc_setlogin_request F
+Base __proc_setmsgport F
+Base __proc_setmsgport_request F
+Base __proc_setowner F
+Base __proc_setowner_request F
+Base __proc_setpgrp F
+Base __proc_setpgrp_request F
+Base __proc_setsid F
+Base __proc_setsid_request F
+Base __proc_task2pid F
+Base __proc_task2pid_request F
+Base __proc_task2proc F
+Base __proc_task2proc_request F
+Base __proc_uname F
+Base __proc_uname_request F
+Base __proc_wait F
+Base __proc_wait_request F
+Base __proc_waitid F
+Base __socket_accept F
+Base __socket_bind F
+Base __socket_connect F
+Base __socket_connect2 F
+Base __socket_create F
+Base __socket_create_address F
+Base __socket_fabricate_address F
+Base __socket_getopt F
+Base __socket_listen F
+Base __socket_name F
+Base __socket_peername F
+Base __socket_recv F
+Base __socket_send F
+Base __socket_setopt F
+Base __socket_shutdown F
+Base __socket_whatis_address F
+Base __startup_authinit F
+Base __startup_essential_task F
+Base __startup_procinit F
+Base __startup_reboot F
+Base __startup_request_notification F
+Base __term_get_bottom_type F
+Base __term_get_nodename F
+Base __term_get_peername F
+Base __term_getctty F
+Base __term_on_hurddev F
+Base __term_on_machdev F
+Base __term_on_pty F
+Base __term_open_ctty F
+Base __term_set_filenode F
+Base __term_set_nodename F
+Base __termctty_open_terminal F
+Base __tioctl_tioccbrk F
+Base __tioctl_tioccdtr F
+Base __tioctl_tiocdrain F
+Base __tioctl_tiocexcl F
+Base __tioctl_tiocext F
+Base __tioctl_tiocflush F
+Base __tioctl_tiocgeta F
+Base __tioctl_tiocgetd F
+Base __tioctl_tiocgpgrp F
+Base __tioctl_tiocgwinsz F
+Base __tioctl_tiocmbic F
+Base __tioctl_tiocmbis F
+Base __tioctl_tiocmget F
+Base __tioctl_tiocmodg F
+Base __tioctl_tiocmods F
+Base __tioctl_tiocmset F
+Base __tioctl_tiocnxcl F
+Base __tioctl_tiocoutq F
+Base __tioctl_tiocpkt F
+Base __tioctl_tiocremote F
+Base __tioctl_tiocsbrk F
+Base __tioctl_tiocsdtr F
+Base __tioctl_tiocseta F
+Base __tioctl_tiocsetaf F
+Base __tioctl_tiocsetaw F
+Base __tioctl_tiocsetd F
+Base __tioctl_tiocsig F
+Base __tioctl_tiocspgrp F
+Base __tioctl_tiocstart F
+Base __tioctl_tiocsti F
+Base __tioctl_tiocstop F
+Base __tioctl_tiocswinsz F
+Base __tioctl_tiocucntl F
+Base _hurdsig_fault_exc_server F
+Base _hurdsig_fault_exc_server_routines D 0x4
+Base auth_getids F
+Base auth_makeauth F
+Base auth_server_authenticate F
+Base auth_user_authenticate F
+Base crash_dump_task F
+Base dir_link F
+Base dir_lookup F
+Base dir_mkdir F
+Base dir_mkfile F
+Base dir_notice_changes F
+Base dir_readdir F
+Base dir_rename F
+Base dir_rmdir F
+Base dir_unlink F
+Base exec_exec F
+Base exec_exec_paths F
+Base exec_init F
+Base exec_setexecdata F
+Base exec_startup_get_info F
+Base file_chauthor F
+Base file_check_access F
+Base file_chflags F
+Base file_chmod F
+Base file_chown F
+Base file_exec F
+Base file_exec_paths F
+Base file_get_fs_options F
+Base file_get_storage_info F
+Base file_get_translator F
+Base file_get_translator_cntl F
+Base file_getcontrol F
+Base file_getfh F
+Base file_getlinknode F
+Base file_lock F
+Base file_lock_stat F
+Base file_notice_changes F
+Base file_record_lock F
+Base file_reparent F
+Base file_set_size F
+Base file_set_translator F
+Base file_statfs F
+Base file_sync F
+Base file_syncfs F
+Base file_utimens F
+Base file_utimes F
+Base fsys_forward F
+Base fsys_get_children F
+Base fsys_get_options F
+Base fsys_get_source F
+Base fsys_getfile F
+Base fsys_getpriv F
+Base fsys_getroot F
+Base fsys_goaway F
+Base fsys_init F
+Base fsys_set_options F
+Base fsys_startup F
+Base fsys_syncfs F
+Base gsync_wait_intr F
+Base ifsock_getsockaddr F
+Base interrupt_operation F
+Base io_async F
+Base io_async_reply F
+Base io_async_request F
+Base io_clear_some_openmodes F
+Base io_clear_some_openmodes_reply F
+Base io_clear_some_openmodes_request F
+Base io_duplicate F
+Base io_duplicate_reply F
+Base io_duplicate_request F
+Base io_eofnotify F
+Base io_eofnotify_reply F
+Base io_eofnotify_request F
+Base io_get_conch F
+Base io_get_conch_reply F
+Base io_get_conch_request F
+Base io_get_icky_async_id F
+Base io_get_icky_async_id_reply F
+Base io_get_icky_async_id_request F
+Base io_get_openmodes F
+Base io_get_openmodes_reply F
+Base io_get_openmodes_request F
+Base io_get_owner F
+Base io_get_owner_reply F
+Base io_get_owner_request F
+Base io_identity F
+Base io_identity_reply F
+Base io_identity_request F
+Base io_map F
+Base io_map_cntl F
+Base io_map_cntl_reply F
+Base io_map_cntl_request F
+Base io_map_reply F
+Base io_map_request F
+Base io_mod_owner F
+Base io_mod_owner_reply F
+Base io_mod_owner_request F
+Base io_pathconf F
+Base io_pathconf_reply F
+Base io_pathconf_request F
+Base io_postnotify F
+Base io_postnotify_reply F
+Base io_postnotify_request F
+Base io_prenotify F
+Base io_prenotify_reply F
+Base io_prenotify_request F
+Base io_read F
+Base io_read_reply F
+Base io_read_request F
+Base io_readable F
+Base io_readable_reply F
+Base io_readable_request F
+Base io_readnotify F
+Base io_readnotify_reply F
+Base io_readnotify_request F
+Base io_readsleep F
+Base io_readsleep_reply F
+Base io_readsleep_request F
+Base io_reauthenticate F
+Base io_release_conch F
+Base io_release_conch_reply F
+Base io_release_conch_request F
+Base io_restrict_auth F
+Base io_restrict_auth_reply F
+Base io_restrict_auth_request F
+Base io_revoke F
+Base io_revoke_reply F
+Base io_revoke_request F
+Base io_seek F
+Base io_seek_reply F
+Base io_seek_request F
+Base io_select F
+Base io_select_reply F
+Base io_select_request F
+Base io_select_timeout F
+Base io_select_timeout_reply F
+Base io_select_timeout_request F
+Base io_server_version F
+Base io_server_version_reply F
+Base io_server_version_request F
+Base io_set_all_openmodes F
+Base io_set_all_openmodes_reply F
+Base io_set_all_openmodes_request F
+Base io_set_some_openmodes F
+Base io_set_some_openmodes_reply F
+Base io_set_some_openmodes_request F
+Base io_sigio F
+Base io_sigio_reply F
+Base io_sigio_request F
+Base io_stat F
+Base io_stat_reply F
+Base io_stat_request F
+Base io_write F
+Base io_write_reply F
+Base io_write_request F
+Base login_get_idle_time F
+Base login_get_input_devices F
+Base login_get_location F
+Base login_get_login_collection F
+Base login_message_user F
+Base msg_add_auth F
+Base msg_del_auth F
+Base msg_describe_ports F
+Base msg_get_dtable F
+Base msg_get_env_variable F
+Base msg_get_environment F
+Base msg_get_fd F
+Base msg_get_init_int F
+Base msg_get_init_ints F
+Base msg_get_init_port F
+Base msg_get_init_ports F
+Base msg_proc_newids F
+Base msg_report_wait F
+Base msg_set_dtable F
+Base msg_set_env_variable F
+Base msg_set_environment F
+Base msg_set_fd F
+Base msg_set_init_int F
+Base msg_set_init_ints F
+Base msg_set_init_port F
+Base msg_set_init_ports F
+Base msg_sig_post F
+Base msg_sig_post_reply F
+Base msg_sig_post_request F
+Base msg_sig_post_untraced F
+Base msg_sig_post_untraced_reply F
+Base msg_sig_post_untraced_request F
+Base password_check_group F
+Base password_check_user F
+Base pci_conf_read F
+Base pci_conf_write F
+Base pci_get_dev_regions F
+Base pci_get_dev_rom F
+Base pci_get_ndevs F
+Base pfinet_getroutes F
+Base pfinet_siocgifconf F
+Base proc_child F
+Base proc_child_request F
+Base proc_dostop F
+Base proc_dostop_request F
+Base proc_execdata_notify F
+Base proc_execdata_notify_request F
+Base proc_get_arg_locations F
+Base proc_get_arg_locations_request F
+Base proc_get_code F
+Base proc_get_code_request F
+Base proc_get_entry F
+Base proc_get_exe F
+Base proc_get_tty F
+Base proc_get_tty_request F
+Base proc_getallpids F
+Base proc_getallpids_request F
+Base proc_getexecdata F
+Base proc_getexecdata_request F
+Base proc_getlogin F
+Base proc_getlogin_request F
+Base proc_getloginid F
+Base proc_getloginid_request F
+Base proc_getloginpids F
+Base proc_getloginpids_request F
+Base proc_getmsgport F
+Base proc_getmsgport_request F
+Base proc_getnports F
+Base proc_getnports_request F
+Base proc_getpgrp F
+Base proc_getpgrp_request F
+Base proc_getpgrppids F
+Base proc_getpgrppids_request F
+Base proc_getpids F
+Base proc_getpids_request F
+Base proc_getprivports F
+Base proc_getprivports_request F
+Base proc_getprocargs F
+Base proc_getprocargs_request F
+Base proc_getprocenv F
+Base proc_getprocenv_request F
+Base proc_getprocinfo F
+Base proc_getprocinfo_request F
+Base proc_getsessionpgids F
+Base proc_getsessionpgids_request F
+Base proc_getsessionpids F
+Base proc_getsessionpids_request F
+Base proc_getsid F
+Base proc_getsid_request F
+Base proc_getsidport F
+Base proc_getsidport_request F
+Base proc_handle_exceptions F
+Base proc_handle_exceptions_request F
+Base proc_is_important F
+Base proc_is_important_request F
+Base proc_make_login_coll F
+Base proc_make_login_coll_request F
+Base proc_make_task_namespace F
+Base proc_make_task_namespace_request F
+Base proc_mark_cont F
+Base proc_mark_cont_request F
+Base proc_mark_exec F
+Base proc_mark_exec_request F
+Base proc_mark_exit F
+Base proc_mark_exit_request F
+Base proc_mark_important F
+Base proc_mark_important_request F
+Base proc_mark_stop F
+Base proc_mark_stop_request F
+Base proc_mark_traced F
+Base proc_mark_traced_request F
+Base proc_mod_stopchild F
+Base proc_mod_stopchild_request F
+Base proc_pid2proc F
+Base proc_pid2proc_request F
+Base proc_pid2task F
+Base proc_pid2task_request F
+Base proc_proc2task F
+Base proc_proc2task_request F
+Base proc_reassign F
+Base proc_reassign_request F
+Base proc_reauthenticate F
+Base proc_reauthenticate_complete F
+Base proc_reauthenticate_reassign F
+Base proc_reauthenticate_request F
+Base proc_register_version F
+Base proc_register_version_request F
+Base proc_set_arg_locations F
+Base proc_set_arg_locations_request F
+Base proc_set_code F
+Base proc_set_code_request F
+Base proc_set_entry F
+Base proc_set_exe F
+Base proc_set_init_task F
+Base proc_set_init_task_request F
+Base proc_setexecdata F
+Base proc_setexecdata_request F
+Base proc_setlogin F
+Base proc_setlogin_request F
+Base proc_setmsgport F
+Base proc_setmsgport_request F
+Base proc_setowner F
+Base proc_setowner_request F
+Base proc_setpgrp F
+Base proc_setpgrp_request F
+Base proc_setsid F
+Base proc_setsid_request F
+Base proc_task2pid F
+Base proc_task2pid_request F
+Base proc_task2proc F
+Base proc_task2proc_request F
+Base proc_uname F
+Base proc_uname_request F
+Base proc_wait F
+Base proc_wait_request F
+Base proc_waitid F
+Base socket_accept F
+Base socket_bind F
+Base socket_connect F
+Base socket_connect2 F
+Base socket_create F
+Base socket_create_address F
+Base socket_fabricate_address F
+Base socket_getopt F
+Base socket_listen F
+Base socket_name F
+Base socket_peername F
+Base socket_recv F
+Base socket_send F
+Base socket_setopt F
+Base socket_shutdown F
+Base socket_whatis_address F
+Base startup_authinit F
+Base startup_essential_task F
+Base startup_procinit F
+Base startup_reboot F
+Base startup_request_notification F
+Base term_get_bottom_type F
+Base term_get_nodename F
+Base term_get_peername F
+Base term_getctty F
+Base term_on_hurddev F
+Base term_on_machdev F
+Base term_on_pty F
+Base term_open_ctty F
+Base term_set_filenode F
+Base term_set_nodename F
+Base termctty_open_terminal F
+Base tioctl_tioccbrk F
+Base tioctl_tioccdtr F
+Base tioctl_tiocdrain F
+Base tioctl_tiocexcl F
+Base tioctl_tiocext F
+Base tioctl_tiocflush F
+Base tioctl_tiocgeta F
+Base tioctl_tiocgetd F
+Base tioctl_tiocgpgrp F
+Base tioctl_tiocgwinsz F
+Base tioctl_tiocmbic F
+Base tioctl_tiocmbis F
+Base tioctl_tiocmget F
+Base tioctl_tiocmodg F
+Base tioctl_tiocmods F
+Base tioctl_tiocmset F
+Base tioctl_tiocnxcl F
+Base tioctl_tiocoutq F
+Base tioctl_tiocpkt F
+Base tioctl_tiocremote F
+Base tioctl_tiocsbrk F
+Base tioctl_tiocsdtr F
+Base tioctl_tiocseta F
+Base tioctl_tiocsetaf F
+Base tioctl_tiocsetaw F
+Base tioctl_tiocsetd F
+Base tioctl_tiocsig F
+Base tioctl_tiocspgrp F
+Base tioctl_tiocstart F
+Base tioctl_tiocsti F
+Base tioctl_tiocstop F
+Base tioctl_tiocswinsz F
+Base tioctl_tiocucntl F
diff --git a/sysdeps/mach/hurd/i386/libmachuser.abilist b/sysdeps/mach/hurd/i386/libmachuser.abilist
new file mode 100644
index 00000000..49ee5924
--- /dev/null
+++ b/sysdeps/mach/hurd/i386/libmachuser.abilist
@@ -0,0 +1,336 @@
+Base _S_exc_server F
+Base _S_exc_server_routines D 0x4
+Base __default_pager_info F
+Base __default_pager_object_create F
+Base __default_pager_object_pages F
+Base __default_pager_objects F
+Base __default_pager_paging_file F
+Base __default_pager_register_fileserver F
+Base __device_close F
+Base __device_get_status F
+Base __device_intr_ack F
+Base __device_intr_register F
+Base __device_map F
+Base __device_open F
+Base __device_open_request F
+Base __device_read F
+Base __device_read_inband F
+Base __device_read_request F
+Base __device_read_request_inband F
+Base __device_set_filter F
+Base __device_set_status F
+Base __device_write F
+Base __device_write_inband F
+Base __device_write_request F
+Base __device_write_request_inband F
+Base __exception_raise F
+Base __gsync_requeue F
+Base __gsync_wait F
+Base __gsync_wake F
+Base __host_adjust_time F
+Base __host_adjust_time64 F
+Base __host_get_boot_info F
+Base __host_get_time F
+Base __host_get_time64 F
+Base __host_info F
+Base __host_kernel_version F
+Base __host_processor_set_priv F
+Base __host_processor_sets F
+Base __host_processors F
+Base __host_reboot F
+Base __host_set_time F
+Base __host_set_time64 F
+Base __i386_get_gdt F
+Base __i386_get_ldt F
+Base __i386_io_perm_create F
+Base __i386_io_perm_modify F
+Base __i386_set_gdt F
+Base __i386_set_ldt F
+Base __mach_notify_new_task F
+Base __mach_port_allocate_name_rpc F
+Base __mach_port_allocate_rpc F
+Base __mach_port_clear_protected_payload F
+Base __mach_port_deallocate_rpc F
+Base __mach_port_destroy F
+Base __mach_port_extract_right F
+Base __mach_port_get_receive_status F
+Base __mach_port_get_refs F
+Base __mach_port_get_set_status F
+Base __mach_port_insert_right_rpc F
+Base __mach_port_mod_refs F
+Base __mach_port_move_member F
+Base __mach_port_names F
+Base __mach_port_rename F
+Base __mach_port_request_notification F
+Base __mach_port_set_mscount F
+Base __mach_port_set_protected_payload F
+Base __mach_port_set_qlimit F
+Base __mach_port_set_seqno F
+Base __mach_port_type F
+Base __mach_ports_lookup F
+Base __mach_ports_register F
+Base __memory_object_change_attributes F
+Base __memory_object_change_completed F
+Base __memory_object_copy F
+Base __memory_object_create F
+Base __memory_object_create_proxy F
+Base __memory_object_data_error F
+Base __memory_object_data_initialize F
+Base __memory_object_data_request F
+Base __memory_object_data_return F
+Base __memory_object_data_supply F
+Base __memory_object_data_unavailable F
+Base __memory_object_data_unlock F
+Base __memory_object_destroy F
+Base __memory_object_get_attributes F
+Base __memory_object_init F
+Base __memory_object_lock_completed F
+Base __memory_object_lock_request F
+Base __memory_object_ready F
+Base __memory_object_supply_completed F
+Base __memory_object_terminate F
+Base __processor_assign F
+Base __processor_control F
+Base __processor_exit F
+Base __processor_get_assignment F
+Base __processor_info F
+Base __processor_set_create F
+Base __processor_set_default F
+Base __processor_set_destroy F
+Base __processor_set_info F
+Base __processor_set_max_priority F
+Base __processor_set_policy_disable F
+Base __processor_set_policy_enable F
+Base __processor_set_tasks F
+Base __processor_set_threads F
+Base __processor_start F
+Base __register_new_task_notification F
+Base __task_assign F
+Base __task_assign_default F
+Base __task_create_rpc F
+Base __task_disable_pc_sampling F
+Base __task_enable_pc_sampling F
+Base __task_get_assignment F
+Base __task_get_emulation_vector F
+Base __task_get_sampled_pcs F
+Base __task_get_special_port F
+Base __task_info F
+Base __task_priority F
+Base __task_ras_control F
+Base __task_resume F
+Base __task_set_emulation F
+Base __task_set_emulation_vector F
+Base __task_set_essential F
+Base __task_set_name F
+Base __task_set_special_port_rpc F
+Base __task_suspend_rpc F
+Base __task_terminate_rpc F
+Base __task_threads F
+Base __thread_abort F
+Base __thread_assign F
+Base __thread_assign_default F
+Base __thread_create F
+Base __thread_depress_abort_rpc F
+Base __thread_disable_pc_sampling F
+Base __thread_enable_pc_sampling F
+Base __thread_get_assignment F
+Base __thread_get_sampled_pcs F
+Base __thread_get_special_port F
+Base __thread_get_state F
+Base __thread_info F
+Base __thread_max_priority F
+Base __thread_policy F
+Base __thread_priority F
+Base __thread_resume F
+Base __thread_set_special_port F
+Base __thread_set_state F
+Base __thread_suspend F
+Base __thread_terminate F
+Base __thread_terminate_release F
+Base __thread_wire F
+Base __vm_allocate_contiguous F
+Base __vm_allocate_rpc F
+Base __vm_cache_statistics F
+Base __vm_copy F
+Base __vm_deallocate_rpc F
+Base __vm_inherit F
+Base __vm_machine_attribute F
+Base __vm_map_rpc F
+Base __vm_msync F
+Base __vm_object_sync F
+Base __vm_protect F
+Base __vm_read F
+Base __vm_region F
+Base __vm_region_create_proxy F
+Base __vm_set_default_memory_manager F
+Base __vm_statistics F
+Base __vm_wire F
+Base __vm_wire_all F
+Base __vm_write F
+Base default_pager_info F
+Base default_pager_object_create F
+Base default_pager_object_pages F
+Base default_pager_objects F
+Base default_pager_paging_file F
+Base default_pager_register_fileserver F
+Base device_close F
+Base device_get_status F
+Base device_intr_ack F
+Base device_intr_register F
+Base device_map F
+Base device_open F
+Base device_open_request F
+Base device_read F
+Base device_read_inband F
+Base device_read_request F
+Base device_read_request_inband F
+Base device_set_filter F
+Base device_set_status F
+Base device_write F
+Base device_write_inband F
+Base device_write_request F
+Base device_write_request_inband F
+Base exception_raise F
+Base gsync_requeue F
+Base gsync_wait F
+Base gsync_wake F
+Base host_adjust_time F
+Base host_adjust_time64 F
+Base host_get_boot_info F
+Base host_get_time F
+Base host_get_time64 F
+Base host_info F
+Base host_kernel_version F
+Base host_processor_set_priv F
+Base host_processor_sets F
+Base host_processors F
+Base host_reboot F
+Base host_set_time F
+Base host_set_time64 F
+Base i386_get_gdt F
+Base i386_get_ldt F
+Base i386_io_perm_create F
+Base i386_io_perm_modify F
+Base i386_set_gdt F
+Base i386_set_ldt F
+Base mach_notify_new_task F
+Base mach_port_allocate_name_rpc F
+Base mach_port_allocate_rpc F
+Base mach_port_clear_protected_payload F
+Base mach_port_deallocate_rpc F
+Base mach_port_destroy F
+Base mach_port_extract_right F
+Base mach_port_get_receive_status F
+Base mach_port_get_refs F
+Base mach_port_get_set_status F
+Base mach_port_insert_right_rpc F
+Base mach_port_mod_refs F
+Base mach_port_move_member F
+Base mach_port_names F
+Base mach_port_rename F
+Base mach_port_request_notification F
+Base mach_port_set_mscount F
+Base mach_port_set_protected_payload F
+Base mach_port_set_qlimit F
+Base mach_port_set_seqno F
+Base mach_port_type F
+Base mach_ports_lookup F
+Base mach_ports_register F
+Base memory_object_change_attributes F
+Base memory_object_change_completed F
+Base memory_object_copy F
+Base memory_object_create F
+Base memory_object_create_proxy F
+Base memory_object_data_error F
+Base memory_object_data_initialize F
+Base memory_object_data_request F
+Base memory_object_data_return F
+Base memory_object_data_supply F
+Base memory_object_data_unavailable F
+Base memory_object_data_unlock F
+Base memory_object_destroy F
+Base memory_object_get_attributes F
+Base memory_object_init F
+Base memory_object_lock_completed F
+Base memory_object_lock_request F
+Base memory_object_ready F
+Base memory_object_supply_completed F
+Base memory_object_terminate F
+Base processor_assign F
+Base processor_control F
+Base processor_exit F
+Base processor_get_assignment F
+Base processor_info F
+Base processor_set_create F
+Base processor_set_default F
+Base processor_set_destroy F
+Base processor_set_info F
+Base processor_set_max_priority F
+Base processor_set_policy_disable F
+Base processor_set_policy_enable F
+Base processor_set_tasks F
+Base processor_set_threads F
+Base processor_start F
+Base register_new_task_notification F
+Base task_assign F
+Base task_assign_default F
+Base task_create_rpc F
+Base task_disable_pc_sampling F
+Base task_enable_pc_sampling F
+Base task_get_assignment F
+Base task_get_emulation_vector F
+Base task_get_sampled_pcs F
+Base task_get_special_port F
+Base task_info F
+Base task_priority F
+Base task_ras_control F
+Base task_resume F
+Base task_set_emulation F
+Base task_set_emulation_vector F
+Base task_set_essential F
+Base task_set_name F
+Base task_set_special_port_rpc F
+Base task_suspend_rpc F
+Base task_terminate_rpc F
+Base task_threads F
+Base thread_abort F
+Base thread_assign F
+Base thread_assign_default F
+Base thread_create F
+Base thread_depress_abort_rpc F
+Base thread_disable_pc_sampling F
+Base thread_enable_pc_sampling F
+Base thread_get_assignment F
+Base thread_get_sampled_pcs F
+Base thread_get_special_port F
+Base thread_get_state F
+Base thread_info F
+Base thread_max_priority F
+Base thread_policy F
+Base thread_priority F
+Base thread_resume F
+Base thread_set_special_port F
+Base thread_set_state F
+Base thread_suspend F
+Base thread_terminate F
+Base thread_terminate_release F
+Base thread_wire F
+Base vm_allocate_contiguous F
+Base vm_allocate_rpc F
+Base vm_cache_statistics F
+Base vm_copy F
+Base vm_deallocate_rpc F
+Base vm_inherit F
+Base vm_machine_attribute F
+Base vm_map_rpc F
+Base vm_msync F
+Base vm_object_sync F
+Base vm_protect F
+Base vm_read F
+Base vm_region F
+Base vm_region_create_proxy F
+Base vm_set_default_memory_manager F
+Base vm_statistics F
+Base vm_wire F
+Base vm_wire_all F
+Base vm_write F
-- 
2.39.2


^ permalink raw reply	[flat|nested] 140+ messages in thread

* [RFC PATCH glibc 34/34] hurd: Add expected abilist files for x86_64
  2023-03-19 15:09 [RFC PATCH 00/34] The rest of the x86_64-gnu port Sergey Bugaev
                   ` (32 preceding siblings ...)
  2023-03-19 15:10 ` [RFC PATCH glibc 33/34] hurd: Create abilist files for lib{mach,hurd}user Sergey Bugaev
@ 2023-03-19 15:10 ` Sergey Bugaev
  2023-03-19 18:04   ` Florian Weimer
  2023-03-19 16:44 ` [RFC PATCH 00/34] The rest of the x86_64-gnu port Luca
                   ` (2 subsequent siblings)
  36 siblings, 1 reply; 140+ messages in thread
From: Sergey Bugaev @ 2023-03-19 15:10 UTC (permalink / raw)
  To: libc-alpha, bug-hurd; +Cc: Samuel Thibault, Sergey Bugaev

These were created by creating stub files, running 'make update-abi',
and reviewing the results.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
---
 sysdeps/mach/hurd/x86_64/ld.abilist           |   18 +
 .../mach/hurd/x86_64/libBrokenLocale.abilist  |    1 +
 sysdeps/mach/hurd/x86_64/libanl.abilist       |    4 +
 sysdeps/mach/hurd/x86_64/libc.abilist         | 2416 +++++++++++++++++
 .../hurd/x86_64/libc_malloc_debug.abilist     |   28 +
 sysdeps/mach/hurd/x86_64/libcrypt.abilist     |    7 +
 sysdeps/mach/hurd/x86_64/libdl.abilist        |    3 +
 sysdeps/mach/hurd/x86_64/libhurduser.abilist  |  754 +++++
 sysdeps/mach/hurd/x86_64/libm.abilist         | 1181 ++++++++
 sysdeps/mach/hurd/x86_64/libmachuser.abilist  |  336 +++
 sysdeps/mach/hurd/x86_64/libmvec.abilist      |  216 ++
 sysdeps/mach/hurd/x86_64/libnsl.abilist       |  121 +
 sysdeps/mach/hurd/x86_64/libpthread.abilist   |  178 ++
 sysdeps/mach/hurd/x86_64/libresolv.abilist    |   67 +
 sysdeps/mach/hurd/x86_64/librt.abilist        |   35 +
 sysdeps/mach/hurd/x86_64/libutil.abilist      |    1 +
 16 files changed, 5366 insertions(+)
 create mode 100644 sysdeps/mach/hurd/x86_64/ld.abilist
 create mode 100644 sysdeps/mach/hurd/x86_64/libBrokenLocale.abilist
 create mode 100644 sysdeps/mach/hurd/x86_64/libanl.abilist
 create mode 100644 sysdeps/mach/hurd/x86_64/libc.abilist
 create mode 100644 sysdeps/mach/hurd/x86_64/libc_malloc_debug.abilist
 create mode 100644 sysdeps/mach/hurd/x86_64/libcrypt.abilist
 create mode 100644 sysdeps/mach/hurd/x86_64/libdl.abilist
 create mode 100644 sysdeps/mach/hurd/x86_64/libhurduser.abilist
 create mode 100644 sysdeps/mach/hurd/x86_64/libm.abilist
 create mode 100644 sysdeps/mach/hurd/x86_64/libmachuser.abilist
 create mode 100644 sysdeps/mach/hurd/x86_64/libmvec.abilist
 create mode 100644 sysdeps/mach/hurd/x86_64/libnsl.abilist
 create mode 100644 sysdeps/mach/hurd/x86_64/libpthread.abilist
 create mode 100644 sysdeps/mach/hurd/x86_64/libresolv.abilist
 create mode 100644 sysdeps/mach/hurd/x86_64/librt.abilist
 create mode 100644 sysdeps/mach/hurd/x86_64/libutil.abilist

diff --git a/sysdeps/mach/hurd/x86_64/ld.abilist b/sysdeps/mach/hurd/x86_64/ld.abilist
new file mode 100644
index 00000000..db27ded1
--- /dev/null
+++ b/sysdeps/mach/hurd/x86_64/ld.abilist
@@ -0,0 +1,18 @@
+GLIBC_2.2.6 __close F
+GLIBC_2.2.6 __errno_location F
+GLIBC_2.2.6 __getpid F
+GLIBC_2.2.6 __libc_stack_end D 0x8
+GLIBC_2.2.6 __mmap F
+GLIBC_2.2.6 __open F
+GLIBC_2.2.6 __open64 F
+GLIBC_2.2.6 __pread64 F
+GLIBC_2.2.6 __read F
+GLIBC_2.2.6 __sbrk F
+GLIBC_2.2.6 __write F
+GLIBC_2.2.6 __writev F
+GLIBC_2.2.6 _dl_mcount F
+GLIBC_2.2.6 _hurd_intr_rpc_mach_msg F
+GLIBC_2.2.6 _r_debug D 0x28
+GLIBC_2.2.6 abort F
+GLIBC_2.3 __tls_get_addr F
+GLIBC_2.34 __rtld_version_placeholder F
diff --git a/sysdeps/mach/hurd/x86_64/libBrokenLocale.abilist b/sysdeps/mach/hurd/x86_64/libBrokenLocale.abilist
new file mode 100644
index 00000000..a0f854c7
--- /dev/null
+++ b/sysdeps/mach/hurd/x86_64/libBrokenLocale.abilist
@@ -0,0 +1 @@
+GLIBC_2.2.6 __ctype_get_mb_cur_max F
diff --git a/sysdeps/mach/hurd/x86_64/libanl.abilist b/sysdeps/mach/hurd/x86_64/libanl.abilist
new file mode 100644
index 00000000..123013b2
--- /dev/null
+++ b/sysdeps/mach/hurd/x86_64/libanl.abilist
@@ -0,0 +1,4 @@
+GLIBC_2.2.6 gai_cancel F
+GLIBC_2.2.6 gai_error F
+GLIBC_2.2.6 gai_suspend F
+GLIBC_2.2.6 getaddrinfo_a F
diff --git a/sysdeps/mach/hurd/x86_64/libc.abilist b/sysdeps/mach/hurd/x86_64/libc.abilist
new file mode 100644
index 00000000..e7e64a05
--- /dev/null
+++ b/sysdeps/mach/hurd/x86_64/libc.abilist
@@ -0,0 +1,2416 @@
+GLIBC_2.10 __cxa_at_quick_exit F
+GLIBC_2.10 __posix_getopt F
+GLIBC_2.10 accept4 F
+GLIBC_2.10 endsgent F
+GLIBC_2.10 fgetsgent F
+GLIBC_2.10 fgetsgent_r F
+GLIBC_2.10 getsgent F
+GLIBC_2.10 getsgent_r F
+GLIBC_2.10 getsgnam F
+GLIBC_2.10 getsgnam_r F
+GLIBC_2.10 malloc_info F
+GLIBC_2.10 preadv F
+GLIBC_2.10 preadv64 F
+GLIBC_2.10 psiginfo F
+GLIBC_2.10 putsgent F
+GLIBC_2.10 pwritev F
+GLIBC_2.10 pwritev64 F
+GLIBC_2.10 quick_exit F
+GLIBC_2.10 register_printf_modifier F
+GLIBC_2.10 register_printf_specifier F
+GLIBC_2.10 register_printf_type F
+GLIBC_2.10 setsgent F
+GLIBC_2.10 sgetsgent F
+GLIBC_2.10 sgetsgent_r F
+GLIBC_2.11 __longjmp_chk F
+GLIBC_2.11 execvpe F
+GLIBC_2.11 mkostemps F
+GLIBC_2.11 mkostemps64 F
+GLIBC_2.11 mkstemps F
+GLIBC_2.11 mkstemps64 F
+GLIBC_2.13 __fentry__ F
+GLIBC_2.14 memcpy F
+GLIBC_2.14 syncfs F
+GLIBC_2.15 __fdelt_chk F
+GLIBC_2.15 __fdelt_warn F
+GLIBC_2.15 posix_spawn F
+GLIBC_2.15 posix_spawnp F
+GLIBC_2.15 scandirat F
+GLIBC_2.15 scandirat64 F
+GLIBC_2.16 __getauxval F
+GLIBC_2.16 __poll_chk F
+GLIBC_2.16 __ppoll_chk F
+GLIBC_2.16 aligned_alloc F
+GLIBC_2.16 c16rtomb F
+GLIBC_2.16 c32rtomb F
+GLIBC_2.16 getauxval F
+GLIBC_2.16 mbrtoc16 F
+GLIBC_2.16 mbrtoc32 F
+GLIBC_2.16 timespec_get F
+GLIBC_2.17 clock_getcpuclockid F
+GLIBC_2.17 clock_getres F
+GLIBC_2.17 clock_gettime F
+GLIBC_2.17 clock_nanosleep F
+GLIBC_2.17 clock_settime F
+GLIBC_2.17 recvmmsg F
+GLIBC_2.17 secure_getenv F
+GLIBC_2.17 sendmmsg F
+GLIBC_2.18 __cxa_thread_atexit_impl F
+GLIBC_2.2.6 _Exit F
+GLIBC_2.2.6 _IO_2_1_stderr_ D 0xe0
+GLIBC_2.2.6 _IO_2_1_stdin_ D 0xe0
+GLIBC_2.2.6 _IO_2_1_stdout_ D 0xe0
+GLIBC_2.2.6 _IO_adjust_column F
+GLIBC_2.2.6 _IO_adjust_wcolumn F
+GLIBC_2.2.6 _IO_default_doallocate F
+GLIBC_2.2.6 _IO_default_finish F
+GLIBC_2.2.6 _IO_default_pbackfail F
+GLIBC_2.2.6 _IO_default_uflow F
+GLIBC_2.2.6 _IO_default_xsgetn F
+GLIBC_2.2.6 _IO_default_xsputn F
+GLIBC_2.2.6 _IO_do_write F
+GLIBC_2.2.6 _IO_doallocbuf F
+GLIBC_2.2.6 _IO_fclose F
+GLIBC_2.2.6 _IO_fdopen F
+GLIBC_2.2.6 _IO_feof F
+GLIBC_2.2.6 _IO_ferror F
+GLIBC_2.2.6 _IO_fflush F
+GLIBC_2.2.6 _IO_fgetpos F
+GLIBC_2.2.6 _IO_fgetpos64 F
+GLIBC_2.2.6 _IO_fgets F
+GLIBC_2.2.6 _IO_file_attach F
+GLIBC_2.2.6 _IO_file_close F
+GLIBC_2.2.6 _IO_file_close_it F
+GLIBC_2.2.6 _IO_file_doallocate F
+GLIBC_2.2.6 _IO_file_finish F
+GLIBC_2.2.6 _IO_file_fopen F
+GLIBC_2.2.6 _IO_file_init F
+GLIBC_2.2.6 _IO_file_jumps D 0xa8
+GLIBC_2.2.6 _IO_file_open F
+GLIBC_2.2.6 _IO_file_overflow F
+GLIBC_2.2.6 _IO_file_read F
+GLIBC_2.2.6 _IO_file_seek F
+GLIBC_2.2.6 _IO_file_seekoff F
+GLIBC_2.2.6 _IO_file_setbuf F
+GLIBC_2.2.6 _IO_file_stat F
+GLIBC_2.2.6 _IO_file_sync F
+GLIBC_2.2.6 _IO_file_underflow F
+GLIBC_2.2.6 _IO_file_write F
+GLIBC_2.2.6 _IO_file_xsputn F
+GLIBC_2.2.6 _IO_flockfile F
+GLIBC_2.2.6 _IO_flush_all F
+GLIBC_2.2.6 _IO_flush_all_linebuffered F
+GLIBC_2.2.6 _IO_fopen F
+GLIBC_2.2.6 _IO_fprintf F
+GLIBC_2.2.6 _IO_fputs F
+GLIBC_2.2.6 _IO_fread F
+GLIBC_2.2.6 _IO_free_backup_area F
+GLIBC_2.2.6 _IO_free_wbackup_area F
+GLIBC_2.2.6 _IO_fsetpos F
+GLIBC_2.2.6 _IO_fsetpos64 F
+GLIBC_2.2.6 _IO_ftell F
+GLIBC_2.2.6 _IO_ftrylockfile F
+GLIBC_2.2.6 _IO_funlockfile F
+GLIBC_2.2.6 _IO_fwrite F
+GLIBC_2.2.6 _IO_getc F
+GLIBC_2.2.6 _IO_getline F
+GLIBC_2.2.6 _IO_getline_info F
+GLIBC_2.2.6 _IO_gets F
+GLIBC_2.2.6 _IO_init F
+GLIBC_2.2.6 _IO_init_marker F
+GLIBC_2.2.6 _IO_init_wmarker F
+GLIBC_2.2.6 _IO_iter_begin F
+GLIBC_2.2.6 _IO_iter_end F
+GLIBC_2.2.6 _IO_iter_file F
+GLIBC_2.2.6 _IO_iter_next F
+GLIBC_2.2.6 _IO_least_wmarker F
+GLIBC_2.2.6 _IO_link_in F
+GLIBC_2.2.6 _IO_list_all D 0x8
+GLIBC_2.2.6 _IO_list_lock F
+GLIBC_2.2.6 _IO_list_resetlock F
+GLIBC_2.2.6 _IO_list_unlock F
+GLIBC_2.2.6 _IO_marker_delta F
+GLIBC_2.2.6 _IO_marker_difference F
+GLIBC_2.2.6 _IO_padn F
+GLIBC_2.2.6 _IO_peekc_locked F
+GLIBC_2.2.6 _IO_popen F
+GLIBC_2.2.6 _IO_printf F
+GLIBC_2.2.6 _IO_proc_close F
+GLIBC_2.2.6 _IO_proc_open F
+GLIBC_2.2.6 _IO_putc F
+GLIBC_2.2.6 _IO_puts F
+GLIBC_2.2.6 _IO_remove_marker F
+GLIBC_2.2.6 _IO_seekmark F
+GLIBC_2.2.6 _IO_seekoff F
+GLIBC_2.2.6 _IO_seekpos F
+GLIBC_2.2.6 _IO_seekwmark F
+GLIBC_2.2.6 _IO_setb F
+GLIBC_2.2.6 _IO_setbuffer F
+GLIBC_2.2.6 _IO_setvbuf F
+GLIBC_2.2.6 _IO_sgetn F
+GLIBC_2.2.6 _IO_sprintf F
+GLIBC_2.2.6 _IO_sputbackc F
+GLIBC_2.2.6 _IO_sputbackwc F
+GLIBC_2.2.6 _IO_sscanf F
+GLIBC_2.2.6 _IO_str_init_readonly F
+GLIBC_2.2.6 _IO_str_init_static F
+GLIBC_2.2.6 _IO_str_overflow F
+GLIBC_2.2.6 _IO_str_pbackfail F
+GLIBC_2.2.6 _IO_str_seekoff F
+GLIBC_2.2.6 _IO_str_underflow F
+GLIBC_2.2.6 _IO_sungetc F
+GLIBC_2.2.6 _IO_sungetwc F
+GLIBC_2.2.6 _IO_switch_to_get_mode F
+GLIBC_2.2.6 _IO_switch_to_main_wget_area F
+GLIBC_2.2.6 _IO_switch_to_wbackup_area F
+GLIBC_2.2.6 _IO_switch_to_wget_mode F
+GLIBC_2.2.6 _IO_un_link F
+GLIBC_2.2.6 _IO_ungetc F
+GLIBC_2.2.6 _IO_unsave_markers F
+GLIBC_2.2.6 _IO_unsave_wmarkers F
+GLIBC_2.2.6 _IO_vfprintf F
+GLIBC_2.2.6 _IO_vfscanf F
+GLIBC_2.2.6 _IO_vsprintf F
+GLIBC_2.2.6 _IO_wdefault_doallocate F
+GLIBC_2.2.6 _IO_wdefault_finish F
+GLIBC_2.2.6 _IO_wdefault_pbackfail F
+GLIBC_2.2.6 _IO_wdefault_uflow F
+GLIBC_2.2.6 _IO_wdefault_xsgetn F
+GLIBC_2.2.6 _IO_wdefault_xsputn F
+GLIBC_2.2.6 _IO_wdo_write F
+GLIBC_2.2.6 _IO_wdoallocbuf F
+GLIBC_2.2.6 _IO_wfile_jumps D 0xa8
+GLIBC_2.2.6 _IO_wfile_overflow F
+GLIBC_2.2.6 _IO_wfile_seekoff F
+GLIBC_2.2.6 _IO_wfile_sync F
+GLIBC_2.2.6 _IO_wfile_underflow F
+GLIBC_2.2.6 _IO_wfile_xsputn F
+GLIBC_2.2.6 _IO_wmarker_delta F
+GLIBC_2.2.6 _IO_wsetb F
+GLIBC_2.2.6 _S_catch_exception_raise F
+GLIBC_2.2.6 _S_msg_add_auth F
+GLIBC_2.2.6 _S_msg_del_auth F
+GLIBC_2.2.6 _S_msg_describe_ports F
+GLIBC_2.2.6 _S_msg_get_dtable F
+GLIBC_2.2.6 _S_msg_get_env_variable F
+GLIBC_2.2.6 _S_msg_get_environment F
+GLIBC_2.2.6 _S_msg_get_fd F
+GLIBC_2.2.6 _S_msg_get_init_int F
+GLIBC_2.2.6 _S_msg_get_init_ints F
+GLIBC_2.2.6 _S_msg_get_init_port F
+GLIBC_2.2.6 _S_msg_get_init_ports F
+GLIBC_2.2.6 _S_msg_proc_newids F
+GLIBC_2.2.6 _S_msg_report_wait F
+GLIBC_2.2.6 _S_msg_set_dtable F
+GLIBC_2.2.6 _S_msg_set_env_variable F
+GLIBC_2.2.6 _S_msg_set_environment F
+GLIBC_2.2.6 _S_msg_set_fd F
+GLIBC_2.2.6 _S_msg_set_init_int F
+GLIBC_2.2.6 _S_msg_set_init_ints F
+GLIBC_2.2.6 _S_msg_set_init_port F
+GLIBC_2.2.6 _S_msg_set_init_ports F
+GLIBC_2.2.6 _S_msg_sig_post F
+GLIBC_2.2.6 _S_msg_sig_post_untraced F
+GLIBC_2.2.6 ___brk_addr D 0x8
+GLIBC_2.2.6 __after_morecore_hook D 0x8
+GLIBC_2.2.6 __argz_count F
+GLIBC_2.2.6 __argz_next F
+GLIBC_2.2.6 __argz_stringify F
+GLIBC_2.2.6 __asprintf F
+GLIBC_2.2.6 __assert F
+GLIBC_2.2.6 __assert_fail F
+GLIBC_2.2.6 __assert_perror_fail F
+GLIBC_2.2.6 __backtrace F
+GLIBC_2.2.6 __backtrace_symbols F
+GLIBC_2.2.6 __backtrace_symbols_fd F
+GLIBC_2.2.6 __bsd_getpgrp F
+GLIBC_2.2.6 __bzero F
+GLIBC_2.2.6 __check_rhosts_file D 0x4
+GLIBC_2.2.6 __close F
+GLIBC_2.2.6 __cmsg_nxthdr F
+GLIBC_2.2.6 __connect F
+GLIBC_2.2.6 __ctype32_b D 0x8
+GLIBC_2.2.6 __ctype32_tolower D 0x8
+GLIBC_2.2.6 __ctype32_toupper D 0x8
+GLIBC_2.2.6 __ctype_b D 0x8
+GLIBC_2.2.6 __ctype_get_mb_cur_max F
+GLIBC_2.2.6 __ctype_tolower D 0x8
+GLIBC_2.2.6 __ctype_toupper D 0x8
+GLIBC_2.2.6 __cxa_atexit F
+GLIBC_2.2.6 __cxa_finalize F
+GLIBC_2.2.6 __cyg_profile_func_enter F
+GLIBC_2.2.6 __cyg_profile_func_exit F
+GLIBC_2.2.6 __daylight D 0x4
+GLIBC_2.2.6 __dcgettext F
+GLIBC_2.2.6 __default_morecore F
+GLIBC_2.2.6 __dgettext F
+GLIBC_2.2.6 __dn_comp F
+GLIBC_2.2.6 __dn_expand F
+GLIBC_2.2.6 __dn_skipname F
+GLIBC_2.2.6 __dup2 F
+GLIBC_2.2.6 __duplocale F
+GLIBC_2.2.6 __environ D 0x8
+GLIBC_2.2.6 __errno_location F
+GLIBC_2.2.6 __fbufsize F
+GLIBC_2.2.6 __fcntl F
+GLIBC_2.2.6 __ffs F
+GLIBC_2.2.6 __finite F
+GLIBC_2.2.6 __finitef F
+GLIBC_2.2.6 __finitel F
+GLIBC_2.2.6 __flbf F
+GLIBC_2.2.6 __fork F
+GLIBC_2.2.6 __fpending F
+GLIBC_2.2.6 __fpu_control D 0x2
+GLIBC_2.2.6 __fpurge F
+GLIBC_2.2.6 __freadable F
+GLIBC_2.2.6 __freading F
+GLIBC_2.2.6 __free_hook D 0x8
+GLIBC_2.2.6 __freelocale F
+GLIBC_2.2.6 __fsetlocking F
+GLIBC_2.2.6 __fwritable F
+GLIBC_2.2.6 __fwriting F
+GLIBC_2.2.6 __fxstat F
+GLIBC_2.2.6 __fxstat64 F
+GLIBC_2.2.6 __getdelim F
+GLIBC_2.2.6 __getpagesize F
+GLIBC_2.2.6 __getpgid F
+GLIBC_2.2.6 __getpid F
+GLIBC_2.2.6 __gettimeofday F
+GLIBC_2.2.6 __gmtime_r F
+GLIBC_2.2.6 __h_errno_location F
+GLIBC_2.2.6 __hurd_fail F
+GLIBC_2.2.6 __isalnum_l F
+GLIBC_2.2.6 __isalpha_l F
+GLIBC_2.2.6 __isascii_l F
+GLIBC_2.2.6 __isblank_l F
+GLIBC_2.2.6 __iscntrl_l F
+GLIBC_2.2.6 __isdigit_l F
+GLIBC_2.2.6 __isgraph_l F
+GLIBC_2.2.6 __isinf F
+GLIBC_2.2.6 __isinff F
+GLIBC_2.2.6 __isinfl F
+GLIBC_2.2.6 __islower_l F
+GLIBC_2.2.6 __isnan F
+GLIBC_2.2.6 __isnanf F
+GLIBC_2.2.6 __isnanl F
+GLIBC_2.2.6 __isprint_l F
+GLIBC_2.2.6 __ispunct_l F
+GLIBC_2.2.6 __isspace_l F
+GLIBC_2.2.6 __isupper_l F
+GLIBC_2.2.6 __iswalnum_l F
+GLIBC_2.2.6 __iswalpha_l F
+GLIBC_2.2.6 __iswblank_l F
+GLIBC_2.2.6 __iswcntrl_l F
+GLIBC_2.2.6 __iswctype F
+GLIBC_2.2.6 __iswctype_l F
+GLIBC_2.2.6 __iswdigit_l F
+GLIBC_2.2.6 __iswgraph_l F
+GLIBC_2.2.6 __iswlower_l F
+GLIBC_2.2.6 __iswprint_l F
+GLIBC_2.2.6 __iswpunct_l F
+GLIBC_2.2.6 __iswspace_l F
+GLIBC_2.2.6 __iswupper_l F
+GLIBC_2.2.6 __iswxdigit_l F
+GLIBC_2.2.6 __isxdigit_l F
+GLIBC_2.2.6 __ivaliduser F
+GLIBC_2.2.6 __key_decryptsession_pk_LOCAL D 0x8
+GLIBC_2.2.6 __key_encryptsession_pk_LOCAL D 0x8
+GLIBC_2.2.6 __key_gendes_LOCAL D 0x8
+GLIBC_2.2.6 __libc_allocate_rtsig F
+GLIBC_2.2.6 __libc_calloc F
+GLIBC_2.2.6 __libc_current_sigrtmax F
+GLIBC_2.2.6 __libc_current_sigrtmin F
+GLIBC_2.2.6 __libc_free F
+GLIBC_2.2.6 __libc_freeres F
+GLIBC_2.2.6 __libc_init_first F
+GLIBC_2.2.6 __libc_mallinfo F
+GLIBC_2.2.6 __libc_malloc F
+GLIBC_2.2.6 __libc_mallopt F
+GLIBC_2.2.6 __libc_memalign F
+GLIBC_2.2.6 __libc_pvalloc F
+GLIBC_2.2.6 __libc_realloc F
+GLIBC_2.2.6 __libc_start_main F
+GLIBC_2.2.6 __libc_valloc F
+GLIBC_2.2.6 __lseek F
+GLIBC_2.2.6 __lxstat F
+GLIBC_2.2.6 __lxstat64 F
+GLIBC_2.2.6 __mach_msg F
+GLIBC_2.2.6 __mach_msg_destroy F
+GLIBC_2.2.6 __mach_port_allocate F
+GLIBC_2.2.6 __mach_port_deallocate F
+GLIBC_2.2.6 __mach_port_insert_right F
+GLIBC_2.2.6 __mach_reply_port F
+GLIBC_2.2.6 __mach_task_self_ D 0x4
+GLIBC_2.2.6 __mach_thread_self F
+GLIBC_2.2.6 __malloc_hook D 0x8
+GLIBC_2.2.6 __malloc_initialize_hook D 0x8
+GLIBC_2.2.6 __mbrlen F
+GLIBC_2.2.6 __mbrtowc F
+GLIBC_2.2.6 __memalign_hook D 0x8
+GLIBC_2.2.6 __mempcpy F
+GLIBC_2.2.6 __mempcpy_small F
+GLIBC_2.2.6 __mig_allocate F
+GLIBC_2.2.6 __mig_dealloc_reply_port F
+GLIBC_2.2.6 __mig_deallocate F
+GLIBC_2.2.6 __mig_get_reply_port F
+GLIBC_2.2.6 __mig_init F
+GLIBC_2.2.6 __mig_put_reply_port F
+GLIBC_2.2.6 __mig_strncpy F
+GLIBC_2.2.6 __mmap F
+GLIBC_2.2.6 __monstartup F
+GLIBC_2.2.6 __morecore D 0x8
+GLIBC_2.2.6 __nanosleep F
+GLIBC_2.2.6 __newlocale F
+GLIBC_2.2.6 __nl_langinfo_l F
+GLIBC_2.2.6 __nss_configure_lookup F
+GLIBC_2.2.6 __nss_database_lookup F
+GLIBC_2.2.6 __nss_group_lookup F
+GLIBC_2.2.6 __nss_hostname_digits_dots F
+GLIBC_2.2.6 __nss_hosts_lookup F
+GLIBC_2.2.6 __nss_next F
+GLIBC_2.2.6 __nss_passwd_lookup F
+GLIBC_2.2.6 __open F
+GLIBC_2.2.6 __open64 F
+GLIBC_2.2.6 __overflow F
+GLIBC_2.2.6 __pipe F
+GLIBC_2.2.6 __poll F
+GLIBC_2.2.6 __pread64 F
+GLIBC_2.2.6 __printf_fp F
+GLIBC_2.2.6 __profile_frequency F
+GLIBC_2.2.6 __progname D 0x8
+GLIBC_2.2.6 __progname_full D 0x8
+GLIBC_2.2.6 __pwrite64 F
+GLIBC_2.2.6 __rawmemchr F
+GLIBC_2.2.6 __rcmd_errstr D 0x8
+GLIBC_2.2.6 __read F
+GLIBC_2.2.6 __realloc_hook D 0x8
+GLIBC_2.2.6 __res_dnok F
+GLIBC_2.2.6 __res_hnok F
+GLIBC_2.2.6 __res_init F
+GLIBC_2.2.6 __res_mailok F
+GLIBC_2.2.6 __res_mkquery F
+GLIBC_2.2.6 __res_nclose F
+GLIBC_2.2.6 __res_ninit F
+GLIBC_2.2.6 __res_nmkquery F
+GLIBC_2.2.6 __res_nquery F
+GLIBC_2.2.6 __res_nquerydomain F
+GLIBC_2.2.6 __res_nsearch F
+GLIBC_2.2.6 __res_nsend F
+GLIBC_2.2.6 __res_ownok F
+GLIBC_2.2.6 __res_query F
+GLIBC_2.2.6 __res_querydomain F
+GLIBC_2.2.6 __res_randomid F
+GLIBC_2.2.6 __res_search F
+GLIBC_2.2.6 __res_send F
+GLIBC_2.2.6 __res_state F
+GLIBC_2.2.6 __rpc_thread_createerr F
+GLIBC_2.2.6 __rpc_thread_svc_fdset F
+GLIBC_2.2.6 __rpc_thread_svc_max_pollfd F
+GLIBC_2.2.6 __rpc_thread_svc_pollfd F
+GLIBC_2.2.6 __sbrk F
+GLIBC_2.2.6 __sched_get_priority_max F
+GLIBC_2.2.6 __sched_get_priority_min F
+GLIBC_2.2.6 __sched_getparam F
+GLIBC_2.2.6 __sched_getscheduler F
+GLIBC_2.2.6 __sched_setscheduler F
+GLIBC_2.2.6 __sched_yield F
+GLIBC_2.2.6 __secure_getenv F
+GLIBC_2.2.6 __select F
+GLIBC_2.2.6 __send F
+GLIBC_2.2.6 __setpgid F
+GLIBC_2.2.6 __sigaction F
+GLIBC_2.2.6 __sigaddset F
+GLIBC_2.2.6 __sigdelset F
+GLIBC_2.2.6 __sigismember F
+GLIBC_2.2.6 __signbit F
+GLIBC_2.2.6 __signbitf F
+GLIBC_2.2.6 __signbitl F
+GLIBC_2.2.6 __sigpause F
+GLIBC_2.2.6 __sigsetjmp F
+GLIBC_2.2.6 __sigsuspend F
+GLIBC_2.2.6 __stpcpy F
+GLIBC_2.2.6 __stpcpy_small F
+GLIBC_2.2.6 __stpncpy F
+GLIBC_2.2.6 __strcasecmp F
+GLIBC_2.2.6 __strcasecmp_l F
+GLIBC_2.2.6 __strcasestr F
+GLIBC_2.2.6 __strcoll_l F
+GLIBC_2.2.6 __strcpy_small F
+GLIBC_2.2.6 __strcspn_c1 F
+GLIBC_2.2.6 __strcspn_c2 F
+GLIBC_2.2.6 __strcspn_c3 F
+GLIBC_2.2.6 __strdup F
+GLIBC_2.2.6 __strerror_r F
+GLIBC_2.2.6 __strfmon_l F
+GLIBC_2.2.6 __strncasecmp_l F
+GLIBC_2.2.6 __strndup F
+GLIBC_2.2.6 __strpbrk_c2 F
+GLIBC_2.2.6 __strpbrk_c3 F
+GLIBC_2.2.6 __strsep_1c F
+GLIBC_2.2.6 __strsep_2c F
+GLIBC_2.2.6 __strsep_3c F
+GLIBC_2.2.6 __strsep_g F
+GLIBC_2.2.6 __strspn_c1 F
+GLIBC_2.2.6 __strspn_c2 F
+GLIBC_2.2.6 __strspn_c3 F
+GLIBC_2.2.6 __strtod_internal F
+GLIBC_2.2.6 __strtod_l F
+GLIBC_2.2.6 __strtof_internal F
+GLIBC_2.2.6 __strtof_l F
+GLIBC_2.2.6 __strtok_r F
+GLIBC_2.2.6 __strtok_r_1c F
+GLIBC_2.2.6 __strtol_internal F
+GLIBC_2.2.6 __strtol_l F
+GLIBC_2.2.6 __strtold_internal F
+GLIBC_2.2.6 __strtold_l F
+GLIBC_2.2.6 __strtoll_internal F
+GLIBC_2.2.6 __strtoll_l F
+GLIBC_2.2.6 __strtoul_internal F
+GLIBC_2.2.6 __strtoul_l F
+GLIBC_2.2.6 __strtoull_internal F
+GLIBC_2.2.6 __strtoull_l F
+GLIBC_2.2.6 __strverscmp F
+GLIBC_2.2.6 __strxfrm_l F
+GLIBC_2.2.6 __sysconf F
+GLIBC_2.2.6 __sysv_signal F
+GLIBC_2.2.6 __timezone D 0x8
+GLIBC_2.2.6 __toascii_l F
+GLIBC_2.2.6 __tolower_l F
+GLIBC_2.2.6 __toupper_l F
+GLIBC_2.2.6 __towctrans F
+GLIBC_2.2.6 __towctrans_l F
+GLIBC_2.2.6 __towlower_l F
+GLIBC_2.2.6 __towupper_l F
+GLIBC_2.2.6 __tzname D 0x10
+GLIBC_2.2.6 __uflow F
+GLIBC_2.2.6 __underflow F
+GLIBC_2.2.6 __vfork F
+GLIBC_2.2.6 __vfscanf F
+GLIBC_2.2.6 __vm_allocate F
+GLIBC_2.2.6 __vm_deallocate F
+GLIBC_2.2.6 __vm_page_size D 0x8
+GLIBC_2.2.6 __vsnprintf F
+GLIBC_2.2.6 __vsscanf F
+GLIBC_2.2.6 __wait F
+GLIBC_2.2.6 __waitpid F
+GLIBC_2.2.6 __wcscasecmp_l F
+GLIBC_2.2.6 __wcscoll_l F
+GLIBC_2.2.6 __wcsncasecmp_l F
+GLIBC_2.2.6 __wcstod_internal F
+GLIBC_2.2.6 __wcstod_l F
+GLIBC_2.2.6 __wcstof_internal F
+GLIBC_2.2.6 __wcstof_l F
+GLIBC_2.2.6 __wcstol_internal F
+GLIBC_2.2.6 __wcstol_l F
+GLIBC_2.2.6 __wcstold_internal F
+GLIBC_2.2.6 __wcstold_l F
+GLIBC_2.2.6 __wcstoll_internal F
+GLIBC_2.2.6 __wcstoll_l F
+GLIBC_2.2.6 __wcstoul_internal F
+GLIBC_2.2.6 __wcstoul_l F
+GLIBC_2.2.6 __wcstoull_internal F
+GLIBC_2.2.6 __wcstoull_l F
+GLIBC_2.2.6 __wcsxfrm_l F
+GLIBC_2.2.6 __wctrans_l F
+GLIBC_2.2.6 __wctype_l F
+GLIBC_2.2.6 __woverflow F
+GLIBC_2.2.6 __write F
+GLIBC_2.2.6 __writev F
+GLIBC_2.2.6 __wuflow F
+GLIBC_2.2.6 __wunderflow F
+GLIBC_2.2.6 __xmknod F
+GLIBC_2.2.6 __xpg_basename F
+GLIBC_2.2.6 __xpg_sigpause F
+GLIBC_2.2.6 __xstat F
+GLIBC_2.2.6 __xstat64 F
+GLIBC_2.2.6 _authenticate F
+GLIBC_2.2.6 _dl_mcount_wrapper F
+GLIBC_2.2.6 _dl_mcount_wrapper_check F
+GLIBC_2.2.6 _environ D 0x8
+GLIBC_2.2.6 _exit F
+GLIBC_2.2.6 _flushlbf F
+GLIBC_2.2.6 _hurd_canonicalize_directory_name_internal F
+GLIBC_2.2.6 _hurd_critical_section_lock F
+GLIBC_2.2.6 _hurd_critical_section_unlock F
+GLIBC_2.2.6 _hurd_device_master D 0x4
+GLIBC_2.2.6 _hurd_dtable D 0x8
+GLIBC_2.2.6 _hurd_dtable_lock D 0x28
+GLIBC_2.2.6 _hurd_dtablesize D 0x4
+GLIBC_2.2.6 _hurd_exception2signal F
+GLIBC_2.2.6 _hurd_exec F
+GLIBC_2.2.6 _hurd_fd_get F
+GLIBC_2.2.6 _hurd_host_priv D 0x4
+GLIBC_2.2.6 _hurd_init F
+GLIBC_2.2.6 _hurd_intern_fd F
+GLIBC_2.2.6 _hurd_intr_rpc_mach_msg F
+GLIBC_2.2.6 _hurd_msgport D 0x4
+GLIBC_2.2.6 _hurd_port_cleanup F
+GLIBC_2.2.6 _hurd_port_free F
+GLIBC_2.2.6 _hurd_port_get F
+GLIBC_2.2.6 _hurd_port_init F
+GLIBC_2.2.6 _hurd_port_locked_get F
+GLIBC_2.2.6 _hurd_port_set F
+GLIBC_2.2.6 _hurd_ports D 0x8
+GLIBC_2.2.6 _hurd_ports_use F
+GLIBC_2.2.6 _hurd_proc_init F
+GLIBC_2.2.6 _hurd_raise_signal F
+GLIBC_2.2.6 _hurd_self_sigstate F
+GLIBC_2.2.6 _hurd_thread_sigstate F
+GLIBC_2.2.6 _hurdsig_fault_catch_exception_raise F
+GLIBC_2.2.6 _hurdsig_fault_env D 0x50
+GLIBC_2.2.6 _hurdsig_fault_preemptor D 0x30
+GLIBC_2.2.6 _hurdsig_interrupt_timeout D 0x4
+GLIBC_2.2.6 _libc_intl_domainname D 0x5
+GLIBC_2.2.6 _longjmp F
+GLIBC_2.2.6 _mcleanup F
+GLIBC_2.2.6 _mcount F
+GLIBC_2.2.6 _nl_default_dirname D 0xe
+GLIBC_2.2.6 _nl_domain_bindings D 0x8
+GLIBC_2.2.6 _nl_msg_cat_cntr D 0x4
+GLIBC_2.2.6 _null_auth D 0x18
+GLIBC_2.2.6 _obstack D 0x8
+GLIBC_2.2.6 _obstack_allocated_p F
+GLIBC_2.2.6 _obstack_begin F
+GLIBC_2.2.6 _obstack_begin_1 F
+GLIBC_2.2.6 _obstack_free F
+GLIBC_2.2.6 _obstack_memory_used F
+GLIBC_2.2.6 _obstack_newchunk F
+GLIBC_2.2.6 _res D 0x238
+GLIBC_2.2.6 _res_hconf D 0x48
+GLIBC_2.2.6 _rpc_dtablesize F
+GLIBC_2.2.6 _seterr_reply F
+GLIBC_2.2.6 _setjmp F
+GLIBC_2.2.6 _sys_siglist D 0x108
+GLIBC_2.2.6 _tolower F
+GLIBC_2.2.6 _toupper F
+GLIBC_2.2.6 a64l F
+GLIBC_2.2.6 abort F
+GLIBC_2.2.6 abs F
+GLIBC_2.2.6 accept F
+GLIBC_2.2.6 access F
+GLIBC_2.2.6 acct F
+GLIBC_2.2.6 addmntent F
+GLIBC_2.2.6 addseverity F
+GLIBC_2.2.6 adjtime F
+GLIBC_2.2.6 advance F
+GLIBC_2.2.6 alarm F
+GLIBC_2.2.6 alphasort F
+GLIBC_2.2.6 alphasort64 F
+GLIBC_2.2.6 argp_err_exit_status D 0x4
+GLIBC_2.2.6 argp_error F
+GLIBC_2.2.6 argp_failure F
+GLIBC_2.2.6 argp_help F
+GLIBC_2.2.6 argp_parse F
+GLIBC_2.2.6 argp_program_bug_address D 0x8
+GLIBC_2.2.6 argp_program_version D 0x8
+GLIBC_2.2.6 argp_program_version_hook D 0x8
+GLIBC_2.2.6 argp_state_help F
+GLIBC_2.2.6 argp_usage F
+GLIBC_2.2.6 argz_add F
+GLIBC_2.2.6 argz_add_sep F
+GLIBC_2.2.6 argz_append F
+GLIBC_2.2.6 argz_count F
+GLIBC_2.2.6 argz_create F
+GLIBC_2.2.6 argz_create_sep F
+GLIBC_2.2.6 argz_delete F
+GLIBC_2.2.6 argz_extract F
+GLIBC_2.2.6 argz_insert F
+GLIBC_2.2.6 argz_next F
+GLIBC_2.2.6 argz_replace F
+GLIBC_2.2.6 argz_stringify F
+GLIBC_2.2.6 asctime F
+GLIBC_2.2.6 asctime_r F
+GLIBC_2.2.6 asprintf F
+GLIBC_2.2.6 atof F
+GLIBC_2.2.6 atoi F
+GLIBC_2.2.6 atol F
+GLIBC_2.2.6 atoll F
+GLIBC_2.2.6 authdes_create F
+GLIBC_2.2.6 authdes_getucred F
+GLIBC_2.2.6 authdes_pk_create F
+GLIBC_2.2.6 authnone_create F
+GLIBC_2.2.6 authunix_create F
+GLIBC_2.2.6 authunix_create_default F
+GLIBC_2.2.6 backtrace F
+GLIBC_2.2.6 backtrace_symbols F
+GLIBC_2.2.6 backtrace_symbols_fd F
+GLIBC_2.2.6 basename F
+GLIBC_2.2.6 bcmp F
+GLIBC_2.2.6 bcopy F
+GLIBC_2.2.6 bind F
+GLIBC_2.2.6 bind_textdomain_codeset F
+GLIBC_2.2.6 bindresvport F
+GLIBC_2.2.6 bindtextdomain F
+GLIBC_2.2.6 brk F
+GLIBC_2.2.6 bsd_signal F
+GLIBC_2.2.6 bsearch F
+GLIBC_2.2.6 btowc F
+GLIBC_2.2.6 bzero F
+GLIBC_2.2.6 calloc F
+GLIBC_2.2.6 callrpc F
+GLIBC_2.2.6 canonicalize_file_name F
+GLIBC_2.2.6 catclose F
+GLIBC_2.2.6 catgets F
+GLIBC_2.2.6 catopen F
+GLIBC_2.2.6 cbc_crypt F
+GLIBC_2.2.6 cfgetispeed F
+GLIBC_2.2.6 cfgetospeed F
+GLIBC_2.2.6 cfmakeraw F
+GLIBC_2.2.6 cfree F
+GLIBC_2.2.6 cfsetispeed F
+GLIBC_2.2.6 cfsetospeed F
+GLIBC_2.2.6 cfsetspeed F
+GLIBC_2.2.6 chdir F
+GLIBC_2.2.6 chflags F
+GLIBC_2.2.6 chmod F
+GLIBC_2.2.6 chown F
+GLIBC_2.2.6 chroot F
+GLIBC_2.2.6 clearenv F
+GLIBC_2.2.6 clearerr F
+GLIBC_2.2.6 clearerr_unlocked F
+GLIBC_2.2.6 clnt_broadcast F
+GLIBC_2.2.6 clnt_create F
+GLIBC_2.2.6 clnt_pcreateerror F
+GLIBC_2.2.6 clnt_perrno F
+GLIBC_2.2.6 clnt_perror F
+GLIBC_2.2.6 clnt_spcreateerror F
+GLIBC_2.2.6 clnt_sperrno F
+GLIBC_2.2.6 clnt_sperror F
+GLIBC_2.2.6 clntraw_create F
+GLIBC_2.2.6 clnttcp_create F
+GLIBC_2.2.6 clntudp_bufcreate F
+GLIBC_2.2.6 clntudp_create F
+GLIBC_2.2.6 clntunix_create F
+GLIBC_2.2.6 clock F
+GLIBC_2.2.6 clock_getcpuclockid F
+GLIBC_2.2.6 clock_getres F
+GLIBC_2.2.6 clock_gettime F
+GLIBC_2.2.6 clock_nanosleep F
+GLIBC_2.2.6 clock_settime F
+GLIBC_2.2.6 close F
+GLIBC_2.2.6 closedir F
+GLIBC_2.2.6 closelog F
+GLIBC_2.2.6 confstr F
+GLIBC_2.2.6 connect F
+GLIBC_2.2.6 copysign F
+GLIBC_2.2.6 copysignf F
+GLIBC_2.2.6 copysignl F
+GLIBC_2.2.6 creat F
+GLIBC_2.2.6 creat64 F
+GLIBC_2.2.6 ctermid F
+GLIBC_2.2.6 ctime F
+GLIBC_2.2.6 ctime_r F
+GLIBC_2.2.6 cuserid F
+GLIBC_2.2.6 daemon F
+GLIBC_2.2.6 daylight D 0x4
+GLIBC_2.2.6 dcgettext F
+GLIBC_2.2.6 dcngettext F
+GLIBC_2.2.6 des_setparity F
+GLIBC_2.2.6 dgettext F
+GLIBC_2.2.6 difftime F
+GLIBC_2.2.6 directory_name_split F
+GLIBC_2.2.6 dirfd F
+GLIBC_2.2.6 dirname F
+GLIBC_2.2.6 div F
+GLIBC_2.2.6 dl_iterate_phdr F
+GLIBC_2.2.6 dladdr F
+GLIBC_2.2.6 dlclose F
+GLIBC_2.2.6 dlerror F
+GLIBC_2.2.6 dlopen F
+GLIBC_2.2.6 dlsym F
+GLIBC_2.2.6 dlvsym F
+GLIBC_2.2.6 dngettext F
+GLIBC_2.2.6 dprintf F
+GLIBC_2.2.6 drand48 F
+GLIBC_2.2.6 drand48_r F
+GLIBC_2.2.6 dup F
+GLIBC_2.2.6 dup2 F
+GLIBC_2.2.6 dysize F
+GLIBC_2.2.6 ecb_crypt F
+GLIBC_2.2.6 ecvt F
+GLIBC_2.2.6 ecvt_r F
+GLIBC_2.2.6 endaliasent F
+GLIBC_2.2.6 endfsent F
+GLIBC_2.2.6 endgrent F
+GLIBC_2.2.6 endhostent F
+GLIBC_2.2.6 endmntent F
+GLIBC_2.2.6 endnetent F
+GLIBC_2.2.6 endnetgrent F
+GLIBC_2.2.6 endprotoent F
+GLIBC_2.2.6 endpwent F
+GLIBC_2.2.6 endrpcent F
+GLIBC_2.2.6 endservent F
+GLIBC_2.2.6 endspent F
+GLIBC_2.2.6 endttyent F
+GLIBC_2.2.6 endusershell F
+GLIBC_2.2.6 endutent F
+GLIBC_2.2.6 endutxent F
+GLIBC_2.2.6 environ D 0x8
+GLIBC_2.2.6 envz_add F
+GLIBC_2.2.6 envz_entry F
+GLIBC_2.2.6 envz_get F
+GLIBC_2.2.6 envz_merge F
+GLIBC_2.2.6 envz_remove F
+GLIBC_2.2.6 envz_strip F
+GLIBC_2.2.6 erand48 F
+GLIBC_2.2.6 erand48_r F
+GLIBC_2.2.6 err F
+GLIBC_2.2.6 error F
+GLIBC_2.2.6 error_at_line F
+GLIBC_2.2.6 error_message_count D 0x4
+GLIBC_2.2.6 error_one_per_line D 0x4
+GLIBC_2.2.6 error_print_progname D 0x8
+GLIBC_2.2.6 errx F
+GLIBC_2.2.6 ether_aton F
+GLIBC_2.2.6 ether_aton_r F
+GLIBC_2.2.6 ether_hostton F
+GLIBC_2.2.6 ether_line F
+GLIBC_2.2.6 ether_ntoa F
+GLIBC_2.2.6 ether_ntoa_r F
+GLIBC_2.2.6 ether_ntohost F
+GLIBC_2.2.6 euidaccess F
+GLIBC_2.2.6 evc_wait F
+GLIBC_2.2.6 execl F
+GLIBC_2.2.6 execle F
+GLIBC_2.2.6 execlp F
+GLIBC_2.2.6 execv F
+GLIBC_2.2.6 execve F
+GLIBC_2.2.6 execvp F
+GLIBC_2.2.6 exit F
+GLIBC_2.2.6 fattach F
+GLIBC_2.2.6 fchdir F
+GLIBC_2.2.6 fchflags F
+GLIBC_2.2.6 fchmod F
+GLIBC_2.2.6 fchown F
+GLIBC_2.2.6 fclose F
+GLIBC_2.2.6 fcloseall F
+GLIBC_2.2.6 fcntl F
+GLIBC_2.2.6 fcvt F
+GLIBC_2.2.6 fcvt_r F
+GLIBC_2.2.6 fdatasync F
+GLIBC_2.2.6 fdetach F
+GLIBC_2.2.6 fdopen F
+GLIBC_2.2.6 feof F
+GLIBC_2.2.6 feof_unlocked F
+GLIBC_2.2.6 ferror F
+GLIBC_2.2.6 ferror_unlocked F
+GLIBC_2.2.6 fexecve F
+GLIBC_2.2.6 fflush F
+GLIBC_2.2.6 fflush_unlocked F
+GLIBC_2.2.6 ffs F
+GLIBC_2.2.6 ffsl F
+GLIBC_2.2.6 ffsll F
+GLIBC_2.2.6 fgetc F
+GLIBC_2.2.6 fgetc_unlocked F
+GLIBC_2.2.6 fgetgrent F
+GLIBC_2.2.6 fgetgrent_r F
+GLIBC_2.2.6 fgetpos F
+GLIBC_2.2.6 fgetpos64 F
+GLIBC_2.2.6 fgetpwent F
+GLIBC_2.2.6 fgetpwent_r F
+GLIBC_2.2.6 fgets F
+GLIBC_2.2.6 fgets_unlocked F
+GLIBC_2.2.6 fgetspent F
+GLIBC_2.2.6 fgetspent_r F
+GLIBC_2.2.6 fgetwc F
+GLIBC_2.2.6 fgetwc_unlocked F
+GLIBC_2.2.6 fgetws F
+GLIBC_2.2.6 fgetws_unlocked F
+GLIBC_2.2.6 file_name_lookup F
+GLIBC_2.2.6 file_name_lookup_under F
+GLIBC_2.2.6 file_name_path_lookup F
+GLIBC_2.2.6 file_name_split F
+GLIBC_2.2.6 fileno F
+GLIBC_2.2.6 fileno_unlocked F
+GLIBC_2.2.6 finite F
+GLIBC_2.2.6 finitef F
+GLIBC_2.2.6 finitel F
+GLIBC_2.2.6 flock F
+GLIBC_2.2.6 flockfile F
+GLIBC_2.2.6 fmemopen F
+GLIBC_2.2.6 fmtmsg F
+GLIBC_2.2.6 fnmatch F
+GLIBC_2.2.6 fopen F
+GLIBC_2.2.6 fopen64 F
+GLIBC_2.2.6 fopencookie F
+GLIBC_2.2.6 fopenport F
+GLIBC_2.2.6 fork F
+GLIBC_2.2.6 forkpty F
+GLIBC_2.2.6 fpathconf F
+GLIBC_2.2.6 fprintf F
+GLIBC_2.2.6 fputc F
+GLIBC_2.2.6 fputc_unlocked F
+GLIBC_2.2.6 fputs F
+GLIBC_2.2.6 fputs_unlocked F
+GLIBC_2.2.6 fputwc F
+GLIBC_2.2.6 fputwc_unlocked F
+GLIBC_2.2.6 fputws F
+GLIBC_2.2.6 fputws_unlocked F
+GLIBC_2.2.6 fread F
+GLIBC_2.2.6 fread_unlocked F
+GLIBC_2.2.6 free F
+GLIBC_2.2.6 freeaddrinfo F
+GLIBC_2.2.6 freopen F
+GLIBC_2.2.6 freopen64 F
+GLIBC_2.2.6 frexp F
+GLIBC_2.2.6 frexpf F
+GLIBC_2.2.6 frexpl F
+GLIBC_2.2.6 fscanf F
+GLIBC_2.2.6 fseek F
+GLIBC_2.2.6 fseeko F
+GLIBC_2.2.6 fseeko64 F
+GLIBC_2.2.6 fsetpos F
+GLIBC_2.2.6 fsetpos64 F
+GLIBC_2.2.6 fstatfs F
+GLIBC_2.2.6 fstatfs64 F
+GLIBC_2.2.6 fstatvfs F
+GLIBC_2.2.6 fstatvfs64 F
+GLIBC_2.2.6 fsync F
+GLIBC_2.2.6 ftell F
+GLIBC_2.2.6 ftello F
+GLIBC_2.2.6 ftello64 F
+GLIBC_2.2.6 ftime F
+GLIBC_2.2.6 ftok F
+GLIBC_2.2.6 ftruncate F
+GLIBC_2.2.6 ftruncate64 F
+GLIBC_2.2.6 ftrylockfile F
+GLIBC_2.2.6 fts_children F
+GLIBC_2.2.6 fts_close F
+GLIBC_2.2.6 fts_open F
+GLIBC_2.2.6 fts_read F
+GLIBC_2.2.6 fts_set F
+GLIBC_2.2.6 ftw F
+GLIBC_2.2.6 ftw64 F
+GLIBC_2.2.6 funlockfile F
+GLIBC_2.2.6 fwide F
+GLIBC_2.2.6 fwprintf F
+GLIBC_2.2.6 fwrite F
+GLIBC_2.2.6 fwrite_unlocked F
+GLIBC_2.2.6 fwscanf F
+GLIBC_2.2.6 gai_strerror F
+GLIBC_2.2.6 gcvt F
+GLIBC_2.2.6 get_avphys_pages F
+GLIBC_2.2.6 get_current_dir_name F
+GLIBC_2.2.6 get_myaddress F
+GLIBC_2.2.6 get_nprocs F
+GLIBC_2.2.6 get_nprocs_conf F
+GLIBC_2.2.6 get_phys_pages F
+GLIBC_2.2.6 get_privileged_ports F
+GLIBC_2.2.6 getaddrinfo F
+GLIBC_2.2.6 getaliasbyname F
+GLIBC_2.2.6 getaliasbyname_r F
+GLIBC_2.2.6 getaliasent F
+GLIBC_2.2.6 getaliasent_r F
+GLIBC_2.2.6 getauth F
+GLIBC_2.2.6 getc F
+GLIBC_2.2.6 getc_unlocked F
+GLIBC_2.2.6 getchar F
+GLIBC_2.2.6 getchar_unlocked F
+GLIBC_2.2.6 getcontext F
+GLIBC_2.2.6 getcrdir F
+GLIBC_2.2.6 getcttyid F
+GLIBC_2.2.6 getcwd F
+GLIBC_2.2.6 getcwdir F
+GLIBC_2.2.6 getdate F
+GLIBC_2.2.6 getdate_err D 0x4
+GLIBC_2.2.6 getdate_r F
+GLIBC_2.2.6 getdelim F
+GLIBC_2.2.6 getdirentries F
+GLIBC_2.2.6 getdirentries64 F
+GLIBC_2.2.6 getdomainname F
+GLIBC_2.2.6 getdport F
+GLIBC_2.2.6 getdtablesize F
+GLIBC_2.2.6 getegid F
+GLIBC_2.2.6 getenv F
+GLIBC_2.2.6 geteuid F
+GLIBC_2.2.6 geteuids F
+GLIBC_2.2.6 getfsent F
+GLIBC_2.2.6 getfsfile F
+GLIBC_2.2.6 getfsspec F
+GLIBC_2.2.6 getgid F
+GLIBC_2.2.6 getgrent F
+GLIBC_2.2.6 getgrent_r F
+GLIBC_2.2.6 getgrgid F
+GLIBC_2.2.6 getgrgid_r F
+GLIBC_2.2.6 getgrnam F
+GLIBC_2.2.6 getgrnam_r F
+GLIBC_2.2.6 getgrouplist F
+GLIBC_2.2.6 getgroups F
+GLIBC_2.2.6 gethostbyaddr F
+GLIBC_2.2.6 gethostbyaddr_r F
+GLIBC_2.2.6 gethostbyname F
+GLIBC_2.2.6 gethostbyname2 F
+GLIBC_2.2.6 gethostbyname2_r F
+GLIBC_2.2.6 gethostbyname_r F
+GLIBC_2.2.6 gethostent F
+GLIBC_2.2.6 gethostent_r F
+GLIBC_2.2.6 gethostid F
+GLIBC_2.2.6 gethostname F
+GLIBC_2.2.6 getitimer F
+GLIBC_2.2.6 getline F
+GLIBC_2.2.6 getloadavg F
+GLIBC_2.2.6 getlogin F
+GLIBC_2.2.6 getlogin_r F
+GLIBC_2.2.6 getmntent F
+GLIBC_2.2.6 getmntent_r F
+GLIBC_2.2.6 getmsg F
+GLIBC_2.2.6 getnameinfo F
+GLIBC_2.2.6 getnetbyaddr F
+GLIBC_2.2.6 getnetbyaddr_r F
+GLIBC_2.2.6 getnetbyname F
+GLIBC_2.2.6 getnetbyname_r F
+GLIBC_2.2.6 getnetent F
+GLIBC_2.2.6 getnetent_r F
+GLIBC_2.2.6 getnetgrent F
+GLIBC_2.2.6 getnetgrent_r F
+GLIBC_2.2.6 getnetname F
+GLIBC_2.2.6 getopt F
+GLIBC_2.2.6 getopt_long F
+GLIBC_2.2.6 getopt_long_only F
+GLIBC_2.2.6 getpagesize F
+GLIBC_2.2.6 getpass F
+GLIBC_2.2.6 getpeername F
+GLIBC_2.2.6 getpgid F
+GLIBC_2.2.6 getpgrp F
+GLIBC_2.2.6 getpid F
+GLIBC_2.2.6 getpmsg F
+GLIBC_2.2.6 getppid F
+GLIBC_2.2.6 getpriority F
+GLIBC_2.2.6 getproc F
+GLIBC_2.2.6 getprotobyname F
+GLIBC_2.2.6 getprotobyname_r F
+GLIBC_2.2.6 getprotobynumber F
+GLIBC_2.2.6 getprotobynumber_r F
+GLIBC_2.2.6 getprotoent F
+GLIBC_2.2.6 getprotoent_r F
+GLIBC_2.2.6 getpt F
+GLIBC_2.2.6 getpublickey F
+GLIBC_2.2.6 getpw F
+GLIBC_2.2.6 getpwent F
+GLIBC_2.2.6 getpwent_r F
+GLIBC_2.2.6 getpwnam F
+GLIBC_2.2.6 getpwnam_r F
+GLIBC_2.2.6 getpwuid F
+GLIBC_2.2.6 getpwuid_r F
+GLIBC_2.2.6 getrlimit F
+GLIBC_2.2.6 getrlimit64 F
+GLIBC_2.2.6 getrpcbyname F
+GLIBC_2.2.6 getrpcbyname_r F
+GLIBC_2.2.6 getrpcbynumber F
+GLIBC_2.2.6 getrpcbynumber_r F
+GLIBC_2.2.6 getrpcent F
+GLIBC_2.2.6 getrpcent_r F
+GLIBC_2.2.6 getrpcport F
+GLIBC_2.2.6 getrusage F
+GLIBC_2.2.6 gets F
+GLIBC_2.2.6 getsecretkey F
+GLIBC_2.2.6 getservbyname F
+GLIBC_2.2.6 getservbyname_r F
+GLIBC_2.2.6 getservbyport F
+GLIBC_2.2.6 getservbyport_r F
+GLIBC_2.2.6 getservent F
+GLIBC_2.2.6 getservent_r F
+GLIBC_2.2.6 getsid F
+GLIBC_2.2.6 getsockname F
+GLIBC_2.2.6 getsockopt F
+GLIBC_2.2.6 getspent F
+GLIBC_2.2.6 getspent_r F
+GLIBC_2.2.6 getspnam F
+GLIBC_2.2.6 getspnam_r F
+GLIBC_2.2.6 getsubopt F
+GLIBC_2.2.6 gettext F
+GLIBC_2.2.6 gettimeofday F
+GLIBC_2.2.6 getttyent F
+GLIBC_2.2.6 getttynam F
+GLIBC_2.2.6 getuid F
+GLIBC_2.2.6 getumask F
+GLIBC_2.2.6 getusershell F
+GLIBC_2.2.6 getutent F
+GLIBC_2.2.6 getutent_r F
+GLIBC_2.2.6 getutid F
+GLIBC_2.2.6 getutid_r F
+GLIBC_2.2.6 getutline F
+GLIBC_2.2.6 getutline_r F
+GLIBC_2.2.6 getutmp F
+GLIBC_2.2.6 getutmpx F
+GLIBC_2.2.6 getutxent F
+GLIBC_2.2.6 getutxid F
+GLIBC_2.2.6 getutxline F
+GLIBC_2.2.6 getw F
+GLIBC_2.2.6 getwc F
+GLIBC_2.2.6 getwc_unlocked F
+GLIBC_2.2.6 getwchar F
+GLIBC_2.2.6 getwchar_unlocked F
+GLIBC_2.2.6 getwd F
+GLIBC_2.2.6 glob F
+GLIBC_2.2.6 glob64 F
+GLIBC_2.2.6 glob_pattern_p F
+GLIBC_2.2.6 globfree F
+GLIBC_2.2.6 globfree64 F
+GLIBC_2.2.6 gmtime F
+GLIBC_2.2.6 gmtime_r F
+GLIBC_2.2.6 gnu_get_libc_release F
+GLIBC_2.2.6 gnu_get_libc_version F
+GLIBC_2.2.6 grantpt F
+GLIBC_2.2.6 group_member F
+GLIBC_2.2.6 gsignal F
+GLIBC_2.2.6 gtty F
+GLIBC_2.2.6 h_errlist D 0x28
+GLIBC_2.2.6 h_nerr D 0x4
+GLIBC_2.2.6 hasmntopt F
+GLIBC_2.2.6 hcreate F
+GLIBC_2.2.6 hcreate_r F
+GLIBC_2.2.6 hdestroy F
+GLIBC_2.2.6 hdestroy_r F
+GLIBC_2.2.6 herror F
+GLIBC_2.2.6 host2netname F
+GLIBC_2.2.6 hsearch F
+GLIBC_2.2.6 hsearch_r F
+GLIBC_2.2.6 hstrerror F
+GLIBC_2.2.6 htonl F
+GLIBC_2.2.6 htons F
+GLIBC_2.2.6 hurd_catch_signal F
+GLIBC_2.2.6 hurd_check_cancel F
+GLIBC_2.2.6 hurd_directory_name_split F
+GLIBC_2.2.6 hurd_file_name_lookup F
+GLIBC_2.2.6 hurd_file_name_lookup_retry F
+GLIBC_2.2.6 hurd_file_name_path_lookup F
+GLIBC_2.2.6 hurd_file_name_split F
+GLIBC_2.2.6 hurd_preempt_signals F
+GLIBC_2.2.6 hurd_safe_copyin F
+GLIBC_2.2.6 hurd_safe_copyout F
+GLIBC_2.2.6 hurd_safe_memmove F
+GLIBC_2.2.6 hurd_safe_memset F
+GLIBC_2.2.6 hurd_sig_post F
+GLIBC_2.2.6 hurd_thread_cancel F
+GLIBC_2.2.6 hurd_thread_self F
+GLIBC_2.2.6 hurd_unpreempt_signals F
+GLIBC_2.2.6 iconv F
+GLIBC_2.2.6 iconv_close F
+GLIBC_2.2.6 iconv_open F
+GLIBC_2.2.6 if_freenameindex F
+GLIBC_2.2.6 if_indextoname F
+GLIBC_2.2.6 if_nameindex F
+GLIBC_2.2.6 if_nametoindex F
+GLIBC_2.2.6 imaxabs F
+GLIBC_2.2.6 imaxdiv F
+GLIBC_2.2.6 in6addr_any D 0x10
+GLIBC_2.2.6 in6addr_loopback D 0x10
+GLIBC_2.2.6 index F
+GLIBC_2.2.6 inet_addr F
+GLIBC_2.2.6 inet_aton F
+GLIBC_2.2.6 inet_lnaof F
+GLIBC_2.2.6 inet_makeaddr F
+GLIBC_2.2.6 inet_netof F
+GLIBC_2.2.6 inet_network F
+GLIBC_2.2.6 inet_nsap_addr F
+GLIBC_2.2.6 inet_nsap_ntoa F
+GLIBC_2.2.6 inet_ntoa F
+GLIBC_2.2.6 inet_ntop F
+GLIBC_2.2.6 inet_pton F
+GLIBC_2.2.6 initgroups F
+GLIBC_2.2.6 initstate F
+GLIBC_2.2.6 initstate_r F
+GLIBC_2.2.6 innetgr F
+GLIBC_2.2.6 insque F
+GLIBC_2.2.6 ioctl F
+GLIBC_2.2.6 iruserok F
+GLIBC_2.2.6 iruserok_af F
+GLIBC_2.2.6 isalnum F
+GLIBC_2.2.6 isalpha F
+GLIBC_2.2.6 isascii F
+GLIBC_2.2.6 isastream F
+GLIBC_2.2.6 isatty F
+GLIBC_2.2.6 isblank F
+GLIBC_2.2.6 iscntrl F
+GLIBC_2.2.6 isdigit F
+GLIBC_2.2.6 isfdtype F
+GLIBC_2.2.6 isgraph F
+GLIBC_2.2.6 isinf F
+GLIBC_2.2.6 isinff F
+GLIBC_2.2.6 isinfl F
+GLIBC_2.2.6 islower F
+GLIBC_2.2.6 isnan F
+GLIBC_2.2.6 isnanf F
+GLIBC_2.2.6 isnanl F
+GLIBC_2.2.6 isprint F
+GLIBC_2.2.6 ispunct F
+GLIBC_2.2.6 isspace F
+GLIBC_2.2.6 isupper F
+GLIBC_2.2.6 iswalnum F
+GLIBC_2.2.6 iswalpha F
+GLIBC_2.2.6 iswblank F
+GLIBC_2.2.6 iswcntrl F
+GLIBC_2.2.6 iswctype F
+GLIBC_2.2.6 iswdigit F
+GLIBC_2.2.6 iswgraph F
+GLIBC_2.2.6 iswlower F
+GLIBC_2.2.6 iswprint F
+GLIBC_2.2.6 iswpunct F
+GLIBC_2.2.6 iswspace F
+GLIBC_2.2.6 iswupper F
+GLIBC_2.2.6 iswxdigit F
+GLIBC_2.2.6 isxdigit F
+GLIBC_2.2.6 jrand48 F
+GLIBC_2.2.6 jrand48_r F
+GLIBC_2.2.6 key_decryptsession F
+GLIBC_2.2.6 key_decryptsession_pk F
+GLIBC_2.2.6 key_encryptsession F
+GLIBC_2.2.6 key_encryptsession_pk F
+GLIBC_2.2.6 key_gendes F
+GLIBC_2.2.6 key_get_conv F
+GLIBC_2.2.6 key_secretkey_is_set F
+GLIBC_2.2.6 key_setnet F
+GLIBC_2.2.6 key_setsecret F
+GLIBC_2.2.6 kill F
+GLIBC_2.2.6 killpg F
+GLIBC_2.2.6 l64a F
+GLIBC_2.2.6 labs F
+GLIBC_2.2.6 lchown F
+GLIBC_2.2.6 lckpwdf F
+GLIBC_2.2.6 lcong48 F
+GLIBC_2.2.6 lcong48_r F
+GLIBC_2.2.6 ldexp F
+GLIBC_2.2.6 ldexpf F
+GLIBC_2.2.6 ldexpl F
+GLIBC_2.2.6 ldiv F
+GLIBC_2.2.6 lfind F
+GLIBC_2.2.6 link F
+GLIBC_2.2.6 listen F
+GLIBC_2.2.6 llabs F
+GLIBC_2.2.6 lldiv F
+GLIBC_2.2.6 loc1 D 0x8
+GLIBC_2.2.6 loc2 D 0x8
+GLIBC_2.2.6 localeconv F
+GLIBC_2.2.6 localtime F
+GLIBC_2.2.6 localtime_r F
+GLIBC_2.2.6 lockf F
+GLIBC_2.2.6 lockf64 F
+GLIBC_2.2.6 locs D 0x8
+GLIBC_2.2.6 login F
+GLIBC_2.2.6 login_tty F
+GLIBC_2.2.6 logout F
+GLIBC_2.2.6 logwtmp F
+GLIBC_2.2.6 longjmp F
+GLIBC_2.2.6 lrand48 F
+GLIBC_2.2.6 lrand48_r F
+GLIBC_2.2.6 lsearch F
+GLIBC_2.2.6 lseek F
+GLIBC_2.2.6 lseek64 F
+GLIBC_2.2.6 mach_error F
+GLIBC_2.2.6 mach_error_string F
+GLIBC_2.2.6 mach_error_type F
+GLIBC_2.2.6 mach_host_self F
+GLIBC_2.2.6 mach_msg F
+GLIBC_2.2.6 mach_msg_destroy F
+GLIBC_2.2.6 mach_msg_receive F
+GLIBC_2.2.6 mach_msg_send F
+GLIBC_2.2.6 mach_msg_server F
+GLIBC_2.2.6 mach_msg_server_timeout F
+GLIBC_2.2.6 mach_open_devstream F
+GLIBC_2.2.6 mach_port_allocate F
+GLIBC_2.2.6 mach_port_allocate_name F
+GLIBC_2.2.6 mach_port_deallocate F
+GLIBC_2.2.6 mach_port_insert_right F
+GLIBC_2.2.6 mach_reply_port F
+GLIBC_2.2.6 mach_setup_thread F
+GLIBC_2.2.6 mach_setup_tls F
+GLIBC_2.2.6 mach_task_self F
+GLIBC_2.2.6 mach_thread_self F
+GLIBC_2.2.6 madvise F
+GLIBC_2.2.6 makecontext F
+GLIBC_2.2.6 mallinfo F
+GLIBC_2.2.6 malloc F
+GLIBC_2.2.6 malloc_stats F
+GLIBC_2.2.6 malloc_trim F
+GLIBC_2.2.6 malloc_usable_size F
+GLIBC_2.2.6 mallopt F
+GLIBC_2.2.6 mallwatch D 0x8
+GLIBC_2.2.6 mblen F
+GLIBC_2.2.6 mbrlen F
+GLIBC_2.2.6 mbrtowc F
+GLIBC_2.2.6 mbsinit F
+GLIBC_2.2.6 mbsnrtowcs F
+GLIBC_2.2.6 mbsrtowcs F
+GLIBC_2.2.6 mbstowcs F
+GLIBC_2.2.6 mbtowc F
+GLIBC_2.2.6 mcheck F
+GLIBC_2.2.6 mcheck_check_all F
+GLIBC_2.2.6 mcheck_pedantic F
+GLIBC_2.2.6 mcount F
+GLIBC_2.2.6 memalign F
+GLIBC_2.2.6 memccpy F
+GLIBC_2.2.6 memchr F
+GLIBC_2.2.6 memcmp F
+GLIBC_2.2.6 memcpy F
+GLIBC_2.2.6 memfrob F
+GLIBC_2.2.6 memmem F
+GLIBC_2.2.6 memmove F
+GLIBC_2.2.6 mempcpy F
+GLIBC_2.2.6 memrchr F
+GLIBC_2.2.6 memset F
+GLIBC_2.2.6 mig_allocate F
+GLIBC_2.2.6 mig_dealloc_reply_port F
+GLIBC_2.2.6 mig_deallocate F
+GLIBC_2.2.6 mig_get_reply_port F
+GLIBC_2.2.6 mig_init F
+GLIBC_2.2.6 mig_put_reply_port F
+GLIBC_2.2.6 mig_strncpy F
+GLIBC_2.2.6 mincore F
+GLIBC_2.2.6 mkdir F
+GLIBC_2.2.6 mkdtemp F
+GLIBC_2.2.6 mkfifo F
+GLIBC_2.2.6 mkstemp F
+GLIBC_2.2.6 mkstemp64 F
+GLIBC_2.2.6 mktemp F
+GLIBC_2.2.6 mktime F
+GLIBC_2.2.6 mlock F
+GLIBC_2.2.6 mlockall F
+GLIBC_2.2.6 mmap F
+GLIBC_2.2.6 mmap64 F
+GLIBC_2.2.6 modf F
+GLIBC_2.2.6 modff F
+GLIBC_2.2.6 modfl F
+GLIBC_2.2.6 moncontrol F
+GLIBC_2.2.6 monstartup F
+GLIBC_2.2.6 mprobe F
+GLIBC_2.2.6 mprotect F
+GLIBC_2.2.6 mrand48 F
+GLIBC_2.2.6 mrand48_r F
+GLIBC_2.2.6 msgctl F
+GLIBC_2.2.6 msgget F
+GLIBC_2.2.6 msgrcv F
+GLIBC_2.2.6 msgsnd F
+GLIBC_2.2.6 msync F
+GLIBC_2.2.6 mtrace F
+GLIBC_2.2.6 munlock F
+GLIBC_2.2.6 munlockall F
+GLIBC_2.2.6 munmap F
+GLIBC_2.2.6 muntrace F
+GLIBC_2.2.6 nanosleep F
+GLIBC_2.2.6 netname2host F
+GLIBC_2.2.6 netname2user F
+GLIBC_2.2.6 nftw F
+GLIBC_2.2.6 nftw64 F
+GLIBC_2.2.6 ngettext F
+GLIBC_2.2.6 nice F
+GLIBC_2.2.6 nl_langinfo F
+GLIBC_2.2.6 nrand48 F
+GLIBC_2.2.6 nrand48_r F
+GLIBC_2.2.6 ntohl F
+GLIBC_2.2.6 ntohs F
+GLIBC_2.2.6 obstack_alloc_failed_handler D 0x8
+GLIBC_2.2.6 obstack_exit_failure D 0x4
+GLIBC_2.2.6 obstack_free F
+GLIBC_2.2.6 obstack_printf F
+GLIBC_2.2.6 obstack_vprintf F
+GLIBC_2.2.6 on_exit F
+GLIBC_2.2.6 open F
+GLIBC_2.2.6 open64 F
+GLIBC_2.2.6 open_memstream F
+GLIBC_2.2.6 opendir F
+GLIBC_2.2.6 openlog F
+GLIBC_2.2.6 openport F
+GLIBC_2.2.6 openpty F
+GLIBC_2.2.6 optarg D 0x8
+GLIBC_2.2.6 opterr D 0x4
+GLIBC_2.2.6 optind D 0x4
+GLIBC_2.2.6 optopt D 0x4
+GLIBC_2.2.6 parse_printf_format F
+GLIBC_2.2.6 passwd2des F
+GLIBC_2.2.6 pathconf F
+GLIBC_2.2.6 pause F
+GLIBC_2.2.6 pclose F
+GLIBC_2.2.6 perror F
+GLIBC_2.2.6 pid2task F
+GLIBC_2.2.6 pipe F
+GLIBC_2.2.6 pmap_getmaps F
+GLIBC_2.2.6 pmap_getport F
+GLIBC_2.2.6 pmap_rmtcall F
+GLIBC_2.2.6 pmap_set F
+GLIBC_2.2.6 pmap_unset F
+GLIBC_2.2.6 poll F
+GLIBC_2.2.6 popen F
+GLIBC_2.2.6 posix_fadvise F
+GLIBC_2.2.6 posix_fadvise64 F
+GLIBC_2.2.6 posix_fallocate F
+GLIBC_2.2.6 posix_fallocate64 F
+GLIBC_2.2.6 posix_madvise F
+GLIBC_2.2.6 posix_memalign F
+GLIBC_2.2.6 posix_openpt F
+GLIBC_2.2.6 posix_spawn F
+GLIBC_2.2.6 posix_spawn_file_actions_addclose F
+GLIBC_2.2.6 posix_spawn_file_actions_adddup2 F
+GLIBC_2.2.6 posix_spawn_file_actions_addopen F
+GLIBC_2.2.6 posix_spawn_file_actions_destroy F
+GLIBC_2.2.6 posix_spawn_file_actions_init F
+GLIBC_2.2.6 posix_spawnattr_destroy F
+GLIBC_2.2.6 posix_spawnattr_getflags F
+GLIBC_2.2.6 posix_spawnattr_getpgroup F
+GLIBC_2.2.6 posix_spawnattr_getschedparam F
+GLIBC_2.2.6 posix_spawnattr_getschedpolicy F
+GLIBC_2.2.6 posix_spawnattr_getsigdefault F
+GLIBC_2.2.6 posix_spawnattr_getsigmask F
+GLIBC_2.2.6 posix_spawnattr_init F
+GLIBC_2.2.6 posix_spawnattr_setflags F
+GLIBC_2.2.6 posix_spawnattr_setpgroup F
+GLIBC_2.2.6 posix_spawnattr_setschedparam F
+GLIBC_2.2.6 posix_spawnattr_setschedpolicy F
+GLIBC_2.2.6 posix_spawnattr_setsigdefault F
+GLIBC_2.2.6 posix_spawnattr_setsigmask F
+GLIBC_2.2.6 posix_spawnp F
+GLIBC_2.2.6 pread F
+GLIBC_2.2.6 pread64 F
+GLIBC_2.2.6 printf F
+GLIBC_2.2.6 printf_size F
+GLIBC_2.2.6 printf_size_info F
+GLIBC_2.2.6 profil F
+GLIBC_2.2.6 program_invocation_name D 0x8
+GLIBC_2.2.6 program_invocation_short_name D 0x8
+GLIBC_2.2.6 pselect F
+GLIBC_2.2.6 psignal F
+GLIBC_2.2.6 ptrace F
+GLIBC_2.2.6 ptsname F
+GLIBC_2.2.6 ptsname_r F
+GLIBC_2.2.6 putc F
+GLIBC_2.2.6 putc_unlocked F
+GLIBC_2.2.6 putchar F
+GLIBC_2.2.6 putchar_unlocked F
+GLIBC_2.2.6 putenv F
+GLIBC_2.2.6 putgrent F
+GLIBC_2.2.6 putmsg F
+GLIBC_2.2.6 putpmsg F
+GLIBC_2.2.6 putpwent F
+GLIBC_2.2.6 puts F
+GLIBC_2.2.6 putspent F
+GLIBC_2.2.6 pututline F
+GLIBC_2.2.6 pututxline F
+GLIBC_2.2.6 putw F
+GLIBC_2.2.6 putwc F
+GLIBC_2.2.6 putwc_unlocked F
+GLIBC_2.2.6 putwchar F
+GLIBC_2.2.6 putwchar_unlocked F
+GLIBC_2.2.6 pvalloc F
+GLIBC_2.2.6 pwrite F
+GLIBC_2.2.6 pwrite64 F
+GLIBC_2.2.6 qecvt F
+GLIBC_2.2.6 qecvt_r F
+GLIBC_2.2.6 qfcvt F
+GLIBC_2.2.6 qfcvt_r F
+GLIBC_2.2.6 qgcvt F
+GLIBC_2.2.6 qsort F
+GLIBC_2.2.6 raise F
+GLIBC_2.2.6 rand F
+GLIBC_2.2.6 rand_r F
+GLIBC_2.2.6 random F
+GLIBC_2.2.6 random_r F
+GLIBC_2.2.6 rawmemchr F
+GLIBC_2.2.6 rcmd F
+GLIBC_2.2.6 rcmd_af F
+GLIBC_2.2.6 re_comp F
+GLIBC_2.2.6 re_compile_fastmap F
+GLIBC_2.2.6 re_compile_pattern F
+GLIBC_2.2.6 re_exec F
+GLIBC_2.2.6 re_match F
+GLIBC_2.2.6 re_match_2 F
+GLIBC_2.2.6 re_max_failures D 0x4
+GLIBC_2.2.6 re_search F
+GLIBC_2.2.6 re_search_2 F
+GLIBC_2.2.6 re_set_registers F
+GLIBC_2.2.6 re_set_syntax F
+GLIBC_2.2.6 re_syntax_options D 0x8
+GLIBC_2.2.6 read F
+GLIBC_2.2.6 readdir F
+GLIBC_2.2.6 readdir64 F
+GLIBC_2.2.6 readdir64_r F
+GLIBC_2.2.6 readdir_r F
+GLIBC_2.2.6 readlink F
+GLIBC_2.2.6 readv F
+GLIBC_2.2.6 realloc F
+GLIBC_2.2.6 realpath F
+GLIBC_2.2.6 reboot F
+GLIBC_2.2.6 recv F
+GLIBC_2.2.6 recvfrom F
+GLIBC_2.2.6 recvmsg F
+GLIBC_2.2.6 regcomp F
+GLIBC_2.2.6 regerror F
+GLIBC_2.2.6 regexec F
+GLIBC_2.2.6 regfree F
+GLIBC_2.2.6 register_printf_function F
+GLIBC_2.2.6 registerrpc F
+GLIBC_2.2.6 remove F
+GLIBC_2.2.6 remque F
+GLIBC_2.2.6 rename F
+GLIBC_2.2.6 revoke F
+GLIBC_2.2.6 rewind F
+GLIBC_2.2.6 rewinddir F
+GLIBC_2.2.6 rexec F
+GLIBC_2.2.6 rexec_af F
+GLIBC_2.2.6 rexecoptions D 0x4
+GLIBC_2.2.6 rindex F
+GLIBC_2.2.6 rmdir F
+GLIBC_2.2.6 rpc_createerr D 0x20
+GLIBC_2.2.6 rpmatch F
+GLIBC_2.2.6 rresvport F
+GLIBC_2.2.6 rresvport_af F
+GLIBC_2.2.6 rtime F
+GLIBC_2.2.6 ruserok F
+GLIBC_2.2.6 ruserok_af F
+GLIBC_2.2.6 ruserpass F
+GLIBC_2.2.6 sbrk F
+GLIBC_2.2.6 scalbn F
+GLIBC_2.2.6 scalbnf F
+GLIBC_2.2.6 scalbnl F
+GLIBC_2.2.6 scandir F
+GLIBC_2.2.6 scandir64 F
+GLIBC_2.2.6 scanf F
+GLIBC_2.2.6 sched_get_priority_max F
+GLIBC_2.2.6 sched_get_priority_min F
+GLIBC_2.2.6 sched_getparam F
+GLIBC_2.2.6 sched_getscheduler F
+GLIBC_2.2.6 sched_rr_get_interval F
+GLIBC_2.2.6 sched_setparam F
+GLIBC_2.2.6 sched_setscheduler F
+GLIBC_2.2.6 sched_yield F
+GLIBC_2.2.6 seed48 F
+GLIBC_2.2.6 seed48_r F
+GLIBC_2.2.6 seekdir F
+GLIBC_2.2.6 select F
+GLIBC_2.2.6 semctl F
+GLIBC_2.2.6 semget F
+GLIBC_2.2.6 semop F
+GLIBC_2.2.6 send F
+GLIBC_2.2.6 sendfile F
+GLIBC_2.2.6 sendmsg F
+GLIBC_2.2.6 sendto F
+GLIBC_2.2.6 setaliasent F
+GLIBC_2.2.6 setauth F
+GLIBC_2.2.6 setbuf F
+GLIBC_2.2.6 setbuffer F
+GLIBC_2.2.6 setcontext F
+GLIBC_2.2.6 setcrdir F
+GLIBC_2.2.6 setcttyid F
+GLIBC_2.2.6 setcwdir F
+GLIBC_2.2.6 setdomainname F
+GLIBC_2.2.6 setegid F
+GLIBC_2.2.6 setenv F
+GLIBC_2.2.6 seteuid F
+GLIBC_2.2.6 seteuids F
+GLIBC_2.2.6 setfsent F
+GLIBC_2.2.6 setgid F
+GLIBC_2.2.6 setgrent F
+GLIBC_2.2.6 setgroups F
+GLIBC_2.2.6 sethostent F
+GLIBC_2.2.6 sethostid F
+GLIBC_2.2.6 sethostname F
+GLIBC_2.2.6 setitimer F
+GLIBC_2.2.6 setjmp F
+GLIBC_2.2.6 setlinebuf F
+GLIBC_2.2.6 setlocale F
+GLIBC_2.2.6 setlogin F
+GLIBC_2.2.6 setlogmask F
+GLIBC_2.2.6 setmntent F
+GLIBC_2.2.6 setnetent F
+GLIBC_2.2.6 setnetgrent F
+GLIBC_2.2.6 setpgid F
+GLIBC_2.2.6 setpgrp F
+GLIBC_2.2.6 setpriority F
+GLIBC_2.2.6 setproc F
+GLIBC_2.2.6 setprotoent F
+GLIBC_2.2.6 setpwent F
+GLIBC_2.2.6 setregid F
+GLIBC_2.2.6 setreuid F
+GLIBC_2.2.6 setrlimit F
+GLIBC_2.2.6 setrlimit64 F
+GLIBC_2.2.6 setrpcent F
+GLIBC_2.2.6 setservent F
+GLIBC_2.2.6 setsid F
+GLIBC_2.2.6 setsockopt F
+GLIBC_2.2.6 setspent F
+GLIBC_2.2.6 setstate F
+GLIBC_2.2.6 setstate_r F
+GLIBC_2.2.6 settimeofday F
+GLIBC_2.2.6 setttyent F
+GLIBC_2.2.6 setuid F
+GLIBC_2.2.6 setusershell F
+GLIBC_2.2.6 setutent F
+GLIBC_2.2.6 setutxent F
+GLIBC_2.2.6 setvbuf F
+GLIBC_2.2.6 sgetspent F
+GLIBC_2.2.6 sgetspent_r F
+GLIBC_2.2.6 shm_open F
+GLIBC_2.2.6 shm_unlink F
+GLIBC_2.2.6 shmat F
+GLIBC_2.2.6 shmctl F
+GLIBC_2.2.6 shmdt F
+GLIBC_2.2.6 shmget F
+GLIBC_2.2.6 shutdown F
+GLIBC_2.2.6 sigaction F
+GLIBC_2.2.6 sigaddset F
+GLIBC_2.2.6 sigaltstack F
+GLIBC_2.2.6 sigandset F
+GLIBC_2.2.6 sigblock F
+GLIBC_2.2.6 sigdelset F
+GLIBC_2.2.6 sigemptyset F
+GLIBC_2.2.6 sigfillset F
+GLIBC_2.2.6 siggetmask F
+GLIBC_2.2.6 sighold F
+GLIBC_2.2.6 sigignore F
+GLIBC_2.2.6 siginterrupt F
+GLIBC_2.2.6 sigisemptyset F
+GLIBC_2.2.6 sigismember F
+GLIBC_2.2.6 siglongjmp F
+GLIBC_2.2.6 signal F
+GLIBC_2.2.6 sigorset F
+GLIBC_2.2.6 sigpause F
+GLIBC_2.2.6 sigpending F
+GLIBC_2.2.6 sigprocmask F
+GLIBC_2.2.6 sigqueue F
+GLIBC_2.2.6 sigrelse F
+GLIBC_2.2.6 sigreturn F
+GLIBC_2.2.6 sigset F
+GLIBC_2.2.6 sigsetmask F
+GLIBC_2.2.6 sigstack F
+GLIBC_2.2.6 sigsuspend F
+GLIBC_2.2.6 sigtimedwait F
+GLIBC_2.2.6 sigvec F
+GLIBC_2.2.6 sigwait F
+GLIBC_2.2.6 sigwaitinfo F
+GLIBC_2.2.6 sleep F
+GLIBC_2.2.6 snprintf F
+GLIBC_2.2.6 sockatmark F
+GLIBC_2.2.6 socket F
+GLIBC_2.2.6 socketpair F
+GLIBC_2.2.6 sprintf F
+GLIBC_2.2.6 sprofil F
+GLIBC_2.2.6 srand F
+GLIBC_2.2.6 srand48 F
+GLIBC_2.2.6 srand48_r F
+GLIBC_2.2.6 srandom F
+GLIBC_2.2.6 srandom_r F
+GLIBC_2.2.6 sscanf F
+GLIBC_2.2.6 ssignal F
+GLIBC_2.2.6 sstk F
+GLIBC_2.2.6 statfs F
+GLIBC_2.2.6 statfs64 F
+GLIBC_2.2.6 statvfs F
+GLIBC_2.2.6 statvfs64 F
+GLIBC_2.2.6 stderr D 0x8
+GLIBC_2.2.6 stdin D 0x8
+GLIBC_2.2.6 stdout D 0x8
+GLIBC_2.2.6 step F
+GLIBC_2.2.6 stime F
+GLIBC_2.2.6 stpcpy F
+GLIBC_2.2.6 stpncpy F
+GLIBC_2.2.6 strcasecmp F
+GLIBC_2.2.6 strcasestr F
+GLIBC_2.2.6 strcat F
+GLIBC_2.2.6 strchr F
+GLIBC_2.2.6 strchrnul F
+GLIBC_2.2.6 strcmp F
+GLIBC_2.2.6 strcoll F
+GLIBC_2.2.6 strcpy F
+GLIBC_2.2.6 strcspn F
+GLIBC_2.2.6 strdup F
+GLIBC_2.2.6 strerror F
+GLIBC_2.2.6 strerror_r F
+GLIBC_2.2.6 strfmon F
+GLIBC_2.2.6 strfry F
+GLIBC_2.2.6 strftime F
+GLIBC_2.2.6 strlen F
+GLIBC_2.2.6 strncasecmp F
+GLIBC_2.2.6 strncat F
+GLIBC_2.2.6 strncmp F
+GLIBC_2.2.6 strncpy F
+GLIBC_2.2.6 strndup F
+GLIBC_2.2.6 strnlen F
+GLIBC_2.2.6 strpbrk F
+GLIBC_2.2.6 strptime F
+GLIBC_2.2.6 strrchr F
+GLIBC_2.2.6 strsep F
+GLIBC_2.2.6 strsignal F
+GLIBC_2.2.6 strspn F
+GLIBC_2.2.6 strstr F
+GLIBC_2.2.6 strtod F
+GLIBC_2.2.6 strtof F
+GLIBC_2.2.6 strtoimax F
+GLIBC_2.2.6 strtok F
+GLIBC_2.2.6 strtok_r F
+GLIBC_2.2.6 strtol F
+GLIBC_2.2.6 strtold F
+GLIBC_2.2.6 strtoll F
+GLIBC_2.2.6 strtoq F
+GLIBC_2.2.6 strtoul F
+GLIBC_2.2.6 strtoull F
+GLIBC_2.2.6 strtoumax F
+GLIBC_2.2.6 strtouq F
+GLIBC_2.2.6 strverscmp F
+GLIBC_2.2.6 strxfrm F
+GLIBC_2.2.6 stty F
+GLIBC_2.2.6 svc_exit F
+GLIBC_2.2.6 svc_fdset D 0x20
+GLIBC_2.2.6 svc_getreq F
+GLIBC_2.2.6 svc_getreq_common F
+GLIBC_2.2.6 svc_getreq_poll F
+GLIBC_2.2.6 svc_getreqset F
+GLIBC_2.2.6 svc_max_pollfd D 0x4
+GLIBC_2.2.6 svc_pollfd D 0x8
+GLIBC_2.2.6 svc_register F
+GLIBC_2.2.6 svc_run F
+GLIBC_2.2.6 svc_sendreply F
+GLIBC_2.2.6 svc_unregister F
+GLIBC_2.2.6 svcauthdes_stats D 0x18
+GLIBC_2.2.6 svcerr_auth F
+GLIBC_2.2.6 svcerr_decode F
+GLIBC_2.2.6 svcerr_noproc F
+GLIBC_2.2.6 svcerr_noprog F
+GLIBC_2.2.6 svcerr_progvers F
+GLIBC_2.2.6 svcerr_systemerr F
+GLIBC_2.2.6 svcerr_weakauth F
+GLIBC_2.2.6 svcfd_create F
+GLIBC_2.2.6 svcraw_create F
+GLIBC_2.2.6 svctcp_create F
+GLIBC_2.2.6 svcudp_bufcreate F
+GLIBC_2.2.6 svcudp_create F
+GLIBC_2.2.6 svcudp_enablecache F
+GLIBC_2.2.6 svcunix_create F
+GLIBC_2.2.6 svcunixfd_create F
+GLIBC_2.2.6 swab F
+GLIBC_2.2.6 swapcontext F
+GLIBC_2.2.6 swprintf F
+GLIBC_2.2.6 swscanf F
+GLIBC_2.2.6 swtch F
+GLIBC_2.2.6 swtch_pri F
+GLIBC_2.2.6 symlink F
+GLIBC_2.2.6 sync F
+GLIBC_2.2.6 sys_sigabbrev D 0x108
+GLIBC_2.2.6 sys_siglist D 0x108
+GLIBC_2.2.6 syscall F
+GLIBC_2.2.6 sysconf F
+GLIBC_2.2.6 syslog F
+GLIBC_2.2.6 system F
+GLIBC_2.2.6 sysv_signal F
+GLIBC_2.2.6 task2pid F
+GLIBC_2.2.6 task_create F
+GLIBC_2.2.6 task_set_special_port F
+GLIBC_2.2.6 task_suspend F
+GLIBC_2.2.6 task_terminate F
+GLIBC_2.2.6 tcdrain F
+GLIBC_2.2.6 tcflow F
+GLIBC_2.2.6 tcflush F
+GLIBC_2.2.6 tcgetattr F
+GLIBC_2.2.6 tcgetpgrp F
+GLIBC_2.2.6 tcgetsid F
+GLIBC_2.2.6 tcsendbreak F
+GLIBC_2.2.6 tcsetattr F
+GLIBC_2.2.6 tcsetpgrp F
+GLIBC_2.2.6 tdelete F
+GLIBC_2.2.6 tdestroy F
+GLIBC_2.2.6 telldir F
+GLIBC_2.2.6 tempnam F
+GLIBC_2.2.6 textdomain F
+GLIBC_2.2.6 tfind F
+GLIBC_2.2.6 thread_depress_abort F
+GLIBC_2.2.6 thread_switch F
+GLIBC_2.2.6 time F
+GLIBC_2.2.6 timegm F
+GLIBC_2.2.6 timelocal F
+GLIBC_2.2.6 times F
+GLIBC_2.2.6 timezone D 0x8
+GLIBC_2.2.6 tmpfile F
+GLIBC_2.2.6 tmpfile64 F
+GLIBC_2.2.6 tmpnam F
+GLIBC_2.2.6 tmpnam_r F
+GLIBC_2.2.6 toascii F
+GLIBC_2.2.6 tolower F
+GLIBC_2.2.6 toupper F
+GLIBC_2.2.6 towctrans F
+GLIBC_2.2.6 towlower F
+GLIBC_2.2.6 towupper F
+GLIBC_2.2.6 tr_break F
+GLIBC_2.2.6 truncate F
+GLIBC_2.2.6 truncate64 F
+GLIBC_2.2.6 tsearch F
+GLIBC_2.2.6 ttyname F
+GLIBC_2.2.6 ttyname_r F
+GLIBC_2.2.6 ttyslot F
+GLIBC_2.2.6 twalk F
+GLIBC_2.2.6 tzname D 0x10
+GLIBC_2.2.6 tzset F
+GLIBC_2.2.6 ualarm F
+GLIBC_2.2.6 ulckpwdf F
+GLIBC_2.2.6 ulimit F
+GLIBC_2.2.6 umask F
+GLIBC_2.2.6 uname F
+GLIBC_2.2.6 ungetc F
+GLIBC_2.2.6 ungetwc F
+GLIBC_2.2.6 unlink F
+GLIBC_2.2.6 unlockpt F
+GLIBC_2.2.6 unsetenv F
+GLIBC_2.2.6 updwtmp F
+GLIBC_2.2.6 updwtmpx F
+GLIBC_2.2.6 user2netname F
+GLIBC_2.2.6 usleep F
+GLIBC_2.2.6 ustat F
+GLIBC_2.2.6 utime F
+GLIBC_2.2.6 utimes F
+GLIBC_2.2.6 utmpname F
+GLIBC_2.2.6 utmpxname F
+GLIBC_2.2.6 valloc F
+GLIBC_2.2.6 vasprintf F
+GLIBC_2.2.6 vdprintf F
+GLIBC_2.2.6 verr F
+GLIBC_2.2.6 verrx F
+GLIBC_2.2.6 versionsort F
+GLIBC_2.2.6 versionsort64 F
+GLIBC_2.2.6 vfork F
+GLIBC_2.2.6 vfprintf F
+GLIBC_2.2.6 vfscanf F
+GLIBC_2.2.6 vfwprintf F
+GLIBC_2.2.6 vfwscanf F
+GLIBC_2.2.6 vhangup F
+GLIBC_2.2.6 vlimit F
+GLIBC_2.2.6 vm_allocate F
+GLIBC_2.2.6 vm_deallocate F
+GLIBC_2.2.6 vm_map F
+GLIBC_2.2.6 vm_page_size D 0x8
+GLIBC_2.2.6 vpprintf F
+GLIBC_2.2.6 vprintf F
+GLIBC_2.2.6 vscanf F
+GLIBC_2.2.6 vsnprintf F
+GLIBC_2.2.6 vsprintf F
+GLIBC_2.2.6 vsscanf F
+GLIBC_2.2.6 vswprintf F
+GLIBC_2.2.6 vswscanf F
+GLIBC_2.2.6 vsyslog F
+GLIBC_2.2.6 vtimes F
+GLIBC_2.2.6 vwarn F
+GLIBC_2.2.6 vwarnx F
+GLIBC_2.2.6 vwprintf F
+GLIBC_2.2.6 vwscanf F
+GLIBC_2.2.6 wait F
+GLIBC_2.2.6 wait3 F
+GLIBC_2.2.6 wait4 F
+GLIBC_2.2.6 waitid F
+GLIBC_2.2.6 waitpid F
+GLIBC_2.2.6 warn F
+GLIBC_2.2.6 warnx F
+GLIBC_2.2.6 wcpcpy F
+GLIBC_2.2.6 wcpncpy F
+GLIBC_2.2.6 wcrtomb F
+GLIBC_2.2.6 wcscasecmp F
+GLIBC_2.2.6 wcscat F
+GLIBC_2.2.6 wcschr F
+GLIBC_2.2.6 wcschrnul F
+GLIBC_2.2.6 wcscmp F
+GLIBC_2.2.6 wcscoll F
+GLIBC_2.2.6 wcscpy F
+GLIBC_2.2.6 wcscspn F
+GLIBC_2.2.6 wcsdup F
+GLIBC_2.2.6 wcsftime F
+GLIBC_2.2.6 wcslen F
+GLIBC_2.2.6 wcsncasecmp F
+GLIBC_2.2.6 wcsncat F
+GLIBC_2.2.6 wcsncmp F
+GLIBC_2.2.6 wcsncpy F
+GLIBC_2.2.6 wcsnlen F
+GLIBC_2.2.6 wcsnrtombs F
+GLIBC_2.2.6 wcspbrk F
+GLIBC_2.2.6 wcsrchr F
+GLIBC_2.2.6 wcsrtombs F
+GLIBC_2.2.6 wcsspn F
+GLIBC_2.2.6 wcsstr F
+GLIBC_2.2.6 wcstod F
+GLIBC_2.2.6 wcstof F
+GLIBC_2.2.6 wcstoimax F
+GLIBC_2.2.6 wcstok F
+GLIBC_2.2.6 wcstol F
+GLIBC_2.2.6 wcstold F
+GLIBC_2.2.6 wcstoll F
+GLIBC_2.2.6 wcstombs F
+GLIBC_2.2.6 wcstoq F
+GLIBC_2.2.6 wcstoul F
+GLIBC_2.2.6 wcstoull F
+GLIBC_2.2.6 wcstoumax F
+GLIBC_2.2.6 wcstouq F
+GLIBC_2.2.6 wcswcs F
+GLIBC_2.2.6 wcswidth F
+GLIBC_2.2.6 wcsxfrm F
+GLIBC_2.2.6 wctob F
+GLIBC_2.2.6 wctomb F
+GLIBC_2.2.6 wctrans F
+GLIBC_2.2.6 wctype F
+GLIBC_2.2.6 wcwidth F
+GLIBC_2.2.6 wmemchr F
+GLIBC_2.2.6 wmemcmp F
+GLIBC_2.2.6 wmemcpy F
+GLIBC_2.2.6 wmemmove F
+GLIBC_2.2.6 wmempcpy F
+GLIBC_2.2.6 wmemset F
+GLIBC_2.2.6 wordexp F
+GLIBC_2.2.6 wordfree F
+GLIBC_2.2.6 wprintf F
+GLIBC_2.2.6 write F
+GLIBC_2.2.6 writev F
+GLIBC_2.2.6 wscanf F
+GLIBC_2.2.6 xdecrypt F
+GLIBC_2.2.6 xdr_accepted_reply F
+GLIBC_2.2.6 xdr_array F
+GLIBC_2.2.6 xdr_authdes_cred F
+GLIBC_2.2.6 xdr_authdes_verf F
+GLIBC_2.2.6 xdr_authunix_parms F
+GLIBC_2.2.6 xdr_bool F
+GLIBC_2.2.6 xdr_bytes F
+GLIBC_2.2.6 xdr_callhdr F
+GLIBC_2.2.6 xdr_callmsg F
+GLIBC_2.2.6 xdr_char F
+GLIBC_2.2.6 xdr_cryptkeyarg F
+GLIBC_2.2.6 xdr_cryptkeyarg2 F
+GLIBC_2.2.6 xdr_cryptkeyres F
+GLIBC_2.2.6 xdr_des_block F
+GLIBC_2.2.6 xdr_double F
+GLIBC_2.2.6 xdr_enum F
+GLIBC_2.2.6 xdr_float F
+GLIBC_2.2.6 xdr_free F
+GLIBC_2.2.6 xdr_getcredres F
+GLIBC_2.2.6 xdr_hyper F
+GLIBC_2.2.6 xdr_int F
+GLIBC_2.2.6 xdr_int16_t F
+GLIBC_2.2.6 xdr_int32_t F
+GLIBC_2.2.6 xdr_int64_t F
+GLIBC_2.2.6 xdr_int8_t F
+GLIBC_2.2.6 xdr_key_netstarg F
+GLIBC_2.2.6 xdr_key_netstres F
+GLIBC_2.2.6 xdr_keybuf F
+GLIBC_2.2.6 xdr_keystatus F
+GLIBC_2.2.6 xdr_long F
+GLIBC_2.2.6 xdr_longlong_t F
+GLIBC_2.2.6 xdr_netnamestr F
+GLIBC_2.2.6 xdr_netobj F
+GLIBC_2.2.6 xdr_opaque F
+GLIBC_2.2.6 xdr_opaque_auth F
+GLIBC_2.2.6 xdr_pmap F
+GLIBC_2.2.6 xdr_pmaplist F
+GLIBC_2.2.6 xdr_pointer F
+GLIBC_2.2.6 xdr_reference F
+GLIBC_2.2.6 xdr_rejected_reply F
+GLIBC_2.2.6 xdr_replymsg F
+GLIBC_2.2.6 xdr_rmtcall_args F
+GLIBC_2.2.6 xdr_rmtcallres F
+GLIBC_2.2.6 xdr_short F
+GLIBC_2.2.6 xdr_sizeof F
+GLIBC_2.2.6 xdr_string F
+GLIBC_2.2.6 xdr_u_char F
+GLIBC_2.2.6 xdr_u_hyper F
+GLIBC_2.2.6 xdr_u_int F
+GLIBC_2.2.6 xdr_u_long F
+GLIBC_2.2.6 xdr_u_longlong_t F
+GLIBC_2.2.6 xdr_u_short F
+GLIBC_2.2.6 xdr_uint16_t F
+GLIBC_2.2.6 xdr_uint32_t F
+GLIBC_2.2.6 xdr_uint64_t F
+GLIBC_2.2.6 xdr_uint8_t F
+GLIBC_2.2.6 xdr_union F
+GLIBC_2.2.6 xdr_unixcred F
+GLIBC_2.2.6 xdr_vector F
+GLIBC_2.2.6 xdr_void F
+GLIBC_2.2.6 xdr_wrapstring F
+GLIBC_2.2.6 xdrmem_create F
+GLIBC_2.2.6 xdrrec_create F
+GLIBC_2.2.6 xdrrec_endofrecord F
+GLIBC_2.2.6 xdrrec_eof F
+GLIBC_2.2.6 xdrrec_skiprecord F
+GLIBC_2.2.6 xdrstdio_create F
+GLIBC_2.2.6 xencrypt F
+GLIBC_2.2.6 xprt_register F
+GLIBC_2.2.6 xprt_unregister F
+GLIBC_2.21 __mach_host_self_ D 0x4
+GLIBC_2.21 __pthread_get_cleanup_stack F
+GLIBC_2.21 pthread_attr_destroy F
+GLIBC_2.21 pthread_attr_getdetachstate F
+GLIBC_2.21 pthread_attr_getinheritsched F
+GLIBC_2.21 pthread_attr_getschedparam F
+GLIBC_2.21 pthread_attr_getschedpolicy F
+GLIBC_2.21 pthread_attr_getscope F
+GLIBC_2.21 pthread_attr_init F
+GLIBC_2.21 pthread_attr_setdetachstate F
+GLIBC_2.21 pthread_attr_setinheritsched F
+GLIBC_2.21 pthread_attr_setschedparam F
+GLIBC_2.21 pthread_attr_setschedpolicy F
+GLIBC_2.21 pthread_attr_setscope F
+GLIBC_2.21 pthread_cond_broadcast F
+GLIBC_2.21 pthread_cond_destroy F
+GLIBC_2.21 pthread_cond_init F
+GLIBC_2.21 pthread_cond_signal F
+GLIBC_2.21 pthread_cond_timedwait F
+GLIBC_2.21 pthread_cond_wait F
+GLIBC_2.21 pthread_condattr_destroy F
+GLIBC_2.21 pthread_condattr_init F
+GLIBC_2.21 pthread_equal F
+GLIBC_2.21 pthread_exit F
+GLIBC_2.21 pthread_getschedparam F
+GLIBC_2.21 pthread_mutex_destroy F
+GLIBC_2.21 pthread_mutex_init F
+GLIBC_2.21 pthread_mutex_lock F
+GLIBC_2.21 pthread_mutex_unlock F
+GLIBC_2.21 pthread_self F
+GLIBC_2.21 pthread_setcancelstate F
+GLIBC_2.21 pthread_setcanceltype F
+GLIBC_2.21 pthread_setschedparam F
+GLIBC_2.22 __register_atfork F
+GLIBC_2.22 fmemopen F
+GLIBC_2.23 fts64_children F
+GLIBC_2.23 fts64_close F
+GLIBC_2.23 fts64_open F
+GLIBC_2.23 fts64_read F
+GLIBC_2.23 fts64_set F
+GLIBC_2.24 quick_exit F
+GLIBC_2.25 __explicit_bzero_chk F
+GLIBC_2.25 explicit_bzero F
+GLIBC_2.25 getentropy F
+GLIBC_2.25 getrandom F
+GLIBC_2.25 gnu_dev_major F
+GLIBC_2.25 gnu_dev_makedev F
+GLIBC_2.25 gnu_dev_minor F
+GLIBC_2.25 strfromd F
+GLIBC_2.25 strfromf F
+GLIBC_2.25 strfroml F
+GLIBC_2.26 __isnanf128 F
+GLIBC_2.26 __strtof128_internal F
+GLIBC_2.26 __wcstof128_internal F
+GLIBC_2.26 _hurd_exec_paths F
+GLIBC_2.26 preadv2 F
+GLIBC_2.26 preadv64v2 F
+GLIBC_2.26 pwritev2 F
+GLIBC_2.26 pwritev64v2 F
+GLIBC_2.26 reallocarray F
+GLIBC_2.26 strfromf128 F
+GLIBC_2.26 strtof128 F
+GLIBC_2.26 strtof128_l F
+GLIBC_2.26 wcstof128 F
+GLIBC_2.26 wcstof128_l F
+GLIBC_2.27 __hurd_dfail F
+GLIBC_2.27 __hurd_sockfail F
+GLIBC_2.27 _hurd_fd_error F
+GLIBC_2.27 _hurd_fd_error_signal F
+GLIBC_2.27 _hurd_port_locked_set F
+GLIBC_2.27 _hurd_userlink_clear F
+GLIBC_2.27 _hurd_userlink_link F
+GLIBC_2.27 _hurd_userlink_unlink F
+GLIBC_2.27 copy_file_range F
+GLIBC_2.27 glob F
+GLIBC_2.27 glob64 F
+GLIBC_2.27 strfromf32 F
+GLIBC_2.27 strfromf32x F
+GLIBC_2.27 strfromf64 F
+GLIBC_2.27 strfromf64x F
+GLIBC_2.27 strtof32 F
+GLIBC_2.27 strtof32_l F
+GLIBC_2.27 strtof32x F
+GLIBC_2.27 strtof32x_l F
+GLIBC_2.27 strtof64 F
+GLIBC_2.27 strtof64_l F
+GLIBC_2.27 strtof64x F
+GLIBC_2.27 strtof64x_l F
+GLIBC_2.27 wcstof32 F
+GLIBC_2.27 wcstof32_l F
+GLIBC_2.27 wcstof32x F
+GLIBC_2.27 wcstof32x_l F
+GLIBC_2.27 wcstof64 F
+GLIBC_2.27 wcstof64_l F
+GLIBC_2.27 wcstof64x F
+GLIBC_2.27 wcstof64x_l F
+GLIBC_2.28 fcntl64 F
+GLIBC_2.28 renameat2 F
+GLIBC_2.28 statx F
+GLIBC_2.29 _hurd_port_move F
+GLIBC_2.29 posix_spawn_file_actions_addchdir_np F
+GLIBC_2.29 posix_spawn_file_actions_addfchdir_np F
+GLIBC_2.3 __ctype_b_loc F
+GLIBC_2.3 __ctype_tolower_loc F
+GLIBC_2.3 __ctype_toupper_loc F
+GLIBC_2.3 __isctype F
+GLIBC_2.3 __strftime_l F
+GLIBC_2.3 __uselocale F
+GLIBC_2.3 __wcsftime_l F
+GLIBC_2.3 duplocale F
+GLIBC_2.3 fgetxattr F
+GLIBC_2.3 flistxattr F
+GLIBC_2.3 freeifaddrs F
+GLIBC_2.3 freelocale F
+GLIBC_2.3 fremovexattr F
+GLIBC_2.3 fsetxattr F
+GLIBC_2.3 futimes F
+GLIBC_2.3 getifaddrs F
+GLIBC_2.3 getxattr F
+GLIBC_2.3 isalnum_l F
+GLIBC_2.3 isalpha_l F
+GLIBC_2.3 isblank_l F
+GLIBC_2.3 iscntrl_l F
+GLIBC_2.3 isctype F
+GLIBC_2.3 isdigit_l F
+GLIBC_2.3 isgraph_l F
+GLIBC_2.3 islower_l F
+GLIBC_2.3 isprint_l F
+GLIBC_2.3 ispunct_l F
+GLIBC_2.3 isspace_l F
+GLIBC_2.3 isupper_l F
+GLIBC_2.3 iswalnum_l F
+GLIBC_2.3 iswalpha_l F
+GLIBC_2.3 iswblank_l F
+GLIBC_2.3 iswcntrl_l F
+GLIBC_2.3 iswctype_l F
+GLIBC_2.3 iswdigit_l F
+GLIBC_2.3 iswgraph_l F
+GLIBC_2.3 iswlower_l F
+GLIBC_2.3 iswprint_l F
+GLIBC_2.3 iswpunct_l F
+GLIBC_2.3 iswspace_l F
+GLIBC_2.3 iswupper_l F
+GLIBC_2.3 iswxdigit_l F
+GLIBC_2.3 isxdigit_l F
+GLIBC_2.3 lgetxattr F
+GLIBC_2.3 listxattr F
+GLIBC_2.3 llistxattr F
+GLIBC_2.3 lremovexattr F
+GLIBC_2.3 lsetxattr F
+GLIBC_2.3 lutimes F
+GLIBC_2.3 newlocale F
+GLIBC_2.3 nl_langinfo_l F
+GLIBC_2.3 realpath F
+GLIBC_2.3 removexattr F
+GLIBC_2.3 sendfile64 F
+GLIBC_2.3 setxattr F
+GLIBC_2.3 strcasecmp_l F
+GLIBC_2.3 strcoll_l F
+GLIBC_2.3 strfmon_l F
+GLIBC_2.3 strftime_l F
+GLIBC_2.3 strncasecmp_l F
+GLIBC_2.3 strtod_l F
+GLIBC_2.3 strtof_l F
+GLIBC_2.3 strtol_l F
+GLIBC_2.3 strtold_l F
+GLIBC_2.3 strtoul_l F
+GLIBC_2.3 strxfrm_l F
+GLIBC_2.3 tolower_l F
+GLIBC_2.3 toupper_l F
+GLIBC_2.3 towctrans_l F
+GLIBC_2.3 towlower_l F
+GLIBC_2.3 towupper_l F
+GLIBC_2.3 uselocale F
+GLIBC_2.3 wcscasecmp_l F
+GLIBC_2.3 wcscoll_l F
+GLIBC_2.3 wcsftime_l F
+GLIBC_2.3 wcsncasecmp_l F
+GLIBC_2.3 wcstod_l F
+GLIBC_2.3 wcstof_l F
+GLIBC_2.3 wcstol_l F
+GLIBC_2.3 wcstold_l F
+GLIBC_2.3 wcstoll_l F
+GLIBC_2.3 wcstoul_l F
+GLIBC_2.3 wcstoull_l F
+GLIBC_2.3 wcsxfrm_l F
+GLIBC_2.3 wctrans_l F
+GLIBC_2.3 wctype_l F
+GLIBC_2.3.2 getresgid F
+GLIBC_2.3.2 getresuid F
+GLIBC_2.3.2 lchmod F
+GLIBC_2.3.2 setresgid F
+GLIBC_2.3.2 setresuid F
+GLIBC_2.3.2 strptime_l F
+GLIBC_2.3.3 dladdr1 F
+GLIBC_2.3.3 dlinfo F
+GLIBC_2.3.3 inet6_option_alloc F
+GLIBC_2.3.3 inet6_option_append F
+GLIBC_2.3.3 inet6_option_find F
+GLIBC_2.3.3 inet6_option_init F
+GLIBC_2.3.3 inet6_option_next F
+GLIBC_2.3.3 inet6_option_space F
+GLIBC_2.3.3 nftw F
+GLIBC_2.3.3 nftw64 F
+GLIBC_2.3.3 remap_file_pages F
+GLIBC_2.3.3 sched_getaffinity F
+GLIBC_2.3.3 sched_setaffinity F
+GLIBC_2.3.3 semtimedop F
+GLIBC_2.3.3 strtoll_l F
+GLIBC_2.3.3 strtoull_l F
+GLIBC_2.3.4 __chk_fail F
+GLIBC_2.3.4 __fprintf_chk F
+GLIBC_2.3.4 __gets_chk F
+GLIBC_2.3.4 __memcpy_chk F
+GLIBC_2.3.4 __memmove_chk F
+GLIBC_2.3.4 __mempcpy_chk F
+GLIBC_2.3.4 __memset_chk F
+GLIBC_2.3.4 __printf_chk F
+GLIBC_2.3.4 __snprintf_chk F
+GLIBC_2.3.4 __sprintf_chk F
+GLIBC_2.3.4 __stpcpy_chk F
+GLIBC_2.3.4 __strcat_chk F
+GLIBC_2.3.4 __strcpy_chk F
+GLIBC_2.3.4 __strncat_chk F
+GLIBC_2.3.4 __strncpy_chk F
+GLIBC_2.3.4 __vfprintf_chk F
+GLIBC_2.3.4 __vprintf_chk F
+GLIBC_2.3.4 __vsnprintf_chk F
+GLIBC_2.3.4 __vsprintf_chk F
+GLIBC_2.3.4 __xpg_strerror_r F
+GLIBC_2.3.4 dlmopen F
+GLIBC_2.3.4 getipv4sourcefilter F
+GLIBC_2.3.4 getsourcefilter F
+GLIBC_2.3.4 regexec F
+GLIBC_2.3.4 setipv4sourcefilter F
+GLIBC_2.3.4 setsourcefilter F
+GLIBC_2.3.4 xdr_quad_t F
+GLIBC_2.3.4 xdr_u_quad_t F
+GLIBC_2.30 twalk_r F
+GLIBC_2.32 __libc_single_threaded D 0x1
+GLIBC_2.32 mach_print F
+GLIBC_2.32 mremap F
+GLIBC_2.32 sigabbrev_np F
+GLIBC_2.32 sigdescr_np F
+GLIBC_2.32 strerrordesc_np F
+GLIBC_2.32 strerrorname_np F
+GLIBC_2.32 thrd_current F
+GLIBC_2.32 thrd_equal F
+GLIBC_2.32 thrd_sleep F
+GLIBC_2.32 thrd_yield F
+GLIBC_2.33 __x86_get_cpuid_feature_leaf F
+GLIBC_2.33 fstat F
+GLIBC_2.33 fstat64 F
+GLIBC_2.33 fstatat F
+GLIBC_2.33 fstatat64 F
+GLIBC_2.33 lstat F
+GLIBC_2.33 lstat64 F
+GLIBC_2.33 mallinfo2 F
+GLIBC_2.33 mknod F
+GLIBC_2.33 mknodat F
+GLIBC_2.33 stat F
+GLIBC_2.33 stat64 F
+GLIBC_2.34 _Fork F
+GLIBC_2.34 __isnanf128 F
+GLIBC_2.34 __libc_start_main F
+GLIBC_2.34 _hurd_libc_proc_init F
+GLIBC_2.34 closefrom F
+GLIBC_2.34 dladdr F
+GLIBC_2.34 dladdr1 F
+GLIBC_2.34 dlclose F
+GLIBC_2.34 dlerror F
+GLIBC_2.34 dlinfo F
+GLIBC_2.34 dlmopen F
+GLIBC_2.34 dlopen F
+GLIBC_2.34 dlsym F
+GLIBC_2.34 dlvsym F
+GLIBC_2.34 dn_comp F
+GLIBC_2.34 dn_expand F
+GLIBC_2.34 dn_skipname F
+GLIBC_2.34 execveat F
+GLIBC_2.34 forkpty F
+GLIBC_2.34 login F
+GLIBC_2.34 login_tty F
+GLIBC_2.34 logout F
+GLIBC_2.34 logwtmp F
+GLIBC_2.34 ns_name_compress F
+GLIBC_2.34 ns_name_ntop F
+GLIBC_2.34 ns_name_pack F
+GLIBC_2.34 ns_name_pton F
+GLIBC_2.34 ns_name_skip F
+GLIBC_2.34 ns_name_uncompress F
+GLIBC_2.34 ns_name_unpack F
+GLIBC_2.34 openpty F
+GLIBC_2.34 posix_spawn_file_actions_addclosefrom_np F
+GLIBC_2.34 res_dnok F
+GLIBC_2.34 res_hnok F
+GLIBC_2.34 res_mailok F
+GLIBC_2.34 res_mkquery F
+GLIBC_2.34 res_nmkquery F
+GLIBC_2.34 res_nquery F
+GLIBC_2.34 res_nquerydomain F
+GLIBC_2.34 res_nsearch F
+GLIBC_2.34 res_nsend F
+GLIBC_2.34 res_ownok F
+GLIBC_2.34 res_query F
+GLIBC_2.34 res_querydomain F
+GLIBC_2.34 res_search F
+GLIBC_2.34 res_send F
+GLIBC_2.34 shm_open F
+GLIBC_2.34 shm_unlink F
+GLIBC_2.34 timespec_getres F
+GLIBC_2.35 __memcmpeq F
+GLIBC_2.35 _dl_find_object F
+GLIBC_2.35 close_range F
+GLIBC_2.35 posix_spawn_file_actions_addtcsetpgrp_np F
+GLIBC_2.36 arc4random F
+GLIBC_2.36 arc4random_buf F
+GLIBC_2.36 arc4random_uniform F
+GLIBC_2.36 c8rtomb F
+GLIBC_2.36 mbrtoc8 F
+GLIBC_2.38 __isoc23_fscanf F
+GLIBC_2.38 __isoc23_fwscanf F
+GLIBC_2.38 __isoc23_scanf F
+GLIBC_2.38 __isoc23_sscanf F
+GLIBC_2.38 __isoc23_strtoimax F
+GLIBC_2.38 __isoc23_strtol F
+GLIBC_2.38 __isoc23_strtol_l F
+GLIBC_2.38 __isoc23_strtoll F
+GLIBC_2.38 __isoc23_strtoll_l F
+GLIBC_2.38 __isoc23_strtoul F
+GLIBC_2.38 __isoc23_strtoul_l F
+GLIBC_2.38 __isoc23_strtoull F
+GLIBC_2.38 __isoc23_strtoull_l F
+GLIBC_2.38 __isoc23_strtoumax F
+GLIBC_2.38 __isoc23_swscanf F
+GLIBC_2.38 __isoc23_vfscanf F
+GLIBC_2.38 __isoc23_vfwscanf F
+GLIBC_2.38 __isoc23_vscanf F
+GLIBC_2.38 __isoc23_vsscanf F
+GLIBC_2.38 __isoc23_vswscanf F
+GLIBC_2.38 __isoc23_vwscanf F
+GLIBC_2.38 __isoc23_wcstoimax F
+GLIBC_2.38 __isoc23_wcstol F
+GLIBC_2.38 __isoc23_wcstol_l F
+GLIBC_2.38 __isoc23_wcstoll F
+GLIBC_2.38 __isoc23_wcstoll_l F
+GLIBC_2.38 __isoc23_wcstoul F
+GLIBC_2.38 __isoc23_wcstoul_l F
+GLIBC_2.38 __isoc23_wcstoull F
+GLIBC_2.38 __isoc23_wcstoull_l F
+GLIBC_2.38 __isoc23_wcstoumax F
+GLIBC_2.38 __isoc23_wscanf F
+GLIBC_2.4 __confstr_chk F
+GLIBC_2.4 __fgets_chk F
+GLIBC_2.4 __fgets_unlocked_chk F
+GLIBC_2.4 __fgetws_chk F
+GLIBC_2.4 __fgetws_unlocked_chk F
+GLIBC_2.4 __fwprintf_chk F
+GLIBC_2.4 __fxstatat F
+GLIBC_2.4 __fxstatat64 F
+GLIBC_2.4 __getcwd_chk F
+GLIBC_2.4 __getdomainname_chk F
+GLIBC_2.4 __getgroups_chk F
+GLIBC_2.4 __gethostname_chk F
+GLIBC_2.4 __getlogin_r_chk F
+GLIBC_2.4 __getwd_chk F
+GLIBC_2.4 __mbsnrtowcs_chk F
+GLIBC_2.4 __mbsrtowcs_chk F
+GLIBC_2.4 __mbstowcs_chk F
+GLIBC_2.4 __pread64_chk F
+GLIBC_2.4 __pread_chk F
+GLIBC_2.4 __ptsname_r_chk F
+GLIBC_2.4 __read_chk F
+GLIBC_2.4 __readlink_chk F
+GLIBC_2.4 __realpath_chk F
+GLIBC_2.4 __recv_chk F
+GLIBC_2.4 __recvfrom_chk F
+GLIBC_2.4 __stack_chk_fail F
+GLIBC_2.4 __stpncpy_chk F
+GLIBC_2.4 __swprintf_chk F
+GLIBC_2.4 __syslog_chk F
+GLIBC_2.4 __ttyname_r_chk F
+GLIBC_2.4 __vfwprintf_chk F
+GLIBC_2.4 __vswprintf_chk F
+GLIBC_2.4 __vsyslog_chk F
+GLIBC_2.4 __vwprintf_chk F
+GLIBC_2.4 __wcpcpy_chk F
+GLIBC_2.4 __wcpncpy_chk F
+GLIBC_2.4 __wcrtomb_chk F
+GLIBC_2.4 __wcscat_chk F
+GLIBC_2.4 __wcscpy_chk F
+GLIBC_2.4 __wcsncat_chk F
+GLIBC_2.4 __wcsncpy_chk F
+GLIBC_2.4 __wcsnrtombs_chk F
+GLIBC_2.4 __wcsrtombs_chk F
+GLIBC_2.4 __wcstombs_chk F
+GLIBC_2.4 __wctomb_chk F
+GLIBC_2.4 __wmemcpy_chk F
+GLIBC_2.4 __wmemmove_chk F
+GLIBC_2.4 __wmempcpy_chk F
+GLIBC_2.4 __wmemset_chk F
+GLIBC_2.4 __wprintf_chk F
+GLIBC_2.4 __xmknodat F
+GLIBC_2.4 eaccess F
+GLIBC_2.4 faccessat F
+GLIBC_2.4 fchmodat F
+GLIBC_2.4 fchownat F
+GLIBC_2.4 fdopendir F
+GLIBC_2.4 futimesat F
+GLIBC_2.4 linkat F
+GLIBC_2.4 mkdirat F
+GLIBC_2.4 mkfifoat F
+GLIBC_2.4 open_wmemstream F
+GLIBC_2.4 openat F
+GLIBC_2.4 openat64 F
+GLIBC_2.4 ppoll F
+GLIBC_2.4 readlinkat F
+GLIBC_2.4 renameat F
+GLIBC_2.4 symlinkat F
+GLIBC_2.4 unlinkat F
+GLIBC_2.5 __readlinkat_chk F
+GLIBC_2.5 inet6_opt_append F
+GLIBC_2.5 inet6_opt_find F
+GLIBC_2.5 inet6_opt_finish F
+GLIBC_2.5 inet6_opt_get_val F
+GLIBC_2.5 inet6_opt_init F
+GLIBC_2.5 inet6_opt_next F
+GLIBC_2.5 inet6_opt_set_val F
+GLIBC_2.5 inet6_rth_add F
+GLIBC_2.5 inet6_rth_getaddr F
+GLIBC_2.5 inet6_rth_init F
+GLIBC_2.5 inet6_rth_reverse F
+GLIBC_2.5 inet6_rth_segments F
+GLIBC_2.5 inet6_rth_space F
+GLIBC_2.6 __sched_cpucount F
+GLIBC_2.6 futimens F
+GLIBC_2.6 strerror_l F
+GLIBC_2.6 utimensat F
+GLIBC_2.7 __fread_chk F
+GLIBC_2.7 __fread_unlocked_chk F
+GLIBC_2.7 __isoc99_fscanf F
+GLIBC_2.7 __isoc99_fwscanf F
+GLIBC_2.7 __isoc99_scanf F
+GLIBC_2.7 __isoc99_sscanf F
+GLIBC_2.7 __isoc99_swscanf F
+GLIBC_2.7 __isoc99_vfscanf F
+GLIBC_2.7 __isoc99_vfwscanf F
+GLIBC_2.7 __isoc99_vscanf F
+GLIBC_2.7 __isoc99_vsscanf F
+GLIBC_2.7 __isoc99_vswscanf F
+GLIBC_2.7 __isoc99_vwscanf F
+GLIBC_2.7 __isoc99_wscanf F
+GLIBC_2.7 __open64_2 F
+GLIBC_2.7 __open_2 F
+GLIBC_2.7 __openat64_2 F
+GLIBC_2.7 __openat_2 F
+GLIBC_2.7 __sched_cpualloc F
+GLIBC_2.7 __sched_cpufree F
+GLIBC_2.7 mkostemp F
+GLIBC_2.7 mkostemp64 F
+GLIBC_2.8 __asprintf_chk F
+GLIBC_2.8 __dprintf_chk F
+GLIBC_2.8 __obstack_printf_chk F
+GLIBC_2.8 __obstack_vprintf_chk F
+GLIBC_2.8 __vasprintf_chk F
+GLIBC_2.8 __vdprintf_chk F
+GLIBC_2.8 qsort_r F
+GLIBC_2.9 dup3 F
+GLIBC_2.9 ns_name_compress F
+GLIBC_2.9 ns_name_ntop F
+GLIBC_2.9 ns_name_pack F
+GLIBC_2.9 ns_name_pton F
+GLIBC_2.9 ns_name_skip F
+GLIBC_2.9 ns_name_uncompress F
+GLIBC_2.9 ns_name_unpack F
+GLIBC_2.9 pipe2 F
+HURD_CTHREADS_0.3 __cthread_getspecific F
+HURD_CTHREADS_0.3 __cthread_keycreate F
+HURD_CTHREADS_0.3 __cthread_setspecific F
+HURD_CTHREADS_0.3 __mutex_init F
+HURD_CTHREADS_0.3 __mutex_lock F
+HURD_CTHREADS_0.3 __mutex_lock_solid F
+HURD_CTHREADS_0.3 __mutex_trylock F
+HURD_CTHREADS_0.3 __mutex_unlock F
+HURD_CTHREADS_0.3 __mutex_unlock_solid F
+HURD_CTHREADS_0.3 __spin_lock F
+HURD_CTHREADS_0.3 __spin_lock_init F
+HURD_CTHREADS_0.3 __spin_lock_solid F
+HURD_CTHREADS_0.3 __spin_try_lock F
+HURD_CTHREADS_0.3 __spin_unlock F
diff --git a/sysdeps/mach/hurd/x86_64/libc_malloc_debug.abilist b/sysdeps/mach/hurd/x86_64/libc_malloc_debug.abilist
new file mode 100644
index 00000000..2dc02928
--- /dev/null
+++ b/sysdeps/mach/hurd/x86_64/libc_malloc_debug.abilist
@@ -0,0 +1,28 @@
+GLIBC_2.10 malloc_info F
+GLIBC_2.16 aligned_alloc F
+GLIBC_2.2.6 __free_hook D 0x8
+GLIBC_2.2.6 __malloc_hook D 0x8
+GLIBC_2.2.6 __memalign_hook D 0x8
+GLIBC_2.2.6 __realloc_hook D 0x8
+GLIBC_2.2.6 calloc F
+GLIBC_2.2.6 free F
+GLIBC_2.2.6 mallinfo F
+GLIBC_2.2.6 malloc F
+GLIBC_2.2.6 malloc_get_state F
+GLIBC_2.2.6 malloc_set_state F
+GLIBC_2.2.6 malloc_stats F
+GLIBC_2.2.6 malloc_trim F
+GLIBC_2.2.6 malloc_usable_size F
+GLIBC_2.2.6 mallopt F
+GLIBC_2.2.6 mcheck F
+GLIBC_2.2.6 mcheck_check_all F
+GLIBC_2.2.6 mcheck_pedantic F
+GLIBC_2.2.6 memalign F
+GLIBC_2.2.6 mprobe F
+GLIBC_2.2.6 mtrace F
+GLIBC_2.2.6 muntrace F
+GLIBC_2.2.6 posix_memalign F
+GLIBC_2.2.6 pvalloc F
+GLIBC_2.2.6 realloc F
+GLIBC_2.2.6 valloc F
+GLIBC_2.33 mallinfo2 F
diff --git a/sysdeps/mach/hurd/x86_64/libcrypt.abilist b/sysdeps/mach/hurd/x86_64/libcrypt.abilist
new file mode 100644
index 00000000..5cd9b78d
--- /dev/null
+++ b/sysdeps/mach/hurd/x86_64/libcrypt.abilist
@@ -0,0 +1,7 @@
+GLIBC_2.2.6 crypt F
+GLIBC_2.2.6 crypt_r F
+GLIBC_2.2.6 encrypt F
+GLIBC_2.2.6 encrypt_r F
+GLIBC_2.2.6 fcrypt F
+GLIBC_2.2.6 setkey F
+GLIBC_2.2.6 setkey_r F
diff --git a/sysdeps/mach/hurd/x86_64/libdl.abilist b/sysdeps/mach/hurd/x86_64/libdl.abilist
new file mode 100644
index 00000000..59397ee9
--- /dev/null
+++ b/sysdeps/mach/hurd/x86_64/libdl.abilist
@@ -0,0 +1,3 @@
+GLIBC_2.2.6 __libdl_version_placeholder F
+GLIBC_2.3.3 __libdl_version_placeholder F
+GLIBC_2.3.4 __libdl_version_placeholder F
diff --git a/sysdeps/mach/hurd/x86_64/libhurduser.abilist b/sysdeps/mach/hurd/x86_64/libhurduser.abilist
new file mode 100644
index 00000000..5c6efbf8
--- /dev/null
+++ b/sysdeps/mach/hurd/x86_64/libhurduser.abilist
@@ -0,0 +1,754 @@
+Base _S_msg_server F
+Base _S_msg_server_routines D 0xc8
+Base __auth_getids F
+Base __auth_makeauth F
+Base __auth_server_authenticate F
+Base __auth_user_authenticate F
+Base __crash_dump_task F
+Base __dir_link F
+Base __dir_lookup F
+Base __dir_mkdir F
+Base __dir_mkfile F
+Base __dir_notice_changes F
+Base __dir_readdir F
+Base __dir_rename F
+Base __dir_rmdir F
+Base __dir_unlink F
+Base __exec_exec F
+Base __exec_exec_paths F
+Base __exec_init F
+Base __exec_setexecdata F
+Base __exec_startup_get_info F
+Base __file_chauthor F
+Base __file_check_access F
+Base __file_chflags F
+Base __file_chmod F
+Base __file_chown F
+Base __file_exec F
+Base __file_exec_paths F
+Base __file_get_fs_options F
+Base __file_get_storage_info F
+Base __file_get_translator F
+Base __file_get_translator_cntl F
+Base __file_getcontrol F
+Base __file_getfh F
+Base __file_getlinknode F
+Base __file_lock F
+Base __file_lock_stat F
+Base __file_notice_changes F
+Base __file_record_lock F
+Base __file_reparent F
+Base __file_set_size F
+Base __file_set_translator F
+Base __file_statfs F
+Base __file_sync F
+Base __file_syncfs F
+Base __file_utimens F
+Base __file_utimes F
+Base __fsys_forward F
+Base __fsys_get_children F
+Base __fsys_get_options F
+Base __fsys_get_source F
+Base __fsys_getfile F
+Base __fsys_getpriv F
+Base __fsys_getroot F
+Base __fsys_goaway F
+Base __fsys_init F
+Base __fsys_set_options F
+Base __fsys_startup F
+Base __fsys_syncfs F
+Base __gsync_wait_intr F
+Base __ifsock_getsockaddr F
+Base __interrupt_operation F
+Base __io_async F
+Base __io_async_reply F
+Base __io_async_request F
+Base __io_clear_some_openmodes F
+Base __io_clear_some_openmodes_reply F
+Base __io_clear_some_openmodes_request F
+Base __io_duplicate F
+Base __io_duplicate_reply F
+Base __io_duplicate_request F
+Base __io_eofnotify F
+Base __io_eofnotify_reply F
+Base __io_eofnotify_request F
+Base __io_get_conch F
+Base __io_get_conch_reply F
+Base __io_get_conch_request F
+Base __io_get_icky_async_id F
+Base __io_get_icky_async_id_reply F
+Base __io_get_icky_async_id_request F
+Base __io_get_openmodes F
+Base __io_get_openmodes_reply F
+Base __io_get_openmodes_request F
+Base __io_get_owner F
+Base __io_get_owner_reply F
+Base __io_get_owner_request F
+Base __io_identity F
+Base __io_identity_reply F
+Base __io_identity_request F
+Base __io_map F
+Base __io_map_cntl F
+Base __io_map_cntl_reply F
+Base __io_map_cntl_request F
+Base __io_map_reply F
+Base __io_map_request F
+Base __io_mod_owner F
+Base __io_mod_owner_reply F
+Base __io_mod_owner_request F
+Base __io_pathconf F
+Base __io_pathconf_reply F
+Base __io_pathconf_request F
+Base __io_postnotify F
+Base __io_postnotify_reply F
+Base __io_postnotify_request F
+Base __io_prenotify F
+Base __io_prenotify_reply F
+Base __io_prenotify_request F
+Base __io_read F
+Base __io_read_reply F
+Base __io_read_request F
+Base __io_readable F
+Base __io_readable_reply F
+Base __io_readable_request F
+Base __io_readnotify F
+Base __io_readnotify_reply F
+Base __io_readnotify_request F
+Base __io_readsleep F
+Base __io_readsleep_reply F
+Base __io_readsleep_request F
+Base __io_reauthenticate F
+Base __io_release_conch F
+Base __io_release_conch_reply F
+Base __io_release_conch_request F
+Base __io_restrict_auth F
+Base __io_restrict_auth_reply F
+Base __io_restrict_auth_request F
+Base __io_revoke F
+Base __io_revoke_reply F
+Base __io_revoke_request F
+Base __io_seek F
+Base __io_seek_reply F
+Base __io_seek_request F
+Base __io_select F
+Base __io_select_reply F
+Base __io_select_request F
+Base __io_select_timeout F
+Base __io_select_timeout_reply F
+Base __io_select_timeout_request F
+Base __io_server_version F
+Base __io_server_version_reply F
+Base __io_server_version_request F
+Base __io_set_all_openmodes F
+Base __io_set_all_openmodes_reply F
+Base __io_set_all_openmodes_request F
+Base __io_set_some_openmodes F
+Base __io_set_some_openmodes_reply F
+Base __io_set_some_openmodes_request F
+Base __io_sigio F
+Base __io_sigio_reply F
+Base __io_sigio_request F
+Base __io_stat F
+Base __io_stat_reply F
+Base __io_stat_request F
+Base __io_write F
+Base __io_write_reply F
+Base __io_write_request F
+Base __login_get_idle_time F
+Base __login_get_input_devices F
+Base __login_get_location F
+Base __login_get_login_collection F
+Base __login_message_user F
+Base __msg_add_auth F
+Base __msg_del_auth F
+Base __msg_describe_ports F
+Base __msg_get_dtable F
+Base __msg_get_env_variable F
+Base __msg_get_environment F
+Base __msg_get_fd F
+Base __msg_get_init_int F
+Base __msg_get_init_ints F
+Base __msg_get_init_port F
+Base __msg_get_init_ports F
+Base __msg_proc_newids F
+Base __msg_report_wait F
+Base __msg_set_dtable F
+Base __msg_set_env_variable F
+Base __msg_set_environment F
+Base __msg_set_fd F
+Base __msg_set_init_int F
+Base __msg_set_init_ints F
+Base __msg_set_init_port F
+Base __msg_set_init_ports F
+Base __msg_sig_post F
+Base __msg_sig_post_reply F
+Base __msg_sig_post_request F
+Base __msg_sig_post_untraced F
+Base __msg_sig_post_untraced_reply F
+Base __msg_sig_post_untraced_request F
+Base __password_check_group F
+Base __password_check_user F
+Base __pci_conf_read F
+Base __pci_conf_write F
+Base __pci_get_dev_regions F
+Base __pci_get_dev_rom F
+Base __pci_get_ndevs F
+Base __pfinet_getroutes F
+Base __pfinet_siocgifconf F
+Base __proc_child F
+Base __proc_child_request F
+Base __proc_dostop F
+Base __proc_dostop_request F
+Base __proc_execdata_notify F
+Base __proc_execdata_notify_request F
+Base __proc_get_arg_locations F
+Base __proc_get_arg_locations_request F
+Base __proc_get_code F
+Base __proc_get_code_request F
+Base __proc_get_entry F
+Base __proc_get_exe F
+Base __proc_get_tty F
+Base __proc_get_tty_request F
+Base __proc_getallpids F
+Base __proc_getallpids_request F
+Base __proc_getexecdata F
+Base __proc_getexecdata_request F
+Base __proc_getlogin F
+Base __proc_getlogin_request F
+Base __proc_getloginid F
+Base __proc_getloginid_request F
+Base __proc_getloginpids F
+Base __proc_getloginpids_request F
+Base __proc_getmsgport F
+Base __proc_getmsgport_request F
+Base __proc_getnports F
+Base __proc_getnports_request F
+Base __proc_getpgrp F
+Base __proc_getpgrp_request F
+Base __proc_getpgrppids F
+Base __proc_getpgrppids_request F
+Base __proc_getpids F
+Base __proc_getpids_request F
+Base __proc_getprivports F
+Base __proc_getprivports_request F
+Base __proc_getprocargs F
+Base __proc_getprocargs_request F
+Base __proc_getprocenv F
+Base __proc_getprocenv_request F
+Base __proc_getprocinfo F
+Base __proc_getprocinfo_request F
+Base __proc_getsessionpgids F
+Base __proc_getsessionpgids_request F
+Base __proc_getsessionpids F
+Base __proc_getsessionpids_request F
+Base __proc_getsid F
+Base __proc_getsid_request F
+Base __proc_getsidport F
+Base __proc_getsidport_request F
+Base __proc_handle_exceptions F
+Base __proc_handle_exceptions_request F
+Base __proc_is_important F
+Base __proc_is_important_request F
+Base __proc_make_login_coll F
+Base __proc_make_login_coll_request F
+Base __proc_make_task_namespace F
+Base __proc_make_task_namespace_request F
+Base __proc_mark_cont F
+Base __proc_mark_cont_request F
+Base __proc_mark_exec F
+Base __proc_mark_exec_request F
+Base __proc_mark_exit F
+Base __proc_mark_exit_request F
+Base __proc_mark_important F
+Base __proc_mark_important_request F
+Base __proc_mark_stop F
+Base __proc_mark_stop_request F
+Base __proc_mark_traced F
+Base __proc_mark_traced_request F
+Base __proc_mod_stopchild F
+Base __proc_mod_stopchild_request F
+Base __proc_pid2proc F
+Base __proc_pid2proc_request F
+Base __proc_pid2task F
+Base __proc_pid2task_request F
+Base __proc_proc2task F
+Base __proc_proc2task_request F
+Base __proc_reassign F
+Base __proc_reassign_request F
+Base __proc_reauthenticate F
+Base __proc_reauthenticate_complete F
+Base __proc_reauthenticate_reassign F
+Base __proc_reauthenticate_request F
+Base __proc_register_version F
+Base __proc_register_version_request F
+Base __proc_set_arg_locations F
+Base __proc_set_arg_locations_request F
+Base __proc_set_code F
+Base __proc_set_code_request F
+Base __proc_set_entry F
+Base __proc_set_exe F
+Base __proc_set_init_task F
+Base __proc_set_init_task_request F
+Base __proc_setexecdata F
+Base __proc_setexecdata_request F
+Base __proc_setlogin F
+Base __proc_setlogin_request F
+Base __proc_setmsgport F
+Base __proc_setmsgport_request F
+Base __proc_setowner F
+Base __proc_setowner_request F
+Base __proc_setpgrp F
+Base __proc_setpgrp_request F
+Base __proc_setsid F
+Base __proc_setsid_request F
+Base __proc_task2pid F
+Base __proc_task2pid_request F
+Base __proc_task2proc F
+Base __proc_task2proc_request F
+Base __proc_uname F
+Base __proc_uname_request F
+Base __proc_wait F
+Base __proc_wait_request F
+Base __proc_waitid F
+Base __socket_accept F
+Base __socket_bind F
+Base __socket_connect F
+Base __socket_connect2 F
+Base __socket_create F
+Base __socket_create_address F
+Base __socket_fabricate_address F
+Base __socket_getopt F
+Base __socket_listen F
+Base __socket_name F
+Base __socket_peername F
+Base __socket_recv F
+Base __socket_send F
+Base __socket_setopt F
+Base __socket_shutdown F
+Base __socket_whatis_address F
+Base __startup_authinit F
+Base __startup_essential_task F
+Base __startup_procinit F
+Base __startup_reboot F
+Base __startup_request_notification F
+Base __term_get_bottom_type F
+Base __term_get_nodename F
+Base __term_get_peername F
+Base __term_getctty F
+Base __term_on_hurddev F
+Base __term_on_machdev F
+Base __term_on_pty F
+Base __term_open_ctty F
+Base __term_set_filenode F
+Base __term_set_nodename F
+Base __termctty_open_terminal F
+Base __tioctl_tioccbrk F
+Base __tioctl_tioccdtr F
+Base __tioctl_tiocdrain F
+Base __tioctl_tiocexcl F
+Base __tioctl_tiocext F
+Base __tioctl_tiocflush F
+Base __tioctl_tiocgeta F
+Base __tioctl_tiocgetd F
+Base __tioctl_tiocgpgrp F
+Base __tioctl_tiocgwinsz F
+Base __tioctl_tiocmbic F
+Base __tioctl_tiocmbis F
+Base __tioctl_tiocmget F
+Base __tioctl_tiocmodg F
+Base __tioctl_tiocmods F
+Base __tioctl_tiocmset F
+Base __tioctl_tiocnxcl F
+Base __tioctl_tiocoutq F
+Base __tioctl_tiocpkt F
+Base __tioctl_tiocremote F
+Base __tioctl_tiocsbrk F
+Base __tioctl_tiocsdtr F
+Base __tioctl_tiocseta F
+Base __tioctl_tiocsetaf F
+Base __tioctl_tiocsetaw F
+Base __tioctl_tiocsetd F
+Base __tioctl_tiocsig F
+Base __tioctl_tiocspgrp F
+Base __tioctl_tiocstart F
+Base __tioctl_tiocsti F
+Base __tioctl_tiocstop F
+Base __tioctl_tiocswinsz F
+Base __tioctl_tiocucntl F
+Base _hurdsig_fault_exc_server F
+Base _hurdsig_fault_exc_server_routines D 0x8
+Base auth_getids F
+Base auth_makeauth F
+Base auth_server_authenticate F
+Base auth_user_authenticate F
+Base crash_dump_task F
+Base dir_link F
+Base dir_lookup F
+Base dir_mkdir F
+Base dir_mkfile F
+Base dir_notice_changes F
+Base dir_readdir F
+Base dir_rename F
+Base dir_rmdir F
+Base dir_unlink F
+Base exec_exec F
+Base exec_exec_paths F
+Base exec_init F
+Base exec_setexecdata F
+Base exec_startup_get_info F
+Base file_chauthor F
+Base file_check_access F
+Base file_chflags F
+Base file_chmod F
+Base file_chown F
+Base file_exec F
+Base file_exec_paths F
+Base file_get_fs_options F
+Base file_get_storage_info F
+Base file_get_translator F
+Base file_get_translator_cntl F
+Base file_getcontrol F
+Base file_getfh F
+Base file_getlinknode F
+Base file_lock F
+Base file_lock_stat F
+Base file_notice_changes F
+Base file_record_lock F
+Base file_reparent F
+Base file_set_size F
+Base file_set_translator F
+Base file_statfs F
+Base file_sync F
+Base file_syncfs F
+Base file_utimens F
+Base file_utimes F
+Base fsys_forward F
+Base fsys_get_children F
+Base fsys_get_options F
+Base fsys_get_source F
+Base fsys_getfile F
+Base fsys_getpriv F
+Base fsys_getroot F
+Base fsys_goaway F
+Base fsys_init F
+Base fsys_set_options F
+Base fsys_startup F
+Base fsys_syncfs F
+Base gsync_wait_intr F
+Base ifsock_getsockaddr F
+Base interrupt_operation F
+Base io_async F
+Base io_async_reply F
+Base io_async_request F
+Base io_clear_some_openmodes F
+Base io_clear_some_openmodes_reply F
+Base io_clear_some_openmodes_request F
+Base io_duplicate F
+Base io_duplicate_reply F
+Base io_duplicate_request F
+Base io_eofnotify F
+Base io_eofnotify_reply F
+Base io_eofnotify_request F
+Base io_get_conch F
+Base io_get_conch_reply F
+Base io_get_conch_request F
+Base io_get_icky_async_id F
+Base io_get_icky_async_id_reply F
+Base io_get_icky_async_id_request F
+Base io_get_openmodes F
+Base io_get_openmodes_reply F
+Base io_get_openmodes_request F
+Base io_get_owner F
+Base io_get_owner_reply F
+Base io_get_owner_request F
+Base io_identity F
+Base io_identity_reply F
+Base io_identity_request F
+Base io_map F
+Base io_map_cntl F
+Base io_map_cntl_reply F
+Base io_map_cntl_request F
+Base io_map_reply F
+Base io_map_request F
+Base io_mod_owner F
+Base io_mod_owner_reply F
+Base io_mod_owner_request F
+Base io_pathconf F
+Base io_pathconf_reply F
+Base io_pathconf_request F
+Base io_postnotify F
+Base io_postnotify_reply F
+Base io_postnotify_request F
+Base io_prenotify F
+Base io_prenotify_reply F
+Base io_prenotify_request F
+Base io_read F
+Base io_read_reply F
+Base io_read_request F
+Base io_readable F
+Base io_readable_reply F
+Base io_readable_request F
+Base io_readnotify F
+Base io_readnotify_reply F
+Base io_readnotify_request F
+Base io_readsleep F
+Base io_readsleep_reply F
+Base io_readsleep_request F
+Base io_reauthenticate F
+Base io_release_conch F
+Base io_release_conch_reply F
+Base io_release_conch_request F
+Base io_restrict_auth F
+Base io_restrict_auth_reply F
+Base io_restrict_auth_request F
+Base io_revoke F
+Base io_revoke_reply F
+Base io_revoke_request F
+Base io_seek F
+Base io_seek_reply F
+Base io_seek_request F
+Base io_select F
+Base io_select_reply F
+Base io_select_request F
+Base io_select_timeout F
+Base io_select_timeout_reply F
+Base io_select_timeout_request F
+Base io_server_version F
+Base io_server_version_reply F
+Base io_server_version_request F
+Base io_set_all_openmodes F
+Base io_set_all_openmodes_reply F
+Base io_set_all_openmodes_request F
+Base io_set_some_openmodes F
+Base io_set_some_openmodes_reply F
+Base io_set_some_openmodes_request F
+Base io_sigio F
+Base io_sigio_reply F
+Base io_sigio_request F
+Base io_stat F
+Base io_stat_reply F
+Base io_stat_request F
+Base io_write F
+Base io_write_reply F
+Base io_write_request F
+Base login_get_idle_time F
+Base login_get_input_devices F
+Base login_get_location F
+Base login_get_login_collection F
+Base login_message_user F
+Base msg_add_auth F
+Base msg_del_auth F
+Base msg_describe_ports F
+Base msg_get_dtable F
+Base msg_get_env_variable F
+Base msg_get_environment F
+Base msg_get_fd F
+Base msg_get_init_int F
+Base msg_get_init_ints F
+Base msg_get_init_port F
+Base msg_get_init_ports F
+Base msg_proc_newids F
+Base msg_report_wait F
+Base msg_set_dtable F
+Base msg_set_env_variable F
+Base msg_set_environment F
+Base msg_set_fd F
+Base msg_set_init_int F
+Base msg_set_init_ints F
+Base msg_set_init_port F
+Base msg_set_init_ports F
+Base msg_sig_post F
+Base msg_sig_post_reply F
+Base msg_sig_post_request F
+Base msg_sig_post_untraced F
+Base msg_sig_post_untraced_reply F
+Base msg_sig_post_untraced_request F
+Base password_check_group F
+Base password_check_user F
+Base pci_conf_read F
+Base pci_conf_write F
+Base pci_get_dev_regions F
+Base pci_get_dev_rom F
+Base pci_get_ndevs F
+Base pfinet_getroutes F
+Base pfinet_siocgifconf F
+Base proc_child F
+Base proc_child_request F
+Base proc_dostop F
+Base proc_dostop_request F
+Base proc_execdata_notify F
+Base proc_execdata_notify_request F
+Base proc_get_arg_locations F
+Base proc_get_arg_locations_request F
+Base proc_get_code F
+Base proc_get_code_request F
+Base proc_get_entry F
+Base proc_get_exe F
+Base proc_get_tty F
+Base proc_get_tty_request F
+Base proc_getallpids F
+Base proc_getallpids_request F
+Base proc_getexecdata F
+Base proc_getexecdata_request F
+Base proc_getlogin F
+Base proc_getlogin_request F
+Base proc_getloginid F
+Base proc_getloginid_request F
+Base proc_getloginpids F
+Base proc_getloginpids_request F
+Base proc_getmsgport F
+Base proc_getmsgport_request F
+Base proc_getnports F
+Base proc_getnports_request F
+Base proc_getpgrp F
+Base proc_getpgrp_request F
+Base proc_getpgrppids F
+Base proc_getpgrppids_request F
+Base proc_getpids F
+Base proc_getpids_request F
+Base proc_getprivports F
+Base proc_getprivports_request F
+Base proc_getprocargs F
+Base proc_getprocargs_request F
+Base proc_getprocenv F
+Base proc_getprocenv_request F
+Base proc_getprocinfo F
+Base proc_getprocinfo_request F
+Base proc_getsessionpgids F
+Base proc_getsessionpgids_request F
+Base proc_getsessionpids F
+Base proc_getsessionpids_request F
+Base proc_getsid F
+Base proc_getsid_request F
+Base proc_getsidport F
+Base proc_getsidport_request F
+Base proc_handle_exceptions F
+Base proc_handle_exceptions_request F
+Base proc_is_important F
+Base proc_is_important_request F
+Base proc_make_login_coll F
+Base proc_make_login_coll_request F
+Base proc_make_task_namespace F
+Base proc_make_task_namespace_request F
+Base proc_mark_cont F
+Base proc_mark_cont_request F
+Base proc_mark_exec F
+Base proc_mark_exec_request F
+Base proc_mark_exit F
+Base proc_mark_exit_request F
+Base proc_mark_important F
+Base proc_mark_important_request F
+Base proc_mark_stop F
+Base proc_mark_stop_request F
+Base proc_mark_traced F
+Base proc_mark_traced_request F
+Base proc_mod_stopchild F
+Base proc_mod_stopchild_request F
+Base proc_pid2proc F
+Base proc_pid2proc_request F
+Base proc_pid2task F
+Base proc_pid2task_request F
+Base proc_proc2task F
+Base proc_proc2task_request F
+Base proc_reassign F
+Base proc_reassign_request F
+Base proc_reauthenticate F
+Base proc_reauthenticate_complete F
+Base proc_reauthenticate_reassign F
+Base proc_reauthenticate_request F
+Base proc_register_version F
+Base proc_register_version_request F
+Base proc_set_arg_locations F
+Base proc_set_arg_locations_request F
+Base proc_set_code F
+Base proc_set_code_request F
+Base proc_set_entry F
+Base proc_set_exe F
+Base proc_set_init_task F
+Base proc_set_init_task_request F
+Base proc_setexecdata F
+Base proc_setexecdata_request F
+Base proc_setlogin F
+Base proc_setlogin_request F
+Base proc_setmsgport F
+Base proc_setmsgport_request F
+Base proc_setowner F
+Base proc_setowner_request F
+Base proc_setpgrp F
+Base proc_setpgrp_request F
+Base proc_setsid F
+Base proc_setsid_request F
+Base proc_task2pid F
+Base proc_task2pid_request F
+Base proc_task2proc F
+Base proc_task2proc_request F
+Base proc_uname F
+Base proc_uname_request F
+Base proc_wait F
+Base proc_wait_request F
+Base proc_waitid F
+Base socket_accept F
+Base socket_bind F
+Base socket_connect F
+Base socket_connect2 F
+Base socket_create F
+Base socket_create_address F
+Base socket_fabricate_address F
+Base socket_getopt F
+Base socket_listen F
+Base socket_name F
+Base socket_peername F
+Base socket_recv F
+Base socket_send F
+Base socket_setopt F
+Base socket_shutdown F
+Base socket_whatis_address F
+Base startup_authinit F
+Base startup_essential_task F
+Base startup_procinit F
+Base startup_reboot F
+Base startup_request_notification F
+Base term_get_bottom_type F
+Base term_get_nodename F
+Base term_get_peername F
+Base term_getctty F
+Base term_on_hurddev F
+Base term_on_machdev F
+Base term_on_pty F
+Base term_open_ctty F
+Base term_set_filenode F
+Base term_set_nodename F
+Base termctty_open_terminal F
+Base tioctl_tioccbrk F
+Base tioctl_tioccdtr F
+Base tioctl_tiocdrain F
+Base tioctl_tiocexcl F
+Base tioctl_tiocext F
+Base tioctl_tiocflush F
+Base tioctl_tiocgeta F
+Base tioctl_tiocgetd F
+Base tioctl_tiocgpgrp F
+Base tioctl_tiocgwinsz F
+Base tioctl_tiocmbic F
+Base tioctl_tiocmbis F
+Base tioctl_tiocmget F
+Base tioctl_tiocmodg F
+Base tioctl_tiocmods F
+Base tioctl_tiocmset F
+Base tioctl_tiocnxcl F
+Base tioctl_tiocoutq F
+Base tioctl_tiocpkt F
+Base tioctl_tiocremote F
+Base tioctl_tiocsbrk F
+Base tioctl_tiocsdtr F
+Base tioctl_tiocseta F
+Base tioctl_tiocsetaf F
+Base tioctl_tiocsetaw F
+Base tioctl_tiocsetd F
+Base tioctl_tiocsig F
+Base tioctl_tiocspgrp F
+Base tioctl_tiocstart F
+Base tioctl_tiocsti F
+Base tioctl_tiocstop F
+Base tioctl_tiocswinsz F
+Base tioctl_tiocucntl F
diff --git a/sysdeps/mach/hurd/x86_64/libm.abilist b/sysdeps/mach/hurd/x86_64/libm.abilist
new file mode 100644
index 00000000..727028f0
--- /dev/null
+++ b/sysdeps/mach/hurd/x86_64/libm.abilist
@@ -0,0 +1,1181 @@
+GLIBC_2.15 __acos_finite F
+GLIBC_2.15 __acosf_finite F
+GLIBC_2.15 __acosh_finite F
+GLIBC_2.15 __acoshf_finite F
+GLIBC_2.15 __acoshl_finite F
+GLIBC_2.15 __acosl_finite F
+GLIBC_2.15 __asin_finite F
+GLIBC_2.15 __asinf_finite F
+GLIBC_2.15 __asinl_finite F
+GLIBC_2.15 __atan2_finite F
+GLIBC_2.15 __atan2f_finite F
+GLIBC_2.15 __atan2l_finite F
+GLIBC_2.15 __atanh_finite F
+GLIBC_2.15 __atanhf_finite F
+GLIBC_2.15 __atanhl_finite F
+GLIBC_2.15 __cosh_finite F
+GLIBC_2.15 __coshf_finite F
+GLIBC_2.15 __coshl_finite F
+GLIBC_2.15 __exp10_finite F
+GLIBC_2.15 __exp10f_finite F
+GLIBC_2.15 __exp10l_finite F
+GLIBC_2.15 __exp2_finite F
+GLIBC_2.15 __exp2f_finite F
+GLIBC_2.15 __exp2l_finite F
+GLIBC_2.15 __exp_finite F
+GLIBC_2.15 __expf_finite F
+GLIBC_2.15 __expl_finite F
+GLIBC_2.15 __fmod_finite F
+GLIBC_2.15 __fmodf_finite F
+GLIBC_2.15 __fmodl_finite F
+GLIBC_2.15 __gamma_r_finite F
+GLIBC_2.15 __gammaf_r_finite F
+GLIBC_2.15 __gammal_r_finite F
+GLIBC_2.15 __hypot_finite F
+GLIBC_2.15 __hypotf_finite F
+GLIBC_2.15 __hypotl_finite F
+GLIBC_2.15 __j0_finite F
+GLIBC_2.15 __j0f_finite F
+GLIBC_2.15 __j0l_finite F
+GLIBC_2.15 __j1_finite F
+GLIBC_2.15 __j1f_finite F
+GLIBC_2.15 __j1l_finite F
+GLIBC_2.15 __jn_finite F
+GLIBC_2.15 __jnf_finite F
+GLIBC_2.15 __jnl_finite F
+GLIBC_2.15 __lgamma_r_finite F
+GLIBC_2.15 __lgammaf_r_finite F
+GLIBC_2.15 __lgammal_r_finite F
+GLIBC_2.15 __log10_finite F
+GLIBC_2.15 __log10f_finite F
+GLIBC_2.15 __log10l_finite F
+GLIBC_2.15 __log2_finite F
+GLIBC_2.15 __log2f_finite F
+GLIBC_2.15 __log2l_finite F
+GLIBC_2.15 __log_finite F
+GLIBC_2.15 __logf_finite F
+GLIBC_2.15 __logl_finite F
+GLIBC_2.15 __pow_finite F
+GLIBC_2.15 __powf_finite F
+GLIBC_2.15 __powl_finite F
+GLIBC_2.15 __remainder_finite F
+GLIBC_2.15 __remainderf_finite F
+GLIBC_2.15 __remainderl_finite F
+GLIBC_2.15 __scalb_finite F
+GLIBC_2.15 __scalbf_finite F
+GLIBC_2.15 __scalbl_finite F
+GLIBC_2.15 __sinh_finite F
+GLIBC_2.15 __sinhf_finite F
+GLIBC_2.15 __sinhl_finite F
+GLIBC_2.15 __sqrt_finite F
+GLIBC_2.15 __sqrtf_finite F
+GLIBC_2.15 __sqrtl_finite F
+GLIBC_2.15 __y0_finite F
+GLIBC_2.15 __y0f_finite F
+GLIBC_2.15 __y0l_finite F
+GLIBC_2.15 __y1_finite F
+GLIBC_2.15 __y1f_finite F
+GLIBC_2.15 __y1l_finite F
+GLIBC_2.15 __yn_finite F
+GLIBC_2.15 __ynf_finite F
+GLIBC_2.15 __ynl_finite F
+GLIBC_2.18 __issignaling F
+GLIBC_2.18 __issignalingf F
+GLIBC_2.18 __issignalingl F
+GLIBC_2.2.6 _LIB_VERSION D 0x4
+GLIBC_2.2.6 __clog10 F
+GLIBC_2.2.6 __clog10f F
+GLIBC_2.2.6 __clog10l F
+GLIBC_2.2.6 __finite F
+GLIBC_2.2.6 __finitef F
+GLIBC_2.2.6 __finitel F
+GLIBC_2.2.6 __fpclassify F
+GLIBC_2.2.6 __fpclassifyf F
+GLIBC_2.2.6 __fpclassifyl F
+GLIBC_2.2.6 __signbit F
+GLIBC_2.2.6 __signbitf F
+GLIBC_2.2.6 __signbitl F
+GLIBC_2.2.6 acos F
+GLIBC_2.2.6 acosf F
+GLIBC_2.2.6 acosh F
+GLIBC_2.2.6 acoshf F
+GLIBC_2.2.6 acoshl F
+GLIBC_2.2.6 acosl F
+GLIBC_2.2.6 asin F
+GLIBC_2.2.6 asinf F
+GLIBC_2.2.6 asinh F
+GLIBC_2.2.6 asinhf F
+GLIBC_2.2.6 asinhl F
+GLIBC_2.2.6 asinl F
+GLIBC_2.2.6 atan F
+GLIBC_2.2.6 atan2 F
+GLIBC_2.2.6 atan2f F
+GLIBC_2.2.6 atan2l F
+GLIBC_2.2.6 atanf F
+GLIBC_2.2.6 atanh F
+GLIBC_2.2.6 atanhf F
+GLIBC_2.2.6 atanhl F
+GLIBC_2.2.6 atanl F
+GLIBC_2.2.6 cabs F
+GLIBC_2.2.6 cabsf F
+GLIBC_2.2.6 cabsl F
+GLIBC_2.2.6 cacos F
+GLIBC_2.2.6 cacosf F
+GLIBC_2.2.6 cacosh F
+GLIBC_2.2.6 cacoshf F
+GLIBC_2.2.6 cacoshl F
+GLIBC_2.2.6 cacosl F
+GLIBC_2.2.6 carg F
+GLIBC_2.2.6 cargf F
+GLIBC_2.2.6 cargl F
+GLIBC_2.2.6 casin F
+GLIBC_2.2.6 casinf F
+GLIBC_2.2.6 casinh F
+GLIBC_2.2.6 casinhf F
+GLIBC_2.2.6 casinhl F
+GLIBC_2.2.6 casinl F
+GLIBC_2.2.6 catan F
+GLIBC_2.2.6 catanf F
+GLIBC_2.2.6 catanh F
+GLIBC_2.2.6 catanhf F
+GLIBC_2.2.6 catanhl F
+GLIBC_2.2.6 catanl F
+GLIBC_2.2.6 cbrt F
+GLIBC_2.2.6 cbrtf F
+GLIBC_2.2.6 cbrtl F
+GLIBC_2.2.6 ccos F
+GLIBC_2.2.6 ccosf F
+GLIBC_2.2.6 ccosh F
+GLIBC_2.2.6 ccoshf F
+GLIBC_2.2.6 ccoshl F
+GLIBC_2.2.6 ccosl F
+GLIBC_2.2.6 ceil F
+GLIBC_2.2.6 ceilf F
+GLIBC_2.2.6 ceill F
+GLIBC_2.2.6 cexp F
+GLIBC_2.2.6 cexpf F
+GLIBC_2.2.6 cexpl F
+GLIBC_2.2.6 cimag F
+GLIBC_2.2.6 cimagf F
+GLIBC_2.2.6 cimagl F
+GLIBC_2.2.6 clog F
+GLIBC_2.2.6 clog10 F
+GLIBC_2.2.6 clog10f F
+GLIBC_2.2.6 clog10l F
+GLIBC_2.2.6 clogf F
+GLIBC_2.2.6 clogl F
+GLIBC_2.2.6 conj F
+GLIBC_2.2.6 conjf F
+GLIBC_2.2.6 conjl F
+GLIBC_2.2.6 copysign F
+GLIBC_2.2.6 copysignf F
+GLIBC_2.2.6 copysignl F
+GLIBC_2.2.6 cos F
+GLIBC_2.2.6 cosf F
+GLIBC_2.2.6 cosh F
+GLIBC_2.2.6 coshf F
+GLIBC_2.2.6 coshl F
+GLIBC_2.2.6 cosl F
+GLIBC_2.2.6 cpow F
+GLIBC_2.2.6 cpowf F
+GLIBC_2.2.6 cpowl F
+GLIBC_2.2.6 cproj F
+GLIBC_2.2.6 cprojf F
+GLIBC_2.2.6 cprojl F
+GLIBC_2.2.6 creal F
+GLIBC_2.2.6 crealf F
+GLIBC_2.2.6 creall F
+GLIBC_2.2.6 csin F
+GLIBC_2.2.6 csinf F
+GLIBC_2.2.6 csinh F
+GLIBC_2.2.6 csinhf F
+GLIBC_2.2.6 csinhl F
+GLIBC_2.2.6 csinl F
+GLIBC_2.2.6 csqrt F
+GLIBC_2.2.6 csqrtf F
+GLIBC_2.2.6 csqrtl F
+GLIBC_2.2.6 ctan F
+GLIBC_2.2.6 ctanf F
+GLIBC_2.2.6 ctanh F
+GLIBC_2.2.6 ctanhf F
+GLIBC_2.2.6 ctanhl F
+GLIBC_2.2.6 ctanl F
+GLIBC_2.2.6 drem F
+GLIBC_2.2.6 dremf F
+GLIBC_2.2.6 dreml F
+GLIBC_2.2.6 erf F
+GLIBC_2.2.6 erfc F
+GLIBC_2.2.6 erfcf F
+GLIBC_2.2.6 erfcl F
+GLIBC_2.2.6 erff F
+GLIBC_2.2.6 erfl F
+GLIBC_2.2.6 exp F
+GLIBC_2.2.6 exp10 F
+GLIBC_2.2.6 exp10f F
+GLIBC_2.2.6 exp10l F
+GLIBC_2.2.6 exp2 F
+GLIBC_2.2.6 exp2f F
+GLIBC_2.2.6 exp2l F
+GLIBC_2.2.6 expf F
+GLIBC_2.2.6 expl F
+GLIBC_2.2.6 expm1 F
+GLIBC_2.2.6 expm1f F
+GLIBC_2.2.6 expm1l F
+GLIBC_2.2.6 fabs F
+GLIBC_2.2.6 fabsf F
+GLIBC_2.2.6 fabsl F
+GLIBC_2.2.6 fdim F
+GLIBC_2.2.6 fdimf F
+GLIBC_2.2.6 fdiml F
+GLIBC_2.2.6 feclearexcept F
+GLIBC_2.2.6 fedisableexcept F
+GLIBC_2.2.6 feenableexcept F
+GLIBC_2.2.6 fegetenv F
+GLIBC_2.2.6 fegetexcept F
+GLIBC_2.2.6 fegetexceptflag F
+GLIBC_2.2.6 fegetround F
+GLIBC_2.2.6 feholdexcept F
+GLIBC_2.2.6 feraiseexcept F
+GLIBC_2.2.6 fesetenv F
+GLIBC_2.2.6 fesetexceptflag F
+GLIBC_2.2.6 fesetround F
+GLIBC_2.2.6 fetestexcept F
+GLIBC_2.2.6 feupdateenv F
+GLIBC_2.2.6 finite F
+GLIBC_2.2.6 finitef F
+GLIBC_2.2.6 finitel F
+GLIBC_2.2.6 floor F
+GLIBC_2.2.6 floorf F
+GLIBC_2.2.6 floorl F
+GLIBC_2.2.6 fma F
+GLIBC_2.2.6 fmaf F
+GLIBC_2.2.6 fmal F
+GLIBC_2.2.6 fmax F
+GLIBC_2.2.6 fmaxf F
+GLIBC_2.2.6 fmaxl F
+GLIBC_2.2.6 fmin F
+GLIBC_2.2.6 fminf F
+GLIBC_2.2.6 fminl F
+GLIBC_2.2.6 fmod F
+GLIBC_2.2.6 fmodf F
+GLIBC_2.2.6 fmodl F
+GLIBC_2.2.6 frexp F
+GLIBC_2.2.6 frexpf F
+GLIBC_2.2.6 frexpl F
+GLIBC_2.2.6 gamma F
+GLIBC_2.2.6 gammaf F
+GLIBC_2.2.6 gammal F
+GLIBC_2.2.6 hypot F
+GLIBC_2.2.6 hypotf F
+GLIBC_2.2.6 hypotl F
+GLIBC_2.2.6 ilogb F
+GLIBC_2.2.6 ilogbf F
+GLIBC_2.2.6 ilogbl F
+GLIBC_2.2.6 j0 F
+GLIBC_2.2.6 j0f F
+GLIBC_2.2.6 j0l F
+GLIBC_2.2.6 j1 F
+GLIBC_2.2.6 j1f F
+GLIBC_2.2.6 j1l F
+GLIBC_2.2.6 jn F
+GLIBC_2.2.6 jnf F
+GLIBC_2.2.6 jnl F
+GLIBC_2.2.6 ldexp F
+GLIBC_2.2.6 ldexpf F
+GLIBC_2.2.6 ldexpl F
+GLIBC_2.2.6 lgamma F
+GLIBC_2.2.6 lgamma_r F
+GLIBC_2.2.6 lgammaf F
+GLIBC_2.2.6 lgammaf_r F
+GLIBC_2.2.6 lgammal F
+GLIBC_2.2.6 lgammal_r F
+GLIBC_2.2.6 llrint F
+GLIBC_2.2.6 llrintf F
+GLIBC_2.2.6 llrintl F
+GLIBC_2.2.6 llround F
+GLIBC_2.2.6 llroundf F
+GLIBC_2.2.6 llroundl F
+GLIBC_2.2.6 log F
+GLIBC_2.2.6 log10 F
+GLIBC_2.2.6 log10f F
+GLIBC_2.2.6 log10l F
+GLIBC_2.2.6 log1p F
+GLIBC_2.2.6 log1pf F
+GLIBC_2.2.6 log1pl F
+GLIBC_2.2.6 log2 F
+GLIBC_2.2.6 log2f F
+GLIBC_2.2.6 log2l F
+GLIBC_2.2.6 logb F
+GLIBC_2.2.6 logbf F
+GLIBC_2.2.6 logbl F
+GLIBC_2.2.6 logf F
+GLIBC_2.2.6 logl F
+GLIBC_2.2.6 lrint F
+GLIBC_2.2.6 lrintf F
+GLIBC_2.2.6 lrintl F
+GLIBC_2.2.6 lround F
+GLIBC_2.2.6 lroundf F
+GLIBC_2.2.6 lroundl F
+GLIBC_2.2.6 matherr F
+GLIBC_2.2.6 modf F
+GLIBC_2.2.6 modff F
+GLIBC_2.2.6 modfl F
+GLIBC_2.2.6 nan F
+GLIBC_2.2.6 nanf F
+GLIBC_2.2.6 nanl F
+GLIBC_2.2.6 nearbyint F
+GLIBC_2.2.6 nearbyintf F
+GLIBC_2.2.6 nearbyintl F
+GLIBC_2.2.6 nextafter F
+GLIBC_2.2.6 nextafterf F
+GLIBC_2.2.6 nextafterl F
+GLIBC_2.2.6 nexttoward F
+GLIBC_2.2.6 nexttowardf F
+GLIBC_2.2.6 nexttowardl F
+GLIBC_2.2.6 pow F
+GLIBC_2.2.6 pow10 F
+GLIBC_2.2.6 pow10f F
+GLIBC_2.2.6 pow10l F
+GLIBC_2.2.6 powf F
+GLIBC_2.2.6 powl F
+GLIBC_2.2.6 remainder F
+GLIBC_2.2.6 remainderf F
+GLIBC_2.2.6 remainderl F
+GLIBC_2.2.6 remquo F
+GLIBC_2.2.6 remquof F
+GLIBC_2.2.6 remquol F
+GLIBC_2.2.6 rint F
+GLIBC_2.2.6 rintf F
+GLIBC_2.2.6 rintl F
+GLIBC_2.2.6 round F
+GLIBC_2.2.6 roundf F
+GLIBC_2.2.6 roundl F
+GLIBC_2.2.6 scalb F
+GLIBC_2.2.6 scalbf F
+GLIBC_2.2.6 scalbl F
+GLIBC_2.2.6 scalbln F
+GLIBC_2.2.6 scalblnf F
+GLIBC_2.2.6 scalblnl F
+GLIBC_2.2.6 scalbn F
+GLIBC_2.2.6 scalbnf F
+GLIBC_2.2.6 scalbnl F
+GLIBC_2.2.6 signgam D 0x4
+GLIBC_2.2.6 significand F
+GLIBC_2.2.6 significandf F
+GLIBC_2.2.6 significandl F
+GLIBC_2.2.6 sin F
+GLIBC_2.2.6 sincos F
+GLIBC_2.2.6 sincosf F
+GLIBC_2.2.6 sincosl F
+GLIBC_2.2.6 sinf F
+GLIBC_2.2.6 sinh F
+GLIBC_2.2.6 sinhf F
+GLIBC_2.2.6 sinhl F
+GLIBC_2.2.6 sinl F
+GLIBC_2.2.6 sqrt F
+GLIBC_2.2.6 sqrtf F
+GLIBC_2.2.6 sqrtl F
+GLIBC_2.2.6 tan F
+GLIBC_2.2.6 tanf F
+GLIBC_2.2.6 tanh F
+GLIBC_2.2.6 tanhf F
+GLIBC_2.2.6 tanhl F
+GLIBC_2.2.6 tanl F
+GLIBC_2.2.6 tgamma F
+GLIBC_2.2.6 tgammaf F
+GLIBC_2.2.6 tgammal F
+GLIBC_2.2.6 trunc F
+GLIBC_2.2.6 truncf F
+GLIBC_2.2.6 truncl F
+GLIBC_2.2.6 y0 F
+GLIBC_2.2.6 y0f F
+GLIBC_2.2.6 y0l F
+GLIBC_2.2.6 y1 F
+GLIBC_2.2.6 y1f F
+GLIBC_2.2.6 y1l F
+GLIBC_2.2.6 yn F
+GLIBC_2.2.6 ynf F
+GLIBC_2.2.6 ynl F
+GLIBC_2.23 __signgam D 0x4
+GLIBC_2.23 lgamma F
+GLIBC_2.23 lgammaf F
+GLIBC_2.23 lgammal F
+GLIBC_2.24 nextdown F
+GLIBC_2.24 nextdownf F
+GLIBC_2.24 nextdownl F
+GLIBC_2.24 nextup F
+GLIBC_2.24 nextupf F
+GLIBC_2.24 nextupl F
+GLIBC_2.25 __iscanonicall F
+GLIBC_2.25 __iseqsig F
+GLIBC_2.25 __iseqsigf F
+GLIBC_2.25 __iseqsigl F
+GLIBC_2.25 canonicalize F
+GLIBC_2.25 canonicalizef F
+GLIBC_2.25 canonicalizel F
+GLIBC_2.25 fegetmode F
+GLIBC_2.25 fesetexcept F
+GLIBC_2.25 fesetmode F
+GLIBC_2.25 fetestexceptflag F
+GLIBC_2.25 fmaxmag F
+GLIBC_2.25 fmaxmagf F
+GLIBC_2.25 fmaxmagl F
+GLIBC_2.25 fminmag F
+GLIBC_2.25 fminmagf F
+GLIBC_2.25 fminmagl F
+GLIBC_2.25 fromfp F
+GLIBC_2.25 fromfpf F
+GLIBC_2.25 fromfpl F
+GLIBC_2.25 fromfpx F
+GLIBC_2.25 fromfpxf F
+GLIBC_2.25 fromfpxl F
+GLIBC_2.25 getpayload F
+GLIBC_2.25 getpayloadf F
+GLIBC_2.25 getpayloadl F
+GLIBC_2.25 llogb F
+GLIBC_2.25 llogbf F
+GLIBC_2.25 llogbl F
+GLIBC_2.25 roundeven F
+GLIBC_2.25 roundevenf F
+GLIBC_2.25 roundevenl F
+GLIBC_2.25 setpayload F
+GLIBC_2.25 setpayloadf F
+GLIBC_2.25 setpayloadl F
+GLIBC_2.25 setpayloadsig F
+GLIBC_2.25 setpayloadsigf F
+GLIBC_2.25 setpayloadsigl F
+GLIBC_2.25 totalorder F
+GLIBC_2.25 totalorderf F
+GLIBC_2.25 totalorderl F
+GLIBC_2.25 totalordermag F
+GLIBC_2.25 totalordermagf F
+GLIBC_2.25 totalordermagl F
+GLIBC_2.25 ufromfp F
+GLIBC_2.25 ufromfpf F
+GLIBC_2.25 ufromfpl F
+GLIBC_2.25 ufromfpx F
+GLIBC_2.25 ufromfpxf F
+GLIBC_2.25 ufromfpxl F
+GLIBC_2.26 __acosf128_finite F
+GLIBC_2.26 __acoshf128_finite F
+GLIBC_2.26 __asinf128_finite F
+GLIBC_2.26 __atan2f128_finite F
+GLIBC_2.26 __atanhf128_finite F
+GLIBC_2.26 __coshf128_finite F
+GLIBC_2.26 __exp10f128_finite F
+GLIBC_2.26 __exp2f128_finite F
+GLIBC_2.26 __expf128_finite F
+GLIBC_2.26 __finitef128 F
+GLIBC_2.26 __fmodf128_finite F
+GLIBC_2.26 __fpclassifyf128 F
+GLIBC_2.26 __gammaf128_r_finite F
+GLIBC_2.26 __hypotf128_finite F
+GLIBC_2.26 __iseqsigf128 F
+GLIBC_2.26 __isinff128 F
+GLIBC_2.26 __issignalingf128 F
+GLIBC_2.26 __j0f128_finite F
+GLIBC_2.26 __j1f128_finite F
+GLIBC_2.26 __jnf128_finite F
+GLIBC_2.26 __lgammaf128_r_finite F
+GLIBC_2.26 __log10f128_finite F
+GLIBC_2.26 __log2f128_finite F
+GLIBC_2.26 __logf128_finite F
+GLIBC_2.26 __powf128_finite F
+GLIBC_2.26 __remainderf128_finite F
+GLIBC_2.26 __signbitf128 F
+GLIBC_2.26 __sinhf128_finite F
+GLIBC_2.26 __sqrtf128_finite F
+GLIBC_2.26 __y0f128_finite F
+GLIBC_2.26 __y1f128_finite F
+GLIBC_2.26 __ynf128_finite F
+GLIBC_2.26 acosf128 F
+GLIBC_2.26 acoshf128 F
+GLIBC_2.26 asinf128 F
+GLIBC_2.26 asinhf128 F
+GLIBC_2.26 atan2f128 F
+GLIBC_2.26 atanf128 F
+GLIBC_2.26 atanhf128 F
+GLIBC_2.26 cabsf128 F
+GLIBC_2.26 cacosf128 F
+GLIBC_2.26 cacoshf128 F
+GLIBC_2.26 canonicalizef128 F
+GLIBC_2.26 cargf128 F
+GLIBC_2.26 casinf128 F
+GLIBC_2.26 casinhf128 F
+GLIBC_2.26 catanf128 F
+GLIBC_2.26 catanhf128 F
+GLIBC_2.26 cbrtf128 F
+GLIBC_2.26 ccosf128 F
+GLIBC_2.26 ccoshf128 F
+GLIBC_2.26 ceilf128 F
+GLIBC_2.26 cexpf128 F
+GLIBC_2.26 cimagf128 F
+GLIBC_2.26 clog10f128 F
+GLIBC_2.26 clogf128 F
+GLIBC_2.26 conjf128 F
+GLIBC_2.26 copysignf128 F
+GLIBC_2.26 cosf128 F
+GLIBC_2.26 coshf128 F
+GLIBC_2.26 cpowf128 F
+GLIBC_2.26 cprojf128 F
+GLIBC_2.26 crealf128 F
+GLIBC_2.26 csinf128 F
+GLIBC_2.26 csinhf128 F
+GLIBC_2.26 csqrtf128 F
+GLIBC_2.26 ctanf128 F
+GLIBC_2.26 ctanhf128 F
+GLIBC_2.26 erfcf128 F
+GLIBC_2.26 erff128 F
+GLIBC_2.26 exp10f128 F
+GLIBC_2.26 exp2f128 F
+GLIBC_2.26 expf128 F
+GLIBC_2.26 expm1f128 F
+GLIBC_2.26 fabsf128 F
+GLIBC_2.26 fdimf128 F
+GLIBC_2.26 floorf128 F
+GLIBC_2.26 fmaf128 F
+GLIBC_2.26 fmaxf128 F
+GLIBC_2.26 fmaxmagf128 F
+GLIBC_2.26 fminf128 F
+GLIBC_2.26 fminmagf128 F
+GLIBC_2.26 fmodf128 F
+GLIBC_2.26 frexpf128 F
+GLIBC_2.26 fromfpf128 F
+GLIBC_2.26 fromfpxf128 F
+GLIBC_2.26 getpayloadf128 F
+GLIBC_2.26 hypotf128 F
+GLIBC_2.26 ilogbf128 F
+GLIBC_2.26 j0f128 F
+GLIBC_2.26 j1f128 F
+GLIBC_2.26 jnf128 F
+GLIBC_2.26 ldexpf128 F
+GLIBC_2.26 lgammaf128 F
+GLIBC_2.26 lgammaf128_r F
+GLIBC_2.26 llogbf128 F
+GLIBC_2.26 llrintf128 F
+GLIBC_2.26 llroundf128 F
+GLIBC_2.26 log10f128 F
+GLIBC_2.26 log1pf128 F
+GLIBC_2.26 log2f128 F
+GLIBC_2.26 logbf128 F
+GLIBC_2.26 logf128 F
+GLIBC_2.26 lrintf128 F
+GLIBC_2.26 lroundf128 F
+GLIBC_2.26 modff128 F
+GLIBC_2.26 nanf128 F
+GLIBC_2.26 nearbyintf128 F
+GLIBC_2.26 nextafterf128 F
+GLIBC_2.26 nextdownf128 F
+GLIBC_2.26 nextupf128 F
+GLIBC_2.26 powf128 F
+GLIBC_2.26 remainderf128 F
+GLIBC_2.26 remquof128 F
+GLIBC_2.26 rintf128 F
+GLIBC_2.26 roundevenf128 F
+GLIBC_2.26 roundf128 F
+GLIBC_2.26 scalblnf128 F
+GLIBC_2.26 scalbnf128 F
+GLIBC_2.26 setpayloadf128 F
+GLIBC_2.26 setpayloadsigf128 F
+GLIBC_2.26 sincosf128 F
+GLIBC_2.26 sinf128 F
+GLIBC_2.26 sinhf128 F
+GLIBC_2.26 sqrtf128 F
+GLIBC_2.26 tanf128 F
+GLIBC_2.26 tanhf128 F
+GLIBC_2.26 tgammaf128 F
+GLIBC_2.26 totalorderf128 F
+GLIBC_2.26 totalordermagf128 F
+GLIBC_2.26 truncf128 F
+GLIBC_2.26 ufromfpf128 F
+GLIBC_2.26 ufromfpxf128 F
+GLIBC_2.26 y0f128 F
+GLIBC_2.26 y1f128 F
+GLIBC_2.26 ynf128 F
+GLIBC_2.27 acosf32 F
+GLIBC_2.27 acosf32x F
+GLIBC_2.27 acosf64 F
+GLIBC_2.27 acosf64x F
+GLIBC_2.27 acoshf32 F
+GLIBC_2.27 acoshf32x F
+GLIBC_2.27 acoshf64 F
+GLIBC_2.27 acoshf64x F
+GLIBC_2.27 asinf32 F
+GLIBC_2.27 asinf32x F
+GLIBC_2.27 asinf64 F
+GLIBC_2.27 asinf64x F
+GLIBC_2.27 asinhf32 F
+GLIBC_2.27 asinhf32x F
+GLIBC_2.27 asinhf64 F
+GLIBC_2.27 asinhf64x F
+GLIBC_2.27 atan2f32 F
+GLIBC_2.27 atan2f32x F
+GLIBC_2.27 atan2f64 F
+GLIBC_2.27 atan2f64x F
+GLIBC_2.27 atanf32 F
+GLIBC_2.27 atanf32x F
+GLIBC_2.27 atanf64 F
+GLIBC_2.27 atanf64x F
+GLIBC_2.27 atanhf32 F
+GLIBC_2.27 atanhf32x F
+GLIBC_2.27 atanhf64 F
+GLIBC_2.27 atanhf64x F
+GLIBC_2.27 cabsf32 F
+GLIBC_2.27 cabsf32x F
+GLIBC_2.27 cabsf64 F
+GLIBC_2.27 cabsf64x F
+GLIBC_2.27 cacosf32 F
+GLIBC_2.27 cacosf32x F
+GLIBC_2.27 cacosf64 F
+GLIBC_2.27 cacosf64x F
+GLIBC_2.27 cacoshf32 F
+GLIBC_2.27 cacoshf32x F
+GLIBC_2.27 cacoshf64 F
+GLIBC_2.27 cacoshf64x F
+GLIBC_2.27 canonicalizef32 F
+GLIBC_2.27 canonicalizef32x F
+GLIBC_2.27 canonicalizef64 F
+GLIBC_2.27 canonicalizef64x F
+GLIBC_2.27 cargf32 F
+GLIBC_2.27 cargf32x F
+GLIBC_2.27 cargf64 F
+GLIBC_2.27 cargf64x F
+GLIBC_2.27 casinf32 F
+GLIBC_2.27 casinf32x F
+GLIBC_2.27 casinf64 F
+GLIBC_2.27 casinf64x F
+GLIBC_2.27 casinhf32 F
+GLIBC_2.27 casinhf32x F
+GLIBC_2.27 casinhf64 F
+GLIBC_2.27 casinhf64x F
+GLIBC_2.27 catanf32 F
+GLIBC_2.27 catanf32x F
+GLIBC_2.27 catanf64 F
+GLIBC_2.27 catanf64x F
+GLIBC_2.27 catanhf32 F
+GLIBC_2.27 catanhf32x F
+GLIBC_2.27 catanhf64 F
+GLIBC_2.27 catanhf64x F
+GLIBC_2.27 cbrtf32 F
+GLIBC_2.27 cbrtf32x F
+GLIBC_2.27 cbrtf64 F
+GLIBC_2.27 cbrtf64x F
+GLIBC_2.27 ccosf32 F
+GLIBC_2.27 ccosf32x F
+GLIBC_2.27 ccosf64 F
+GLIBC_2.27 ccosf64x F
+GLIBC_2.27 ccoshf32 F
+GLIBC_2.27 ccoshf32x F
+GLIBC_2.27 ccoshf64 F
+GLIBC_2.27 ccoshf64x F
+GLIBC_2.27 ceilf32 F
+GLIBC_2.27 ceilf32x F
+GLIBC_2.27 ceilf64 F
+GLIBC_2.27 ceilf64x F
+GLIBC_2.27 cexpf32 F
+GLIBC_2.27 cexpf32x F
+GLIBC_2.27 cexpf64 F
+GLIBC_2.27 cexpf64x F
+GLIBC_2.27 cimagf32 F
+GLIBC_2.27 cimagf32x F
+GLIBC_2.27 cimagf64 F
+GLIBC_2.27 cimagf64x F
+GLIBC_2.27 clog10f32 F
+GLIBC_2.27 clog10f32x F
+GLIBC_2.27 clog10f64 F
+GLIBC_2.27 clog10f64x F
+GLIBC_2.27 clogf32 F
+GLIBC_2.27 clogf32x F
+GLIBC_2.27 clogf64 F
+GLIBC_2.27 clogf64x F
+GLIBC_2.27 conjf32 F
+GLIBC_2.27 conjf32x F
+GLIBC_2.27 conjf64 F
+GLIBC_2.27 conjf64x F
+GLIBC_2.27 copysignf32 F
+GLIBC_2.27 copysignf32x F
+GLIBC_2.27 copysignf64 F
+GLIBC_2.27 copysignf64x F
+GLIBC_2.27 cosf32 F
+GLIBC_2.27 cosf32x F
+GLIBC_2.27 cosf64 F
+GLIBC_2.27 cosf64x F
+GLIBC_2.27 coshf32 F
+GLIBC_2.27 coshf32x F
+GLIBC_2.27 coshf64 F
+GLIBC_2.27 coshf64x F
+GLIBC_2.27 cpowf32 F
+GLIBC_2.27 cpowf32x F
+GLIBC_2.27 cpowf64 F
+GLIBC_2.27 cpowf64x F
+GLIBC_2.27 cprojf32 F
+GLIBC_2.27 cprojf32x F
+GLIBC_2.27 cprojf64 F
+GLIBC_2.27 cprojf64x F
+GLIBC_2.27 crealf32 F
+GLIBC_2.27 crealf32x F
+GLIBC_2.27 crealf64 F
+GLIBC_2.27 crealf64x F
+GLIBC_2.27 csinf32 F
+GLIBC_2.27 csinf32x F
+GLIBC_2.27 csinf64 F
+GLIBC_2.27 csinf64x F
+GLIBC_2.27 csinhf32 F
+GLIBC_2.27 csinhf32x F
+GLIBC_2.27 csinhf64 F
+GLIBC_2.27 csinhf64x F
+GLIBC_2.27 csqrtf32 F
+GLIBC_2.27 csqrtf32x F
+GLIBC_2.27 csqrtf64 F
+GLIBC_2.27 csqrtf64x F
+GLIBC_2.27 ctanf32 F
+GLIBC_2.27 ctanf32x F
+GLIBC_2.27 ctanf64 F
+GLIBC_2.27 ctanf64x F
+GLIBC_2.27 ctanhf32 F
+GLIBC_2.27 ctanhf32x F
+GLIBC_2.27 ctanhf64 F
+GLIBC_2.27 ctanhf64x F
+GLIBC_2.27 erfcf32 F
+GLIBC_2.27 erfcf32x F
+GLIBC_2.27 erfcf64 F
+GLIBC_2.27 erfcf64x F
+GLIBC_2.27 erff32 F
+GLIBC_2.27 erff32x F
+GLIBC_2.27 erff64 F
+GLIBC_2.27 erff64x F
+GLIBC_2.27 exp10f32 F
+GLIBC_2.27 exp10f32x F
+GLIBC_2.27 exp10f64 F
+GLIBC_2.27 exp10f64x F
+GLIBC_2.27 exp2f F
+GLIBC_2.27 exp2f32 F
+GLIBC_2.27 exp2f32x F
+GLIBC_2.27 exp2f64 F
+GLIBC_2.27 exp2f64x F
+GLIBC_2.27 expf F
+GLIBC_2.27 expf32 F
+GLIBC_2.27 expf32x F
+GLIBC_2.27 expf64 F
+GLIBC_2.27 expf64x F
+GLIBC_2.27 expm1f32 F
+GLIBC_2.27 expm1f32x F
+GLIBC_2.27 expm1f64 F
+GLIBC_2.27 expm1f64x F
+GLIBC_2.27 fabsf32 F
+GLIBC_2.27 fabsf32x F
+GLIBC_2.27 fabsf64 F
+GLIBC_2.27 fabsf64x F
+GLIBC_2.27 fdimf32 F
+GLIBC_2.27 fdimf32x F
+GLIBC_2.27 fdimf64 F
+GLIBC_2.27 fdimf64x F
+GLIBC_2.27 floorf32 F
+GLIBC_2.27 floorf32x F
+GLIBC_2.27 floorf64 F
+GLIBC_2.27 floorf64x F
+GLIBC_2.27 fmaf32 F
+GLIBC_2.27 fmaf32x F
+GLIBC_2.27 fmaf64 F
+GLIBC_2.27 fmaf64x F
+GLIBC_2.27 fmaxf32 F
+GLIBC_2.27 fmaxf32x F
+GLIBC_2.27 fmaxf64 F
+GLIBC_2.27 fmaxf64x F
+GLIBC_2.27 fmaxmagf32 F
+GLIBC_2.27 fmaxmagf32x F
+GLIBC_2.27 fmaxmagf64 F
+GLIBC_2.27 fmaxmagf64x F
+GLIBC_2.27 fminf32 F
+GLIBC_2.27 fminf32x F
+GLIBC_2.27 fminf64 F
+GLIBC_2.27 fminf64x F
+GLIBC_2.27 fminmagf32 F
+GLIBC_2.27 fminmagf32x F
+GLIBC_2.27 fminmagf64 F
+GLIBC_2.27 fminmagf64x F
+GLIBC_2.27 fmodf32 F
+GLIBC_2.27 fmodf32x F
+GLIBC_2.27 fmodf64 F
+GLIBC_2.27 fmodf64x F
+GLIBC_2.27 frexpf32 F
+GLIBC_2.27 frexpf32x F
+GLIBC_2.27 frexpf64 F
+GLIBC_2.27 frexpf64x F
+GLIBC_2.27 fromfpf32 F
+GLIBC_2.27 fromfpf32x F
+GLIBC_2.27 fromfpf64 F
+GLIBC_2.27 fromfpf64x F
+GLIBC_2.27 fromfpxf32 F
+GLIBC_2.27 fromfpxf32x F
+GLIBC_2.27 fromfpxf64 F
+GLIBC_2.27 fromfpxf64x F
+GLIBC_2.27 getpayloadf32 F
+GLIBC_2.27 getpayloadf32x F
+GLIBC_2.27 getpayloadf64 F
+GLIBC_2.27 getpayloadf64x F
+GLIBC_2.27 hypotf32 F
+GLIBC_2.27 hypotf32x F
+GLIBC_2.27 hypotf64 F
+GLIBC_2.27 hypotf64x F
+GLIBC_2.27 ilogbf32 F
+GLIBC_2.27 ilogbf32x F
+GLIBC_2.27 ilogbf64 F
+GLIBC_2.27 ilogbf64x F
+GLIBC_2.27 j0f32 F
+GLIBC_2.27 j0f32x F
+GLIBC_2.27 j0f64 F
+GLIBC_2.27 j0f64x F
+GLIBC_2.27 j1f32 F
+GLIBC_2.27 j1f32x F
+GLIBC_2.27 j1f64 F
+GLIBC_2.27 j1f64x F
+GLIBC_2.27 jnf32 F
+GLIBC_2.27 jnf32x F
+GLIBC_2.27 jnf64 F
+GLIBC_2.27 jnf64x F
+GLIBC_2.27 ldexpf32 F
+GLIBC_2.27 ldexpf32x F
+GLIBC_2.27 ldexpf64 F
+GLIBC_2.27 ldexpf64x F
+GLIBC_2.27 lgammaf32 F
+GLIBC_2.27 lgammaf32_r F
+GLIBC_2.27 lgammaf32x F
+GLIBC_2.27 lgammaf32x_r F
+GLIBC_2.27 lgammaf64 F
+GLIBC_2.27 lgammaf64_r F
+GLIBC_2.27 lgammaf64x F
+GLIBC_2.27 lgammaf64x_r F
+GLIBC_2.27 llogbf32 F
+GLIBC_2.27 llogbf32x F
+GLIBC_2.27 llogbf64 F
+GLIBC_2.27 llogbf64x F
+GLIBC_2.27 llrintf32 F
+GLIBC_2.27 llrintf32x F
+GLIBC_2.27 llrintf64 F
+GLIBC_2.27 llrintf64x F
+GLIBC_2.27 llroundf32 F
+GLIBC_2.27 llroundf32x F
+GLIBC_2.27 llroundf64 F
+GLIBC_2.27 llroundf64x F
+GLIBC_2.27 log10f32 F
+GLIBC_2.27 log10f32x F
+GLIBC_2.27 log10f64 F
+GLIBC_2.27 log10f64x F
+GLIBC_2.27 log1pf32 F
+GLIBC_2.27 log1pf32x F
+GLIBC_2.27 log1pf64 F
+GLIBC_2.27 log1pf64x F
+GLIBC_2.27 log2f F
+GLIBC_2.27 log2f32 F
+GLIBC_2.27 log2f32x F
+GLIBC_2.27 log2f64 F
+GLIBC_2.27 log2f64x F
+GLIBC_2.27 logbf32 F
+GLIBC_2.27 logbf32x F
+GLIBC_2.27 logbf64 F
+GLIBC_2.27 logbf64x F
+GLIBC_2.27 logf F
+GLIBC_2.27 logf32 F
+GLIBC_2.27 logf32x F
+GLIBC_2.27 logf64 F
+GLIBC_2.27 logf64x F
+GLIBC_2.27 lrintf32 F
+GLIBC_2.27 lrintf32x F
+GLIBC_2.27 lrintf64 F
+GLIBC_2.27 lrintf64x F
+GLIBC_2.27 lroundf32 F
+GLIBC_2.27 lroundf32x F
+GLIBC_2.27 lroundf64 F
+GLIBC_2.27 lroundf64x F
+GLIBC_2.27 modff32 F
+GLIBC_2.27 modff32x F
+GLIBC_2.27 modff64 F
+GLIBC_2.27 modff64x F
+GLIBC_2.27 nanf32 F
+GLIBC_2.27 nanf32x F
+GLIBC_2.27 nanf64 F
+GLIBC_2.27 nanf64x F
+GLIBC_2.27 nearbyintf32 F
+GLIBC_2.27 nearbyintf32x F
+GLIBC_2.27 nearbyintf64 F
+GLIBC_2.27 nearbyintf64x F
+GLIBC_2.27 nextafterf32 F
+GLIBC_2.27 nextafterf32x F
+GLIBC_2.27 nextafterf64 F
+GLIBC_2.27 nextafterf64x F
+GLIBC_2.27 nextdownf32 F
+GLIBC_2.27 nextdownf32x F
+GLIBC_2.27 nextdownf64 F
+GLIBC_2.27 nextdownf64x F
+GLIBC_2.27 nextupf32 F
+GLIBC_2.27 nextupf32x F
+GLIBC_2.27 nextupf64 F
+GLIBC_2.27 nextupf64x F
+GLIBC_2.27 powf F
+GLIBC_2.27 powf32 F
+GLIBC_2.27 powf32x F
+GLIBC_2.27 powf64 F
+GLIBC_2.27 powf64x F
+GLIBC_2.27 remainderf32 F
+GLIBC_2.27 remainderf32x F
+GLIBC_2.27 remainderf64 F
+GLIBC_2.27 remainderf64x F
+GLIBC_2.27 remquof32 F
+GLIBC_2.27 remquof32x F
+GLIBC_2.27 remquof64 F
+GLIBC_2.27 remquof64x F
+GLIBC_2.27 rintf32 F
+GLIBC_2.27 rintf32x F
+GLIBC_2.27 rintf64 F
+GLIBC_2.27 rintf64x F
+GLIBC_2.27 roundevenf32 F
+GLIBC_2.27 roundevenf32x F
+GLIBC_2.27 roundevenf64 F
+GLIBC_2.27 roundevenf64x F
+GLIBC_2.27 roundf32 F
+GLIBC_2.27 roundf32x F
+GLIBC_2.27 roundf64 F
+GLIBC_2.27 roundf64x F
+GLIBC_2.27 scalblnf32 F
+GLIBC_2.27 scalblnf32x F
+GLIBC_2.27 scalblnf64 F
+GLIBC_2.27 scalblnf64x F
+GLIBC_2.27 scalbnf32 F
+GLIBC_2.27 scalbnf32x F
+GLIBC_2.27 scalbnf64 F
+GLIBC_2.27 scalbnf64x F
+GLIBC_2.27 setpayloadf32 F
+GLIBC_2.27 setpayloadf32x F
+GLIBC_2.27 setpayloadf64 F
+GLIBC_2.27 setpayloadf64x F
+GLIBC_2.27 setpayloadsigf32 F
+GLIBC_2.27 setpayloadsigf32x F
+GLIBC_2.27 setpayloadsigf64 F
+GLIBC_2.27 setpayloadsigf64x F
+GLIBC_2.27 sincosf32 F
+GLIBC_2.27 sincosf32x F
+GLIBC_2.27 sincosf64 F
+GLIBC_2.27 sincosf64x F
+GLIBC_2.27 sinf32 F
+GLIBC_2.27 sinf32x F
+GLIBC_2.27 sinf64 F
+GLIBC_2.27 sinf64x F
+GLIBC_2.27 sinhf32 F
+GLIBC_2.27 sinhf32x F
+GLIBC_2.27 sinhf64 F
+GLIBC_2.27 sinhf64x F
+GLIBC_2.27 sqrtf32 F
+GLIBC_2.27 sqrtf32x F
+GLIBC_2.27 sqrtf64 F
+GLIBC_2.27 sqrtf64x F
+GLIBC_2.27 tanf32 F
+GLIBC_2.27 tanf32x F
+GLIBC_2.27 tanf64 F
+GLIBC_2.27 tanf64x F
+GLIBC_2.27 tanhf32 F
+GLIBC_2.27 tanhf32x F
+GLIBC_2.27 tanhf64 F
+GLIBC_2.27 tanhf64x F
+GLIBC_2.27 tgammaf32 F
+GLIBC_2.27 tgammaf32x F
+GLIBC_2.27 tgammaf64 F
+GLIBC_2.27 tgammaf64x F
+GLIBC_2.27 totalorderf32 F
+GLIBC_2.27 totalorderf32x F
+GLIBC_2.27 totalorderf64 F
+GLIBC_2.27 totalorderf64x F
+GLIBC_2.27 totalordermagf32 F
+GLIBC_2.27 totalordermagf32x F
+GLIBC_2.27 totalordermagf64 F
+GLIBC_2.27 totalordermagf64x F
+GLIBC_2.27 truncf32 F
+GLIBC_2.27 truncf32x F
+GLIBC_2.27 truncf64 F
+GLIBC_2.27 truncf64x F
+GLIBC_2.27 ufromfpf32 F
+GLIBC_2.27 ufromfpf32x F
+GLIBC_2.27 ufromfpf64 F
+GLIBC_2.27 ufromfpf64x F
+GLIBC_2.27 ufromfpxf32 F
+GLIBC_2.27 ufromfpxf32x F
+GLIBC_2.27 ufromfpxf64 F
+GLIBC_2.27 ufromfpxf64x F
+GLIBC_2.27 y0f32 F
+GLIBC_2.27 y0f32x F
+GLIBC_2.27 y0f64 F
+GLIBC_2.27 y0f64x F
+GLIBC_2.27 y1f32 F
+GLIBC_2.27 y1f32x F
+GLIBC_2.27 y1f64 F
+GLIBC_2.27 y1f64x F
+GLIBC_2.27 ynf32 F
+GLIBC_2.27 ynf32x F
+GLIBC_2.27 ynf64 F
+GLIBC_2.27 ynf64x F
+GLIBC_2.28 daddl F
+GLIBC_2.28 ddivl F
+GLIBC_2.28 dmull F
+GLIBC_2.28 dsubl F
+GLIBC_2.28 f32addf128 F
+GLIBC_2.28 f32addf32x F
+GLIBC_2.28 f32addf64 F
+GLIBC_2.28 f32addf64x F
+GLIBC_2.28 f32divf128 F
+GLIBC_2.28 f32divf32x F
+GLIBC_2.28 f32divf64 F
+GLIBC_2.28 f32divf64x F
+GLIBC_2.28 f32mulf128 F
+GLIBC_2.28 f32mulf32x F
+GLIBC_2.28 f32mulf64 F
+GLIBC_2.28 f32mulf64x F
+GLIBC_2.28 f32subf128 F
+GLIBC_2.28 f32subf32x F
+GLIBC_2.28 f32subf64 F
+GLIBC_2.28 f32subf64x F
+GLIBC_2.28 f32xaddf128 F
+GLIBC_2.28 f32xaddf64 F
+GLIBC_2.28 f32xaddf64x F
+GLIBC_2.28 f32xdivf128 F
+GLIBC_2.28 f32xdivf64 F
+GLIBC_2.28 f32xdivf64x F
+GLIBC_2.28 f32xmulf128 F
+GLIBC_2.28 f32xmulf64 F
+GLIBC_2.28 f32xmulf64x F
+GLIBC_2.28 f32xsubf128 F
+GLIBC_2.28 f32xsubf64 F
+GLIBC_2.28 f32xsubf64x F
+GLIBC_2.28 f64addf128 F
+GLIBC_2.28 f64addf64x F
+GLIBC_2.28 f64divf128 F
+GLIBC_2.28 f64divf64x F
+GLIBC_2.28 f64mulf128 F
+GLIBC_2.28 f64mulf64x F
+GLIBC_2.28 f64subf128 F
+GLIBC_2.28 f64subf64x F
+GLIBC_2.28 f64xaddf128 F
+GLIBC_2.28 f64xdivf128 F
+GLIBC_2.28 f64xmulf128 F
+GLIBC_2.28 f64xsubf128 F
+GLIBC_2.28 fadd F
+GLIBC_2.28 faddl F
+GLIBC_2.28 fdiv F
+GLIBC_2.28 fdivl F
+GLIBC_2.28 fmul F
+GLIBC_2.28 fmull F
+GLIBC_2.28 fsub F
+GLIBC_2.28 fsubl F
+GLIBC_2.29 exp F
+GLIBC_2.29 exp2 F
+GLIBC_2.29 log F
+GLIBC_2.29 log2 F
+GLIBC_2.29 pow F
+GLIBC_2.31 totalorder F
+GLIBC_2.31 totalorderf F
+GLIBC_2.31 totalorderf128 F
+GLIBC_2.31 totalorderf32 F
+GLIBC_2.31 totalorderf32x F
+GLIBC_2.31 totalorderf64 F
+GLIBC_2.31 totalorderf64x F
+GLIBC_2.31 totalorderl F
+GLIBC_2.31 totalordermag F
+GLIBC_2.31 totalordermagf F
+GLIBC_2.31 totalordermagf128 F
+GLIBC_2.31 totalordermagf32 F
+GLIBC_2.31 totalordermagf32x F
+GLIBC_2.31 totalordermagf64 F
+GLIBC_2.31 totalordermagf64x F
+GLIBC_2.31 totalordermagl F
+GLIBC_2.32 exp10f F
+GLIBC_2.35 dfmal F
+GLIBC_2.35 dsqrtl F
+GLIBC_2.35 f32fmaf128 F
+GLIBC_2.35 f32fmaf32x F
+GLIBC_2.35 f32fmaf64 F
+GLIBC_2.35 f32fmaf64x F
+GLIBC_2.35 f32sqrtf128 F
+GLIBC_2.35 f32sqrtf32x F
+GLIBC_2.35 f32sqrtf64 F
+GLIBC_2.35 f32sqrtf64x F
+GLIBC_2.35 f32xfmaf128 F
+GLIBC_2.35 f32xfmaf64 F
+GLIBC_2.35 f32xfmaf64x F
+GLIBC_2.35 f32xsqrtf128 F
+GLIBC_2.35 f32xsqrtf64 F
+GLIBC_2.35 f32xsqrtf64x F
+GLIBC_2.35 f64fmaf128 F
+GLIBC_2.35 f64fmaf64x F
+GLIBC_2.35 f64sqrtf128 F
+GLIBC_2.35 f64sqrtf64x F
+GLIBC_2.35 f64xfmaf128 F
+GLIBC_2.35 f64xsqrtf128 F
+GLIBC_2.35 ffma F
+GLIBC_2.35 ffmal F
+GLIBC_2.35 fmaximum F
+GLIBC_2.35 fmaximum_mag F
+GLIBC_2.35 fmaximum_mag_num F
+GLIBC_2.35 fmaximum_mag_numf F
+GLIBC_2.35 fmaximum_mag_numf128 F
+GLIBC_2.35 fmaximum_mag_numf32 F
+GLIBC_2.35 fmaximum_mag_numf32x F
+GLIBC_2.35 fmaximum_mag_numf64 F
+GLIBC_2.35 fmaximum_mag_numf64x F
+GLIBC_2.35 fmaximum_mag_numl F
+GLIBC_2.35 fmaximum_magf F
+GLIBC_2.35 fmaximum_magf128 F
+GLIBC_2.35 fmaximum_magf32 F
+GLIBC_2.35 fmaximum_magf32x F
+GLIBC_2.35 fmaximum_magf64 F
+GLIBC_2.35 fmaximum_magf64x F
+GLIBC_2.35 fmaximum_magl F
+GLIBC_2.35 fmaximum_num F
+GLIBC_2.35 fmaximum_numf F
+GLIBC_2.35 fmaximum_numf128 F
+GLIBC_2.35 fmaximum_numf32 F
+GLIBC_2.35 fmaximum_numf32x F
+GLIBC_2.35 fmaximum_numf64 F
+GLIBC_2.35 fmaximum_numf64x F
+GLIBC_2.35 fmaximum_numl F
+GLIBC_2.35 fmaximumf F
+GLIBC_2.35 fmaximumf128 F
+GLIBC_2.35 fmaximumf32 F
+GLIBC_2.35 fmaximumf32x F
+GLIBC_2.35 fmaximumf64 F
+GLIBC_2.35 fmaximumf64x F
+GLIBC_2.35 fmaximuml F
+GLIBC_2.35 fminimum F
+GLIBC_2.35 fminimum_mag F
+GLIBC_2.35 fminimum_mag_num F
+GLIBC_2.35 fminimum_mag_numf F
+GLIBC_2.35 fminimum_mag_numf128 F
+GLIBC_2.35 fminimum_mag_numf32 F
+GLIBC_2.35 fminimum_mag_numf32x F
+GLIBC_2.35 fminimum_mag_numf64 F
+GLIBC_2.35 fminimum_mag_numf64x F
+GLIBC_2.35 fminimum_mag_numl F
+GLIBC_2.35 fminimum_magf F
+GLIBC_2.35 fminimum_magf128 F
+GLIBC_2.35 fminimum_magf32 F
+GLIBC_2.35 fminimum_magf32x F
+GLIBC_2.35 fminimum_magf64 F
+GLIBC_2.35 fminimum_magf64x F
+GLIBC_2.35 fminimum_magl F
+GLIBC_2.35 fminimum_num F
+GLIBC_2.35 fminimum_numf F
+GLIBC_2.35 fminimum_numf128 F
+GLIBC_2.35 fminimum_numf32 F
+GLIBC_2.35 fminimum_numf32x F
+GLIBC_2.35 fminimum_numf64 F
+GLIBC_2.35 fminimum_numf64x F
+GLIBC_2.35 fminimum_numl F
+GLIBC_2.35 fminimumf F
+GLIBC_2.35 fminimumf128 F
+GLIBC_2.35 fminimumf32 F
+GLIBC_2.35 fminimumf32x F
+GLIBC_2.35 fminimumf64 F
+GLIBC_2.35 fminimumf64x F
+GLIBC_2.35 fminimuml F
+GLIBC_2.35 fsqrt F
+GLIBC_2.35 fsqrtl F
+GLIBC_2.35 hypot F
+GLIBC_2.35 hypotf F
diff --git a/sysdeps/mach/hurd/x86_64/libmachuser.abilist b/sysdeps/mach/hurd/x86_64/libmachuser.abilist
new file mode 100644
index 00000000..edcc656d
--- /dev/null
+++ b/sysdeps/mach/hurd/x86_64/libmachuser.abilist
@@ -0,0 +1,336 @@
+Base _S_exc_server F
+Base _S_exc_server_routines D 0x8
+Base __default_pager_info F
+Base __default_pager_object_create F
+Base __default_pager_object_pages F
+Base __default_pager_objects F
+Base __default_pager_paging_file F
+Base __default_pager_register_fileserver F
+Base __device_close F
+Base __device_get_status F
+Base __device_intr_ack F
+Base __device_intr_register F
+Base __device_map F
+Base __device_open F
+Base __device_open_request F
+Base __device_read F
+Base __device_read_inband F
+Base __device_read_request F
+Base __device_read_request_inband F
+Base __device_set_filter F
+Base __device_set_status F
+Base __device_write F
+Base __device_write_inband F
+Base __device_write_request F
+Base __device_write_request_inband F
+Base __exception_raise F
+Base __gsync_requeue F
+Base __gsync_wait F
+Base __gsync_wake F
+Base __host_adjust_time F
+Base __host_adjust_time64 F
+Base __host_get_boot_info F
+Base __host_get_time F
+Base __host_get_time64 F
+Base __host_info F
+Base __host_kernel_version F
+Base __host_processor_set_priv F
+Base __host_processor_sets F
+Base __host_processors F
+Base __host_reboot F
+Base __host_set_time F
+Base __host_set_time64 F
+Base __i386_get_gdt F
+Base __i386_get_ldt F
+Base __i386_io_perm_create F
+Base __i386_io_perm_modify F
+Base __i386_set_gdt F
+Base __i386_set_ldt F
+Base __mach_notify_new_task F
+Base __mach_port_allocate_name_rpc F
+Base __mach_port_allocate_rpc F
+Base __mach_port_clear_protected_payload F
+Base __mach_port_deallocate_rpc F
+Base __mach_port_destroy F
+Base __mach_port_extract_right F
+Base __mach_port_get_receive_status F
+Base __mach_port_get_refs F
+Base __mach_port_get_set_status F
+Base __mach_port_insert_right_rpc F
+Base __mach_port_mod_refs F
+Base __mach_port_move_member F
+Base __mach_port_names F
+Base __mach_port_rename F
+Base __mach_port_request_notification F
+Base __mach_port_set_mscount F
+Base __mach_port_set_protected_payload F
+Base __mach_port_set_qlimit F
+Base __mach_port_set_seqno F
+Base __mach_port_type F
+Base __mach_ports_lookup F
+Base __mach_ports_register F
+Base __memory_object_change_attributes F
+Base __memory_object_change_completed F
+Base __memory_object_copy F
+Base __memory_object_create F
+Base __memory_object_create_proxy F
+Base __memory_object_data_error F
+Base __memory_object_data_initialize F
+Base __memory_object_data_request F
+Base __memory_object_data_return F
+Base __memory_object_data_supply F
+Base __memory_object_data_unavailable F
+Base __memory_object_data_unlock F
+Base __memory_object_destroy F
+Base __memory_object_get_attributes F
+Base __memory_object_init F
+Base __memory_object_lock_completed F
+Base __memory_object_lock_request F
+Base __memory_object_ready F
+Base __memory_object_supply_completed F
+Base __memory_object_terminate F
+Base __processor_assign F
+Base __processor_control F
+Base __processor_exit F
+Base __processor_get_assignment F
+Base __processor_info F
+Base __processor_set_create F
+Base __processor_set_default F
+Base __processor_set_destroy F
+Base __processor_set_info F
+Base __processor_set_max_priority F
+Base __processor_set_policy_disable F
+Base __processor_set_policy_enable F
+Base __processor_set_tasks F
+Base __processor_set_threads F
+Base __processor_start F
+Base __register_new_task_notification F
+Base __task_assign F
+Base __task_assign_default F
+Base __task_create_rpc F
+Base __task_disable_pc_sampling F
+Base __task_enable_pc_sampling F
+Base __task_get_assignment F
+Base __task_get_emulation_vector F
+Base __task_get_sampled_pcs F
+Base __task_get_special_port F
+Base __task_info F
+Base __task_priority F
+Base __task_ras_control F
+Base __task_resume F
+Base __task_set_emulation F
+Base __task_set_emulation_vector F
+Base __task_set_essential F
+Base __task_set_name F
+Base __task_set_special_port_rpc F
+Base __task_suspend_rpc F
+Base __task_terminate_rpc F
+Base __task_threads F
+Base __thread_abort F
+Base __thread_assign F
+Base __thread_assign_default F
+Base __thread_create F
+Base __thread_depress_abort_rpc F
+Base __thread_disable_pc_sampling F
+Base __thread_enable_pc_sampling F
+Base __thread_get_assignment F
+Base __thread_get_sampled_pcs F
+Base __thread_get_special_port F
+Base __thread_get_state F
+Base __thread_info F
+Base __thread_max_priority F
+Base __thread_policy F
+Base __thread_priority F
+Base __thread_resume F
+Base __thread_set_special_port F
+Base __thread_set_state F
+Base __thread_suspend F
+Base __thread_terminate F
+Base __thread_terminate_release F
+Base __thread_wire F
+Base __vm_allocate_contiguous F
+Base __vm_allocate_rpc F
+Base __vm_cache_statistics F
+Base __vm_copy F
+Base __vm_deallocate_rpc F
+Base __vm_inherit F
+Base __vm_machine_attribute F
+Base __vm_map_rpc F
+Base __vm_msync F
+Base __vm_object_sync F
+Base __vm_protect F
+Base __vm_read F
+Base __vm_region F
+Base __vm_region_create_proxy F
+Base __vm_set_default_memory_manager F
+Base __vm_statistics F
+Base __vm_wire F
+Base __vm_wire_all F
+Base __vm_write F
+Base default_pager_info F
+Base default_pager_object_create F
+Base default_pager_object_pages F
+Base default_pager_objects F
+Base default_pager_paging_file F
+Base default_pager_register_fileserver F
+Base device_close F
+Base device_get_status F
+Base device_intr_ack F
+Base device_intr_register F
+Base device_map F
+Base device_open F
+Base device_open_request F
+Base device_read F
+Base device_read_inband F
+Base device_read_request F
+Base device_read_request_inband F
+Base device_set_filter F
+Base device_set_status F
+Base device_write F
+Base device_write_inband F
+Base device_write_request F
+Base device_write_request_inband F
+Base exception_raise F
+Base gsync_requeue F
+Base gsync_wait F
+Base gsync_wake F
+Base host_adjust_time F
+Base host_adjust_time64 F
+Base host_get_boot_info F
+Base host_get_time F
+Base host_get_time64 F
+Base host_info F
+Base host_kernel_version F
+Base host_processor_set_priv F
+Base host_processor_sets F
+Base host_processors F
+Base host_reboot F
+Base host_set_time F
+Base host_set_time64 F
+Base i386_get_gdt F
+Base i386_get_ldt F
+Base i386_io_perm_create F
+Base i386_io_perm_modify F
+Base i386_set_gdt F
+Base i386_set_ldt F
+Base mach_notify_new_task F
+Base mach_port_allocate_name_rpc F
+Base mach_port_allocate_rpc F
+Base mach_port_clear_protected_payload F
+Base mach_port_deallocate_rpc F
+Base mach_port_destroy F
+Base mach_port_extract_right F
+Base mach_port_get_receive_status F
+Base mach_port_get_refs F
+Base mach_port_get_set_status F
+Base mach_port_insert_right_rpc F
+Base mach_port_mod_refs F
+Base mach_port_move_member F
+Base mach_port_names F
+Base mach_port_rename F
+Base mach_port_request_notification F
+Base mach_port_set_mscount F
+Base mach_port_set_protected_payload F
+Base mach_port_set_qlimit F
+Base mach_port_set_seqno F
+Base mach_port_type F
+Base mach_ports_lookup F
+Base mach_ports_register F
+Base memory_object_change_attributes F
+Base memory_object_change_completed F
+Base memory_object_copy F
+Base memory_object_create F
+Base memory_object_create_proxy F
+Base memory_object_data_error F
+Base memory_object_data_initialize F
+Base memory_object_data_request F
+Base memory_object_data_return F
+Base memory_object_data_supply F
+Base memory_object_data_unavailable F
+Base memory_object_data_unlock F
+Base memory_object_destroy F
+Base memory_object_get_attributes F
+Base memory_object_init F
+Base memory_object_lock_completed F
+Base memory_object_lock_request F
+Base memory_object_ready F
+Base memory_object_supply_completed F
+Base memory_object_terminate F
+Base processor_assign F
+Base processor_control F
+Base processor_exit F
+Base processor_get_assignment F
+Base processor_info F
+Base processor_set_create F
+Base processor_set_default F
+Base processor_set_destroy F
+Base processor_set_info F
+Base processor_set_max_priority F
+Base processor_set_policy_disable F
+Base processor_set_policy_enable F
+Base processor_set_tasks F
+Base processor_set_threads F
+Base processor_start F
+Base register_new_task_notification F
+Base task_assign F
+Base task_assign_default F
+Base task_create_rpc F
+Base task_disable_pc_sampling F
+Base task_enable_pc_sampling F
+Base task_get_assignment F
+Base task_get_emulation_vector F
+Base task_get_sampled_pcs F
+Base task_get_special_port F
+Base task_info F
+Base task_priority F
+Base task_ras_control F
+Base task_resume F
+Base task_set_emulation F
+Base task_set_emulation_vector F
+Base task_set_essential F
+Base task_set_name F
+Base task_set_special_port_rpc F
+Base task_suspend_rpc F
+Base task_terminate_rpc F
+Base task_threads F
+Base thread_abort F
+Base thread_assign F
+Base thread_assign_default F
+Base thread_create F
+Base thread_depress_abort_rpc F
+Base thread_disable_pc_sampling F
+Base thread_enable_pc_sampling F
+Base thread_get_assignment F
+Base thread_get_sampled_pcs F
+Base thread_get_special_port F
+Base thread_get_state F
+Base thread_info F
+Base thread_max_priority F
+Base thread_policy F
+Base thread_priority F
+Base thread_resume F
+Base thread_set_special_port F
+Base thread_set_state F
+Base thread_suspend F
+Base thread_terminate F
+Base thread_terminate_release F
+Base thread_wire F
+Base vm_allocate_contiguous F
+Base vm_allocate_rpc F
+Base vm_cache_statistics F
+Base vm_copy F
+Base vm_deallocate_rpc F
+Base vm_inherit F
+Base vm_machine_attribute F
+Base vm_map_rpc F
+Base vm_msync F
+Base vm_object_sync F
+Base vm_protect F
+Base vm_read F
+Base vm_region F
+Base vm_region_create_proxy F
+Base vm_set_default_memory_manager F
+Base vm_statistics F
+Base vm_wire F
+Base vm_wire_all F
+Base vm_write F
diff --git a/sysdeps/mach/hurd/x86_64/libmvec.abilist b/sysdeps/mach/hurd/x86_64/libmvec.abilist
new file mode 100644
index 00000000..055530f3
--- /dev/null
+++ b/sysdeps/mach/hurd/x86_64/libmvec.abilist
@@ -0,0 +1,216 @@
+GLIBC_2.22 _ZGVbN2v_cos F
+GLIBC_2.22 _ZGVbN2v_exp F
+GLIBC_2.22 _ZGVbN2v_log F
+GLIBC_2.22 _ZGVbN2v_sin F
+GLIBC_2.22 _ZGVbN2vv_pow F
+GLIBC_2.22 _ZGVbN2vvv_sincos F
+GLIBC_2.22 _ZGVbN4v_cosf F
+GLIBC_2.22 _ZGVbN4v_expf F
+GLIBC_2.22 _ZGVbN4v_logf F
+GLIBC_2.22 _ZGVbN4v_sinf F
+GLIBC_2.22 _ZGVbN4vv_powf F
+GLIBC_2.22 _ZGVbN4vvv_sincosf F
+GLIBC_2.22 _ZGVcN4v_cos F
+GLIBC_2.22 _ZGVcN4v_exp F
+GLIBC_2.22 _ZGVcN4v_log F
+GLIBC_2.22 _ZGVcN4v_sin F
+GLIBC_2.22 _ZGVcN4vv_pow F
+GLIBC_2.22 _ZGVcN4vvv_sincos F
+GLIBC_2.22 _ZGVcN8v_cosf F
+GLIBC_2.22 _ZGVcN8v_expf F
+GLIBC_2.22 _ZGVcN8v_logf F
+GLIBC_2.22 _ZGVcN8v_sinf F
+GLIBC_2.22 _ZGVcN8vv_powf F
+GLIBC_2.22 _ZGVcN8vvv_sincosf F
+GLIBC_2.22 _ZGVdN4v_cos F
+GLIBC_2.22 _ZGVdN4v_exp F
+GLIBC_2.22 _ZGVdN4v_log F
+GLIBC_2.22 _ZGVdN4v_sin F
+GLIBC_2.22 _ZGVdN4vv_pow F
+GLIBC_2.22 _ZGVdN4vvv_sincos F
+GLIBC_2.22 _ZGVdN8v_cosf F
+GLIBC_2.22 _ZGVdN8v_expf F
+GLIBC_2.22 _ZGVdN8v_logf F
+GLIBC_2.22 _ZGVdN8v_sinf F
+GLIBC_2.22 _ZGVdN8vv_powf F
+GLIBC_2.22 _ZGVdN8vvv_sincosf F
+GLIBC_2.22 _ZGVeN16v_cosf F
+GLIBC_2.22 _ZGVeN16v_expf F
+GLIBC_2.22 _ZGVeN16v_logf F
+GLIBC_2.22 _ZGVeN16v_sinf F
+GLIBC_2.22 _ZGVeN16vv_powf F
+GLIBC_2.22 _ZGVeN16vvv_sincosf F
+GLIBC_2.22 _ZGVeN8v_cos F
+GLIBC_2.22 _ZGVeN8v_exp F
+GLIBC_2.22 _ZGVeN8v_log F
+GLIBC_2.22 _ZGVeN8v_sin F
+GLIBC_2.22 _ZGVeN8vv_pow F
+GLIBC_2.22 _ZGVeN8vvv_sincos F
+GLIBC_2.35 _ZGVbN2v_acos F
+GLIBC_2.35 _ZGVbN2v_acosh F
+GLIBC_2.35 _ZGVbN2v_asin F
+GLIBC_2.35 _ZGVbN2v_asinh F
+GLIBC_2.35 _ZGVbN2v_atan F
+GLIBC_2.35 _ZGVbN2v_atanh F
+GLIBC_2.35 _ZGVbN2v_cbrt F
+GLIBC_2.35 _ZGVbN2v_cosh F
+GLIBC_2.35 _ZGVbN2v_erf F
+GLIBC_2.35 _ZGVbN2v_erfc F
+GLIBC_2.35 _ZGVbN2v_exp10 F
+GLIBC_2.35 _ZGVbN2v_exp2 F
+GLIBC_2.35 _ZGVbN2v_expm1 F
+GLIBC_2.35 _ZGVbN2v_log10 F
+GLIBC_2.35 _ZGVbN2v_log1p F
+GLIBC_2.35 _ZGVbN2v_log2 F
+GLIBC_2.35 _ZGVbN2v_sinh F
+GLIBC_2.35 _ZGVbN2v_tan F
+GLIBC_2.35 _ZGVbN2v_tanh F
+GLIBC_2.35 _ZGVbN2vv_atan2 F
+GLIBC_2.35 _ZGVbN2vv_hypot F
+GLIBC_2.35 _ZGVbN4v_acosf F
+GLIBC_2.35 _ZGVbN4v_acoshf F
+GLIBC_2.35 _ZGVbN4v_asinf F
+GLIBC_2.35 _ZGVbN4v_asinhf F
+GLIBC_2.35 _ZGVbN4v_atanf F
+GLIBC_2.35 _ZGVbN4v_atanhf F
+GLIBC_2.35 _ZGVbN4v_cbrtf F
+GLIBC_2.35 _ZGVbN4v_coshf F
+GLIBC_2.35 _ZGVbN4v_erfcf F
+GLIBC_2.35 _ZGVbN4v_erff F
+GLIBC_2.35 _ZGVbN4v_exp10f F
+GLIBC_2.35 _ZGVbN4v_exp2f F
+GLIBC_2.35 _ZGVbN4v_expm1f F
+GLIBC_2.35 _ZGVbN4v_log10f F
+GLIBC_2.35 _ZGVbN4v_log1pf F
+GLIBC_2.35 _ZGVbN4v_log2f F
+GLIBC_2.35 _ZGVbN4v_sinhf F
+GLIBC_2.35 _ZGVbN4v_tanf F
+GLIBC_2.35 _ZGVbN4v_tanhf F
+GLIBC_2.35 _ZGVbN4vv_atan2f F
+GLIBC_2.35 _ZGVbN4vv_hypotf F
+GLIBC_2.35 _ZGVcN4v_acos F
+GLIBC_2.35 _ZGVcN4v_acosh F
+GLIBC_2.35 _ZGVcN4v_asin F
+GLIBC_2.35 _ZGVcN4v_asinh F
+GLIBC_2.35 _ZGVcN4v_atan F
+GLIBC_2.35 _ZGVcN4v_atanh F
+GLIBC_2.35 _ZGVcN4v_cbrt F
+GLIBC_2.35 _ZGVcN4v_cosh F
+GLIBC_2.35 _ZGVcN4v_erf F
+GLIBC_2.35 _ZGVcN4v_erfc F
+GLIBC_2.35 _ZGVcN4v_exp10 F
+GLIBC_2.35 _ZGVcN4v_exp2 F
+GLIBC_2.35 _ZGVcN4v_expm1 F
+GLIBC_2.35 _ZGVcN4v_log10 F
+GLIBC_2.35 _ZGVcN4v_log1p F
+GLIBC_2.35 _ZGVcN4v_log2 F
+GLIBC_2.35 _ZGVcN4v_sinh F
+GLIBC_2.35 _ZGVcN4v_tan F
+GLIBC_2.35 _ZGVcN4v_tanh F
+GLIBC_2.35 _ZGVcN4vv_atan2 F
+GLIBC_2.35 _ZGVcN4vv_hypot F
+GLIBC_2.35 _ZGVcN8v_acosf F
+GLIBC_2.35 _ZGVcN8v_acoshf F
+GLIBC_2.35 _ZGVcN8v_asinf F
+GLIBC_2.35 _ZGVcN8v_asinhf F
+GLIBC_2.35 _ZGVcN8v_atanf F
+GLIBC_2.35 _ZGVcN8v_atanhf F
+GLIBC_2.35 _ZGVcN8v_cbrtf F
+GLIBC_2.35 _ZGVcN8v_coshf F
+GLIBC_2.35 _ZGVcN8v_erfcf F
+GLIBC_2.35 _ZGVcN8v_erff F
+GLIBC_2.35 _ZGVcN8v_exp10f F
+GLIBC_2.35 _ZGVcN8v_exp2f F
+GLIBC_2.35 _ZGVcN8v_expm1f F
+GLIBC_2.35 _ZGVcN8v_log10f F
+GLIBC_2.35 _ZGVcN8v_log1pf F
+GLIBC_2.35 _ZGVcN8v_log2f F
+GLIBC_2.35 _ZGVcN8v_sinhf F
+GLIBC_2.35 _ZGVcN8v_tanf F
+GLIBC_2.35 _ZGVcN8v_tanhf F
+GLIBC_2.35 _ZGVcN8vv_atan2f F
+GLIBC_2.35 _ZGVcN8vv_hypotf F
+GLIBC_2.35 _ZGVdN4v_acos F
+GLIBC_2.35 _ZGVdN4v_acosh F
+GLIBC_2.35 _ZGVdN4v_asin F
+GLIBC_2.35 _ZGVdN4v_asinh F
+GLIBC_2.35 _ZGVdN4v_atan F
+GLIBC_2.35 _ZGVdN4v_atanh F
+GLIBC_2.35 _ZGVdN4v_cbrt F
+GLIBC_2.35 _ZGVdN4v_cosh F
+GLIBC_2.35 _ZGVdN4v_erf F
+GLIBC_2.35 _ZGVdN4v_erfc F
+GLIBC_2.35 _ZGVdN4v_exp10 F
+GLIBC_2.35 _ZGVdN4v_exp2 F
+GLIBC_2.35 _ZGVdN4v_expm1 F
+GLIBC_2.35 _ZGVdN4v_log10 F
+GLIBC_2.35 _ZGVdN4v_log1p F
+GLIBC_2.35 _ZGVdN4v_log2 F
+GLIBC_2.35 _ZGVdN4v_sinh F
+GLIBC_2.35 _ZGVdN4v_tan F
+GLIBC_2.35 _ZGVdN4v_tanh F
+GLIBC_2.35 _ZGVdN4vv_atan2 F
+GLIBC_2.35 _ZGVdN4vv_hypot F
+GLIBC_2.35 _ZGVdN8v_acosf F
+GLIBC_2.35 _ZGVdN8v_acoshf F
+GLIBC_2.35 _ZGVdN8v_asinf F
+GLIBC_2.35 _ZGVdN8v_asinhf F
+GLIBC_2.35 _ZGVdN8v_atanf F
+GLIBC_2.35 _ZGVdN8v_atanhf F
+GLIBC_2.35 _ZGVdN8v_cbrtf F
+GLIBC_2.35 _ZGVdN8v_coshf F
+GLIBC_2.35 _ZGVdN8v_erfcf F
+GLIBC_2.35 _ZGVdN8v_erff F
+GLIBC_2.35 _ZGVdN8v_exp10f F
+GLIBC_2.35 _ZGVdN8v_exp2f F
+GLIBC_2.35 _ZGVdN8v_expm1f F
+GLIBC_2.35 _ZGVdN8v_log10f F
+GLIBC_2.35 _ZGVdN8v_log1pf F
+GLIBC_2.35 _ZGVdN8v_log2f F
+GLIBC_2.35 _ZGVdN8v_sinhf F
+GLIBC_2.35 _ZGVdN8v_tanf F
+GLIBC_2.35 _ZGVdN8v_tanhf F
+GLIBC_2.35 _ZGVdN8vv_atan2f F
+GLIBC_2.35 _ZGVdN8vv_hypotf F
+GLIBC_2.35 _ZGVeN16v_acosf F
+GLIBC_2.35 _ZGVeN16v_acoshf F
+GLIBC_2.35 _ZGVeN16v_asinf F
+GLIBC_2.35 _ZGVeN16v_asinhf F
+GLIBC_2.35 _ZGVeN16v_atanf F
+GLIBC_2.35 _ZGVeN16v_atanhf F
+GLIBC_2.35 _ZGVeN16v_cbrtf F
+GLIBC_2.35 _ZGVeN16v_coshf F
+GLIBC_2.35 _ZGVeN16v_erfcf F
+GLIBC_2.35 _ZGVeN16v_erff F
+GLIBC_2.35 _ZGVeN16v_exp10f F
+GLIBC_2.35 _ZGVeN16v_exp2f F
+GLIBC_2.35 _ZGVeN16v_expm1f F
+GLIBC_2.35 _ZGVeN16v_log10f F
+GLIBC_2.35 _ZGVeN16v_log1pf F
+GLIBC_2.35 _ZGVeN16v_log2f F
+GLIBC_2.35 _ZGVeN16v_sinhf F
+GLIBC_2.35 _ZGVeN16v_tanf F
+GLIBC_2.35 _ZGVeN16v_tanhf F
+GLIBC_2.35 _ZGVeN16vv_atan2f F
+GLIBC_2.35 _ZGVeN16vv_hypotf F
+GLIBC_2.35 _ZGVeN8v_acos F
+GLIBC_2.35 _ZGVeN8v_acosh F
+GLIBC_2.35 _ZGVeN8v_asin F
+GLIBC_2.35 _ZGVeN8v_asinh F
+GLIBC_2.35 _ZGVeN8v_atan F
+GLIBC_2.35 _ZGVeN8v_atanh F
+GLIBC_2.35 _ZGVeN8v_cbrt F
+GLIBC_2.35 _ZGVeN8v_cosh F
+GLIBC_2.35 _ZGVeN8v_erf F
+GLIBC_2.35 _ZGVeN8v_erfc F
+GLIBC_2.35 _ZGVeN8v_exp10 F
+GLIBC_2.35 _ZGVeN8v_exp2 F
+GLIBC_2.35 _ZGVeN8v_expm1 F
+GLIBC_2.35 _ZGVeN8v_log10 F
+GLIBC_2.35 _ZGVeN8v_log1p F
+GLIBC_2.35 _ZGVeN8v_log2 F
+GLIBC_2.35 _ZGVeN8v_sinh F
+GLIBC_2.35 _ZGVeN8v_tan F
+GLIBC_2.35 _ZGVeN8v_tanh F
+GLIBC_2.35 _ZGVeN8vv_atan2 F
+GLIBC_2.35 _ZGVeN8vv_hypot F
diff --git a/sysdeps/mach/hurd/x86_64/libnsl.abilist b/sysdeps/mach/hurd/x86_64/libnsl.abilist
new file mode 100644
index 00000000..c3979162
--- /dev/null
+++ b/sysdeps/mach/hurd/x86_64/libnsl.abilist
@@ -0,0 +1,121 @@
+GLIBC_2.2.6 __free_fdresult F
+GLIBC_2.2.6 __nis_default_access F
+GLIBC_2.2.6 __nis_default_group F
+GLIBC_2.2.6 __nis_default_owner F
+GLIBC_2.2.6 __nis_default_ttl F
+GLIBC_2.2.6 __nis_finddirectory F
+GLIBC_2.2.6 __nis_hash F
+GLIBC_2.2.6 __nisbind_connect F
+GLIBC_2.2.6 __nisbind_create F
+GLIBC_2.2.6 __nisbind_destroy F
+GLIBC_2.2.6 __nisbind_next F
+GLIBC_2.2.6 __yp_check F
+GLIBC_2.2.6 nis_add F
+GLIBC_2.2.6 nis_add_entry F
+GLIBC_2.2.6 nis_addmember F
+GLIBC_2.2.6 nis_checkpoint F
+GLIBC_2.2.6 nis_clone_directory F
+GLIBC_2.2.6 nis_clone_object F
+GLIBC_2.2.6 nis_clone_result F
+GLIBC_2.2.6 nis_creategroup F
+GLIBC_2.2.6 nis_destroy_object F
+GLIBC_2.2.6 nis_destroygroup F
+GLIBC_2.2.6 nis_dir_cmp F
+GLIBC_2.2.6 nis_domain_of F
+GLIBC_2.2.6 nis_domain_of_r F
+GLIBC_2.2.6 nis_first_entry F
+GLIBC_2.2.6 nis_free_directory F
+GLIBC_2.2.6 nis_free_object F
+GLIBC_2.2.6 nis_free_request F
+GLIBC_2.2.6 nis_freenames F
+GLIBC_2.2.6 nis_freeresult F
+GLIBC_2.2.6 nis_freeservlist F
+GLIBC_2.2.6 nis_freetags F
+GLIBC_2.2.6 nis_getnames F
+GLIBC_2.2.6 nis_getservlist F
+GLIBC_2.2.6 nis_ismember F
+GLIBC_2.2.6 nis_leaf_of F
+GLIBC_2.2.6 nis_leaf_of_r F
+GLIBC_2.2.6 nis_lerror F
+GLIBC_2.2.6 nis_list F
+GLIBC_2.2.6 nis_local_directory F
+GLIBC_2.2.6 nis_local_group F
+GLIBC_2.2.6 nis_local_host F
+GLIBC_2.2.6 nis_local_principal F
+GLIBC_2.2.6 nis_lookup F
+GLIBC_2.2.6 nis_mkdir F
+GLIBC_2.2.6 nis_modify F
+GLIBC_2.2.6 nis_modify_entry F
+GLIBC_2.2.6 nis_name_of F
+GLIBC_2.2.6 nis_name_of_r F
+GLIBC_2.2.6 nis_next_entry F
+GLIBC_2.2.6 nis_perror F
+GLIBC_2.2.6 nis_ping F
+GLIBC_2.2.6 nis_print_directory F
+GLIBC_2.2.6 nis_print_entry F
+GLIBC_2.2.6 nis_print_group F
+GLIBC_2.2.6 nis_print_group_entry F
+GLIBC_2.2.6 nis_print_link F
+GLIBC_2.2.6 nis_print_object F
+GLIBC_2.2.6 nis_print_result F
+GLIBC_2.2.6 nis_print_rights F
+GLIBC_2.2.6 nis_print_table F
+GLIBC_2.2.6 nis_read_obj F
+GLIBC_2.2.6 nis_remove F
+GLIBC_2.2.6 nis_remove_entry F
+GLIBC_2.2.6 nis_removemember F
+GLIBC_2.2.6 nis_rmdir F
+GLIBC_2.2.6 nis_servstate F
+GLIBC_2.2.6 nis_sperrno F
+GLIBC_2.2.6 nis_sperror F
+GLIBC_2.2.6 nis_sperror_r F
+GLIBC_2.2.6 nis_stats F
+GLIBC_2.2.6 nis_verifygroup F
+GLIBC_2.2.6 nis_write_obj F
+GLIBC_2.2.6 readColdStartFile F
+GLIBC_2.2.6 writeColdStartFile F
+GLIBC_2.2.6 xdr_cback_data F
+GLIBC_2.2.6 xdr_domainname F
+GLIBC_2.2.6 xdr_keydat F
+GLIBC_2.2.6 xdr_mapname F
+GLIBC_2.2.6 xdr_obj_p F
+GLIBC_2.2.6 xdr_peername F
+GLIBC_2.2.6 xdr_valdat F
+GLIBC_2.2.6 xdr_yp_buf F
+GLIBC_2.2.6 xdr_ypall F
+GLIBC_2.2.6 xdr_ypbind_binding F
+GLIBC_2.2.6 xdr_ypbind_resp F
+GLIBC_2.2.6 xdr_ypbind_resptype F
+GLIBC_2.2.6 xdr_ypbind_setdom F
+GLIBC_2.2.6 xdr_ypdelete_args F
+GLIBC_2.2.6 xdr_ypmap_parms F
+GLIBC_2.2.6 xdr_ypmaplist F
+GLIBC_2.2.6 xdr_yppush_status F
+GLIBC_2.2.6 xdr_yppushresp_xfr F
+GLIBC_2.2.6 xdr_ypreq_key F
+GLIBC_2.2.6 xdr_ypreq_nokey F
+GLIBC_2.2.6 xdr_ypreq_xfr F
+GLIBC_2.2.6 xdr_ypresp_all F
+GLIBC_2.2.6 xdr_ypresp_key_val F
+GLIBC_2.2.6 xdr_ypresp_maplist F
+GLIBC_2.2.6 xdr_ypresp_master F
+GLIBC_2.2.6 xdr_ypresp_order F
+GLIBC_2.2.6 xdr_ypresp_val F
+GLIBC_2.2.6 xdr_ypresp_xfr F
+GLIBC_2.2.6 xdr_ypstat F
+GLIBC_2.2.6 xdr_ypupdate_args F
+GLIBC_2.2.6 xdr_ypxfrstat F
+GLIBC_2.2.6 yp_all F
+GLIBC_2.2.6 yp_bind F
+GLIBC_2.2.6 yp_first F
+GLIBC_2.2.6 yp_get_default_domain F
+GLIBC_2.2.6 yp_maplist F
+GLIBC_2.2.6 yp_master F
+GLIBC_2.2.6 yp_match F
+GLIBC_2.2.6 yp_next F
+GLIBC_2.2.6 yp_order F
+GLIBC_2.2.6 yp_unbind F
+GLIBC_2.2.6 yp_update F
+GLIBC_2.2.6 ypbinderr_string F
+GLIBC_2.2.6 yperr_string F
+GLIBC_2.2.6 ypprot_err F
diff --git a/sysdeps/mach/hurd/x86_64/libpthread.abilist b/sysdeps/mach/hurd/x86_64/libpthread.abilist
new file mode 100644
index 00000000..b9c9b75c
--- /dev/null
+++ b/sysdeps/mach/hurd/x86_64/libpthread.abilist
@@ -0,0 +1,178 @@
+GLIBC_2.12 __mutex_lock_solid F
+GLIBC_2.12 __mutex_unlock_solid F
+GLIBC_2.12 __pthread_get_cleanup_stack F
+GLIBC_2.12 __pthread_key_create F
+GLIBC_2.12 __pthread_kill F
+GLIBC_2.12 __pthread_mutex_transfer_np F
+GLIBC_2.12 __pthread_self F
+GLIBC_2.12 __pthread_spin_destroy F
+GLIBC_2.12 __pthread_spin_init F
+GLIBC_2.12 __pthread_spin_lock F
+GLIBC_2.12 __pthread_spin_trylock F
+GLIBC_2.12 __pthread_spin_unlock F
+GLIBC_2.12 _cthreads_flockfile F
+GLIBC_2.12 _cthreads_ftrylockfile F
+GLIBC_2.12 _cthreads_funlockfile F
+GLIBC_2.12 _pthread_spin_lock F
+GLIBC_2.12 cthread_detach F
+GLIBC_2.12 cthread_fork F
+GLIBC_2.12 cthread_getspecific F
+GLIBC_2.12 cthread_keycreate F
+GLIBC_2.12 cthread_setspecific F
+GLIBC_2.12 flockfile F
+GLIBC_2.12 ftrylockfile F
+GLIBC_2.12 funlockfile F
+GLIBC_2.12 pthread_atfork F
+GLIBC_2.12 pthread_attr_destroy F
+GLIBC_2.12 pthread_attr_getdetachstate F
+GLIBC_2.12 pthread_attr_getguardsize F
+GLIBC_2.12 pthread_attr_getinheritsched F
+GLIBC_2.12 pthread_attr_getschedparam F
+GLIBC_2.12 pthread_attr_getschedpolicy F
+GLIBC_2.12 pthread_attr_getscope F
+GLIBC_2.12 pthread_attr_getstack F
+GLIBC_2.12 pthread_attr_getstackaddr F
+GLIBC_2.12 pthread_attr_getstacksize F
+GLIBC_2.12 pthread_attr_init F
+GLIBC_2.12 pthread_attr_setdetachstate F
+GLIBC_2.12 pthread_attr_setguardsize F
+GLIBC_2.12 pthread_attr_setinheritsched F
+GLIBC_2.12 pthread_attr_setschedparam F
+GLIBC_2.12 pthread_attr_setschedpolicy F
+GLIBC_2.12 pthread_attr_setscope F
+GLIBC_2.12 pthread_attr_setstack F
+GLIBC_2.12 pthread_attr_setstackaddr F
+GLIBC_2.12 pthread_attr_setstacksize F
+GLIBC_2.12 pthread_barrier_destroy F
+GLIBC_2.12 pthread_barrier_init F
+GLIBC_2.12 pthread_barrier_wait F
+GLIBC_2.12 pthread_barrierattr_destroy F
+GLIBC_2.12 pthread_barrierattr_getpshared F
+GLIBC_2.12 pthread_barrierattr_init F
+GLIBC_2.12 pthread_barrierattr_setpshared F
+GLIBC_2.12 pthread_cancel F
+GLIBC_2.12 pthread_cond_broadcast F
+GLIBC_2.12 pthread_cond_destroy F
+GLIBC_2.12 pthread_cond_init F
+GLIBC_2.12 pthread_cond_signal F
+GLIBC_2.12 pthread_cond_timedwait F
+GLIBC_2.12 pthread_cond_wait F
+GLIBC_2.12 pthread_condattr_destroy F
+GLIBC_2.12 pthread_condattr_getclock F
+GLIBC_2.12 pthread_condattr_getpshared F
+GLIBC_2.12 pthread_condattr_init F
+GLIBC_2.12 pthread_condattr_setclock F
+GLIBC_2.12 pthread_condattr_setpshared F
+GLIBC_2.12 pthread_create F
+GLIBC_2.12 pthread_detach F
+GLIBC_2.12 pthread_equal F
+GLIBC_2.12 pthread_exit F
+GLIBC_2.12 pthread_getattr_np F
+GLIBC_2.12 pthread_getconcurrency F
+GLIBC_2.12 pthread_getcpuclockid F
+GLIBC_2.12 pthread_getschedparam F
+GLIBC_2.12 pthread_getspecific F
+GLIBC_2.12 pthread_join F
+GLIBC_2.12 pthread_key_create F
+GLIBC_2.12 pthread_key_delete F
+GLIBC_2.12 pthread_kill F
+GLIBC_2.12 pthread_mutex_destroy F
+GLIBC_2.12 pthread_mutex_getprioceiling F
+GLIBC_2.12 pthread_mutex_init F
+GLIBC_2.12 pthread_mutex_lock F
+GLIBC_2.12 pthread_mutex_setprioceiling F
+GLIBC_2.12 pthread_mutex_timedlock F
+GLIBC_2.12 pthread_mutex_transfer_np F
+GLIBC_2.12 pthread_mutex_trylock F
+GLIBC_2.12 pthread_mutex_unlock F
+GLIBC_2.12 pthread_mutexattr_destroy F
+GLIBC_2.12 pthread_mutexattr_getprioceiling F
+GLIBC_2.12 pthread_mutexattr_getprotocol F
+GLIBC_2.12 pthread_mutexattr_getpshared F
+GLIBC_2.12 pthread_mutexattr_gettype F
+GLIBC_2.12 pthread_mutexattr_init F
+GLIBC_2.12 pthread_mutexattr_setprioceiling F
+GLIBC_2.12 pthread_mutexattr_setprotocol F
+GLIBC_2.12 pthread_mutexattr_setpshared F
+GLIBC_2.12 pthread_mutexattr_settype F
+GLIBC_2.12 pthread_once F
+GLIBC_2.12 pthread_rwlock_destroy F
+GLIBC_2.12 pthread_rwlock_init F
+GLIBC_2.12 pthread_rwlock_rdlock F
+GLIBC_2.12 pthread_rwlock_timedrdlock F
+GLIBC_2.12 pthread_rwlock_timedwrlock F
+GLIBC_2.12 pthread_rwlock_tryrdlock F
+GLIBC_2.12 pthread_rwlock_trywrlock F
+GLIBC_2.12 pthread_rwlock_unlock F
+GLIBC_2.12 pthread_rwlock_wrlock F
+GLIBC_2.12 pthread_rwlockattr_destroy F
+GLIBC_2.12 pthread_rwlockattr_getpshared F
+GLIBC_2.12 pthread_rwlockattr_init F
+GLIBC_2.12 pthread_rwlockattr_setpshared F
+GLIBC_2.12 pthread_self F
+GLIBC_2.12 pthread_setcancelstate F
+GLIBC_2.12 pthread_setcanceltype F
+GLIBC_2.12 pthread_setconcurrency F
+GLIBC_2.12 pthread_setschedparam F
+GLIBC_2.12 pthread_setschedprio F
+GLIBC_2.12 pthread_setspecific F
+GLIBC_2.12 pthread_sigmask F
+GLIBC_2.12 pthread_spin_destroy F
+GLIBC_2.12 pthread_spin_init F
+GLIBC_2.12 pthread_spin_lock F
+GLIBC_2.12 pthread_spin_trylock F
+GLIBC_2.12 pthread_spin_unlock F
+GLIBC_2.12 pthread_testcancel F
+GLIBC_2.12 pthread_yield F
+GLIBC_2.12 sem_close F
+GLIBC_2.12 sem_destroy F
+GLIBC_2.12 sem_getvalue F
+GLIBC_2.12 sem_init F
+GLIBC_2.12 sem_open F
+GLIBC_2.12 sem_post F
+GLIBC_2.12 sem_timedwait F
+GLIBC_2.12 sem_trywait F
+GLIBC_2.12 sem_unlink F
+GLIBC_2.12 sem_wait F
+GLIBC_2.2.6 _IO_flockfile F
+GLIBC_2.2.6 _IO_ftrylockfile F
+GLIBC_2.2.6 _IO_funlockfile F
+GLIBC_2.2.6 __errno_location F
+GLIBC_2.2.6 __h_errno_location F
+GLIBC_2.21 pthread_hurd_cond_timedwait_np F
+GLIBC_2.21 pthread_hurd_cond_wait_np F
+GLIBC_2.32 call_once F
+GLIBC_2.32 cnd_broadcast F
+GLIBC_2.32 cnd_destroy F
+GLIBC_2.32 cnd_init F
+GLIBC_2.32 cnd_signal F
+GLIBC_2.32 cnd_timedwait F
+GLIBC_2.32 cnd_wait F
+GLIBC_2.32 mtx_destroy F
+GLIBC_2.32 mtx_init F
+GLIBC_2.32 mtx_lock F
+GLIBC_2.32 mtx_timedlock F
+GLIBC_2.32 mtx_trylock F
+GLIBC_2.32 mtx_unlock F
+GLIBC_2.32 pthread_clockjoin_np F
+GLIBC_2.32 pthread_cond_clockwait F
+GLIBC_2.32 pthread_mutex_clocklock F
+GLIBC_2.32 pthread_mutex_consistent F
+GLIBC_2.32 pthread_mutex_consistent_np F
+GLIBC_2.32 pthread_mutexattr_getrobust F
+GLIBC_2.32 pthread_mutexattr_getrobust_np F
+GLIBC_2.32 pthread_mutexattr_setrobust F
+GLIBC_2.32 pthread_mutexattr_setrobust_np F
+GLIBC_2.32 pthread_rwlock_clockrdlock F
+GLIBC_2.32 pthread_rwlock_clockwrlock F
+GLIBC_2.32 pthread_timedjoin_np F
+GLIBC_2.32 pthread_tryjoin_np F
+GLIBC_2.32 sem_clockwait F
+GLIBC_2.32 thrd_create F
+GLIBC_2.32 thrd_detach F
+GLIBC_2.32 thrd_exit F
+GLIBC_2.32 thrd_join F
+GLIBC_2.32 tss_create F
+GLIBC_2.32 tss_delete F
+GLIBC_2.32 tss_get F
+GLIBC_2.32 tss_set F
diff --git a/sysdeps/mach/hurd/x86_64/libresolv.abilist b/sysdeps/mach/hurd/x86_64/libresolv.abilist
new file mode 100644
index 00000000..c6992bcb
--- /dev/null
+++ b/sysdeps/mach/hurd/x86_64/libresolv.abilist
@@ -0,0 +1,67 @@
+GLIBC_2.2.6 __b64_ntop F
+GLIBC_2.2.6 __b64_pton F
+GLIBC_2.2.6 __dn_count_labels F
+GLIBC_2.2.6 __fp_nquery F
+GLIBC_2.2.6 __fp_query F
+GLIBC_2.2.6 __fp_resstat F
+GLIBC_2.2.6 __hostalias F
+GLIBC_2.2.6 __loc_aton F
+GLIBC_2.2.6 __loc_ntoa F
+GLIBC_2.2.6 __p_cdname F
+GLIBC_2.2.6 __p_cdnname F
+GLIBC_2.2.6 __p_class F
+GLIBC_2.2.6 __p_class_syms D 0xa8
+GLIBC_2.2.6 __p_fqname F
+GLIBC_2.2.6 __p_fqnname F
+GLIBC_2.2.6 __p_option F
+GLIBC_2.2.6 __p_query F
+GLIBC_2.2.6 __p_secstodate F
+GLIBC_2.2.6 __p_time F
+GLIBC_2.2.6 __p_type F
+GLIBC_2.2.6 __p_type_syms D 0x450
+GLIBC_2.2.6 __putlong F
+GLIBC_2.2.6 __putshort F
+GLIBC_2.2.6 __res_close F
+GLIBC_2.2.6 __res_hostalias F
+GLIBC_2.2.6 __res_isourserver F
+GLIBC_2.2.6 __res_nameinquery F
+GLIBC_2.2.6 __res_queriesmatch F
+GLIBC_2.2.6 __sym_ntop F
+GLIBC_2.2.6 __sym_ntos F
+GLIBC_2.2.6 __sym_ston F
+GLIBC_2.2.6 _gethtbyaddr F
+GLIBC_2.2.6 _gethtbyname F
+GLIBC_2.2.6 _gethtbyname2 F
+GLIBC_2.2.6 _gethtent F
+GLIBC_2.2.6 _getlong F
+GLIBC_2.2.6 _getshort F
+GLIBC_2.2.6 _res_opcodes D 0x80
+GLIBC_2.2.6 _sethtent F
+GLIBC_2.2.6 inet_net_ntop F
+GLIBC_2.2.6 inet_net_pton F
+GLIBC_2.2.6 inet_neta F
+GLIBC_2.2.6 res_gethostbyaddr F
+GLIBC_2.2.6 res_gethostbyname F
+GLIBC_2.2.6 res_gethostbyname2 F
+GLIBC_2.2.6 res_send_setqhook F
+GLIBC_2.2.6 res_send_setrhook F
+GLIBC_2.3.2 __p_rcode F
+GLIBC_2.9 ns_datetosecs F
+GLIBC_2.9 ns_format_ttl F
+GLIBC_2.9 ns_get16 F
+GLIBC_2.9 ns_get32 F
+GLIBC_2.9 ns_initparse F
+GLIBC_2.9 ns_makecanon F
+GLIBC_2.9 ns_msg_getflag F
+GLIBC_2.9 ns_name_ntol F
+GLIBC_2.9 ns_name_rollback F
+GLIBC_2.9 ns_parse_ttl F
+GLIBC_2.9 ns_parserr F
+GLIBC_2.9 ns_put16 F
+GLIBC_2.9 ns_put32 F
+GLIBC_2.9 ns_samedomain F
+GLIBC_2.9 ns_samename F
+GLIBC_2.9 ns_skiprr F
+GLIBC_2.9 ns_sprintrr F
+GLIBC_2.9 ns_sprintrrf F
+GLIBC_2.9 ns_subdomain F
diff --git a/sysdeps/mach/hurd/x86_64/librt.abilist b/sysdeps/mach/hurd/x86_64/librt.abilist
new file mode 100644
index 00000000..022e10b8
--- /dev/null
+++ b/sysdeps/mach/hurd/x86_64/librt.abilist
@@ -0,0 +1,35 @@
+GLIBC_2.2.6 aio_cancel F
+GLIBC_2.2.6 aio_cancel64 F
+GLIBC_2.2.6 aio_error F
+GLIBC_2.2.6 aio_error64 F
+GLIBC_2.2.6 aio_fsync F
+GLIBC_2.2.6 aio_fsync64 F
+GLIBC_2.2.6 aio_init F
+GLIBC_2.2.6 aio_read F
+GLIBC_2.2.6 aio_read64 F
+GLIBC_2.2.6 aio_return F
+GLIBC_2.2.6 aio_return64 F
+GLIBC_2.2.6 aio_suspend F
+GLIBC_2.2.6 aio_suspend64 F
+GLIBC_2.2.6 aio_write F
+GLIBC_2.2.6 aio_write64 F
+GLIBC_2.2.6 lio_listio F
+GLIBC_2.2.6 lio_listio64 F
+GLIBC_2.2.6 timer_create F
+GLIBC_2.2.6 timer_delete F
+GLIBC_2.2.6 timer_getoverrun F
+GLIBC_2.2.6 timer_gettime F
+GLIBC_2.2.6 timer_settime F
+GLIBC_2.3.4 mq_close F
+GLIBC_2.3.4 mq_getattr F
+GLIBC_2.3.4 mq_notify F
+GLIBC_2.3.4 mq_open F
+GLIBC_2.3.4 mq_receive F
+GLIBC_2.3.4 mq_send F
+GLIBC_2.3.4 mq_setattr F
+GLIBC_2.3.4 mq_timedreceive F
+GLIBC_2.3.4 mq_timedsend F
+GLIBC_2.3.4 mq_unlink F
+GLIBC_2.4 lio_listio F
+GLIBC_2.4 lio_listio64 F
+GLIBC_2.7 __mq_open_2 F
diff --git a/sysdeps/mach/hurd/x86_64/libutil.abilist b/sysdeps/mach/hurd/x86_64/libutil.abilist
new file mode 100644
index 00000000..0196d40e
--- /dev/null
+++ b/sysdeps/mach/hurd/x86_64/libutil.abilist
@@ -0,0 +1 @@
+GLIBC_2.2.6 __libutil_version_placeholder F
-- 
2.39.2


^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 33/34] hurd: Create abilist files for lib{mach,hurd}user
  2023-03-19 15:10 ` [RFC PATCH glibc 33/34] hurd: Create abilist files for lib{mach,hurd}user Sergey Bugaev
@ 2023-03-19 15:19   ` Samuel Thibault
  2023-03-19 15:39     ` Sergey Bugaev
  0 siblings, 1 reply; 140+ messages in thread
From: Samuel Thibault @ 2023-03-19 15:19 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: libc-alpha, bug-hurd

Hello,

Thanks for this work! :D

I don't have the time now to review the whole series, just a comment
here: we don't really want to introduce abilist for lib{mach,hurd}user
since their content will depend on the mach/hurd version glibc gets
built against.

Samuel

Sergey Bugaev, le dim. 19 mars 2023 18:10:16 +0300, a ecrit:
> It looks like each specific port is supposed to provide abilist files
> for all the built shared objects in its most nested sysdeps directory.
> Do just that for libmachuser and libhurduser.
> 
> This was done by running 'make update-abi' and then moving the generated
> files from sysdeps/mach/ and sysdeps/mach/hurd/ down to
> sysdeps/mach/hurd/i386/, while keeping the base abilist versions empty.
> 
> Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
> ---
>  sysdeps/mach/hurd/i386/libhurduser.abilist | 754 +++++++++++++++++++++
>  sysdeps/mach/hurd/i386/libmachuser.abilist | 336 +++++++++
>  2 files changed, 1090 insertions(+)
>  create mode 100644 sysdeps/mach/hurd/i386/libhurduser.abilist
>  create mode 100644 sysdeps/mach/hurd/i386/libmachuser.abilist
> 
> diff --git a/sysdeps/mach/hurd/i386/libhurduser.abilist b/sysdeps/mach/hurd/i386/libhurduser.abilist
> new file mode 100644
> index 00000000..39bf680b
> --- /dev/null
> +++ b/sysdeps/mach/hurd/i386/libhurduser.abilist
> @@ -0,0 +1,754 @@
> +Base _S_msg_server F
> +Base _S_msg_server_routines D 0x64
> +Base __auth_getids F
> +Base __auth_makeauth F
> +Base __auth_server_authenticate F
> +Base __auth_user_authenticate F
> +Base __crash_dump_task F
> +Base __dir_link F
> +Base __dir_lookup F
> +Base __dir_mkdir F
> +Base __dir_mkfile F
> +Base __dir_notice_changes F
> +Base __dir_readdir F
> +Base __dir_rename F
> +Base __dir_rmdir F
> +Base __dir_unlink F
> +Base __exec_exec F
> +Base __exec_exec_paths F
> +Base __exec_init F
> +Base __exec_setexecdata F
> +Base __exec_startup_get_info F
> +Base __file_chauthor F
> +Base __file_check_access F
> +Base __file_chflags F
> +Base __file_chmod F
> +Base __file_chown F
> +Base __file_exec F
> +Base __file_exec_paths F
> +Base __file_get_fs_options F
> +Base __file_get_storage_info F
> +Base __file_get_translator F
> +Base __file_get_translator_cntl F
> +Base __file_getcontrol F
> +Base __file_getfh F
> +Base __file_getlinknode F
> +Base __file_lock F
> +Base __file_lock_stat F
> +Base __file_notice_changes F
> +Base __file_record_lock F
> +Base __file_reparent F
> +Base __file_set_size F
> +Base __file_set_translator F
> +Base __file_statfs F
> +Base __file_sync F
> +Base __file_syncfs F
> +Base __file_utimens F
> +Base __file_utimes F
> +Base __fsys_forward F
> +Base __fsys_get_children F
> +Base __fsys_get_options F
> +Base __fsys_get_source F
> +Base __fsys_getfile F
> +Base __fsys_getpriv F
> +Base __fsys_getroot F
> +Base __fsys_goaway F
> +Base __fsys_init F
> +Base __fsys_set_options F
> +Base __fsys_startup F
> +Base __fsys_syncfs F
> +Base __gsync_wait_intr F
> +Base __ifsock_getsockaddr F
> +Base __interrupt_operation F
> +Base __io_async F
> +Base __io_async_reply F
> +Base __io_async_request F
> +Base __io_clear_some_openmodes F
> +Base __io_clear_some_openmodes_reply F
> +Base __io_clear_some_openmodes_request F
> +Base __io_duplicate F
> +Base __io_duplicate_reply F
> +Base __io_duplicate_request F
> +Base __io_eofnotify F
> +Base __io_eofnotify_reply F
> +Base __io_eofnotify_request F
> +Base __io_get_conch F
> +Base __io_get_conch_reply F
> +Base __io_get_conch_request F
> +Base __io_get_icky_async_id F
> +Base __io_get_icky_async_id_reply F
> +Base __io_get_icky_async_id_request F
> +Base __io_get_openmodes F
> +Base __io_get_openmodes_reply F
> +Base __io_get_openmodes_request F
> +Base __io_get_owner F
> +Base __io_get_owner_reply F
> +Base __io_get_owner_request F
> +Base __io_identity F
> +Base __io_identity_reply F
> +Base __io_identity_request F
> +Base __io_map F
> +Base __io_map_cntl F
> +Base __io_map_cntl_reply F
> +Base __io_map_cntl_request F
> +Base __io_map_reply F
> +Base __io_map_request F
> +Base __io_mod_owner F
> +Base __io_mod_owner_reply F
> +Base __io_mod_owner_request F
> +Base __io_pathconf F
> +Base __io_pathconf_reply F
> +Base __io_pathconf_request F
> +Base __io_postnotify F
> +Base __io_postnotify_reply F
> +Base __io_postnotify_request F
> +Base __io_prenotify F
> +Base __io_prenotify_reply F
> +Base __io_prenotify_request F
> +Base __io_read F
> +Base __io_read_reply F
> +Base __io_read_request F
> +Base __io_readable F
> +Base __io_readable_reply F
> +Base __io_readable_request F
> +Base __io_readnotify F
> +Base __io_readnotify_reply F
> +Base __io_readnotify_request F
> +Base __io_readsleep F
> +Base __io_readsleep_reply F
> +Base __io_readsleep_request F
> +Base __io_reauthenticate F
> +Base __io_release_conch F
> +Base __io_release_conch_reply F
> +Base __io_release_conch_request F
> +Base __io_restrict_auth F
> +Base __io_restrict_auth_reply F
> +Base __io_restrict_auth_request F
> +Base __io_revoke F
> +Base __io_revoke_reply F
> +Base __io_revoke_request F
> +Base __io_seek F
> +Base __io_seek_reply F
> +Base __io_seek_request F
> +Base __io_select F
> +Base __io_select_reply F
> +Base __io_select_request F
> +Base __io_select_timeout F
> +Base __io_select_timeout_reply F
> +Base __io_select_timeout_request F
> +Base __io_server_version F
> +Base __io_server_version_reply F
> +Base __io_server_version_request F
> +Base __io_set_all_openmodes F
> +Base __io_set_all_openmodes_reply F
> +Base __io_set_all_openmodes_request F
> +Base __io_set_some_openmodes F
> +Base __io_set_some_openmodes_reply F
> +Base __io_set_some_openmodes_request F
> +Base __io_sigio F
> +Base __io_sigio_reply F
> +Base __io_sigio_request F
> +Base __io_stat F
> +Base __io_stat_reply F
> +Base __io_stat_request F
> +Base __io_write F
> +Base __io_write_reply F
> +Base __io_write_request F
> +Base __login_get_idle_time F
> +Base __login_get_input_devices F
> +Base __login_get_location F
> +Base __login_get_login_collection F
> +Base __login_message_user F
> +Base __msg_add_auth F
> +Base __msg_del_auth F
> +Base __msg_describe_ports F
> +Base __msg_get_dtable F
> +Base __msg_get_env_variable F
> +Base __msg_get_environment F
> +Base __msg_get_fd F
> +Base __msg_get_init_int F
> +Base __msg_get_init_ints F
> +Base __msg_get_init_port F
> +Base __msg_get_init_ports F
> +Base __msg_proc_newids F
> +Base __msg_report_wait F
> +Base __msg_set_dtable F
> +Base __msg_set_env_variable F
> +Base __msg_set_environment F
> +Base __msg_set_fd F
> +Base __msg_set_init_int F
> +Base __msg_set_init_ints F
> +Base __msg_set_init_port F
> +Base __msg_set_init_ports F
> +Base __msg_sig_post F
> +Base __msg_sig_post_reply F
> +Base __msg_sig_post_request F
> +Base __msg_sig_post_untraced F
> +Base __msg_sig_post_untraced_reply F
> +Base __msg_sig_post_untraced_request F
> +Base __password_check_group F
> +Base __password_check_user F
> +Base __pci_conf_read F
> +Base __pci_conf_write F
> +Base __pci_get_dev_regions F
> +Base __pci_get_dev_rom F
> +Base __pci_get_ndevs F
> +Base __pfinet_getroutes F
> +Base __pfinet_siocgifconf F
> +Base __proc_child F
> +Base __proc_child_request F
> +Base __proc_dostop F
> +Base __proc_dostop_request F
> +Base __proc_execdata_notify F
> +Base __proc_execdata_notify_request F
> +Base __proc_get_arg_locations F
> +Base __proc_get_arg_locations_request F
> +Base __proc_get_code F
> +Base __proc_get_code_request F
> +Base __proc_get_entry F
> +Base __proc_get_exe F
> +Base __proc_get_tty F
> +Base __proc_get_tty_request F
> +Base __proc_getallpids F
> +Base __proc_getallpids_request F
> +Base __proc_getexecdata F
> +Base __proc_getexecdata_request F
> +Base __proc_getlogin F
> +Base __proc_getlogin_request F
> +Base __proc_getloginid F
> +Base __proc_getloginid_request F
> +Base __proc_getloginpids F
> +Base __proc_getloginpids_request F
> +Base __proc_getmsgport F
> +Base __proc_getmsgport_request F
> +Base __proc_getnports F
> +Base __proc_getnports_request F
> +Base __proc_getpgrp F
> +Base __proc_getpgrp_request F
> +Base __proc_getpgrppids F
> +Base __proc_getpgrppids_request F
> +Base __proc_getpids F
> +Base __proc_getpids_request F
> +Base __proc_getprivports F
> +Base __proc_getprivports_request F
> +Base __proc_getprocargs F
> +Base __proc_getprocargs_request F
> +Base __proc_getprocenv F
> +Base __proc_getprocenv_request F
> +Base __proc_getprocinfo F
> +Base __proc_getprocinfo_request F
> +Base __proc_getsessionpgids F
> +Base __proc_getsessionpgids_request F
> +Base __proc_getsessionpids F
> +Base __proc_getsessionpids_request F
> +Base __proc_getsid F
> +Base __proc_getsid_request F
> +Base __proc_getsidport F
> +Base __proc_getsidport_request F
> +Base __proc_handle_exceptions F
> +Base __proc_handle_exceptions_request F
> +Base __proc_is_important F
> +Base __proc_is_important_request F
> +Base __proc_make_login_coll F
> +Base __proc_make_login_coll_request F
> +Base __proc_make_task_namespace F
> +Base __proc_make_task_namespace_request F
> +Base __proc_mark_cont F
> +Base __proc_mark_cont_request F
> +Base __proc_mark_exec F
> +Base __proc_mark_exec_request F
> +Base __proc_mark_exit F
> +Base __proc_mark_exit_request F
> +Base __proc_mark_important F
> +Base __proc_mark_important_request F
> +Base __proc_mark_stop F
> +Base __proc_mark_stop_request F
> +Base __proc_mark_traced F
> +Base __proc_mark_traced_request F
> +Base __proc_mod_stopchild F
> +Base __proc_mod_stopchild_request F
> +Base __proc_pid2proc F
> +Base __proc_pid2proc_request F
> +Base __proc_pid2task F
> +Base __proc_pid2task_request F
> +Base __proc_proc2task F
> +Base __proc_proc2task_request F
> +Base __proc_reassign F
> +Base __proc_reassign_request F
> +Base __proc_reauthenticate F
> +Base __proc_reauthenticate_complete F
> +Base __proc_reauthenticate_reassign F
> +Base __proc_reauthenticate_request F
> +Base __proc_register_version F
> +Base __proc_register_version_request F
> +Base __proc_set_arg_locations F
> +Base __proc_set_arg_locations_request F
> +Base __proc_set_code F
> +Base __proc_set_code_request F
> +Base __proc_set_entry F
> +Base __proc_set_exe F
> +Base __proc_set_init_task F
> +Base __proc_set_init_task_request F
> +Base __proc_setexecdata F
> +Base __proc_setexecdata_request F
> +Base __proc_setlogin F
> +Base __proc_setlogin_request F
> +Base __proc_setmsgport F
> +Base __proc_setmsgport_request F
> +Base __proc_setowner F
> +Base __proc_setowner_request F
> +Base __proc_setpgrp F
> +Base __proc_setpgrp_request F
> +Base __proc_setsid F
> +Base __proc_setsid_request F
> +Base __proc_task2pid F
> +Base __proc_task2pid_request F
> +Base __proc_task2proc F
> +Base __proc_task2proc_request F
> +Base __proc_uname F
> +Base __proc_uname_request F
> +Base __proc_wait F
> +Base __proc_wait_request F
> +Base __proc_waitid F
> +Base __socket_accept F
> +Base __socket_bind F
> +Base __socket_connect F
> +Base __socket_connect2 F
> +Base __socket_create F
> +Base __socket_create_address F
> +Base __socket_fabricate_address F
> +Base __socket_getopt F
> +Base __socket_listen F
> +Base __socket_name F
> +Base __socket_peername F
> +Base __socket_recv F
> +Base __socket_send F
> +Base __socket_setopt F
> +Base __socket_shutdown F
> +Base __socket_whatis_address F
> +Base __startup_authinit F
> +Base __startup_essential_task F
> +Base __startup_procinit F
> +Base __startup_reboot F
> +Base __startup_request_notification F
> +Base __term_get_bottom_type F
> +Base __term_get_nodename F
> +Base __term_get_peername F
> +Base __term_getctty F
> +Base __term_on_hurddev F
> +Base __term_on_machdev F
> +Base __term_on_pty F
> +Base __term_open_ctty F
> +Base __term_set_filenode F
> +Base __term_set_nodename F
> +Base __termctty_open_terminal F
> +Base __tioctl_tioccbrk F
> +Base __tioctl_tioccdtr F
> +Base __tioctl_tiocdrain F
> +Base __tioctl_tiocexcl F
> +Base __tioctl_tiocext F
> +Base __tioctl_tiocflush F
> +Base __tioctl_tiocgeta F
> +Base __tioctl_tiocgetd F
> +Base __tioctl_tiocgpgrp F
> +Base __tioctl_tiocgwinsz F
> +Base __tioctl_tiocmbic F
> +Base __tioctl_tiocmbis F
> +Base __tioctl_tiocmget F
> +Base __tioctl_tiocmodg F
> +Base __tioctl_tiocmods F
> +Base __tioctl_tiocmset F
> +Base __tioctl_tiocnxcl F
> +Base __tioctl_tiocoutq F
> +Base __tioctl_tiocpkt F
> +Base __tioctl_tiocremote F
> +Base __tioctl_tiocsbrk F
> +Base __tioctl_tiocsdtr F
> +Base __tioctl_tiocseta F
> +Base __tioctl_tiocsetaf F
> +Base __tioctl_tiocsetaw F
> +Base __tioctl_tiocsetd F
> +Base __tioctl_tiocsig F
> +Base __tioctl_tiocspgrp F
> +Base __tioctl_tiocstart F
> +Base __tioctl_tiocsti F
> +Base __tioctl_tiocstop F
> +Base __tioctl_tiocswinsz F
> +Base __tioctl_tiocucntl F
> +Base _hurdsig_fault_exc_server F
> +Base _hurdsig_fault_exc_server_routines D 0x4
> +Base auth_getids F
> +Base auth_makeauth F
> +Base auth_server_authenticate F
> +Base auth_user_authenticate F
> +Base crash_dump_task F
> +Base dir_link F
> +Base dir_lookup F
> +Base dir_mkdir F
> +Base dir_mkfile F
> +Base dir_notice_changes F
> +Base dir_readdir F
> +Base dir_rename F
> +Base dir_rmdir F
> +Base dir_unlink F
> +Base exec_exec F
> +Base exec_exec_paths F
> +Base exec_init F
> +Base exec_setexecdata F
> +Base exec_startup_get_info F
> +Base file_chauthor F
> +Base file_check_access F
> +Base file_chflags F
> +Base file_chmod F
> +Base file_chown F
> +Base file_exec F
> +Base file_exec_paths F
> +Base file_get_fs_options F
> +Base file_get_storage_info F
> +Base file_get_translator F
> +Base file_get_translator_cntl F
> +Base file_getcontrol F
> +Base file_getfh F
> +Base file_getlinknode F
> +Base file_lock F
> +Base file_lock_stat F
> +Base file_notice_changes F
> +Base file_record_lock F
> +Base file_reparent F
> +Base file_set_size F
> +Base file_set_translator F
> +Base file_statfs F
> +Base file_sync F
> +Base file_syncfs F
> +Base file_utimens F
> +Base file_utimes F
> +Base fsys_forward F
> +Base fsys_get_children F
> +Base fsys_get_options F
> +Base fsys_get_source F
> +Base fsys_getfile F
> +Base fsys_getpriv F
> +Base fsys_getroot F
> +Base fsys_goaway F
> +Base fsys_init F
> +Base fsys_set_options F
> +Base fsys_startup F
> +Base fsys_syncfs F
> +Base gsync_wait_intr F
> +Base ifsock_getsockaddr F
> +Base interrupt_operation F
> +Base io_async F
> +Base io_async_reply F
> +Base io_async_request F
> +Base io_clear_some_openmodes F
> +Base io_clear_some_openmodes_reply F
> +Base io_clear_some_openmodes_request F
> +Base io_duplicate F
> +Base io_duplicate_reply F
> +Base io_duplicate_request F
> +Base io_eofnotify F
> +Base io_eofnotify_reply F
> +Base io_eofnotify_request F
> +Base io_get_conch F
> +Base io_get_conch_reply F
> +Base io_get_conch_request F
> +Base io_get_icky_async_id F
> +Base io_get_icky_async_id_reply F
> +Base io_get_icky_async_id_request F
> +Base io_get_openmodes F
> +Base io_get_openmodes_reply F
> +Base io_get_openmodes_request F
> +Base io_get_owner F
> +Base io_get_owner_reply F
> +Base io_get_owner_request F
> +Base io_identity F
> +Base io_identity_reply F
> +Base io_identity_request F
> +Base io_map F
> +Base io_map_cntl F
> +Base io_map_cntl_reply F
> +Base io_map_cntl_request F
> +Base io_map_reply F
> +Base io_map_request F
> +Base io_mod_owner F
> +Base io_mod_owner_reply F
> +Base io_mod_owner_request F
> +Base io_pathconf F
> +Base io_pathconf_reply F
> +Base io_pathconf_request F
> +Base io_postnotify F
> +Base io_postnotify_reply F
> +Base io_postnotify_request F
> +Base io_prenotify F
> +Base io_prenotify_reply F
> +Base io_prenotify_request F
> +Base io_read F
> +Base io_read_reply F
> +Base io_read_request F
> +Base io_readable F
> +Base io_readable_reply F
> +Base io_readable_request F
> +Base io_readnotify F
> +Base io_readnotify_reply F
> +Base io_readnotify_request F
> +Base io_readsleep F
> +Base io_readsleep_reply F
> +Base io_readsleep_request F
> +Base io_reauthenticate F
> +Base io_release_conch F
> +Base io_release_conch_reply F
> +Base io_release_conch_request F
> +Base io_restrict_auth F
> +Base io_restrict_auth_reply F
> +Base io_restrict_auth_request F
> +Base io_revoke F
> +Base io_revoke_reply F
> +Base io_revoke_request F
> +Base io_seek F
> +Base io_seek_reply F
> +Base io_seek_request F
> +Base io_select F
> +Base io_select_reply F
> +Base io_select_request F
> +Base io_select_timeout F
> +Base io_select_timeout_reply F
> +Base io_select_timeout_request F
> +Base io_server_version F
> +Base io_server_version_reply F
> +Base io_server_version_request F
> +Base io_set_all_openmodes F
> +Base io_set_all_openmodes_reply F
> +Base io_set_all_openmodes_request F
> +Base io_set_some_openmodes F
> +Base io_set_some_openmodes_reply F
> +Base io_set_some_openmodes_request F
> +Base io_sigio F
> +Base io_sigio_reply F
> +Base io_sigio_request F
> +Base io_stat F
> +Base io_stat_reply F
> +Base io_stat_request F
> +Base io_write F
> +Base io_write_reply F
> +Base io_write_request F
> +Base login_get_idle_time F
> +Base login_get_input_devices F
> +Base login_get_location F
> +Base login_get_login_collection F
> +Base login_message_user F
> +Base msg_add_auth F
> +Base msg_del_auth F
> +Base msg_describe_ports F
> +Base msg_get_dtable F
> +Base msg_get_env_variable F
> +Base msg_get_environment F
> +Base msg_get_fd F
> +Base msg_get_init_int F
> +Base msg_get_init_ints F
> +Base msg_get_init_port F
> +Base msg_get_init_ports F
> +Base msg_proc_newids F
> +Base msg_report_wait F
> +Base msg_set_dtable F
> +Base msg_set_env_variable F
> +Base msg_set_environment F
> +Base msg_set_fd F
> +Base msg_set_init_int F
> +Base msg_set_init_ints F
> +Base msg_set_init_port F
> +Base msg_set_init_ports F
> +Base msg_sig_post F
> +Base msg_sig_post_reply F
> +Base msg_sig_post_request F
> +Base msg_sig_post_untraced F
> +Base msg_sig_post_untraced_reply F
> +Base msg_sig_post_untraced_request F
> +Base password_check_group F
> +Base password_check_user F
> +Base pci_conf_read F
> +Base pci_conf_write F
> +Base pci_get_dev_regions F
> +Base pci_get_dev_rom F
> +Base pci_get_ndevs F
> +Base pfinet_getroutes F
> +Base pfinet_siocgifconf F
> +Base proc_child F
> +Base proc_child_request F
> +Base proc_dostop F
> +Base proc_dostop_request F
> +Base proc_execdata_notify F
> +Base proc_execdata_notify_request F
> +Base proc_get_arg_locations F
> +Base proc_get_arg_locations_request F
> +Base proc_get_code F
> +Base proc_get_code_request F
> +Base proc_get_entry F
> +Base proc_get_exe F
> +Base proc_get_tty F
> +Base proc_get_tty_request F
> +Base proc_getallpids F
> +Base proc_getallpids_request F
> +Base proc_getexecdata F
> +Base proc_getexecdata_request F
> +Base proc_getlogin F
> +Base proc_getlogin_request F
> +Base proc_getloginid F
> +Base proc_getloginid_request F
> +Base proc_getloginpids F
> +Base proc_getloginpids_request F
> +Base proc_getmsgport F
> +Base proc_getmsgport_request F
> +Base proc_getnports F
> +Base proc_getnports_request F
> +Base proc_getpgrp F
> +Base proc_getpgrp_request F
> +Base proc_getpgrppids F
> +Base proc_getpgrppids_request F
> +Base proc_getpids F
> +Base proc_getpids_request F
> +Base proc_getprivports F
> +Base proc_getprivports_request F
> +Base proc_getprocargs F
> +Base proc_getprocargs_request F
> +Base proc_getprocenv F
> +Base proc_getprocenv_request F
> +Base proc_getprocinfo F
> +Base proc_getprocinfo_request F
> +Base proc_getsessionpgids F
> +Base proc_getsessionpgids_request F
> +Base proc_getsessionpids F
> +Base proc_getsessionpids_request F
> +Base proc_getsid F
> +Base proc_getsid_request F
> +Base proc_getsidport F
> +Base proc_getsidport_request F
> +Base proc_handle_exceptions F
> +Base proc_handle_exceptions_request F
> +Base proc_is_important F
> +Base proc_is_important_request F
> +Base proc_make_login_coll F
> +Base proc_make_login_coll_request F
> +Base proc_make_task_namespace F
> +Base proc_make_task_namespace_request F
> +Base proc_mark_cont F
> +Base proc_mark_cont_request F
> +Base proc_mark_exec F
> +Base proc_mark_exec_request F
> +Base proc_mark_exit F
> +Base proc_mark_exit_request F
> +Base proc_mark_important F
> +Base proc_mark_important_request F
> +Base proc_mark_stop F
> +Base proc_mark_stop_request F
> +Base proc_mark_traced F
> +Base proc_mark_traced_request F
> +Base proc_mod_stopchild F
> +Base proc_mod_stopchild_request F
> +Base proc_pid2proc F
> +Base proc_pid2proc_request F
> +Base proc_pid2task F
> +Base proc_pid2task_request F
> +Base proc_proc2task F
> +Base proc_proc2task_request F
> +Base proc_reassign F
> +Base proc_reassign_request F
> +Base proc_reauthenticate F
> +Base proc_reauthenticate_complete F
> +Base proc_reauthenticate_reassign F
> +Base proc_reauthenticate_request F
> +Base proc_register_version F
> +Base proc_register_version_request F
> +Base proc_set_arg_locations F
> +Base proc_set_arg_locations_request F
> +Base proc_set_code F
> +Base proc_set_code_request F
> +Base proc_set_entry F
> +Base proc_set_exe F
> +Base proc_set_init_task F
> +Base proc_set_init_task_request F
> +Base proc_setexecdata F
> +Base proc_setexecdata_request F
> +Base proc_setlogin F
> +Base proc_setlogin_request F
> +Base proc_setmsgport F
> +Base proc_setmsgport_request F
> +Base proc_setowner F
> +Base proc_setowner_request F
> +Base proc_setpgrp F
> +Base proc_setpgrp_request F
> +Base proc_setsid F
> +Base proc_setsid_request F
> +Base proc_task2pid F
> +Base proc_task2pid_request F
> +Base proc_task2proc F
> +Base proc_task2proc_request F
> +Base proc_uname F
> +Base proc_uname_request F
> +Base proc_wait F
> +Base proc_wait_request F
> +Base proc_waitid F
> +Base socket_accept F
> +Base socket_bind F
> +Base socket_connect F
> +Base socket_connect2 F
> +Base socket_create F
> +Base socket_create_address F
> +Base socket_fabricate_address F
> +Base socket_getopt F
> +Base socket_listen F
> +Base socket_name F
> +Base socket_peername F
> +Base socket_recv F
> +Base socket_send F
> +Base socket_setopt F
> +Base socket_shutdown F
> +Base socket_whatis_address F
> +Base startup_authinit F
> +Base startup_essential_task F
> +Base startup_procinit F
> +Base startup_reboot F
> +Base startup_request_notification F
> +Base term_get_bottom_type F
> +Base term_get_nodename F
> +Base term_get_peername F
> +Base term_getctty F
> +Base term_on_hurddev F
> +Base term_on_machdev F
> +Base term_on_pty F
> +Base term_open_ctty F
> +Base term_set_filenode F
> +Base term_set_nodename F
> +Base termctty_open_terminal F
> +Base tioctl_tioccbrk F
> +Base tioctl_tioccdtr F
> +Base tioctl_tiocdrain F
> +Base tioctl_tiocexcl F
> +Base tioctl_tiocext F
> +Base tioctl_tiocflush F
> +Base tioctl_tiocgeta F
> +Base tioctl_tiocgetd F
> +Base tioctl_tiocgpgrp F
> +Base tioctl_tiocgwinsz F
> +Base tioctl_tiocmbic F
> +Base tioctl_tiocmbis F
> +Base tioctl_tiocmget F
> +Base tioctl_tiocmodg F
> +Base tioctl_tiocmods F
> +Base tioctl_tiocmset F
> +Base tioctl_tiocnxcl F
> +Base tioctl_tiocoutq F
> +Base tioctl_tiocpkt F
> +Base tioctl_tiocremote F
> +Base tioctl_tiocsbrk F
> +Base tioctl_tiocsdtr F
> +Base tioctl_tiocseta F
> +Base tioctl_tiocsetaf F
> +Base tioctl_tiocsetaw F
> +Base tioctl_tiocsetd F
> +Base tioctl_tiocsig F
> +Base tioctl_tiocspgrp F
> +Base tioctl_tiocstart F
> +Base tioctl_tiocsti F
> +Base tioctl_tiocstop F
> +Base tioctl_tiocswinsz F
> +Base tioctl_tiocucntl F
> diff --git a/sysdeps/mach/hurd/i386/libmachuser.abilist b/sysdeps/mach/hurd/i386/libmachuser.abilist
> new file mode 100644
> index 00000000..49ee5924
> --- /dev/null
> +++ b/sysdeps/mach/hurd/i386/libmachuser.abilist
> @@ -0,0 +1,336 @@
> +Base _S_exc_server F
> +Base _S_exc_server_routines D 0x4
> +Base __default_pager_info F
> +Base __default_pager_object_create F
> +Base __default_pager_object_pages F
> +Base __default_pager_objects F
> +Base __default_pager_paging_file F
> +Base __default_pager_register_fileserver F
> +Base __device_close F
> +Base __device_get_status F
> +Base __device_intr_ack F
> +Base __device_intr_register F
> +Base __device_map F
> +Base __device_open F
> +Base __device_open_request F
> +Base __device_read F
> +Base __device_read_inband F
> +Base __device_read_request F
> +Base __device_read_request_inband F
> +Base __device_set_filter F
> +Base __device_set_status F
> +Base __device_write F
> +Base __device_write_inband F
> +Base __device_write_request F
> +Base __device_write_request_inband F
> +Base __exception_raise F
> +Base __gsync_requeue F
> +Base __gsync_wait F
> +Base __gsync_wake F
> +Base __host_adjust_time F
> +Base __host_adjust_time64 F
> +Base __host_get_boot_info F
> +Base __host_get_time F
> +Base __host_get_time64 F
> +Base __host_info F
> +Base __host_kernel_version F
> +Base __host_processor_set_priv F
> +Base __host_processor_sets F
> +Base __host_processors F
> +Base __host_reboot F
> +Base __host_set_time F
> +Base __host_set_time64 F
> +Base __i386_get_gdt F
> +Base __i386_get_ldt F
> +Base __i386_io_perm_create F
> +Base __i386_io_perm_modify F
> +Base __i386_set_gdt F
> +Base __i386_set_ldt F
> +Base __mach_notify_new_task F
> +Base __mach_port_allocate_name_rpc F
> +Base __mach_port_allocate_rpc F
> +Base __mach_port_clear_protected_payload F
> +Base __mach_port_deallocate_rpc F
> +Base __mach_port_destroy F
> +Base __mach_port_extract_right F
> +Base __mach_port_get_receive_status F
> +Base __mach_port_get_refs F
> +Base __mach_port_get_set_status F
> +Base __mach_port_insert_right_rpc F
> +Base __mach_port_mod_refs F
> +Base __mach_port_move_member F
> +Base __mach_port_names F
> +Base __mach_port_rename F
> +Base __mach_port_request_notification F
> +Base __mach_port_set_mscount F
> +Base __mach_port_set_protected_payload F
> +Base __mach_port_set_qlimit F
> +Base __mach_port_set_seqno F
> +Base __mach_port_type F
> +Base __mach_ports_lookup F
> +Base __mach_ports_register F
> +Base __memory_object_change_attributes F
> +Base __memory_object_change_completed F
> +Base __memory_object_copy F
> +Base __memory_object_create F
> +Base __memory_object_create_proxy F
> +Base __memory_object_data_error F
> +Base __memory_object_data_initialize F
> +Base __memory_object_data_request F
> +Base __memory_object_data_return F
> +Base __memory_object_data_supply F
> +Base __memory_object_data_unavailable F
> +Base __memory_object_data_unlock F
> +Base __memory_object_destroy F
> +Base __memory_object_get_attributes F
> +Base __memory_object_init F
> +Base __memory_object_lock_completed F
> +Base __memory_object_lock_request F
> +Base __memory_object_ready F
> +Base __memory_object_supply_completed F
> +Base __memory_object_terminate F
> +Base __processor_assign F
> +Base __processor_control F
> +Base __processor_exit F
> +Base __processor_get_assignment F
> +Base __processor_info F
> +Base __processor_set_create F
> +Base __processor_set_default F
> +Base __processor_set_destroy F
> +Base __processor_set_info F
> +Base __processor_set_max_priority F
> +Base __processor_set_policy_disable F
> +Base __processor_set_policy_enable F
> +Base __processor_set_tasks F
> +Base __processor_set_threads F
> +Base __processor_start F
> +Base __register_new_task_notification F
> +Base __task_assign F
> +Base __task_assign_default F
> +Base __task_create_rpc F
> +Base __task_disable_pc_sampling F
> +Base __task_enable_pc_sampling F
> +Base __task_get_assignment F
> +Base __task_get_emulation_vector F
> +Base __task_get_sampled_pcs F
> +Base __task_get_special_port F
> +Base __task_info F
> +Base __task_priority F
> +Base __task_ras_control F
> +Base __task_resume F
> +Base __task_set_emulation F
> +Base __task_set_emulation_vector F
> +Base __task_set_essential F
> +Base __task_set_name F
> +Base __task_set_special_port_rpc F
> +Base __task_suspend_rpc F
> +Base __task_terminate_rpc F
> +Base __task_threads F
> +Base __thread_abort F
> +Base __thread_assign F
> +Base __thread_assign_default F
> +Base __thread_create F
> +Base __thread_depress_abort_rpc F
> +Base __thread_disable_pc_sampling F
> +Base __thread_enable_pc_sampling F
> +Base __thread_get_assignment F
> +Base __thread_get_sampled_pcs F
> +Base __thread_get_special_port F
> +Base __thread_get_state F
> +Base __thread_info F
> +Base __thread_max_priority F
> +Base __thread_policy F
> +Base __thread_priority F
> +Base __thread_resume F
> +Base __thread_set_special_port F
> +Base __thread_set_state F
> +Base __thread_suspend F
> +Base __thread_terminate F
> +Base __thread_terminate_release F
> +Base __thread_wire F
> +Base __vm_allocate_contiguous F
> +Base __vm_allocate_rpc F
> +Base __vm_cache_statistics F
> +Base __vm_copy F
> +Base __vm_deallocate_rpc F
> +Base __vm_inherit F
> +Base __vm_machine_attribute F
> +Base __vm_map_rpc F
> +Base __vm_msync F
> +Base __vm_object_sync F
> +Base __vm_protect F
> +Base __vm_read F
> +Base __vm_region F
> +Base __vm_region_create_proxy F
> +Base __vm_set_default_memory_manager F
> +Base __vm_statistics F
> +Base __vm_wire F
> +Base __vm_wire_all F
> +Base __vm_write F
> +Base default_pager_info F
> +Base default_pager_object_create F
> +Base default_pager_object_pages F
> +Base default_pager_objects F
> +Base default_pager_paging_file F
> +Base default_pager_register_fileserver F
> +Base device_close F
> +Base device_get_status F
> +Base device_intr_ack F
> +Base device_intr_register F
> +Base device_map F
> +Base device_open F
> +Base device_open_request F
> +Base device_read F
> +Base device_read_inband F
> +Base device_read_request F
> +Base device_read_request_inband F
> +Base device_set_filter F
> +Base device_set_status F
> +Base device_write F
> +Base device_write_inband F
> +Base device_write_request F
> +Base device_write_request_inband F
> +Base exception_raise F
> +Base gsync_requeue F
> +Base gsync_wait F
> +Base gsync_wake F
> +Base host_adjust_time F
> +Base host_adjust_time64 F
> +Base host_get_boot_info F
> +Base host_get_time F
> +Base host_get_time64 F
> +Base host_info F
> +Base host_kernel_version F
> +Base host_processor_set_priv F
> +Base host_processor_sets F
> +Base host_processors F
> +Base host_reboot F
> +Base host_set_time F
> +Base host_set_time64 F
> +Base i386_get_gdt F
> +Base i386_get_ldt F
> +Base i386_io_perm_create F
> +Base i386_io_perm_modify F
> +Base i386_set_gdt F
> +Base i386_set_ldt F
> +Base mach_notify_new_task F
> +Base mach_port_allocate_name_rpc F
> +Base mach_port_allocate_rpc F
> +Base mach_port_clear_protected_payload F
> +Base mach_port_deallocate_rpc F
> +Base mach_port_destroy F
> +Base mach_port_extract_right F
> +Base mach_port_get_receive_status F
> +Base mach_port_get_refs F
> +Base mach_port_get_set_status F
> +Base mach_port_insert_right_rpc F
> +Base mach_port_mod_refs F
> +Base mach_port_move_member F
> +Base mach_port_names F
> +Base mach_port_rename F
> +Base mach_port_request_notification F
> +Base mach_port_set_mscount F
> +Base mach_port_set_protected_payload F
> +Base mach_port_set_qlimit F
> +Base mach_port_set_seqno F
> +Base mach_port_type F
> +Base mach_ports_lookup F
> +Base mach_ports_register F
> +Base memory_object_change_attributes F
> +Base memory_object_change_completed F
> +Base memory_object_copy F
> +Base memory_object_create F
> +Base memory_object_create_proxy F
> +Base memory_object_data_error F
> +Base memory_object_data_initialize F
> +Base memory_object_data_request F
> +Base memory_object_data_return F
> +Base memory_object_data_supply F
> +Base memory_object_data_unavailable F
> +Base memory_object_data_unlock F
> +Base memory_object_destroy F
> +Base memory_object_get_attributes F
> +Base memory_object_init F
> +Base memory_object_lock_completed F
> +Base memory_object_lock_request F
> +Base memory_object_ready F
> +Base memory_object_supply_completed F
> +Base memory_object_terminate F
> +Base processor_assign F
> +Base processor_control F
> +Base processor_exit F
> +Base processor_get_assignment F
> +Base processor_info F
> +Base processor_set_create F
> +Base processor_set_default F
> +Base processor_set_destroy F
> +Base processor_set_info F
> +Base processor_set_max_priority F
> +Base processor_set_policy_disable F
> +Base processor_set_policy_enable F
> +Base processor_set_tasks F
> +Base processor_set_threads F
> +Base processor_start F
> +Base register_new_task_notification F
> +Base task_assign F
> +Base task_assign_default F
> +Base task_create_rpc F
> +Base task_disable_pc_sampling F
> +Base task_enable_pc_sampling F
> +Base task_get_assignment F
> +Base task_get_emulation_vector F
> +Base task_get_sampled_pcs F
> +Base task_get_special_port F
> +Base task_info F
> +Base task_priority F
> +Base task_ras_control F
> +Base task_resume F
> +Base task_set_emulation F
> +Base task_set_emulation_vector F
> +Base task_set_essential F
> +Base task_set_name F
> +Base task_set_special_port_rpc F
> +Base task_suspend_rpc F
> +Base task_terminate_rpc F
> +Base task_threads F
> +Base thread_abort F
> +Base thread_assign F
> +Base thread_assign_default F
> +Base thread_create F
> +Base thread_depress_abort_rpc F
> +Base thread_disable_pc_sampling F
> +Base thread_enable_pc_sampling F
> +Base thread_get_assignment F
> +Base thread_get_sampled_pcs F
> +Base thread_get_special_port F
> +Base thread_get_state F
> +Base thread_info F
> +Base thread_max_priority F
> +Base thread_policy F
> +Base thread_priority F
> +Base thread_resume F
> +Base thread_set_special_port F
> +Base thread_set_state F
> +Base thread_suspend F
> +Base thread_terminate F
> +Base thread_terminate_release F
> +Base thread_wire F
> +Base vm_allocate_contiguous F
> +Base vm_allocate_rpc F
> +Base vm_cache_statistics F
> +Base vm_copy F
> +Base vm_deallocate_rpc F
> +Base vm_inherit F
> +Base vm_machine_attribute F
> +Base vm_map_rpc F
> +Base vm_msync F
> +Base vm_object_sync F
> +Base vm_protect F
> +Base vm_read F
> +Base vm_region F
> +Base vm_region_create_proxy F
> +Base vm_set_default_memory_manager F
> +Base vm_statistics F
> +Base vm_wire F
> +Base vm_wire_all F
> +Base vm_write F
> -- 
> 2.39.2
> 

-- 
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 33/34] hurd: Create abilist files for lib{mach,hurd}user
  2023-03-19 15:19   ` Samuel Thibault
@ 2023-03-19 15:39     ` Sergey Bugaev
  2023-03-19 15:43       ` Samuel Thibault
  0 siblings, 1 reply; 140+ messages in thread
From: Sergey Bugaev @ 2023-03-19 15:39 UTC (permalink / raw)
  To: Samuel Thibault; +Cc: libc-alpha, bug-hurd

On Sun, Mar 19, 2023 at 6:19 PM Samuel Thibault <samuel.thibault@gnu.org> wrote:
>
> Hello,
>
> Thanks for this work! :D

Yay! Can you believe just how glad I am to finally have completed it :D

> I don't have the time now to review the whole series, just a comment
> here: we don't really want to introduce abilist for lib{mach,hurd}user
> since their content will depend on the mach/hurd version glibc gets
> built against.

But isn't accidental ABI breakage (or unintended ABI additions)
exactly what the abilist mechanism is designed to guard against? It
doesn't even break your build (unlike -Werror) -- it's more of a lint.

You *would* want to know if your libhurduser.so build suddenly doesn't
include, say, proc_pid2task, because user code links to
lib{mach,hurd}user (via the libc.so linker script) and uses those
symbols, and would break if the symbols were to disappear.

No?

Well in any case, the abilists aren't essential. Freel free to drop
this commit (and remove lib{mach,hurd}user.abilist from the next one)
if that was the wrong call.

Sergey

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 33/34] hurd: Create abilist files for lib{mach,hurd}user
  2023-03-19 15:39     ` Sergey Bugaev
@ 2023-03-19 15:43       ` Samuel Thibault
  0 siblings, 0 replies; 140+ messages in thread
From: Samuel Thibault @ 2023-03-19 15:43 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: libc-alpha, bug-hurd

Sergey Bugaev, le dim. 19 mars 2023 18:39:20 +0300, a ecrit:
> Yay! Can you believe just how glad I am to finally have completed it :D

I think I do :)

> > I don't have the time now to review the whole series, just a comment
> > here: we don't really want to introduce abilist for lib{mach,hurd}user
> > since their content will depend on the mach/hurd version glibc gets
> > built against.
> 
> But isn't accidental ABI breakage (or unintended ABI additions)
> exactly what the abilist mechanism is designed to guard against?

Yes, but glibc is not responsible for ABI breakage of hurd and mach
interfaces, so it's not really responsible for testing them.

> It doesn't even break your build (unlike -Werror) -- it's more of a
> lint.

? I believe it does?

> Well in any case, the abilists aren't essential. Freel free to drop
> this commit (and remove lib{mach,hurd}user.abilist from the next one)
> if that was the wrong call.

Sure!

Samuel

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH 00/34] The rest of the x86_64-gnu port
  2023-03-19 15:09 [RFC PATCH 00/34] The rest of the x86_64-gnu port Sergey Bugaev
                   ` (33 preceding siblings ...)
  2023-03-19 15:10 ` [RFC PATCH glibc 34/34] hurd: Add expected abilist files for x86_64 Sergey Bugaev
@ 2023-03-19 16:44 ` Luca
  2023-03-20  5:03   ` Flávio Cruz
  2023-04-02 23:30 ` Samuel Thibault
  2023-04-10 19:20 ` Samuel Thibault
  36 siblings, 1 reply; 140+ messages in thread
From: Luca @ 2023-03-19 16:44 UTC (permalink / raw)
  To: Sergey Bugaev, libc-alpha, bug-hurd; +Cc: Samuel Thibault

Hi Sergey,

this looks like a great work!

Il 19/03/23 16:09, Sergey Bugaev ha scritto:
> I was unable to actually get it running on GNU Mach. It either never gets
> started, or crashes soon enough. The latter is actually to be expected, since
> the kernel does not actually support i386_fsgs_base_state yet. I was unable
> to investigate what exactly happens, because in addition to the troubles with
> actually running GNU Mach on qemu-system-x86_64 (-kernel doesn't work..., you
> really have to build an image with GRUB) and attaching a debugger to it
> (either GDB or QEMU get utterly confused be the switch to the long mode...),
> I had troubles with actually spawning the task while breaking on its first
> instruction (a la starti). In particular prompt-task-resume didn't seem to
> work for me, nor did breaking somewhere before the task should have been
> resumed.
> 
> So I would appreciate some help with both testing this patchset (i.e. if you
> do have a working x86_64 Mach + userspace setup, build glibc and try to run
> it), and some general tips about how I would go about debugging the bootstrap
> task from the first instruction onwards with x86_64 GNU Mach, QEMU, and GDB.

One reason for troubles in testing with gnumach is that rpc don't work 
very well yet... Simple syscalls should work if you take my patch with 
syscall64 v3, and also some simple rpcs, but in general I still see some 
issues with the 64-bit message format and the mig-generated stubs. I 
still have most of my tests failing with a 64-bit userspace.

That being said, once we have fully working rpcs, I think you could have 
a "hello-static-glibc" bootstrap module, and assemble a grub rescue disk 
to test it on gnumach, much like my "hello" test. For this you could 
also take the commit [0] and add your bootstrap module manually, to 
reuse the grub disk generation part. Once this works, you should be able 
to build ext2fs.static, exec.static and run a "hello-dynamic-glibc" test 
by replacing /hurd/startup, which is the first dynamically-linked 
executable started. For this case creating a minimal bootable disk is a 
bit more tricky, I did it once and I should have some scripts that could 
be reused.

In your case you probably need to build a cross-compiler targeting 
hurd64, maybe with Flavio's scripts (in my tests I use the 
-ffreestanding environment so I can compile them on GNU/Linux). I'm not 
sure how this could be optimized for iterative development.

About debugging, the nice thing is that you can load the debug symbols 
of the bootstrap module in the same gdb remote session used to debug 
gnumach, with:

   add-symbol-file <your-path>/module-hello-static-glibc

and you can single-step, use breakpoints etc. on both the user and 
kernel code. For example, you can set a breakpoint on the user entry 
point _start() and single-step from there.

Also, when you attach gdb to qemu, you should avoid setting a breakpoint 
too early, but anything after setup_main() should be ok. So if you want 
to set a breakpoint on _start(), I suggest you do it after reaching 
setup_main(), otherwise it will also stop on gnumach's own _start(), and 
that will indeed mess up with segmentation and long mode.

I hope this helps,

Luca

[0] 
https://gitlab.com/luckyd/gnumach/-/commit/cb00d39edc6604cfb485161e85720e23f167d819

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 34/34] hurd: Add expected abilist files for x86_64
  2023-03-19 15:10 ` [RFC PATCH glibc 34/34] hurd: Add expected abilist files for x86_64 Sergey Bugaev
@ 2023-03-19 18:04   ` Florian Weimer
  2023-03-19 20:14     ` [PATCH v2] " Sergey Bugaev
  0 siblings, 1 reply; 140+ messages in thread
From: Florian Weimer @ 2023-03-19 18:04 UTC (permalink / raw)
  To: Sergey Bugaev via Libc-alpha; +Cc: bug-hurd, Sergey Bugaev, Samuel Thibault

* Sergey Bugaev via Libc-alpha:

> +GLIBC_2.2.6 __rpc_thread_createerr F
> +GLIBC_2.2.6 __rpc_thread_svc_fdset F
> +GLIBC_2.2.6 __rpc_thread_svc_max_pollfd F
> +GLIBC_2.2.6 __rpc_thread_svc_pollfd F

You should consider creating a shlib-versions file with a baseline of
2.38, so that the obsolete Sun RPC symbols (and many others) are not
compiled in.

^ permalink raw reply	[flat|nested] 140+ messages in thread

* [PATCH v2] hurd: Add expected abilist files for x86_64
  2023-03-19 18:04   ` Florian Weimer
@ 2023-03-19 20:14     ` Sergey Bugaev
  2023-03-20  6:30       ` Florian Weimer
  0 siblings, 1 reply; 140+ messages in thread
From: Sergey Bugaev @ 2023-03-19 20:14 UTC (permalink / raw)
  To: Florian Weimer, bug-hurd, libc-alpha; +Cc: Samuel Thibault, Sergey Bugaev

On Sun, Mar 19, 2023 at 9:05 PM Florian Weimer <fw@deneb.enyo.de> wrote:
> You should consider creating a shlib-versions file with a baseline of
> 2.38, so that the obsolete Sun RPC symbols (and many others) are not
> compiled in.

So *that's* how it's done! Thank you.

Does the below look reasonable? I've dropped lib{mach,hurd}user, and it seems
libanl, libnsl, libutil are all gone.

Sergey

-- >8 --

These were created by creating stub files, running 'make update-abi',
and reviewing the results.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
---
 sysdeps/mach/hurd/x86_64/shlib-versions       |    1 +
 sysdeps/mach/hurd/x86_64/ld.abilist           |   17 +
 .../mach/hurd/x86_64/libBrokenLocale.abilist  |    1 +
 sysdeps/mach/hurd/x86_64/libc.abilist         | 2120 +++++++++++++++++
 .../hurd/x86_64/libc_malloc_debug.abilist     |   26 +
 sysdeps/mach/hurd/x86_64/libcrypt.abilist     |    2 +
 sysdeps/mach/hurd/x86_64/libdl.abilist        |    0
 sysdeps/mach/hurd/x86_64/libm.abilist         | 1040 ++++++++
 sysdeps/mach/hurd/x86_64/libmvec.abilist      |  216 ++
 sysdeps/mach/hurd/x86_64/libpthread.abilist   |  177 ++
 sysdeps/mach/hurd/x86_64/libresolv.abilist    |   55 +
 sysdeps/mach/hurd/x86_64/librt.abilist        |   33 +
 12 files changed, 3688 insertions(+)
 create mode 100644 sysdeps/mach/hurd/x86_64/shlib-versions
 create mode 100644 sysdeps/mach/hurd/x86_64/ld.abilist
 create mode 100644 sysdeps/mach/hurd/x86_64/libBrokenLocale.abilist
 create mode 100644 sysdeps/mach/hurd/x86_64/libc.abilist
 create mode 100644 sysdeps/mach/hurd/x86_64/libc_malloc_debug.abilist
 create mode 100644 sysdeps/mach/hurd/x86_64/libcrypt.abilist
 create mode 100644 sysdeps/mach/hurd/x86_64/libdl.abilist
 create mode 100644 sysdeps/mach/hurd/x86_64/libm.abilist
 create mode 100644 sysdeps/mach/hurd/x86_64/libmvec.abilist
 create mode 100644 sysdeps/mach/hurd/x86_64/libpthread.abilist
 create mode 100644 sysdeps/mach/hurd/x86_64/libresolv.abilist
 create mode 100644 sysdeps/mach/hurd/x86_64/librt.abilist

diff --git a/sysdeps/mach/hurd/x86_64/shlib-versions b/sysdeps/mach/hurd/x86_64/shlib-versions
new file mode 100644
index 00000000..fddbc1e3
--- /dev/null
+++ b/sysdeps/mach/hurd/x86_64/shlib-versions
@@ -0,0 +1 @@
+DEFAULT			GLIBC_2.38
diff --git a/sysdeps/mach/hurd/x86_64/ld.abilist b/sysdeps/mach/hurd/x86_64/ld.abilist
new file mode 100644
index 00000000..2297a5f3
--- /dev/null
+++ b/sysdeps/mach/hurd/x86_64/ld.abilist
@@ -0,0 +1,17 @@
+GLIBC_2.38 __close F
+GLIBC_2.38 __errno_location F
+GLIBC_2.38 __getpid F
+GLIBC_2.38 __libc_stack_end D 0x8
+GLIBC_2.38 __mmap F
+GLIBC_2.38 __open F
+GLIBC_2.38 __open64 F
+GLIBC_2.38 __pread64 F
+GLIBC_2.38 __read F
+GLIBC_2.38 __sbrk F
+GLIBC_2.38 __tls_get_addr F
+GLIBC_2.38 __write F
+GLIBC_2.38 __writev F
+GLIBC_2.38 _dl_mcount F
+GLIBC_2.38 _hurd_intr_rpc_mach_msg F
+GLIBC_2.38 _r_debug D 0x28
+GLIBC_2.38 abort F
diff --git a/sysdeps/mach/hurd/x86_64/libBrokenLocale.abilist b/sysdeps/mach/hurd/x86_64/libBrokenLocale.abilist
new file mode 100644
index 00000000..203836f5
--- /dev/null
+++ b/sysdeps/mach/hurd/x86_64/libBrokenLocale.abilist
@@ -0,0 +1 @@
+GLIBC_2.38 __ctype_get_mb_cur_max F
diff --git a/sysdeps/mach/hurd/x86_64/libc.abilist b/sysdeps/mach/hurd/x86_64/libc.abilist
new file mode 100644
index 00000000..75501727
--- /dev/null
+++ b/sysdeps/mach/hurd/x86_64/libc.abilist
@@ -0,0 +1,2120 @@
+GLIBC_2.38 _Exit F
+GLIBC_2.38 _Fork F
+GLIBC_2.38 _IO_2_1_stderr_ D 0xe0
+GLIBC_2.38 _IO_2_1_stdin_ D 0xe0
+GLIBC_2.38 _IO_2_1_stdout_ D 0xe0
+GLIBC_2.38 _IO_adjust_column F
+GLIBC_2.38 _IO_adjust_wcolumn F
+GLIBC_2.38 _IO_default_doallocate F
+GLIBC_2.38 _IO_default_finish F
+GLIBC_2.38 _IO_default_pbackfail F
+GLIBC_2.38 _IO_default_uflow F
+GLIBC_2.38 _IO_default_xsgetn F
+GLIBC_2.38 _IO_default_xsputn F
+GLIBC_2.38 _IO_do_write F
+GLIBC_2.38 _IO_doallocbuf F
+GLIBC_2.38 _IO_fclose F
+GLIBC_2.38 _IO_fdopen F
+GLIBC_2.38 _IO_feof F
+GLIBC_2.38 _IO_ferror F
+GLIBC_2.38 _IO_fflush F
+GLIBC_2.38 _IO_fgetpos F
+GLIBC_2.38 _IO_fgetpos64 F
+GLIBC_2.38 _IO_fgets F
+GLIBC_2.38 _IO_file_attach F
+GLIBC_2.38 _IO_file_close F
+GLIBC_2.38 _IO_file_close_it F
+GLIBC_2.38 _IO_file_doallocate F
+GLIBC_2.38 _IO_file_finish F
+GLIBC_2.38 _IO_file_fopen F
+GLIBC_2.38 _IO_file_init F
+GLIBC_2.38 _IO_file_jumps D 0xa8
+GLIBC_2.38 _IO_file_open F
+GLIBC_2.38 _IO_file_overflow F
+GLIBC_2.38 _IO_file_read F
+GLIBC_2.38 _IO_file_seek F
+GLIBC_2.38 _IO_file_seekoff F
+GLIBC_2.38 _IO_file_setbuf F
+GLIBC_2.38 _IO_file_stat F
+GLIBC_2.38 _IO_file_sync F
+GLIBC_2.38 _IO_file_underflow F
+GLIBC_2.38 _IO_file_write F
+GLIBC_2.38 _IO_file_xsputn F
+GLIBC_2.38 _IO_flockfile F
+GLIBC_2.38 _IO_flush_all F
+GLIBC_2.38 _IO_flush_all_linebuffered F
+GLIBC_2.38 _IO_fopen F
+GLIBC_2.38 _IO_fprintf F
+GLIBC_2.38 _IO_fputs F
+GLIBC_2.38 _IO_fread F
+GLIBC_2.38 _IO_free_backup_area F
+GLIBC_2.38 _IO_free_wbackup_area F
+GLIBC_2.38 _IO_fsetpos F
+GLIBC_2.38 _IO_fsetpos64 F
+GLIBC_2.38 _IO_ftell F
+GLIBC_2.38 _IO_ftrylockfile F
+GLIBC_2.38 _IO_funlockfile F
+GLIBC_2.38 _IO_fwrite F
+GLIBC_2.38 _IO_getc F
+GLIBC_2.38 _IO_getline F
+GLIBC_2.38 _IO_getline_info F
+GLIBC_2.38 _IO_gets F
+GLIBC_2.38 _IO_init F
+GLIBC_2.38 _IO_init_marker F
+GLIBC_2.38 _IO_init_wmarker F
+GLIBC_2.38 _IO_iter_begin F
+GLIBC_2.38 _IO_iter_end F
+GLIBC_2.38 _IO_iter_file F
+GLIBC_2.38 _IO_iter_next F
+GLIBC_2.38 _IO_least_wmarker F
+GLIBC_2.38 _IO_link_in F
+GLIBC_2.38 _IO_list_all D 0x8
+GLIBC_2.38 _IO_list_lock F
+GLIBC_2.38 _IO_list_resetlock F
+GLIBC_2.38 _IO_list_unlock F
+GLIBC_2.38 _IO_marker_delta F
+GLIBC_2.38 _IO_marker_difference F
+GLIBC_2.38 _IO_padn F
+GLIBC_2.38 _IO_peekc_locked F
+GLIBC_2.38 _IO_popen F
+GLIBC_2.38 _IO_printf F
+GLIBC_2.38 _IO_proc_close F
+GLIBC_2.38 _IO_proc_open F
+GLIBC_2.38 _IO_putc F
+GLIBC_2.38 _IO_puts F
+GLIBC_2.38 _IO_remove_marker F
+GLIBC_2.38 _IO_seekmark F
+GLIBC_2.38 _IO_seekoff F
+GLIBC_2.38 _IO_seekpos F
+GLIBC_2.38 _IO_seekwmark F
+GLIBC_2.38 _IO_setb F
+GLIBC_2.38 _IO_setbuffer F
+GLIBC_2.38 _IO_setvbuf F
+GLIBC_2.38 _IO_sgetn F
+GLIBC_2.38 _IO_sprintf F
+GLIBC_2.38 _IO_sputbackc F
+GLIBC_2.38 _IO_sputbackwc F
+GLIBC_2.38 _IO_sscanf F
+GLIBC_2.38 _IO_str_init_readonly F
+GLIBC_2.38 _IO_str_init_static F
+GLIBC_2.38 _IO_str_overflow F
+GLIBC_2.38 _IO_str_pbackfail F
+GLIBC_2.38 _IO_str_seekoff F
+GLIBC_2.38 _IO_str_underflow F
+GLIBC_2.38 _IO_sungetc F
+GLIBC_2.38 _IO_sungetwc F
+GLIBC_2.38 _IO_switch_to_get_mode F
+GLIBC_2.38 _IO_switch_to_main_wget_area F
+GLIBC_2.38 _IO_switch_to_wbackup_area F
+GLIBC_2.38 _IO_switch_to_wget_mode F
+GLIBC_2.38 _IO_un_link F
+GLIBC_2.38 _IO_ungetc F
+GLIBC_2.38 _IO_unsave_markers F
+GLIBC_2.38 _IO_unsave_wmarkers F
+GLIBC_2.38 _IO_vfprintf F
+GLIBC_2.38 _IO_vsprintf F
+GLIBC_2.38 _IO_wdefault_doallocate F
+GLIBC_2.38 _IO_wdefault_finish F
+GLIBC_2.38 _IO_wdefault_pbackfail F
+GLIBC_2.38 _IO_wdefault_uflow F
+GLIBC_2.38 _IO_wdefault_xsgetn F
+GLIBC_2.38 _IO_wdefault_xsputn F
+GLIBC_2.38 _IO_wdo_write F
+GLIBC_2.38 _IO_wdoallocbuf F
+GLIBC_2.38 _IO_wfile_jumps D 0xa8
+GLIBC_2.38 _IO_wfile_overflow F
+GLIBC_2.38 _IO_wfile_seekoff F
+GLIBC_2.38 _IO_wfile_sync F
+GLIBC_2.38 _IO_wfile_underflow F
+GLIBC_2.38 _IO_wfile_xsputn F
+GLIBC_2.38 _IO_wmarker_delta F
+GLIBC_2.38 _IO_wsetb F
+GLIBC_2.38 _S_catch_exception_raise F
+GLIBC_2.38 _S_msg_add_auth F
+GLIBC_2.38 _S_msg_del_auth F
+GLIBC_2.38 _S_msg_describe_ports F
+GLIBC_2.38 _S_msg_get_dtable F
+GLIBC_2.38 _S_msg_get_env_variable F
+GLIBC_2.38 _S_msg_get_environment F
+GLIBC_2.38 _S_msg_get_fd F
+GLIBC_2.38 _S_msg_get_init_int F
+GLIBC_2.38 _S_msg_get_init_ints F
+GLIBC_2.38 _S_msg_get_init_port F
+GLIBC_2.38 _S_msg_get_init_ports F
+GLIBC_2.38 _S_msg_proc_newids F
+GLIBC_2.38 _S_msg_report_wait F
+GLIBC_2.38 _S_msg_set_dtable F
+GLIBC_2.38 _S_msg_set_env_variable F
+GLIBC_2.38 _S_msg_set_environment F
+GLIBC_2.38 _S_msg_set_fd F
+GLIBC_2.38 _S_msg_set_init_int F
+GLIBC_2.38 _S_msg_set_init_ints F
+GLIBC_2.38 _S_msg_set_init_port F
+GLIBC_2.38 _S_msg_set_init_ports F
+GLIBC_2.38 _S_msg_sig_post F
+GLIBC_2.38 _S_msg_sig_post_untraced F
+GLIBC_2.38 ___brk_addr D 0x8
+GLIBC_2.38 __argz_count F
+GLIBC_2.38 __argz_next F
+GLIBC_2.38 __argz_stringify F
+GLIBC_2.38 __asprintf F
+GLIBC_2.38 __asprintf_chk F
+GLIBC_2.38 __assert F
+GLIBC_2.38 __assert_fail F
+GLIBC_2.38 __assert_perror_fail F
+GLIBC_2.38 __backtrace F
+GLIBC_2.38 __backtrace_symbols F
+GLIBC_2.38 __backtrace_symbols_fd F
+GLIBC_2.38 __bsd_getpgrp F
+GLIBC_2.38 __bzero F
+GLIBC_2.38 __check_rhosts_file D 0x4
+GLIBC_2.38 __chk_fail F
+GLIBC_2.38 __close F
+GLIBC_2.38 __cmsg_nxthdr F
+GLIBC_2.38 __confstr_chk F
+GLIBC_2.38 __connect F
+GLIBC_2.38 __ctype_b_loc F
+GLIBC_2.38 __ctype_get_mb_cur_max F
+GLIBC_2.38 __ctype_tolower_loc F
+GLIBC_2.38 __ctype_toupper_loc F
+GLIBC_2.38 __cxa_at_quick_exit F
+GLIBC_2.38 __cxa_atexit F
+GLIBC_2.38 __cxa_finalize F
+GLIBC_2.38 __cxa_thread_atexit_impl F
+GLIBC_2.38 __cyg_profile_func_enter F
+GLIBC_2.38 __cyg_profile_func_exit F
+GLIBC_2.38 __daylight D 0x4
+GLIBC_2.38 __dcgettext F
+GLIBC_2.38 __dgettext F
+GLIBC_2.38 __dprintf_chk F
+GLIBC_2.38 __dup2 F
+GLIBC_2.38 __duplocale F
+GLIBC_2.38 __environ D 0x8
+GLIBC_2.38 __errno_location F
+GLIBC_2.38 __explicit_bzero_chk F
+GLIBC_2.38 __fbufsize F
+GLIBC_2.38 __fcntl F
+GLIBC_2.38 __fdelt_chk F
+GLIBC_2.38 __fdelt_warn F
+GLIBC_2.38 __fentry__ F
+GLIBC_2.38 __ffs F
+GLIBC_2.38 __fgets_chk F
+GLIBC_2.38 __fgets_unlocked_chk F
+GLIBC_2.38 __fgetws_chk F
+GLIBC_2.38 __fgetws_unlocked_chk F
+GLIBC_2.38 __finite F
+GLIBC_2.38 __finitef F
+GLIBC_2.38 __finitel F
+GLIBC_2.38 __flbf F
+GLIBC_2.38 __fork F
+GLIBC_2.38 __fpending F
+GLIBC_2.38 __fprintf_chk F
+GLIBC_2.38 __fpu_control D 0x2
+GLIBC_2.38 __fpurge F
+GLIBC_2.38 __fread_chk F
+GLIBC_2.38 __fread_unlocked_chk F
+GLIBC_2.38 __freadable F
+GLIBC_2.38 __freading F
+GLIBC_2.38 __freelocale F
+GLIBC_2.38 __fsetlocking F
+GLIBC_2.38 __fwprintf_chk F
+GLIBC_2.38 __fwritable F
+GLIBC_2.38 __fwriting F
+GLIBC_2.38 __getauxval F
+GLIBC_2.38 __getcwd_chk F
+GLIBC_2.38 __getdelim F
+GLIBC_2.38 __getdomainname_chk F
+GLIBC_2.38 __getgroups_chk F
+GLIBC_2.38 __gethostname_chk F
+GLIBC_2.38 __getlogin_r_chk F
+GLIBC_2.38 __getpagesize F
+GLIBC_2.38 __getpgid F
+GLIBC_2.38 __getpid F
+GLIBC_2.38 __gets_chk F
+GLIBC_2.38 __gettimeofday F
+GLIBC_2.38 __getwd_chk F
+GLIBC_2.38 __gmtime_r F
+GLIBC_2.38 __h_errno_location F
+GLIBC_2.38 __hurd_dfail F
+GLIBC_2.38 __hurd_fail F
+GLIBC_2.38 __hurd_sockfail F
+GLIBC_2.38 __isalnum_l F
+GLIBC_2.38 __isalpha_l F
+GLIBC_2.38 __isascii_l F
+GLIBC_2.38 __isblank_l F
+GLIBC_2.38 __iscntrl_l F
+GLIBC_2.38 __isctype F
+GLIBC_2.38 __isdigit_l F
+GLIBC_2.38 __isgraph_l F
+GLIBC_2.38 __isinf F
+GLIBC_2.38 __isinff F
+GLIBC_2.38 __isinfl F
+GLIBC_2.38 __islower_l F
+GLIBC_2.38 __isnan F
+GLIBC_2.38 __isnanf F
+GLIBC_2.38 __isnanf128 F
+GLIBC_2.38 __isnanl F
+GLIBC_2.38 __isoc23_fscanf F
+GLIBC_2.38 __isoc23_fwscanf F
+GLIBC_2.38 __isoc23_scanf F
+GLIBC_2.38 __isoc23_sscanf F
+GLIBC_2.38 __isoc23_strtoimax F
+GLIBC_2.38 __isoc23_strtol F
+GLIBC_2.38 __isoc23_strtol_l F
+GLIBC_2.38 __isoc23_strtoll F
+GLIBC_2.38 __isoc23_strtoll_l F
+GLIBC_2.38 __isoc23_strtoul F
+GLIBC_2.38 __isoc23_strtoul_l F
+GLIBC_2.38 __isoc23_strtoull F
+GLIBC_2.38 __isoc23_strtoull_l F
+GLIBC_2.38 __isoc23_strtoumax F
+GLIBC_2.38 __isoc23_swscanf F
+GLIBC_2.38 __isoc23_vfscanf F
+GLIBC_2.38 __isoc23_vfwscanf F
+GLIBC_2.38 __isoc23_vscanf F
+GLIBC_2.38 __isoc23_vsscanf F
+GLIBC_2.38 __isoc23_vswscanf F
+GLIBC_2.38 __isoc23_vwscanf F
+GLIBC_2.38 __isoc23_wcstoimax F
+GLIBC_2.38 __isoc23_wcstol F
+GLIBC_2.38 __isoc23_wcstol_l F
+GLIBC_2.38 __isoc23_wcstoll F
+GLIBC_2.38 __isoc23_wcstoll_l F
+GLIBC_2.38 __isoc23_wcstoul F
+GLIBC_2.38 __isoc23_wcstoul_l F
+GLIBC_2.38 __isoc23_wcstoull F
+GLIBC_2.38 __isoc23_wcstoull_l F
+GLIBC_2.38 __isoc23_wcstoumax F
+GLIBC_2.38 __isoc23_wscanf F
+GLIBC_2.38 __isoc99_fscanf F
+GLIBC_2.38 __isoc99_fwscanf F
+GLIBC_2.38 __isoc99_scanf F
+GLIBC_2.38 __isoc99_sscanf F
+GLIBC_2.38 __isoc99_swscanf F
+GLIBC_2.38 __isoc99_vfscanf F
+GLIBC_2.38 __isoc99_vfwscanf F
+GLIBC_2.38 __isoc99_vscanf F
+GLIBC_2.38 __isoc99_vsscanf F
+GLIBC_2.38 __isoc99_vswscanf F
+GLIBC_2.38 __isoc99_vwscanf F
+GLIBC_2.38 __isoc99_wscanf F
+GLIBC_2.38 __isprint_l F
+GLIBC_2.38 __ispunct_l F
+GLIBC_2.38 __isspace_l F
+GLIBC_2.38 __isupper_l F
+GLIBC_2.38 __iswalnum_l F
+GLIBC_2.38 __iswalpha_l F
+GLIBC_2.38 __iswblank_l F
+GLIBC_2.38 __iswcntrl_l F
+GLIBC_2.38 __iswctype F
+GLIBC_2.38 __iswctype_l F
+GLIBC_2.38 __iswdigit_l F
+GLIBC_2.38 __iswgraph_l F
+GLIBC_2.38 __iswlower_l F
+GLIBC_2.38 __iswprint_l F
+GLIBC_2.38 __iswpunct_l F
+GLIBC_2.38 __iswspace_l F
+GLIBC_2.38 __iswupper_l F
+GLIBC_2.38 __iswxdigit_l F
+GLIBC_2.38 __isxdigit_l F
+GLIBC_2.38 __libc_allocate_rtsig F
+GLIBC_2.38 __libc_calloc F
+GLIBC_2.38 __libc_current_sigrtmax F
+GLIBC_2.38 __libc_current_sigrtmin F
+GLIBC_2.38 __libc_free F
+GLIBC_2.38 __libc_freeres F
+GLIBC_2.38 __libc_init_first F
+GLIBC_2.38 __libc_mallinfo F
+GLIBC_2.38 __libc_malloc F
+GLIBC_2.38 __libc_mallopt F
+GLIBC_2.38 __libc_memalign F
+GLIBC_2.38 __libc_pvalloc F
+GLIBC_2.38 __libc_realloc F
+GLIBC_2.38 __libc_single_threaded D 0x1
+GLIBC_2.38 __libc_start_main F
+GLIBC_2.38 __libc_valloc F
+GLIBC_2.38 __longjmp_chk F
+GLIBC_2.38 __lseek F
+GLIBC_2.38 __mach_host_self_ D 0x4
+GLIBC_2.38 __mach_msg F
+GLIBC_2.38 __mach_msg_destroy F
+GLIBC_2.38 __mach_port_allocate F
+GLIBC_2.38 __mach_port_deallocate F
+GLIBC_2.38 __mach_port_insert_right F
+GLIBC_2.38 __mach_reply_port F
+GLIBC_2.38 __mach_task_self_ D 0x4
+GLIBC_2.38 __mach_thread_self F
+GLIBC_2.38 __mbrlen F
+GLIBC_2.38 __mbrtowc F
+GLIBC_2.38 __mbsnrtowcs_chk F
+GLIBC_2.38 __mbsrtowcs_chk F
+GLIBC_2.38 __mbstowcs_chk F
+GLIBC_2.38 __memcmpeq F
+GLIBC_2.38 __memcpy_chk F
+GLIBC_2.38 __memmove_chk F
+GLIBC_2.38 __mempcpy F
+GLIBC_2.38 __mempcpy_chk F
+GLIBC_2.38 __memset_chk F
+GLIBC_2.38 __mig_allocate F
+GLIBC_2.38 __mig_dealloc_reply_port F
+GLIBC_2.38 __mig_deallocate F
+GLIBC_2.38 __mig_get_reply_port F
+GLIBC_2.38 __mig_init F
+GLIBC_2.38 __mig_put_reply_port F
+GLIBC_2.38 __mig_strncpy F
+GLIBC_2.38 __mmap F
+GLIBC_2.38 __monstartup F
+GLIBC_2.38 __nanosleep F
+GLIBC_2.38 __newlocale F
+GLIBC_2.38 __nl_langinfo_l F
+GLIBC_2.38 __nss_configure_lookup F
+GLIBC_2.38 __nss_hostname_digits_dots F
+GLIBC_2.38 __obstack_printf_chk F
+GLIBC_2.38 __obstack_vprintf_chk F
+GLIBC_2.38 __open F
+GLIBC_2.38 __open64 F
+GLIBC_2.38 __open64_2 F
+GLIBC_2.38 __open_2 F
+GLIBC_2.38 __openat64_2 F
+GLIBC_2.38 __openat_2 F
+GLIBC_2.38 __overflow F
+GLIBC_2.38 __pipe F
+GLIBC_2.38 __poll F
+GLIBC_2.38 __poll_chk F
+GLIBC_2.38 __posix_getopt F
+GLIBC_2.38 __ppoll_chk F
+GLIBC_2.38 __pread64 F
+GLIBC_2.38 __pread64_chk F
+GLIBC_2.38 __pread_chk F
+GLIBC_2.38 __printf_chk F
+GLIBC_2.38 __printf_fp F
+GLIBC_2.38 __profile_frequency F
+GLIBC_2.38 __progname D 0x8
+GLIBC_2.38 __progname_full D 0x8
+GLIBC_2.38 __pthread_get_cleanup_stack F
+GLIBC_2.38 __ptsname_r_chk F
+GLIBC_2.38 __pwrite64 F
+GLIBC_2.38 __rawmemchr F
+GLIBC_2.38 __rcmd_errstr D 0x8
+GLIBC_2.38 __read F
+GLIBC_2.38 __read_chk F
+GLIBC_2.38 __readlink_chk F
+GLIBC_2.38 __readlinkat_chk F
+GLIBC_2.38 __realpath_chk F
+GLIBC_2.38 __recv_chk F
+GLIBC_2.38 __recvfrom_chk F
+GLIBC_2.38 __register_atfork F
+GLIBC_2.38 __res_init F
+GLIBC_2.38 __res_nclose F
+GLIBC_2.38 __res_ninit F
+GLIBC_2.38 __res_randomid F
+GLIBC_2.38 __res_state F
+GLIBC_2.38 __sbrk F
+GLIBC_2.38 __sched_cpualloc F
+GLIBC_2.38 __sched_cpucount F
+GLIBC_2.38 __sched_cpufree F
+GLIBC_2.38 __sched_get_priority_max F
+GLIBC_2.38 __sched_get_priority_min F
+GLIBC_2.38 __sched_getparam F
+GLIBC_2.38 __sched_getscheduler F
+GLIBC_2.38 __sched_setscheduler F
+GLIBC_2.38 __sched_yield F
+GLIBC_2.38 __select F
+GLIBC_2.38 __send F
+GLIBC_2.38 __setpgid F
+GLIBC_2.38 __sigaction F
+GLIBC_2.38 __signbit F
+GLIBC_2.38 __signbitf F
+GLIBC_2.38 __signbitl F
+GLIBC_2.38 __sigpause F
+GLIBC_2.38 __sigsetjmp F
+GLIBC_2.38 __sigsuspend F
+GLIBC_2.38 __snprintf_chk F
+GLIBC_2.38 __sprintf_chk F
+GLIBC_2.38 __stack_chk_fail F
+GLIBC_2.38 __stpcpy F
+GLIBC_2.38 __stpcpy_chk F
+GLIBC_2.38 __stpncpy F
+GLIBC_2.38 __stpncpy_chk F
+GLIBC_2.38 __strcasecmp F
+GLIBC_2.38 __strcasecmp_l F
+GLIBC_2.38 __strcasestr F
+GLIBC_2.38 __strcat_chk F
+GLIBC_2.38 __strcoll_l F
+GLIBC_2.38 __strcpy_chk F
+GLIBC_2.38 __strdup F
+GLIBC_2.38 __strerror_r F
+GLIBC_2.38 __strfmon_l F
+GLIBC_2.38 __strftime_l F
+GLIBC_2.38 __strncasecmp_l F
+GLIBC_2.38 __strncat_chk F
+GLIBC_2.38 __strncpy_chk F
+GLIBC_2.38 __strndup F
+GLIBC_2.38 __strsep_g F
+GLIBC_2.38 __strtod_internal F
+GLIBC_2.38 __strtod_l F
+GLIBC_2.38 __strtof128_internal F
+GLIBC_2.38 __strtof_internal F
+GLIBC_2.38 __strtof_l F
+GLIBC_2.38 __strtok_r F
+GLIBC_2.38 __strtol_internal F
+GLIBC_2.38 __strtol_l F
+GLIBC_2.38 __strtold_internal F
+GLIBC_2.38 __strtold_l F
+GLIBC_2.38 __strtoll_internal F
+GLIBC_2.38 __strtoll_l F
+GLIBC_2.38 __strtoul_internal F
+GLIBC_2.38 __strtoul_l F
+GLIBC_2.38 __strtoull_internal F
+GLIBC_2.38 __strtoull_l F
+GLIBC_2.38 __strverscmp F
+GLIBC_2.38 __strxfrm_l F
+GLIBC_2.38 __swprintf_chk F
+GLIBC_2.38 __sysconf F
+GLIBC_2.38 __syslog_chk F
+GLIBC_2.38 __sysv_signal F
+GLIBC_2.38 __timezone D 0x8
+GLIBC_2.38 __toascii_l F
+GLIBC_2.38 __tolower_l F
+GLIBC_2.38 __toupper_l F
+GLIBC_2.38 __towctrans F
+GLIBC_2.38 __towctrans_l F
+GLIBC_2.38 __towlower_l F
+GLIBC_2.38 __towupper_l F
+GLIBC_2.38 __ttyname_r_chk F
+GLIBC_2.38 __tzname D 0x10
+GLIBC_2.38 __uflow F
+GLIBC_2.38 __underflow F
+GLIBC_2.38 __uselocale F
+GLIBC_2.38 __vasprintf_chk F
+GLIBC_2.38 __vdprintf_chk F
+GLIBC_2.38 __vfork F
+GLIBC_2.38 __vfprintf_chk F
+GLIBC_2.38 __vfscanf F
+GLIBC_2.38 __vfwprintf_chk F
+GLIBC_2.38 __vm_allocate F
+GLIBC_2.38 __vm_deallocate F
+GLIBC_2.38 __vm_page_size D 0x8
+GLIBC_2.38 __vprintf_chk F
+GLIBC_2.38 __vsnprintf F
+GLIBC_2.38 __vsnprintf_chk F
+GLIBC_2.38 __vsprintf_chk F
+GLIBC_2.38 __vsscanf F
+GLIBC_2.38 __vswprintf_chk F
+GLIBC_2.38 __vsyslog_chk F
+GLIBC_2.38 __vwprintf_chk F
+GLIBC_2.38 __wait F
+GLIBC_2.38 __waitpid F
+GLIBC_2.38 __wcpcpy_chk F
+GLIBC_2.38 __wcpncpy_chk F
+GLIBC_2.38 __wcrtomb_chk F
+GLIBC_2.38 __wcscasecmp_l F
+GLIBC_2.38 __wcscat_chk F
+GLIBC_2.38 __wcscoll_l F
+GLIBC_2.38 __wcscpy_chk F
+GLIBC_2.38 __wcsftime_l F
+GLIBC_2.38 __wcsncasecmp_l F
+GLIBC_2.38 __wcsncat_chk F
+GLIBC_2.38 __wcsncpy_chk F
+GLIBC_2.38 __wcsnrtombs_chk F
+GLIBC_2.38 __wcsrtombs_chk F
+GLIBC_2.38 __wcstod_internal F
+GLIBC_2.38 __wcstod_l F
+GLIBC_2.38 __wcstof128_internal F
+GLIBC_2.38 __wcstof_internal F
+GLIBC_2.38 __wcstof_l F
+GLIBC_2.38 __wcstol_internal F
+GLIBC_2.38 __wcstol_l F
+GLIBC_2.38 __wcstold_internal F
+GLIBC_2.38 __wcstold_l F
+GLIBC_2.38 __wcstoll_internal F
+GLIBC_2.38 __wcstoll_l F
+GLIBC_2.38 __wcstombs_chk F
+GLIBC_2.38 __wcstoul_internal F
+GLIBC_2.38 __wcstoul_l F
+GLIBC_2.38 __wcstoull_internal F
+GLIBC_2.38 __wcstoull_l F
+GLIBC_2.38 __wcsxfrm_l F
+GLIBC_2.38 __wctomb_chk F
+GLIBC_2.38 __wctrans_l F
+GLIBC_2.38 __wctype_l F
+GLIBC_2.38 __wmemcpy_chk F
+GLIBC_2.38 __wmemmove_chk F
+GLIBC_2.38 __wmempcpy_chk F
+GLIBC_2.38 __wmemset_chk F
+GLIBC_2.38 __woverflow F
+GLIBC_2.38 __wprintf_chk F
+GLIBC_2.38 __write F
+GLIBC_2.38 __writev F
+GLIBC_2.38 __wuflow F
+GLIBC_2.38 __wunderflow F
+GLIBC_2.38 __x86_get_cpuid_feature_leaf F
+GLIBC_2.38 __xpg_basename F
+GLIBC_2.38 __xpg_sigpause F
+GLIBC_2.38 __xpg_strerror_r F
+GLIBC_2.38 _dl_find_object F
+GLIBC_2.38 _dl_mcount_wrapper F
+GLIBC_2.38 _dl_mcount_wrapper_check F
+GLIBC_2.38 _environ D 0x8
+GLIBC_2.38 _exit F
+GLIBC_2.38 _flushlbf F
+GLIBC_2.38 _hurd_canonicalize_directory_name_internal F
+GLIBC_2.38 _hurd_critical_section_lock F
+GLIBC_2.38 _hurd_critical_section_unlock F
+GLIBC_2.38 _hurd_device_master D 0x4
+GLIBC_2.38 _hurd_dtable D 0x8
+GLIBC_2.38 _hurd_dtable_lock D 0x28
+GLIBC_2.38 _hurd_dtablesize D 0x4
+GLIBC_2.38 _hurd_exception2signal F
+GLIBC_2.38 _hurd_exec F
+GLIBC_2.38 _hurd_exec_paths F
+GLIBC_2.38 _hurd_fd_error F
+GLIBC_2.38 _hurd_fd_error_signal F
+GLIBC_2.38 _hurd_fd_get F
+GLIBC_2.38 _hurd_host_priv D 0x4
+GLIBC_2.38 _hurd_init F
+GLIBC_2.38 _hurd_intern_fd F
+GLIBC_2.38 _hurd_intr_rpc_mach_msg F
+GLIBC_2.38 _hurd_libc_proc_init F
+GLIBC_2.38 _hurd_msgport D 0x4
+GLIBC_2.38 _hurd_port_cleanup F
+GLIBC_2.38 _hurd_port_free F
+GLIBC_2.38 _hurd_port_get F
+GLIBC_2.38 _hurd_port_init F
+GLIBC_2.38 _hurd_port_locked_get F
+GLIBC_2.38 _hurd_port_locked_set F
+GLIBC_2.38 _hurd_port_move F
+GLIBC_2.38 _hurd_port_set F
+GLIBC_2.38 _hurd_ports D 0x8
+GLIBC_2.38 _hurd_ports_use F
+GLIBC_2.38 _hurd_proc_init F
+GLIBC_2.38 _hurd_raise_signal F
+GLIBC_2.38 _hurd_self_sigstate F
+GLIBC_2.38 _hurd_thread_sigstate F
+GLIBC_2.38 _hurd_userlink_clear F
+GLIBC_2.38 _hurd_userlink_link F
+GLIBC_2.38 _hurd_userlink_unlink F
+GLIBC_2.38 _hurdsig_fault_catch_exception_raise F
+GLIBC_2.38 _hurdsig_fault_env D 0x50
+GLIBC_2.38 _hurdsig_fault_preemptor D 0x30
+GLIBC_2.38 _hurdsig_interrupt_timeout D 0x4
+GLIBC_2.38 _libc_intl_domainname D 0x5
+GLIBC_2.38 _longjmp F
+GLIBC_2.38 _mcleanup F
+GLIBC_2.38 _mcount F
+GLIBC_2.38 _nl_default_dirname D 0xe
+GLIBC_2.38 _nl_domain_bindings D 0x8
+GLIBC_2.38 _nl_msg_cat_cntr D 0x4
+GLIBC_2.38 _obstack_allocated_p F
+GLIBC_2.38 _obstack_begin F
+GLIBC_2.38 _obstack_begin_1 F
+GLIBC_2.38 _obstack_free F
+GLIBC_2.38 _obstack_memory_used F
+GLIBC_2.38 _obstack_newchunk F
+GLIBC_2.38 _res D 0x238
+GLIBC_2.38 _res_hconf D 0x48
+GLIBC_2.38 _setjmp F
+GLIBC_2.38 _tolower F
+GLIBC_2.38 _toupper F
+GLIBC_2.38 a64l F
+GLIBC_2.38 abort F
+GLIBC_2.38 abs F
+GLIBC_2.38 accept F
+GLIBC_2.38 accept4 F
+GLIBC_2.38 access F
+GLIBC_2.38 acct F
+GLIBC_2.38 addmntent F
+GLIBC_2.38 addseverity F
+GLIBC_2.38 adjtime F
+GLIBC_2.38 alarm F
+GLIBC_2.38 aligned_alloc F
+GLIBC_2.38 alphasort F
+GLIBC_2.38 alphasort64 F
+GLIBC_2.38 arc4random F
+GLIBC_2.38 arc4random_buf F
+GLIBC_2.38 arc4random_uniform F
+GLIBC_2.38 argp_err_exit_status D 0x4
+GLIBC_2.38 argp_error F
+GLIBC_2.38 argp_failure F
+GLIBC_2.38 argp_help F
+GLIBC_2.38 argp_parse F
+GLIBC_2.38 argp_program_bug_address D 0x8
+GLIBC_2.38 argp_program_version D 0x8
+GLIBC_2.38 argp_program_version_hook D 0x8
+GLIBC_2.38 argp_state_help F
+GLIBC_2.38 argp_usage F
+GLIBC_2.38 argz_add F
+GLIBC_2.38 argz_add_sep F
+GLIBC_2.38 argz_append F
+GLIBC_2.38 argz_count F
+GLIBC_2.38 argz_create F
+GLIBC_2.38 argz_create_sep F
+GLIBC_2.38 argz_delete F
+GLIBC_2.38 argz_extract F
+GLIBC_2.38 argz_insert F
+GLIBC_2.38 argz_next F
+GLIBC_2.38 argz_replace F
+GLIBC_2.38 argz_stringify F
+GLIBC_2.38 asctime F
+GLIBC_2.38 asctime_r F
+GLIBC_2.38 asprintf F
+GLIBC_2.38 atof F
+GLIBC_2.38 atoi F
+GLIBC_2.38 atol F
+GLIBC_2.38 atoll F
+GLIBC_2.38 backtrace F
+GLIBC_2.38 backtrace_symbols F
+GLIBC_2.38 backtrace_symbols_fd F
+GLIBC_2.38 basename F
+GLIBC_2.38 bcmp F
+GLIBC_2.38 bcopy F
+GLIBC_2.38 bind F
+GLIBC_2.38 bind_textdomain_codeset F
+GLIBC_2.38 bindresvport F
+GLIBC_2.38 bindtextdomain F
+GLIBC_2.38 brk F
+GLIBC_2.38 bsd_signal F
+GLIBC_2.38 bsearch F
+GLIBC_2.38 btowc F
+GLIBC_2.38 bzero F
+GLIBC_2.38 c16rtomb F
+GLIBC_2.38 c32rtomb F
+GLIBC_2.38 c8rtomb F
+GLIBC_2.38 calloc F
+GLIBC_2.38 canonicalize_file_name F
+GLIBC_2.38 catclose F
+GLIBC_2.38 catgets F
+GLIBC_2.38 catopen F
+GLIBC_2.38 cfgetispeed F
+GLIBC_2.38 cfgetospeed F
+GLIBC_2.38 cfmakeraw F
+GLIBC_2.38 cfsetispeed F
+GLIBC_2.38 cfsetospeed F
+GLIBC_2.38 cfsetspeed F
+GLIBC_2.38 chdir F
+GLIBC_2.38 chflags F
+GLIBC_2.38 chmod F
+GLIBC_2.38 chown F
+GLIBC_2.38 chroot F
+GLIBC_2.38 clearenv F
+GLIBC_2.38 clearerr F
+GLIBC_2.38 clearerr_unlocked F
+GLIBC_2.38 clock F
+GLIBC_2.38 clock_getcpuclockid F
+GLIBC_2.38 clock_getres F
+GLIBC_2.38 clock_gettime F
+GLIBC_2.38 clock_nanosleep F
+GLIBC_2.38 clock_settime F
+GLIBC_2.38 close F
+GLIBC_2.38 close_range F
+GLIBC_2.38 closedir F
+GLIBC_2.38 closefrom F
+GLIBC_2.38 closelog F
+GLIBC_2.38 confstr F
+GLIBC_2.38 connect F
+GLIBC_2.38 copy_file_range F
+GLIBC_2.38 copysign F
+GLIBC_2.38 copysignf F
+GLIBC_2.38 copysignl F
+GLIBC_2.38 creat F
+GLIBC_2.38 creat64 F
+GLIBC_2.38 ctermid F
+GLIBC_2.38 ctime F
+GLIBC_2.38 ctime_r F
+GLIBC_2.38 cuserid F
+GLIBC_2.38 daemon F
+GLIBC_2.38 daylight D 0x4
+GLIBC_2.38 dcgettext F
+GLIBC_2.38 dcngettext F
+GLIBC_2.38 dgettext F
+GLIBC_2.38 difftime F
+GLIBC_2.38 directory_name_split F
+GLIBC_2.38 dirfd F
+GLIBC_2.38 dirname F
+GLIBC_2.38 div F
+GLIBC_2.38 dl_iterate_phdr F
+GLIBC_2.38 dladdr F
+GLIBC_2.38 dladdr1 F
+GLIBC_2.38 dlclose F
+GLIBC_2.38 dlerror F
+GLIBC_2.38 dlinfo F
+GLIBC_2.38 dlmopen F
+GLIBC_2.38 dlopen F
+GLIBC_2.38 dlsym F
+GLIBC_2.38 dlvsym F
+GLIBC_2.38 dn_comp F
+GLIBC_2.38 dn_expand F
+GLIBC_2.38 dn_skipname F
+GLIBC_2.38 dngettext F
+GLIBC_2.38 dprintf F
+GLIBC_2.38 drand48 F
+GLIBC_2.38 drand48_r F
+GLIBC_2.38 dup F
+GLIBC_2.38 dup2 F
+GLIBC_2.38 dup3 F
+GLIBC_2.38 duplocale F
+GLIBC_2.38 dysize F
+GLIBC_2.38 eaccess F
+GLIBC_2.38 ecvt F
+GLIBC_2.38 ecvt_r F
+GLIBC_2.38 endaliasent F
+GLIBC_2.38 endfsent F
+GLIBC_2.38 endgrent F
+GLIBC_2.38 endhostent F
+GLIBC_2.38 endmntent F
+GLIBC_2.38 endnetent F
+GLIBC_2.38 endnetgrent F
+GLIBC_2.38 endprotoent F
+GLIBC_2.38 endpwent F
+GLIBC_2.38 endrpcent F
+GLIBC_2.38 endservent F
+GLIBC_2.38 endsgent F
+GLIBC_2.38 endspent F
+GLIBC_2.38 endttyent F
+GLIBC_2.38 endusershell F
+GLIBC_2.38 endutent F
+GLIBC_2.38 endutxent F
+GLIBC_2.38 environ D 0x8
+GLIBC_2.38 envz_add F
+GLIBC_2.38 envz_entry F
+GLIBC_2.38 envz_get F
+GLIBC_2.38 envz_merge F
+GLIBC_2.38 envz_remove F
+GLIBC_2.38 envz_strip F
+GLIBC_2.38 erand48 F
+GLIBC_2.38 erand48_r F
+GLIBC_2.38 err F
+GLIBC_2.38 error F
+GLIBC_2.38 error_at_line F
+GLIBC_2.38 error_message_count D 0x4
+GLIBC_2.38 error_one_per_line D 0x4
+GLIBC_2.38 error_print_progname D 0x8
+GLIBC_2.38 errx F
+GLIBC_2.38 ether_aton F
+GLIBC_2.38 ether_aton_r F
+GLIBC_2.38 ether_hostton F
+GLIBC_2.38 ether_line F
+GLIBC_2.38 ether_ntoa F
+GLIBC_2.38 ether_ntoa_r F
+GLIBC_2.38 ether_ntohost F
+GLIBC_2.38 euidaccess F
+GLIBC_2.38 evc_wait F
+GLIBC_2.38 execl F
+GLIBC_2.38 execle F
+GLIBC_2.38 execlp F
+GLIBC_2.38 execv F
+GLIBC_2.38 execve F
+GLIBC_2.38 execveat F
+GLIBC_2.38 execvp F
+GLIBC_2.38 execvpe F
+GLIBC_2.38 exit F
+GLIBC_2.38 explicit_bzero F
+GLIBC_2.38 faccessat F
+GLIBC_2.38 fchdir F
+GLIBC_2.38 fchflags F
+GLIBC_2.38 fchmod F
+GLIBC_2.38 fchmodat F
+GLIBC_2.38 fchown F
+GLIBC_2.38 fchownat F
+GLIBC_2.38 fclose F
+GLIBC_2.38 fcloseall F
+GLIBC_2.38 fcntl F
+GLIBC_2.38 fcntl64 F
+GLIBC_2.38 fcvt F
+GLIBC_2.38 fcvt_r F
+GLIBC_2.38 fdatasync F
+GLIBC_2.38 fdopen F
+GLIBC_2.38 fdopendir F
+GLIBC_2.38 feof F
+GLIBC_2.38 feof_unlocked F
+GLIBC_2.38 ferror F
+GLIBC_2.38 ferror_unlocked F
+GLIBC_2.38 fexecve F
+GLIBC_2.38 fflush F
+GLIBC_2.38 fflush_unlocked F
+GLIBC_2.38 ffs F
+GLIBC_2.38 ffsl F
+GLIBC_2.38 ffsll F
+GLIBC_2.38 fgetc F
+GLIBC_2.38 fgetc_unlocked F
+GLIBC_2.38 fgetgrent F
+GLIBC_2.38 fgetgrent_r F
+GLIBC_2.38 fgetpos F
+GLIBC_2.38 fgetpos64 F
+GLIBC_2.38 fgetpwent F
+GLIBC_2.38 fgetpwent_r F
+GLIBC_2.38 fgets F
+GLIBC_2.38 fgets_unlocked F
+GLIBC_2.38 fgetsgent F
+GLIBC_2.38 fgetsgent_r F
+GLIBC_2.38 fgetspent F
+GLIBC_2.38 fgetspent_r F
+GLIBC_2.38 fgetwc F
+GLIBC_2.38 fgetwc_unlocked F
+GLIBC_2.38 fgetws F
+GLIBC_2.38 fgetws_unlocked F
+GLIBC_2.38 fgetxattr F
+GLIBC_2.38 file_name_lookup F
+GLIBC_2.38 file_name_lookup_under F
+GLIBC_2.38 file_name_path_lookup F
+GLIBC_2.38 file_name_split F
+GLIBC_2.38 fileno F
+GLIBC_2.38 fileno_unlocked F
+GLIBC_2.38 finite F
+GLIBC_2.38 finitef F
+GLIBC_2.38 finitel F
+GLIBC_2.38 flistxattr F
+GLIBC_2.38 flock F
+GLIBC_2.38 flockfile F
+GLIBC_2.38 fmemopen F
+GLIBC_2.38 fmtmsg F
+GLIBC_2.38 fnmatch F
+GLIBC_2.38 fopen F
+GLIBC_2.38 fopen64 F
+GLIBC_2.38 fopencookie F
+GLIBC_2.38 fopenport F
+GLIBC_2.38 fork F
+GLIBC_2.38 forkpty F
+GLIBC_2.38 fpathconf F
+GLIBC_2.38 fprintf F
+GLIBC_2.38 fputc F
+GLIBC_2.38 fputc_unlocked F
+GLIBC_2.38 fputs F
+GLIBC_2.38 fputs_unlocked F
+GLIBC_2.38 fputwc F
+GLIBC_2.38 fputwc_unlocked F
+GLIBC_2.38 fputws F
+GLIBC_2.38 fputws_unlocked F
+GLIBC_2.38 fread F
+GLIBC_2.38 fread_unlocked F
+GLIBC_2.38 free F
+GLIBC_2.38 freeaddrinfo F
+GLIBC_2.38 freeifaddrs F
+GLIBC_2.38 freelocale F
+GLIBC_2.38 fremovexattr F
+GLIBC_2.38 freopen F
+GLIBC_2.38 freopen64 F
+GLIBC_2.38 frexp F
+GLIBC_2.38 frexpf F
+GLIBC_2.38 frexpl F
+GLIBC_2.38 fscanf F
+GLIBC_2.38 fseek F
+GLIBC_2.38 fseeko F
+GLIBC_2.38 fseeko64 F
+GLIBC_2.38 fsetpos F
+GLIBC_2.38 fsetpos64 F
+GLIBC_2.38 fsetxattr F
+GLIBC_2.38 fstat F
+GLIBC_2.38 fstat64 F
+GLIBC_2.38 fstatat F
+GLIBC_2.38 fstatat64 F
+GLIBC_2.38 fstatfs F
+GLIBC_2.38 fstatfs64 F
+GLIBC_2.38 fstatvfs F
+GLIBC_2.38 fstatvfs64 F
+GLIBC_2.38 fsync F
+GLIBC_2.38 ftell F
+GLIBC_2.38 ftello F
+GLIBC_2.38 ftello64 F
+GLIBC_2.38 ftime F
+GLIBC_2.38 ftok F
+GLIBC_2.38 ftruncate F
+GLIBC_2.38 ftruncate64 F
+GLIBC_2.38 ftrylockfile F
+GLIBC_2.38 fts64_children F
+GLIBC_2.38 fts64_close F
+GLIBC_2.38 fts64_open F
+GLIBC_2.38 fts64_read F
+GLIBC_2.38 fts64_set F
+GLIBC_2.38 fts_children F
+GLIBC_2.38 fts_close F
+GLIBC_2.38 fts_open F
+GLIBC_2.38 fts_read F
+GLIBC_2.38 fts_set F
+GLIBC_2.38 ftw F
+GLIBC_2.38 ftw64 F
+GLIBC_2.38 funlockfile F
+GLIBC_2.38 futimens F
+GLIBC_2.38 futimes F
+GLIBC_2.38 futimesat F
+GLIBC_2.38 fwide F
+GLIBC_2.38 fwprintf F
+GLIBC_2.38 fwrite F
+GLIBC_2.38 fwrite_unlocked F
+GLIBC_2.38 fwscanf F
+GLIBC_2.38 gai_strerror F
+GLIBC_2.38 gcvt F
+GLIBC_2.38 get_avphys_pages F
+GLIBC_2.38 get_current_dir_name F
+GLIBC_2.38 get_nprocs F
+GLIBC_2.38 get_nprocs_conf F
+GLIBC_2.38 get_phys_pages F
+GLIBC_2.38 get_privileged_ports F
+GLIBC_2.38 getaddrinfo F
+GLIBC_2.38 getaliasbyname F
+GLIBC_2.38 getaliasbyname_r F
+GLIBC_2.38 getaliasent F
+GLIBC_2.38 getaliasent_r F
+GLIBC_2.38 getauth F
+GLIBC_2.38 getauxval F
+GLIBC_2.38 getc F
+GLIBC_2.38 getc_unlocked F
+GLIBC_2.38 getchar F
+GLIBC_2.38 getchar_unlocked F
+GLIBC_2.38 getcontext F
+GLIBC_2.38 getcrdir F
+GLIBC_2.38 getcttyid F
+GLIBC_2.38 getcwd F
+GLIBC_2.38 getcwdir F
+GLIBC_2.38 getdate F
+GLIBC_2.38 getdate_err D 0x4
+GLIBC_2.38 getdate_r F
+GLIBC_2.38 getdelim F
+GLIBC_2.38 getdirentries F
+GLIBC_2.38 getdirentries64 F
+GLIBC_2.38 getdomainname F
+GLIBC_2.38 getdport F
+GLIBC_2.38 getdtablesize F
+GLIBC_2.38 getegid F
+GLIBC_2.38 getentropy F
+GLIBC_2.38 getenv F
+GLIBC_2.38 geteuid F
+GLIBC_2.38 geteuids F
+GLIBC_2.38 getfsent F
+GLIBC_2.38 getfsfile F
+GLIBC_2.38 getfsspec F
+GLIBC_2.38 getgid F
+GLIBC_2.38 getgrent F
+GLIBC_2.38 getgrent_r F
+GLIBC_2.38 getgrgid F
+GLIBC_2.38 getgrgid_r F
+GLIBC_2.38 getgrnam F
+GLIBC_2.38 getgrnam_r F
+GLIBC_2.38 getgrouplist F
+GLIBC_2.38 getgroups F
+GLIBC_2.38 gethostbyaddr F
+GLIBC_2.38 gethostbyaddr_r F
+GLIBC_2.38 gethostbyname F
+GLIBC_2.38 gethostbyname2 F
+GLIBC_2.38 gethostbyname2_r F
+GLIBC_2.38 gethostbyname_r F
+GLIBC_2.38 gethostent F
+GLIBC_2.38 gethostent_r F
+GLIBC_2.38 gethostid F
+GLIBC_2.38 gethostname F
+GLIBC_2.38 getifaddrs F
+GLIBC_2.38 getipv4sourcefilter F
+GLIBC_2.38 getitimer F
+GLIBC_2.38 getline F
+GLIBC_2.38 getloadavg F
+GLIBC_2.38 getlogin F
+GLIBC_2.38 getlogin_r F
+GLIBC_2.38 getmntent F
+GLIBC_2.38 getmntent_r F
+GLIBC_2.38 getnameinfo F
+GLIBC_2.38 getnetbyaddr F
+GLIBC_2.38 getnetbyaddr_r F
+GLIBC_2.38 getnetbyname F
+GLIBC_2.38 getnetbyname_r F
+GLIBC_2.38 getnetent F
+GLIBC_2.38 getnetent_r F
+GLIBC_2.38 getnetgrent F
+GLIBC_2.38 getnetgrent_r F
+GLIBC_2.38 getopt F
+GLIBC_2.38 getopt_long F
+GLIBC_2.38 getopt_long_only F
+GLIBC_2.38 getpagesize F
+GLIBC_2.38 getpass F
+GLIBC_2.38 getpeername F
+GLIBC_2.38 getpgid F
+GLIBC_2.38 getpgrp F
+GLIBC_2.38 getpid F
+GLIBC_2.38 getppid F
+GLIBC_2.38 getpriority F
+GLIBC_2.38 getproc F
+GLIBC_2.38 getprotobyname F
+GLIBC_2.38 getprotobyname_r F
+GLIBC_2.38 getprotobynumber F
+GLIBC_2.38 getprotobynumber_r F
+GLIBC_2.38 getprotoent F
+GLIBC_2.38 getprotoent_r F
+GLIBC_2.38 getpt F
+GLIBC_2.38 getpw F
+GLIBC_2.38 getpwent F
+GLIBC_2.38 getpwent_r F
+GLIBC_2.38 getpwnam F
+GLIBC_2.38 getpwnam_r F
+GLIBC_2.38 getpwuid F
+GLIBC_2.38 getpwuid_r F
+GLIBC_2.38 getrandom F
+GLIBC_2.38 getresgid F
+GLIBC_2.38 getresuid F
+GLIBC_2.38 getrlimit F
+GLIBC_2.38 getrlimit64 F
+GLIBC_2.38 getrpcbyname F
+GLIBC_2.38 getrpcbyname_r F
+GLIBC_2.38 getrpcbynumber F
+GLIBC_2.38 getrpcbynumber_r F
+GLIBC_2.38 getrpcent F
+GLIBC_2.38 getrpcent_r F
+GLIBC_2.38 getrusage F
+GLIBC_2.38 gets F
+GLIBC_2.38 getservbyname F
+GLIBC_2.38 getservbyname_r F
+GLIBC_2.38 getservbyport F
+GLIBC_2.38 getservbyport_r F
+GLIBC_2.38 getservent F
+GLIBC_2.38 getservent_r F
+GLIBC_2.38 getsgent F
+GLIBC_2.38 getsgent_r F
+GLIBC_2.38 getsgnam F
+GLIBC_2.38 getsgnam_r F
+GLIBC_2.38 getsid F
+GLIBC_2.38 getsockname F
+GLIBC_2.38 getsockopt F
+GLIBC_2.38 getsourcefilter F
+GLIBC_2.38 getspent F
+GLIBC_2.38 getspent_r F
+GLIBC_2.38 getspnam F
+GLIBC_2.38 getspnam_r F
+GLIBC_2.38 getsubopt F
+GLIBC_2.38 gettext F
+GLIBC_2.38 gettimeofday F
+GLIBC_2.38 getttyent F
+GLIBC_2.38 getttynam F
+GLIBC_2.38 getuid F
+GLIBC_2.38 getumask F
+GLIBC_2.38 getusershell F
+GLIBC_2.38 getutent F
+GLIBC_2.38 getutent_r F
+GLIBC_2.38 getutid F
+GLIBC_2.38 getutid_r F
+GLIBC_2.38 getutline F
+GLIBC_2.38 getutline_r F
+GLIBC_2.38 getutmp F
+GLIBC_2.38 getutmpx F
+GLIBC_2.38 getutxent F
+GLIBC_2.38 getutxid F
+GLIBC_2.38 getutxline F
+GLIBC_2.38 getw F
+GLIBC_2.38 getwc F
+GLIBC_2.38 getwc_unlocked F
+GLIBC_2.38 getwchar F
+GLIBC_2.38 getwchar_unlocked F
+GLIBC_2.38 getwd F
+GLIBC_2.38 getxattr F
+GLIBC_2.38 glob F
+GLIBC_2.38 glob64 F
+GLIBC_2.38 glob_pattern_p F
+GLIBC_2.38 globfree F
+GLIBC_2.38 globfree64 F
+GLIBC_2.38 gmtime F
+GLIBC_2.38 gmtime_r F
+GLIBC_2.38 gnu_dev_major F
+GLIBC_2.38 gnu_dev_makedev F
+GLIBC_2.38 gnu_dev_minor F
+GLIBC_2.38 gnu_get_libc_release F
+GLIBC_2.38 gnu_get_libc_version F
+GLIBC_2.38 grantpt F
+GLIBC_2.38 group_member F
+GLIBC_2.38 gsignal F
+GLIBC_2.38 gtty F
+GLIBC_2.38 h_errlist D 0x28
+GLIBC_2.38 h_nerr D 0x4
+GLIBC_2.38 hasmntopt F
+GLIBC_2.38 hcreate F
+GLIBC_2.38 hcreate_r F
+GLIBC_2.38 hdestroy F
+GLIBC_2.38 hdestroy_r F
+GLIBC_2.38 herror F
+GLIBC_2.38 hsearch F
+GLIBC_2.38 hsearch_r F
+GLIBC_2.38 hstrerror F
+GLIBC_2.38 htonl F
+GLIBC_2.38 htons F
+GLIBC_2.38 hurd_catch_signal F
+GLIBC_2.38 hurd_check_cancel F
+GLIBC_2.38 hurd_directory_name_split F
+GLIBC_2.38 hurd_file_name_lookup F
+GLIBC_2.38 hurd_file_name_lookup_retry F
+GLIBC_2.38 hurd_file_name_path_lookup F
+GLIBC_2.38 hurd_file_name_split F
+GLIBC_2.38 hurd_preempt_signals F
+GLIBC_2.38 hurd_safe_copyin F
+GLIBC_2.38 hurd_safe_copyout F
+GLIBC_2.38 hurd_safe_memmove F
+GLIBC_2.38 hurd_safe_memset F
+GLIBC_2.38 hurd_sig_post F
+GLIBC_2.38 hurd_thread_cancel F
+GLIBC_2.38 hurd_thread_self F
+GLIBC_2.38 hurd_unpreempt_signals F
+GLIBC_2.38 iconv F
+GLIBC_2.38 iconv_close F
+GLIBC_2.38 iconv_open F
+GLIBC_2.38 if_freenameindex F
+GLIBC_2.38 if_indextoname F
+GLIBC_2.38 if_nameindex F
+GLIBC_2.38 if_nametoindex F
+GLIBC_2.38 imaxabs F
+GLIBC_2.38 imaxdiv F
+GLIBC_2.38 in6addr_any D 0x10
+GLIBC_2.38 in6addr_loopback D 0x10
+GLIBC_2.38 index F
+GLIBC_2.38 inet6_opt_append F
+GLIBC_2.38 inet6_opt_find F
+GLIBC_2.38 inet6_opt_finish F
+GLIBC_2.38 inet6_opt_get_val F
+GLIBC_2.38 inet6_opt_init F
+GLIBC_2.38 inet6_opt_next F
+GLIBC_2.38 inet6_opt_set_val F
+GLIBC_2.38 inet6_option_alloc F
+GLIBC_2.38 inet6_option_append F
+GLIBC_2.38 inet6_option_find F
+GLIBC_2.38 inet6_option_init F
+GLIBC_2.38 inet6_option_next F
+GLIBC_2.38 inet6_option_space F
+GLIBC_2.38 inet6_rth_add F
+GLIBC_2.38 inet6_rth_getaddr F
+GLIBC_2.38 inet6_rth_init F
+GLIBC_2.38 inet6_rth_reverse F
+GLIBC_2.38 inet6_rth_segments F
+GLIBC_2.38 inet6_rth_space F
+GLIBC_2.38 inet_addr F
+GLIBC_2.38 inet_aton F
+GLIBC_2.38 inet_lnaof F
+GLIBC_2.38 inet_makeaddr F
+GLIBC_2.38 inet_netof F
+GLIBC_2.38 inet_network F
+GLIBC_2.38 inet_nsap_addr F
+GLIBC_2.38 inet_nsap_ntoa F
+GLIBC_2.38 inet_ntoa F
+GLIBC_2.38 inet_ntop F
+GLIBC_2.38 inet_pton F
+GLIBC_2.38 initgroups F
+GLIBC_2.38 initstate F
+GLIBC_2.38 initstate_r F
+GLIBC_2.38 innetgr F
+GLIBC_2.38 insque F
+GLIBC_2.38 ioctl F
+GLIBC_2.38 iruserok F
+GLIBC_2.38 iruserok_af F
+GLIBC_2.38 isalnum F
+GLIBC_2.38 isalnum_l F
+GLIBC_2.38 isalpha F
+GLIBC_2.38 isalpha_l F
+GLIBC_2.38 isascii F
+GLIBC_2.38 isatty F
+GLIBC_2.38 isblank F
+GLIBC_2.38 isblank_l F
+GLIBC_2.38 iscntrl F
+GLIBC_2.38 iscntrl_l F
+GLIBC_2.38 isctype F
+GLIBC_2.38 isdigit F
+GLIBC_2.38 isdigit_l F
+GLIBC_2.38 isfdtype F
+GLIBC_2.38 isgraph F
+GLIBC_2.38 isgraph_l F
+GLIBC_2.38 isinf F
+GLIBC_2.38 isinff F
+GLIBC_2.38 isinfl F
+GLIBC_2.38 islower F
+GLIBC_2.38 islower_l F
+GLIBC_2.38 isnan F
+GLIBC_2.38 isnanf F
+GLIBC_2.38 isnanl F
+GLIBC_2.38 isprint F
+GLIBC_2.38 isprint_l F
+GLIBC_2.38 ispunct F
+GLIBC_2.38 ispunct_l F
+GLIBC_2.38 isspace F
+GLIBC_2.38 isspace_l F
+GLIBC_2.38 isupper F
+GLIBC_2.38 isupper_l F
+GLIBC_2.38 iswalnum F
+GLIBC_2.38 iswalnum_l F
+GLIBC_2.38 iswalpha F
+GLIBC_2.38 iswalpha_l F
+GLIBC_2.38 iswblank F
+GLIBC_2.38 iswblank_l F
+GLIBC_2.38 iswcntrl F
+GLIBC_2.38 iswcntrl_l F
+GLIBC_2.38 iswctype F
+GLIBC_2.38 iswctype_l F
+GLIBC_2.38 iswdigit F
+GLIBC_2.38 iswdigit_l F
+GLIBC_2.38 iswgraph F
+GLIBC_2.38 iswgraph_l F
+GLIBC_2.38 iswlower F
+GLIBC_2.38 iswlower_l F
+GLIBC_2.38 iswprint F
+GLIBC_2.38 iswprint_l F
+GLIBC_2.38 iswpunct F
+GLIBC_2.38 iswpunct_l F
+GLIBC_2.38 iswspace F
+GLIBC_2.38 iswspace_l F
+GLIBC_2.38 iswupper F
+GLIBC_2.38 iswupper_l F
+GLIBC_2.38 iswxdigit F
+GLIBC_2.38 iswxdigit_l F
+GLIBC_2.38 isxdigit F
+GLIBC_2.38 isxdigit_l F
+GLIBC_2.38 jrand48 F
+GLIBC_2.38 jrand48_r F
+GLIBC_2.38 kill F
+GLIBC_2.38 killpg F
+GLIBC_2.38 l64a F
+GLIBC_2.38 labs F
+GLIBC_2.38 lchmod F
+GLIBC_2.38 lchown F
+GLIBC_2.38 lckpwdf F
+GLIBC_2.38 lcong48 F
+GLIBC_2.38 lcong48_r F
+GLIBC_2.38 ldexp F
+GLIBC_2.38 ldexpf F
+GLIBC_2.38 ldexpl F
+GLIBC_2.38 ldiv F
+GLIBC_2.38 lfind F
+GLIBC_2.38 lgetxattr F
+GLIBC_2.38 link F
+GLIBC_2.38 linkat F
+GLIBC_2.38 listen F
+GLIBC_2.38 listxattr F
+GLIBC_2.38 llabs F
+GLIBC_2.38 lldiv F
+GLIBC_2.38 llistxattr F
+GLIBC_2.38 localeconv F
+GLIBC_2.38 localtime F
+GLIBC_2.38 localtime_r F
+GLIBC_2.38 lockf F
+GLIBC_2.38 lockf64 F
+GLIBC_2.38 login F
+GLIBC_2.38 login_tty F
+GLIBC_2.38 logout F
+GLIBC_2.38 logwtmp F
+GLIBC_2.38 longjmp F
+GLIBC_2.38 lrand48 F
+GLIBC_2.38 lrand48_r F
+GLIBC_2.38 lremovexattr F
+GLIBC_2.38 lsearch F
+GLIBC_2.38 lseek F
+GLIBC_2.38 lseek64 F
+GLIBC_2.38 lsetxattr F
+GLIBC_2.38 lstat F
+GLIBC_2.38 lstat64 F
+GLIBC_2.38 lutimes F
+GLIBC_2.38 mach_error F
+GLIBC_2.38 mach_error_string F
+GLIBC_2.38 mach_error_type F
+GLIBC_2.38 mach_host_self F
+GLIBC_2.38 mach_msg F
+GLIBC_2.38 mach_msg_destroy F
+GLIBC_2.38 mach_msg_receive F
+GLIBC_2.38 mach_msg_send F
+GLIBC_2.38 mach_msg_server F
+GLIBC_2.38 mach_msg_server_timeout F
+GLIBC_2.38 mach_open_devstream F
+GLIBC_2.38 mach_port_allocate F
+GLIBC_2.38 mach_port_allocate_name F
+GLIBC_2.38 mach_port_deallocate F
+GLIBC_2.38 mach_port_insert_right F
+GLIBC_2.38 mach_print F
+GLIBC_2.38 mach_reply_port F
+GLIBC_2.38 mach_setup_thread F
+GLIBC_2.38 mach_setup_tls F
+GLIBC_2.38 mach_task_self F
+GLIBC_2.38 mach_thread_self F
+GLIBC_2.38 madvise F
+GLIBC_2.38 makecontext F
+GLIBC_2.38 mallinfo F
+GLIBC_2.38 mallinfo2 F
+GLIBC_2.38 malloc F
+GLIBC_2.38 malloc_info F
+GLIBC_2.38 malloc_stats F
+GLIBC_2.38 malloc_trim F
+GLIBC_2.38 malloc_usable_size F
+GLIBC_2.38 mallopt F
+GLIBC_2.38 mblen F
+GLIBC_2.38 mbrlen F
+GLIBC_2.38 mbrtoc16 F
+GLIBC_2.38 mbrtoc32 F
+GLIBC_2.38 mbrtoc8 F
+GLIBC_2.38 mbrtowc F
+GLIBC_2.38 mbsinit F
+GLIBC_2.38 mbsnrtowcs F
+GLIBC_2.38 mbsrtowcs F
+GLIBC_2.38 mbstowcs F
+GLIBC_2.38 mbtowc F
+GLIBC_2.38 mcheck F
+GLIBC_2.38 mcheck_check_all F
+GLIBC_2.38 mcheck_pedantic F
+GLIBC_2.38 mcount F
+GLIBC_2.38 memalign F
+GLIBC_2.38 memccpy F
+GLIBC_2.38 memchr F
+GLIBC_2.38 memcmp F
+GLIBC_2.38 memcpy F
+GLIBC_2.38 memfrob F
+GLIBC_2.38 memmem F
+GLIBC_2.38 memmove F
+GLIBC_2.38 mempcpy F
+GLIBC_2.38 memrchr F
+GLIBC_2.38 memset F
+GLIBC_2.38 mig_allocate F
+GLIBC_2.38 mig_dealloc_reply_port F
+GLIBC_2.38 mig_deallocate F
+GLIBC_2.38 mig_get_reply_port F
+GLIBC_2.38 mig_init F
+GLIBC_2.38 mig_put_reply_port F
+GLIBC_2.38 mig_strncpy F
+GLIBC_2.38 mincore F
+GLIBC_2.38 mkdir F
+GLIBC_2.38 mkdirat F
+GLIBC_2.38 mkdtemp F
+GLIBC_2.38 mkfifo F
+GLIBC_2.38 mkfifoat F
+GLIBC_2.38 mknod F
+GLIBC_2.38 mknodat F
+GLIBC_2.38 mkostemp F
+GLIBC_2.38 mkostemp64 F
+GLIBC_2.38 mkostemps F
+GLIBC_2.38 mkostemps64 F
+GLIBC_2.38 mkstemp F
+GLIBC_2.38 mkstemp64 F
+GLIBC_2.38 mkstemps F
+GLIBC_2.38 mkstemps64 F
+GLIBC_2.38 mktemp F
+GLIBC_2.38 mktime F
+GLIBC_2.38 mlock F
+GLIBC_2.38 mlockall F
+GLIBC_2.38 mmap F
+GLIBC_2.38 mmap64 F
+GLIBC_2.38 modf F
+GLIBC_2.38 modff F
+GLIBC_2.38 modfl F
+GLIBC_2.38 moncontrol F
+GLIBC_2.38 monstartup F
+GLIBC_2.38 mprobe F
+GLIBC_2.38 mprotect F
+GLIBC_2.38 mrand48 F
+GLIBC_2.38 mrand48_r F
+GLIBC_2.38 mremap F
+GLIBC_2.38 msgctl F
+GLIBC_2.38 msgget F
+GLIBC_2.38 msgrcv F
+GLIBC_2.38 msgsnd F
+GLIBC_2.38 msync F
+GLIBC_2.38 mtrace F
+GLIBC_2.38 munlock F
+GLIBC_2.38 munlockall F
+GLIBC_2.38 munmap F
+GLIBC_2.38 muntrace F
+GLIBC_2.38 nanosleep F
+GLIBC_2.38 newlocale F
+GLIBC_2.38 nftw F
+GLIBC_2.38 nftw64 F
+GLIBC_2.38 ngettext F
+GLIBC_2.38 nice F
+GLIBC_2.38 nl_langinfo F
+GLIBC_2.38 nl_langinfo_l F
+GLIBC_2.38 nrand48 F
+GLIBC_2.38 nrand48_r F
+GLIBC_2.38 ns_name_compress F
+GLIBC_2.38 ns_name_ntop F
+GLIBC_2.38 ns_name_pack F
+GLIBC_2.38 ns_name_pton F
+GLIBC_2.38 ns_name_skip F
+GLIBC_2.38 ns_name_uncompress F
+GLIBC_2.38 ns_name_unpack F
+GLIBC_2.38 ntohl F
+GLIBC_2.38 ntohs F
+GLIBC_2.38 obstack_alloc_failed_handler D 0x8
+GLIBC_2.38 obstack_exit_failure D 0x4
+GLIBC_2.38 obstack_free F
+GLIBC_2.38 obstack_printf F
+GLIBC_2.38 obstack_vprintf F
+GLIBC_2.38 on_exit F
+GLIBC_2.38 open F
+GLIBC_2.38 open64 F
+GLIBC_2.38 open_memstream F
+GLIBC_2.38 open_wmemstream F
+GLIBC_2.38 openat F
+GLIBC_2.38 openat64 F
+GLIBC_2.38 opendir F
+GLIBC_2.38 openlog F
+GLIBC_2.38 openport F
+GLIBC_2.38 openpty F
+GLIBC_2.38 optarg D 0x8
+GLIBC_2.38 opterr D 0x4
+GLIBC_2.38 optind D 0x4
+GLIBC_2.38 optopt D 0x4
+GLIBC_2.38 parse_printf_format F
+GLIBC_2.38 pathconf F
+GLIBC_2.38 pause F
+GLIBC_2.38 pclose F
+GLIBC_2.38 perror F
+GLIBC_2.38 pid2task F
+GLIBC_2.38 pipe F
+GLIBC_2.38 pipe2 F
+GLIBC_2.38 poll F
+GLIBC_2.38 popen F
+GLIBC_2.38 posix_fadvise F
+GLIBC_2.38 posix_fadvise64 F
+GLIBC_2.38 posix_fallocate F
+GLIBC_2.38 posix_fallocate64 F
+GLIBC_2.38 posix_madvise F
+GLIBC_2.38 posix_memalign F
+GLIBC_2.38 posix_openpt F
+GLIBC_2.38 posix_spawn F
+GLIBC_2.38 posix_spawn_file_actions_addchdir_np F
+GLIBC_2.38 posix_spawn_file_actions_addclose F
+GLIBC_2.38 posix_spawn_file_actions_addclosefrom_np F
+GLIBC_2.38 posix_spawn_file_actions_adddup2 F
+GLIBC_2.38 posix_spawn_file_actions_addfchdir_np F
+GLIBC_2.38 posix_spawn_file_actions_addopen F
+GLIBC_2.38 posix_spawn_file_actions_addtcsetpgrp_np F
+GLIBC_2.38 posix_spawn_file_actions_destroy F
+GLIBC_2.38 posix_spawn_file_actions_init F
+GLIBC_2.38 posix_spawnattr_destroy F
+GLIBC_2.38 posix_spawnattr_getflags F
+GLIBC_2.38 posix_spawnattr_getpgroup F
+GLIBC_2.38 posix_spawnattr_getschedparam F
+GLIBC_2.38 posix_spawnattr_getschedpolicy F
+GLIBC_2.38 posix_spawnattr_getsigdefault F
+GLIBC_2.38 posix_spawnattr_getsigmask F
+GLIBC_2.38 posix_spawnattr_init F
+GLIBC_2.38 posix_spawnattr_setflags F
+GLIBC_2.38 posix_spawnattr_setpgroup F
+GLIBC_2.38 posix_spawnattr_setschedparam F
+GLIBC_2.38 posix_spawnattr_setschedpolicy F
+GLIBC_2.38 posix_spawnattr_setsigdefault F
+GLIBC_2.38 posix_spawnattr_setsigmask F
+GLIBC_2.38 posix_spawnp F
+GLIBC_2.38 ppoll F
+GLIBC_2.38 pread F
+GLIBC_2.38 pread64 F
+GLIBC_2.38 preadv F
+GLIBC_2.38 preadv2 F
+GLIBC_2.38 preadv64 F
+GLIBC_2.38 preadv64v2 F
+GLIBC_2.38 printf F
+GLIBC_2.38 printf_size F
+GLIBC_2.38 printf_size_info F
+GLIBC_2.38 profil F
+GLIBC_2.38 program_invocation_name D 0x8
+GLIBC_2.38 program_invocation_short_name D 0x8
+GLIBC_2.38 pselect F
+GLIBC_2.38 psiginfo F
+GLIBC_2.38 psignal F
+GLIBC_2.38 pthread_attr_destroy F
+GLIBC_2.38 pthread_attr_getdetachstate F
+GLIBC_2.38 pthread_attr_getinheritsched F
+GLIBC_2.38 pthread_attr_getschedparam F
+GLIBC_2.38 pthread_attr_getschedpolicy F
+GLIBC_2.38 pthread_attr_getscope F
+GLIBC_2.38 pthread_attr_init F
+GLIBC_2.38 pthread_attr_setdetachstate F
+GLIBC_2.38 pthread_attr_setinheritsched F
+GLIBC_2.38 pthread_attr_setschedparam F
+GLIBC_2.38 pthread_attr_setschedpolicy F
+GLIBC_2.38 pthread_attr_setscope F
+GLIBC_2.38 pthread_cond_broadcast F
+GLIBC_2.38 pthread_cond_destroy F
+GLIBC_2.38 pthread_cond_init F
+GLIBC_2.38 pthread_cond_signal F
+GLIBC_2.38 pthread_cond_timedwait F
+GLIBC_2.38 pthread_cond_wait F
+GLIBC_2.38 pthread_condattr_destroy F
+GLIBC_2.38 pthread_condattr_init F
+GLIBC_2.38 pthread_equal F
+GLIBC_2.38 pthread_exit F
+GLIBC_2.38 pthread_getschedparam F
+GLIBC_2.38 pthread_mutex_destroy F
+GLIBC_2.38 pthread_mutex_init F
+GLIBC_2.38 pthread_mutex_lock F
+GLIBC_2.38 pthread_mutex_unlock F
+GLIBC_2.38 pthread_self F
+GLIBC_2.38 pthread_setcancelstate F
+GLIBC_2.38 pthread_setcanceltype F
+GLIBC_2.38 pthread_setschedparam F
+GLIBC_2.38 ptrace F
+GLIBC_2.38 ptsname F
+GLIBC_2.38 ptsname_r F
+GLIBC_2.38 putc F
+GLIBC_2.38 putc_unlocked F
+GLIBC_2.38 putchar F
+GLIBC_2.38 putchar_unlocked F
+GLIBC_2.38 putenv F
+GLIBC_2.38 putgrent F
+GLIBC_2.38 putpwent F
+GLIBC_2.38 puts F
+GLIBC_2.38 putsgent F
+GLIBC_2.38 putspent F
+GLIBC_2.38 pututline F
+GLIBC_2.38 pututxline F
+GLIBC_2.38 putw F
+GLIBC_2.38 putwc F
+GLIBC_2.38 putwc_unlocked F
+GLIBC_2.38 putwchar F
+GLIBC_2.38 putwchar_unlocked F
+GLIBC_2.38 pvalloc F
+GLIBC_2.38 pwrite F
+GLIBC_2.38 pwrite64 F
+GLIBC_2.38 pwritev F
+GLIBC_2.38 pwritev2 F
+GLIBC_2.38 pwritev64 F
+GLIBC_2.38 pwritev64v2 F
+GLIBC_2.38 qecvt F
+GLIBC_2.38 qecvt_r F
+GLIBC_2.38 qfcvt F
+GLIBC_2.38 qfcvt_r F
+GLIBC_2.38 qgcvt F
+GLIBC_2.38 qsort F
+GLIBC_2.38 qsort_r F
+GLIBC_2.38 quick_exit F
+GLIBC_2.38 raise F
+GLIBC_2.38 rand F
+GLIBC_2.38 rand_r F
+GLIBC_2.38 random F
+GLIBC_2.38 random_r F
+GLIBC_2.38 rawmemchr F
+GLIBC_2.38 rcmd F
+GLIBC_2.38 rcmd_af F
+GLIBC_2.38 re_comp F
+GLIBC_2.38 re_compile_fastmap F
+GLIBC_2.38 re_compile_pattern F
+GLIBC_2.38 re_exec F
+GLIBC_2.38 re_match F
+GLIBC_2.38 re_match_2 F
+GLIBC_2.38 re_search F
+GLIBC_2.38 re_search_2 F
+GLIBC_2.38 re_set_registers F
+GLIBC_2.38 re_set_syntax F
+GLIBC_2.38 re_syntax_options D 0x8
+GLIBC_2.38 read F
+GLIBC_2.38 readdir F
+GLIBC_2.38 readdir64 F
+GLIBC_2.38 readdir64_r F
+GLIBC_2.38 readdir_r F
+GLIBC_2.38 readlink F
+GLIBC_2.38 readlinkat F
+GLIBC_2.38 readv F
+GLIBC_2.38 realloc F
+GLIBC_2.38 reallocarray F
+GLIBC_2.38 realpath F
+GLIBC_2.38 reboot F
+GLIBC_2.38 recv F
+GLIBC_2.38 recvfrom F
+GLIBC_2.38 recvmmsg F
+GLIBC_2.38 recvmsg F
+GLIBC_2.38 regcomp F
+GLIBC_2.38 regerror F
+GLIBC_2.38 regexec F
+GLIBC_2.38 regfree F
+GLIBC_2.38 register_printf_function F
+GLIBC_2.38 register_printf_modifier F
+GLIBC_2.38 register_printf_specifier F
+GLIBC_2.38 register_printf_type F
+GLIBC_2.38 remap_file_pages F
+GLIBC_2.38 remove F
+GLIBC_2.38 removexattr F
+GLIBC_2.38 remque F
+GLIBC_2.38 rename F
+GLIBC_2.38 renameat F
+GLIBC_2.38 renameat2 F
+GLIBC_2.38 res_dnok F
+GLIBC_2.38 res_hnok F
+GLIBC_2.38 res_mailok F
+GLIBC_2.38 res_mkquery F
+GLIBC_2.38 res_nmkquery F
+GLIBC_2.38 res_nquery F
+GLIBC_2.38 res_nquerydomain F
+GLIBC_2.38 res_nsearch F
+GLIBC_2.38 res_nsend F
+GLIBC_2.38 res_ownok F
+GLIBC_2.38 res_query F
+GLIBC_2.38 res_querydomain F
+GLIBC_2.38 res_search F
+GLIBC_2.38 res_send F
+GLIBC_2.38 revoke F
+GLIBC_2.38 rewind F
+GLIBC_2.38 rewinddir F
+GLIBC_2.38 rexec F
+GLIBC_2.38 rexec_af F
+GLIBC_2.38 rexecoptions D 0x4
+GLIBC_2.38 rindex F
+GLIBC_2.38 rmdir F
+GLIBC_2.38 rpmatch F
+GLIBC_2.38 rresvport F
+GLIBC_2.38 rresvport_af F
+GLIBC_2.38 ruserok F
+GLIBC_2.38 ruserok_af F
+GLIBC_2.38 ruserpass F
+GLIBC_2.38 sbrk F
+GLIBC_2.38 scalbn F
+GLIBC_2.38 scalbnf F
+GLIBC_2.38 scalbnl F
+GLIBC_2.38 scandir F
+GLIBC_2.38 scandir64 F
+GLIBC_2.38 scandirat F
+GLIBC_2.38 scandirat64 F
+GLIBC_2.38 scanf F
+GLIBC_2.38 sched_get_priority_max F
+GLIBC_2.38 sched_get_priority_min F
+GLIBC_2.38 sched_getaffinity F
+GLIBC_2.38 sched_getparam F
+GLIBC_2.38 sched_getscheduler F
+GLIBC_2.38 sched_rr_get_interval F
+GLIBC_2.38 sched_setaffinity F
+GLIBC_2.38 sched_setparam F
+GLIBC_2.38 sched_setscheduler F
+GLIBC_2.38 sched_yield F
+GLIBC_2.38 secure_getenv F
+GLIBC_2.38 seed48 F
+GLIBC_2.38 seed48_r F
+GLIBC_2.38 seekdir F
+GLIBC_2.38 select F
+GLIBC_2.38 semctl F
+GLIBC_2.38 semget F
+GLIBC_2.38 semop F
+GLIBC_2.38 semtimedop F
+GLIBC_2.38 send F
+GLIBC_2.38 sendfile F
+GLIBC_2.38 sendfile64 F
+GLIBC_2.38 sendmmsg F
+GLIBC_2.38 sendmsg F
+GLIBC_2.38 sendto F
+GLIBC_2.38 setaliasent F
+GLIBC_2.38 setauth F
+GLIBC_2.38 setbuf F
+GLIBC_2.38 setbuffer F
+GLIBC_2.38 setcontext F
+GLIBC_2.38 setcrdir F
+GLIBC_2.38 setcttyid F
+GLIBC_2.38 setcwdir F
+GLIBC_2.38 setdomainname F
+GLIBC_2.38 setegid F
+GLIBC_2.38 setenv F
+GLIBC_2.38 seteuid F
+GLIBC_2.38 seteuids F
+GLIBC_2.38 setfsent F
+GLIBC_2.38 setgid F
+GLIBC_2.38 setgrent F
+GLIBC_2.38 setgroups F
+GLIBC_2.38 sethostent F
+GLIBC_2.38 sethostid F
+GLIBC_2.38 sethostname F
+GLIBC_2.38 setipv4sourcefilter F
+GLIBC_2.38 setitimer F
+GLIBC_2.38 setjmp F
+GLIBC_2.38 setlinebuf F
+GLIBC_2.38 setlocale F
+GLIBC_2.38 setlogin F
+GLIBC_2.38 setlogmask F
+GLIBC_2.38 setmntent F
+GLIBC_2.38 setnetent F
+GLIBC_2.38 setnetgrent F
+GLIBC_2.38 setpgid F
+GLIBC_2.38 setpgrp F
+GLIBC_2.38 setpriority F
+GLIBC_2.38 setproc F
+GLIBC_2.38 setprotoent F
+GLIBC_2.38 setpwent F
+GLIBC_2.38 setregid F
+GLIBC_2.38 setresgid F
+GLIBC_2.38 setresuid F
+GLIBC_2.38 setreuid F
+GLIBC_2.38 setrlimit F
+GLIBC_2.38 setrlimit64 F
+GLIBC_2.38 setrpcent F
+GLIBC_2.38 setservent F
+GLIBC_2.38 setsgent F
+GLIBC_2.38 setsid F
+GLIBC_2.38 setsockopt F
+GLIBC_2.38 setsourcefilter F
+GLIBC_2.38 setspent F
+GLIBC_2.38 setstate F
+GLIBC_2.38 setstate_r F
+GLIBC_2.38 settimeofday F
+GLIBC_2.38 setttyent F
+GLIBC_2.38 setuid F
+GLIBC_2.38 setusershell F
+GLIBC_2.38 setutent F
+GLIBC_2.38 setutxent F
+GLIBC_2.38 setvbuf F
+GLIBC_2.38 setxattr F
+GLIBC_2.38 sgetsgent F
+GLIBC_2.38 sgetsgent_r F
+GLIBC_2.38 sgetspent F
+GLIBC_2.38 sgetspent_r F
+GLIBC_2.38 shm_open F
+GLIBC_2.38 shm_unlink F
+GLIBC_2.38 shmat F
+GLIBC_2.38 shmctl F
+GLIBC_2.38 shmdt F
+GLIBC_2.38 shmget F
+GLIBC_2.38 shutdown F
+GLIBC_2.38 sigabbrev_np F
+GLIBC_2.38 sigaction F
+GLIBC_2.38 sigaddset F
+GLIBC_2.38 sigaltstack F
+GLIBC_2.38 sigandset F
+GLIBC_2.38 sigblock F
+GLIBC_2.38 sigdelset F
+GLIBC_2.38 sigdescr_np F
+GLIBC_2.38 sigemptyset F
+GLIBC_2.38 sigfillset F
+GLIBC_2.38 siggetmask F
+GLIBC_2.38 sighold F
+GLIBC_2.38 sigignore F
+GLIBC_2.38 siginterrupt F
+GLIBC_2.38 sigisemptyset F
+GLIBC_2.38 sigismember F
+GLIBC_2.38 siglongjmp F
+GLIBC_2.38 signal F
+GLIBC_2.38 sigorset F
+GLIBC_2.38 sigpause F
+GLIBC_2.38 sigpending F
+GLIBC_2.38 sigprocmask F
+GLIBC_2.38 sigqueue F
+GLIBC_2.38 sigrelse F
+GLIBC_2.38 sigreturn F
+GLIBC_2.38 sigset F
+GLIBC_2.38 sigsetmask F
+GLIBC_2.38 sigstack F
+GLIBC_2.38 sigsuspend F
+GLIBC_2.38 sigtimedwait F
+GLIBC_2.38 sigwait F
+GLIBC_2.38 sigwaitinfo F
+GLIBC_2.38 sleep F
+GLIBC_2.38 snprintf F
+GLIBC_2.38 sockatmark F
+GLIBC_2.38 socket F
+GLIBC_2.38 socketpair F
+GLIBC_2.38 sprintf F
+GLIBC_2.38 sprofil F
+GLIBC_2.38 srand F
+GLIBC_2.38 srand48 F
+GLIBC_2.38 srand48_r F
+GLIBC_2.38 srandom F
+GLIBC_2.38 srandom_r F
+GLIBC_2.38 sscanf F
+GLIBC_2.38 ssignal F
+GLIBC_2.38 stat F
+GLIBC_2.38 stat64 F
+GLIBC_2.38 statfs F
+GLIBC_2.38 statfs64 F
+GLIBC_2.38 statvfs F
+GLIBC_2.38 statvfs64 F
+GLIBC_2.38 statx F
+GLIBC_2.38 stderr D 0x8
+GLIBC_2.38 stdin D 0x8
+GLIBC_2.38 stdout D 0x8
+GLIBC_2.38 stpcpy F
+GLIBC_2.38 stpncpy F
+GLIBC_2.38 strcasecmp F
+GLIBC_2.38 strcasecmp_l F
+GLIBC_2.38 strcasestr F
+GLIBC_2.38 strcat F
+GLIBC_2.38 strchr F
+GLIBC_2.38 strchrnul F
+GLIBC_2.38 strcmp F
+GLIBC_2.38 strcoll F
+GLIBC_2.38 strcoll_l F
+GLIBC_2.38 strcpy F
+GLIBC_2.38 strcspn F
+GLIBC_2.38 strdup F
+GLIBC_2.38 strerror F
+GLIBC_2.38 strerror_l F
+GLIBC_2.38 strerror_r F
+GLIBC_2.38 strerrordesc_np F
+GLIBC_2.38 strerrorname_np F
+GLIBC_2.38 strfmon F
+GLIBC_2.38 strfmon_l F
+GLIBC_2.38 strfromd F
+GLIBC_2.38 strfromf F
+GLIBC_2.38 strfromf128 F
+GLIBC_2.38 strfromf32 F
+GLIBC_2.38 strfromf32x F
+GLIBC_2.38 strfromf64 F
+GLIBC_2.38 strfromf64x F
+GLIBC_2.38 strfroml F
+GLIBC_2.38 strfry F
+GLIBC_2.38 strftime F
+GLIBC_2.38 strftime_l F
+GLIBC_2.38 strlen F
+GLIBC_2.38 strncasecmp F
+GLIBC_2.38 strncasecmp_l F
+GLIBC_2.38 strncat F
+GLIBC_2.38 strncmp F
+GLIBC_2.38 strncpy F
+GLIBC_2.38 strndup F
+GLIBC_2.38 strnlen F
+GLIBC_2.38 strpbrk F
+GLIBC_2.38 strptime F
+GLIBC_2.38 strptime_l F
+GLIBC_2.38 strrchr F
+GLIBC_2.38 strsep F
+GLIBC_2.38 strsignal F
+GLIBC_2.38 strspn F
+GLIBC_2.38 strstr F
+GLIBC_2.38 strtod F
+GLIBC_2.38 strtod_l F
+GLIBC_2.38 strtof F
+GLIBC_2.38 strtof128 F
+GLIBC_2.38 strtof128_l F
+GLIBC_2.38 strtof32 F
+GLIBC_2.38 strtof32_l F
+GLIBC_2.38 strtof32x F
+GLIBC_2.38 strtof32x_l F
+GLIBC_2.38 strtof64 F
+GLIBC_2.38 strtof64_l F
+GLIBC_2.38 strtof64x F
+GLIBC_2.38 strtof64x_l F
+GLIBC_2.38 strtof_l F
+GLIBC_2.38 strtoimax F
+GLIBC_2.38 strtok F
+GLIBC_2.38 strtok_r F
+GLIBC_2.38 strtol F
+GLIBC_2.38 strtol_l F
+GLIBC_2.38 strtold F
+GLIBC_2.38 strtold_l F
+GLIBC_2.38 strtoll F
+GLIBC_2.38 strtoll_l F
+GLIBC_2.38 strtoq F
+GLIBC_2.38 strtoul F
+GLIBC_2.38 strtoul_l F
+GLIBC_2.38 strtoull F
+GLIBC_2.38 strtoull_l F
+GLIBC_2.38 strtoumax F
+GLIBC_2.38 strtouq F
+GLIBC_2.38 strverscmp F
+GLIBC_2.38 strxfrm F
+GLIBC_2.38 strxfrm_l F
+GLIBC_2.38 stty F
+GLIBC_2.38 swab F
+GLIBC_2.38 swapcontext F
+GLIBC_2.38 swprintf F
+GLIBC_2.38 swscanf F
+GLIBC_2.38 swtch F
+GLIBC_2.38 swtch_pri F
+GLIBC_2.38 symlink F
+GLIBC_2.38 symlinkat F
+GLIBC_2.38 sync F
+GLIBC_2.38 syncfs F
+GLIBC_2.38 syscall F
+GLIBC_2.38 sysconf F
+GLIBC_2.38 syslog F
+GLIBC_2.38 system F
+GLIBC_2.38 sysv_signal F
+GLIBC_2.38 task2pid F
+GLIBC_2.38 task_create F
+GLIBC_2.38 task_set_special_port F
+GLIBC_2.38 task_suspend F
+GLIBC_2.38 task_terminate F
+GLIBC_2.38 tcdrain F
+GLIBC_2.38 tcflow F
+GLIBC_2.38 tcflush F
+GLIBC_2.38 tcgetattr F
+GLIBC_2.38 tcgetpgrp F
+GLIBC_2.38 tcgetsid F
+GLIBC_2.38 tcsendbreak F
+GLIBC_2.38 tcsetattr F
+GLIBC_2.38 tcsetpgrp F
+GLIBC_2.38 tdelete F
+GLIBC_2.38 tdestroy F
+GLIBC_2.38 telldir F
+GLIBC_2.38 tempnam F
+GLIBC_2.38 textdomain F
+GLIBC_2.38 tfind F
+GLIBC_2.38 thrd_current F
+GLIBC_2.38 thrd_equal F
+GLIBC_2.38 thrd_sleep F
+GLIBC_2.38 thrd_yield F
+GLIBC_2.38 thread_depress_abort F
+GLIBC_2.38 thread_switch F
+GLIBC_2.38 time F
+GLIBC_2.38 timegm F
+GLIBC_2.38 timelocal F
+GLIBC_2.38 times F
+GLIBC_2.38 timespec_get F
+GLIBC_2.38 timespec_getres F
+GLIBC_2.38 timezone D 0x8
+GLIBC_2.38 tmpfile F
+GLIBC_2.38 tmpfile64 F
+GLIBC_2.38 tmpnam F
+GLIBC_2.38 tmpnam_r F
+GLIBC_2.38 toascii F
+GLIBC_2.38 tolower F
+GLIBC_2.38 tolower_l F
+GLIBC_2.38 toupper F
+GLIBC_2.38 toupper_l F
+GLIBC_2.38 towctrans F
+GLIBC_2.38 towctrans_l F
+GLIBC_2.38 towlower F
+GLIBC_2.38 towlower_l F
+GLIBC_2.38 towupper F
+GLIBC_2.38 towupper_l F
+GLIBC_2.38 truncate F
+GLIBC_2.38 truncate64 F
+GLIBC_2.38 tsearch F
+GLIBC_2.38 ttyname F
+GLIBC_2.38 ttyname_r F
+GLIBC_2.38 ttyslot F
+GLIBC_2.38 twalk F
+GLIBC_2.38 twalk_r F
+GLIBC_2.38 tzname D 0x10
+GLIBC_2.38 tzset F
+GLIBC_2.38 ualarm F
+GLIBC_2.38 ulckpwdf F
+GLIBC_2.38 ulimit F
+GLIBC_2.38 umask F
+GLIBC_2.38 uname F
+GLIBC_2.38 ungetc F
+GLIBC_2.38 ungetwc F
+GLIBC_2.38 unlink F
+GLIBC_2.38 unlinkat F
+GLIBC_2.38 unlockpt F
+GLIBC_2.38 unsetenv F
+GLIBC_2.38 updwtmp F
+GLIBC_2.38 updwtmpx F
+GLIBC_2.38 uselocale F
+GLIBC_2.38 usleep F
+GLIBC_2.38 utime F
+GLIBC_2.38 utimensat F
+GLIBC_2.38 utimes F
+GLIBC_2.38 utmpname F
+GLIBC_2.38 utmpxname F
+GLIBC_2.38 valloc F
+GLIBC_2.38 vasprintf F
+GLIBC_2.38 vdprintf F
+GLIBC_2.38 verr F
+GLIBC_2.38 verrx F
+GLIBC_2.38 versionsort F
+GLIBC_2.38 versionsort64 F
+GLIBC_2.38 vfork F
+GLIBC_2.38 vfprintf F
+GLIBC_2.38 vfscanf F
+GLIBC_2.38 vfwprintf F
+GLIBC_2.38 vfwscanf F
+GLIBC_2.38 vhangup F
+GLIBC_2.38 vlimit F
+GLIBC_2.38 vm_allocate F
+GLIBC_2.38 vm_deallocate F
+GLIBC_2.38 vm_map F
+GLIBC_2.38 vm_page_size D 0x8
+GLIBC_2.38 vpprintf F
+GLIBC_2.38 vprintf F
+GLIBC_2.38 vscanf F
+GLIBC_2.38 vsnprintf F
+GLIBC_2.38 vsprintf F
+GLIBC_2.38 vsscanf F
+GLIBC_2.38 vswprintf F
+GLIBC_2.38 vswscanf F
+GLIBC_2.38 vsyslog F
+GLIBC_2.38 vwarn F
+GLIBC_2.38 vwarnx F
+GLIBC_2.38 vwprintf F
+GLIBC_2.38 vwscanf F
+GLIBC_2.38 wait F
+GLIBC_2.38 wait3 F
+GLIBC_2.38 wait4 F
+GLIBC_2.38 waitid F
+GLIBC_2.38 waitpid F
+GLIBC_2.38 warn F
+GLIBC_2.38 warnx F
+GLIBC_2.38 wcpcpy F
+GLIBC_2.38 wcpncpy F
+GLIBC_2.38 wcrtomb F
+GLIBC_2.38 wcscasecmp F
+GLIBC_2.38 wcscasecmp_l F
+GLIBC_2.38 wcscat F
+GLIBC_2.38 wcschr F
+GLIBC_2.38 wcschrnul F
+GLIBC_2.38 wcscmp F
+GLIBC_2.38 wcscoll F
+GLIBC_2.38 wcscoll_l F
+GLIBC_2.38 wcscpy F
+GLIBC_2.38 wcscspn F
+GLIBC_2.38 wcsdup F
+GLIBC_2.38 wcsftime F
+GLIBC_2.38 wcsftime_l F
+GLIBC_2.38 wcslen F
+GLIBC_2.38 wcsncasecmp F
+GLIBC_2.38 wcsncasecmp_l F
+GLIBC_2.38 wcsncat F
+GLIBC_2.38 wcsncmp F
+GLIBC_2.38 wcsncpy F
+GLIBC_2.38 wcsnlen F
+GLIBC_2.38 wcsnrtombs F
+GLIBC_2.38 wcspbrk F
+GLIBC_2.38 wcsrchr F
+GLIBC_2.38 wcsrtombs F
+GLIBC_2.38 wcsspn F
+GLIBC_2.38 wcsstr F
+GLIBC_2.38 wcstod F
+GLIBC_2.38 wcstod_l F
+GLIBC_2.38 wcstof F
+GLIBC_2.38 wcstof128 F
+GLIBC_2.38 wcstof128_l F
+GLIBC_2.38 wcstof32 F
+GLIBC_2.38 wcstof32_l F
+GLIBC_2.38 wcstof32x F
+GLIBC_2.38 wcstof32x_l F
+GLIBC_2.38 wcstof64 F
+GLIBC_2.38 wcstof64_l F
+GLIBC_2.38 wcstof64x F
+GLIBC_2.38 wcstof64x_l F
+GLIBC_2.38 wcstof_l F
+GLIBC_2.38 wcstoimax F
+GLIBC_2.38 wcstok F
+GLIBC_2.38 wcstol F
+GLIBC_2.38 wcstol_l F
+GLIBC_2.38 wcstold F
+GLIBC_2.38 wcstold_l F
+GLIBC_2.38 wcstoll F
+GLIBC_2.38 wcstoll_l F
+GLIBC_2.38 wcstombs F
+GLIBC_2.38 wcstoq F
+GLIBC_2.38 wcstoul F
+GLIBC_2.38 wcstoul_l F
+GLIBC_2.38 wcstoull F
+GLIBC_2.38 wcstoull_l F
+GLIBC_2.38 wcstoumax F
+GLIBC_2.38 wcstouq F
+GLIBC_2.38 wcswcs F
+GLIBC_2.38 wcswidth F
+GLIBC_2.38 wcsxfrm F
+GLIBC_2.38 wcsxfrm_l F
+GLIBC_2.38 wctob F
+GLIBC_2.38 wctomb F
+GLIBC_2.38 wctrans F
+GLIBC_2.38 wctrans_l F
+GLIBC_2.38 wctype F
+GLIBC_2.38 wctype_l F
+GLIBC_2.38 wcwidth F
+GLIBC_2.38 wmemchr F
+GLIBC_2.38 wmemcmp F
+GLIBC_2.38 wmemcpy F
+GLIBC_2.38 wmemmove F
+GLIBC_2.38 wmempcpy F
+GLIBC_2.38 wmemset F
+GLIBC_2.38 wordexp F
+GLIBC_2.38 wordfree F
+GLIBC_2.38 wprintf F
+GLIBC_2.38 write F
+GLIBC_2.38 writev F
+GLIBC_2.38 wscanf F
+HURD_CTHREADS_0.3 __cthread_getspecific F
+HURD_CTHREADS_0.3 __cthread_keycreate F
+HURD_CTHREADS_0.3 __cthread_setspecific F
+HURD_CTHREADS_0.3 __mutex_init F
+HURD_CTHREADS_0.3 __mutex_lock F
+HURD_CTHREADS_0.3 __mutex_lock_solid F
+HURD_CTHREADS_0.3 __mutex_trylock F
+HURD_CTHREADS_0.3 __mutex_unlock F
+HURD_CTHREADS_0.3 __mutex_unlock_solid F
+HURD_CTHREADS_0.3 __spin_lock F
+HURD_CTHREADS_0.3 __spin_lock_init F
+HURD_CTHREADS_0.3 __spin_lock_solid F
+HURD_CTHREADS_0.3 __spin_try_lock F
+HURD_CTHREADS_0.3 __spin_unlock F
diff --git a/sysdeps/mach/hurd/x86_64/libc_malloc_debug.abilist b/sysdeps/mach/hurd/x86_64/libc_malloc_debug.abilist
new file mode 100644
index 00000000..012c48df
--- /dev/null
+++ b/sysdeps/mach/hurd/x86_64/libc_malloc_debug.abilist
@@ -0,0 +1,26 @@
+GLIBC_2.38 __free_hook D 0x8
+GLIBC_2.38 __malloc_hook D 0x8
+GLIBC_2.38 __memalign_hook D 0x8
+GLIBC_2.38 __realloc_hook D 0x8
+GLIBC_2.38 aligned_alloc F
+GLIBC_2.38 calloc F
+GLIBC_2.38 free F
+GLIBC_2.38 mallinfo F
+GLIBC_2.38 mallinfo2 F
+GLIBC_2.38 malloc F
+GLIBC_2.38 malloc_info F
+GLIBC_2.38 malloc_stats F
+GLIBC_2.38 malloc_trim F
+GLIBC_2.38 malloc_usable_size F
+GLIBC_2.38 mallopt F
+GLIBC_2.38 mcheck F
+GLIBC_2.38 mcheck_check_all F
+GLIBC_2.38 mcheck_pedantic F
+GLIBC_2.38 memalign F
+GLIBC_2.38 mprobe F
+GLIBC_2.38 mtrace F
+GLIBC_2.38 muntrace F
+GLIBC_2.38 posix_memalign F
+GLIBC_2.38 pvalloc F
+GLIBC_2.38 realloc F
+GLIBC_2.38 valloc F
diff --git a/sysdeps/mach/hurd/x86_64/libcrypt.abilist b/sysdeps/mach/hurd/x86_64/libcrypt.abilist
new file mode 100644
index 00000000..3ee068a0
--- /dev/null
+++ b/sysdeps/mach/hurd/x86_64/libcrypt.abilist
@@ -0,0 +1,2 @@
+GLIBC_2.38 crypt F
+GLIBC_2.38 crypt_r F
diff --git a/sysdeps/mach/hurd/x86_64/libdl.abilist b/sysdeps/mach/hurd/x86_64/libdl.abilist
new file mode 100644
index 00000000..e69de29b
diff --git a/sysdeps/mach/hurd/x86_64/libm.abilist b/sysdeps/mach/hurd/x86_64/libm.abilist
new file mode 100644
index 00000000..5c762b93
--- /dev/null
+++ b/sysdeps/mach/hurd/x86_64/libm.abilist
@@ -0,0 +1,1040 @@
+GLIBC_2.38 __clog10 F
+GLIBC_2.38 __clog10f F
+GLIBC_2.38 __clog10l F
+GLIBC_2.38 __finite F
+GLIBC_2.38 __finitef F
+GLIBC_2.38 __finitef128 F
+GLIBC_2.38 __finitel F
+GLIBC_2.38 __fpclassify F
+GLIBC_2.38 __fpclassifyf F
+GLIBC_2.38 __fpclassifyf128 F
+GLIBC_2.38 __fpclassifyl F
+GLIBC_2.38 __iscanonicall F
+GLIBC_2.38 __iseqsig F
+GLIBC_2.38 __iseqsigf F
+GLIBC_2.38 __iseqsigf128 F
+GLIBC_2.38 __iseqsigl F
+GLIBC_2.38 __isinff128 F
+GLIBC_2.38 __issignaling F
+GLIBC_2.38 __issignalingf F
+GLIBC_2.38 __issignalingf128 F
+GLIBC_2.38 __issignalingl F
+GLIBC_2.38 __log10l_finite F
+GLIBC_2.38 __log2l_finite F
+GLIBC_2.38 __logl_finite F
+GLIBC_2.38 __signbit F
+GLIBC_2.38 __signbitf F
+GLIBC_2.38 __signbitf128 F
+GLIBC_2.38 __signbitl F
+GLIBC_2.38 __signgam D 0x4
+GLIBC_2.38 acos F
+GLIBC_2.38 acosf F
+GLIBC_2.38 acosf128 F
+GLIBC_2.38 acosf32 F
+GLIBC_2.38 acosf32x F
+GLIBC_2.38 acosf64 F
+GLIBC_2.38 acosf64x F
+GLIBC_2.38 acosh F
+GLIBC_2.38 acoshf F
+GLIBC_2.38 acoshf128 F
+GLIBC_2.38 acoshf32 F
+GLIBC_2.38 acoshf32x F
+GLIBC_2.38 acoshf64 F
+GLIBC_2.38 acoshf64x F
+GLIBC_2.38 acoshl F
+GLIBC_2.38 acosl F
+GLIBC_2.38 asin F
+GLIBC_2.38 asinf F
+GLIBC_2.38 asinf128 F
+GLIBC_2.38 asinf32 F
+GLIBC_2.38 asinf32x F
+GLIBC_2.38 asinf64 F
+GLIBC_2.38 asinf64x F
+GLIBC_2.38 asinh F
+GLIBC_2.38 asinhf F
+GLIBC_2.38 asinhf128 F
+GLIBC_2.38 asinhf32 F
+GLIBC_2.38 asinhf32x F
+GLIBC_2.38 asinhf64 F
+GLIBC_2.38 asinhf64x F
+GLIBC_2.38 asinhl F
+GLIBC_2.38 asinl F
+GLIBC_2.38 atan F
+GLIBC_2.38 atan2 F
+GLIBC_2.38 atan2f F
+GLIBC_2.38 atan2f128 F
+GLIBC_2.38 atan2f32 F
+GLIBC_2.38 atan2f32x F
+GLIBC_2.38 atan2f64 F
+GLIBC_2.38 atan2f64x F
+GLIBC_2.38 atan2l F
+GLIBC_2.38 atanf F
+GLIBC_2.38 atanf128 F
+GLIBC_2.38 atanf32 F
+GLIBC_2.38 atanf32x F
+GLIBC_2.38 atanf64 F
+GLIBC_2.38 atanf64x F
+GLIBC_2.38 atanh F
+GLIBC_2.38 atanhf F
+GLIBC_2.38 atanhf128 F
+GLIBC_2.38 atanhf32 F
+GLIBC_2.38 atanhf32x F
+GLIBC_2.38 atanhf64 F
+GLIBC_2.38 atanhf64x F
+GLIBC_2.38 atanhl F
+GLIBC_2.38 atanl F
+GLIBC_2.38 cabs F
+GLIBC_2.38 cabsf F
+GLIBC_2.38 cabsf128 F
+GLIBC_2.38 cabsf32 F
+GLIBC_2.38 cabsf32x F
+GLIBC_2.38 cabsf64 F
+GLIBC_2.38 cabsf64x F
+GLIBC_2.38 cabsl F
+GLIBC_2.38 cacos F
+GLIBC_2.38 cacosf F
+GLIBC_2.38 cacosf128 F
+GLIBC_2.38 cacosf32 F
+GLIBC_2.38 cacosf32x F
+GLIBC_2.38 cacosf64 F
+GLIBC_2.38 cacosf64x F
+GLIBC_2.38 cacosh F
+GLIBC_2.38 cacoshf F
+GLIBC_2.38 cacoshf128 F
+GLIBC_2.38 cacoshf32 F
+GLIBC_2.38 cacoshf32x F
+GLIBC_2.38 cacoshf64 F
+GLIBC_2.38 cacoshf64x F
+GLIBC_2.38 cacoshl F
+GLIBC_2.38 cacosl F
+GLIBC_2.38 canonicalize F
+GLIBC_2.38 canonicalizef F
+GLIBC_2.38 canonicalizef128 F
+GLIBC_2.38 canonicalizef32 F
+GLIBC_2.38 canonicalizef32x F
+GLIBC_2.38 canonicalizef64 F
+GLIBC_2.38 canonicalizef64x F
+GLIBC_2.38 canonicalizel F
+GLIBC_2.38 carg F
+GLIBC_2.38 cargf F
+GLIBC_2.38 cargf128 F
+GLIBC_2.38 cargf32 F
+GLIBC_2.38 cargf32x F
+GLIBC_2.38 cargf64 F
+GLIBC_2.38 cargf64x F
+GLIBC_2.38 cargl F
+GLIBC_2.38 casin F
+GLIBC_2.38 casinf F
+GLIBC_2.38 casinf128 F
+GLIBC_2.38 casinf32 F
+GLIBC_2.38 casinf32x F
+GLIBC_2.38 casinf64 F
+GLIBC_2.38 casinf64x F
+GLIBC_2.38 casinh F
+GLIBC_2.38 casinhf F
+GLIBC_2.38 casinhf128 F
+GLIBC_2.38 casinhf32 F
+GLIBC_2.38 casinhf32x F
+GLIBC_2.38 casinhf64 F
+GLIBC_2.38 casinhf64x F
+GLIBC_2.38 casinhl F
+GLIBC_2.38 casinl F
+GLIBC_2.38 catan F
+GLIBC_2.38 catanf F
+GLIBC_2.38 catanf128 F
+GLIBC_2.38 catanf32 F
+GLIBC_2.38 catanf32x F
+GLIBC_2.38 catanf64 F
+GLIBC_2.38 catanf64x F
+GLIBC_2.38 catanh F
+GLIBC_2.38 catanhf F
+GLIBC_2.38 catanhf128 F
+GLIBC_2.38 catanhf32 F
+GLIBC_2.38 catanhf32x F
+GLIBC_2.38 catanhf64 F
+GLIBC_2.38 catanhf64x F
+GLIBC_2.38 catanhl F
+GLIBC_2.38 catanl F
+GLIBC_2.38 cbrt F
+GLIBC_2.38 cbrtf F
+GLIBC_2.38 cbrtf128 F
+GLIBC_2.38 cbrtf32 F
+GLIBC_2.38 cbrtf32x F
+GLIBC_2.38 cbrtf64 F
+GLIBC_2.38 cbrtf64x F
+GLIBC_2.38 cbrtl F
+GLIBC_2.38 ccos F
+GLIBC_2.38 ccosf F
+GLIBC_2.38 ccosf128 F
+GLIBC_2.38 ccosf32 F
+GLIBC_2.38 ccosf32x F
+GLIBC_2.38 ccosf64 F
+GLIBC_2.38 ccosf64x F
+GLIBC_2.38 ccosh F
+GLIBC_2.38 ccoshf F
+GLIBC_2.38 ccoshf128 F
+GLIBC_2.38 ccoshf32 F
+GLIBC_2.38 ccoshf32x F
+GLIBC_2.38 ccoshf64 F
+GLIBC_2.38 ccoshf64x F
+GLIBC_2.38 ccoshl F
+GLIBC_2.38 ccosl F
+GLIBC_2.38 ceil F
+GLIBC_2.38 ceilf F
+GLIBC_2.38 ceilf128 F
+GLIBC_2.38 ceilf32 F
+GLIBC_2.38 ceilf32x F
+GLIBC_2.38 ceilf64 F
+GLIBC_2.38 ceilf64x F
+GLIBC_2.38 ceill F
+GLIBC_2.38 cexp F
+GLIBC_2.38 cexpf F
+GLIBC_2.38 cexpf128 F
+GLIBC_2.38 cexpf32 F
+GLIBC_2.38 cexpf32x F
+GLIBC_2.38 cexpf64 F
+GLIBC_2.38 cexpf64x F
+GLIBC_2.38 cexpl F
+GLIBC_2.38 cimag F
+GLIBC_2.38 cimagf F
+GLIBC_2.38 cimagf128 F
+GLIBC_2.38 cimagf32 F
+GLIBC_2.38 cimagf32x F
+GLIBC_2.38 cimagf64 F
+GLIBC_2.38 cimagf64x F
+GLIBC_2.38 cimagl F
+GLIBC_2.38 clog F
+GLIBC_2.38 clog10 F
+GLIBC_2.38 clog10f F
+GLIBC_2.38 clog10f128 F
+GLIBC_2.38 clog10f32 F
+GLIBC_2.38 clog10f32x F
+GLIBC_2.38 clog10f64 F
+GLIBC_2.38 clog10f64x F
+GLIBC_2.38 clog10l F
+GLIBC_2.38 clogf F
+GLIBC_2.38 clogf128 F
+GLIBC_2.38 clogf32 F
+GLIBC_2.38 clogf32x F
+GLIBC_2.38 clogf64 F
+GLIBC_2.38 clogf64x F
+GLIBC_2.38 clogl F
+GLIBC_2.38 conj F
+GLIBC_2.38 conjf F
+GLIBC_2.38 conjf128 F
+GLIBC_2.38 conjf32 F
+GLIBC_2.38 conjf32x F
+GLIBC_2.38 conjf64 F
+GLIBC_2.38 conjf64x F
+GLIBC_2.38 conjl F
+GLIBC_2.38 copysign F
+GLIBC_2.38 copysignf F
+GLIBC_2.38 copysignf128 F
+GLIBC_2.38 copysignf32 F
+GLIBC_2.38 copysignf32x F
+GLIBC_2.38 copysignf64 F
+GLIBC_2.38 copysignf64x F
+GLIBC_2.38 copysignl F
+GLIBC_2.38 cos F
+GLIBC_2.38 cosf F
+GLIBC_2.38 cosf128 F
+GLIBC_2.38 cosf32 F
+GLIBC_2.38 cosf32x F
+GLIBC_2.38 cosf64 F
+GLIBC_2.38 cosf64x F
+GLIBC_2.38 cosh F
+GLIBC_2.38 coshf F
+GLIBC_2.38 coshf128 F
+GLIBC_2.38 coshf32 F
+GLIBC_2.38 coshf32x F
+GLIBC_2.38 coshf64 F
+GLIBC_2.38 coshf64x F
+GLIBC_2.38 coshl F
+GLIBC_2.38 cosl F
+GLIBC_2.38 cpow F
+GLIBC_2.38 cpowf F
+GLIBC_2.38 cpowf128 F
+GLIBC_2.38 cpowf32 F
+GLIBC_2.38 cpowf32x F
+GLIBC_2.38 cpowf64 F
+GLIBC_2.38 cpowf64x F
+GLIBC_2.38 cpowl F
+GLIBC_2.38 cproj F
+GLIBC_2.38 cprojf F
+GLIBC_2.38 cprojf128 F
+GLIBC_2.38 cprojf32 F
+GLIBC_2.38 cprojf32x F
+GLIBC_2.38 cprojf64 F
+GLIBC_2.38 cprojf64x F
+GLIBC_2.38 cprojl F
+GLIBC_2.38 creal F
+GLIBC_2.38 crealf F
+GLIBC_2.38 crealf128 F
+GLIBC_2.38 crealf32 F
+GLIBC_2.38 crealf32x F
+GLIBC_2.38 crealf64 F
+GLIBC_2.38 crealf64x F
+GLIBC_2.38 creall F
+GLIBC_2.38 csin F
+GLIBC_2.38 csinf F
+GLIBC_2.38 csinf128 F
+GLIBC_2.38 csinf32 F
+GLIBC_2.38 csinf32x F
+GLIBC_2.38 csinf64 F
+GLIBC_2.38 csinf64x F
+GLIBC_2.38 csinh F
+GLIBC_2.38 csinhf F
+GLIBC_2.38 csinhf128 F
+GLIBC_2.38 csinhf32 F
+GLIBC_2.38 csinhf32x F
+GLIBC_2.38 csinhf64 F
+GLIBC_2.38 csinhf64x F
+GLIBC_2.38 csinhl F
+GLIBC_2.38 csinl F
+GLIBC_2.38 csqrt F
+GLIBC_2.38 csqrtf F
+GLIBC_2.38 csqrtf128 F
+GLIBC_2.38 csqrtf32 F
+GLIBC_2.38 csqrtf32x F
+GLIBC_2.38 csqrtf64 F
+GLIBC_2.38 csqrtf64x F
+GLIBC_2.38 csqrtl F
+GLIBC_2.38 ctan F
+GLIBC_2.38 ctanf F
+GLIBC_2.38 ctanf128 F
+GLIBC_2.38 ctanf32 F
+GLIBC_2.38 ctanf32x F
+GLIBC_2.38 ctanf64 F
+GLIBC_2.38 ctanf64x F
+GLIBC_2.38 ctanh F
+GLIBC_2.38 ctanhf F
+GLIBC_2.38 ctanhf128 F
+GLIBC_2.38 ctanhf32 F
+GLIBC_2.38 ctanhf32x F
+GLIBC_2.38 ctanhf64 F
+GLIBC_2.38 ctanhf64x F
+GLIBC_2.38 ctanhl F
+GLIBC_2.38 ctanl F
+GLIBC_2.38 daddl F
+GLIBC_2.38 ddivl F
+GLIBC_2.38 dfmal F
+GLIBC_2.38 dmull F
+GLIBC_2.38 drem F
+GLIBC_2.38 dremf F
+GLIBC_2.38 dreml F
+GLIBC_2.38 dsqrtl F
+GLIBC_2.38 dsubl F
+GLIBC_2.38 erf F
+GLIBC_2.38 erfc F
+GLIBC_2.38 erfcf F
+GLIBC_2.38 erfcf128 F
+GLIBC_2.38 erfcf32 F
+GLIBC_2.38 erfcf32x F
+GLIBC_2.38 erfcf64 F
+GLIBC_2.38 erfcf64x F
+GLIBC_2.38 erfcl F
+GLIBC_2.38 erff F
+GLIBC_2.38 erff128 F
+GLIBC_2.38 erff32 F
+GLIBC_2.38 erff32x F
+GLIBC_2.38 erff64 F
+GLIBC_2.38 erff64x F
+GLIBC_2.38 erfl F
+GLIBC_2.38 exp F
+GLIBC_2.38 exp10 F
+GLIBC_2.38 exp10f F
+GLIBC_2.38 exp10f128 F
+GLIBC_2.38 exp10f32 F
+GLIBC_2.38 exp10f32x F
+GLIBC_2.38 exp10f64 F
+GLIBC_2.38 exp10f64x F
+GLIBC_2.38 exp10l F
+GLIBC_2.38 exp2 F
+GLIBC_2.38 exp2f F
+GLIBC_2.38 exp2f128 F
+GLIBC_2.38 exp2f32 F
+GLIBC_2.38 exp2f32x F
+GLIBC_2.38 exp2f64 F
+GLIBC_2.38 exp2f64x F
+GLIBC_2.38 exp2l F
+GLIBC_2.38 expf F
+GLIBC_2.38 expf128 F
+GLIBC_2.38 expf32 F
+GLIBC_2.38 expf32x F
+GLIBC_2.38 expf64 F
+GLIBC_2.38 expf64x F
+GLIBC_2.38 expl F
+GLIBC_2.38 expm1 F
+GLIBC_2.38 expm1f F
+GLIBC_2.38 expm1f128 F
+GLIBC_2.38 expm1f32 F
+GLIBC_2.38 expm1f32x F
+GLIBC_2.38 expm1f64 F
+GLIBC_2.38 expm1f64x F
+GLIBC_2.38 expm1l F
+GLIBC_2.38 f32addf128 F
+GLIBC_2.38 f32addf32x F
+GLIBC_2.38 f32addf64 F
+GLIBC_2.38 f32addf64x F
+GLIBC_2.38 f32divf128 F
+GLIBC_2.38 f32divf32x F
+GLIBC_2.38 f32divf64 F
+GLIBC_2.38 f32divf64x F
+GLIBC_2.38 f32fmaf128 F
+GLIBC_2.38 f32fmaf32x F
+GLIBC_2.38 f32fmaf64 F
+GLIBC_2.38 f32fmaf64x F
+GLIBC_2.38 f32mulf128 F
+GLIBC_2.38 f32mulf32x F
+GLIBC_2.38 f32mulf64 F
+GLIBC_2.38 f32mulf64x F
+GLIBC_2.38 f32sqrtf128 F
+GLIBC_2.38 f32sqrtf32x F
+GLIBC_2.38 f32sqrtf64 F
+GLIBC_2.38 f32sqrtf64x F
+GLIBC_2.38 f32subf128 F
+GLIBC_2.38 f32subf32x F
+GLIBC_2.38 f32subf64 F
+GLIBC_2.38 f32subf64x F
+GLIBC_2.38 f32xaddf128 F
+GLIBC_2.38 f32xaddf64 F
+GLIBC_2.38 f32xaddf64x F
+GLIBC_2.38 f32xdivf128 F
+GLIBC_2.38 f32xdivf64 F
+GLIBC_2.38 f32xdivf64x F
+GLIBC_2.38 f32xfmaf128 F
+GLIBC_2.38 f32xfmaf64 F
+GLIBC_2.38 f32xfmaf64x F
+GLIBC_2.38 f32xmulf128 F
+GLIBC_2.38 f32xmulf64 F
+GLIBC_2.38 f32xmulf64x F
+GLIBC_2.38 f32xsqrtf128 F
+GLIBC_2.38 f32xsqrtf64 F
+GLIBC_2.38 f32xsqrtf64x F
+GLIBC_2.38 f32xsubf128 F
+GLIBC_2.38 f32xsubf64 F
+GLIBC_2.38 f32xsubf64x F
+GLIBC_2.38 f64addf128 F
+GLIBC_2.38 f64addf64x F
+GLIBC_2.38 f64divf128 F
+GLIBC_2.38 f64divf64x F
+GLIBC_2.38 f64fmaf128 F
+GLIBC_2.38 f64fmaf64x F
+GLIBC_2.38 f64mulf128 F
+GLIBC_2.38 f64mulf64x F
+GLIBC_2.38 f64sqrtf128 F
+GLIBC_2.38 f64sqrtf64x F
+GLIBC_2.38 f64subf128 F
+GLIBC_2.38 f64subf64x F
+GLIBC_2.38 f64xaddf128 F
+GLIBC_2.38 f64xdivf128 F
+GLIBC_2.38 f64xfmaf128 F
+GLIBC_2.38 f64xmulf128 F
+GLIBC_2.38 f64xsqrtf128 F
+GLIBC_2.38 f64xsubf128 F
+GLIBC_2.38 fabs F
+GLIBC_2.38 fabsf F
+GLIBC_2.38 fabsf128 F
+GLIBC_2.38 fabsf32 F
+GLIBC_2.38 fabsf32x F
+GLIBC_2.38 fabsf64 F
+GLIBC_2.38 fabsf64x F
+GLIBC_2.38 fabsl F
+GLIBC_2.38 fadd F
+GLIBC_2.38 faddl F
+GLIBC_2.38 fdim F
+GLIBC_2.38 fdimf F
+GLIBC_2.38 fdimf128 F
+GLIBC_2.38 fdimf32 F
+GLIBC_2.38 fdimf32x F
+GLIBC_2.38 fdimf64 F
+GLIBC_2.38 fdimf64x F
+GLIBC_2.38 fdiml F
+GLIBC_2.38 fdiv F
+GLIBC_2.38 fdivl F
+GLIBC_2.38 feclearexcept F
+GLIBC_2.38 fedisableexcept F
+GLIBC_2.38 feenableexcept F
+GLIBC_2.38 fegetenv F
+GLIBC_2.38 fegetexcept F
+GLIBC_2.38 fegetexceptflag F
+GLIBC_2.38 fegetmode F
+GLIBC_2.38 fegetround F
+GLIBC_2.38 feholdexcept F
+GLIBC_2.38 feraiseexcept F
+GLIBC_2.38 fesetenv F
+GLIBC_2.38 fesetexcept F
+GLIBC_2.38 fesetexceptflag F
+GLIBC_2.38 fesetmode F
+GLIBC_2.38 fesetround F
+GLIBC_2.38 fetestexcept F
+GLIBC_2.38 fetestexceptflag F
+GLIBC_2.38 feupdateenv F
+GLIBC_2.38 ffma F
+GLIBC_2.38 ffmal F
+GLIBC_2.38 finite F
+GLIBC_2.38 finitef F
+GLIBC_2.38 finitel F
+GLIBC_2.38 floor F
+GLIBC_2.38 floorf F
+GLIBC_2.38 floorf128 F
+GLIBC_2.38 floorf32 F
+GLIBC_2.38 floorf32x F
+GLIBC_2.38 floorf64 F
+GLIBC_2.38 floorf64x F
+GLIBC_2.38 floorl F
+GLIBC_2.38 fma F
+GLIBC_2.38 fmaf F
+GLIBC_2.38 fmaf128 F
+GLIBC_2.38 fmaf32 F
+GLIBC_2.38 fmaf32x F
+GLIBC_2.38 fmaf64 F
+GLIBC_2.38 fmaf64x F
+GLIBC_2.38 fmal F
+GLIBC_2.38 fmax F
+GLIBC_2.38 fmaxf F
+GLIBC_2.38 fmaxf128 F
+GLIBC_2.38 fmaxf32 F
+GLIBC_2.38 fmaxf32x F
+GLIBC_2.38 fmaxf64 F
+GLIBC_2.38 fmaxf64x F
+GLIBC_2.38 fmaximum F
+GLIBC_2.38 fmaximum_mag F
+GLIBC_2.38 fmaximum_mag_num F
+GLIBC_2.38 fmaximum_mag_numf F
+GLIBC_2.38 fmaximum_mag_numf128 F
+GLIBC_2.38 fmaximum_mag_numf32 F
+GLIBC_2.38 fmaximum_mag_numf32x F
+GLIBC_2.38 fmaximum_mag_numf64 F
+GLIBC_2.38 fmaximum_mag_numf64x F
+GLIBC_2.38 fmaximum_mag_numl F
+GLIBC_2.38 fmaximum_magf F
+GLIBC_2.38 fmaximum_magf128 F
+GLIBC_2.38 fmaximum_magf32 F
+GLIBC_2.38 fmaximum_magf32x F
+GLIBC_2.38 fmaximum_magf64 F
+GLIBC_2.38 fmaximum_magf64x F
+GLIBC_2.38 fmaximum_magl F
+GLIBC_2.38 fmaximum_num F
+GLIBC_2.38 fmaximum_numf F
+GLIBC_2.38 fmaximum_numf128 F
+GLIBC_2.38 fmaximum_numf32 F
+GLIBC_2.38 fmaximum_numf32x F
+GLIBC_2.38 fmaximum_numf64 F
+GLIBC_2.38 fmaximum_numf64x F
+GLIBC_2.38 fmaximum_numl F
+GLIBC_2.38 fmaximumf F
+GLIBC_2.38 fmaximumf128 F
+GLIBC_2.38 fmaximumf32 F
+GLIBC_2.38 fmaximumf32x F
+GLIBC_2.38 fmaximumf64 F
+GLIBC_2.38 fmaximumf64x F
+GLIBC_2.38 fmaximuml F
+GLIBC_2.38 fmaxl F
+GLIBC_2.38 fmaxmag F
+GLIBC_2.38 fmaxmagf F
+GLIBC_2.38 fmaxmagf128 F
+GLIBC_2.38 fmaxmagf32 F
+GLIBC_2.38 fmaxmagf32x F
+GLIBC_2.38 fmaxmagf64 F
+GLIBC_2.38 fmaxmagf64x F
+GLIBC_2.38 fmaxmagl F
+GLIBC_2.38 fmin F
+GLIBC_2.38 fminf F
+GLIBC_2.38 fminf128 F
+GLIBC_2.38 fminf32 F
+GLIBC_2.38 fminf32x F
+GLIBC_2.38 fminf64 F
+GLIBC_2.38 fminf64x F
+GLIBC_2.38 fminimum F
+GLIBC_2.38 fminimum_mag F
+GLIBC_2.38 fminimum_mag_num F
+GLIBC_2.38 fminimum_mag_numf F
+GLIBC_2.38 fminimum_mag_numf128 F
+GLIBC_2.38 fminimum_mag_numf32 F
+GLIBC_2.38 fminimum_mag_numf32x F
+GLIBC_2.38 fminimum_mag_numf64 F
+GLIBC_2.38 fminimum_mag_numf64x F
+GLIBC_2.38 fminimum_mag_numl F
+GLIBC_2.38 fminimum_magf F
+GLIBC_2.38 fminimum_magf128 F
+GLIBC_2.38 fminimum_magf32 F
+GLIBC_2.38 fminimum_magf32x F
+GLIBC_2.38 fminimum_magf64 F
+GLIBC_2.38 fminimum_magf64x F
+GLIBC_2.38 fminimum_magl F
+GLIBC_2.38 fminimum_num F
+GLIBC_2.38 fminimum_numf F
+GLIBC_2.38 fminimum_numf128 F
+GLIBC_2.38 fminimum_numf32 F
+GLIBC_2.38 fminimum_numf32x F
+GLIBC_2.38 fminimum_numf64 F
+GLIBC_2.38 fminimum_numf64x F
+GLIBC_2.38 fminimum_numl F
+GLIBC_2.38 fminimumf F
+GLIBC_2.38 fminimumf128 F
+GLIBC_2.38 fminimumf32 F
+GLIBC_2.38 fminimumf32x F
+GLIBC_2.38 fminimumf64 F
+GLIBC_2.38 fminimumf64x F
+GLIBC_2.38 fminimuml F
+GLIBC_2.38 fminl F
+GLIBC_2.38 fminmag F
+GLIBC_2.38 fminmagf F
+GLIBC_2.38 fminmagf128 F
+GLIBC_2.38 fminmagf32 F
+GLIBC_2.38 fminmagf32x F
+GLIBC_2.38 fminmagf64 F
+GLIBC_2.38 fminmagf64x F
+GLIBC_2.38 fminmagl F
+GLIBC_2.38 fmod F
+GLIBC_2.38 fmodf F
+GLIBC_2.38 fmodf128 F
+GLIBC_2.38 fmodf32 F
+GLIBC_2.38 fmodf32x F
+GLIBC_2.38 fmodf64 F
+GLIBC_2.38 fmodf64x F
+GLIBC_2.38 fmodl F
+GLIBC_2.38 fmul F
+GLIBC_2.38 fmull F
+GLIBC_2.38 frexp F
+GLIBC_2.38 frexpf F
+GLIBC_2.38 frexpf128 F
+GLIBC_2.38 frexpf32 F
+GLIBC_2.38 frexpf32x F
+GLIBC_2.38 frexpf64 F
+GLIBC_2.38 frexpf64x F
+GLIBC_2.38 frexpl F
+GLIBC_2.38 fromfp F
+GLIBC_2.38 fromfpf F
+GLIBC_2.38 fromfpf128 F
+GLIBC_2.38 fromfpf32 F
+GLIBC_2.38 fromfpf32x F
+GLIBC_2.38 fromfpf64 F
+GLIBC_2.38 fromfpf64x F
+GLIBC_2.38 fromfpl F
+GLIBC_2.38 fromfpx F
+GLIBC_2.38 fromfpxf F
+GLIBC_2.38 fromfpxf128 F
+GLIBC_2.38 fromfpxf32 F
+GLIBC_2.38 fromfpxf32x F
+GLIBC_2.38 fromfpxf64 F
+GLIBC_2.38 fromfpxf64x F
+GLIBC_2.38 fromfpxl F
+GLIBC_2.38 fsqrt F
+GLIBC_2.38 fsqrtl F
+GLIBC_2.38 fsub F
+GLIBC_2.38 fsubl F
+GLIBC_2.38 gamma F
+GLIBC_2.38 gammaf F
+GLIBC_2.38 gammal F
+GLIBC_2.38 getpayload F
+GLIBC_2.38 getpayloadf F
+GLIBC_2.38 getpayloadf128 F
+GLIBC_2.38 getpayloadf32 F
+GLIBC_2.38 getpayloadf32x F
+GLIBC_2.38 getpayloadf64 F
+GLIBC_2.38 getpayloadf64x F
+GLIBC_2.38 getpayloadl F
+GLIBC_2.38 hypot F
+GLIBC_2.38 hypotf F
+GLIBC_2.38 hypotf128 F
+GLIBC_2.38 hypotf32 F
+GLIBC_2.38 hypotf32x F
+GLIBC_2.38 hypotf64 F
+GLIBC_2.38 hypotf64x F
+GLIBC_2.38 hypotl F
+GLIBC_2.38 ilogb F
+GLIBC_2.38 ilogbf F
+GLIBC_2.38 ilogbf128 F
+GLIBC_2.38 ilogbf32 F
+GLIBC_2.38 ilogbf32x F
+GLIBC_2.38 ilogbf64 F
+GLIBC_2.38 ilogbf64x F
+GLIBC_2.38 ilogbl F
+GLIBC_2.38 j0 F
+GLIBC_2.38 j0f F
+GLIBC_2.38 j0f128 F
+GLIBC_2.38 j0f32 F
+GLIBC_2.38 j0f32x F
+GLIBC_2.38 j0f64 F
+GLIBC_2.38 j0f64x F
+GLIBC_2.38 j0l F
+GLIBC_2.38 j1 F
+GLIBC_2.38 j1f F
+GLIBC_2.38 j1f128 F
+GLIBC_2.38 j1f32 F
+GLIBC_2.38 j1f32x F
+GLIBC_2.38 j1f64 F
+GLIBC_2.38 j1f64x F
+GLIBC_2.38 j1l F
+GLIBC_2.38 jn F
+GLIBC_2.38 jnf F
+GLIBC_2.38 jnf128 F
+GLIBC_2.38 jnf32 F
+GLIBC_2.38 jnf32x F
+GLIBC_2.38 jnf64 F
+GLIBC_2.38 jnf64x F
+GLIBC_2.38 jnl F
+GLIBC_2.38 ldexp F
+GLIBC_2.38 ldexpf F
+GLIBC_2.38 ldexpf128 F
+GLIBC_2.38 ldexpf32 F
+GLIBC_2.38 ldexpf32x F
+GLIBC_2.38 ldexpf64 F
+GLIBC_2.38 ldexpf64x F
+GLIBC_2.38 ldexpl F
+GLIBC_2.38 lgamma F
+GLIBC_2.38 lgamma_r F
+GLIBC_2.38 lgammaf F
+GLIBC_2.38 lgammaf128 F
+GLIBC_2.38 lgammaf128_r F
+GLIBC_2.38 lgammaf32 F
+GLIBC_2.38 lgammaf32_r F
+GLIBC_2.38 lgammaf32x F
+GLIBC_2.38 lgammaf32x_r F
+GLIBC_2.38 lgammaf64 F
+GLIBC_2.38 lgammaf64_r F
+GLIBC_2.38 lgammaf64x F
+GLIBC_2.38 lgammaf64x_r F
+GLIBC_2.38 lgammaf_r F
+GLIBC_2.38 lgammal F
+GLIBC_2.38 lgammal_r F
+GLIBC_2.38 llogb F
+GLIBC_2.38 llogbf F
+GLIBC_2.38 llogbf128 F
+GLIBC_2.38 llogbf32 F
+GLIBC_2.38 llogbf32x F
+GLIBC_2.38 llogbf64 F
+GLIBC_2.38 llogbf64x F
+GLIBC_2.38 llogbl F
+GLIBC_2.38 llrint F
+GLIBC_2.38 llrintf F
+GLIBC_2.38 llrintf128 F
+GLIBC_2.38 llrintf32 F
+GLIBC_2.38 llrintf32x F
+GLIBC_2.38 llrintf64 F
+GLIBC_2.38 llrintf64x F
+GLIBC_2.38 llrintl F
+GLIBC_2.38 llround F
+GLIBC_2.38 llroundf F
+GLIBC_2.38 llroundf128 F
+GLIBC_2.38 llroundf32 F
+GLIBC_2.38 llroundf32x F
+GLIBC_2.38 llroundf64 F
+GLIBC_2.38 llroundf64x F
+GLIBC_2.38 llroundl F
+GLIBC_2.38 log F
+GLIBC_2.38 log10 F
+GLIBC_2.38 log10f F
+GLIBC_2.38 log10f128 F
+GLIBC_2.38 log10f32 F
+GLIBC_2.38 log10f32x F
+GLIBC_2.38 log10f64 F
+GLIBC_2.38 log10f64x F
+GLIBC_2.38 log10l F
+GLIBC_2.38 log1p F
+GLIBC_2.38 log1pf F
+GLIBC_2.38 log1pf128 F
+GLIBC_2.38 log1pf32 F
+GLIBC_2.38 log1pf32x F
+GLIBC_2.38 log1pf64 F
+GLIBC_2.38 log1pf64x F
+GLIBC_2.38 log1pl F
+GLIBC_2.38 log2 F
+GLIBC_2.38 log2f F
+GLIBC_2.38 log2f128 F
+GLIBC_2.38 log2f32 F
+GLIBC_2.38 log2f32x F
+GLIBC_2.38 log2f64 F
+GLIBC_2.38 log2f64x F
+GLIBC_2.38 log2l F
+GLIBC_2.38 logb F
+GLIBC_2.38 logbf F
+GLIBC_2.38 logbf128 F
+GLIBC_2.38 logbf32 F
+GLIBC_2.38 logbf32x F
+GLIBC_2.38 logbf64 F
+GLIBC_2.38 logbf64x F
+GLIBC_2.38 logbl F
+GLIBC_2.38 logf F
+GLIBC_2.38 logf128 F
+GLIBC_2.38 logf32 F
+GLIBC_2.38 logf32x F
+GLIBC_2.38 logf64 F
+GLIBC_2.38 logf64x F
+GLIBC_2.38 logl F
+GLIBC_2.38 lrint F
+GLIBC_2.38 lrintf F
+GLIBC_2.38 lrintf128 F
+GLIBC_2.38 lrintf32 F
+GLIBC_2.38 lrintf32x F
+GLIBC_2.38 lrintf64 F
+GLIBC_2.38 lrintf64x F
+GLIBC_2.38 lrintl F
+GLIBC_2.38 lround F
+GLIBC_2.38 lroundf F
+GLIBC_2.38 lroundf128 F
+GLIBC_2.38 lroundf32 F
+GLIBC_2.38 lroundf32x F
+GLIBC_2.38 lroundf64 F
+GLIBC_2.38 lroundf64x F
+GLIBC_2.38 lroundl F
+GLIBC_2.38 modf F
+GLIBC_2.38 modff F
+GLIBC_2.38 modff128 F
+GLIBC_2.38 modff32 F
+GLIBC_2.38 modff32x F
+GLIBC_2.38 modff64 F
+GLIBC_2.38 modff64x F
+GLIBC_2.38 modfl F
+GLIBC_2.38 nan F
+GLIBC_2.38 nanf F
+GLIBC_2.38 nanf128 F
+GLIBC_2.38 nanf32 F
+GLIBC_2.38 nanf32x F
+GLIBC_2.38 nanf64 F
+GLIBC_2.38 nanf64x F
+GLIBC_2.38 nanl F
+GLIBC_2.38 nearbyint F
+GLIBC_2.38 nearbyintf F
+GLIBC_2.38 nearbyintf128 F
+GLIBC_2.38 nearbyintf32 F
+GLIBC_2.38 nearbyintf32x F
+GLIBC_2.38 nearbyintf64 F
+GLIBC_2.38 nearbyintf64x F
+GLIBC_2.38 nearbyintl F
+GLIBC_2.38 nextafter F
+GLIBC_2.38 nextafterf F
+GLIBC_2.38 nextafterf128 F
+GLIBC_2.38 nextafterf32 F
+GLIBC_2.38 nextafterf32x F
+GLIBC_2.38 nextafterf64 F
+GLIBC_2.38 nextafterf64x F
+GLIBC_2.38 nextafterl F
+GLIBC_2.38 nextdown F
+GLIBC_2.38 nextdownf F
+GLIBC_2.38 nextdownf128 F
+GLIBC_2.38 nextdownf32 F
+GLIBC_2.38 nextdownf32x F
+GLIBC_2.38 nextdownf64 F
+GLIBC_2.38 nextdownf64x F
+GLIBC_2.38 nextdownl F
+GLIBC_2.38 nexttoward F
+GLIBC_2.38 nexttowardf F
+GLIBC_2.38 nexttowardl F
+GLIBC_2.38 nextup F
+GLIBC_2.38 nextupf F
+GLIBC_2.38 nextupf128 F
+GLIBC_2.38 nextupf32 F
+GLIBC_2.38 nextupf32x F
+GLIBC_2.38 nextupf64 F
+GLIBC_2.38 nextupf64x F
+GLIBC_2.38 nextupl F
+GLIBC_2.38 pow F
+GLIBC_2.38 powf F
+GLIBC_2.38 powf128 F
+GLIBC_2.38 powf32 F
+GLIBC_2.38 powf32x F
+GLIBC_2.38 powf64 F
+GLIBC_2.38 powf64x F
+GLIBC_2.38 powl F
+GLIBC_2.38 remainder F
+GLIBC_2.38 remainderf F
+GLIBC_2.38 remainderf128 F
+GLIBC_2.38 remainderf32 F
+GLIBC_2.38 remainderf32x F
+GLIBC_2.38 remainderf64 F
+GLIBC_2.38 remainderf64x F
+GLIBC_2.38 remainderl F
+GLIBC_2.38 remquo F
+GLIBC_2.38 remquof F
+GLIBC_2.38 remquof128 F
+GLIBC_2.38 remquof32 F
+GLIBC_2.38 remquof32x F
+GLIBC_2.38 remquof64 F
+GLIBC_2.38 remquof64x F
+GLIBC_2.38 remquol F
+GLIBC_2.38 rint F
+GLIBC_2.38 rintf F
+GLIBC_2.38 rintf128 F
+GLIBC_2.38 rintf32 F
+GLIBC_2.38 rintf32x F
+GLIBC_2.38 rintf64 F
+GLIBC_2.38 rintf64x F
+GLIBC_2.38 rintl F
+GLIBC_2.38 round F
+GLIBC_2.38 roundeven F
+GLIBC_2.38 roundevenf F
+GLIBC_2.38 roundevenf128 F
+GLIBC_2.38 roundevenf32 F
+GLIBC_2.38 roundevenf32x F
+GLIBC_2.38 roundevenf64 F
+GLIBC_2.38 roundevenf64x F
+GLIBC_2.38 roundevenl F
+GLIBC_2.38 roundf F
+GLIBC_2.38 roundf128 F
+GLIBC_2.38 roundf32 F
+GLIBC_2.38 roundf32x F
+GLIBC_2.38 roundf64 F
+GLIBC_2.38 roundf64x F
+GLIBC_2.38 roundl F
+GLIBC_2.38 scalb F
+GLIBC_2.38 scalbf F
+GLIBC_2.38 scalbl F
+GLIBC_2.38 scalbln F
+GLIBC_2.38 scalblnf F
+GLIBC_2.38 scalblnf128 F
+GLIBC_2.38 scalblnf32 F
+GLIBC_2.38 scalblnf32x F
+GLIBC_2.38 scalblnf64 F
+GLIBC_2.38 scalblnf64x F
+GLIBC_2.38 scalblnl F
+GLIBC_2.38 scalbn F
+GLIBC_2.38 scalbnf F
+GLIBC_2.38 scalbnf128 F
+GLIBC_2.38 scalbnf32 F
+GLIBC_2.38 scalbnf32x F
+GLIBC_2.38 scalbnf64 F
+GLIBC_2.38 scalbnf64x F
+GLIBC_2.38 scalbnl F
+GLIBC_2.38 setpayload F
+GLIBC_2.38 setpayloadf F
+GLIBC_2.38 setpayloadf128 F
+GLIBC_2.38 setpayloadf32 F
+GLIBC_2.38 setpayloadf32x F
+GLIBC_2.38 setpayloadf64 F
+GLIBC_2.38 setpayloadf64x F
+GLIBC_2.38 setpayloadl F
+GLIBC_2.38 setpayloadsig F
+GLIBC_2.38 setpayloadsigf F
+GLIBC_2.38 setpayloadsigf128 F
+GLIBC_2.38 setpayloadsigf32 F
+GLIBC_2.38 setpayloadsigf32x F
+GLIBC_2.38 setpayloadsigf64 F
+GLIBC_2.38 setpayloadsigf64x F
+GLIBC_2.38 setpayloadsigl F
+GLIBC_2.38 signgam D 0x4
+GLIBC_2.38 significand F
+GLIBC_2.38 significandf F
+GLIBC_2.38 significandl F
+GLIBC_2.38 sin F
+GLIBC_2.38 sincos F
+GLIBC_2.38 sincosf F
+GLIBC_2.38 sincosf128 F
+GLIBC_2.38 sincosf32 F
+GLIBC_2.38 sincosf32x F
+GLIBC_2.38 sincosf64 F
+GLIBC_2.38 sincosf64x F
+GLIBC_2.38 sincosl F
+GLIBC_2.38 sinf F
+GLIBC_2.38 sinf128 F
+GLIBC_2.38 sinf32 F
+GLIBC_2.38 sinf32x F
+GLIBC_2.38 sinf64 F
+GLIBC_2.38 sinf64x F
+GLIBC_2.38 sinh F
+GLIBC_2.38 sinhf F
+GLIBC_2.38 sinhf128 F
+GLIBC_2.38 sinhf32 F
+GLIBC_2.38 sinhf32x F
+GLIBC_2.38 sinhf64 F
+GLIBC_2.38 sinhf64x F
+GLIBC_2.38 sinhl F
+GLIBC_2.38 sinl F
+GLIBC_2.38 sqrt F
+GLIBC_2.38 sqrtf F
+GLIBC_2.38 sqrtf128 F
+GLIBC_2.38 sqrtf32 F
+GLIBC_2.38 sqrtf32x F
+GLIBC_2.38 sqrtf64 F
+GLIBC_2.38 sqrtf64x F
+GLIBC_2.38 sqrtl F
+GLIBC_2.38 tan F
+GLIBC_2.38 tanf F
+GLIBC_2.38 tanf128 F
+GLIBC_2.38 tanf32 F
+GLIBC_2.38 tanf32x F
+GLIBC_2.38 tanf64 F
+GLIBC_2.38 tanf64x F
+GLIBC_2.38 tanh F
+GLIBC_2.38 tanhf F
+GLIBC_2.38 tanhf128 F
+GLIBC_2.38 tanhf32 F
+GLIBC_2.38 tanhf32x F
+GLIBC_2.38 tanhf64 F
+GLIBC_2.38 tanhf64x F
+GLIBC_2.38 tanhl F
+GLIBC_2.38 tanl F
+GLIBC_2.38 tgamma F
+GLIBC_2.38 tgammaf F
+GLIBC_2.38 tgammaf128 F
+GLIBC_2.38 tgammaf32 F
+GLIBC_2.38 tgammaf32x F
+GLIBC_2.38 tgammaf64 F
+GLIBC_2.38 tgammaf64x F
+GLIBC_2.38 tgammal F
+GLIBC_2.38 totalorder F
+GLIBC_2.38 totalorderf F
+GLIBC_2.38 totalorderf128 F
+GLIBC_2.38 totalorderf32 F
+GLIBC_2.38 totalorderf32x F
+GLIBC_2.38 totalorderf64 F
+GLIBC_2.38 totalorderf64x F
+GLIBC_2.38 totalorderl F
+GLIBC_2.38 totalordermag F
+GLIBC_2.38 totalordermagf F
+GLIBC_2.38 totalordermagf128 F
+GLIBC_2.38 totalordermagf32 F
+GLIBC_2.38 totalordermagf32x F
+GLIBC_2.38 totalordermagf64 F
+GLIBC_2.38 totalordermagf64x F
+GLIBC_2.38 totalordermagl F
+GLIBC_2.38 trunc F
+GLIBC_2.38 truncf F
+GLIBC_2.38 truncf128 F
+GLIBC_2.38 truncf32 F
+GLIBC_2.38 truncf32x F
+GLIBC_2.38 truncf64 F
+GLIBC_2.38 truncf64x F
+GLIBC_2.38 truncl F
+GLIBC_2.38 ufromfp F
+GLIBC_2.38 ufromfpf F
+GLIBC_2.38 ufromfpf128 F
+GLIBC_2.38 ufromfpf32 F
+GLIBC_2.38 ufromfpf32x F
+GLIBC_2.38 ufromfpf64 F
+GLIBC_2.38 ufromfpf64x F
+GLIBC_2.38 ufromfpl F
+GLIBC_2.38 ufromfpx F
+GLIBC_2.38 ufromfpxf F
+GLIBC_2.38 ufromfpxf128 F
+GLIBC_2.38 ufromfpxf32 F
+GLIBC_2.38 ufromfpxf32x F
+GLIBC_2.38 ufromfpxf64 F
+GLIBC_2.38 ufromfpxf64x F
+GLIBC_2.38 ufromfpxl F
+GLIBC_2.38 y0 F
+GLIBC_2.38 y0f F
+GLIBC_2.38 y0f128 F
+GLIBC_2.38 y0f32 F
+GLIBC_2.38 y0f32x F
+GLIBC_2.38 y0f64 F
+GLIBC_2.38 y0f64x F
+GLIBC_2.38 y0l F
+GLIBC_2.38 y1 F
+GLIBC_2.38 y1f F
+GLIBC_2.38 y1f128 F
+GLIBC_2.38 y1f32 F
+GLIBC_2.38 y1f32x F
+GLIBC_2.38 y1f64 F
+GLIBC_2.38 y1f64x F
+GLIBC_2.38 y1l F
+GLIBC_2.38 yn F
+GLIBC_2.38 ynf F
+GLIBC_2.38 ynf128 F
+GLIBC_2.38 ynf32 F
+GLIBC_2.38 ynf32x F
+GLIBC_2.38 ynf64 F
+GLIBC_2.38 ynf64x F
+GLIBC_2.38 ynl F
diff --git a/sysdeps/mach/hurd/x86_64/libmvec.abilist b/sysdeps/mach/hurd/x86_64/libmvec.abilist
new file mode 100644
index 00000000..9ecdf5c9
--- /dev/null
+++ b/sysdeps/mach/hurd/x86_64/libmvec.abilist
@@ -0,0 +1,216 @@
+GLIBC_2.38 _ZGVbN2v_acos F
+GLIBC_2.38 _ZGVbN2v_acosh F
+GLIBC_2.38 _ZGVbN2v_asin F
+GLIBC_2.38 _ZGVbN2v_asinh F
+GLIBC_2.38 _ZGVbN2v_atan F
+GLIBC_2.38 _ZGVbN2v_atanh F
+GLIBC_2.38 _ZGVbN2v_cbrt F
+GLIBC_2.38 _ZGVbN2v_cos F
+GLIBC_2.38 _ZGVbN2v_cosh F
+GLIBC_2.38 _ZGVbN2v_erf F
+GLIBC_2.38 _ZGVbN2v_erfc F
+GLIBC_2.38 _ZGVbN2v_exp F
+GLIBC_2.38 _ZGVbN2v_exp10 F
+GLIBC_2.38 _ZGVbN2v_exp2 F
+GLIBC_2.38 _ZGVbN2v_expm1 F
+GLIBC_2.38 _ZGVbN2v_log F
+GLIBC_2.38 _ZGVbN2v_log10 F
+GLIBC_2.38 _ZGVbN2v_log1p F
+GLIBC_2.38 _ZGVbN2v_log2 F
+GLIBC_2.38 _ZGVbN2v_sin F
+GLIBC_2.38 _ZGVbN2v_sinh F
+GLIBC_2.38 _ZGVbN2v_tan F
+GLIBC_2.38 _ZGVbN2v_tanh F
+GLIBC_2.38 _ZGVbN2vv_atan2 F
+GLIBC_2.38 _ZGVbN2vv_hypot F
+GLIBC_2.38 _ZGVbN2vv_pow F
+GLIBC_2.38 _ZGVbN2vvv_sincos F
+GLIBC_2.38 _ZGVbN4v_acosf F
+GLIBC_2.38 _ZGVbN4v_acoshf F
+GLIBC_2.38 _ZGVbN4v_asinf F
+GLIBC_2.38 _ZGVbN4v_asinhf F
+GLIBC_2.38 _ZGVbN4v_atanf F
+GLIBC_2.38 _ZGVbN4v_atanhf F
+GLIBC_2.38 _ZGVbN4v_cbrtf F
+GLIBC_2.38 _ZGVbN4v_cosf F
+GLIBC_2.38 _ZGVbN4v_coshf F
+GLIBC_2.38 _ZGVbN4v_erfcf F
+GLIBC_2.38 _ZGVbN4v_erff F
+GLIBC_2.38 _ZGVbN4v_exp10f F
+GLIBC_2.38 _ZGVbN4v_exp2f F
+GLIBC_2.38 _ZGVbN4v_expf F
+GLIBC_2.38 _ZGVbN4v_expm1f F
+GLIBC_2.38 _ZGVbN4v_log10f F
+GLIBC_2.38 _ZGVbN4v_log1pf F
+GLIBC_2.38 _ZGVbN4v_log2f F
+GLIBC_2.38 _ZGVbN4v_logf F
+GLIBC_2.38 _ZGVbN4v_sinf F
+GLIBC_2.38 _ZGVbN4v_sinhf F
+GLIBC_2.38 _ZGVbN4v_tanf F
+GLIBC_2.38 _ZGVbN4v_tanhf F
+GLIBC_2.38 _ZGVbN4vv_atan2f F
+GLIBC_2.38 _ZGVbN4vv_hypotf F
+GLIBC_2.38 _ZGVbN4vv_powf F
+GLIBC_2.38 _ZGVbN4vvv_sincosf F
+GLIBC_2.38 _ZGVcN4v_acos F
+GLIBC_2.38 _ZGVcN4v_acosh F
+GLIBC_2.38 _ZGVcN4v_asin F
+GLIBC_2.38 _ZGVcN4v_asinh F
+GLIBC_2.38 _ZGVcN4v_atan F
+GLIBC_2.38 _ZGVcN4v_atanh F
+GLIBC_2.38 _ZGVcN4v_cbrt F
+GLIBC_2.38 _ZGVcN4v_cos F
+GLIBC_2.38 _ZGVcN4v_cosh F
+GLIBC_2.38 _ZGVcN4v_erf F
+GLIBC_2.38 _ZGVcN4v_erfc F
+GLIBC_2.38 _ZGVcN4v_exp F
+GLIBC_2.38 _ZGVcN4v_exp10 F
+GLIBC_2.38 _ZGVcN4v_exp2 F
+GLIBC_2.38 _ZGVcN4v_expm1 F
+GLIBC_2.38 _ZGVcN4v_log F
+GLIBC_2.38 _ZGVcN4v_log10 F
+GLIBC_2.38 _ZGVcN4v_log1p F
+GLIBC_2.38 _ZGVcN4v_log2 F
+GLIBC_2.38 _ZGVcN4v_sin F
+GLIBC_2.38 _ZGVcN4v_sinh F
+GLIBC_2.38 _ZGVcN4v_tan F
+GLIBC_2.38 _ZGVcN4v_tanh F
+GLIBC_2.38 _ZGVcN4vv_atan2 F
+GLIBC_2.38 _ZGVcN4vv_hypot F
+GLIBC_2.38 _ZGVcN4vv_pow F
+GLIBC_2.38 _ZGVcN4vvv_sincos F
+GLIBC_2.38 _ZGVcN8v_acosf F
+GLIBC_2.38 _ZGVcN8v_acoshf F
+GLIBC_2.38 _ZGVcN8v_asinf F
+GLIBC_2.38 _ZGVcN8v_asinhf F
+GLIBC_2.38 _ZGVcN8v_atanf F
+GLIBC_2.38 _ZGVcN8v_atanhf F
+GLIBC_2.38 _ZGVcN8v_cbrtf F
+GLIBC_2.38 _ZGVcN8v_cosf F
+GLIBC_2.38 _ZGVcN8v_coshf F
+GLIBC_2.38 _ZGVcN8v_erfcf F
+GLIBC_2.38 _ZGVcN8v_erff F
+GLIBC_2.38 _ZGVcN8v_exp10f F
+GLIBC_2.38 _ZGVcN8v_exp2f F
+GLIBC_2.38 _ZGVcN8v_expf F
+GLIBC_2.38 _ZGVcN8v_expm1f F
+GLIBC_2.38 _ZGVcN8v_log10f F
+GLIBC_2.38 _ZGVcN8v_log1pf F
+GLIBC_2.38 _ZGVcN8v_log2f F
+GLIBC_2.38 _ZGVcN8v_logf F
+GLIBC_2.38 _ZGVcN8v_sinf F
+GLIBC_2.38 _ZGVcN8v_sinhf F
+GLIBC_2.38 _ZGVcN8v_tanf F
+GLIBC_2.38 _ZGVcN8v_tanhf F
+GLIBC_2.38 _ZGVcN8vv_atan2f F
+GLIBC_2.38 _ZGVcN8vv_hypotf F
+GLIBC_2.38 _ZGVcN8vv_powf F
+GLIBC_2.38 _ZGVcN8vvv_sincosf F
+GLIBC_2.38 _ZGVdN4v_acos F
+GLIBC_2.38 _ZGVdN4v_acosh F
+GLIBC_2.38 _ZGVdN4v_asin F
+GLIBC_2.38 _ZGVdN4v_asinh F
+GLIBC_2.38 _ZGVdN4v_atan F
+GLIBC_2.38 _ZGVdN4v_atanh F
+GLIBC_2.38 _ZGVdN4v_cbrt F
+GLIBC_2.38 _ZGVdN4v_cos F
+GLIBC_2.38 _ZGVdN4v_cosh F
+GLIBC_2.38 _ZGVdN4v_erf F
+GLIBC_2.38 _ZGVdN4v_erfc F
+GLIBC_2.38 _ZGVdN4v_exp F
+GLIBC_2.38 _ZGVdN4v_exp10 F
+GLIBC_2.38 _ZGVdN4v_exp2 F
+GLIBC_2.38 _ZGVdN4v_expm1 F
+GLIBC_2.38 _ZGVdN4v_log F
+GLIBC_2.38 _ZGVdN4v_log10 F
+GLIBC_2.38 _ZGVdN4v_log1p F
+GLIBC_2.38 _ZGVdN4v_log2 F
+GLIBC_2.38 _ZGVdN4v_sin F
+GLIBC_2.38 _ZGVdN4v_sinh F
+GLIBC_2.38 _ZGVdN4v_tan F
+GLIBC_2.38 _ZGVdN4v_tanh F
+GLIBC_2.38 _ZGVdN4vv_atan2 F
+GLIBC_2.38 _ZGVdN4vv_hypot F
+GLIBC_2.38 _ZGVdN4vv_pow F
+GLIBC_2.38 _ZGVdN4vvv_sincos F
+GLIBC_2.38 _ZGVdN8v_acosf F
+GLIBC_2.38 _ZGVdN8v_acoshf F
+GLIBC_2.38 _ZGVdN8v_asinf F
+GLIBC_2.38 _ZGVdN8v_asinhf F
+GLIBC_2.38 _ZGVdN8v_atanf F
+GLIBC_2.38 _ZGVdN8v_atanhf F
+GLIBC_2.38 _ZGVdN8v_cbrtf F
+GLIBC_2.38 _ZGVdN8v_cosf F
+GLIBC_2.38 _ZGVdN8v_coshf F
+GLIBC_2.38 _ZGVdN8v_erfcf F
+GLIBC_2.38 _ZGVdN8v_erff F
+GLIBC_2.38 _ZGVdN8v_exp10f F
+GLIBC_2.38 _ZGVdN8v_exp2f F
+GLIBC_2.38 _ZGVdN8v_expf F
+GLIBC_2.38 _ZGVdN8v_expm1f F
+GLIBC_2.38 _ZGVdN8v_log10f F
+GLIBC_2.38 _ZGVdN8v_log1pf F
+GLIBC_2.38 _ZGVdN8v_log2f F
+GLIBC_2.38 _ZGVdN8v_logf F
+GLIBC_2.38 _ZGVdN8v_sinf F
+GLIBC_2.38 _ZGVdN8v_sinhf F
+GLIBC_2.38 _ZGVdN8v_tanf F
+GLIBC_2.38 _ZGVdN8v_tanhf F
+GLIBC_2.38 _ZGVdN8vv_atan2f F
+GLIBC_2.38 _ZGVdN8vv_hypotf F
+GLIBC_2.38 _ZGVdN8vv_powf F
+GLIBC_2.38 _ZGVdN8vvv_sincosf F
+GLIBC_2.38 _ZGVeN16v_acosf F
+GLIBC_2.38 _ZGVeN16v_acoshf F
+GLIBC_2.38 _ZGVeN16v_asinf F
+GLIBC_2.38 _ZGVeN16v_asinhf F
+GLIBC_2.38 _ZGVeN16v_atanf F
+GLIBC_2.38 _ZGVeN16v_atanhf F
+GLIBC_2.38 _ZGVeN16v_cbrtf F
+GLIBC_2.38 _ZGVeN16v_cosf F
+GLIBC_2.38 _ZGVeN16v_coshf F
+GLIBC_2.38 _ZGVeN16v_erfcf F
+GLIBC_2.38 _ZGVeN16v_erff F
+GLIBC_2.38 _ZGVeN16v_exp10f F
+GLIBC_2.38 _ZGVeN16v_exp2f F
+GLIBC_2.38 _ZGVeN16v_expf F
+GLIBC_2.38 _ZGVeN16v_expm1f F
+GLIBC_2.38 _ZGVeN16v_log10f F
+GLIBC_2.38 _ZGVeN16v_log1pf F
+GLIBC_2.38 _ZGVeN16v_log2f F
+GLIBC_2.38 _ZGVeN16v_logf F
+GLIBC_2.38 _ZGVeN16v_sinf F
+GLIBC_2.38 _ZGVeN16v_sinhf F
+GLIBC_2.38 _ZGVeN16v_tanf F
+GLIBC_2.38 _ZGVeN16v_tanhf F
+GLIBC_2.38 _ZGVeN16vv_atan2f F
+GLIBC_2.38 _ZGVeN16vv_hypotf F
+GLIBC_2.38 _ZGVeN16vv_powf F
+GLIBC_2.38 _ZGVeN16vvv_sincosf F
+GLIBC_2.38 _ZGVeN8v_acos F
+GLIBC_2.38 _ZGVeN8v_acosh F
+GLIBC_2.38 _ZGVeN8v_asin F
+GLIBC_2.38 _ZGVeN8v_asinh F
+GLIBC_2.38 _ZGVeN8v_atan F
+GLIBC_2.38 _ZGVeN8v_atanh F
+GLIBC_2.38 _ZGVeN8v_cbrt F
+GLIBC_2.38 _ZGVeN8v_cos F
+GLIBC_2.38 _ZGVeN8v_cosh F
+GLIBC_2.38 _ZGVeN8v_erf F
+GLIBC_2.38 _ZGVeN8v_erfc F
+GLIBC_2.38 _ZGVeN8v_exp F
+GLIBC_2.38 _ZGVeN8v_exp10 F
+GLIBC_2.38 _ZGVeN8v_exp2 F
+GLIBC_2.38 _ZGVeN8v_expm1 F
+GLIBC_2.38 _ZGVeN8v_log F
+GLIBC_2.38 _ZGVeN8v_log10 F
+GLIBC_2.38 _ZGVeN8v_log1p F
+GLIBC_2.38 _ZGVeN8v_log2 F
+GLIBC_2.38 _ZGVeN8v_sin F
+GLIBC_2.38 _ZGVeN8v_sinh F
+GLIBC_2.38 _ZGVeN8v_tan F
+GLIBC_2.38 _ZGVeN8v_tanh F
+GLIBC_2.38 _ZGVeN8vv_atan2 F
+GLIBC_2.38 _ZGVeN8vv_hypot F
+GLIBC_2.38 _ZGVeN8vv_pow F
+GLIBC_2.38 _ZGVeN8vvv_sincos F
diff --git a/sysdeps/mach/hurd/x86_64/libpthread.abilist b/sysdeps/mach/hurd/x86_64/libpthread.abilist
new file mode 100644
index 00000000..01bb29c3
--- /dev/null
+++ b/sysdeps/mach/hurd/x86_64/libpthread.abilist
@@ -0,0 +1,177 @@
+GLIBC_2.38 _IO_flockfile F
+GLIBC_2.38 _IO_ftrylockfile F
+GLIBC_2.38 _IO_funlockfile F
+GLIBC_2.38 __errno_location F
+GLIBC_2.38 __h_errno_location F
+GLIBC_2.38 __mutex_lock_solid F
+GLIBC_2.38 __mutex_unlock_solid F
+GLIBC_2.38 __pthread_get_cleanup_stack F
+GLIBC_2.38 __pthread_key_create F
+GLIBC_2.38 __pthread_kill F
+GLIBC_2.38 __pthread_mutex_transfer_np F
+GLIBC_2.38 __pthread_self F
+GLIBC_2.38 __pthread_spin_destroy F
+GLIBC_2.38 __pthread_spin_init F
+GLIBC_2.38 __pthread_spin_lock F
+GLIBC_2.38 __pthread_spin_trylock F
+GLIBC_2.38 __pthread_spin_unlock F
+GLIBC_2.38 _cthreads_flockfile F
+GLIBC_2.38 _cthreads_ftrylockfile F
+GLIBC_2.38 _cthreads_funlockfile F
+GLIBC_2.38 _pthread_spin_lock F
+GLIBC_2.38 call_once F
+GLIBC_2.38 cnd_broadcast F
+GLIBC_2.38 cnd_destroy F
+GLIBC_2.38 cnd_init F
+GLIBC_2.38 cnd_signal F
+GLIBC_2.38 cnd_timedwait F
+GLIBC_2.38 cnd_wait F
+GLIBC_2.38 cthread_detach F
+GLIBC_2.38 cthread_fork F
+GLIBC_2.38 cthread_getspecific F
+GLIBC_2.38 cthread_keycreate F
+GLIBC_2.38 cthread_setspecific F
+GLIBC_2.38 flockfile F
+GLIBC_2.38 ftrylockfile F
+GLIBC_2.38 funlockfile F
+GLIBC_2.38 mtx_destroy F
+GLIBC_2.38 mtx_init F
+GLIBC_2.38 mtx_lock F
+GLIBC_2.38 mtx_timedlock F
+GLIBC_2.38 mtx_trylock F
+GLIBC_2.38 mtx_unlock F
+GLIBC_2.38 pthread_attr_destroy F
+GLIBC_2.38 pthread_attr_getdetachstate F
+GLIBC_2.38 pthread_attr_getguardsize F
+GLIBC_2.38 pthread_attr_getinheritsched F
+GLIBC_2.38 pthread_attr_getschedparam F
+GLIBC_2.38 pthread_attr_getschedpolicy F
+GLIBC_2.38 pthread_attr_getscope F
+GLIBC_2.38 pthread_attr_getstack F
+GLIBC_2.38 pthread_attr_getstackaddr F
+GLIBC_2.38 pthread_attr_getstacksize F
+GLIBC_2.38 pthread_attr_init F
+GLIBC_2.38 pthread_attr_setdetachstate F
+GLIBC_2.38 pthread_attr_setguardsize F
+GLIBC_2.38 pthread_attr_setinheritsched F
+GLIBC_2.38 pthread_attr_setschedparam F
+GLIBC_2.38 pthread_attr_setschedpolicy F
+GLIBC_2.38 pthread_attr_setscope F
+GLIBC_2.38 pthread_attr_setstack F
+GLIBC_2.38 pthread_attr_setstackaddr F
+GLIBC_2.38 pthread_attr_setstacksize F
+GLIBC_2.38 pthread_barrier_destroy F
+GLIBC_2.38 pthread_barrier_init F
+GLIBC_2.38 pthread_barrier_wait F
+GLIBC_2.38 pthread_barrierattr_destroy F
+GLIBC_2.38 pthread_barrierattr_getpshared F
+GLIBC_2.38 pthread_barrierattr_init F
+GLIBC_2.38 pthread_barrierattr_setpshared F
+GLIBC_2.38 pthread_cancel F
+GLIBC_2.38 pthread_clockjoin_np F
+GLIBC_2.38 pthread_cond_broadcast F
+GLIBC_2.38 pthread_cond_clockwait F
+GLIBC_2.38 pthread_cond_destroy F
+GLIBC_2.38 pthread_cond_init F
+GLIBC_2.38 pthread_cond_signal F
+GLIBC_2.38 pthread_cond_timedwait F
+GLIBC_2.38 pthread_cond_wait F
+GLIBC_2.38 pthread_condattr_destroy F
+GLIBC_2.38 pthread_condattr_getclock F
+GLIBC_2.38 pthread_condattr_getpshared F
+GLIBC_2.38 pthread_condattr_init F
+GLIBC_2.38 pthread_condattr_setclock F
+GLIBC_2.38 pthread_condattr_setpshared F
+GLIBC_2.38 pthread_create F
+GLIBC_2.38 pthread_detach F
+GLIBC_2.38 pthread_equal F
+GLIBC_2.38 pthread_exit F
+GLIBC_2.38 pthread_getattr_np F
+GLIBC_2.38 pthread_getconcurrency F
+GLIBC_2.38 pthread_getcpuclockid F
+GLIBC_2.38 pthread_getschedparam F
+GLIBC_2.38 pthread_getspecific F
+GLIBC_2.38 pthread_hurd_cond_timedwait_np F
+GLIBC_2.38 pthread_hurd_cond_wait_np F
+GLIBC_2.38 pthread_join F
+GLIBC_2.38 pthread_key_create F
+GLIBC_2.38 pthread_key_delete F
+GLIBC_2.38 pthread_kill F
+GLIBC_2.38 pthread_mutex_clocklock F
+GLIBC_2.38 pthread_mutex_consistent F
+GLIBC_2.38 pthread_mutex_consistent_np F
+GLIBC_2.38 pthread_mutex_destroy F
+GLIBC_2.38 pthread_mutex_getprioceiling F
+GLIBC_2.38 pthread_mutex_init F
+GLIBC_2.38 pthread_mutex_lock F
+GLIBC_2.38 pthread_mutex_setprioceiling F
+GLIBC_2.38 pthread_mutex_timedlock F
+GLIBC_2.38 pthread_mutex_transfer_np F
+GLIBC_2.38 pthread_mutex_trylock F
+GLIBC_2.38 pthread_mutex_unlock F
+GLIBC_2.38 pthread_mutexattr_destroy F
+GLIBC_2.38 pthread_mutexattr_getprioceiling F
+GLIBC_2.38 pthread_mutexattr_getprotocol F
+GLIBC_2.38 pthread_mutexattr_getpshared F
+GLIBC_2.38 pthread_mutexattr_getrobust F
+GLIBC_2.38 pthread_mutexattr_getrobust_np F
+GLIBC_2.38 pthread_mutexattr_gettype F
+GLIBC_2.38 pthread_mutexattr_init F
+GLIBC_2.38 pthread_mutexattr_setprioceiling F
+GLIBC_2.38 pthread_mutexattr_setprotocol F
+GLIBC_2.38 pthread_mutexattr_setpshared F
+GLIBC_2.38 pthread_mutexattr_setrobust F
+GLIBC_2.38 pthread_mutexattr_setrobust_np F
+GLIBC_2.38 pthread_mutexattr_settype F
+GLIBC_2.38 pthread_once F
+GLIBC_2.38 pthread_rwlock_clockrdlock F
+GLIBC_2.38 pthread_rwlock_clockwrlock F
+GLIBC_2.38 pthread_rwlock_destroy F
+GLIBC_2.38 pthread_rwlock_init F
+GLIBC_2.38 pthread_rwlock_rdlock F
+GLIBC_2.38 pthread_rwlock_timedrdlock F
+GLIBC_2.38 pthread_rwlock_timedwrlock F
+GLIBC_2.38 pthread_rwlock_tryrdlock F
+GLIBC_2.38 pthread_rwlock_trywrlock F
+GLIBC_2.38 pthread_rwlock_unlock F
+GLIBC_2.38 pthread_rwlock_wrlock F
+GLIBC_2.38 pthread_rwlockattr_destroy F
+GLIBC_2.38 pthread_rwlockattr_getpshared F
+GLIBC_2.38 pthread_rwlockattr_init F
+GLIBC_2.38 pthread_rwlockattr_setpshared F
+GLIBC_2.38 pthread_self F
+GLIBC_2.38 pthread_setcancelstate F
+GLIBC_2.38 pthread_setcanceltype F
+GLIBC_2.38 pthread_setconcurrency F
+GLIBC_2.38 pthread_setschedparam F
+GLIBC_2.38 pthread_setschedprio F
+GLIBC_2.38 pthread_setspecific F
+GLIBC_2.38 pthread_sigmask F
+GLIBC_2.38 pthread_spin_destroy F
+GLIBC_2.38 pthread_spin_init F
+GLIBC_2.38 pthread_spin_lock F
+GLIBC_2.38 pthread_spin_trylock F
+GLIBC_2.38 pthread_spin_unlock F
+GLIBC_2.38 pthread_testcancel F
+GLIBC_2.38 pthread_timedjoin_np F
+GLIBC_2.38 pthread_tryjoin_np F
+GLIBC_2.38 pthread_yield F
+GLIBC_2.38 sem_clockwait F
+GLIBC_2.38 sem_close F
+GLIBC_2.38 sem_destroy F
+GLIBC_2.38 sem_getvalue F
+GLIBC_2.38 sem_init F
+GLIBC_2.38 sem_open F
+GLIBC_2.38 sem_post F
+GLIBC_2.38 sem_timedwait F
+GLIBC_2.38 sem_trywait F
+GLIBC_2.38 sem_unlink F
+GLIBC_2.38 sem_wait F
+GLIBC_2.38 thrd_create F
+GLIBC_2.38 thrd_detach F
+GLIBC_2.38 thrd_exit F
+GLIBC_2.38 thrd_join F
+GLIBC_2.38 tss_create F
+GLIBC_2.38 tss_delete F
+GLIBC_2.38 tss_get F
+GLIBC_2.38 tss_set F
diff --git a/sysdeps/mach/hurd/x86_64/libresolv.abilist b/sysdeps/mach/hurd/x86_64/libresolv.abilist
new file mode 100644
index 00000000..c3dd560d
--- /dev/null
+++ b/sysdeps/mach/hurd/x86_64/libresolv.abilist
@@ -0,0 +1,55 @@
+GLIBC_2.38 __b64_ntop F
+GLIBC_2.38 __b64_pton F
+GLIBC_2.38 __dn_count_labels F
+GLIBC_2.38 __fp_nquery F
+GLIBC_2.38 __fp_query F
+GLIBC_2.38 __fp_resstat F
+GLIBC_2.38 __hostalias F
+GLIBC_2.38 __loc_aton F
+GLIBC_2.38 __loc_ntoa F
+GLIBC_2.38 __p_cdname F
+GLIBC_2.38 __p_cdnname F
+GLIBC_2.38 __p_class F
+GLIBC_2.38 __p_class_syms D 0xa8
+GLIBC_2.38 __p_fqname F
+GLIBC_2.38 __p_fqnname F
+GLIBC_2.38 __p_option F
+GLIBC_2.38 __p_query F
+GLIBC_2.38 __p_rcode F
+GLIBC_2.38 __p_time F
+GLIBC_2.38 __p_type F
+GLIBC_2.38 __p_type_syms D 0x450
+GLIBC_2.38 __putlong F
+GLIBC_2.38 __putshort F
+GLIBC_2.38 __res_close F
+GLIBC_2.38 __res_hostalias F
+GLIBC_2.38 __res_isourserver F
+GLIBC_2.38 __res_nameinquery F
+GLIBC_2.38 __res_queriesmatch F
+GLIBC_2.38 __sym_ntop F
+GLIBC_2.38 __sym_ntos F
+GLIBC_2.38 __sym_ston F
+GLIBC_2.38 _getlong F
+GLIBC_2.38 _getshort F
+GLIBC_2.38 inet_net_ntop F
+GLIBC_2.38 inet_net_pton F
+GLIBC_2.38 inet_neta F
+GLIBC_2.38 ns_datetosecs F
+GLIBC_2.38 ns_format_ttl F
+GLIBC_2.38 ns_get16 F
+GLIBC_2.38 ns_get32 F
+GLIBC_2.38 ns_initparse F
+GLIBC_2.38 ns_makecanon F
+GLIBC_2.38 ns_msg_getflag F
+GLIBC_2.38 ns_name_ntol F
+GLIBC_2.38 ns_name_rollback F
+GLIBC_2.38 ns_parse_ttl F
+GLIBC_2.38 ns_parserr F
+GLIBC_2.38 ns_put16 F
+GLIBC_2.38 ns_put32 F
+GLIBC_2.38 ns_samedomain F
+GLIBC_2.38 ns_samename F
+GLIBC_2.38 ns_skiprr F
+GLIBC_2.38 ns_sprintrr F
+GLIBC_2.38 ns_sprintrrf F
+GLIBC_2.38 ns_subdomain F
diff --git a/sysdeps/mach/hurd/x86_64/librt.abilist b/sysdeps/mach/hurd/x86_64/librt.abilist
new file mode 100644
index 00000000..fa148abb
--- /dev/null
+++ b/sysdeps/mach/hurd/x86_64/librt.abilist
@@ -0,0 +1,33 @@
+GLIBC_2.38 __mq_open_2 F
+GLIBC_2.38 aio_cancel F
+GLIBC_2.38 aio_cancel64 F
+GLIBC_2.38 aio_error F
+GLIBC_2.38 aio_error64 F
+GLIBC_2.38 aio_fsync F
+GLIBC_2.38 aio_fsync64 F
+GLIBC_2.38 aio_init F
+GLIBC_2.38 aio_read F
+GLIBC_2.38 aio_read64 F
+GLIBC_2.38 aio_return F
+GLIBC_2.38 aio_return64 F
+GLIBC_2.38 aio_suspend F
+GLIBC_2.38 aio_suspend64 F
+GLIBC_2.38 aio_write F
+GLIBC_2.38 aio_write64 F
+GLIBC_2.38 lio_listio F
+GLIBC_2.38 lio_listio64 F
+GLIBC_2.38 mq_close F
+GLIBC_2.38 mq_getattr F
+GLIBC_2.38 mq_notify F
+GLIBC_2.38 mq_open F
+GLIBC_2.38 mq_receive F
+GLIBC_2.38 mq_send F
+GLIBC_2.38 mq_setattr F
+GLIBC_2.38 mq_timedreceive F
+GLIBC_2.38 mq_timedsend F
+GLIBC_2.38 mq_unlink F
+GLIBC_2.38 timer_create F
+GLIBC_2.38 timer_delete F
+GLIBC_2.38 timer_getoverrun F
+GLIBC_2.38 timer_gettime F
+GLIBC_2.38 timer_settime F
-- 
2.39.2


^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH 00/34] The rest of the x86_64-gnu port
  2023-03-19 16:44 ` [RFC PATCH 00/34] The rest of the x86_64-gnu port Luca
@ 2023-03-20  5:03   ` Flávio Cruz
  0 siblings, 0 replies; 140+ messages in thread
From: Flávio Cruz @ 2023-03-20  5:03 UTC (permalink / raw)
  To: Luca; +Cc: Sergey Bugaev, libc-alpha, bug-hurd, Samuel Thibault

[-- Attachment #1: Type: text/plain, Size: 3872 bytes --]

Nice work indeed Sergey!

On Sun, Mar 19, 2023 at 12:44 PM Luca <luca@orpolo.org> wrote:

> Hi Sergey,
>
> this looks like a great work!
>
> Il 19/03/23 16:09, Sergey Bugaev ha scritto:
> > I was unable to actually get it running on GNU Mach. It either never gets
> > started, or crashes soon enough. The latter is actually to be expected,
> since
> > the kernel does not actually support i386_fsgs_base_state yet. I was
> unable
> > to investigate what exactly happens, because in addition to the troubles
> with
> > actually running GNU Mach on qemu-system-x86_64 (-kernel doesn't
> work..., you
> > really have to build an image with GRUB) and attaching a debugger to it
> > (either GDB or QEMU get utterly confused be the switch to the long
> mode...),
> > I had troubles with actually spawning the task while breaking on its
> first
> > instruction (a la starti). In particular prompt-task-resume didn't seem
> to
> > work for me, nor did breaking somewhere before the task should have been
> > resumed.
> >
> > So I would appreciate some help with both testing this patchset (i.e. if
> you
> > do have a working x86_64 Mach + userspace setup, build glibc and try to
> run
> > it), and some general tips about how I would go about debugging the
> bootstrap
> > task from the first instruction onwards with x86_64 GNU Mach, QEMU, and
> GDB.
>
> One reason for troubles in testing with gnumach is that rpc don't work
> very well yet... Simple syscalls should work if you take my patch with
> syscall64 v3, and also some simple rpcs, but in general I still see some
> issues with the 64-bit message format and the mig-generated stubs. I
> still have most of my tests failing with a 64-bit userspace.
>

I tested with your syscall64 v3. It seems most programs do not work because
the user stack is not aligned correctly. I sent a patch to align it to 16
bytes (seems
like that's what most other OSes use nowadays) and that fixed a bunch.


>
> That being said, once we have fully working rpcs, I think you could have
> a "hello-static-glibc" bootstrap module, and assemble a grub rescue disk
> to test it on gnumach, much like my "hello" test. For this you could
> also take the commit [0] and add your bootstrap module manually, to
> reuse the grub disk generation part. Once this works, you should be able
> to build ext2fs.static, exec.static and run a "hello-dynamic-glibc" test
> by replacing /hurd/startup, which is the first dynamically-linked
> executable started. For this case creating a minimal bootable disk is a
> bit more tricky, I did it once and I should have some scripts that could
> be reused.
>
> In your case you probably need to build a cross-compiler targeting
> hurd64, maybe with Flavio's scripts (in my tests I use the
> -ffreestanding environment so I can compile them on GNU/Linux). I'm not
> sure how this could be optimized for iterative development.
>
> About debugging, the nice thing is that you can load the debug symbols
> of the bootstrap module in the same gdb remote session used to debug
> gnumach, with:
>
>    add-symbol-file <your-path>/module-hello-static-glibc
>
> and you can single-step, use breakpoints etc. on both the user and
> kernel code. For example, you can set a breakpoint on the user entry
> point _start() and single-step from there.
>
> Also, when you attach gdb to qemu, you should avoid setting a breakpoint
> too early, but anything after setup_main() should be ok. So if you want
> to set a breakpoint on _start(), I suggest you do it after reaching
> setup_main(), otherwise it will also stop on gnumach's own _start(), and
> that will indeed mess up with segmentation and long mode.
>
> I hope this helps,
>
> Luca
>
> [0]
>
> https://gitlab.com/luckyd/gnumach/-/commit/cb00d39edc6604cfb485161e85720e23f167d819
>

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [PATCH v2] hurd: Add expected abilist files for x86_64
  2023-03-19 20:14     ` [PATCH v2] " Sergey Bugaev
@ 2023-03-20  6:30       ` Florian Weimer
  0 siblings, 0 replies; 140+ messages in thread
From: Florian Weimer @ 2023-03-20  6:30 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: bug-hurd, libc-alpha, Samuel Thibault

* Sergey Bugaev:

> On Sun, Mar 19, 2023 at 9:05 PM Florian Weimer <fw@deneb.enyo.de> wrote:
>> You should consider creating a shlib-versions file with a baseline of
>> 2.38, so that the obsolete Sun RPC symbols (and many others) are not
>> compiled in.
>
> So *that's* how it's done! Thank you.
>
> Does the below look reasonable? I've dropped lib{mach,hurd}user,

Based on a quick check, it looks okay.  Obviously we would like to get
rid of more legacy symbols (particularly in libio), but that work
hasn't been done yet (it's not Hurd-specific).

>  and it seems libanl, libnsl, libutil are all gone.

Yes, that's expected.

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH gnumach 01/34] Add i386_fsgs_base_state
  2023-03-19 15:09 ` [RFC PATCH gnumach 01/34] Add i386_fsgs_base_state Sergey Bugaev
@ 2023-04-02 22:43   ` Samuel Thibault
  0 siblings, 0 replies; 140+ messages in thread
From: Samuel Thibault @ 2023-04-02 22:43 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: libc-alpha, bug-hurd

Applied, thanks!

Sergey Bugaev, le dim. 19 mars 2023 18:09:44 +0300, a ecrit:
> ---
>  i386/include/mach/i386/thread_status.h | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/i386/include/mach/i386/thread_status.h b/i386/include/mach/i386/thread_status.h
> index 3de22ff3..32e40686 100644
> --- a/i386/include/mach/i386/thread_status.h
> +++ b/i386/include/mach/i386/thread_status.h
> @@ -57,6 +57,7 @@
>  #define	i386_V86_ASSIST_STATE	4
>  #define	i386_REGS_SEGS_STATE	5
>  #define	i386_DEBUG_STATE	6
> +#define	i386_FSGS_BASE_STATE	7
>  
>  /*
>   * This structure is used for both
> @@ -179,4 +180,11 @@ struct i386_debug_state {
>  #define	i386_DEBUG_STATE_COUNT \
>  	    (sizeof(struct i386_debug_state)/sizeof(unsigned int))
>  
> +struct i386_fsgs_base_state {
> +	unsigned long fs_base;
> +	unsigned long gs_base;
> +};
> +#define i386_FSGS_BASE_STATE_COUNT \
> +	    (sizeof(struct i386_fsgs_base_state)/sizeof(unsigned int))
> +
>  #endif	/* _MACH_I386_THREAD_STATUS_H_ */
> -- 
> 2.39.2
> 

-- 
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH gnumach 02/34] Remove bootstrap.defs
  2023-03-19 15:09 ` [RFC PATCH gnumach 02/34] Remove bootstrap.defs Sergey Bugaev
@ 2023-04-02 22:43   ` Samuel Thibault
  2023-04-03  9:39     ` Sergey Bugaev
  0 siblings, 1 reply; 140+ messages in thread
From: Samuel Thibault @ 2023-04-02 22:43 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: libc-alpha, bug-hurd

Hello,

I guess the do_bootstrap_privileged_ports function can be dropped from
the hurd repo?

Applied, thanks!

Samuel

Sergey Bugaev, le dim. 19 mars 2023 18:09:45 +0300, a ecrit:
> As far as I can see, this file was imported in the very beginning of GNU Mach
> history, and unused since then. Nobody implements or uses this interface. GNU
> Mach uses a different way to pass the privileged ports to the bootstrap tasks:
> instead of the task(s) actively asking for the ports in an RPC, the ports are
> preemptively inserted into the IPC space(s) of the task(s), as configured by
> the boot script.
> 
> Remove bootstrap.defs so as to not confuse anyone into thinking it works.
> ---
>  Makefrag.am                 |  1 -
>  include/mach/bootstrap.defs | 49 -------------------------------------
>  2 files changed, 50 deletions(-)
>  delete mode 100644 include/mach/bootstrap.defs
> 
> diff --git a/Makefrag.am b/Makefrag.am
> index 358f8db3..5d4f2c48 100644
> --- a/Makefrag.am
> +++ b/Makefrag.am
> @@ -367,7 +367,6 @@ include_device_HEADERS = \
>  
>  include_machdir = $(includedir)/mach
>  include_mach_HEADERS = \
> -	include/mach/bootstrap.defs \
>  	include/mach/default_pager.defs \
>  	include/mach/default_pager_helper.defs \
>  	include/mach/default_pager_types.defs \
> diff --git a/include/mach/bootstrap.defs b/include/mach/bootstrap.defs
> deleted file mode 100644
> index 0b233e4a..00000000
> --- a/include/mach/bootstrap.defs
> +++ /dev/null
> @@ -1,49 +0,0 @@
> -/* 
> - * Mach Operating System
> - * Copyright (c) 1992 Carnegie Mellon University
> - * All Rights Reserved.
> - * 
> - * Permission to use, copy, modify and distribute this software and its
> - * documentation is hereby granted, provided that both the copyright
> - * notice and this permission notice appear in all copies of the
> - * software, derivative works or modified versions, and any portions
> - * thereof, and that both notices appear in supporting documentation.
> - * 
> - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
> - * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
> - * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
> - * 
> - * Carnegie Mellon requests users of this software to return to
> - * 
> - *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
> - *  School of Computer Science
> - *  Carnegie Mellon University
> - *  Pittsburgh PA 15213-3890
> - * 
> - * any improvements or extensions that they make and grant Carnegie Mellon 
> - * the rights to redistribute these changes.
> - */
> -
> -subsystem bootstrap 999999;
> -
> -#include <mach/std_types.defs>
> -
> -ServerPrefix do_;
> -
> -/*
> - *	The old form of the bootstrap_privileged_ports RPC
> - *	is not expressible in Mig syntax, because the reply
> - *	message doesn't have a return code.
> - */
> -
> -skip;	/* old bootstrap_privileged_ports */
> -
> -/*
> - *	The startup task can make this call on its bootstrap port
> - *	to get the privileged ports.
> - */
> -
> -routine bootstrap_privileged_ports(
> -		bootstrap		: mach_port_t;
> -	out	priv_host		: mach_port_t;
> -	out	priv_device		: mach_port_t);
> -- 
> 2.39.2
> 

-- 
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH gnumach 03/34] Make exception subcode a long
  2023-03-19 15:09 ` [RFC PATCH gnumach 03/34] Make exception subcode a long Sergey Bugaev
@ 2023-04-02 22:45   ` Samuel Thibault
  2023-04-03  9:32     ` Sergey Bugaev
  0 siblings, 1 reply; 140+ messages in thread
From: Samuel Thibault @ 2023-04-02 22:45 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: libc-alpha, bug-hurd

Applied, thanks!

Sergey Bugaev, le dim. 19 mars 2023 18:09:46 +0300, a ecrit:
> On EXC_BAD_ACCESS, exception subcode is used to pass the faulting memory
> address, so it needs to be (at least) pointer-sized. Thus, make it into
> a long.
> 
> This requires matching changes in glibc and the Hurd.

But the change doesn't affect 32bit glibc and hurd since
rpc_long_integer_t is really like integer_t there, right?

> ---
> 
> NOTE: Most of this was a pretty mechanical change, but I'm not very sure
> I got the exc_subcode_proto right; please do check.
> 
>  doc/mach.texi         |  4 ++--
>  i386/i386/trap.c      |  2 +-
>  i386/i386/trap.h      |  2 +-
>  include/mach/exc.defs |  2 +-
>  kern/exception.c      | 40 ++++++++++++++++++++++++++++------------
>  kern/exception.h      |  6 +++---
>  kern/thread.h         |  2 +-
>  7 files changed, 37 insertions(+), 21 deletions(-)
> 
> diff --git a/doc/mach.texi b/doc/mach.texi
> index 2c22fa38..fdc36d45 100644
> --- a/doc/mach.texi
> +++ b/doc/mach.texi
> @@ -4830,11 +4830,11 @@ argument set to @code{THREAD_EXCEPTION_PORT}.
>  @node Exceptions
>  @subsection Exceptions
>  
> -@deftypefun kern_return_t catch_exception_raise (@w{mach_port_t @var{exception_port}}, @w{thread_t @var{thread}}, @w{task_t @var{task}}, @w{int @var{exception}}, @w{int @var{code}}, @w{int @var{subcode}})
> +@deftypefun kern_return_t catch_exception_raise (@w{mach_port_t @var{exception_port}}, @w{thread_t @var{thread}}, @w{task_t @var{task}}, @w{int @var{exception}}, @w{int @var{code}}, @w{long @var{subcode}})
>  XXX Fixme
>  @end deftypefun
>  
> -@deftypefun kern_return_t exception_raise (@w{mach_port_t @var{exception_port}}, @w{mach_port_t @var{thread}}, @w{mach_port_t @var{task}}, @w{integer_t @var{exception}}, @w{integer_t @var{code}}, @w{integer_t @var{subcode}})
> +@deftypefun kern_return_t exception_raise (@w{mach_port_t @var{exception_port}}, @w{mach_port_t @var{thread}}, @w{mach_port_t @var{task}}, @w{integer_t @var{exception}}, @w{integer_t @var{code}}, @w{long_integer_t @var{subcode}})
>  XXX Fixme
>  @end deftypefun
>  
> diff --git a/i386/i386/trap.c b/i386/i386/trap.c
> index 34ccb6a5..f7bd8e38 100644
> --- a/i386/i386/trap.c
> +++ b/i386/i386/trap.c
> @@ -628,7 +628,7 @@ void
>  i386_exception(
>  	int	exc,
>  	int	code,
> -	int	subcode)
> +	long	subcode)
>  {
>  	spl_t	s;
>  
> diff --git a/i386/i386/trap.h b/i386/i386/trap.h
> index d9df7afa..e82164d0 100644
> --- a/i386/i386/trap.h
> +++ b/i386/i386/trap.h
> @@ -40,7 +40,7 @@ void
>  i386_exception(
>  	int	exc,
>  	int	code,
> -	int	subcode) __attribute__ ((noreturn));
> +	long	subcode) __attribute__ ((noreturn));
>  
>  extern void
>  thread_kdb_return(void);
> diff --git a/include/mach/exc.defs b/include/mach/exc.defs
> index 94af828c..28638e2f 100644
> --- a/include/mach/exc.defs
> +++ b/include/mach/exc.defs
> @@ -44,4 +44,4 @@ routine		exception_raise(
>  			task		: mach_port_t;
>  			exception	: integer_t;
>  			code		: integer_t;
> -			subcode		: integer_t);
> +			subcode		: rpc_long_integer_t);
> diff --git a/kern/exception.c b/kern/exception.c
> index 1014b3ed..10435b5c 100644
> --- a/kern/exception.c
> +++ b/kern/exception.c
> @@ -85,9 +85,9 @@ boolean_t debug_user_with_kdb = FALSE;
>  
>  void
>  exception(
> -	integer_t _exception, 
> -	integer_t code, 
> -	integer_t subcode)
> +	integer_t _exception,
> +	integer_t code,
> +	long_integer_t subcode)
>  {
>  	ipc_thread_t self = current_thread();
>  	ipc_port_t exc_port;
> @@ -157,9 +157,9 @@ exception(
>  
>  void
>  exception_try_task(
> -	integer_t _exception, 
> -	integer_t code, 
> -	integer_t subcode)
> +	integer_t _exception,
> +	integer_t code,
> +	long_integer_t subcode)
>  {
>  	ipc_thread_t self = current_thread();
>  	task_t task = self->task;
> @@ -277,11 +277,17 @@ struct mach_exception {
>  	mach_msg_type_t		codeType;
>  	integer_t		code;
>  	mach_msg_type_t		subcodeType;
> -	integer_t		subcode;
> +	rpc_long_integer_t	subcode;
>  };
>  
>  #define	INTEGER_T_SIZE_IN_BITS	(8 * sizeof(integer_t))
>  #define	INTEGER_T_TYPE		MACH_MSG_TYPE_INTEGER_T
> +#define RPC_LONG_INTEGER_T_SIZE_IN_BITS	(8 * sizeof(rpc_long_integer_t))
> +#if defined(__x86_64__) && !defined(USER32)
> +#define RPC_LONG_INTEGER_T_TYPE	MACH_MSG_TYPE_INTEGER_64
> +#else
> +#define RPC_LONG_INTEGER_T_TYPE	MACH_MSG_TYPE_INTEGER_32
> +#endif
>  					/* in mach/machine/vm_types.h */
>  
>  mach_msg_type_t exc_port_proto = {
> @@ -304,6 +310,16 @@ mach_msg_type_t exc_code_proto = {
>  	/* msgt_unused = */		0
>  };
>  
> +mach_msg_type_t exc_subcode_proto = {
> +	/* msgt_name = */		RPC_LONG_INTEGER_T_TYPE,
> +	/* msgt_size = */		RPC_LONG_INTEGER_T_SIZE_IN_BITS,
> +	/* msgt_number = */		1,
> +	/* msgt_inline = */		TRUE,
> +	/* msgt_longform = */		FALSE,
> +	/* msgt_deallocate = */		FALSE,
> +	/* msgt_unused = */		0
> +};
> +
>  /*
>   *	Routine:	exception_raise
>   *	Purpose:
> @@ -329,9 +345,9 @@ exception_raise(
>  	ipc_port_t 	dest_port,
>  	ipc_port_t 	thread_port,
>  	ipc_port_t 	task_port,
> -	integer_t 	_exception, 
> -	integer_t 	code, 
> -	integer_t 	subcode)
> +	integer_t 	_exception,
> +	integer_t 	code,
> +	long_integer_t 	subcode)
>  {
>  	ipc_thread_t self = current_thread();
>  	ipc_thread_t receiver;
> @@ -521,7 +537,7 @@ exception_raise(
>  	exc->exception = _exception;
>  	exc->codeType = exc_code_proto;
>  	exc->code = code;
> -	exc->subcodeType = exc_code_proto;
> +	exc->subcodeType = exc_subcode_proto;
>  	exc->subcode = subcode;
>  
>  	/*
> @@ -725,7 +741,7 @@ exception_raise(
>  	exc->exception = _exception;
>  	exc->codeType = exc_code_proto;
>  	exc->code = code;
> -	exc->subcodeType = exc_code_proto;
> +	exc->subcodeType = exc_subcode_proto;
>  	exc->subcode = subcode;
>  
>  	ipc_mqueue_send_always(kmsg);
> diff --git a/kern/exception.h b/kern/exception.h
> index 55902dd1..36138da8 100644
> --- a/kern/exception.h
> +++ b/kern/exception.h
> @@ -26,13 +26,13 @@ extern void
>  exception(
>  	integer_t 	_exception,
>  	integer_t	code,
> -	integer_t	subcode) __attribute__ ((noreturn));
> +	long_integer_t	subcode) __attribute__ ((noreturn));
>  
>  extern void
>  exception_try_task(
>  	integer_t 	_exception,
>  	integer_t	code,
> -	integer_t	subcode) __attribute__ ((noreturn));
> +	long_integer_t	subcode) __attribute__ ((noreturn));
>  
>  extern void
>  exception_no_server(void) __attribute__ ((noreturn));
> @@ -44,7 +44,7 @@ exception_raise(
>  	ipc_port_t task_port,
>  	integer_t  _exception,
>  	integer_t  code,
> -	integer_t  subcode) __attribute__ ((noreturn));
> +	long_integer_t  subcode) __attribute__ ((noreturn));
>  
>  extern kern_return_t
>  exception_parse_reply(ipc_kmsg_t kmsg);
> diff --git a/kern/thread.h b/kern/thread.h
> index f8989f45..3485f6af 100644
> --- a/kern/thread.h
> +++ b/kern/thread.h
> @@ -190,7 +190,7 @@ struct thread {
>  			struct ipc_port *port;
>  			int exc;
>  			int code;
> -			int subcode;
> +			long subcode;
>  		} exception;
>  		void *other;		/* catch-all for other state */
>  	} saved;
> -- 
> 2.39.2
> 

-- 
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 04/34] hurd: Make exception subcode a long
  2023-03-19 15:09 ` [RFC PATCH glibc 04/34] hurd: " Sergey Bugaev
@ 2023-04-02 22:52   ` Samuel Thibault
  0 siblings, 0 replies; 140+ messages in thread
From: Samuel Thibault @ 2023-04-02 22:52 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: libc-alpha, bug-hurd

Applied, thanks!

Sergey Bugaev, le dim. 19 mars 2023 18:09:47 +0300, a ecrit:
> On EXC_BAD_ACCESS, exception subcode is used to pass the faulting memory
> address, so it needs to be (at least) pointer-sized. Thus, make it into
> a long. This matches the corresponding change in GNU Mach.
> ---
>  hurd/catch-exc.c   | 2 +-
>  hurd/hurd/signal.h | 5 +++--
>  hurd/hurdfault.c   | 2 +-
>  3 files changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/hurd/catch-exc.c b/hurd/catch-exc.c
> index e8a9c798..5ee2233a 100644
> --- a/hurd/catch-exc.c
> +++ b/hurd/catch-exc.c
> @@ -31,7 +31,7 @@ _S_catch_exception_raise (mach_port_t port,
>  			  mach_msg_type_number_t codeCnt
>  #else				/* Vanilla Mach 3.0 interface.  */
>  			  integer_t exception,
> -			  integer_t code, integer_t subcode
> +			  integer_t code, long_integer_t subcode
>  #endif
>  			  )
>  {
> diff --git a/hurd/hurd/signal.h b/hurd/hurd/signal.h
> index 4e9f79b1..c33f974b 100644
> --- a/hurd/hurd/signal.h
> +++ b/hurd/hurd/signal.h
> @@ -51,9 +51,10 @@ struct hurd_signal_preemptor;	/* <hurd/sigpreempt.h> */
>  struct hurd_signal_detail
>    {
>      /* Codes from origination Mach exception_raise message.  */
> -    integer_t exc, exc_code, exc_subcode;
> +    integer_t exc, exc_code;
> +    long_integer_t exc_subcode;
>      /* Sigcode as passed or computed from exception codes.  */
> -    integer_t code;
> +    long_integer_t code;
>      /* Error code as passed or extracted from exception codes.  */
>      error_t error;
>    };
> diff --git a/hurd/hurdfault.c b/hurd/hurdfault.c
> index 069c1c26..a81e7280 100644
> --- a/hurd/hurdfault.c
> +++ b/hurd/hurdfault.c
> @@ -45,7 +45,7 @@ _hurdsig_fault_catch_exception_raise (mach_port_t port,
>  				      mach_msg_type_number_t codeCnt
>  #else				/* Vanilla Mach 3.0 interface.  */
>  				      integer_t exception,
> -				      integer_t code, integer_t subcode
> +				      integer_t code, long_integer_t subcode
>  #endif
>  				      )
>  {
> -- 
> 2.39.2
> 

-- 
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 05/34] hurd: Remove __hurd_threadvar_stack_{offset,mask}
  2023-03-19 15:09 ` [RFC PATCH glibc 05/34] hurd: Remove __hurd_threadvar_stack_{offset,mask} Sergey Bugaev
@ 2023-04-02 22:53   ` Samuel Thibault
  0 siblings, 0 replies; 140+ messages in thread
From: Samuel Thibault @ 2023-04-02 22:53 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: libc-alpha, bug-hurd

Applied, thanks!

Sergey Bugaev, le dim. 19 mars 2023 18:09:48 +0300, a ecrit:
> Noone is or should be using __hurd_threadvar_stack_{offset,mask}, we
> have proper TLS now. These two remaining variables are never set to
> anything other than zero, so any code that would try to use them as
> described would just dereference a zero pointer and crash. So remove
> them entirely.
> 
> Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
> ---
>  hurd/Versions                       |  5 -----
>  hurd/hurd/threadvar.h               | 15 ---------------
>  sysdeps/mach/hurd/Versions          |  3 ---
>  sysdeps/mach/hurd/_Fork.c           | 20 ++------------------
>  sysdeps/mach/hurd/i386/libc.abilist |  2 --
>  sysdeps/mach/hurd/x86/init-first.c  |  3 ---
>  6 files changed, 2 insertions(+), 46 deletions(-)
> 
> diff --git a/hurd/Versions b/hurd/Versions
> index 7e4f1c56..3d8b412d 100644
> --- a/hurd/Versions
> +++ b/hurd/Versions
> @@ -1,8 +1,5 @@
>  libc {
>    GLIBC_2.0 {
> -    # variables used in macros & inline functions
> -    __hurd_threadvar_stack_mask; __hurd_threadvar_stack_offset;
> -
>      # functions used in libmachuser and libhurduser
>      _S_catch_exception_raise;
>      _S_catch_exception_raise_state;
> @@ -129,8 +126,6 @@ libc {
>      _hurd_fd_error_signal; _hurd_fd_error;
>      __hurd_dfail; __hurd_sockfail;
>      _hurd_port_locked_set;
> -    __hurd_threadvar_location_from_sp;
> -    __hurd_threadvar_location;
>      _hurd_userlink_link; _hurd_userlink_unlink; _hurd_userlink_clear;
>    }
>    GLIBC_2.29 {
> diff --git a/hurd/hurd/threadvar.h b/hurd/hurd/threadvar.h
> index 2a94f4de..f5c6a278 100644
> --- a/hurd/hurd/threadvar.h
> +++ b/hurd/hurd/threadvar.h
> @@ -22,21 +22,6 @@
>  #include <features.h>
>  #include <tls.h>
>  
> -/* The per-thread variables are found by ANDing this mask
> -   with the value of the stack pointer and then adding this offset.
> -
> -   In the multi-threaded case, cthreads initialization sets
> -   __hurd_threadvar_stack_mask to ~(cthread_stack_size - 1), a mask which
> -   finds the base of the fixed-size cthreads stack; and
> -   __hurd_threadvar_stack_offset to a small offset that skips the data
> -   cthreads itself maintains at the base of each thread's stack.
> -
> -   In the single-threaded or libpthread case, __hurd_threadvar_stack_mask is
> -   zero, so the stack pointer is ignored. */
> -
> -extern unsigned long int __hurd_threadvar_stack_mask;
> -extern unsigned long int __hurd_threadvar_stack_offset;
> -
>  /* The variables __hurd_sigthread_stack_base and
>     __hurd_sigthread_stack_end define the bounds of the stack used by the
>     signal thread, so that thread can always be specifically identified.  */
> diff --git a/sysdeps/mach/hurd/Versions b/sysdeps/mach/hurd/Versions
> index d75e674b..bf2e870a 100644
> --- a/sysdeps/mach/hurd/Versions
> +++ b/sysdeps/mach/hurd/Versions
> @@ -33,9 +33,6 @@ libc {
>  
>  ld {
>    GLIBC_2.0 {
> -    # variables that must be shared with libc
> -    __hurd_threadvar_stack_mask;  __hurd_threadvar_stack_offset;
> -
>      # functions that must be shared with libc
>      __close; __getpid;
>      __mmap; __open; __read; __sbrk; __strtoul_internal;
> diff --git a/sysdeps/mach/hurd/_Fork.c b/sysdeps/mach/hurd/_Fork.c
> index 4984cecd..77cd2917 100644
> --- a/sysdeps/mach/hurd/_Fork.c
> +++ b/sysdeps/mach/hurd/_Fork.c
> @@ -482,25 +482,9 @@ retry:
>  				    (natural_t *) &state, &statecount))
>  	LOSE;
>  #ifdef STACK_GROWTH_UP
> -      if (__hurd_sigthread_stack_base == 0)
> -	{
> -	  state.SP &= __hurd_threadvar_stack_mask;
> -	  state.SP += __hurd_threadvar_stack_offset;
> -	}
> -      else
> -	state.SP = __hurd_sigthread_stack_base;
> +      state.SP = __hurd_sigthread_stack_base;
>  #else
> -      if (__hurd_sigthread_stack_end == 0)
> -	{
> -	  /* The signal thread has a stack assigned by pthread.
> -	     The threadvar_stack variables conveniently tell us how
> -	     to get to the highest address in the stack, just below
> -	     the per-thread variables.  */
> -	  state.SP &= __hurd_threadvar_stack_mask;
> -	  state.SP += __hurd_threadvar_stack_offset;
> -	}
> -      else
> -	state.SP = __hurd_sigthread_stack_end;
> +      state.SP = __hurd_sigthread_stack_end;
>  #endif
>        MACHINE_THREAD_STATE_SET_PC (&state,
>  				   (unsigned long int) _hurd_msgport_receive);
> diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist
> index ed0c4789..da1cad67 100644
> --- a/sysdeps/mach/hurd/i386/libc.abilist
> +++ b/sysdeps/mach/hurd/i386/libc.abilist
> @@ -279,8 +279,6 @@ GLIBC_2.2.6 __gettimeofday F
>  GLIBC_2.2.6 __gmtime_r F
>  GLIBC_2.2.6 __h_errno_location F
>  GLIBC_2.2.6 __hurd_fail F
> -GLIBC_2.2.6 __hurd_threadvar_stack_mask D 0x4
> -GLIBC_2.2.6 __hurd_threadvar_stack_offset D 0x4
>  GLIBC_2.2.6 __isalnum_l F
>  GLIBC_2.2.6 __isalpha_l F
>  GLIBC_2.2.6 __isascii_l F
> diff --git a/sysdeps/mach/hurd/x86/init-first.c b/sysdeps/mach/hurd/x86/init-first.c
> index 75a5c842..6ca27155 100644
> --- a/sysdeps/mach/hurd/x86/init-first.c
> +++ b/sysdeps/mach/hurd/x86/init-first.c
> @@ -34,9 +34,6 @@
>  extern void __mach_init (void);
>  extern void __init_misc (int, char **, char **);
>  
> -unsigned long int __hurd_threadvar_stack_offset;
> -unsigned long int __hurd_threadvar_stack_mask;
> -
>  extern int __libc_argc attribute_hidden;
>  extern char **__libc_argv attribute_hidden;
>  extern char **_dl_argv;
> -- 
> 2.39.2
> 

-- 
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 06/34] hurd: Swap around two function calls
  2023-03-19 15:09 ` [RFC PATCH glibc 06/34] hurd: Swap around two function calls Sergey Bugaev
@ 2023-04-02 22:54   ` Samuel Thibault
  0 siblings, 0 replies; 140+ messages in thread
From: Samuel Thibault @ 2023-04-02 22:54 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: libc-alpha, bug-hurd

Applied, thanks!

Sergey Bugaev, le dim. 19 mars 2023 18:09:49 +0300, a ecrit:
> ...to keep `sigexc' port initialization in one place, and match what the
> comments say.
> 
> No functional change.
> 
> Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
> ---
>  hurd/hurdfault.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/hurd/hurdfault.c b/hurd/hurdfault.c
> index a81e7280..4340897d 100644
> --- a/hurd/hurdfault.c
> +++ b/hurd/hurdfault.c
> @@ -174,14 +174,14 @@ _hurdsig_fault_init (void)
>    err = __mach_port_allocate (__mach_task_self (),
>  			      MACH_PORT_RIGHT_RECEIVE, &sigexc);
>    assert_perror (err);
> -  err = __mach_port_allocate (__mach_task_self (),
> -			      MACH_PORT_RIGHT_RECEIVE, &forward_sigexc);
> +  err = __mach_port_insert_right (__mach_task_self (), sigexc,
> +				  sigexc, MACH_MSG_TYPE_MAKE_SEND);
>    assert_perror (err);
>  
>    /* Allocate a port to receive the exception msgs forwarded
>       from the proc server.  */
> -  err = __mach_port_insert_right (__mach_task_self (), sigexc,
> -				  sigexc, MACH_MSG_TYPE_MAKE_SEND);
> +  err = __mach_port_allocate (__mach_task_self (),
> +			      MACH_PORT_RIGHT_RECEIVE, &forward_sigexc);
>    assert_perror (err);
>  
>    /* Set the queue limit for this port to just one.  The proc server will
> -- 
> 2.39.2
> 

-- 
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 07/34] hurd: Fix file name in #error
  2023-03-19 15:09 ` [RFC PATCH glibc 07/34] hurd: Fix file name in #error Sergey Bugaev
@ 2023-04-02 22:55   ` Samuel Thibault
  0 siblings, 0 replies; 140+ messages in thread
From: Samuel Thibault @ 2023-04-02 22:55 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: libc-alpha, bug-hurd

Applied, thanks!

Sergey Bugaev, le dim. 19 mars 2023 18:09:50 +0300, a ecrit:
> Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
> ---
>  hurd/longjmp-ts.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hurd/longjmp-ts.c b/hurd/longjmp-ts.c
> index bc4add32..0032d747 100644
> --- a/hurd/longjmp-ts.c
> +++ b/hurd/longjmp-ts.c
> @@ -27,5 +27,5 @@ _hurd_longjmp_thread_state (void *state, jmp_buf env, int val)
>    /* Set all the registers in *STATE to the values described by ENV and
>       RETVAL.  After this, setting that thread's state to STATE should be
>       just like calling `longjmp (ENV, RETVAL)'.  */
> -  #error "Need to write sysdeps/mach/hurd/MACHINE/longjmp-ctx.c"
> +  #error "Need to write sysdeps/mach/hurd/MACHINE/longjmp-ts.c"
>  }
> -- 
> 2.39.2
> 

-- 
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 08/34] hurd: Disable O_TRUNC and FS_RETRY_MAGICAL in rtld
  2023-03-19 15:09 ` [RFC PATCH glibc 08/34] hurd: Disable O_TRUNC and FS_RETRY_MAGICAL in rtld Sergey Bugaev
@ 2023-04-02 22:57   ` Samuel Thibault
  0 siblings, 0 replies; 140+ messages in thread
From: Samuel Thibault @ 2023-04-02 22:57 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: libc-alpha, bug-hurd

Applied, thanks!

Sergey Bugaev, le dim. 19 mars 2023 18:09:51 +0300, a ecrit:
> hurd/lookup-retry.c is compiled into rtld, the dynamic linker/loader. To
> avoid pulling in file_set_size, file_utimens, tty/ctty stuff, more
> string/memory code (memmove, strncpy, strcpy), and more strtoul/itoa
> code, compile out support for O_TRUNC and FS_RETRY_MAGICAL when building
> hurd/lookup-retry.c for rtld. None of that functionality is useful to
> rtld during startup anyway. Keep support for FS_RETRY_MAGICAL("/"),
> since that does not pull in much, and is required for following absolute
> symlinks.
> 
> The large number of extra code being pulled into rtld was noticed by
> reviewing librtld.map & elf/librtld.os.map in the build tree.
> 
> It is worth noting that once libc.so is loaded, the real __open, __stat,
> etc. replace the minimal versions used initially by rtld -- this is
> especially important in the Hurd port, where the minimal rtld versions
> do not use the dtable and just pass real Mach port names as fds. Thus,
> once libc.so is loaded, rtld will gain access to the full
> __hurd_file_name_lookup_retry () version, complete with FS_RETRY_MAGICAL
> support, which is important in case the program decides to
> dlopen ("/proc/self/fd/...") or some such.
> 
> Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
> ---
>  hurd/lookup-retry.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/hurd/lookup-retry.c b/hurd/lookup-retry.c
> index 8850c4fd..99c98104 100644
> --- a/hurd/lookup-retry.c
> +++ b/hurd/lookup-retry.c
> @@ -177,7 +177,7 @@ __hurd_file_name_lookup_retry (error_t (*use_init_port)
>  
>  	      /* We got a successful translation.  Now apply any open-time
>  		 action flags we were passed.  */
> -
> +#if !IS_IN (rtld)
>  	      if (!err && (flags & O_TRUNC))
>  		{
>  		  /* Asked to truncate the file.  */
> @@ -189,6 +189,7 @@ __hurd_file_name_lookup_retry (error_t (*use_init_port)
>  		      __file_utimens (*result, atime, mtime);
>  		    }
>  		}
> +#endif
>  
>  	      if (err)
>  		__mach_port_deallocate (__mach_task_self (), *result);
> @@ -214,6 +215,7 @@ __hurd_file_name_lookup_retry (error_t (*use_init_port)
>  	      file_name = &retryname[1];
>  	      break;
>  
> +#if !IS_IN (rtld)
>  	    case 'f':
>  	      if (retryname[1] == 'd' && retryname[2] == '/')
>  		{
> @@ -358,8 +360,9 @@ __hurd_file_name_lookup_retry (error_t (*use_init_port)
>  		goto bad_magic;
>  	      break;
>  
> -	    default:
>  	    bad_magic:
> +#endif /* !IS_IN (rtld) */
> +	    default:
>  	      err = EGRATUITOUS;
>  	      goto out;
>  	    }
> -- 
> 2.39.2
> 

-- 
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 09/34] hurd: Fix _hurd_setup_sighandler () signature
  2023-03-19 15:09 ` [RFC PATCH glibc 09/34] hurd: Fix _hurd_setup_sighandler () signature Sergey Bugaev
@ 2023-04-02 22:58   ` Samuel Thibault
  0 siblings, 0 replies; 140+ messages in thread
From: Samuel Thibault @ 2023-04-02 22:58 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: libc-alpha, bug-hurd

Applied, thanks!

Sergey Bugaev, le dim. 19 mars 2023 18:09:52 +0300, a ecrit:
> Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
> ---
>  hurd/trampoline.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/hurd/trampoline.c b/hurd/trampoline.c
> index a0639a20..5bd8dec9 100644
> --- a/hurd/trampoline.c
> +++ b/hurd/trampoline.c
> @@ -26,11 +26,11 @@
>     that structure.  */
>  
>  struct sigcontext *
> -_hurd_setup_sighandler (int flags,
> -			__sighandler_t handler,
> -			stack_t *sigaltstack,
> -			int signo, int sigcode,
> -			void *state)
> +_hurd_setup_sighandler (struct hurd_sigstate *ss, const struct sigaction *action,
> +                        __sighandler_t handler,
> +                        int signo, struct hurd_signal_detail *detail,
> +                        volatile int rpc_wait,
> +                        struct machine_thread_all_state *state)
>  {
>  #error "Need to write sysdeps/mach/hurd/MACHINE/trampoline.c"
>  }
> -- 
> 2.39.2
> 

-- 
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 10/34] stdio-common: Fix building when !IS_IN (libc)
  2023-03-19 15:09 ` [RFC PATCH glibc 10/34] stdio-common: Fix building when !IS_IN (libc) Sergey Bugaev
@ 2023-04-02 23:01   ` Samuel Thibault
  0 siblings, 0 replies; 140+ messages in thread
From: Samuel Thibault @ 2023-04-02 23:01 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: libc-alpha, bug-hurd

Applied, thanks!

Sergey Bugaev, le dim. 19 mars 2023 18:09:53 +0300, a ecrit:
> In this case, _itoa_word () is already defined inline in the header (see
> sysdeps/generic/_itoa.h), and the second definition causes an error.
> 
> Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
> ---
>  stdio-common/_itoa.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/stdio-common/_itoa.c b/stdio-common/_itoa.c
> index 27285193..3037b0f5 100644
> --- a/stdio-common/_itoa.c
> +++ b/stdio-common/_itoa.c
> @@ -157,6 +157,7 @@ const struct base_table_t _itoa_base_table[] attribute_hidden =
>  };
>  #endif
>  
> +#if IS_IN (libc)
>  char *
>  _itoa_word (_ITOA_WORD_TYPE value, char *buflim,
>  	    unsigned int base, int upper_case)
> @@ -185,6 +186,7 @@ _itoa_word (_ITOA_WORD_TYPE value, char *buflim,
>    return buflim;
>  }
>  #undef SPECIAL
> +#endif /* IS_IN (libc) */
>  
>  
>  #if _ITOA_NEEDED
> -- 
> 2.39.2
> 

-- 
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 11/34] mach, hurd: Drop __libc_lock_self0
  2023-03-19 15:09 ` [RFC PATCH glibc 11/34] mach, hurd: Drop __libc_lock_self0 Sergey Bugaev
@ 2023-04-02 23:02   ` Samuel Thibault
  0 siblings, 0 replies; 140+ messages in thread
From: Samuel Thibault @ 2023-04-02 23:02 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: libc-alpha, bug-hurd

Applied, thanks!

Sergey Bugaev, le dim. 19 mars 2023 18:09:54 +0300, a ecrit:
> This was used for the value of libc-lock's owner when TLS is not yet set
> up, so THREAD_SELF can not be used. Since the value need not be anything
> specific -- it just has to be non-NULL -- we can just use a plain
> constant, such as (void *) 1, for this. This avoids accessing the symbol
> through GOT, and exporting it from libc.so in the first place.
> 
> Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
> ---
>  sysdeps/mach/hurd/Versions   | 4 ++--
>  sysdeps/mach/hurd/cthreads.c | 4 ----
>  sysdeps/mach/libc-lock.h     | 3 +--
>  3 files changed, 3 insertions(+), 8 deletions(-)
> 
> diff --git a/sysdeps/mach/hurd/Versions b/sysdeps/mach/hurd/Versions
> index bf2e870a..20ac0067 100644
> --- a/sysdeps/mach/hurd/Versions
> +++ b/sysdeps/mach/hurd/Versions
> @@ -20,7 +20,7 @@ libc {
>      __open_nocancel;
>      __read_nocancel; __pread64_nocancel;
>      __write_nocancel;
> -    __libc_lock_self0; __getcwd;
> +    __getcwd;
>      __stat64;
>  
>      _dl_init_first;
> @@ -61,7 +61,7 @@ ld {
>      __open_nocancel;
>      __read_nocancel; __pread64_nocancel;
>      __write_nocancel;
> -    __libc_lock_self0; __getcwd;
> +    __getcwd;
>      __stat64; __fstat64;
>    }
>  }
> diff --git a/sysdeps/mach/hurd/cthreads.c b/sysdeps/mach/hurd/cthreads.c
> index 9f17cfe4..87b6c06b 100644
> --- a/sysdeps/mach/hurd/cthreads.c
> +++ b/sysdeps/mach/hurd/cthreads.c
> @@ -20,10 +20,6 @@
>  #include <stdlib.h>
>  #include <pthreadP.h>
>  
> -/* This serves as stub "self" pointer for libc locks when TLS is not initialized
> -   yet.  */
> -char __libc_lock_self0[0];
> -
>  /* Placeholder for key creation routine from Hurd cthreads library.  */
>  int
>  weak_function
> diff --git a/sysdeps/mach/libc-lock.h b/sysdeps/mach/libc-lock.h
> index 14248a05..c5c2553c 100644
> --- a/sysdeps/mach/libc-lock.h
> +++ b/sysdeps/mach/libc-lock.h
> @@ -34,9 +34,8 @@ typedef struct
>  
>  typedef __libc_lock_recursive_t __rtld_lock_recursive_t;
>  
> -extern char __libc_lock_self0[0];
>  #define __libc_lock_owner_self()   \
> -  (__LIBC_NO_TLS () ? (void *)&__libc_lock_self0 : THREAD_SELF)
> +  (__LIBC_NO_TLS () ? (void *) 1 : THREAD_SELF)
>  
>  #else
>  typedef struct __libc_lock_opaque__ __libc_lock_t;
> -- 
> 2.39.2
> 

-- 
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 12/34] hurd: More 64-bit integer casting fixes
  2023-03-19 15:09 ` [RFC PATCH glibc 12/34] hurd: More 64-bit integer casting fixes Sergey Bugaev
@ 2023-04-02 23:03   ` Samuel Thibault
  0 siblings, 0 replies; 140+ messages in thread
From: Samuel Thibault @ 2023-04-02 23:03 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: libc-alpha, bug-hurd

Applied, thanks!

Sergey Bugaev, le dim. 19 mars 2023 18:09:55 +0300, a ecrit:
> Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
> ---
>  sysdeps/mach/hurd/ioctl.c          | 4 ++--
>  sysdeps/mach/hurd/x86/init-first.c | 4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/sysdeps/mach/hurd/ioctl.c b/sysdeps/mach/hurd/ioctl.c
> index 0f5de5d3..ab913a59 100644
> --- a/sysdeps/mach/hurd/ioctl.c
> +++ b/sysdeps/mach/hurd/ioctl.c
> @@ -149,10 +149,10 @@ __ioctl (int fd, unsigned long int request, ...)
>  	     Rather than pointing to the value, ARG is the value itself.  */
>  #ifdef MACH_MSG_TYPE_BIT
>  	  *t++ = io2mach_type (1, _IOTS (integer_t));
> -	  *(integer_t *) t = (integer_t) arg;
> +	  *(integer_t *) t = (integer_t) (intptr_t) arg;
>  	  t = (void *) t + sizeof (integer_t);
>  #else
> -	  *(integer_t *) p = (integer_t) arg;
> +	  *(integer_t *) p = (integer_t) (intptr_t) arg;
>  	  p = (void *) p + sizeof (integer_t);
>  #endif
>  	}
> diff --git a/sysdeps/mach/hurd/x86/init-first.c b/sysdeps/mach/hurd/x86/init-first.c
> index 6ca27155..48c330ec 100644
> --- a/sysdeps/mach/hurd/x86/init-first.c
> +++ b/sysdeps/mach/hurd/x86/init-first.c
> @@ -1,4 +1,4 @@
> -/* Initialization code run first thing by the ELF startup code.  For i386/Hurd.
> +/* Initialization code run first thing by the ELF startup code.  For x86/Hurd.
>     Copyright (C) 1995-2023 Free Software Foundation, Inc.
>     This file is part of the GNU C Library.
>  
> @@ -92,7 +92,7 @@ posixland_init (int argc, char **argv, char **envp)
>  static void
>  init (void **data)
>  {
> -  int argc = (int) *data;
> +  int argc = (int) (uintptr_t) *data;
>    char **argv = (void *) (data + 1);
>    char **envp = &argv[argc + 1];
>    struct hurd_startup_data *d;
> -- 
> 2.39.2
> 

-- 
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 13/34] x86-64: Disable prefer_map_32bit_exec tunable on non-Linux
  2023-03-19 15:09 ` [RFC PATCH glibc 13/34] x86-64: Disable prefer_map_32bit_exec tunable on non-Linux Sergey Bugaev
@ 2023-04-02 23:09   ` Samuel Thibault
  2023-04-03 10:10     ` Sergey Bugaev
  0 siblings, 1 reply; 140+ messages in thread
From: Samuel Thibault @ 2023-04-02 23:09 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: libc-alpha, bug-hurd

Hello,

Sergey Bugaev, le dim. 19 mars 2023 18:09:56 +0300, a ecrit:
> While we could/should implement MAP_32BIT for the Hurd port by setting
> all the high bits of mask in a vm_map () call, neither MAP_32BIT nor
> glibc.cpu.prefer_map_32bit_exec exist on the Hurd as of now. Compile
> this code out to fix build failures.

Rather use defined(MAP_32BIT)? That way it will nicely work for BSD
ports as well, and when hurd eventually supports MAP_32BIT.

> Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
> ---
>  sysdeps/x86/cpu-features.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/sysdeps/x86/cpu-features.c b/sysdeps/x86/cpu-features.c
> index 822688e2..78631d7a 100644
> --- a/sysdeps/x86/cpu-features.c
> +++ b/sysdeps/x86/cpu-features.c
> @@ -27,7 +27,7 @@
>  extern void TUNABLE_CALLBACK (set_hwcaps) (tunable_val_t *)
>    attribute_hidden;
>  
> -# ifdef __LP64__
> +# if defined (__LP64__) && defined (__linux__)
>  static void
>  TUNABLE_CALLBACK (set_prefer_map_32bit_exec) (tunable_val_t *valp)
>  {
> @@ -715,7 +715,7 @@ no_cpuid:
>  #if HAVE_TUNABLES
>    TUNABLE_GET (hwcaps, tunable_val_t *, TUNABLE_CALLBACK (set_hwcaps));
>  
> -# ifdef __LP64__
> +# if defined (__LP64__) && defined (__linux__)
>    TUNABLE_GET (prefer_map_32bit_exec, tunable_val_t *,
>  	       TUNABLE_CALLBACK (set_prefer_map_32bit_exec));
>  # endif
> -- 
> 2.39.2
> 

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 14/34] hurd: Move rtld-strncpy-c.c out of mach/hurd/
  2023-03-19 15:09 ` [RFC PATCH glibc 14/34] hurd: Move rtld-strncpy-c.c out of mach/hurd/ Sergey Bugaev
@ 2023-04-02 23:10   ` Samuel Thibault
  0 siblings, 0 replies; 140+ messages in thread
From: Samuel Thibault @ 2023-04-02 23:10 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: libc-alpha, bug-hurd

Applied, thanks!

Sergey Bugaev, le dim. 19 mars 2023 18:09:57 +0300, a ecrit:
> There's nothing Mach- or Hurd-specific about it; any port that ends
> up with rtld pulling in strncpy will need this.
> 
> Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
> ---
>  sysdeps/{mach/hurd => }/i386/i686/multiarch/rtld-strncpy-c.c | 0
>  1 file changed, 0 insertions(+), 0 deletions(-)
>  rename sysdeps/{mach/hurd => }/i386/i686/multiarch/rtld-strncpy-c.c (100%)
> 
> diff --git a/sysdeps/mach/hurd/i386/i686/multiarch/rtld-strncpy-c.c b/sysdeps/i386/i686/multiarch/rtld-strncpy-c.c
> similarity index 100%
> rename from sysdeps/mach/hurd/i386/i686/multiarch/rtld-strncpy-c.c
> rename to sysdeps/i386/i686/multiarch/rtld-strncpy-c.c
> -- 
> 2.39.2
> 

-- 
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 15/34] hurd: Use uintptr_t for register values in trampoline.c
  2023-03-19 15:09 ` [RFC PATCH glibc 15/34] hurd: Use uintptr_t for register values in trampoline.c Sergey Bugaev
@ 2023-04-02 23:13   ` Samuel Thibault
  0 siblings, 0 replies; 140+ messages in thread
From: Samuel Thibault @ 2023-04-02 23:13 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: libc-alpha, bug-hurd

Applied, thanks!

Sergey Bugaev, le dim. 19 mars 2023 18:09:58 +0300, a ecrit:
> This is more correct, if only because these fields are defined as having
> the type unsigned int in the Mach headers, so casting them to a signed
> int and then back is suboptimal.
> 
> Also, remove an extra reassignment of uesp -- this is another remnant of
> the ecx kludge.
> 
> Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
> ---
>  sysdeps/mach/hurd/i386/trampoline.c | 13 ++++++-------
>  1 file changed, 6 insertions(+), 7 deletions(-)
> 
> diff --git a/sysdeps/mach/hurd/i386/trampoline.c b/sysdeps/mach/hurd/i386/trampoline.c
> index 8f481e79..ab67fb9c 100644
> --- a/sysdeps/mach/hurd/i386/trampoline.c
> +++ b/sysdeps/mach/hurd/i386/trampoline.c
> @@ -270,24 +270,23 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, const struct sigaction *action
>  
>        _hurdsig_end_catch_fault ();
>  
> -      state->basic.eip = (int) rpc_wait_trampoline;
> +      state->basic.eip = (uintptr_t) rpc_wait_trampoline;
>        /* The reply-receiving trampoline code runs initially on the original
>  	 user stack.  We pass it the signal stack pointer in %ebx.  */
> -      state->basic.uesp = state->basic.esp; /* Restore mach_msg syscall SP.  */
> -      state->basic.ebx = (int) sigsp;
> +      state->basic.ebx = (uintptr_t) sigsp;
>        /* After doing the message receive, the trampoline code will need to
>  	 update the %eax value to be restored by sigreturn.  To simplify
>  	 the assembly code, we pass the address of its slot in SCP to the
>  	 trampoline code in %ecx.  */
> -      state->basic.ecx = (int) &scp->sc_eax;
> +      state->basic.ecx = (uintptr_t) &scp->sc_eax;
>      }
>    else
>      {
> -      state->basic.eip = (int) trampoline;
> -      state->basic.uesp = (int) sigsp;
> +      state->basic.eip = (uintptr_t) trampoline;
> +      state->basic.uesp = (uintptr_t) sigsp;
>      }
>    /* We pass the handler function to the trampoline code in %edx.  */
> -  state->basic.edx = (int) handler;
> +  state->basic.edx = (uintptr_t) handler;
>  
>    /* The x86 ABI says the DF bit is clear on entry to any function.  */
>    state->basic.efl &= ~EFL_DF;
> -- 
> 2.39.2
> 

-- 
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 19/34] hurd: Move a couple of singal-related files to x86
  2023-03-19 15:10 ` [RFC PATCH glibc 19/34] hurd: Move a couple of singal-related files to x86 Sergey Bugaev
@ 2023-04-02 23:15   ` Samuel Thibault
  0 siblings, 0 replies; 140+ messages in thread
From: Samuel Thibault @ 2023-04-02 23:15 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: libc-alpha, bug-hurd

Applied, thanks!

Sergey Bugaev, le dim. 19 mars 2023 18:10:02 +0300, a ecrit:
> These do not need any changes to be used on x86_64.
> 
> Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
> ---
>  sysdeps/mach/hurd/{i386 => x86}/exc2signal.c       | 0
>  sysdeps/mach/hurd/{i386 => x86}/signal-defines.sym | 0
>  2 files changed, 0 insertions(+), 0 deletions(-)
>  rename sysdeps/mach/hurd/{i386 => x86}/exc2signal.c (100%)
>  rename sysdeps/mach/hurd/{i386 => x86}/signal-defines.sym (100%)
> 
> diff --git a/sysdeps/mach/hurd/i386/exc2signal.c b/sysdeps/mach/hurd/x86/exc2signal.c
> similarity index 100%
> rename from sysdeps/mach/hurd/i386/exc2signal.c
> rename to sysdeps/mach/hurd/x86/exc2signal.c
> diff --git a/sysdeps/mach/hurd/i386/signal-defines.sym b/sysdeps/mach/hurd/x86/signal-defines.sym
> similarity index 100%
> rename from sysdeps/mach/hurd/i386/signal-defines.sym
> rename to sysdeps/mach/hurd/x86/signal-defines.sym
> -- 
> 2.39.2
> 

-- 
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 20/34] htl: Add tcb-offsets.sym for x86_64
  2023-03-19 15:10 ` [RFC PATCH glibc 20/34] htl: Add tcb-offsets.sym for x86_64 Sergey Bugaev
@ 2023-04-02 23:16   ` Samuel Thibault
  0 siblings, 0 replies; 140+ messages in thread
From: Samuel Thibault @ 2023-04-02 23:16 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: libc-alpha, bug-hurd

Applied, thanks!

Sergey Bugaev, le dim. 19 mars 2023 18:10:03 +0300, a ecrit:
> The source code is the same as sysdeps/i386/htl/tcb-offsets.sym, but of
> course the produced tcb-offsets.h will be different.
> 
> Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
> ---
>  sysdeps/x86_64/htl/Makefile        | 20 ++++++++++++++++++++
>  sysdeps/x86_64/htl/tcb-offsets.sym |  8 ++++++++
>  2 files changed, 28 insertions(+)
>  create mode 100644 sysdeps/x86_64/htl/Makefile
>  create mode 100644 sysdeps/x86_64/htl/tcb-offsets.sym
> 
> diff --git a/sysdeps/x86_64/htl/Makefile b/sysdeps/x86_64/htl/Makefile
> new file mode 100644
> index 00000000..1ced1d12
> --- /dev/null
> +++ b/sysdeps/x86_64/htl/Makefile
> @@ -0,0 +1,20 @@
> +# Copyright (C) 2020-2023 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
> +# <https://www.gnu.org/licenses/>.
> +
> +ifeq ($(subdir),csu)
> +gen-as-const-headers += tcb-offsets.sym
> +endif
> diff --git a/sysdeps/x86_64/htl/tcb-offsets.sym b/sysdeps/x86_64/htl/tcb-offsets.sym
> new file mode 100644
> index 00000000..7b7c7193
> --- /dev/null
> +++ b/sysdeps/x86_64/htl/tcb-offsets.sym
> @@ -0,0 +1,8 @@
> +#include <sysdep.h>
> +#include <tls.h>
> +#include <kernel-features.h>
> +
> +MULTIPLE_THREADS_OFFSET offsetof (tcbhead_t, multiple_threads)
> +SYSINFO_OFFSET          offsetof (tcbhead_t, sysinfo)
> +POINTER_GUARD           offsetof (tcbhead_t, pointer_guard)
> +SIGSTATE_OFFSET         offsetof (tcbhead_t, _hurd_sigstate)
> -- 
> 2.39.2
> 

-- 
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 21/34] x86_64: Add rtld-stpncpy & rtld-strncpy
  2023-03-19 15:10 ` [RFC PATCH glibc 21/34] x86_64: Add rtld-stpncpy & rtld-strncpy Sergey Bugaev
@ 2023-04-02 23:18   ` Samuel Thibault
  0 siblings, 0 replies; 140+ messages in thread
From: Samuel Thibault @ 2023-04-02 23:18 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: libc-alpha, bug-hurd

Applied, thanks!

Sergey Bugaev, le dim. 19 mars 2023 18:10:04 +0300, a ecrit:
> Just like the other existing rtld-str* files, this provides rtld with
> usable versions of stpncpy and strncpy.
> 
> Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
> ---
>  sysdeps/x86_64/multiarch/rtld-stpncpy.S | 18 ++++++++++++++++++
>  sysdeps/x86_64/multiarch/rtld-strncpy.S | 18 ++++++++++++++++++
>  2 files changed, 36 insertions(+)
>  create mode 100644 sysdeps/x86_64/multiarch/rtld-stpncpy.S
>  create mode 100644 sysdeps/x86_64/multiarch/rtld-strncpy.S
> 
> diff --git a/sysdeps/x86_64/multiarch/rtld-stpncpy.S b/sysdeps/x86_64/multiarch/rtld-stpncpy.S
> new file mode 100644
> index 00000000..1c6780a1
> --- /dev/null
> +++ b/sysdeps/x86_64/multiarch/rtld-stpncpy.S
> @@ -0,0 +1,18 @@
> +/* Copyright (C) 2022-2023 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
> +   <https://www.gnu.org/licenses/>.  */
> +
> +#include "../stpncpy.S"
> diff --git a/sysdeps/x86_64/multiarch/rtld-strncpy.S b/sysdeps/x86_64/multiarch/rtld-strncpy.S
> new file mode 100644
> index 00000000..500a1002
> --- /dev/null
> +++ b/sysdeps/x86_64/multiarch/rtld-strncpy.S
> @@ -0,0 +1,18 @@
> +/* Copyright (C) 2022-2023 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
> +   <https://www.gnu.org/licenses/>.  */
> +
> +#include "../strncpy.S"
> -- 
> 2.39.2
> 

-- 
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 22/34] htl: Implement thread_set_pcsptp for x86_64
  2023-03-19 15:10 ` [RFC PATCH glibc 22/34] htl: Implement thread_set_pcsptp for x86_64 Sergey Bugaev
@ 2023-04-02 23:19   ` Samuel Thibault
  0 siblings, 0 replies; 140+ messages in thread
From: Samuel Thibault @ 2023-04-02 23:19 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: libc-alpha, bug-hurd

Applied, thanks!

Sergey Bugaev, le dim. 19 mars 2023 18:10:05 +0300, a ecrit:
> Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
> ---
>  sysdeps/mach/hurd/x86_64/htl/pt-machdep.c | 73 +++++++++++++++++++++++
>  1 file changed, 73 insertions(+)
>  create mode 100644 sysdeps/mach/hurd/x86_64/htl/pt-machdep.c
> 
> diff --git a/sysdeps/mach/hurd/x86_64/htl/pt-machdep.c b/sysdeps/mach/hurd/x86_64/htl/pt-machdep.c
> new file mode 100644
> index 00000000..69094d3b
> --- /dev/null
> +++ b/sysdeps/mach/hurd/x86_64/htl/pt-machdep.c
> @@ -0,0 +1,73 @@
> +/* Machine dependent pthreads code.  Hurd/x86_64 version.
> +   Copyright (C) 2000-2023 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
> +   <https://www.gnu.org/licenses/>.  */
> +
> +#include <errno.h>
> +#include <assert.h>
> +
> +#include <mach.h>
> +#include <mach/machine/thread_status.h>
> +#include <mach/machine/mach_i386.h>
> +#include <mach/mig_errors.h>
> +#include <mach/thread_status.h>
> +
> +int
> +__thread_set_pcsptp (thread_t thread,
> +                     int set_ip, void *ip,
> +                     int set_sp, void *sp,
> +                     int set_tp, void *tp)
> +{
> +  error_t err;
> +  struct i386_thread_state state;
> +  struct i386_fsgs_base_state fsgs_state;
> +  mach_msg_type_number_t state_count;
> +
> +  state_count = i386_THREAD_STATE_COUNT;
> +
> +  err = __thread_get_state (thread, i386_REGS_SEGS_STATE,
> +                            (thread_state_t) &state, &state_count);
> +  if (err)
> +    return err;
> +  assert (state_count == i386_THREAD_STATE_COUNT);
> +
> +  if (set_sp)
> +    state.ursp = (uintptr_t) sp;
> +  if (set_ip)
> +    state.rip = (uintptr_t) ip;
> +
> +  err = __thread_set_state (thread, i386_REGS_SEGS_STATE,
> +                            (thread_state_t) &state, i386_THREAD_STATE_COUNT);
> +  if (err)
> +    return err;
> +
> +  if (set_tp)
> +    {
> +      state_count = i386_FSGS_BASE_STATE_COUNT;
> +      err = __thread_get_state (thread, i386_FSGS_BASE_STATE,
> +                                (thread_state_t) &fsgs_state, &state_count);
> +      if (err)
> +        return err;
> +      assert (state_count == i386_FSGS_BASE_STATE_COUNT);
> +      fsgs_state.fs_base = (uintptr_t) tp;
> +      err = __thread_set_state (thread, i386_FSGS_BASE_STATE,
> +                                (thread_state_t) &fsgs_state, state_count);
> +      if (err)
> +        return err;
> +    }
> +
> +  return 0;
> +}
> -- 
> 2.39.2
> 

-- 
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 23/34] elf: Stop including tls.h in ldsodefs.h
  2023-03-19 15:10 ` [RFC PATCH glibc 23/34] elf: Stop including tls.h in ldsodefs.h Sergey Bugaev
@ 2023-04-02 23:20   ` Samuel Thibault
  2023-04-03  9:26     ` Sergey Bugaev
  2023-04-10 21:26   ` Samuel Thibault
  1 sibling, 1 reply; 140+ messages in thread
From: Samuel Thibault @ 2023-04-02 23:20 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: libc-alpha, bug-hurd

Sergey Bugaev, le dim. 19 mars 2023 18:10:06 +0300, a ecrit:
> Nothing in there needs tls.h

Ok but includers might be erroneously relying on it. Did you try to
build various configurations, to make sure that this isn't breaking any?

> 
> Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
> ---
>  sysdeps/generic/ldsodefs.h | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h
> index c99dad77..5f21bc63 100644
> --- a/sysdeps/generic/ldsodefs.h
> +++ b/sysdeps/generic/ldsodefs.h
> @@ -38,7 +38,6 @@
>  #include <dl-fixup-attribute.h>
>  #include <libc-lock.h>
>  #include <hp-timing.h>
> -#include <tls.h>
>  #include <list_t.h>
>  
>  __BEGIN_DECLS
> -- 
> 2.39.2
> 

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 28/34] hurd: Implement _hurd_longjmp_thread_state for x86_64
  2023-03-19 15:10 ` [RFC PATCH glibc 28/34] hurd: Implement _hurd_longjmp_thread_state for x86_64 Sergey Bugaev
@ 2023-04-02 23:23   ` Samuel Thibault
  0 siblings, 0 replies; 140+ messages in thread
From: Samuel Thibault @ 2023-04-02 23:23 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: libc-alpha, bug-hurd

Applied, thanks!

Sergey Bugaev, le dim. 19 mars 2023 18:10:11 +0300, a ecrit:
> Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
> ---
>  sysdeps/mach/hurd/x86_64/longjmp-ts.c | 41 +++++++++++++++++++++++++++
>  1 file changed, 41 insertions(+)
>  create mode 100644 sysdeps/mach/hurd/x86_64/longjmp-ts.c
> 
> diff --git a/sysdeps/mach/hurd/x86_64/longjmp-ts.c b/sysdeps/mach/hurd/x86_64/longjmp-ts.c
> new file mode 100644
> index 00000000..2c57d26a
> --- /dev/null
> +++ b/sysdeps/mach/hurd/x86_64/longjmp-ts.c
> @@ -0,0 +1,41 @@
> +/* Perform a `longjmp' on a Mach thread_state.  x86_64 version.
> +   Copyright (C) 1991-2023 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
> +   <https://www.gnu.org/licenses/>.  */
> +
> +#include <hurd/signal.h>
> +#include <setjmp.h>
> +#include <jmpbuf-offsets.h>
> +#include <mach/thread_status.h>
> +
> +
> +/* Set up STATE to do the equivalent of `longjmp (ENV, VAL);'.  */
> +
> +void
> +_hurd_longjmp_thread_state (void *state, jmp_buf env, int val)
> +{
> +  struct i386_thread_state *ts = state;
> +
> +  ts->rbx = env[0].__jmpbuf[JB_RBX];
> +  ts->rbp = env[0].__jmpbuf[JB_RBP];
> +  ts->r12 = env[0].__jmpbuf[JB_R12];
> +  ts->r13 = env[0].__jmpbuf[JB_R13];
> +  ts->r14 = env[0].__jmpbuf[JB_R14];
> +  ts->r15 = env[0].__jmpbuf[JB_R15];
> +  ts->ursp = env[0].__jmpbuf[JB_RSP];
> +  ts->rip = env[0].__jmpbuf[JB_PC];
> +  ts->rax = val ?: 1;
> +}
> -- 
> 2.39.2
> 

-- 
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 29/34] hurd: Add vm_param.h for x86_64
  2023-03-19 15:10 ` [RFC PATCH glibc 29/34] hurd: Add vm_param.h " Sergey Bugaev
@ 2023-04-02 23:24   ` Samuel Thibault
  0 siblings, 0 replies; 140+ messages in thread
From: Samuel Thibault @ 2023-04-02 23:24 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: libc-alpha, bug-hurd

Applied, thanks!

Sergey Bugaev, le dim. 19 mars 2023 18:10:12 +0300, a ecrit:
> Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
> ---
>  sysdeps/mach/hurd/x86_64/vm_param.h | 24 ++++++++++++++++++++++++
>  1 file changed, 24 insertions(+)
>  create mode 100644 sysdeps/mach/hurd/x86_64/vm_param.h
> 
> diff --git a/sysdeps/mach/hurd/x86_64/vm_param.h b/sysdeps/mach/hurd/x86_64/vm_param.h
> new file mode 100644
> index 00000000..f269afb3
> --- /dev/null
> +++ b/sysdeps/mach/hurd/x86_64/vm_param.h
> @@ -0,0 +1,24 @@
> +/* Copyright (C) 2020-2023 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
> +   <https://www.gnu.org/licenses/>.  */
> +
> +#ifndef _X86_86_VM_PARAM_H
> +#define _X86_64_VM_PARAM_H
> +
> +/* Arbitrary start of the brk. This is after usual binary and library mappings.  */
> +#define BRK_START	0x200000000000
> +
> +#endif /* x86_64/vm_param.h */
> -- 
> 2.39.2
> 

-- 
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 31/34] hurd: Microoptimize _hurd_self_sigstate ()
  2023-03-19 15:10 ` [RFC PATCH glibc 31/34] hurd: Microoptimize _hurd_self_sigstate () Sergey Bugaev
@ 2023-04-02 23:26   ` Samuel Thibault
  0 siblings, 0 replies; 140+ messages in thread
From: Samuel Thibault @ 2023-04-02 23:26 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: libc-alpha, bug-hurd

Applied, thanks!

Sergey Bugaev, le dim. 19 mars 2023 18:10:14 +0300, a ecrit:
> When THREAD_GETMEM is defined with inline assembly, the compiler may not
> optimize away the two reads of _hurd_sigstate. Help it out a little bit
> by only reading it once. This also makes for a slightly cleaner code.
> 
> Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
> ---
>  hurd/hurd/signal.h | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/hurd/hurd/signal.h b/hurd/hurd/signal.h
> index c33f974b..662e955e 100644
> --- a/hurd/hurd/signal.h
> +++ b/hurd/hurd/signal.h
> @@ -166,13 +166,15 @@ extern void _hurd_sigstate_delete (thread_t thread);
>  _HURD_SIGNAL_H_EXTERN_INLINE struct hurd_sigstate *
>  _hurd_self_sigstate (void)
>  {
> -  if (THREAD_GETMEM (THREAD_SELF, _hurd_sigstate) == NULL)
> +  struct hurd_sigstate *ss = THREAD_GETMEM (THREAD_SELF, _hurd_sigstate);
> +  if (__glibc_unlikely (ss == NULL))
>      {
>        thread_t self = __mach_thread_self ();
> -      THREAD_SETMEM (THREAD_SELF, _hurd_sigstate, _hurd_thread_sigstate (self));
> +      ss = _hurd_thread_sigstate (self);
> +      THREAD_SETMEM (THREAD_SELF, _hurd_sigstate, ss);
>        __mach_port_deallocate (__mach_task_self (), self);
>      }
> -  return THREAD_GETMEM (THREAD_SELF, _hurd_sigstate);
> +  return ss;
>  }
>  # endif
>  #endif
> -- 
> 2.39.2
> 

-- 
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH 00/34] The rest of the x86_64-gnu port
  2023-03-19 15:09 [RFC PATCH 00/34] The rest of the x86_64-gnu port Sergey Bugaev
                   ` (34 preceding siblings ...)
  2023-03-19 16:44 ` [RFC PATCH 00/34] The rest of the x86_64-gnu port Luca
@ 2023-04-02 23:30 ` Samuel Thibault
  2023-04-10 19:20 ` Samuel Thibault
  36 siblings, 0 replies; 140+ messages in thread
From: Samuel Thibault @ 2023-04-02 23:30 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: libc-alpha, bug-hurd, Luca

Hello,

Thanks for this series!

I have pushed a first batch of commits, will review the rest later.

Samuel

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 23/34] elf: Stop including tls.h in ldsodefs.h
  2023-04-02 23:20   ` Samuel Thibault
@ 2023-04-03  9:26     ` Sergey Bugaev
  0 siblings, 0 replies; 140+ messages in thread
From: Sergey Bugaev @ 2023-04-03  9:26 UTC (permalink / raw)
  To: Samuel Thibault; +Cc: libc-alpha, bug-hurd

On Mon, Apr 3, 2023 at 2:20 AM Samuel Thibault <samuel.thibault@gnu.org> wrote:
> Sergey Bugaev, le dim. 19 mars 2023 18:10:06 +0300, a ecrit:
> > Nothing in there needs tls.h
>
> Ok but includers might be erroneously relying on it. Did you try to
> build various configurations, to make sure that this isn't breaking any?

There (unfortunately) still are multiple other ways that <ldsodefs.h>
ends up including <tls.h> (in particular through <link.h>), so this
change should not immediately break anything. See the cover letter for
some more details about this.

That being said, it sounds like glibc would benefit from a run of
https://include-what-you-use.org/ over the code base. This would both
trim the extraneous includes (such as this #include <tls.h>) and add
the ones that are required, but (as you're saying, erroneously) not
explicitly mentioned.

Sergey

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH gnumach 03/34] Make exception subcode a long
  2023-04-02 22:45   ` Samuel Thibault
@ 2023-04-03  9:32     ` Sergey Bugaev
  2023-04-06  2:11       ` Flávio Cruz
  0 siblings, 1 reply; 140+ messages in thread
From: Sergey Bugaev @ 2023-04-03  9:32 UTC (permalink / raw)
  To: Samuel Thibault; +Cc: libc-alpha, bug-hurd, Luca

On Mon, Apr 3, 2023 at 1:45 AM Samuel Thibault <samuel.thibault@gnu.org> wrote:
> Sergey Bugaev, le dim. 19 mars 2023 18:09:46 +0300, a ecrit:
> > On EXC_BAD_ACCESS, exception subcode is used to pass the faulting memory
> > address, so it needs to be (at least) pointer-sized. Thus, make it into
> > a long.
> >
> > This requires matching changes in glibc and the Hurd.
>
> But the change doesn't affect 32bit glibc and hurd since
> rpc_long_integer_t is really like integer_t there, right?

It's supposed to be ABI-compatible on 32-bit, since all these types
are 32-bit integers there, yes. (But maybe I messed up, do check!)

But it may break source-level compatibility (if you only apply the
Mach change but not glibc, or vice versa); as in maybe GCC will
complain about int vs long in function prototype vs definition. I
haven't actually checked, since I have both changes applied locally.

Sergey

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH gnumach 02/34] Remove bootstrap.defs
  2023-04-02 22:43   ` Samuel Thibault
@ 2023-04-03  9:39     ` Sergey Bugaev
  0 siblings, 0 replies; 140+ messages in thread
From: Sergey Bugaev @ 2023-04-03  9:39 UTC (permalink / raw)
  To: Samuel Thibault; +Cc: bug-hurd, libc-alpha

On Mon, Apr 3, 2023 at 1:43 AM Samuel Thibault <samuel.thibault@gnu.org> wrote:
> I guess the do_bootstrap_privileged_ports function can be dropped from
> the hurd repo?

I think so, yes, along with the #include "bootstrap_S.h". boot.c never
calls the bootstrap_server_routine, so it's all unused anyway.

Sergey

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 13/34] x86-64: Disable prefer_map_32bit_exec tunable on non-Linux
  2023-04-02 23:09   ` Samuel Thibault
@ 2023-04-03 10:10     ` Sergey Bugaev
  2023-04-03 19:02       ` H.J. Lu
  0 siblings, 1 reply; 140+ messages in thread
From: Sergey Bugaev @ 2023-04-03 10:10 UTC (permalink / raw)
  To: Samuel Thibault; +Cc: libc-alpha, bug-hurd, H.J. Lu

On Mon, Apr 3, 2023 at 2:09 AM Samuel Thibault <samuel.thibault@gnu.org> wrote:
> Sergey Bugaev, le dim. 19 mars 2023 18:09:56 +0300, a ecrit:
> > While we could/should implement MAP_32BIT for the Hurd port by setting
> > all the high bits of mask in a vm_map () call, neither MAP_32BIT nor
> > glibc.cpu.prefer_map_32bit_exec exist on the Hurd as of now. Compile
> > this code out to fix build failures.
>
> Rather use defined(MAP_32BIT)? That way it will nicely work for BSD
> ports as well, and when hurd eventually supports MAP_32BIT.

Not really. What breaks compilation here is not missing MAP_32BIT, but
rather the undefined set_prefer_map_32bit_exec tunable. It is defined
declaratively in sysdeps/unix/sysv/linux/x86_64/64/dl-tunables.list
(see commit 317f1c0a8a71a862b1e600ff5386b08e02cf4b95); so as-is, it
really is x86_64 Linux specific.

Is there some way to check if a specific tunable is defined, like #if
HAVE_TUNABLE (prefer_map_32bit_exec)? AFAICS the generated
dl-tunable-list.h defines the C enum members, but not any checkable
preprocessor macros.

Alternatively: maybe this part of cpu-features.c should be moved into
sysdeps/unix/sysv/linux/x86_64/64/cpu-features.c and #include_next the
common cpu-features.c?

Sergey

^ permalink raw reply	[flat|nested] 140+ messages in thread

* [PATCH v2] hurd: Implement sigreturn for x86_64
  2023-03-19 15:10 ` [RFC PATCH glibc 32/34] hurd: Implement sigreturn for x86_64 Sergey Bugaev
@ 2023-04-03 11:47   ` Sergey Bugaev
  0 siblings, 0 replies; 140+ messages in thread
From: Sergey Bugaev @ 2023-04-03 11:47 UTC (permalink / raw)
  To: bug-hurd, libc-alpha; +Cc: Samuel Thibault, Sergey Bugaev

Here's a better version that does not do the stupid __builtin_frame_address
thing (instead, we call the function for real, and pass usp as an arg), and
should actually ensure the 16-byte alignment.

-- >8 --

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
---
 sysdeps/mach/hurd/x86_64/sigreturn.c | 151 +++++++++++++++++++++++++++
 1 file changed, 151 insertions(+)
 create mode 100644 sysdeps/mach/hurd/x86_64/sigreturn.c

diff --git a/sysdeps/mach/hurd/x86_64/sigreturn.c b/sysdeps/mach/hurd/x86_64/sigreturn.c
new file mode 100644
index 00000000..429cee30
--- /dev/null
+++ b/sysdeps/mach/hurd/x86_64/sigreturn.c
@@ -0,0 +1,151 @@
+/* Copyright (C) 1991-2023 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
+   <https://www.gnu.org/licenses/>.  */
+
+#include <hurd.h>
+#include <hurd/signal.h>
+#include <hurd/msg.h>
+#include <stdlib.h>
+
+/* This is run on the thread stack after restoring it, to be able to
+   unlock SS off sigstack.  */
+void
+__sigreturn2 (struct hurd_sigstate *ss, uintptr_t *usp)
+{
+  _hurd_sigstate_unlock (ss);
+
+  asm volatile (
+                /* Point the stack to the register dump.  */
+                "movq %0, %%rsp\n"
+                /* Pop off the registers.  */
+                "popq %%r8\n"
+                "popq %%r9\n"
+                "popq %%r10\n"
+                "popq %%r11\n"
+                "popq %%r12\n"
+                "popq %%r13\n"
+                "popq %%r14\n"
+                "popq %%r15\n"
+                "popq %%rdi\n"
+                "popq %%rsi\n"
+                "popq %%rbp\n"
+                "popq %%rbx\n"
+                "popq %%rdx\n"
+                "popq %%rcx\n"
+                "popq %%rax\n"
+                "popfq\n"
+                /* Restore %rip and %rsp with a single instruction.  */
+                "retq $128" :
+                : "rm" (usp));
+  __builtin_unreachable ();
+}
+
+int
+__sigreturn (struct sigcontext *scp)
+{
+  struct hurd_sigstate *ss;
+  struct hurd_userlink *link = (void *) &scp[1];
+  mach_port_t reply_port;
+
+  if (scp == NULL || (scp->sc_mask & _SIG_CANT_MASK))
+    {
+      errno = EINVAL;
+      return -1;
+    }
+
+  ss = _hurd_self_sigstate ();
+  _hurd_sigstate_lock (ss);
+
+  /* Remove the link on the `active resources' chain added by
+     _hurd_setup_sighandler.  Its purpose was to make sure
+     that we got called; now we have, it is done.  */
+  _hurd_userlink_unlink (link);
+
+  /* Restore the set of blocked signals, and the intr_port slot.  */
+  ss->blocked = scp->sc_mask;
+  ss->intr_port = scp->sc_intr_port;
+
+  /* Check for pending signals that were blocked by the old set.  */
+  if (_hurd_sigstate_pending (ss) & ~ss->blocked)
+    {
+      /* There are pending signals that just became unblocked.  Wake up the
+	 signal thread to deliver them.  But first, squirrel away SCP where
+	 the signal thread will notice it if it runs another handler, and
+	 arrange to have us called over again in the new reality.  */
+      ss->context = scp;
+      _hurd_sigstate_unlock (ss);
+      __msg_sig_post (_hurd_msgport, 0, 0, __mach_task_self ());
+      /* If a pending signal was handled, sig_post never returned.
+	 If it did return, the pending signal didn't run a handler;
+	 proceed as usual.  */
+      _hurd_sigstate_lock (ss);
+      ss->context = NULL;
+    }
+
+  if (scp->sc_onstack)
+    ss->sigaltstack.ss_flags &= ~SS_ONSTACK;
+
+  /* Destroy the MiG reply port used by the signal handler, and restore the
+     reply port in use by the thread when interrupted.  */
+  reply_port = THREAD_GETMEM (THREAD_SELF, reply_port);
+  THREAD_SETMEM (THREAD_SELF, reply_port, scp->sc_reply_port);
+  __mach_port_mod_refs (__mach_task_self (), reply_port,
+                        MACH_PORT_RIGHT_RECEIVE, -1);
+
+  if (scp->sc_fpused)
+    /* Restore the FPU state.  Mach conveniently stores the state
+       in the format the i387 `frstor' instruction uses to restore it.  */
+    asm volatile ("frstor %0" : : "m" (scp->sc_fpsave));
+
+  {
+    /* There are convenient instructions to pop state off the stack, so we
+       copy the registers onto the user's stack, switch there, pop and
+       return.  */
+
+    uintptr_t *usp = (uintptr_t *) scp->sc_ursp - 128;
+
+    *--usp = scp->sc_rip;
+    *--usp = scp->sc_rfl;
+    *--usp = scp->sc_rax;
+    *--usp = scp->sc_rcx;
+    *--usp = scp->sc_rdx;
+    *--usp = scp->sc_rbx;
+    *--usp = scp->sc_rbp;
+    *--usp = scp->sc_rsi;
+    *--usp = scp->sc_rdi;
+    *--usp = scp->sc_r15;
+    *--usp = scp->sc_r14;
+    *--usp = scp->sc_r13;
+    *--usp = scp->sc_r12;
+    *--usp = scp->sc_r11;
+    *--usp = scp->sc_r10;
+    *--usp = scp->sc_r9;
+    *--usp = scp->sc_r8;
+
+    /* Switch to the user's stack that we have just prepared, and call
+       __sigreturn2.  Clobber "memory" to make sure GCC flushes the stack
+       setup to actual memory.  We align the stack as per the ABI, but pass
+       the original usp to __sigreturn2 as an argument.  */
+    asm volatile ("movq %1, %%rsp\n"
+                  "andq $-16, %%rsp\n"
+                  "call __sigreturn2" :
+                  : "D" (ss), "S" (usp)
+                  : "memory");
+    __builtin_unreachable ();
+  }
+}
+
+weak_alias (__sigreturn, sigreturn)
-- 
2.39.2


^ permalink raw reply	[flat|nested] 140+ messages in thread

* [PATCH v2 18.0/34] Alignment-respecting x86_64 trampoline.c
  2023-03-19 15:10 ` [RFC PATCH glibc 18/34] hurd: Port trampoline.c to x86_64 Sergey Bugaev
@ 2023-04-03 11:56   ` Sergey Bugaev
  2023-04-03 11:56     ` [PATCH v2 18.1/34] hurd: Do not declare local variables volatile Sergey Bugaev
  2023-04-03 11:56     ` [PATCH v2 18.2/34] hurd: Port trampoline.c to x86_64 Sergey Bugaev
  0 siblings, 2 replies; 140+ messages in thread
From: Sergey Bugaev @ 2023-04-03 11:56 UTC (permalink / raw)
  To: bug-hurd, libc-alpha; +Cc: Samuel Thibault, Sergey Bugaev

And here's another attempt at trampoline.c, this time hopefully with properly
aligned stack on both the user's signal handler call and the __sigreturn call.

(Split across two patches and this tiny cover letter, hopefully not too
confusing.)

^ permalink raw reply	[flat|nested] 140+ messages in thread

* [PATCH v2 18.1/34] hurd: Do not declare local variables volatile
  2023-04-03 11:56   ` [PATCH v2 18.0/34] Alignment-respecting x86_64 trampoline.c Sergey Bugaev
@ 2023-04-03 11:56     ` Sergey Bugaev
  2023-04-10 18:42       ` Samuel Thibault
  2023-04-03 11:56     ` [PATCH v2 18.2/34] hurd: Port trampoline.c to x86_64 Sergey Bugaev
  1 sibling, 1 reply; 140+ messages in thread
From: Sergey Bugaev @ 2023-04-03 11:56 UTC (permalink / raw)
  To: bug-hurd, libc-alpha; +Cc: Samuel Thibault, Sergey Bugaev

These are just regular local variables that are not accessed in any
funny ways, not even though a pointer. There's absolutely no reason to
declare them volatile. It only ends up hurting the quality of the
generated machine code.

If anything, it would make sense to decalre sigsp as *pointing* to
volatile memory (volatile void *sigsp), but evidently that's not needed
either.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
---
 hurd/trampoline.c                   | 2 +-
 sysdeps/mach/hurd/i386/trampoline.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/hurd/trampoline.c b/hurd/trampoline.c
index 5bd8dec9..1447b13f 100644
--- a/hurd/trampoline.c
+++ b/hurd/trampoline.c
@@ -29,7 +29,7 @@ struct sigcontext *
 _hurd_setup_sighandler (struct hurd_sigstate *ss, const struct sigaction *action,
                         __sighandler_t handler,
                         int signo, struct hurd_signal_detail *detail,
-                        volatile int rpc_wait,
+                        int rpc_wait,
                         struct machine_thread_all_state *state)
 {
 #error "Need to write sysdeps/mach/hurd/MACHINE/trampoline.c"
diff --git a/sysdeps/mach/hurd/i386/trampoline.c b/sysdeps/mach/hurd/i386/trampoline.c
index ab67fb9c..9cd60b9c 100644
--- a/sysdeps/mach/hurd/i386/trampoline.c
+++ b/sysdeps/mach/hurd/i386/trampoline.c
@@ -83,13 +83,13 @@ struct sigcontext *
 _hurd_setup_sighandler (struct hurd_sigstate *ss, const struct sigaction *action,
 			__sighandler_t handler,
 			int signo, struct hurd_signal_detail *detail,
-			volatile int rpc_wait,
+			int rpc_wait,
 			struct machine_thread_all_state *state)
 {
   void trampoline (void);
   void rpc_wait_trampoline (void);
   void firewall (void);
-  void *volatile sigsp;
+  void *sigsp;
   struct sigcontext *scp;
   struct
     {
-- 
2.39.2


^ permalink raw reply	[flat|nested] 140+ messages in thread

* [PATCH v2 18.2/34] hurd: Port trampoline.c to x86_64
  2023-04-03 11:56   ` [PATCH v2 18.0/34] Alignment-respecting x86_64 trampoline.c Sergey Bugaev
  2023-04-03 11:56     ` [PATCH v2 18.1/34] hurd: Do not declare local variables volatile Sergey Bugaev
@ 2023-04-03 11:56     ` Sergey Bugaev
  2023-04-10 19:04       ` Samuel Thibault
  1 sibling, 1 reply; 140+ messages in thread
From: Sergey Bugaev @ 2023-04-03 11:56 UTC (permalink / raw)
  To: bug-hurd, libc-alpha; +Cc: Samuel Thibault, Sergey Bugaev

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
---
 sysdeps/mach/hurd/{i386 => x86}/trampoline.c | 158 ++++++++++++++++++-
 1 file changed, 151 insertions(+), 7 deletions(-)
 rename sysdeps/mach/hurd/{i386 => x86}/trampoline.c (68%)

diff --git a/sysdeps/mach/hurd/i386/trampoline.c b/sysdeps/mach/hurd/x86/trampoline.c
similarity index 68%
rename from sysdeps/mach/hurd/i386/trampoline.c
rename to sysdeps/mach/hurd/x86/trampoline.c
index 9cd60b9c..e13c5d85 100644
--- a/sysdeps/mach/hurd/i386/trampoline.c
+++ b/sysdeps/mach/hurd/x86/trampoline.c
@@ -1,4 +1,4 @@
-/* Set thread_state for sighandler, and sigcontext to recover.  i386 version.
+/* Set thread_state for sighandler, and sigcontext to recover.  x86 version.
    Copyright (C) 1994-2023 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -46,7 +46,13 @@ static void fill_siginfo (siginfo_t *si, int signo,
   if (detail->exc == EXC_BAD_ACCESS)
     si->si_addr = (void *) detail->exc_subcode;
   else
-    si->si_addr = (void *) state->basic.eip;
+    {
+#ifdef __x86_64__
+      si->si_addr = (void *) state->basic.rip;
+#else
+      si->si_addr = (void *) state->basic.eip;
+#endif
+    }
 
   /* XXX On SIGCHLD, this should be the exit status of the child
    * process.  We would need a protocol change for the proc server
@@ -63,17 +69,26 @@ static void fill_ucontext (ucontext_t *uc, const struct sigcontext *sc)
   uc->uc_flags = 0;
   uc->uc_link = NULL;
   uc->uc_sigmask = sc->sc_mask;
+#ifdef __x86_64__
+  uc->uc_stack.ss_sp = (__ptr_t) sc->sc_ursp;
+#else
   uc->uc_stack.ss_sp = (__ptr_t) sc->sc_uesp;
+#endif
   uc->uc_stack.ss_size = 0;
   uc->uc_stack.ss_flags = 0;
 
   /* Registers.  */
+#ifdef __x86_64__
+  memcpy (&uc->uc_mcontext.gregs[REG_GSFS], &sc->sc_gs,
+          (REG_ERR - REG_GSFS) * sizeof (long));
+#else
   memcpy (&uc->uc_mcontext.gregs[REG_GS], &sc->sc_gs,
-	  (REG_TRAPNO - REG_GS) * sizeof (int));
-  uc->uc_mcontext.gregs[REG_TRAPNO] = 0;
-  uc->uc_mcontext.gregs[REG_ERR] = 0;
+          (REG_TRAPNO - REG_GS) * sizeof (int));
   memcpy (&uc->uc_mcontext.gregs[REG_EIP], &sc->sc_eip,
 	  (NGREG - REG_EIP) * sizeof (int));
+#endif
+  uc->uc_mcontext.gregs[REG_TRAPNO] = 0;
+  uc->uc_mcontext.gregs[REG_ERR] = 0;
 
   /* XXX FPU state.  */
   memset (&uc->uc_mcontext.fpregs, 0, sizeof (fpregset_t));
@@ -93,7 +108,14 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, const struct sigaction *action
   struct sigcontext *scp;
   struct
     {
-      int signo;
+      union
+        {
+          int signo;
+          /* Make sure signo takes up a pointer-sized slot on the stack.
+             (This should already be the case considering the siginfop
+             pointer below, but better be explicit.)  */
+          void *_pointer_sized;
+        };
       union
 	{
 	  /* Extra arguments for traditional signal handlers */
@@ -110,6 +132,10 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, const struct sigaction *action
 	      ucontext_t *uctxp;            /* Points to uctx, below.  */
 	    } posix;
 	};
+
+#ifdef __x86_64__
+      void *_pad;
+#endif
       void *sigreturn_addr;
       void *sigreturn_returns_here;
       struct sigcontext *return_scp; /* Same; arg to sigreturn.  */
@@ -121,6 +147,11 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, const struct sigaction *action
       siginfo_t siginfo;
     } *stackframe;
 
+#ifdef __x86_64__
+  _Static_assert (offsetof (typeof (*stackframe), sigreturn_addr) % 16 == 0,
+                  "sigreturn_addr must be 16-byte aligned");
+#endif
+
   if (ss->context)
     {
       /* We have a previous sigcontext that sigreturn was about
@@ -142,7 +173,11 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, const struct sigaction *action
   /* Save the original SP in the gratuitous `esp' slot.
      We may need to reset the SP (the `uesp' slot) to avoid clobbering an
      interrupted RPC frame.  */
+#ifdef __x86_64__
+  state->basic.rsp = state->basic.ursp;
+#else
   state->basic.esp = state->basic.uesp;
+#endif
 
   if ((action->sa_flags & SA_ONSTACK)
       && !(ss->sigaltstack.ss_flags & (SS_DISABLE|SS_ONSTACK)))
@@ -151,7 +186,22 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, const struct sigaction *action
       ss->sigaltstack.ss_flags |= SS_ONSTACK;
     }
   else
-    sigsp = (char *) state->basic.uesp;
+    {
+#ifdef __x86_64__
+      /* Per the ABI, we're not supposed to clobber 128 bytes below
+         SP -- the red zone.  */
+      sigsp = (char *) state->basic.ursp - 128;
+#else
+      sigsp = (char *) state->basic.uesp;
+#endif
+    }
+
+#ifdef __x86_64__
+  /* Align SP at 16 bytes.  Coupled with the fact that sigreturn_addr is
+     16-byte aligned within the stackframe struct, this ensures that it ends
+     up on a 16-byte aligned address, as required by the ABI.  */
+  sigsp = (void *) ((uintptr_t) sigsp & 16UL);
+#endif
 
   /* Push the arguments to call `trampoline' on the stack.  */
   sigsp -= sizeof (*stackframe);
@@ -238,6 +288,52 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, const struct sigaction *action
     }
 
   /* Modify the thread state to call the trampoline code on the new stack.  */
+#ifdef __x86_64__
+  if (rpc_wait)
+    {
+      /* The signalee thread was blocked in a mach_msg_trap system call,
+         still waiting for a reply.  We will have it run the special
+         trampoline code which retries the message receive before running
+         the signal handler.
+
+         To do this we change the OPTION argument (in rsi) to enable only
+         message reception, since the request message has already been
+         sent.  */
+
+      assert (state->basic.rsi & MACH_RCV_MSG);
+      /* Disable the message-send, since it has already completed.  The
+         calls we retry need only wait to receive the reply message.  */
+      state->basic.rsi &= ~MACH_SEND_MSG;
+
+      /* Limit the time to receive the reply message, in case the server
+         claimed that `interrupt_operation' succeeded but in fact the RPC
+         is hung.  */
+      state->basic.rsi |= MACH_RCV_TIMEOUT;
+      state->basic.r9 = _hurd_interrupted_rpc_timeout;
+
+      state->basic.rip = (uintptr_t) rpc_wait_trampoline;
+      /* The reply-receiving trampoline code runs initially on the original
+         user stack.  We pass it the signal stack pointer in %rbx.  */
+      state->basic.rbx = (uintptr_t) sigsp;
+      /* After doing the message receive, the trampoline code will need to
+         update the %rax value to be restored by sigreturn.  To simplify
+         the assembly code, we pass the address of its slot in SCP to the
+         trampoline code in %r12.  */
+      state->basic.r12 = (uintptr_t) &scp->sc_rax;
+    }
+  else
+    {
+      state->basic.rip = (uintptr_t) trampoline;
+      state->basic.ursp = (uintptr_t) sigsp;
+    }
+  /* We pass the handler function to the trampoline code in %r13.  */
+  state->basic.r13 = (uintptr_t) handler;
+
+  /* The x86 ABI says the DF bit is clear on entry to any function.  */
+  state->basic.rfl &= ~EFL_DF;
+
+#else
+
   if (rpc_wait)
     {
       /* The signalee thread was blocked in a mach_msg_trap system call,
@@ -290,6 +386,7 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, const struct sigaction *action
 
   /* The x86 ABI says the DF bit is clear on entry to any function.  */
   state->basic.efl &= ~EFL_DF;
+#endif
 
   return scp;
 }
@@ -301,6 +398,52 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, const struct sigaction *action
    - in gcc: libgcc/config/i386/gnu-unwind.h x86_gnu_fallback_frame_state,
    - in gdb: gdb/i386-gnu-tdep.c gnu_sigtramp_code.  */
 
+#ifdef __x86_64__
+asm ("rpc_wait_trampoline:\n"
+  /* This is the entry point when we have an RPC reply message to receive
+     before running the handler.  The MACH_MSG_SEND bit has already been
+     cleared in the OPTION argument in our %rsi.  The interrupted user
+     stack pointer has not been changed, so the system call can find its
+     arguments; the signal stack pointer is in %rbx.  For our convenience,
+     %r12 points to the sc_rax member of the sigcontext.  */
+     "movq $-25, %rax\n"	/* mach_msg_trap */
+     "syscall\n"
+     /* When the sigcontext was saved, %rax was MACH_RCV_INTERRUPTED.  But
+        now the message receive has completed and the original caller of
+        the RPC (i.e. the code running when the signal arrived) needs to
+        see the final return value of the message receive in %rax.  So
+        store the new %rax value into the sc_rax member of the sigcontext
+        (whose address is in %r12 to make this code simpler).  */
+     "movq %rax, (%r12)\n"
+     /* Switch to the signal stack.  */
+     "movq %rbx, %rsp\n"
+
+     "trampoline:\n"
+     /* Entry point for running the handler normally.  The arguments to the
+        handler function are on the top of the stack, same as in the i386
+        version:
+
+        0(%rsp)  SIGNO
+        8(%rsp)  SIGCODE
+        16(%rsp) SCP
+
+        Pop them off to the registers, to pass as arguments to the handler.
+     */
+     "popq %rdi\n"
+     "popq %rsi\n"
+     "popq %rdx\n"
+     /* Pop the _pad member to make the stack 16-byte aligned, as per the
+        ABI.  */
+     "addq $8, %rsp\n"
+     "call *%r13\n"		/* Call the handler function.  */
+     /* The word at the top of stack is &__sigreturn; following are a dummy
+        word to fill the slot for the address for __sigreturn to return to,
+        and a copy of SCP for __sigreturn's argument.  Load the SCP as for a
+        call, and "return" to calling __sigreturn (SCP); this call never
+        returns.  */
+     "movq 16(%rsp), %rdi\n"
+     "ret");
+#else
 asm ("rpc_wait_trampoline:\n");
   /* This is the entry point when we have an RPC reply message to receive
      before running the handler.  The MACH_MSG_SEND bit has already been
@@ -336,6 +479,7 @@ asm ("call *%edx\n"		/* Call the handler function.  */
 	and a copy of SCP for __sigreturn's argument.  "Return" to calling
 	__sigreturn (SCP); this call never returns.  */
      "ret");
+#endif
 
 asm ("firewall:\n"
      "hlt");
-- 
2.39.2


^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 13/34] x86-64: Disable prefer_map_32bit_exec tunable on non-Linux
  2023-04-03 10:10     ` Sergey Bugaev
@ 2023-04-03 19:02       ` H.J. Lu
  2023-04-03 20:11         ` Sergey Bugaev
  0 siblings, 1 reply; 140+ messages in thread
From: H.J. Lu @ 2023-04-03 19:02 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: Samuel Thibault, libc-alpha, bug-hurd

[-- Attachment #1: Type: text/plain, Size: 1426 bytes --]

On Mon, Apr 3, 2023 at 3:10 AM Sergey Bugaev <bugaevc@gmail.com> wrote:
>
> On Mon, Apr 3, 2023 at 2:09 AM Samuel Thibault <samuel.thibault@gnu.org> wrote:
> > Sergey Bugaev, le dim. 19 mars 2023 18:09:56 +0300, a ecrit:
> > > While we could/should implement MAP_32BIT for the Hurd port by setting
> > > all the high bits of mask in a vm_map () call, neither MAP_32BIT nor
> > > glibc.cpu.prefer_map_32bit_exec exist on the Hurd as of now. Compile
> > > this code out to fix build failures.
> >
> > Rather use defined(MAP_32BIT)? That way it will nicely work for BSD
> > ports as well, and when hurd eventually supports MAP_32BIT.
>
> Not really. What breaks compilation here is not missing MAP_32BIT, but
> rather the undefined set_prefer_map_32bit_exec tunable. It is defined
> declaratively in sysdeps/unix/sysv/linux/x86_64/64/dl-tunables.list
> (see commit 317f1c0a8a71a862b1e600ff5386b08e02cf4b95); so as-is, it
> really is x86_64 Linux specific.
>
> Is there some way to check if a specific tunable is defined, like #if
> HAVE_TUNABLE (prefer_map_32bit_exec)? AFAICS the generated
> dl-tunable-list.h defines the C enum members, but not any checkable
> preprocessor macros.
>
> Alternatively: maybe this part of cpu-features.c should be moved into
> sysdeps/unix/sysv/linux/x86_64/64/cpu-features.c and #include_next the
> common cpu-features.c?
>

Or something like this.

-- 
H.J.

[-- Attachment #2: 0001-x86-64-Make-glibc.cpu.prefer_map_32bit_exec-Linux-sp.patch --]
[-- Type: text/x-patch, Size: 4378 bytes --]

From 24090a219d8bf902db530bfd9bd73e837f13c435 Mon Sep 17 00:00:00 2001
From: "H.J. Lu" <hjl.tools@gmail.com>
Date: Mon, 3 Apr 2023 11:54:30 -0700
Subject: [PATCH] x86-64: Make glibc.cpu.prefer_map_32bit_exec Linux specific

Add <map-32bit-exec.h> to make glibc.cpu.prefer_map_32bit_exec Linux
specific.
---
 .../sysv/linux/x86_64/64/map-32bit-exec.h     | 29 +++++++++++++++++++
 sysdeps/x86/cpu-features.c                    | 16 ++--------
 sysdeps/x86/map-32bit-exec.h                  | 19 ++++++++++++
 3 files changed, 50 insertions(+), 14 deletions(-)
 create mode 100644 sysdeps/unix/sysv/linux/x86_64/64/map-32bit-exec.h
 create mode 100644 sysdeps/x86/map-32bit-exec.h

diff --git a/sysdeps/unix/sysv/linux/x86_64/64/map-32bit-exec.h b/sysdeps/unix/sysv/linux/x86_64/64/map-32bit-exec.h
new file mode 100644
index 0000000000..74763853e1
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/x86_64/64/map-32bit-exec.h
@@ -0,0 +1,29 @@
+/* Handle glibc.cpu.prefer_map_32bit_exec.  Linux/x86-64 version.
+   This file is part of the GNU C Library.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+
+   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
+   <https://www.gnu.org/licenses/>.  */
+
+static void
+TUNABLE_CALLBACK (set_prefer_map_32bit_exec) (tunable_val_t *valp)
+{
+  if (valp->numval)
+    GLRO(dl_x86_cpu_features).preferred[index_arch_Prefer_MAP_32BIT_EXEC]
+      |= bit_arch_Prefer_MAP_32BIT_EXEC;
+}
+
+#define TUNABLE_GET_prefer_map_32bit_exec() \
+  TUNABLE_GET (prefer_map_32bit_exec, tunable_val_t *, \
+	       TUNABLE_CALLBACK (set_prefer_map_32bit_exec));
diff --git a/sysdeps/x86/cpu-features.c b/sysdeps/x86/cpu-features.c
index 978eb29f72..75a011dab7 100644
--- a/sysdeps/x86/cpu-features.c
+++ b/sysdeps/x86/cpu-features.c
@@ -22,20 +22,11 @@
 #include <cacheinfo.h>
 #include <dl-cacheinfo.h>
 #include <dl-minsigstacksize.h>
+#include <map-32bit-exec.h>
 
 extern void TUNABLE_CALLBACK (set_hwcaps) (tunable_val_t *)
   attribute_hidden;
 
-#ifdef __LP64__
-static void
-TUNABLE_CALLBACK (set_prefer_map_32bit_exec) (tunable_val_t *valp)
-{
-  if (valp->numval)
-    GLRO(dl_x86_cpu_features).preferred[index_arch_Prefer_MAP_32BIT_EXEC]
-      |= bit_arch_Prefer_MAP_32BIT_EXEC;
-}
-#endif
-
 #if CET_ENABLED
 extern void TUNABLE_CALLBACK (set_x86_ibt) (tunable_val_t *)
   attribute_hidden;
@@ -710,10 +701,7 @@ no_cpuid:
 
   TUNABLE_GET (hwcaps, tunable_val_t *, TUNABLE_CALLBACK (set_hwcaps));
 
-#ifdef __LP64__
-  TUNABLE_GET (prefer_map_32bit_exec, tunable_val_t *,
-	       TUNABLE_CALLBACK (set_prefer_map_32bit_exec));
-#endif
+  TUNABLE_GET_prefer_map_32bit_exec ();
 
   bool disable_xsave_features = false;
 
diff --git a/sysdeps/x86/map-32bit-exec.h b/sysdeps/x86/map-32bit-exec.h
new file mode 100644
index 0000000000..9771338df3
--- /dev/null
+++ b/sysdeps/x86/map-32bit-exec.h
@@ -0,0 +1,19 @@
+/* Handle glibc.cpu.prefer_map_32bit_exec.  Generic x86 version.
+   This file is part of the GNU C Library.
+   Copyright (C) 2023 Free Software Foundation, Inc.
+
+   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
+   <https://www.gnu.org/licenses/>.  */
+
+#define TUNABLE_GET_prefer_map_32bit_exec()
-- 
2.39.2


^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 13/34] x86-64: Disable prefer_map_32bit_exec tunable on non-Linux
  2023-04-03 19:02       ` H.J. Lu
@ 2023-04-03 20:11         ` Sergey Bugaev
  0 siblings, 0 replies; 140+ messages in thread
From: Sergey Bugaev @ 2023-04-03 20:11 UTC (permalink / raw)
  To: H.J. Lu, Samuel Thibault; +Cc: libc-alpha, bug-hurd

On Mon, Apr 3, 2023 at 10:02 PM H.J. Lu <hjl.tools@gmail.com> wrote:
> Or something like this.

Or like that, yeah!

On a second thought, I actually like Samuel's idea (ifdef MAP_32BIT):
instead of only building this piece of code when the tunable *is*
defined, we'd build it when the tunable *should be* defined (that is,
when your port has MAP_32BIT). And if you get build errors, that is
your not-so-gentle reminder to go and define the tunable for your
port.

What do you think?

Sergey

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH gnumach 03/34] Make exception subcode a long
  2023-04-03  9:32     ` Sergey Bugaev
@ 2023-04-06  2:11       ` Flávio Cruz
  2023-04-10 23:52         ` Samuel Thibault
  0 siblings, 1 reply; 140+ messages in thread
From: Flávio Cruz @ 2023-04-06  2:11 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: Samuel Thibault, libc-alpha, bug-hurd, Luca

[-- Attachment #1: Type: text/plain, Size: 1866 bytes --]

Hello!

On Mon, Apr 3, 2023 at 5:32 AM Sergey Bugaev via Libc-alpha <
libc-alpha@sourceware.org> wrote:

> On Mon, Apr 3, 2023 at 1:45 AM Samuel Thibault <samuel.thibault@gnu.org>
> wrote:
> > Sergey Bugaev, le dim. 19 mars 2023 18:09:46 +0300, a ecrit:
> > > On EXC_BAD_ACCESS, exception subcode is used to pass the faulting
> memory
> > > address, so it needs to be (at least) pointer-sized. Thus, make it into
> > > a long.
> > >
> > > This requires matching changes in glibc and the Hurd.
> >
> > But the change doesn't affect 32bit glibc and hurd since
> > rpc_long_integer_t is really like integer_t there, right?
>
> It's supposed to be ABI-compatible on 32-bit, since all these types
> are 32-bit integers there, yes. (But maybe I messed up, do check!)
>
> But it may break source-level compatibility (if you only apply the
> Mach change but not glibc, or vice versa); as in maybe GCC will
> complain about int vs long in function prototype vs definition. I
> haven't actually checked, since I have both changes applied locally.
>

It breaks compatibility for Hurd code:

hurd/mach-defpager/default_pager.c:3789:1: error: conflicting types for
'catch_exception_raise'; have 'kern_return_t(mach_port_t, mach_port_t,
mach_port_t, int, int, int)' {aka 'int(unsigned int, unsigned int, unsigned
int, int, int, int)'}
3789 | catch_exception_raise(mach_port_t exception_port,
| ^~~~~~~~~~~~~~~~~~~~~
In file included from
/home/runner/_work/cross-hurd/cross-hurd/src/hurd/mach-defpager/default_pager.c:67:

./exc_S.h:19:15: note: previous declaration of 'catch_exception_raise' with
type 'kern_return_t(mach_port_t, mach_port_t, mach_port_t, integer_t,
integer_t, rpc_long_integer_t)' {aka 'int(unsigned int, unsigned int,
unsigned int, int, int, long int)'}
19 | kern_return_t catch_exception_raise


> Sergey
>

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 16/34] hurd: Add sys/ucontext.h and sigcontext.h for x86_64
  2023-03-19 15:09 ` [RFC PATCH glibc 16/34] hurd: Add sys/ucontext.h and sigcontext.h for x86_64 Sergey Bugaev
@ 2023-04-10 18:39   ` Samuel Thibault
  2023-04-10 19:07     ` Sergey Bugaev
  2023-04-10 18:58   ` Samuel Thibault
  1 sibling, 1 reply; 140+ messages in thread
From: Samuel Thibault @ 2023-04-10 18:39 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: libc-alpha, bug-hurd

Hello,

Applied, thanks!

Note that I have pushed sysdeps/mach/hurd/x86_64/sys/ucontext.h to
sysdeps/x86_64/sys/ucontext.h since it's not mach-specific, and Linux
has its own for x86.

Samuel

Sergey Bugaev, le dim. 19 mars 2023 18:09:59 +0300, a ecrit:
> This is based on the Linux port's version, but laid out to match Mach's
> struct i386_thread_state, much like the i386 version does.
> 
> Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
> ---
> 
> I'm not very sure about the FP stuff, nor about any of this, really. Please
> do review.
> 
>  sysdeps/mach/hurd/x86_64/bits/sigcontext.h | 131 +++++++++++++++++
>  sysdeps/mach/hurd/x86_64/sys/ucontext.h    | 157 +++++++++++++++++++++
>  sysdeps/mach/hurd/x86_64/ucontext_i.sym    |  38 +++++
>  3 files changed, 326 insertions(+)
>  create mode 100644 sysdeps/mach/hurd/x86_64/bits/sigcontext.h
>  create mode 100644 sysdeps/mach/hurd/x86_64/sys/ucontext.h
>  create mode 100644 sysdeps/mach/hurd/x86_64/ucontext_i.sym
> 
> diff --git a/sysdeps/mach/hurd/x86_64/bits/sigcontext.h b/sysdeps/mach/hurd/x86_64/bits/sigcontext.h
> new file mode 100644
> index 00000000..3a3b34bc
> --- /dev/null
> +++ b/sysdeps/mach/hurd/x86_64/bits/sigcontext.h
> @@ -0,0 +1,131 @@
> +/* Machine-dependent signal context structure for GNU Hurd.  x86_64 version.
> +   Copyright (C) 1991-2023 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
> +   <https://www.gnu.org/licenses/>.  */
> +
> +#ifndef _BITS_SIGCONTEXT_H
> +#define _BITS_SIGCONTEXT_H 1
> +
> +#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H
> +# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
> +#endif
> +
> +/* Signal handlers are actually called:
> +   void handler (int sig, int code, struct sigcontext *scp);  */
> +
> +#include <bits/types/__sigset_t.h>
> +#include <mach/machine/fp_reg.h>
> +
> +/* State of this thread when the signal was taken.  */
> +struct sigcontext
> +  {
> +    /* These first members are machine-independent.  */
> +
> +    int sc_onstack;		/* Nonzero if running on sigstack.  */
> +    __sigset_t sc_mask;		/* Blocked signals to restore.  */
> +
> +    /* MiG reply port this thread is using.  */
> +    unsigned int sc_reply_port;
> +
> +    /* Port this thread is doing an interruptible RPC on.  */
> +    unsigned int sc_intr_port;
> +
> +    /* Error code associated with this signal (interpreted as `error_t').  */
> +    int sc_error;
> +
> +    /* All following members are machine-dependent.  The rest of this
> +       structure is written to be laid out identically to:
> +       {
> +	 struct i386_thread_state basic;
> +	 struct i386_float_state fpu;
> +       }
> +       trampoline.c knows this, so it must be changed if this changes.  */
> +
> +#define sc_i386_thread_state sc_gs /* Beginning of correspondence.  */
> +    /* Segment registers.  */
> +    int sc_gs;
> +    int sc_fs;
> +    int sc_es;
> +    int sc_ds;
> +
> +    long sc_r8;
> +    long sc_r9;
> +    long sc_r10;
> +    long sc_r11;
> +    long sc_r12;
> +    long sc_r13;
> +    long sc_r14;
> +    long sc_r15;
> +    long sc_rdi;
> +    long sc_rsi;
> +    long sc_rbp;
> +    long sc_rsp;		/* Not used; sc_ursp is used instead.  */
> +    long sc_rbx;
> +    long sc_rdx;
> +    long sc_rcx;
> +    long sc_rax;
> +    long sc_rip;		/* Instruction pointer.  */
> +
> +    int sc_cs;			/* Code segment register.  */
> +
> +    long sc_rfl;		/* Processor flags.  */
> +
> +    long sc_ursp;		/* This stack pointer is used.  */
> +    int sc_ss;			/* Stack segment register.  */
> +
> +    /* Following mimics struct i386_float_state.  Structures and symbolic
> +       values can be found in <mach/i386/fp_reg.h>.  */
> +#define sc_i386_float_state sc_fpkind
> +    int sc_fpkind;		/* FP_NO, FP_387, etc.  */
> +    int sc_fpused;		/* If zero, ignore rest of float state.  */
> +    struct i386_fp_save sc_fpsave;
> +    struct i386_fp_regs sc_fpregs;
> +    int sc_fpexcsr;		/* FPSR including exception bits.  */
> +  };
> +
> +/* Traditional BSD names for some members.  */
> +#define sc_sp	sc_ursp		/* Stack pointer.  */
> +#define sc_fp	sc_rbp		/* Frame pointer.  */
> +#define sc_pc	sc_rip		/* Process counter.  */
> +#define sc_ps	sc_rfl
> +
> +
> +/* The deprecated sigcode values below are passed as an extra, non-portable
> +   argument to regular signal handlers.  You should use SA_SIGINFO handlers
> +   instead, which use the standard POSIX signal codes.  */
> +
> +/* Codes for SIGFPE.  */
> +#define FPE_INTOVF_TRAP		0x1 /* integer overflow */
> +#define FPE_INTDIV_FAULT	0x2 /* integer divide by zero */
> +#define FPE_FLTOVF_FAULT	0x3 /* floating overflow */
> +#define FPE_FLTDIV_FAULT	0x4 /* floating divide by zero */
> +#define FPE_FLTUND_FAULT	0x5 /* floating underflow */
> +#define FPE_SUBRNG_FAULT	0x7 /* BOUNDS instruction failed */
> +#define FPE_FLTDNR_FAULT	0x8 /* denormalized operand */
> +#define FPE_FLTINX_FAULT	0x9 /* floating loss of precision */
> +#define FPE_EMERR_FAULT		0xa /* mysterious emulation error 33 */
> +#define FPE_EMBND_FAULT		0xb /* emulation BOUNDS instruction failed */
> +
> +/* Codes for SIGILL.  */
> +#define ILL_INVOPR_FAULT	0x1 /* invalid operation */
> +#define ILL_STACK_FAULT		0x2 /* fault on microkernel stack access */
> +#define ILL_FPEOPR_FAULT	0x3 /* invalid floating operation */
> +
> +/* Codes for SIGTRAP.  */
> +#define DBG_SINGLE_TRAP		0x1 /* single step */
> +#define DBG_BRKPNT_FAULT	0x2 /* breakpoint instruction */
> +
> +#endif /* bits/sigcontext.h */
> diff --git a/sysdeps/mach/hurd/x86_64/sys/ucontext.h b/sysdeps/mach/hurd/x86_64/sys/ucontext.h
> new file mode 100644
> index 00000000..d73a8937
> --- /dev/null
> +++ b/sysdeps/mach/hurd/x86_64/sys/ucontext.h
> @@ -0,0 +1,157 @@
> +/* Copyright (C) 2001-2023 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
> +   <https://www.gnu.org/licenses/>.  */
> +
> +#ifndef _SYS_UCONTEXT_H
> +#define _SYS_UCONTEXT_H	1
> +
> +#include <features.h>
> +
> +#include <bits/types.h>
> +#include <bits/types/sigset_t.h>
> +#include <bits/types/stack_t.h>
> +
> +
> +#ifdef __USE_MISC
> +# define __ctx(fld) fld
> +#else
> +# define __ctx(fld) __ ## fld
> +#endif
> +
> +/* Type for general register.  */
> +__extension__ typedef long long int greg_t;
> +
> +/* Number of general registers.  */
> +#define __NGREG	23
> +#ifdef __USE_MISC
> +# define NGREG	__NGREG
> +#endif
> +
> +/* Container for all general registers.  */
> +typedef greg_t gregset_t[__NGREG];
> +
> +#ifdef __USE_GNU
> +/* Number of each register in the `gregset_t' array.  */
> +enum
> +{
> +  REG_GSFS = 0,		/* Actually int gs, fs.  */
> +# define REG_GSFS	REG_GSFS
> +  REG_ESDS,		/* Actually int es, ds.  */
> +# define REG_ESDS	REG_ESDS
> +  REG_R8,
> +# define REG_R8		REG_R8
> +  REG_R9,
> +# define REG_R9		REG_R9
> +  REG_R10,
> +# define REG_R10	REG_R10
> +  REG_R11,
> +# define REG_R11	REG_R11
> +  REG_R12,
> +# define REG_R12	REG_R12
> +  REG_R13,
> +# define REG_R13	REG_R13
> +  REG_R14,
> +# define REG_R14	REG_R14
> +  REG_R15,
> +# define REG_R15	REG_R15
> +  REG_RDI,
> +# define REG_RDI	REG_RDI
> +  REG_RSI,
> +# define REG_RSI	REG_RSI
> +  REG_RBP,
> +# define REG_RBP	REG_RBP
> +  REG_RSP,
> +# define REG_RSP	REG_RSP
> +  REG_RBX,
> +# define REG_RBX	REG_RBX
> +  REG_RDX,
> +# define REG_RDX	REG_RDX
> +  REG_RCX,
> +# define REG_RCX	REG_RCX
> +  REG_RAX,
> +# define REG_RAX	REG_RAX
> +  REG_RIP,
> +# define REG_RIP	REG_RIP
> +  REG_CS,		/* Actually int cs, pad.  */
> +# define REG_CS		REG_CS
> +  REG_RFL,
> +# define REG_RFL	REG_RFL
> +  REG_ERR,
> +# define REG_ERR	REG_ERR
> +  REG_TRAPNO,
> +# define REG_TRAPNO	REG_TRAPNO
> +  REG_OLDMASK,
> +# define REG_OLDMASK	REG_OLDMASK
> +  REG_CR2
> +# define REG_CR2	REG_CR2
> +};
> +#endif
> +
> +struct _libc_fpxreg
> +{
> +  unsigned short int __ctx(significand)[4];
> +  unsigned short int __ctx(exponent);
> +  unsigned short int __glibc_reserved1[3];
> +};
> +
> +struct _libc_xmmreg
> +{
> +  __uint32_t	__ctx(element)[4];
> +};
> +
> +struct _libc_fpstate
> +{
> +  /* 64-bit FXSAVE format.  */
> +  __uint16_t		__ctx(cwd);
> +  __uint16_t		__ctx(swd);
> +  __uint16_t		__ctx(ftw);
> +  __uint16_t		__ctx(fop);
> +  __uint64_t		__ctx(rip);
> +  __uint64_t		__ctx(rdp);
> +  __uint32_t		__ctx(mxcsr);
> +  __uint32_t		__ctx(mxcr_mask);
> +  struct _libc_fpxreg	_st[8];
> +  struct _libc_xmmreg	_xmm[16];
> +  __uint32_t		__glibc_reserved1[24];
> +};
> +
> +/* Structure to describe FPU registers.  */
> +typedef struct _libc_fpstate *fpregset_t;
> +
> +/* Context to describe whole processor state.  */
> +typedef struct
> +  {
> +    gregset_t __ctx(gregs);
> +    /* Note that fpregs is a pointer.  */
> +    fpregset_t __ctx(fpregs);
> +    __extension__ unsigned long long __reserved1 [8];
> +} mcontext_t;
> +
> +/* Userlevel context.  */
> +typedef struct ucontext_t
> +  {
> +    unsigned long int __ctx(uc_flags);
> +    struct ucontext_t *uc_link;
> +    stack_t uc_stack;
> +    mcontext_t uc_mcontext;
> +    sigset_t uc_sigmask;
> +    struct _libc_fpstate __fpregs_mem;
> +    __extension__ unsigned long long int __ssp[4];
> +  } ucontext_t;
> +
> +#undef __ctx
> +
> +#endif /* sys/ucontext.h */
> diff --git a/sysdeps/mach/hurd/x86_64/ucontext_i.sym b/sysdeps/mach/hurd/x86_64/ucontext_i.sym
> new file mode 100644
> index 00000000..7e536956
> --- /dev/null
> +++ b/sysdeps/mach/hurd/x86_64/ucontext_i.sym
> @@ -0,0 +1,38 @@
> +#include <stddef.h>
> +#include <signal.h>
> +#include <sys/ucontext.h>
> +
> +--
> +
> +SIG_BLOCK
> +SIG_SETMASK
> +
> +_NSIG8		(_NSIG / 8)
> +
> +#define ucontext(member)	offsetof (ucontext_t, member)
> +#define mcontext(member)	ucontext (uc_mcontext.member)
> +#define mreg(reg)		mcontext (gregs[REG_##reg])
> +
> +oRBP		mreg (RBP)
> +oRSP		mreg (RSP)
> +oRBX		mreg (RBX)
> +oR8		mreg (R8)
> +oR9		mreg (R9)
> +oR10		mreg (R10)
> +oR11		mreg (R11)
> +oR12		mreg (R12)
> +oR13		mreg (R13)
> +oR14		mreg (R14)
> +oR15		mreg (R15)
> +oRDI		mreg (RDI)
> +oRSI		mreg (RSI)
> +oRDX		mreg (RDX)
> +oRAX		mreg (RAX)
> +oRCX		mreg (RCX)
> +oRIP		mreg (RIP)
> +oRFL		mreg (RFL)
> +oFPREGS		mcontext (fpregs)
> +oSIGMASK	ucontext (uc_sigmask)
> +oFPREGSMEM	ucontext (__fpregs_mem)
> +oMXCSR		ucontext (__fpregs_mem.mxcsr)
> +oSSP		ucontext (__ssp)
> -- 
> 2.39.2
> 

-- 
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 17/34] hurd: Implement x86_64/intr-msg.h
  2023-03-19 15:10 ` [RFC PATCH glibc 17/34] hurd: Implement x86_64/intr-msg.h Sergey Bugaev
@ 2023-04-10 18:41   ` Samuel Thibault
  0 siblings, 0 replies; 140+ messages in thread
From: Samuel Thibault @ 2023-04-10 18:41 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: libc-alpha, bug-hurd

Applied, thanks!

Sergey Bugaev, le dim. 19 mars 2023 18:10:00 +0300, a ecrit:
> This is a prelimenary version of intr-msg.h. I can't know whether or not
> it works until we can test it.

Sure :)

> The code relies on syscall preserving values
> of the registers used to pass syscall arguments. The code in SYSCALL_EXAMINE
> that just compares two bytes to the encoded syscall instruction is sure to
> give many false positives; we're going to need to come up with a more reliable
> scheme.

Not necessarily: this is only used for msg_report_wait, which is already
extra cautious about what it's doing, at worse it will report dumb
information, which should be fine enough for msg_report_wait.  Possibly
we could filter out by addresses of the functions known to perform an
actual system call.

Samuel

>  sysdeps/mach/hurd/x86_64/intr-msg.h | 119 ++++++++++++++++++++++++++++
>  1 file changed, 119 insertions(+)
>  create mode 100644 sysdeps/mach/hurd/x86_64/intr-msg.h
> 
> diff --git a/sysdeps/mach/hurd/x86_64/intr-msg.h b/sysdeps/mach/hurd/x86_64/intr-msg.h
> new file mode 100644
> index 00000000..5d94c85f
> --- /dev/null
> +++ b/sysdeps/mach/hurd/x86_64/intr-msg.h
> @@ -0,0 +1,119 @@
> +/* Machine-dependent details of interruptible RPC messaging.  x86_64 version.
> +   Copyright (C) 1995-2023 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
> +   <https://www.gnu.org/licenses/>.  */
> +
> +
> +/* Note that we must mark OPTION and TIMEOUT as outputs of this operation,
> +   to indicate that the signal thread might mutate them as part
> +   of sending us to a signal handler.  */
> +
> +#define INTR_MSG_TRAP(msg, option, send_size, rcv_size, rcv_name, timeout, notify, cancel_p, intr_port_p) \
> +({									      \
> +  error_t err;								      \
> +  register uintptr_t rcv_size_r10 asm ("r10") = rcv_size;		      \
> +  register uintptr_t rcv_name_r8 asm ("r8") = rcv_name;			      \
> +  register uintptr_t timeout_r9 asm ("r9") = timeout;			      \
> +  asm volatile (							      \
> +       ".globl _hurd_intr_rpc_msg_about_to\n"				      \
> +       ".globl _hurd_intr_rpc_msg_setup_done\n"				      \
> +       ".globl _hurd_intr_rpc_msg_in_trap\n"				      \
> +       /* Clear rax before we do the check for cancel below.  This is to
> +          detect rax being set to non-zero (actually MACH_SEND_INTERRUPTED)
> +          from the outside (namely, _hurdsig_abort_rpcs), which signals us
> +          to skip the trap we were about to enter.  */			      \
> +       "				xor %[err], %[err]\n"		      \
> +       "_hurd_intr_rpc_msg_about_to:"					      \
> +       /* We need to make a last check of cancel, in case we got interrupted
> +          right before _hurd_intr_rpc_msg_about_to.  */			      \
> +       "				cmpl $0, %[cancel]\n"		      \
> +       "				jz _hurd_intr_rpc_msg_do\n"	      \
> +       /* We got interrupted, note so and return EINTR.  */		      \
> +       "				movl $0, %[intr_port]\n"	      \
> +       "				movl %[eintr], %[err]\n"	      \
> +       "				jmp _hurd_intr_rpc_msg_sp_restored\n" \
> +       "_hurd_intr_rpc_msg_do:"						      \
> +       /* Ok, prepare the mach_msg_trap arguments.  We pass the first 6 args
> +          in registers, and push the last one and a fake return address.  */  \
> +       "				pushq %[notify]\n"		      \
> +       "				pushq $0\n"			      \
> +       "_hurd_intr_rpc_msg_setup_done:"					      \
> +       /* From here on, it is safe to make us jump over the syscall.  Now
> +          check if we have been told to skip the syscall while running
> +          the above.  */						      \
> +       "				test %[err], %[err]\n"		      \
> +       "				jnz _hurd_intr_rpc_msg_in_trap\n"     \
> +       /* Do the actual syscall.  */					      \
> +       "				movq $-25, %%rax\n"		      \
> +       "_hurd_intr_rpc_msg_do_trap:	syscall # status in %[err]\n"	      \
> +       "_hurd_intr_rpc_msg_in_trap:"					      \
> +       /* Clean the arguments.  */					      \
> +       "				addq $16, %%rsp\n"		      \
> +       "_hurd_intr_rpc_msg_sp_restored:"				      \
> +       : [err] "=&a" (err), "+S" (option), [intr_port] "=m" (*intr_port_p),   \
> +         "+r" (timeout_r9)						      \
> +       : "D" (msg), "d" (send_size), "r" (rcv_size_r10), "r" (rcv_name_r8),   \
> +         [notify] "rm" ((uintptr_t) notify), [cancel] "m" (*cancel_p),	      \
> +         [eintr] "i" (EINTR)						      \
> +       : "rcx", "r11");							      \
> +  timeout = timeout_r9;							      \
> +  err;									      \
> +})
> +\f
> +#include "hurdfault.h"
> +
> +/* This cannot be an inline function because it calls setjmp.  */
> +#define SYSCALL_EXAMINE(state, callno)					      \
> +({									      \
> +  struct { unsigned char c[2]; } *p = (void *) ((state)->rip - 2);	      \
> +  int result;								      \
> +  if (_hurdsig_catch_memory_fault (p))					      \
> +    return 0;								      \
> +  if (result = p->c[0] == 0xf && p->c[1] == 0x5)			      \
> +    /* The PC appears to be just after a `syscall' instruction.		      \
> +       This is a system call in progress; %rax holds the call number.  */     \
> +    *(callno) = (state)->rax;						      \
> +  _hurdsig_end_catch_fault ();						      \
> +  result;								      \
> +})
> +
> +
> +/* This cannot be an inline function because it calls setjmp.  */
> +#define MSG_EXAMINE(state, msgid, rcvname, send_name, opt, tmout)	      \
> +({									      \
> +  int ret = 0;								      \
> +  const struct machine_thread_state *s = (state);			      \
> +  const mach_msg_header_t *msg = (const void *) s->rdi;			      \
> +  *(rcvname) = s->r8;							      \
> +  *(opt) = s->rsi;							      \
> +  *(tmout) = s->r9;							      \
> +  if (msg == 0)								      \
> +    {									      \
> +      *(send_name) = MACH_PORT_NULL;					      \
> +      *(msgid) = 0;							      \
> +    }									      \
> +  else									      \
> +    {									      \
> +      ret = _hurdsig_catch_memory_fault (msg) ? -1 : 0;			      \
> +      if (ret == 0)							      \
> +        {								      \
> +          *(send_name) = msg->msgh_remote_port;				      \
> +          *(msgid) = msg->msgh_id;					      \
> +          _hurdsig_end_catch_fault ();					      \
> +	}								      \
> +    }									      \
> +  ret;									      \
> +})
> -- 
> 2.39.2
> 

-- 
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [PATCH v2 18.1/34] hurd: Do not declare local variables volatile
  2023-04-03 11:56     ` [PATCH v2 18.1/34] hurd: Do not declare local variables volatile Sergey Bugaev
@ 2023-04-10 18:42       ` Samuel Thibault
  0 siblings, 0 replies; 140+ messages in thread
From: Samuel Thibault @ 2023-04-10 18:42 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: bug-hurd, libc-alpha

Applied, thanks!

Sergey Bugaev, le lun. 03 avril 2023 14:56:20 +0300, a ecrit:
> These are just regular local variables that are not accessed in any
> funny ways, not even though a pointer. There's absolutely no reason to
> declare them volatile. It only ends up hurting the quality of the
> generated machine code.
> 
> If anything, it would make sense to decalre sigsp as *pointing* to
> volatile memory (volatile void *sigsp), but evidently that's not needed
> either.
> 
> Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
> ---
>  hurd/trampoline.c                   | 2 +-
>  sysdeps/mach/hurd/i386/trampoline.c | 4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/hurd/trampoline.c b/hurd/trampoline.c
> index 5bd8dec9..1447b13f 100644
> --- a/hurd/trampoline.c
> +++ b/hurd/trampoline.c
> @@ -29,7 +29,7 @@ struct sigcontext *
>  _hurd_setup_sighandler (struct hurd_sigstate *ss, const struct sigaction *action,
>                          __sighandler_t handler,
>                          int signo, struct hurd_signal_detail *detail,
> -                        volatile int rpc_wait,
> +                        int rpc_wait,
>                          struct machine_thread_all_state *state)
>  {
>  #error "Need to write sysdeps/mach/hurd/MACHINE/trampoline.c"
> diff --git a/sysdeps/mach/hurd/i386/trampoline.c b/sysdeps/mach/hurd/i386/trampoline.c
> index ab67fb9c..9cd60b9c 100644
> --- a/sysdeps/mach/hurd/i386/trampoline.c
> +++ b/sysdeps/mach/hurd/i386/trampoline.c
> @@ -83,13 +83,13 @@ struct sigcontext *
>  _hurd_setup_sighandler (struct hurd_sigstate *ss, const struct sigaction *action,
>  			__sighandler_t handler,
>  			int signo, struct hurd_signal_detail *detail,
> -			volatile int rpc_wait,
> +			int rpc_wait,
>  			struct machine_thread_all_state *state)
>  {
>    void trampoline (void);
>    void rpc_wait_trampoline (void);
>    void firewall (void);
> -  void *volatile sigsp;
> +  void *sigsp;
>    struct sigcontext *scp;
>    struct
>      {
> -- 
> 2.39.2
> 

-- 
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 16/34] hurd: Add sys/ucontext.h and sigcontext.h for x86_64
  2023-03-19 15:09 ` [RFC PATCH glibc 16/34] hurd: Add sys/ucontext.h and sigcontext.h for x86_64 Sergey Bugaev
  2023-04-10 18:39   ` Samuel Thibault
@ 2023-04-10 18:58   ` Samuel Thibault
  2023-04-10 19:13     ` Sergey Bugaev
  1 sibling, 1 reply; 140+ messages in thread
From: Samuel Thibault @ 2023-04-10 18:58 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: libc-alpha, bug-hurd

Sergey Bugaev, le dim. 19 mars 2023 18:09:59 +0300, a ecrit:
> +#ifdef __USE_GNU
> +/* Number of each register in the `gregset_t' array.  */
> +enum
> +{
> +  REG_GSFS = 0,		/* Actually int gs, fs.  */
> +# define REG_GSFS	REG_GSFS
> +  REG_ESDS,		/* Actually int es, ds.  */
> +# define REG_ESDS	REG_ESDS

On second thought, why REG_ESDS? They are basically useless on amd64

Linux packs all segment registers in REG_CSGSFS, probably better to
stuff them the same way? (all three really are 16bit only, even if the
thread_state is padding them to 32bits).

Samuel

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [PATCH v2 18.2/34] hurd: Port trampoline.c to x86_64
  2023-04-03 11:56     ` [PATCH v2 18.2/34] hurd: Port trampoline.c to x86_64 Sergey Bugaev
@ 2023-04-10 19:04       ` Samuel Thibault
  2023-04-10 21:33         ` Sergey Bugaev
  0 siblings, 1 reply; 140+ messages in thread
From: Samuel Thibault @ 2023-04-10 19:04 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: bug-hurd, libc-alpha

This will possibly need to be fixed according to the FSGS regset change.

Sergey Bugaev, le lun. 03 avril 2023 14:56:21 +0300, a ecrit:
> @@ -110,6 +132,10 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, const struct sigaction *action
>  	      ucontext_t *uctxp;            /* Points to uctx, below.  */
>  	    } posix;
>  	};
> +
> +#ifdef __x86_64__
> +      void *_pad;
> +#endif

Please mention what that is for.

Samuel

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 16/34] hurd: Add sys/ucontext.h and sigcontext.h for x86_64
  2023-04-10 18:39   ` Samuel Thibault
@ 2023-04-10 19:07     ` Sergey Bugaev
  2023-04-10 19:21       ` Samuel Thibault
  0 siblings, 1 reply; 140+ messages in thread
From: Sergey Bugaev @ 2023-04-10 19:07 UTC (permalink / raw)
  To: libc-alpha, bug-hurd, Samuel Thibault

On Mon, Apr 10, 2023, 21:39 Samuel Thibault <samuel.thibault@gnu.org> wrote:
>
> Hello,
>
> Applied, thanks!

Yay! Thank you for finding the time to review some more patches!
Here's to hoping that the rest will follow.

> Note that I have pushed sysdeps/mach/hurd/x86_64/sys/ucontext.h to
> sysdeps/x86_64/sys/ucontext.h since it's not mach-specific, and Linux
> has its own for x86.

It's not technically Mach specific, but it's arranged the same way as
Mach's struct i386_thread_state, and code in hurdsig.c relies on this.
If, say, Flavio would have arranged registers differently in gnumach
commit feba9b7b1d88e505feb6579e41dc45e48c264e6f — say, put rdi & rsi
before the r{8..15} gang, like it's done in the 32-bit version — then
ucontext definitions would also have to be different. So while it
could work for any port (provided it doesn't care about the ordering),
putting it into the generic tree underemphasizes why it has to be
arranged this specifically.

But it's up to you, of course.

Sergey

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 16/34] hurd: Add sys/ucontext.h and sigcontext.h for x86_64
  2023-04-10 18:58   ` Samuel Thibault
@ 2023-04-10 19:13     ` Sergey Bugaev
  2023-04-10 19:21       ` Samuel Thibault
  0 siblings, 1 reply; 140+ messages in thread
From: Sergey Bugaev @ 2023-04-10 19:13 UTC (permalink / raw)
  To: Samuel Thibault; +Cc: libc-alpha, bug-hurd

On Mon, Apr 10, 2023 at 9:58 PM Samuel Thibault <samuel.thibault@gnu.org> wrote:
>
> Sergey Bugaev, le dim. 19 mars 2023 18:09:59 +0300, a ecrit:
> > +#ifdef __USE_GNU
> > +/* Number of each register in the `gregset_t' array.  */
> > +enum
> > +{
> > +  REG_GSFS = 0,              /* Actually int gs, fs.  */
> > +# define REG_GSFS    REG_GSFS
> > +  REG_ESDS,          /* Actually int es, ds.  */
> > +# define REG_ESDS    REG_ESDS
>
> On second thought, why REG_ESDS? They are basically useless on amd64
>
> Linux packs all segment registers in REG_CSGSFS, probably better to
> stuff them the same way? (all three really are 16bit only, even if the
> thread_state is padding them to 32bits).

Exactly because that's how they are laid out in struct
i386_thread_state, if you count in 8-byte chunks.

Look at how these REG_* definitions are used in fill_ucontext () in
trampoline.c (that's the one, not hursig.c like my previous message
said).

Sergey

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH 00/34] The rest of the x86_64-gnu port
  2023-03-19 15:09 [RFC PATCH 00/34] The rest of the x86_64-gnu port Sergey Bugaev
                   ` (35 preceding siblings ...)
  2023-04-02 23:30 ` Samuel Thibault
@ 2023-04-10 19:20 ` Samuel Thibault
  2023-04-10 21:24   ` Sergey Bugaev
  36 siblings, 1 reply; 140+ messages in thread
From: Samuel Thibault @ 2023-04-10 19:20 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: libc-alpha, bug-hurd, Luca

Hello,

Sergey Bugaev, le dim. 19 mars 2023 18:09:43 +0300, a ecrit:
> As for sigreturn specifically: I'm concerned about the possibility that
> putting the register dump onto the user's stack (or at %rsp - 128, on x86_64)
> may clobber the data trampoline.c puts there (unless an altstack is used),
> including the very sigcontext.

I guess we could make sure that the offset of ctx in stackframe is not
hit by data written by sigreturn.c.

Samuel

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 16/34] hurd: Add sys/ucontext.h and sigcontext.h for x86_64
  2023-04-10 19:07     ` Sergey Bugaev
@ 2023-04-10 19:21       ` Samuel Thibault
  0 siblings, 0 replies; 140+ messages in thread
From: Samuel Thibault @ 2023-04-10 19:21 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: libc-alpha, bug-hurd

Sergey Bugaev, le lun. 10 avril 2023 22:07:33 +0300, a ecrit:
> On Mon, Apr 10, 2023, 21:39 Samuel Thibault <samuel.thibault@gnu.org> wrote:
> > Note that I have pushed sysdeps/mach/hurd/x86_64/sys/ucontext.h to
> > sysdeps/x86_64/sys/ucontext.h since it's not mach-specific, and Linux
> > has its own for x86.
> 
> It's not technically Mach specific, but it's arranged the same way as
> Mach's struct i386_thread_state,

It doesn't need to be.

> and code in hurdsig.c relies on this.

Yes, but that can surely be changed to fix the mapping?

Samuel

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 16/34] hurd: Add sys/ucontext.h and sigcontext.h for x86_64
  2023-04-10 19:13     ` Sergey Bugaev
@ 2023-04-10 19:21       ` Samuel Thibault
  2023-04-10 21:50         ` Sergey Bugaev
  0 siblings, 1 reply; 140+ messages in thread
From: Samuel Thibault @ 2023-04-10 19:21 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: libc-alpha, bug-hurd

Sergey Bugaev, le lun. 10 avril 2023 22:13:06 +0300, a ecrit:
> On Mon, Apr 10, 2023 at 9:58 PM Samuel Thibault <samuel.thibault@gnu.org> wrote:
> >
> > Sergey Bugaev, le dim. 19 mars 2023 18:09:59 +0300, a ecrit:
> > > +#ifdef __USE_GNU
> > > +/* Number of each register in the `gregset_t' array.  */
> > > +enum
> > > +{
> > > +  REG_GSFS = 0,              /* Actually int gs, fs.  */
> > > +# define REG_GSFS    REG_GSFS
> > > +  REG_ESDS,          /* Actually int es, ds.  */
> > > +# define REG_ESDS    REG_ESDS
> >
> > On second thought, why REG_ESDS? They are basically useless on amd64
> >
> > Linux packs all segment registers in REG_CSGSFS, probably better to
> > stuff them the same way? (all three really are 16bit only, even if the
> > thread_state is padding them to 32bits).
> 
> Exactly because that's how they are laid out in struct
> i386_thread_state, if you count in 8-byte chunks.

But we don't have to map to that.

Samuel

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH 00/34] The rest of the x86_64-gnu port
  2023-04-10 19:20 ` Samuel Thibault
@ 2023-04-10 21:24   ` Sergey Bugaev
  2023-04-10 21:27     ` Samuel Thibault
  0 siblings, 1 reply; 140+ messages in thread
From: Sergey Bugaev @ 2023-04-10 21:24 UTC (permalink / raw)
  To: Samuel Thibault; +Cc: libc-alpha, bug-hurd

On Mon, Apr 10, 2023 at 10:20 PM Samuel Thibault
<samuel.thibault@gnu.org> wrote:
>
> Sergey Bugaev, le dim. 19 mars 2023 18:09:43 +0300, a ecrit:
> > As for sigreturn specifically: I'm concerned about the possibility that
> > putting the register dump onto the user's stack (or at %rsp - 128, on x86_64)
> > may clobber the data trampoline.c puts there (unless an altstack is used),
> > including the very sigcontext.
>
> I guess we could make sure that the offset of ctx in stackframe is not
> hit by data written by sigreturn.c.

Right; it would be easiest to reserve enough space for the register
dump at the end of 'struct stackframe', i.e. right after the user's
stack.

Sergey

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 23/34] elf: Stop including tls.h in ldsodefs.h
  2023-03-19 15:10 ` [RFC PATCH glibc 23/34] elf: Stop including tls.h in ldsodefs.h Sergey Bugaev
  2023-04-02 23:20   ` Samuel Thibault
@ 2023-04-10 21:26   ` Samuel Thibault
  1 sibling, 0 replies; 140+ messages in thread
From: Samuel Thibault @ 2023-04-10 21:26 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: libc-alpha, bug-hurd

Applied, thanks!

Sergey Bugaev, le dim. 19 mars 2023 18:10:06 +0300, a ecrit:
> Nothing in there needs tls.h
> 
> Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
> ---
>  sysdeps/generic/ldsodefs.h | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h
> index c99dad77..5f21bc63 100644
> --- a/sysdeps/generic/ldsodefs.h
> +++ b/sysdeps/generic/ldsodefs.h
> @@ -38,7 +38,6 @@
>  #include <dl-fixup-attribute.h>
>  #include <libc-lock.h>
>  #include <hp-timing.h>
> -#include <tls.h>
>  #include <list_t.h>
>  
>  __BEGIN_DECLS
> -- 
> 2.39.2
> 

-- 
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH 00/34] The rest of the x86_64-gnu port
  2023-04-10 21:24   ` Sergey Bugaev
@ 2023-04-10 21:27     ` Samuel Thibault
  0 siblings, 0 replies; 140+ messages in thread
From: Samuel Thibault @ 2023-04-10 21:27 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: libc-alpha, bug-hurd

Sergey Bugaev, le mar. 11 avril 2023 00:24:55 +0300, a ecrit:
> On Mon, Apr 10, 2023 at 10:20 PM Samuel Thibault
> <samuel.thibault@gnu.org> wrote:
> >
> > Sergey Bugaev, le dim. 19 mars 2023 18:09:43 +0300, a ecrit:
> > > As for sigreturn specifically: I'm concerned about the possibility that
> > > putting the register dump onto the user's stack (or at %rsp - 128, on x86_64)
> > > may clobber the data trampoline.c puts there (unless an altstack is used),
> > > including the very sigcontext.
> >
> > I guess we could make sure that the offset of ctx in stackframe is not
> > hit by data written by sigreturn.c.
> 
> Right; it would be easiest to reserve enough space for the register
> dump at the end of 'struct stackframe', i.e. right after the user's
> stack.

Indeed.

Samuel

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [PATCH v2 18.2/34] hurd: Port trampoline.c to x86_64
  2023-04-10 19:04       ` Samuel Thibault
@ 2023-04-10 21:33         ` Sergey Bugaev
  0 siblings, 0 replies; 140+ messages in thread
From: Sergey Bugaev @ 2023-04-10 21:33 UTC (permalink / raw)
  To: Samuel Thibault; +Cc: bug-hurd, libc-alpha

On Mon, Apr 10, 2023 at 10:04 PM Samuel Thibault
<samuel.thibault@gnu.org> wrote:
> Sergey Bugaev, le lun. 03 avril 2023 14:56:21 +0300, a ecrit:
> > @@ -110,6 +132,10 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, const struct sigaction *action
> >             ucontext_t *uctxp;            /* Points to uctx, below.  */
> >           } posix;
> >       };
> > +
> > +#ifdef __x86_64__
> > +      void *_pad;
> > +#endif
>
> Please mention what that is for.

This is to make sigreturn_addr 16-byte aligned (and this is verified
by the static assert below). Our %rsp points right here at
&sigreturn_addr when we call the user's signal handler (and then
sigreturn, except we ret to it instead of call'ing it, but either way
it's pushing or popping 8 bytes), and it needs to be 16-byte aligned
before a function call per the x86_64 ABI. You're right that another
comment next to _pad itself wouldn't hurt.

Sergey

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 24/34] hurd: Only check for TLS initialization inside rtld or in static builds
  2023-03-19 15:10 ` [RFC PATCH glibc 24/34] hurd: Only check for TLS initialization inside rtld or in static builds Sergey Bugaev
@ 2023-04-10 21:33   ` Samuel Thibault
  2023-04-11 18:57   ` Samuel Thibault
  2023-04-14 17:34   ` Samuel Thibault
  2 siblings, 0 replies; 140+ messages in thread
From: Samuel Thibault @ 2023-04-10 21:33 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: libc-alpha, bug-hurd

Applied, thanks!

Sergey Bugaev, le dim. 19 mars 2023 18:10:07 +0300, a ecrit:
> When glibc is built as a shared library, TLS is always initialized by
> the call of TLS_INIT_TP () macro made inside the dynamic loader, prior
> to running the main program (see dl-call_tls_init_tp.h). We can take
> advantage of this: we know for sure that __LIBC_NO_TLS () will evaluate
> to 0 in all other cases, so let the compiler know that explicitly too.
> 
> Also, only define _hurd_tls_init () and TLS_INIT_TP () under the same
> conditions (either !SHARED or inside rtld), to statically assert that
> this is the case.
> 
> Other than a microoptimization, this also helps with avoiding awkward
> sharing of the __libc_tls_initialized variable between ld.so and libc.so
> that we would have to do otherwise -- we know for sure that no sharing
> is required, simply because __libc_tls_initialized would always be set
> to true inside libc.so.
> 
> Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
> ---
>  sysdeps/mach/hurd/Makefile                    |  4 ++
>  sysdeps/mach/hurd/i386/dl-tls-initialized.c   | 21 +++++++++
>  sysdeps/mach/hurd/i386/tls.h                  | 43 +++++++++++--------
>  sysdeps/mach/hurd/x86/init-first.c            | 11 +----
>  sysdeps/mach/hurd/x86_64/dl-tls-initialized.c | 21 +++++++++
>  sysdeps/mach/hurd/x86_64/tls.h                | 19 +++++---
>  6 files changed, 85 insertions(+), 34 deletions(-)
>  create mode 100644 sysdeps/mach/hurd/i386/dl-tls-initialized.c
>  create mode 100644 sysdeps/mach/hurd/x86_64/dl-tls-initialized.c
> 
> diff --git a/sysdeps/mach/hurd/Makefile b/sysdeps/mach/hurd/Makefile
> index d5584930..f43e92ba 100644
> --- a/sysdeps/mach/hurd/Makefile
> +++ b/sysdeps/mach/hurd/Makefile
> @@ -197,6 +197,10 @@ ifeq (hurd, $(subdir))
>  sysdep_routines += cthreads
>  endif
>  
> +ifeq (elf, $(subdir))
> +sysdep-dl-routines += dl-tls-initialized
> +endif
> +
>  ifeq (io, $(subdir))
>  sysdep_routines += f_setlk close_nocancel close_nocancel_nostatus \
>  		   fcntl_nocancel open_nocancel openat_nocancel read_nocancel \
> diff --git a/sysdeps/mach/hurd/i386/dl-tls-initialized.c b/sysdeps/mach/hurd/i386/dl-tls-initialized.c
> new file mode 100644
> index 00000000..493ec239
> --- /dev/null
> +++ b/sysdeps/mach/hurd/i386/dl-tls-initialized.c
> @@ -0,0 +1,21 @@
> +/* Determine whether TLS is initialized, for i386/Hurd.
> +   Copyright (C) 1995-2023 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
> +   <https://www.gnu.org/licenses/>.  */
> +
> +#ifndef SHARED
> +unsigned short __init1_desc;
> +#endif
> diff --git a/sysdeps/mach/hurd/i386/tls.h b/sysdeps/mach/hurd/i386/tls.h
> index 0f8dd241..ee7b8004 100644
> --- a/sysdeps/mach/hurd/i386/tls.h
> +++ b/sysdeps/mach/hurd/i386/tls.h
> @@ -69,18 +69,6 @@ _Static_assert (offsetof (tcbhead_t, __private_ss) == 0x30,
>                    |  (desc->high_word & 0xff000000));			      \
>    })
>  
> -/* Return 1 if TLS is not initialized yet.  */
> -#ifndef SHARED
> -extern unsigned short __init1_desc;
> -#define __HURD_DESC_INITIAL(gs, ds) ((gs) == (ds) || (gs) == __init1_desc)
> -#else
> -#define __HURD_DESC_INITIAL(gs, ds) ((gs) == (ds))
> -#endif
> -
> -#define __LIBC_NO_TLS()							      \
> -  ({ unsigned short ds, gs;						      \
> -     asm ("movw %%ds,%w0; movw %%gs,%w1" : "=q" (ds), "=q" (gs));	      \
> -     __builtin_expect(__HURD_DESC_INITIAL(gs, ds), 0); })
>  #endif
>  
>  /* The TCB can have any size and the memory following the address the
> @@ -125,6 +113,28 @@ extern unsigned short __init1_desc;
>  
>  # define HURD_SEL_LDT(sel) (__builtin_expect ((sel) & 4, 0))
>  
> +#ifndef SHARED
> +extern unsigned short __init1_desc;
> +# define __HURD_DESC_INITIAL(gs, ds) ((gs) == (ds) || (gs) == __init1_desc)
> +#else
> +# define __HURD_DESC_INITIAL(gs, ds) ((gs) == (ds))
> +#endif
> +
> +#if !defined (SHARED) || IS_IN (rtld)
> +/* Return 1 if TLS is not initialized yet.  */
> +extern inline bool __attribute__ ((unused))
> +__LIBC_NO_TLS (void)
> +{
> +  unsigned short ds, gs;
> +  asm ("movw %%ds, %w0\n"
> +       "movw %%gs, %w1"
> +       : "=q" (ds), "=q" (gs));
> +  return __glibc_unlikely (__HURD_DESC_INITIAL (gs, ds));
> +}
> +
> +/* Code to initially initialize the thread pointer.  This might need
> +   special attention since 'errno' is not yet available and if the
> +   operation can cause a failure 'errno' must not be touched.  */
>  static inline bool __attribute__ ((unused))
>  _hurd_tls_init (tcbhead_t *tcb)
>  {
> @@ -168,11 +178,10 @@ out:
>    return success;
>  }
>  
> -/* Code to initially initialize the thread pointer.  This might need
> -   special attention since 'errno' is not yet available and if the
> -   operation can cause a failure 'errno' must not be touched.  */
> -# define TLS_INIT_TP(descr) \
> -    _hurd_tls_init ((tcbhead_t *) (descr))
> +# define TLS_INIT_TP(descr) _hurd_tls_init ((tcbhead_t *) (descr))
> +#else /* defined (SHARED) && !IS_IN (rtld) */
> +# define __LIBC_NO_TLS() 0
> +#endif
>  
>  # if __GNUC_PREREQ (6, 0)
>  
> diff --git a/sysdeps/mach/hurd/x86/init-first.c b/sysdeps/mach/hurd/x86/init-first.c
> index 48c330ec..89a5f44c 100644
> --- a/sysdeps/mach/hurd/x86/init-first.c
> +++ b/sysdeps/mach/hurd/x86/init-first.c
> @@ -40,13 +40,6 @@ extern char **_dl_argv;
>  
>  #ifndef SHARED
>  static tcbhead_t __init1_tcbhead;
> -# ifndef __x86_64__
> -unsigned short __init1_desc;
> -# endif
> -#endif
> -
> -#ifdef __x86_64__
> -unsigned char __libc_tls_initialized;
>  #endif
>  
>  /* Things that want to be run before _hurd_init or much anything else.
> @@ -166,9 +159,7 @@ first_init (void)
>    _hurd_tls_init (&__init1_tcbhead);
>  
>    /* Make sure __LIBC_NO_TLS () keeps evaluating to 1.  */
> -# ifdef __x86_64__
> -  __libc_tls_initialized = 0;
> -# else
> +# ifndef __x86_64__
>    asm ("movw %%gs,%w0" : "=m" (__init1_desc));
>  # endif
>  #endif
> diff --git a/sysdeps/mach/hurd/x86_64/dl-tls-initialized.c b/sysdeps/mach/hurd/x86_64/dl-tls-initialized.c
> new file mode 100644
> index 00000000..d0766f95
> --- /dev/null
> +++ b/sysdeps/mach/hurd/x86_64/dl-tls-initialized.c
> @@ -0,0 +1,21 @@
> +/* Determine whether TLS is initialized, for x86_64/Hurd.
> +   Copyright (C) 1995-2023 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
> +   <https://www.gnu.org/licenses/>.  */
> +
> +#if !defined (SHARED) || IS_IN (rtld)
> +unsigned short __libc_tls_initialized;
> +#endif
> diff --git a/sysdeps/mach/hurd/x86_64/tls.h b/sysdeps/mach/hurd/x86_64/tls.h
> index cf74e1f4..da504d9c 100644
> --- a/sysdeps/mach/hurd/x86_64/tls.h
> +++ b/sysdeps/mach/hurd/x86_64/tls.h
> @@ -68,10 +68,6 @@ _Static_assert (offsetof (tcbhead_t, stack_guard) == 0x28,
>  _Static_assert (offsetof (tcbhead_t, __private_ss) == 0x70,
>                  "split stack pointer offset");
>  
> -extern unsigned char __libc_tls_initialized;
> -
> -# define __LIBC_NO_TLS() __builtin_expect (!__libc_tls_initialized, 0)
> -
>  /* The TCB can have any size and the memory following the address the
>     thread pointer points to is unspecified.  Allocate the TCB there.  */
>  # define TLS_TCB_AT_TP	1
> @@ -87,8 +83,6 @@ extern unsigned char __libc_tls_initialized;
>  # define TCB_ALIGNMENT	64
>  
>  
> -# define TLS_INIT_TP(descr) _hurd_tls_init ((tcbhead_t *) (descr))
> -
>  # define THREAD_SELF							\
>    (*(tcbhead_t * __seg_fs *) offsetof (tcbhead_t, tcb))
>  /* Read member of the thread descriptor directly.  */
> @@ -174,6 +168,10 @@ _hurd_tls_new (thread_t child, tcbhead_t *tcb)
>                               i386_FSGS_BASE_STATE_COUNT);
>  }
>  
> +# if !defined (SHARED) || IS_IN (rtld)
> +extern unsigned char __libc_tls_initialized;
> +#  define __LIBC_NO_TLS() __builtin_expect (!__libc_tls_initialized, 0)
> +
>  static inline bool __attribute__ ((unused))
>  _hurd_tls_init (tcbhead_t *tcb)
>  {
> @@ -184,11 +182,18 @@ _hurd_tls_init (tcbhead_t *tcb)
>    tcb->multiple_threads = 1;
>  
>    err = _hurd_tls_new (self, tcb);
> +  if (err == 0)
> +    __libc_tls_initialized = 1;
>    __mach_port_deallocate (__mach_task_self (), self);
> -  __libc_tls_initialized = 1;
>    return err == 0;
>  }
>  
> +#  define TLS_INIT_TP(descr) _hurd_tls_init ((tcbhead_t *) (descr))
> +# else /* defined (SHARED) && !IS_IN (rtld) */
> +#  define __LIBC_NO_TLS() 0
> +# endif
> +
> +
>  
>  /* Global scope switch support.  */
>  # define THREAD_GSCOPE_FLAG_UNUSED 0
> -- 
> 2.39.2
> 

-- 
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 16/34] hurd: Add sys/ucontext.h and sigcontext.h for x86_64
  2023-04-10 19:21       ` Samuel Thibault
@ 2023-04-10 21:50         ` Sergey Bugaev
  2023-04-10 22:23           ` Samuel Thibault
  0 siblings, 1 reply; 140+ messages in thread
From: Sergey Bugaev @ 2023-04-10 21:50 UTC (permalink / raw)
  To: Samuel Thibault; +Cc: libc-alpha, bug-hurd

On Mon, Apr 10, 2023 at 10:22 PM Samuel Thibault
<samuel.thibault@gnu.org> wrote:
>
> Sergey Bugaev, le lun. 10 avril 2023 22:13:06 +0300, a ecrit:
> > On Mon, Apr 10, 2023 at 9:58 PM Samuel Thibault <samuel.thibault@gnu.org> wrote:
> > >
> > > Sergey Bugaev, le dim. 19 mars 2023 18:09:59 +0300, a ecrit:
> > > > +#ifdef __USE_GNU
> > > > +/* Number of each register in the `gregset_t' array.  */
> > > > +enum
> > > > +{
> > > > +  REG_GSFS = 0,              /* Actually int gs, fs.  */
> > > > +# define REG_GSFS    REG_GSFS
> > > > +  REG_ESDS,          /* Actually int es, ds.  */
> > > > +# define REG_ESDS    REG_ESDS
> > >
> > > On second thought, why REG_ESDS? They are basically useless on amd64
> > >
> > > Linux packs all segment registers in REG_CSGSFS, probably better to
> > > stuff them the same way? (all three really are 16bit only, even if the
> > > thread_state is padding them to 32bits).
> >
> > Exactly because that's how they are laid out in struct
> > i386_thread_state, if you count in 8-byte chunks.
>
> But we don't have to map to that.

Well yes, I was trying to make the x86_64 version do the same thing as
i386 does, hence arranging registers in sigcontext, ucontext, and
thread state in the same way, so they can be memcpied, like on i386.
But we could also lay this out differently and just write some more
code to fill the ucontext.

Sergey

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 25/34] hurd: Improve reply port handling when exiting signal handlers
  2023-03-19 15:10 ` [RFC PATCH glibc 25/34] hurd: Improve reply port handling when exiting signal handlers Sergey Bugaev
@ 2023-04-10 22:03   ` Samuel Thibault
  2023-04-11  7:44     ` Sergey Bugaev
  2023-04-12 22:54   ` Samuel Thibault
  1 sibling, 1 reply; 140+ messages in thread
From: Samuel Thibault @ 2023-04-10 22:03 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: libc-alpha, bug-hurd

Applied, thanks!

Sergey Bugaev, le dim. 19 mars 2023 18:10:08 +0300, a ecrit:
> NOTE: I don't really understand why sigunwind wants to destroy both its
> current reply port and user's reply port. Prior to commit
> fb304035c41c7ee2afede51e5e8568974549ba5e, it was *restoring* the user's
> reply port, in which case it actually made sense to destroy the current
> reply port. Post-fb304035c41c7ee2afede51e5e8568974549ba5e, wouldn't it
> be better to just keep using the current reply port, destroying the
> user's one?

We could try that, yes.

I tend to be very cautious with reply port reuse since it can confuse
servers a lot when e.g. interrupted, so it's generally safer not to try
to reuse them.

>  hurd/sigunwind.c                   | 24 +++++++++++-------------
>  sysdeps/mach/hurd/i386/sigreturn.c | 21 +++++----------------
>  2 files changed, 16 insertions(+), 29 deletions(-)
> 
> diff --git a/hurd/sigunwind.c b/hurd/sigunwind.c
> index edd40b14..399e6900 100644
> --- a/hurd/sigunwind.c
> +++ b/hurd/sigunwind.c
> @@ -18,7 +18,6 @@
>  
>  #include <hurd.h>
>  #include <thread_state.h>
> -#include <hurd/threadvar.h>
>  #include <jmpbuf-unwind.h>
>  #include <assert.h>
>  #include <stdint.h>
> @@ -39,19 +38,18 @@ _hurdsig_longjmp_from_handler (void *data, jmp_buf env, int val)
>      {
>        /* Destroy the MiG reply port used by the signal handler, and restore
>  	 the reply port in use by the thread when interrupted.  */
> -      mach_port_t *reply_port = &__hurd_local_reply_port;
> -      if (*reply_port)
> -	{
> -	  mach_port_t port = *reply_port;
> -	  /* Assigning MACH_PORT_DEAD here tells libc's mig_get_reply_port
> -	     not to get another reply port, but avoids mig_dealloc_reply_port
> -	     trying to deallocate it after the receive fails (which it will,
> -	     because the reply port will be bogus, regardless).  */
> -	  *reply_port = MACH_PORT_DEAD;
> -	  __mach_port_destroy (__mach_task_self (), port);
> -	}
> +      mach_port_t reply_port = THREAD_GETMEM (THREAD_SELF, reply_port);
> +      /* Assigning MACH_PORT_DEAD here tells libc's mig_get_reply_port not to
> +         get another reply port, but avoids mig_dealloc_reply_port trying to
> +         deallocate it after the receive fails (which it will, because the
> +         reply port will be bogus, regardless).  */
> +      THREAD_SETMEM (THREAD_SELF, reply_port, MACH_PORT_DEAD);
> +      if (MACH_PORT_VALID (reply_port))
> +        __mach_port_mod_refs (__mach_task_self (), reply_port,
> +                              MACH_PORT_RIGHT_RECEIVE, -1);
>        if (scp->sc_reply_port)
> -	__mach_port_destroy (__mach_task_self (), scp->sc_reply_port);
> +        __mach_port_mod_refs (__mach_task_self (), scp->sc_reply_port,
> +                              MACH_PORT_RIGHT_RECEIVE, -1);
>      }
>  
>    __spin_lock (&ss->lock);
> diff --git a/sysdeps/mach/hurd/i386/sigreturn.c b/sysdeps/mach/hurd/i386/sigreturn.c
> index db1a01f3..29c9629f 100644
> --- a/sysdeps/mach/hurd/i386/sigreturn.c
> +++ b/sysdeps/mach/hurd/i386/sigreturn.c
> @@ -19,7 +19,6 @@ register int *sp asm ("%esp");
>  
>  #include <hurd.h>
>  #include <hurd/signal.h>
> -#include <hurd/threadvar.h>
>  #include <hurd/msg.h>
>  #include <stdlib.h>
>  #include <string.h>
> @@ -59,7 +58,7 @@ __sigreturn (struct sigcontext *scp)
>  {
>    struct hurd_sigstate *ss;
>    struct hurd_userlink *link = (void *) &scp[1];
> -  mach_port_t *reply_port;
> +  mach_port_t reply_port;
>  
>    if (scp == NULL || (scp->sc_mask & _SIG_CANT_MASK))
>      {
> @@ -101,20 +100,10 @@ __sigreturn (struct sigcontext *scp)
>  
>    /* Destroy the MiG reply port used by the signal handler, and restore the
>       reply port in use by the thread when interrupted.  */
> -  reply_port = &__hurd_local_reply_port;
> -  if (*reply_port)
> -    {
> -      mach_port_t port = *reply_port;
> -
> -      /* Assigning MACH_PORT_DEAD here tells libc's mig_get_reply_port not to
> -	 get another reply port, but avoids mig_dealloc_reply_port trying to
> -	 deallocate it after the receive fails (which it will, because the
> -	 reply port will be bogus, whether we do this or not).  */
> -      *reply_port = MACH_PORT_DEAD;
> -
> -      __mach_port_destroy (__mach_task_self (), port);
> -    }
> -  *reply_port = scp->sc_reply_port;
> +  reply_port = THREAD_GETMEM (THREAD_SELF, reply_port);
> +  THREAD_SETMEM (THREAD_SELF, reply_port, scp->sc_reply_port);
> +  __mach_port_mod_refs (__mach_task_self (), reply_port,
> +                        MACH_PORT_RIGHT_RECEIVE, -1);
>  
>    if (scp->sc_fpused)
>      /* Restore the FPU state.  Mach conveniently stores the state
> -- 
> 2.39.2
> 

-- 
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 26/34] hurd: Remove __hurd_local_reply_port
  2023-03-19 15:10 ` [RFC PATCH glibc 26/34] hurd: Remove __hurd_local_reply_port Sergey Bugaev
@ 2023-04-10 22:07   ` Samuel Thibault
  2023-04-10 22:35     ` Samuel Thibault
  2023-04-11  8:00     ` Sergey Bugaev
  0 siblings, 2 replies; 140+ messages in thread
From: Samuel Thibault @ 2023-04-10 22:07 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: libc-alpha, bug-hurd

Sergey Bugaev, le dim. 19 mars 2023 18:10:09 +0300, a ecrit:
>  /* Called by MiG to deallocate the reply port.  */
>  void
> -__mig_dealloc_reply_port (mach_port_t arg)
> +__mig_dealloc_reply_port (mach_port_t port)
>  {
> -  mach_port_t port = __hurd_local_reply_port;
> -  __hurd_local_reply_port = MACH_PORT_NULL;	/* So the mod_refs RPC won't use it.  */
> +  set_reply_port (MACH_PORT_NULL);	/* So the mod_refs RPC won't use it.  */
>  
>    if (MACH_PORT_VALID (port))
>      __mach_port_mod_refs (__mach_task_self (), port,

I believe we still want to use

 mach_port_t port = get_reply_port();

because the caller might not know whether its port is still valid
or not, e.g. when a signal interrupted the RPC and thus we had to
deallocate the reply port to make sure the server doesn't get confused.
In that case the caller will still have the old reply port name, which
we don't want to reallocate since it might already have been reused for
something else.

Samuel

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 16/34] hurd: Add sys/ucontext.h and sigcontext.h for x86_64
  2023-04-10 21:50         ` Sergey Bugaev
@ 2023-04-10 22:23           ` Samuel Thibault
  0 siblings, 0 replies; 140+ messages in thread
From: Samuel Thibault @ 2023-04-10 22:23 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: libc-alpha, bug-hurd

Sergey Bugaev, le mar. 11 avril 2023 00:50:25 +0300, a ecrit:
> On Mon, Apr 10, 2023 at 10:22 PM Samuel Thibault
> <samuel.thibault@gnu.org> wrote:
> >
> > Sergey Bugaev, le lun. 10 avril 2023 22:13:06 +0300, a ecrit:
> > > On Mon, Apr 10, 2023 at 9:58 PM Samuel Thibault <samuel.thibault@gnu.org> wrote:
> > > >
> > > > Sergey Bugaev, le dim. 19 mars 2023 18:09:59 +0300, a ecrit:
> > > > > +#ifdef __USE_GNU
> > > > > +/* Number of each register in the `gregset_t' array.  */
> > > > > +enum
> > > > > +{
> > > > > +  REG_GSFS = 0,              /* Actually int gs, fs.  */
> > > > > +# define REG_GSFS    REG_GSFS
> > > > > +  REG_ESDS,          /* Actually int es, ds.  */
> > > > > +# define REG_ESDS    REG_ESDS
> > > >
> > > > On second thought, why REG_ESDS? They are basically useless on amd64
> > > >
> > > > Linux packs all segment registers in REG_CSGSFS, probably better to
> > > > stuff them the same way? (all three really are 16bit only, even if the
> > > > thread_state is padding them to 32bits).
> > >
> > > Exactly because that's how they are laid out in struct
> > > i386_thread_state, if you count in 8-byte chunks.
> >
> > But we don't have to map to that.
> 
> Well yes, I was trying to make the x86_64 version do the same thing as
> i386 does, hence arranging registers in sigcontext, ucontext, and
> thread state in the same way, so they can be memcpied, like on i386.

Ah, but on i386 it's only coincidence that it's the same layout, just
because that's the pusha layourt :)

> But we could also lay this out differently and just write some more
> code to fill the ucontext.

I'd say better stick to some sane layout that makes it simpler for most
uses. We don't have to stick to the Linux layout either.

Samuel

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 27/34] hurd: Don't leak __hurd_reply_port0
  2023-03-19 15:10 ` [RFC PATCH glibc 27/34] hurd: Don't leak __hurd_reply_port0 Sergey Bugaev
@ 2023-04-10 22:25   ` Samuel Thibault
  0 siblings, 0 replies; 140+ messages in thread
From: Samuel Thibault @ 2023-04-10 22:25 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: libc-alpha, bug-hurd

Applied, thanks!

Sergey Bugaev, le dim. 19 mars 2023 18:10:10 +0300, a ecrit:
> Previously, once we set up TLS, we would implicitly switch from using
> __hurd_reply_port0 to reply_port inside the TCB, leaving the former
> unused. But we never deallocated it, so it got leaked.
> 
> Instead, migrate the port into the new TCB's reply_port slot. This
> avoids both the port leak and an extra syscall to create a new reply
> port for the TCB.
> 
> Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
> ---
>  sysdeps/mach/hurd/i386/tls.h   | 5 +++++
>  sysdeps/mach/hurd/x86_64/tls.h | 9 ++++++++-
>  2 files changed, 13 insertions(+), 1 deletion(-)
> 
> diff --git a/sysdeps/mach/hurd/i386/tls.h b/sysdeps/mach/hurd/i386/tls.h
> index ee7b8004..0ac8917a 100644
> --- a/sysdeps/mach/hurd/i386/tls.h
> +++ b/sysdeps/mach/hurd/i386/tls.h
> @@ -141,12 +141,15 @@ _hurd_tls_init (tcbhead_t *tcb)
>    HURD_TLS_DESC_DECL (desc, tcb);
>    thread_t self = __mach_thread_self ();
>    bool success = true;
> +  extern mach_port_t __hurd_reply_port0;
>  
>    /* This field is used by TLS accesses to get our "thread pointer"
>       from the TLS point of view.  */
>    tcb->tcb = tcb;
>    /* We always at least start the sigthread anyway.  */
>    tcb->multiple_threads = 1;
> +  /* Take over the reply port we've been using.  */
> +  tcb->reply_port = __hurd_reply_port0;
>  
>    /* Get the first available selector.  */
>    int sel = -1;
> @@ -172,6 +175,8 @@ _hurd_tls_init (tcbhead_t *tcb)
>  
>    /* Now install the new selector.  */
>    asm volatile ("mov %w0, %%gs" :: "q" (sel));
> +  /* This port is now owned by the TCB.  */
> +  __hurd_reply_port0 = MACH_PORT_NULL;
>  
>  out:
>    __mach_port_deallocate (__mach_task_self (), self);
> diff --git a/sysdeps/mach/hurd/x86_64/tls.h b/sysdeps/mach/hurd/x86_64/tls.h
> index da504d9c..2b7135f6 100644
> --- a/sysdeps/mach/hurd/x86_64/tls.h
> +++ b/sysdeps/mach/hurd/x86_64/tls.h
> @@ -177,13 +177,20 @@ _hurd_tls_init (tcbhead_t *tcb)
>  {
>    error_t err;
>    thread_t self = __mach_thread_self ();
> +  extern mach_port_t __hurd_reply_port0;
>  
>    /* We always at least start the sigthread anyway.  */
>    tcb->multiple_threads = 1;
> +  /* Take over the reply port we've been using.  */
> +  tcb->reply_port = __hurd_reply_port0;
>  
>    err = _hurd_tls_new (self, tcb);
>    if (err == 0)
> -    __libc_tls_initialized = 1;
> +    {
> +      __libc_tls_initialized = 1;
> +      /* This port is now owned by the TCB.  */
> +      __hurd_reply_port0 = MACH_PORT_NULL;
> +    }
>    __mach_port_deallocate (__mach_task_self (), self);
>    return err == 0;
>  }
> -- 
> 2.39.2
> 

-- 
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 26/34] hurd: Remove __hurd_local_reply_port
  2023-04-10 22:07   ` Samuel Thibault
@ 2023-04-10 22:35     ` Samuel Thibault
  2023-04-11  8:00     ` Sergey Bugaev
  1 sibling, 0 replies; 140+ messages in thread
From: Samuel Thibault @ 2023-04-10 22:35 UTC (permalink / raw)
  To: Sergey Bugaev, libc-alpha, bug-hurd

Samuel Thibault, le mar. 11 avril 2023 00:07:43 +0200, a ecrit:
> Sergey Bugaev, le dim. 19 mars 2023 18:10:09 +0300, a ecrit:
> >  /* Called by MiG to deallocate the reply port.  */
> >  void
> > -__mig_dealloc_reply_port (mach_port_t arg)
> > +__mig_dealloc_reply_port (mach_port_t port)
> >  {
> > -  mach_port_t port = __hurd_local_reply_port;
> > -  __hurd_local_reply_port = MACH_PORT_NULL;	/* So the mod_refs RPC won't use it.  */
> > +  set_reply_port (MACH_PORT_NULL);	/* So the mod_refs RPC won't use it.  */
> >  
> >    if (MACH_PORT_VALID (port))
> >      __mach_port_mod_refs (__mach_task_self (), port,
> 
> I believe we still want to use
> 
>  mach_port_t port = get_reply_port();
> 
> because the caller might not know whether its port is still valid
> or not, e.g. when a signal interrupted the RPC and thus we had to
> deallocate the reply port to make sure the server doesn't get confused.
> In that case the caller will still have the old reply port name, which
> we don't want to reallocate since it might already have been reused for

                   deallocate

> something else.

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH gnumach 03/34] Make exception subcode a long
  2023-04-06  2:11       ` Flávio Cruz
@ 2023-04-10 23:52         ` Samuel Thibault
  0 siblings, 0 replies; 140+ messages in thread
From: Samuel Thibault @ 2023-04-10 23:52 UTC (permalink / raw)
  To: Flávio Cruz; +Cc: Sergey Bugaev, libc-alpha, bug-hurd, Luca

Hello,

Flávio Cruz, le mer. 05 avril 2023 22:11:38 -0400, a ecrit:
> On Mon, Apr 3, 2023 at 5:32 AM Sergey Bugaev via Libc-alpha <[1]
> libc-alpha@sourceware.org> wrote:
> 
>     On Mon, Apr 3, 2023 at 1:45 AM Samuel Thibault <[2]samuel.thibault@gnu.org>
>     wrote:
>     > Sergey Bugaev, le dim. 19 mars 2023 18:09:46 +0300, a ecrit:
>     > > On EXC_BAD_ACCESS, exception subcode is used to pass the faulting
>     memory
>     > > address, so it needs to be (at least) pointer-sized. Thus, make it into
>     > > a long.
>     > >
>     > > This requires matching changes in glibc and the Hurd.
>     >
>     > But the change doesn't affect 32bit glibc and hurd since
>     > rpc_long_integer_t is really like integer_t there, right?
> 
>     It's supposed to be ABI-compatible on 32-bit, since all these types
>     are 32-bit integers there, yes. (But maybe I messed up, do check!)
> 
>     But it may break source-level compatibility (if you only apply the
>     Mach change but not glibc, or vice versa); as in maybe GCC will
>     complain about int vs long in function prototype vs definition. I
>     haven't actually checked, since I have both changes applied locally.
> 
> 
> It breaks compatibility for Hurd code:
> 
> hurd/mach-defpager/default_pager.c:3789:1: error: conflicting types for
> 'catch_exception_raise'; have 'kern_return_t(mach_port_t, mach_port_t,
> mach_port_t, int, int, int)' {aka 'int(unsigned int, unsigned int, unsigned
> int, int, int, int)'}
> 3789 | catch_exception_raise(mach_port_t exception_port,
> | ^~~~~~~~~~~~~~~~~~~~~
> In file included from /home/runner/_work/cross-hurd/cross-hurd/src/hurd/
> mach-defpager/default_pager.c:67:
> ./exc_S.h:19:15: note: previous declaration of 'catch_exception_raise' with
> type 'kern_return_t(mach_port_t, mach_port_t, mach_port_t, integer_t,
> integer_t, rpc_long_integer_t)' {aka 'int(unsigned int, unsigned int, unsigned
> int, int, int, long int)'}
> 19 | kern_return_t catch_exception_raise

I have uploaded the fixes as debian packages, in addition to the commits
upstream.

Samuel

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 25/34] hurd: Improve reply port handling when exiting signal handlers
  2023-04-10 22:03   ` Samuel Thibault
@ 2023-04-11  7:44     ` Sergey Bugaev
  2023-04-11 20:15       ` Samuel Thibault
  0 siblings, 1 reply; 140+ messages in thread
From: Sergey Bugaev @ 2023-04-11  7:44 UTC (permalink / raw)
  To: Samuel Thibault; +Cc: libc-alpha, bug-hurd

On Tue, Apr 11, 2023 at 1:03 AM Samuel Thibault <samuel.thibault@gnu.org> wrote:
> I tend to be very cautious with reply port reuse since it can confuse
> servers a lot when e.g. interrupted, so it's generally safer not to try
> to reuse them.

Huh? Confuse how?

For one thing, the servers are unable to even tell if two send-once
rights point to the same port (which is actually something that I'd
very much like to change, since it would greatly benefit rpctrace, but
that's a topic that deserves its own wall-of-text email). The servers
can still notice if their send-once right dies though.

If a call has been interrupted and we have not received a reply (EINTR
or not), we surely must destroy the reply port used, if only for
security reasons (so a malicious server won't be able to inject a fake
reply to some other RPC we make later). But I don't see a reason to
destroy the *current* reply port, the one used during signal handling,
which we're longjumping out of. On the other hand it doesn't hurt much
either, and signal handling is a slow path anyway, so we may just play
it safe.

Sergey

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 26/34] hurd: Remove __hurd_local_reply_port
  2023-04-10 22:07   ` Samuel Thibault
  2023-04-10 22:35     ` Samuel Thibault
@ 2023-04-11  8:00     ` Sergey Bugaev
  2023-04-11 20:18       ` Samuel Thibault
  1 sibling, 1 reply; 140+ messages in thread
From: Sergey Bugaev @ 2023-04-11  8:00 UTC (permalink / raw)
  To: Samuel Thibault; +Cc: libc-alpha, bug-hurd

On Tue, Apr 11, 2023 at 1:07 AM Samuel Thibault <samuel.thibault@gnu.org> wrote:
> I believe we still want to use
>
>  mach_port_t port = get_reply_port();
>
> because the caller might not know whether its port is still valid
> or not, e.g. when a signal interrupted the RPC and thus we had to
> deallocate the reply port to make sure the server doesn't get confused.
> In that case the caller will still have the old reply port name, which
> we don't want to reallocate since it might already have been reused for
> something else.

*Great* point!

(And I should have thought of that..., but hey, this is what code reviews
are for, right?)

Side note, I really really dislike this idea of some code still referencing
port names that are no longer valid / deallocated / reused by someone else.
This is really prone to use-after-frees. Typically we'd solve this by
leaving a dead-name right in place of the port, and having
mig_dealloc_reply_port () dealloc this dead name.

But in this case... we're fairly sure that the code really doesn't do
anything with the name that it has, other than immediately calling
mig_dealloc_reply_port () on it; and there'd have to be a separate code path
for deallocating the dead name since mach_port_mod_refs (recv, -1) won't do
it (mach_port_destroy would handle both, but using that is a terrible idea).

So in order not to overcomplicate this, in this particular case, it should
be fine to just deallocate the stored reply port and not what the user has,
as you're saying. But it definitely needs a comment explaining this. And
maybe an assert (port == arg || port == MACH_PORT_NULL).

Sergey

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 24/34] hurd: Only check for TLS initialization inside rtld or in static builds
  2023-03-19 15:10 ` [RFC PATCH glibc 24/34] hurd: Only check for TLS initialization inside rtld or in static builds Sergey Bugaev
  2023-04-10 21:33   ` Samuel Thibault
@ 2023-04-11 18:57   ` Samuel Thibault
  2023-04-11 19:18     ` Samuel Thibault
                       ` (2 more replies)
  2023-04-14 17:34   ` Samuel Thibault
  2 siblings, 3 replies; 140+ messages in thread
From: Samuel Thibault @ 2023-04-11 18:57 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: libc-alpha, bug-hurd

Hello,

Had you actually tested it on i386? It seems to be breaking the
testsuite completely. I would expect that a submitted patch series has
gone through the testsuite.

Sergey Bugaev, le dim. 19 mars 2023 18:10:07 +0300, a ecrit:
> When glibc is built as a shared library, TLS is always initialized by
> the call of TLS_INIT_TP () macro made inside the dynamic loader, prior
> to running the main program (see dl-call_tls_init_tp.h).

Yes, but apparently we load libc.so before calling TLS_INIT_TP? (and
thus start using its functions)

Samuel

> We can take
> advantage of this: we know for sure that __LIBC_NO_TLS () will evaluate
> to 0 in all other cases, so let the compiler know that explicitly too.
> 
> Also, only define _hurd_tls_init () and TLS_INIT_TP () under the same
> conditions (either !SHARED or inside rtld), to statically assert that
> this is the case.
> 
> Other than a microoptimization, this also helps with avoiding awkward
> sharing of the __libc_tls_initialized variable between ld.so and libc.so
> that we would have to do otherwise -- we know for sure that no sharing
> is required, simply because __libc_tls_initialized would always be set
> to true inside libc.so.
> 
> Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
> ---
>  sysdeps/mach/hurd/Makefile                    |  4 ++
>  sysdeps/mach/hurd/i386/dl-tls-initialized.c   | 21 +++++++++
>  sysdeps/mach/hurd/i386/tls.h                  | 43 +++++++++++--------
>  sysdeps/mach/hurd/x86/init-first.c            | 11 +----
>  sysdeps/mach/hurd/x86_64/dl-tls-initialized.c | 21 +++++++++
>  sysdeps/mach/hurd/x86_64/tls.h                | 19 +++++---
>  6 files changed, 85 insertions(+), 34 deletions(-)
>  create mode 100644 sysdeps/mach/hurd/i386/dl-tls-initialized.c
>  create mode 100644 sysdeps/mach/hurd/x86_64/dl-tls-initialized.c
> 
> diff --git a/sysdeps/mach/hurd/Makefile b/sysdeps/mach/hurd/Makefile
> index d5584930..f43e92ba 100644
> --- a/sysdeps/mach/hurd/Makefile
> +++ b/sysdeps/mach/hurd/Makefile
> @@ -197,6 +197,10 @@ ifeq (hurd, $(subdir))
>  sysdep_routines += cthreads
>  endif
>  
> +ifeq (elf, $(subdir))
> +sysdep-dl-routines += dl-tls-initialized
> +endif
> +
>  ifeq (io, $(subdir))
>  sysdep_routines += f_setlk close_nocancel close_nocancel_nostatus \
>  		   fcntl_nocancel open_nocancel openat_nocancel read_nocancel \
> diff --git a/sysdeps/mach/hurd/i386/dl-tls-initialized.c b/sysdeps/mach/hurd/i386/dl-tls-initialized.c
> new file mode 100644
> index 00000000..493ec239
> --- /dev/null
> +++ b/sysdeps/mach/hurd/i386/dl-tls-initialized.c
> @@ -0,0 +1,21 @@
> +/* Determine whether TLS is initialized, for i386/Hurd.
> +   Copyright (C) 1995-2023 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
> +   <https://www.gnu.org/licenses/>.  */
> +
> +#ifndef SHARED
> +unsigned short __init1_desc;
> +#endif
> diff --git a/sysdeps/mach/hurd/i386/tls.h b/sysdeps/mach/hurd/i386/tls.h
> index 0f8dd241..ee7b8004 100644
> --- a/sysdeps/mach/hurd/i386/tls.h
> +++ b/sysdeps/mach/hurd/i386/tls.h
> @@ -69,18 +69,6 @@ _Static_assert (offsetof (tcbhead_t, __private_ss) == 0x30,
>                    |  (desc->high_word & 0xff000000));			      \
>    })
>  
> -/* Return 1 if TLS is not initialized yet.  */
> -#ifndef SHARED
> -extern unsigned short __init1_desc;
> -#define __HURD_DESC_INITIAL(gs, ds) ((gs) == (ds) || (gs) == __init1_desc)
> -#else
> -#define __HURD_DESC_INITIAL(gs, ds) ((gs) == (ds))
> -#endif
> -
> -#define __LIBC_NO_TLS()							      \
> -  ({ unsigned short ds, gs;						      \
> -     asm ("movw %%ds,%w0; movw %%gs,%w1" : "=q" (ds), "=q" (gs));	      \
> -     __builtin_expect(__HURD_DESC_INITIAL(gs, ds), 0); })
>  #endif
>  
>  /* The TCB can have any size and the memory following the address the
> @@ -125,6 +113,28 @@ extern unsigned short __init1_desc;
>  
>  # define HURD_SEL_LDT(sel) (__builtin_expect ((sel) & 4, 0))
>  
> +#ifndef SHARED
> +extern unsigned short __init1_desc;
> +# define __HURD_DESC_INITIAL(gs, ds) ((gs) == (ds) || (gs) == __init1_desc)
> +#else
> +# define __HURD_DESC_INITIAL(gs, ds) ((gs) == (ds))
> +#endif
> +
> +#if !defined (SHARED) || IS_IN (rtld)
> +/* Return 1 if TLS is not initialized yet.  */
> +extern inline bool __attribute__ ((unused))
> +__LIBC_NO_TLS (void)
> +{
> +  unsigned short ds, gs;
> +  asm ("movw %%ds, %w0\n"
> +       "movw %%gs, %w1"
> +       : "=q" (ds), "=q" (gs));
> +  return __glibc_unlikely (__HURD_DESC_INITIAL (gs, ds));
> +}
> +
> +/* Code to initially initialize the thread pointer.  This might need
> +   special attention since 'errno' is not yet available and if the
> +   operation can cause a failure 'errno' must not be touched.  */
>  static inline bool __attribute__ ((unused))
>  _hurd_tls_init (tcbhead_t *tcb)
>  {
> @@ -168,11 +178,10 @@ out:
>    return success;
>  }
>  
> -/* Code to initially initialize the thread pointer.  This might need
> -   special attention since 'errno' is not yet available and if the
> -   operation can cause a failure 'errno' must not be touched.  */
> -# define TLS_INIT_TP(descr) \
> -    _hurd_tls_init ((tcbhead_t *) (descr))
> +# define TLS_INIT_TP(descr) _hurd_tls_init ((tcbhead_t *) (descr))
> +#else /* defined (SHARED) && !IS_IN (rtld) */
> +# define __LIBC_NO_TLS() 0
> +#endif
>  
>  # if __GNUC_PREREQ (6, 0)
>  
> diff --git a/sysdeps/mach/hurd/x86/init-first.c b/sysdeps/mach/hurd/x86/init-first.c
> index 48c330ec..89a5f44c 100644
> --- a/sysdeps/mach/hurd/x86/init-first.c
> +++ b/sysdeps/mach/hurd/x86/init-first.c
> @@ -40,13 +40,6 @@ extern char **_dl_argv;
>  
>  #ifndef SHARED
>  static tcbhead_t __init1_tcbhead;
> -# ifndef __x86_64__
> -unsigned short __init1_desc;
> -# endif
> -#endif
> -
> -#ifdef __x86_64__
> -unsigned char __libc_tls_initialized;
>  #endif
>  
>  /* Things that want to be run before _hurd_init or much anything else.
> @@ -166,9 +159,7 @@ first_init (void)
>    _hurd_tls_init (&__init1_tcbhead);
>  
>    /* Make sure __LIBC_NO_TLS () keeps evaluating to 1.  */
> -# ifdef __x86_64__
> -  __libc_tls_initialized = 0;
> -# else
> +# ifndef __x86_64__
>    asm ("movw %%gs,%w0" : "=m" (__init1_desc));
>  # endif
>  #endif
> diff --git a/sysdeps/mach/hurd/x86_64/dl-tls-initialized.c b/sysdeps/mach/hurd/x86_64/dl-tls-initialized.c
> new file mode 100644
> index 00000000..d0766f95
> --- /dev/null
> +++ b/sysdeps/mach/hurd/x86_64/dl-tls-initialized.c
> @@ -0,0 +1,21 @@
> +/* Determine whether TLS is initialized, for x86_64/Hurd.
> +   Copyright (C) 1995-2023 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
> +   <https://www.gnu.org/licenses/>.  */
> +
> +#if !defined (SHARED) || IS_IN (rtld)
> +unsigned short __libc_tls_initialized;
> +#endif
> diff --git a/sysdeps/mach/hurd/x86_64/tls.h b/sysdeps/mach/hurd/x86_64/tls.h
> index cf74e1f4..da504d9c 100644
> --- a/sysdeps/mach/hurd/x86_64/tls.h
> +++ b/sysdeps/mach/hurd/x86_64/tls.h
> @@ -68,10 +68,6 @@ _Static_assert (offsetof (tcbhead_t, stack_guard) == 0x28,
>  _Static_assert (offsetof (tcbhead_t, __private_ss) == 0x70,
>                  "split stack pointer offset");
>  
> -extern unsigned char __libc_tls_initialized;
> -
> -# define __LIBC_NO_TLS() __builtin_expect (!__libc_tls_initialized, 0)
> -
>  /* The TCB can have any size and the memory following the address the
>     thread pointer points to is unspecified.  Allocate the TCB there.  */
>  # define TLS_TCB_AT_TP	1
> @@ -87,8 +83,6 @@ extern unsigned char __libc_tls_initialized;
>  # define TCB_ALIGNMENT	64
>  
>  
> -# define TLS_INIT_TP(descr) _hurd_tls_init ((tcbhead_t *) (descr))
> -
>  # define THREAD_SELF							\
>    (*(tcbhead_t * __seg_fs *) offsetof (tcbhead_t, tcb))
>  /* Read member of the thread descriptor directly.  */
> @@ -174,6 +168,10 @@ _hurd_tls_new (thread_t child, tcbhead_t *tcb)
>                               i386_FSGS_BASE_STATE_COUNT);
>  }
>  
> +# if !defined (SHARED) || IS_IN (rtld)
> +extern unsigned char __libc_tls_initialized;
> +#  define __LIBC_NO_TLS() __builtin_expect (!__libc_tls_initialized, 0)
> +
>  static inline bool __attribute__ ((unused))
>  _hurd_tls_init (tcbhead_t *tcb)
>  {
> @@ -184,11 +182,18 @@ _hurd_tls_init (tcbhead_t *tcb)
>    tcb->multiple_threads = 1;
>  
>    err = _hurd_tls_new (self, tcb);
> +  if (err == 0)
> +    __libc_tls_initialized = 1;
>    __mach_port_deallocate (__mach_task_self (), self);
> -  __libc_tls_initialized = 1;
>    return err == 0;
>  }
>  
> +#  define TLS_INIT_TP(descr) _hurd_tls_init ((tcbhead_t *) (descr))
> +# else /* defined (SHARED) && !IS_IN (rtld) */
> +#  define __LIBC_NO_TLS() 0
> +# endif
> +
> +
>  
>  /* Global scope switch support.  */
>  # define THREAD_GSCOPE_FLAG_UNUSED 0
> -- 
> 2.39.2
> 

-- 
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 24/34] hurd: Only check for TLS initialization inside rtld or in static builds
  2023-04-11 18:57   ` Samuel Thibault
@ 2023-04-11 19:18     ` Samuel Thibault
  2023-04-11 20:03     ` Samuel Thibault
  2023-04-11 20:27     ` Sergey Bugaev
  2 siblings, 0 replies; 140+ messages in thread
From: Samuel Thibault @ 2023-04-11 19:18 UTC (permalink / raw)
  To: Sergey Bugaev, libc-alpha, bug-hurd

Samuel Thibault, le mar. 11 avril 2023 20:57:05 +0200, a ecrit:
> Had you actually tested it on i386? It seems to be breaking the
> testsuite completely. I would expect that a submitted patch series has
> gone through the testsuite.
> 
> Sergey Bugaev, le dim. 19 mars 2023 18:10:07 +0300, a ecrit:
> > When glibc is built as a shared library, TLS is always initialized by
> > the call of TLS_INIT_TP () macro made inside the dynamic loader, prior
> > to running the main program (see dl-call_tls_init_tp.h).
> 
> Yes, but apparently we load libc.so before calling TLS_INIT_TP? (and
> thus start using its functions)

I'm thinking that we should as well just assume that the hardware is old
enough to support rdfsbase, that'll be *way* simpler to test for TLS.

Samuel

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 24/34] hurd: Only check for TLS initialization inside rtld or in static builds
  2023-04-11 18:57   ` Samuel Thibault
  2023-04-11 19:18     ` Samuel Thibault
@ 2023-04-11 20:03     ` Samuel Thibault
  2023-04-11 20:27     ` Sergey Bugaev
  2 siblings, 0 replies; 140+ messages in thread
From: Samuel Thibault @ 2023-04-11 20:03 UTC (permalink / raw)
  To: Sergey Bugaev, libc-alpha, bug-hurd

I have reverted that change for now, so we get back to a working glibc.

Samuel

Samuel Thibault, le mar. 11 avril 2023 20:57:05 +0200, a ecrit:
> Hello,
> 
> Had you actually tested it on i386? It seems to be breaking the
> testsuite completely. I would expect that a submitted patch series has
> gone through the testsuite.
> 
> Sergey Bugaev, le dim. 19 mars 2023 18:10:07 +0300, a ecrit:
> > When glibc is built as a shared library, TLS is always initialized by
> > the call of TLS_INIT_TP () macro made inside the dynamic loader, prior
> > to running the main program (see dl-call_tls_init_tp.h).
> 
> Yes, but apparently we load libc.so before calling TLS_INIT_TP? (and
> thus start using its functions)
> 
> Samuel
> 
> > We can take
> > advantage of this: we know for sure that __LIBC_NO_TLS () will evaluate
> > to 0 in all other cases, so let the compiler know that explicitly too.
> > 
> > Also, only define _hurd_tls_init () and TLS_INIT_TP () under the same
> > conditions (either !SHARED or inside rtld), to statically assert that
> > this is the case.
> > 
> > Other than a microoptimization, this also helps with avoiding awkward
> > sharing of the __libc_tls_initialized variable between ld.so and libc.so
> > that we would have to do otherwise -- we know for sure that no sharing
> > is required, simply because __libc_tls_initialized would always be set
> > to true inside libc.so.
> > 
> > Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
> > ---
> >  sysdeps/mach/hurd/Makefile                    |  4 ++
> >  sysdeps/mach/hurd/i386/dl-tls-initialized.c   | 21 +++++++++
> >  sysdeps/mach/hurd/i386/tls.h                  | 43 +++++++++++--------
> >  sysdeps/mach/hurd/x86/init-first.c            | 11 +----
> >  sysdeps/mach/hurd/x86_64/dl-tls-initialized.c | 21 +++++++++
> >  sysdeps/mach/hurd/x86_64/tls.h                | 19 +++++---
> >  6 files changed, 85 insertions(+), 34 deletions(-)
> >  create mode 100644 sysdeps/mach/hurd/i386/dl-tls-initialized.c
> >  create mode 100644 sysdeps/mach/hurd/x86_64/dl-tls-initialized.c
> > 
> > diff --git a/sysdeps/mach/hurd/Makefile b/sysdeps/mach/hurd/Makefile
> > index d5584930..f43e92ba 100644
> > --- a/sysdeps/mach/hurd/Makefile
> > +++ b/sysdeps/mach/hurd/Makefile
> > @@ -197,6 +197,10 @@ ifeq (hurd, $(subdir))
> >  sysdep_routines += cthreads
> >  endif
> >  
> > +ifeq (elf, $(subdir))
> > +sysdep-dl-routines += dl-tls-initialized
> > +endif
> > +
> >  ifeq (io, $(subdir))
> >  sysdep_routines += f_setlk close_nocancel close_nocancel_nostatus \
> >  		   fcntl_nocancel open_nocancel openat_nocancel read_nocancel \
> > diff --git a/sysdeps/mach/hurd/i386/dl-tls-initialized.c b/sysdeps/mach/hurd/i386/dl-tls-initialized.c
> > new file mode 100644
> > index 00000000..493ec239
> > --- /dev/null
> > +++ b/sysdeps/mach/hurd/i386/dl-tls-initialized.c
> > @@ -0,0 +1,21 @@
> > +/* Determine whether TLS is initialized, for i386/Hurd.
> > +   Copyright (C) 1995-2023 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
> > +   <https://www.gnu.org/licenses/>.  */
> > +
> > +#ifndef SHARED
> > +unsigned short __init1_desc;
> > +#endif
> > diff --git a/sysdeps/mach/hurd/i386/tls.h b/sysdeps/mach/hurd/i386/tls.h
> > index 0f8dd241..ee7b8004 100644
> > --- a/sysdeps/mach/hurd/i386/tls.h
> > +++ b/sysdeps/mach/hurd/i386/tls.h
> > @@ -69,18 +69,6 @@ _Static_assert (offsetof (tcbhead_t, __private_ss) == 0x30,
> >                    |  (desc->high_word & 0xff000000));			      \
> >    })
> >  
> > -/* Return 1 if TLS is not initialized yet.  */
> > -#ifndef SHARED
> > -extern unsigned short __init1_desc;
> > -#define __HURD_DESC_INITIAL(gs, ds) ((gs) == (ds) || (gs) == __init1_desc)
> > -#else
> > -#define __HURD_DESC_INITIAL(gs, ds) ((gs) == (ds))
> > -#endif
> > -
> > -#define __LIBC_NO_TLS()							      \
> > -  ({ unsigned short ds, gs;						      \
> > -     asm ("movw %%ds,%w0; movw %%gs,%w1" : "=q" (ds), "=q" (gs));	      \
> > -     __builtin_expect(__HURD_DESC_INITIAL(gs, ds), 0); })
> >  #endif
> >  
> >  /* The TCB can have any size and the memory following the address the
> > @@ -125,6 +113,28 @@ extern unsigned short __init1_desc;
> >  
> >  # define HURD_SEL_LDT(sel) (__builtin_expect ((sel) & 4, 0))
> >  
> > +#ifndef SHARED
> > +extern unsigned short __init1_desc;
> > +# define __HURD_DESC_INITIAL(gs, ds) ((gs) == (ds) || (gs) == __init1_desc)
> > +#else
> > +# define __HURD_DESC_INITIAL(gs, ds) ((gs) == (ds))
> > +#endif
> > +
> > +#if !defined (SHARED) || IS_IN (rtld)
> > +/* Return 1 if TLS is not initialized yet.  */
> > +extern inline bool __attribute__ ((unused))
> > +__LIBC_NO_TLS (void)
> > +{
> > +  unsigned short ds, gs;
> > +  asm ("movw %%ds, %w0\n"
> > +       "movw %%gs, %w1"
> > +       : "=q" (ds), "=q" (gs));
> > +  return __glibc_unlikely (__HURD_DESC_INITIAL (gs, ds));
> > +}
> > +
> > +/* Code to initially initialize the thread pointer.  This might need
> > +   special attention since 'errno' is not yet available and if the
> > +   operation can cause a failure 'errno' must not be touched.  */
> >  static inline bool __attribute__ ((unused))
> >  _hurd_tls_init (tcbhead_t *tcb)
> >  {
> > @@ -168,11 +178,10 @@ out:
> >    return success;
> >  }
> >  
> > -/* Code to initially initialize the thread pointer.  This might need
> > -   special attention since 'errno' is not yet available and if the
> > -   operation can cause a failure 'errno' must not be touched.  */
> > -# define TLS_INIT_TP(descr) \
> > -    _hurd_tls_init ((tcbhead_t *) (descr))
> > +# define TLS_INIT_TP(descr) _hurd_tls_init ((tcbhead_t *) (descr))
> > +#else /* defined (SHARED) && !IS_IN (rtld) */
> > +# define __LIBC_NO_TLS() 0
> > +#endif
> >  
> >  # if __GNUC_PREREQ (6, 0)
> >  
> > diff --git a/sysdeps/mach/hurd/x86/init-first.c b/sysdeps/mach/hurd/x86/init-first.c
> > index 48c330ec..89a5f44c 100644
> > --- a/sysdeps/mach/hurd/x86/init-first.c
> > +++ b/sysdeps/mach/hurd/x86/init-first.c
> > @@ -40,13 +40,6 @@ extern char **_dl_argv;
> >  
> >  #ifndef SHARED
> >  static tcbhead_t __init1_tcbhead;
> > -# ifndef __x86_64__
> > -unsigned short __init1_desc;
> > -# endif
> > -#endif
> > -
> > -#ifdef __x86_64__
> > -unsigned char __libc_tls_initialized;
> >  #endif
> >  
> >  /* Things that want to be run before _hurd_init or much anything else.
> > @@ -166,9 +159,7 @@ first_init (void)
> >    _hurd_tls_init (&__init1_tcbhead);
> >  
> >    /* Make sure __LIBC_NO_TLS () keeps evaluating to 1.  */
> > -# ifdef __x86_64__
> > -  __libc_tls_initialized = 0;
> > -# else
> > +# ifndef __x86_64__
> >    asm ("movw %%gs,%w0" : "=m" (__init1_desc));
> >  # endif
> >  #endif
> > diff --git a/sysdeps/mach/hurd/x86_64/dl-tls-initialized.c b/sysdeps/mach/hurd/x86_64/dl-tls-initialized.c
> > new file mode 100644
> > index 00000000..d0766f95
> > --- /dev/null
> > +++ b/sysdeps/mach/hurd/x86_64/dl-tls-initialized.c
> > @@ -0,0 +1,21 @@
> > +/* Determine whether TLS is initialized, for x86_64/Hurd.
> > +   Copyright (C) 1995-2023 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
> > +   <https://www.gnu.org/licenses/>.  */
> > +
> > +#if !defined (SHARED) || IS_IN (rtld)
> > +unsigned short __libc_tls_initialized;
> > +#endif
> > diff --git a/sysdeps/mach/hurd/x86_64/tls.h b/sysdeps/mach/hurd/x86_64/tls.h
> > index cf74e1f4..da504d9c 100644
> > --- a/sysdeps/mach/hurd/x86_64/tls.h
> > +++ b/sysdeps/mach/hurd/x86_64/tls.h
> > @@ -68,10 +68,6 @@ _Static_assert (offsetof (tcbhead_t, stack_guard) == 0x28,
> >  _Static_assert (offsetof (tcbhead_t, __private_ss) == 0x70,
> >                  "split stack pointer offset");
> >  
> > -extern unsigned char __libc_tls_initialized;
> > -
> > -# define __LIBC_NO_TLS() __builtin_expect (!__libc_tls_initialized, 0)
> > -
> >  /* The TCB can have any size and the memory following the address the
> >     thread pointer points to is unspecified.  Allocate the TCB there.  */
> >  # define TLS_TCB_AT_TP	1
> > @@ -87,8 +83,6 @@ extern unsigned char __libc_tls_initialized;
> >  # define TCB_ALIGNMENT	64
> >  
> >  
> > -# define TLS_INIT_TP(descr) _hurd_tls_init ((tcbhead_t *) (descr))
> > -
> >  # define THREAD_SELF							\
> >    (*(tcbhead_t * __seg_fs *) offsetof (tcbhead_t, tcb))
> >  /* Read member of the thread descriptor directly.  */
> > @@ -174,6 +168,10 @@ _hurd_tls_new (thread_t child, tcbhead_t *tcb)
> >                               i386_FSGS_BASE_STATE_COUNT);
> >  }
> >  
> > +# if !defined (SHARED) || IS_IN (rtld)
> > +extern unsigned char __libc_tls_initialized;
> > +#  define __LIBC_NO_TLS() __builtin_expect (!__libc_tls_initialized, 0)
> > +
> >  static inline bool __attribute__ ((unused))
> >  _hurd_tls_init (tcbhead_t *tcb)
> >  {
> > @@ -184,11 +182,18 @@ _hurd_tls_init (tcbhead_t *tcb)
> >    tcb->multiple_threads = 1;
> >  
> >    err = _hurd_tls_new (self, tcb);
> > +  if (err == 0)
> > +    __libc_tls_initialized = 1;
> >    __mach_port_deallocate (__mach_task_self (), self);
> > -  __libc_tls_initialized = 1;
> >    return err == 0;
> >  }
> >  
> > +#  define TLS_INIT_TP(descr) _hurd_tls_init ((tcbhead_t *) (descr))
> > +# else /* defined (SHARED) && !IS_IN (rtld) */
> > +#  define __LIBC_NO_TLS() 0
> > +# endif
> > +
> > +
> >  
> >  /* Global scope switch support.  */
> >  # define THREAD_GSCOPE_FLAG_UNUSED 0
> > -- 
> > 2.39.2
> > 
> 
> -- 
> Samuel
> ---
> Pour une évaluation indépendante, transparente et rigoureuse !
> Je soutiens la Commission d'Évaluation de l'Inria.

-- 
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 25/34] hurd: Improve reply port handling when exiting signal handlers
  2023-04-11  7:44     ` Sergey Bugaev
@ 2023-04-11 20:15       ` Samuel Thibault
  2023-04-11 20:35         ` Sergey Bugaev
  0 siblings, 1 reply; 140+ messages in thread
From: Samuel Thibault @ 2023-04-11 20:15 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: libc-alpha, bug-hurd

Sergey Bugaev, le mar. 11 avril 2023 10:44:17 +0300, a ecrit:
> On Tue, Apr 11, 2023 at 1:03 AM Samuel Thibault <samuel.thibault@gnu.org> wrote:
> > I tend to be very cautious with reply port reuse since it can confuse
> > servers a lot when e.g. interrupted, so it's generally safer not to try
> > to reuse them.
> 
> Huh? Confuse how?

On interruption, it's hard to know whether the server will actually send
a message on the reply port or not, in the end. So if you re-use a reply
port but unfortunately the server sent a reply on it in the end, you get
all reply messages shifted.

> But I don't see a reason to destroy the *current* reply port, the one
> used during signal handling, which we're longjumping out of.

Simplicity. I agree that it should work fine as of now. But then
somebody contributes something, doesn't notice that case, breaks it and
mayhem comes, but only rarely since signals don't happen often.

> On the other hand it doesn't hurt much either, and signal handling is
> a slow path anyway, so we may just play it safe.

Yes, please :)

Samuel

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 26/34] hurd: Remove __hurd_local_reply_port
  2023-04-11  8:00     ` Sergey Bugaev
@ 2023-04-11 20:18       ` Samuel Thibault
  2023-04-13 11:58         ` [RFC PATCH glibc v2 " Sergey Bugaev
  0 siblings, 1 reply; 140+ messages in thread
From: Samuel Thibault @ 2023-04-11 20:18 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: libc-alpha, bug-hurd

Sergey Bugaev, le mar. 11 avril 2023 11:00:27 +0300, a ecrit:
> Side note, I really really dislike this idea of some code still referencing
> port names that are no longer valid / deallocated / reused by someone else.
> This is really prone to use-after-frees. Typically we'd solve this by
> leaving a dead-name right in place of the port, and having
> mig_dealloc_reply_port () dealloc this dead name.

That could be better indeed. Rather than modifying refs under the hood,
let the code manage them.

> But in this case... we're fairly sure that the code really doesn't do
> anything with the name that it has, other than immediately calling
> mig_dealloc_reply_port () on it; and there'd have to be a separate code path
> for deallocating the dead name since mach_port_mod_refs (recv, -1) won't do
> it (mach_port_destroy would handle both, but using that is a terrible idea).
> 
> So in order not to overcomplicate this, in this particular case, it should
> be fine to just deallocate the stored reply port and not what the user has,
> as you're saying. But it definitely needs a comment explaining this.

Completely agree :)

> And maybe an assert (port == arg || port == MACH_PORT_NULL).

If that does indeed work, yes :)

Samuel

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 24/34] hurd: Only check for TLS initialization inside rtld or in static builds
  2023-04-11 18:57   ` Samuel Thibault
  2023-04-11 19:18     ` Samuel Thibault
  2023-04-11 20:03     ` Samuel Thibault
@ 2023-04-11 20:27     ` Sergey Bugaev
  2023-04-11 21:23       ` Samuel Thibault
  2 siblings, 1 reply; 140+ messages in thread
From: Sergey Bugaev @ 2023-04-11 20:27 UTC (permalink / raw)
  To: Samuel Thibault; +Cc: libc-alpha, bug-hurd

On Tue, Apr 11, 2023 at 9:57 PM Samuel Thibault <samuel.thibault@gnu.org> wrote:
>
> Hello,
>
> Had you actually tested it on i386? It seems to be breaking the
> testsuite completely. I would expect that a submitted patch series has
> gone through the testsuite.

Ouch!

I have tested that it works on i386, as in I was able to run bash and
apt with it. I'll re-check whether it (still) works, maybe I'm
misremembering and my testing wasn't with the latest iteration of the
change (although I'm fairly sure that it was, hm).

I have not run the testsuite, because:
* I'm cross-compiling
* I never managed to run it to completion on the Hurd in the first
place... but maybe you have already fixed this.

I'll try to run the full testsuite once I get to my other machine.

But also, I think I've made it clear enough that this is an RFC and
while I have done some testing, it wasn't comprehensive. I was happy
to see it pushed, but that's because I assumed that you have verified
that my assumptions & reasoning are sound and that this change doesn't
break anything. Please don't just blindly trust me with this patchset!

> Sergey Bugaev, le dim. 19 mars 2023 18:10:07 +0300, a ecrit:
> > When glibc is built as a shared library, TLS is always initialized by
> > the call of TLS_INIT_TP () macro made inside the dynamic loader, prior
> > to running the main program (see dl-call_tls_init_tp.h).
>
> Yes, but apparently we load libc.so before calling TLS_INIT_TP? (and
> thus start using its functions)

If that was the case, wouldn't we also explode on e.g. errno accesses?
Note that the Hurd port doesn't use RTLD_PRIVATE_ERRNO.

As I understand it, rtld starts using libc functions after the call to
_dl_relocate_object (&GL(dl_rtld_map), main_map->l_scope, 0, 0) at
elf/rtld.c:2372. TLS has already been initialized by that point, and
in fact there's a comment there saying, "We must do this after TLS
initialization in case after this re-relocation, we might call a
user-supplied function (e.g. calloc from _dl_relocate_object) that
uses TLS data."

Here's some evidence to support that theory: I've uploaded a log with
LD_DEBUG + gdb here: [0]. As you can see, i386_set_gdt gets hit *way*
before ld.so gets reallocated / bound to libc.so symbols. The same can
be seen in a file that explicitly links against libdl (this doesn't
seem to make any difference).

[0]: https://paste.gg/p/anonymous/ae39453264334d3e92670a3cd964806d

But of course it's hard to argue with test failures :(

> I'm thinking that we should as well just assume that the hardware is old
> enough to support rdfsbase, that'll be *way* simpler to test for TLS.

Maybe that, yes.

> I have reverted that change for now, so we get back to a working glibc.

Good.

Sergey

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 25/34] hurd: Improve reply port handling when exiting signal handlers
  2023-04-11 20:15       ` Samuel Thibault
@ 2023-04-11 20:35         ` Sergey Bugaev
  0 siblings, 0 replies; 140+ messages in thread
From: Sergey Bugaev @ 2023-04-11 20:35 UTC (permalink / raw)
  To: Samuel Thibault; +Cc: libc-alpha, bug-hurd

On Tue, Apr 11, 2023 at 11:15 PM Samuel Thibault
<samuel.thibault@gnu.org> wrote:
>
> Sergey Bugaev, le mar. 11 avril 2023 10:44:17 +0300, a ecrit:
> > On Tue, Apr 11, 2023 at 1:03 AM Samuel Thibault <samuel.thibault@gnu.org> wrote:
> > > I tend to be very cautious with reply port reuse since it can confuse
> > > servers a lot when e.g. interrupted, so it's generally safer not to try
> > > to reuse them.
> >
> > Huh? Confuse how?
>
> On interruption, it's hard to know whether the server will actually send
> a message on the reply port or not, in the end. So if you re-use a reply
> port but unfortunately the server sent a reply on it in the end, you get
> all reply messages shifted.

Yes, but this is confusing the client, not the server.

But I agree that we must destroy the port on which we have made an RFC
but have not received a reply. This isn't unique to interruptions,
it's a general thing with msg recv timing out.

Sergey

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 24/34] hurd: Only check for TLS initialization inside rtld or in static builds
  2023-04-11 20:27     ` Sergey Bugaev
@ 2023-04-11 21:23       ` Samuel Thibault
  2023-04-12  8:36         ` Sergey Bugaev
  0 siblings, 1 reply; 140+ messages in thread
From: Samuel Thibault @ 2023-04-11 21:23 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: libc-alpha, bug-hurd

Sergey Bugaev, le mar. 11 avril 2023 23:27:35 +0300, a ecrit:
> On Tue, Apr 11, 2023 at 9:57 PM Samuel Thibault <samuel.thibault@gnu.org> wrote:
> > Had you actually tested it on i386? It seems to be breaking the
> > testsuite completely. I would expect that a submitted patch series has
> > gone through the testsuite.
> 
> Ouch!
> 
> I have tested that it works on i386, as in I was able to run bash and
> apt with it. I'll re-check whether it (still) works,

Yes, some things work, but some others don't :)

> I have not run the testsuite, because:
> * I'm cross-compiling

You can probably push your tree to a box where you can compile & run?

> * I never managed to run it to completion on the Hurd in the first
> place... but maybe you have already fixed this.

I have marked various tests as unsupported, yet.

> But also, I think I've made it clear enough that this is an RFC and
> while I have done some testing, it wasn't comprehensive. I was happy
> to see it pushed, but that's because I assumed that you have verified
> that my assumptions & reasoning are sound and that this change doesn't
> break anything. Please don't just blindly trust me with this patchset!

Sure, I did verify, but like everybody, the testsuite is in the end what
is best to make sure we haven't screwed up :)

> > Sergey Bugaev, le dim. 19 mars 2023 18:10:07 +0300, a ecrit:
> > > When glibc is built as a shared library, TLS is always initialized by
> > > the call of TLS_INIT_TP () macro made inside the dynamic loader, prior
> > > to running the main program (see dl-call_tls_init_tp.h).
> >
> > Yes, but apparently we load libc.so before calling TLS_INIT_TP? (and
> > thus start using its functions)
> 
> If that was the case, wouldn't we also explode on e.g. errno accesses?
> Note that the Hurd port doesn't use RTLD_PRIVATE_ERRNO.

I don't know.

> As I understand it, rtld starts using libc functions after the call to
> _dl_relocate_object (&GL(dl_rtld_map), main_map->l_scope, 0, 0) at
> elf/rtld.c:2372. TLS has already been initialized by that point, and
> in fact there's a comment there saying, "We must do this after TLS
> initialization in case after this re-relocation, we might call a
> user-supplied function (e.g. calloc from _dl_relocate_object) that
> uses TLS data."

Ok, I don't know.

Samuel

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 24/34] hurd: Only check for TLS initialization inside rtld or in static builds
  2023-04-11 21:23       ` Samuel Thibault
@ 2023-04-12  8:36         ` Sergey Bugaev
  2023-04-12  9:00           ` Samuel Thibault
  0 siblings, 1 reply; 140+ messages in thread
From: Sergey Bugaev @ 2023-04-12  8:36 UTC (permalink / raw)
  To: Samuel Thibault; +Cc: libc-alpha, bug-hurd

On Wed, Apr 12, 2023 at 12:23 AM Samuel Thibault
<samuel.thibault@gnu.org> wrote:>
> Sergey Bugaev, le mar. 11 avril 2023 23:27:35 +0300, a ecrit:
> > On Tue, Apr 11, 2023 at 9:57 PM Samuel Thibault <samuel.thibault@gnu.org> wrote:
> > > Had you actually tested it on i386? It seems to be breaking the
> > > testsuite completely. I would expect that a submitted patch series has
> > > gone through the testsuite.
> >
> > Ouch!
> >
> > I have tested that it works on i386, as in I was able to run bash and
> > apt with it. I'll re-check whether it (still) works,
>
> Yes, some things work, but some others don't :)
>
> > I have not run the testsuite, because:
> > * I'm cross-compiling
>
> You can probably push your tree to a box where you can compile & run?
>
> > * I never managed to run it to completion on the Hurd in the first
> > place... but maybe you have already fixed this.
>
> I have marked various tests as unsupported, yet.

Alright, this went much as expected. First it took an eternity to
compile (SMP support can't come soon enough), and second, the testuite
has brought the system into a bad state and didn't complete. In
particular: it managed to terminate my SSH session several times (I
don't know how), and eventually it ran into that networking stack
deadlock (the only way out of which seems to be reboot-hurd on the
console). So I still can not run the testsuite on my end.

But the tests that did run seem to mostly have worked. There were some
failures here and there (I don't know which ones are expected), but
nothing as bad as every single program crashing because it starts
using TLS before it's set up due to already having switched to libc.so
functions.

Could you please point me to a specific test case (and not just "run
the whole thing") that started failing because of this change, and
teach me how to run just that one? I have read [0], but that says, "To
test just one test you have to have already run the entire testsuite",
which is a non-starter.

[0]: https://sourceware.org/glibc/wiki/Testing/Testsuite#Testing_just_one_test

Side note, I don't know why it's glibc's test suite that brings the
system to its knees. glib's, which is also quite comprehensive,
completes just fine. Would it have been easy for me to run the full
test suite, I would surely do that before submitting any patches. But
it's not.

Sergey

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 24/34] hurd: Only check for TLS initialization inside rtld or in static builds
  2023-04-12  8:36         ` Sergey Bugaev
@ 2023-04-12  9:00           ` Samuel Thibault
  2023-04-12 10:42             ` Sergey Bugaev
  0 siblings, 1 reply; 140+ messages in thread
From: Samuel Thibault @ 2023-04-12  9:00 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: libc-alpha, bug-hurd

Sergey Bugaev, le mer. 12 avril 2023 11:36:58 +0300, a ecrit:
> Alright, this went much as expected. First it took an eternity to
> compile (SMP support can't come soon enough), and second, the testuite
> has brought the system into a bad state and didn't complete. In
> particular: it managed to terminate my SSH session several times (I
> don't know how), and eventually it ran into that networking stack
> deadlock (the only way out of which seems to be reboot-hurd on the
> console). So I still can not run the testsuite on my end.

Was that tst-spawn6? We'd probably have to disable that as well, you can
just add 

tests-unsupported += tst-spawn6

to sysdeps/mach/hurd/Makefile

Possibly also test-lfs:

tests-unsupported += test-lfs

> But the tests that did run seem to mostly have worked. There were some
> failures here and there (I don't know which ones are expected)

You can run on master to get the list of current expected failures.

> Could you please point me to a specific test case

Actually all cases that actually execute something, fail. So for
instance the very first, csu/test-as-const-rtld-sizes

> (and not just "run the whole thing") that started failing because of
> this change, and teach me how to run just that one? I have read [0],
> but that says, "To test just one test you have to have already run the
> entire testsuite", which is a non-starter.

You can use

./testrun.sh csu/test-as-const-rtld-sizes

> Would it have been easy for me to run the full test suite, I would
> surely do that before submitting any patches. But it's not.

Then it's simple: we have to fix that first.

Samuel

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 24/34] hurd: Only check for TLS initialization inside rtld or in static builds
  2023-04-12  9:00           ` Samuel Thibault
@ 2023-04-12 10:42             ` Sergey Bugaev
  2023-04-12 10:45               ` Samuel Thibault
  2023-04-12 23:46               ` Samuel Thibault
  0 siblings, 2 replies; 140+ messages in thread
From: Sergey Bugaev @ 2023-04-12 10:42 UTC (permalink / raw)
  To: Samuel Thibault; +Cc: libc-alpha, bug-hurd

On Wed, Apr 12, 2023 at 12:00 PM Samuel Thibault
<samuel.thibault@gnu.org> wrote:
> Was that tst-spawn6?

I can't point out any specific one :( There is just this huge wall of
output, and then the whole thing breaks / hangs. FWIW, the last lines
before my SSH / network stack died were: (Gmail is surely going to
wrap this, but hopefully not too badly)

gcc /home/sergey/glibc/build/elf/dso-sort-tests-src/tst-dso-ordering9_42-bdeca-c.c
-c -std=gnu11 -fgnu89-inline  -g -O2 -Wall -Wwrite-strings -Wundef
-Werror -fmerge-all-constants -frounding-math -fno-stack-protector
-fno-common -Wno-parentheses -Wstrict-prototypes
-Wold-style-definition -fmath-errno    -fPIC              -I../include
-I/home/sergey/glibc/build/elf  -I/home/sergey/glibc/build
-I../sysdeps/mach/hurd/i386  -I../sysdeps/mach/hurd/x86
-I../sysdeps/mach/hurd/i386/htl  -I../sysdeps/mach/hurd/htl
-I../sysdeps/hurd/htl  -I../sysdeps/mach/htl  -I../sysdeps/htl/include
-I../sysdeps/htl  -I../sysdeps/pthread  -I../sysdeps/mach/hurd/x86/htl
 -I../sysdeps/i386/htl  -I../sysdeps/x86/htl  -I../sysdeps/mach/hurd
-I../sysdeps/gnu  -I../sysdeps/unix/bsd  -I../sysdeps/unix/inet
-I../sysdeps/mach/i386  -I../sysdeps/mach/x86
-I../sysdeps/mach/include -I../sysdeps/mach
-I../sysdeps/i386/i686/fpu/multiarch  -I../sysdeps/i386/i686/fpu
-I../sysdeps/i386/i686/multiarch  -I../sysdeps/i386/i686
-I../sysdeps/i386/fpu  -I../sysdeps/x86/fpu  -I../sysdeps/i386
-I../sysdeps/x86/include -I../sysdeps/x86  -I../sysdeps/wordsize-32
-I../sysdeps/ieee754/float128  -I../sysdeps/ieee754/ldbl-96/include
-I../sysdeps/ieee754/ldbl-96  -I../sysdeps/ieee754/dbl-64
-I../sysdeps/ieee754/flt-32  -I../sysdeps/hurd/include
-I../sysdeps/hurd  -I../sysdeps/unix  -I../sysdeps/posix
-I../sysdeps/ieee754  -I../sysdeps/generic -I../hurd
-I/home/sergey/glibc/build/hurd/ -I../mach
-I/home/sergey/glibc/build/mach/ -I.. -I../libio -I.
-D_LIBC_REENTRANT -include /home/sergey/glibc/build/libc-modules.h
-DMODULE_NAME=testsuite -include ../include/libc-symbols.h  -DPIC
-DSHARED     -DTOP_NAMESPACE=glibc -o
/home/sergey/glibc/build/elf/tst-dso-ordering9-dir/tst-dso-ordering9_42-bdeca-c.os
client_loop: send disconnect: Broken pipe

...but that doesn't seem useful.

> You can run on master to get the list of current expected failures.

But that's the thing, I can not :|

> > Could you please point me to a specific test case
>
> Actually all cases that actually execute something, fail. So for
> instance the very first, csu/test-as-const-rtld-sizes

That one seems to have passed:

sergey@hurdle:~/glibc/build$ cat csu/test-as-const-rtld-sizes.out
sergey@hurdle:~/glibc/build$ cat csu/test-as-const-rtld-sizes.test-result
PASS: csu/test-as-const-rtld-sizes
original exit status 0

this is with your revert reverted.

Here's some more evidence that compiling out the no-tls case should be
safe, about errno again:

(gdb) info symbol 0x00023670
__errno_location in section .text of /lib/ld.so
(gdb) disas 0x00023670
Dump of assembler code for function __errno_location:
   0x00023670 <+0>:       call   0x2919a <__x86.get_pc_thunk.ax>
   0x00023675 <+5>:       add    $0x1297f,%eax
   0x0002367a <+10>:      lea    0xa24(%eax),%eax
   0x00023680 <+16>:      ret
End of assembler dump.
(gdb) info symbol 0x01077f00
__errno_location in section .text of /lib/i386-gnu/libc.so.0.3
(gdb) disas 0x01077f00
Dump of assembler code for function __GI___errno_location:
   0x01077f00 <+0>:       call   0x1220bc1 <__x86.get_pc_thunk.ax>
   0x01077f05 <+5>:       add    $0x22e0ef,%eax
   0x01077f0a <+10>:      mov    -0x1b8(%eax),%eax
   0x01077f10 <+16>:      add    %gs:0x0,%eax
   0x01077f17 <+23>:      ret
End of assembler dump.

This is what's shipped in Debian, i.e. prior to my changes. As you can
see, the libc.so version accesses %gs:0x0 without any checks, which
makes sense, since __errno_location is just return &errno, 'errno'
itself being a thread-local. There is no __LIBC_NO_TLS check in the
source code. And yet it works just fine! It follows that all
__LIBC_NO_TLS checks in libc.so must be redundant.

> > Would it have been easy for me to run the full test suite, I would
> > surely do that before submitting any patches. But it's not.
>
> Then it's simple: we have to fix that first.

If that's simple to fix, great!

Can you reproduce my issues?

Sergey

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 24/34] hurd: Only check for TLS initialization inside rtld or in static builds
  2023-04-12 10:42             ` Sergey Bugaev
@ 2023-04-12 10:45               ` Samuel Thibault
  2023-04-12 17:18                 ` Sergey Bugaev
  2023-04-12 23:46               ` Samuel Thibault
  1 sibling, 1 reply; 140+ messages in thread
From: Samuel Thibault @ 2023-04-12 10:45 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: libc-alpha, bug-hurd

Sergey Bugaev, le mer. 12 avril 2023 13:42:50 +0300, a ecrit:
> > You can run on master to get the list of current expected failures.
> 
> But that's the thing, I can not :|

I meant after having fixed the tests that break your testing, by
disabling them as I hinted.

Samuel

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 24/34] hurd: Only check for TLS initialization inside rtld or in static builds
  2023-04-12 10:45               ` Samuel Thibault
@ 2023-04-12 17:18                 ` Sergey Bugaev
  0 siblings, 0 replies; 140+ messages in thread
From: Sergey Bugaev @ 2023-04-12 17:18 UTC (permalink / raw)
  To: Samuel Thibault; +Cc: libc-alpha, bug-hurd

On Wed, Apr 12, 2023 at 1:45 PM Samuel Thibault <samuel.thibault@gnu.org> wrote:
>
> Sergey Bugaev, le mer. 12 avril 2023 13:42:50 +0300, a ecrit:
> > > You can run on master to get the list of current expected failures.
> >
> > But that's the thing, I can not :|
>
> I meant after having fixed the tests that break your testing, by
> disabling them as I hinted.

Alright, after spending a day trying to make this work, I declare this
a lost cause.

I have disabled the two tests you suggested, and some more that seemed
to behave particularly bad. It still always kills / hard-locks my
system, at seemingly random places. This means fs corruption, each
time, so I'm not willing to try doing this again and again.

But anyway, the test you mentioned works here. All the tests in csu/ do:

$ for test in $(find csu/ -executable -name test-\*); do echo running
$test; ./testrun.sh $test && echo ok; done
running csu/test-as-const-rtld-sizes
ok
running csu/test-as-const-tcb-offsets
ok
running csu/test-as-const-link-defines
ok
running csu/test-as-const-tlsdesc
ok
running csu/test-as-const-cpu-features-offsets
ok
$

Is there any other way for me to reproduce the crashes? If you can
reproduce them, can you see what's going on, maybe enable LD_DEBUG and
see if rtld is getting relocated early for some reason? Or maybe you
could at least get a backtrace, and then we could try to stare at it
and figure out what's going on together?

Maybe you're building with some flags that affect this? I'm only doing
../configure.

Sergey

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 25/34] hurd: Improve reply port handling when exiting signal handlers
  2023-03-19 15:10 ` [RFC PATCH glibc 25/34] hurd: Improve reply port handling when exiting signal handlers Sergey Bugaev
  2023-04-10 22:03   ` Samuel Thibault
@ 2023-04-12 22:54   ` Samuel Thibault
  1 sibling, 0 replies; 140+ messages in thread
From: Samuel Thibault @ 2023-04-12 22:54 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: libc-alpha, bug-hurd

Hello,

Sergey Bugaev, le dim. 19 mars 2023 18:10:08 +0300, a ecrit:
> Also, use mach_port_mod_refs () and not mach_port_destroy () to destroy
> the receive right. mach_port_destroy () should *never* be used on
> mach_task_self (); this can easily lead to port use-after-free
> vulnerabilities if the task has any other references to the same port.

I had to revert the sigreturn part of this, it was making
signal/tst-signal signal/tst-raise signal/tst-minsigstksz-5
htl/tst-raise1 fail.

> Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
> ---
> 
> NOTE: I don't really understand why sigunwind wants to destroy both its
> current reply port and user's reply port. Prior to commit
> fb304035c41c7ee2afede51e5e8568974549ba5e, it was *restoring* the user's
> reply port, in which case it actually made sense to destroy the current
> reply port. Post-fb304035c41c7ee2afede51e5e8568974549ba5e, wouldn't it
> be better to just keep using the current reply port, destroying the
> user's one?
> 
>  hurd/sigunwind.c                   | 24 +++++++++++-------------
>  sysdeps/mach/hurd/i386/sigreturn.c | 21 +++++----------------
>  2 files changed, 16 insertions(+), 29 deletions(-)
> 
> diff --git a/sysdeps/mach/hurd/i386/sigreturn.c b/sysdeps/mach/hurd/i386/sigreturn.c
> index db1a01f3..29c9629f 100644
> --- a/sysdeps/mach/hurd/i386/sigreturn.c
> +++ b/sysdeps/mach/hurd/i386/sigreturn.c
> @@ -101,20 +100,10 @@ __sigreturn (struct sigcontext *scp)
>  
>    /* Destroy the MiG reply port used by the signal handler, and restore the
>       reply port in use by the thread when interrupted.  */
[...]
> -      __mach_port_destroy (__mach_task_self (), port);
> +  __mach_port_mod_refs (__mach_task_self (), reply_port,
> +                        MACH_PORT_RIGHT_RECEIVE, -1);

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 24/34] hurd: Only check for TLS initialization inside rtld or in static builds
  2023-04-12 10:42             ` Sergey Bugaev
  2023-04-12 10:45               ` Samuel Thibault
@ 2023-04-12 23:46               ` Samuel Thibault
  2023-04-13 10:02                 ` Sergey Bugaev
  1 sibling, 1 reply; 140+ messages in thread
From: Samuel Thibault @ 2023-04-12 23:46 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: libc-alpha, bug-hurd

Sergey Bugaev, le mer. 12 avril 2023 13:42:50 +0300, a ecrit:
> before my SSH / network stack died were: (Gmail is surely going to
> wrap this, but hopefully not too badly)
> 
> gcc /home/sergey/glibc/build/elf/dso-sort-tests-src/tst-dso-ordering9_42-bdeca-c.c
> -c -std=gnu11 -fgnu89-inline  -g -O2 -Wall -Wwrite-strings -Wundef
> -Werror -fmerge-all-constants -frounding-math -fno-stack-protector
> -fno-common -Wno-parentheses -Wstrict-prototypes
> -Wold-style-definition -fmath-errno    -fPIC              -I../include
> -I/home/sergey/glibc/build/elf  -I/home/sergey/glibc/build
> -I../sysdeps/mach/hurd/i386  -I../sysdeps/mach/hurd/x86
> -I../sysdeps/mach/hurd/i386/htl  -I../sysdeps/mach/hurd/htl
> -I../sysdeps/hurd/htl  -I../sysdeps/mach/htl  -I../sysdeps/htl/include
> -I../sysdeps/htl  -I../sysdeps/pthread  -I../sysdeps/mach/hurd/x86/htl
>  -I../sysdeps/i386/htl  -I../sysdeps/x86/htl  -I../sysdeps/mach/hurd
> -I../sysdeps/gnu  -I../sysdeps/unix/bsd  -I../sysdeps/unix/inet
> -I../sysdeps/mach/i386  -I../sysdeps/mach/x86
> -I../sysdeps/mach/include -I../sysdeps/mach
> -I../sysdeps/i386/i686/fpu/multiarch  -I../sysdeps/i386/i686/fpu
> -I../sysdeps/i386/i686/multiarch  -I../sysdeps/i386/i686
> -I../sysdeps/i386/fpu  -I../sysdeps/x86/fpu  -I../sysdeps/i386
> -I../sysdeps/x86/include -I../sysdeps/x86  -I../sysdeps/wordsize-32
> -I../sysdeps/ieee754/float128  -I../sysdeps/ieee754/ldbl-96/include
> -I../sysdeps/ieee754/ldbl-96  -I../sysdeps/ieee754/dbl-64
> -I../sysdeps/ieee754/flt-32  -I../sysdeps/hurd/include
> -I../sysdeps/hurd  -I../sysdeps/unix  -I../sysdeps/posix
> -I../sysdeps/ieee754  -I../sysdeps/generic -I../hurd
> -I/home/sergey/glibc/build/hurd/ -I../mach
> -I/home/sergey/glibc/build/mach/ -I.. -I../libio -I.
> -D_LIBC_REENTRANT -include /home/sergey/glibc/build/libc-modules.h
> -DMODULE_NAME=testsuite -include ../include/libc-symbols.h  -DPIC
> -DSHARED     -DTOP_NAMESPACE=glibc -o
> /home/sergey/glibc/build/elf/tst-dso-ordering9-dir/tst-dso-ordering9_42-bdeca-c.os
> client_loop: send disconnect: Broken pipe
> 
> ...but that doesn't seem useful.

Perhaps you can pipe to tee -a build.log?

> This is what's shipped in Debian, i.e. prior to my changes. As you can
> see, the libc.so version accesses %gs:0x0 without any checks, which
> makes sense, since __errno_location is just return &errno, 'errno'
> itself being a thread-local. There is no __LIBC_NO_TLS check in the
> source code. And yet it works just fine!

But possibly that's just because the ld.so code before setting up tls
doesn't access errno.

> > > Would it have been easy for me to run the full test suite, I would
> > > surely do that before submitting any patches. But it's not.
> >
> > Then it's simple: we have to fix that first.
> 
> If that's simple to fix, great!
> 
> Can you reproduce my issues?

No :/

> > > > You can run on master to get the list of current expected failures.
> > >
> > > But that's the thing, I can not :|
> >
> > I meant after having fixed the tests that break your testing, by
> > disabling them as I hinted.
> 
> Alright, after spending a day trying to make this work, I declare this
> a lost cause.

Ergl, sorry it ate up that much time :/

> I have disabled the two tests you suggested, and some more that seemed
> to behave particularly bad.

Which one? I have been running glibc's testsuite safely for several
years now.

> It still always kills / hard-locks my system, at seemingly random
> places.

Mmm, what is your system setup in terms of disk drivers and alike? As
of now, I am using the the Debian 1.8+git20230410-486-dbg kernel, the
gnumach AHCI disk drivers. I have 3635000KB of memory showing up as
total ni `free` (kvm -m 3550M, the maximum one can have with <4G phys
addressing).

Perhaps one thing worth noting: my /tmp is on the real disk, not a
tmpfs.

> This means fs corruption, each time, so I'm not willing to try doing
> this again and again.

I understand, but since it's apparently random, this looks like a
problem on your system, not related to glibc specifically, that you'll
probably want to fix anyway.

> Is there any other way for me to reproduce the crashes? If you can
> reproduce them, can you see what's going on, maybe enable LD_DEBUG and
> see if rtld is getting relocated early for some reason? Or maybe you
> could at least get a backtrace, and then we could try to stare at it
> and figure out what's going on together?
> 
> Maybe you're building with some flags that affect this? I'm only doing
> ../configure.

I'm using

../configure --prefix= --enable-pt_chown

I have uploaded the build result of master +
b37899d34d2190ef4b454283188f22519f096048 restored on:

https://dept-info.labri.fr/~thibault/tmp/libc.so.0.3
https://dept-info.labri.fr/~thibault/tmp/ld.so
https://dept-info.labri.fr/~thibault/tmp/test-as-const-rtld-sizes

you can run it by hand with
./ld.so --library-path $PWD ./test-as-const-rtld-sizes

It hangs on my system. I have put the core dump on 

https://dept-info.labri.fr/~thibault/tmp/core.18601

which can be inspected with 

gdb ./ld.so core.18601


Running live gdb ./ld.so 18529, I get:

(gdb) thread apply all bt

Thread 2 (Thread 18529.2):
#0  0x0102aa3c in __GI___mach_msg_trap () at /usr/src/glibc-upstream/build/mach/mach_msg_trap.S:2
#1  0x0102b1d6 in __GI___mach_msg (msg=0x1315d10, option=3, send_size=64, rcv_size=32, rcv_name=0, timeout=0, notify=0) at msg.c:111
#2  0x012c9850 in __gsync_wait (task=<optimized out>, addr=<optimized out>, val1=<optimized out>, val2=<optimized out>, msec=<optimized out>, flags=<optimized out>) at ./build-tree/hurd-i386-libc/mach/RPC_gsync_wait.c:186
#3  0x0104631b in __GI___spin_lock (__lock=0x12bb844 <_hurd_siglock>) at ../mach/lock-intern.h:60
#4  __GI___mutex_lock (__lock=0x12bb844 <_hurd_siglock>) at ../mach/lock-intern.h:119
#5  __GI__hurd_thread_sigstate (thread=<optimized out>) at hurdsig.c:80
#6  0x0116abb8 in _hurd_critical_section_lock () at ../hurd/hurd/signal.h:230
#7  _hurd_fd_get (fd=2) at ../hurd/hurd/fd.h:74
#8  __GI___write_nocancel (fd=2, buf=0x1315e60, nbytes=<optimized out>) at ../sysdeps/mach/hurd/write_nocancel.c:26
#9  0x01149135 in __GI___libc_write (fd=2, buf=0x1315e60, nbytes=41) at ../sysdeps/mach/hurd/write.c:26
#10 0x0116ff07 in __GI___writev (fd=<optimized out>, vector=<optimized out>, count=<optimized out>) at ../sysdeps/posix/writev.c:87
#11 0x010b9df5 in writev_for_fatal (fd=<optimized out>, total=<optimized out>, niov=<optimized out>, iov=<optimized out>) at ../sysdeps/posix/libc_fatal.c:44
#12 __libc_message (fmt=<optimized out>) at ../sysdeps/posix/libc_fatal.c:124
#13 0x010b9ead in __GI___libc_fatal (message=0x12216b4 "hurd: Can't add reference on Mach thread\n") at ../sysdeps/posix/libc_fatal.c:159
#14 0x01046524 in __GI__hurd_thread_sigstate (thread=<optimized out>) at hurdsig.c:136
#15 0x0103fd33 in __GI__hurd_self_sigstate () at ../hurd/hurd/signal.h:173
#16 _hurd_msgport_receive (arg=<error reading variable: Cannot access memory at address 0x1316004>) at msgportdemux.c:47
Backtrace stopped: Cannot access memory at address 0x1316000

Thread 1 (Thread 18529.1):
#0  0x0102aa3c in __GI___mach_msg_trap () at /usr/src/glibc-upstream/build/mach/mach_msg_trap.S:2
#1  0x0102b1d6 in __GI___mach_msg (msg=0x10018dc, option=3, send_size=64, rcv_size=32, rcv_name=31, timeout=0, notify=0) at msg.c:111
#2  0x012c9850 in __gsync_wait (task=<optimized out>, addr=<optimized out>, val1=<optimized out>, val2=<optimized out>, msec=<optimized out>, flags=<optimized out>) at ./build-tree/hurd-i386-libc/mach/RPC_gsync_wait.c:186
#3  0x01110cb7 in __GI___spin_lock (__lock=<optimized out>) at ../mach/lock-intern.h:60
#4  __GI___mutex_lock (__lock=<optimized out>) at ../mach/lock-intern.h:119
#5  __GI__Fork () at ../sysdeps/mach/hurd/_Fork.c:116
#6  0x01110892 in __libc_fork () at fork.c:74
#7  0x010089af in ?? ()


(gdb) thread apply all bt full

Thread 2 (Thread 18529.2):
#0  0x0102aa3c in __GI___mach_msg_trap () at /usr/src/glibc-upstream/build/mach/mach_msg_trap.S:2
No locals.
#1  0x0102b1d6 in __GI___mach_msg (msg=0x1315d10, option=3, send_size=64, rcv_size=32, rcv_name=0, timeout=0, notify=0) at msg.c:111
        ret = <optimized out>
#2  0x012c9850 in __gsync_wait (task=<optimized out>, addr=<optimized out>, val1=<optimized out>, val2=<optimized out>, msec=<optimized out>, flags=<optimized out>) at ./build-tree/hurd-i386-libc/mach/RPC_gsync_wait.c:186
        Mess = {In = {Head = {msgh_bits = 5395, msgh_size = 64, {msgh_remote_port = 36, msgh_remote_port_do_not_use = 36}, {msgh_local_port = 0, msgh_protected_payload = 0}, msgh_seqno = 0, msgh_id = 4204}, addrType = {msgt_name = 2, msgt_size = 32, msgt_number = 1, msgt_inline = 1, msgt_longform = 0, msgt_deallocate = 0, msgt_unused = 0}, addr = 19642436, val1Type = {msgt_name = 2, msgt_size = 32, msgt_number = 1, msgt_inline = 1, msgt_longform = 0, msgt_deallocate = 0, msgt_unused = 0}, val1 = 2, val2Type = {msgt_name = 2, msgt_size = 32, msgt_number = 1, msgt_inline = 1, msgt_longform = 0, msgt_deallocate = 0, msgt_unused = 0}, val2 = 0, msecType = {msgt_name = 2, msgt_size = 32, msgt_number = 1, msgt_inline = 1, msgt_longform = 0, msgt_deallocate = 0, msgt_unused = 0}, msec = 0, flagsType = {msgt_name = 2, msgt_size = 32, msgt_number = 1, msgt_inline = 1, msgt_longform = 0, msgt_deallocate = 0, msgt_unused = 0}, flags = 0}, Out = {Head = {msgh_bits = 5395, msgh_size = 64, {msgh_remote_port = 36, msgh_remote_port_do_not_use = 36}, {msgh_local_port = 0, msgh_protected_payload = 0}, msgh_seqno = 0, msgh_id = 4204}, RetCodeType = {msgt_name = 2, msgt_size = 32, msgt_number = 1, msgt_inline = 1, msgt_longform = 0, msgt_deallocate = 0, msgt_unused = 0}, RetCode = 19642436}}
        InP = 0x1315d10
        OutP = 0x1315d10
        msg_result = <optimized out>
#3  0x0104631b in __GI___spin_lock (__lock=0x12bb844 <_hurd_siglock>) at ../mach/lock-intern.h:60
        __iptr = 0x12bb844 <_hurd_siglock>
        __flags = 0
#4  __GI___mutex_lock (__lock=0x12bb844 <_hurd_siglock>) at ../mach/lock-intern.h:119
No locals.
#5  __GI__hurd_thread_sigstate (thread=<optimized out>) at hurdsig.c:80
        ss = <optimized out>
#6  0x0116abb8 in _hurd_critical_section_lock () at ../hurd/hurd/signal.h:230
        self = 28
        ss = <optimized out>
        ss = <optimized out>
        self = <optimized out>
#7  _hurd_fd_get (fd=2) at ../hurd/hurd/fd.h:74
        __hurd_critical__ = <optimized out>
        descriptor = <optimized out>
        descriptor = <optimized out>
        __hurd_critical__ = <optimized out>
        cell = <optimized out>
#8  __GI___write_nocancel (fd=2, buf=0x1315e60, nbytes=<optimized out>) at ../sysdeps/mach/hurd/write_nocancel.c:26
        descriptor = <optimized out>
        err = <optimized out>
#9  0x01149135 in __GI___libc_write (fd=2, buf=0x1315e60, nbytes=41) at ../sysdeps/mach/hurd/write.c:26
        ret = <optimized out>
        cancel_oldtype = 0
#10 0x0116ff07 in __GI___writev (fd=<optimized out>, vector=<optimized out>, count=<optimized out>) at ../sysdeps/posix/writev.c:87
        bytes = <optimized out>
        buffer = <optimized out>
        malloced_buffer = 0x0
        to_copy = <optimized out>
        bp = <optimized out>
        bytes_written = <optimized out>
#11 0x010b9df5 in writev_for_fatal (fd=<optimized out>, total=<optimized out>, niov=<optimized out>, iov=<optimized out>) at ../sysdeps/posix/libc_fatal.c:44
        __result = <optimized out>
#12 __libc_message (fmt=<optimized out>) at ../sysdeps/posix/libc_fatal.c:124
        iov = <optimized out>
        total = 41
        buf = <optimized out>
        ap = 0x1315f6c "\001"
        fd = <optimized out>
        list = <optimized out>
        nlist = <optimized out>
        cp = <optimized out>
#13 0x010b9ead in __GI___libc_fatal (message=0x12216b4 "hurd: Can't add reference on Mach thread\n") at ../sysdeps/posix/libc_fatal.c:159
--Type <RET> for more, q to quit, c to continue without paging--
No locals.
#14 0x01046524 in __GI__hurd_thread_sigstate (thread=<optimized out>) at hurdsig.c:136
        err = <optimized out>
        s = <optimized out>
        ss = <optimized out>
#15 0x0103fd33 in __GI__hurd_self_sigstate () at ../hurd/hurd/signal.h:173
        self = 28
        ss = 0x0
        ss = <optimized out>
        self = <optimized out>
#16 _hurd_msgport_receive (arg=<error reading variable: Cannot access memory at address 0x1316004>) at msgportdemux.c:47
No locals.
Backtrace stopped: Cannot access memory at address 0x1316000

Thread 1 (Thread 18529.1):
#0  0x0102aa3c in __GI___mach_msg_trap () at /usr/src/glibc-upstream/build/mach/mach_msg_trap.S:2
No locals.
#1  0x0102b1d6 in __GI___mach_msg (msg=0x10018dc, option=3, send_size=64, rcv_size=32, rcv_name=31, timeout=0, notify=0) at msg.c:111
        ret = <optimized out>
#2  0x012c9850 in __gsync_wait (task=<optimized out>, addr=<optimized out>, val1=<optimized out>, val2=<optimized out>, msec=<optimized out>, flags=<optimized out>) at ./build-tree/hurd-i386-libc/mach/RPC_gsync_wait.c:186
        Mess = {In = {Head = {msgh_bits = 4608, msgh_size = 32, {msgh_remote_port = 0, msgh_remote_port_do_not_use = 0}, {msgh_local_port = 31, msgh_protected_payload = 31}, msgh_seqno = 29, msgh_id = 4304}, addrType = {msgt_name = 2, msgt_size = 32, msgt_number = 1, msgt_inline = 1, msgt_longform = 0, msgt_deallocate = 0, msgt_unused = 0}, addr = 28, val1Type = {msgt_name = 2, msgt_size = 32, msgt_number = 1, msgt_inline = 1, msgt_longform = 0, msgt_deallocate = 0, msgt_unused = 0}, val1 = 2, val2Type = {msgt_name = 2, msgt_size = 32, msgt_number = 1, msgt_inline = 1, msgt_longform = 0, msgt_deallocate = 0, msgt_unused = 0}, val2 = 0, msecType = {msgt_name = 2, msgt_size = 32, msgt_number = 1, msgt_inline = 1, msgt_longform = 0, msgt_deallocate = 0, msgt_unused = 0}, msec = 0, flagsType = {msgt_name = 2, msgt_size = 32, msgt_number = 1, msgt_inline = 1, msgt_longform = 0, msgt_deallocate = 0, msgt_unused = 0}, flags = 0}, Out = {Head = {msgh_bits = 4608, msgh_size = 32, {msgh_remote_port = 0, msgh_remote_port_do_not_use = 0}, {msgh_local_port = 31, msgh_protected_payload = 31}, msgh_seqno = 29, msgh_id = 4304}, RetCodeType = {msgt_name = 2, msgt_size = 32, msgt_number = 1, msgt_inline = 1, msgt_longform = 0, msgt_deallocate = 0, msgt_unused = 0}, RetCode = 28}}
        InP = 0x10018dc
        OutP = 0x10018dc
        msg_result = <optimized out>
#3  0x01110cb7 in __GI___spin_lock (__lock=<optimized out>) at ../mach/lock-intern.h:60
        __iptr = <optimized out>
        __flags = 0
#4  __GI___mutex_lock (__lock=<optimized out>) at ../mach/lock-intern.h:119
No locals.
#5  __GI__Fork () at ../sysdeps/mach/hurd/_Fork.c:116
        newtask = 19675056
        thread_refs = 16831952
        sigthread_refs = 19762984
        state = {gs = 16784272, fs = 16784276, es = 134259806, ds = 16806696, edi = 16784276, esi = 134441884, ebp = 1, esp = 16832864, ebx = 5, edx = 0, ecx = 1, eax = 134441520, eip = 16777324, cs = 0, efl = 0, uesp = 134438900, ss = 19640256}
        threads = 0x0
        stopped = 0
        newproc = 134438900
        nportnames = 0
        thread = 16927252
        sigthread = 19674880
        statecount = 19760428
        portnames = 0x0
        nporttypes = 0
        porttypes = 0x0
        nthreads = 0
        ports_locked = 0
        env = {{__jmpbuf = {19974152, 19974152, 0, 0, 16783680, 17894163}, __mask_was_saved = 0, __saved_mask = 134441992}}
        pid = 134438900
        i = 16807887
        err = <optimized out>
        ss = 0x130c808
        __PRETTY_FUNCTION__ = "_Fork"
        lose = <optimized out>
#6  0x01110892 in __libc_fork () at fork.c:74
        multiple_threads = true
        lastrun = 0
--Type <RET> for more, q to quit, c to continue without paging--
        nss_database_data = {nsswitch_conf = {size = 75406264232385142, ino = 84360991733424116, mtime = {tv_sec = 577421931782412918, tv_nsec = 16826440}, ctime = {tv_sec = 72187705911477250, tv_nsec = 134441520}}, services = {0x8036c08, 0x100d960, 0x1, 0x5, 0x0, 0x90, 0x8035ff4, 0x1007588, 0x16, 0x54, 0x107aaf6 <__GI_getenv+102>, 0x1018cf8, 0x1110850 <__libc_fork>, 0xe, 0x0, 0x801033d <_dl_fixup+13>, 0x100bff4}, reload_disabled = 16784548, initialized = false}
        pid = <optimized out>
#7  0x010089af in ?? ()
No symbol table info available.
Backtrace stopped: previous frame inner to this frame (corrupt stack?)



Interestingly, watching for the $gs update:

€ gdb --args ./ld.so --library-path=/tmp ./test-as-const-rtld-sizes
(gdb) b _start
Breakpoint 1 at 0x1a5a0
(gdb) r
Starting program: /tmp/ld.so --library-path /tmp ./test-as-const-rtld-sizes

Thread 5 hit Breakpoint 1, 0x0801a5a0 in _start ()
(gdb) watch $gs
Watchpoint 2: $gs
(gdb) c
Continuing.

Thread 5 hit Watchpoint 2: $gs

Old value = 31
New value = 75
_hurd_tls_init (tcb=0x100e6c0) at ../sysdeps/mach/hurd/i386/tls.h:179
179       __hurd_reply_port0 = MACH_PORT_NULL;
(gdb) bt
#0  _hurd_tls_init (tcb=0x100e6c0) at ../sysdeps/mach/hurd/i386/tls.h:179
#1  call_tls_init_tp (addr=0x100e6c0) at ../sysdeps/generic/dl-call_tls_init_tp.h:31
#2  init_tls (naudit=naudit@entry=0) at rtld.c:797
#3  0x0801db49 in dl_main (phdr=<optimized out>, phnum=<optimized out>, user_entry=<optimized out>, auxv=<optimized out>)
    at rtld.c:2046
#4  0x0801a07d in go (argdata=0x1001d50) at ../sysdeps/mach/hurd/dl-sysdep.c:172
#5  0x0801fa13 in _hurd_startup (argptr=<optimized out>, main=<optimized out>) at hurdstartup.c:184
#6  0x08019ee5 in _dl_sysdep_start (start_argptr=0x1002000, dl_main=0x801b810 <dl_main>)
    at ../sysdeps/mach/hurd/dl-sysdep.c:229
#7  0x0801b565 in _dl_start_final (arg=<optimized out>) at rtld.c:495
#8  _dl_start (arg=<optimized out>) at rtld.c:582
#9  0x0801a5ab in _start () from /tmp/ld.so

At that point the library loading has happened:

(gdb) info sharedlibrary 
From        To          Syms Read   Shared Object Library
0x08000db0  0x080256e1  Yes         /tmp/ld.so
0x0102a650  0x01200d35  No          /tmp/libc.so.0.3
0x012c49a0  0x012d0ad4  No          /tmp/libmachuser.so.1
0x012e0bc0  0x012fee50  No          /tmp/libhurduser.so.0.3

And the function symbols indeed seem to have been overloaded:

(gdb) l __write
384     __write (int fd, const void *buf, size_t nbytes)
385     {
386       error_t err;
387       vm_size_t nwrote;
388
389       assert (fd < _hurd_init_dtablesize);


That is why I'm thinking that apparently exposing the libc functions
happens before setting up TLS, and thus potential for mayhem if libc
assumes that TLS is set up. The loading itself is apparently done in the
_dl_map_object_deps call of dl_main.

Samuel

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 24/34] hurd: Only check for TLS initialization inside rtld or in static builds
  2023-04-12 23:46               ` Samuel Thibault
@ 2023-04-13 10:02                 ` Sergey Bugaev
  2023-04-13 10:10                   ` Samuel Thibault
  0 siblings, 1 reply; 140+ messages in thread
From: Sergey Bugaev @ 2023-04-13 10:02 UTC (permalink / raw)
  To: Samuel Thibault; +Cc: libc-alpha, bug-hurd

Wow, this is great, thank you! You've really gone above and beyond
compared to what I expected you to do.

Some replies below; will reply to other points later.

On Thu, Apr 13, 2023 at 2:47 AM Samuel Thibault <samuel.thibault@gnu.org> wrote:
> > Maybe you're building with some flags that affect this? I'm only doing
> > ../configure.
>
> I'm using
>
> ../configure --prefix= --enable-pt_chown

Yeah, that shouldn't influence anything vs what I have.

> I have uploaded the build result of master +
> b37899d34d2190ef4b454283188f22519f096048 restored on:
>
> https://dept-info.labri.fr/~thibault/tmp/libc.so.0.3
> https://dept-info.labri.fr/~thibault/tmp/ld.so
> https://dept-info.labri.fr/~thibault/tmp/test-as-const-rtld-sizes
>
> you can run it by hand with
> ./ld.so --library-path $PWD ./test-as-const-rtld-sizes
>
> It hangs on my system. I have put the core dump on
>
> https://dept-info.labri.fr/~thibault/tmp/core.18601
>
> which can be inspected with
>
> gdb ./ld.so core.18601

Thank you, I'm going to take a look.

> Running live gdb ./ld.so 18529, I get:
>
> (gdb) thread apply all bt
>
> Thread 2 (Thread 18529.2):
> #0  0x0102aa3c in __GI___mach_msg_trap () at /usr/src/glibc-upstream/build/mach/mach_msg_trap.S:2
> #1  0x0102b1d6 in __GI___mach_msg (msg=0x1315d10, option=3, send_size=64, rcv_size=32, rcv_name=0, timeout=0, notify=0) at msg.c:111
> #2  0x012c9850 in __gsync_wait (task=<optimized out>, addr=<optimized out>, val1=<optimized out>, val2=<optimized out>, msec=<optimized out>, flags=<optimized out>) at ./build-tree/hurd-i386-libc/mach/RPC_gsync_wait.c:186
> #3  0x0104631b in __GI___spin_lock (__lock=0x12bb844 <_hurd_siglock>) at ../mach/lock-intern.h:60
> #4  __GI___mutex_lock (__lock=0x12bb844 <_hurd_siglock>) at ../mach/lock-intern.h:119
> #5  __GI__hurd_thread_sigstate (thread=<optimized out>) at hurdsig.c:80
> #6  0x0116abb8 in _hurd_critical_section_lock () at ../hurd/hurd/signal.h:230
> #7  _hurd_fd_get (fd=2) at ../hurd/hurd/fd.h:74
> #8  __GI___write_nocancel (fd=2, buf=0x1315e60, nbytes=<optimized out>) at ../sysdeps/mach/hurd/write_nocancel.c:26
> #9  0x01149135 in __GI___libc_write (fd=2, buf=0x1315e60, nbytes=41) at ../sysdeps/mach/hurd/write.c:26
> #10 0x0116ff07 in __GI___writev (fd=<optimized out>, vector=<optimized out>, count=<optimized out>) at ../sysdeps/posix/writev.c:87
> #11 0x010b9df5 in writev_for_fatal (fd=<optimized out>, total=<optimized out>, niov=<optimized out>, iov=<optimized out>) at ../sysdeps/posix/libc_fatal.c:44
> #12 __libc_message (fmt=<optimized out>) at ../sysdeps/posix/libc_fatal.c:124
> #13 0x010b9ead in __GI___libc_fatal (message=0x12216b4 "hurd: Can't add reference on Mach thread\n") at ../sysdeps/posix/libc_fatal.c:159
> #14 0x01046524 in __GI__hurd_thread_sigstate (thread=<optimized out>) at hurdsig.c:136
> #15 0x0103fd33 in __GI__hurd_self_sigstate () at ../hurd/hurd/signal.h:173
> #16 _hurd_msgport_receive (arg=<error reading variable: Cannot access memory at address 0x1316004>) at msgportdemux.c:47
> Backtrace stopped: Cannot access memory at address 0x1316000

So the immediate cause of the hang is we deadlock trying to take the
_hurd_siglock while already holding it (inside #14 0x01046524 in
__GI__hurd_thread_sigstate), since it's just a non-recursive struct
mutex. We should probably write our own version of writev_for_fatal
that does no locking (other than maybe trylock) and tries to not touch
any TLS or sigstate. Like, just grab the port from _hurd_dtable (with
no critical sections, no nothin') and call io_write on it (with the
regular non-intr mach_msg).

That, and abort () should be more careful with locking the sigstate
too, in order not to fault and/or deadlock if sigstate / TLS is
broken. Well, in this case we didn't even get to abort (), we
deadlocked on the write, but abort would be next.

But the underlying issue is that the thread port is bogus, which --
what? How can this even happen? This is not even some other thread's
port (maybe a thread could die and then its port right would turn into
a dead name, and then mach_port_mod_refs would return
KERN_INVALID_RIGHT if you try to add a send right...), this is our
very own thread port, the result of mach_thread_self () which was
called just several moments ago in hurd_self_sigstate ()!

If we're trying to tie this to TLS somehow, maybe the port is fine,
but the mach_port_mod_refs RPS fails because something is off with the
reply port. But also note that at this point we're well into libc.so
(this is the msgport thread already, and the other thread below is
already running user's code!), so clearly the TLS must have been set
up (and not by TLS_INIT_TP, this is not the main thread). And since we
managed to create the thread (which is done in libc.so, not ld.so),
TLS must have been OK in the main thread too (thread_create is not a
direct syscall).

And if TLS wasn't set up, I'd expect a TLS access to segfault or
busfault or something, not to read bogus data -- or am I wrong? what
does $gs_base initially point to, before it's set up? I would assume
it's either just 0x0, or the %gs:something read does not work at all
(SIGBUS).

> Interestingly, watching for the $gs update:
>
> € gdb --args ./ld.so --library-path=/tmp ./test-as-const-rtld-sizes
> (gdb) b _start
> Breakpoint 1 at 0x1a5a0
> (gdb) r
> Starting program: /tmp/ld.so --library-path /tmp ./test-as-const-rtld-sizes
>
> Thread 5 hit Breakpoint 1, 0x0801a5a0 in _start ()
> (gdb) watch $gs
> Watchpoint 2: $gs
> (gdb) c
> Continuing.

Cool, I didn't know you could watch a register like that -- although
it appears to be super slow, so it must be not using hardware
watchpoints.

> At that point the library loading has happened:
>
> (gdb) info sharedlibrary
> From        To          Syms Read   Shared Object Library
> 0x08000db0  0x080256e1  Yes         /tmp/ld.so
> 0x0102a650  0x01200d35  No          /tmp/libc.so.0.3
> 0x012c49a0  0x012d0ad4  No          /tmp/libmachuser.so.1
> 0x012e0bc0  0x012fee50  No          /tmp/libhurduser.so.0.3
>
> And the function symbols indeed seem to have been overloaded:
>
> (gdb) l __write
> 384     __write (int fd, const void *buf, size_t nbytes)
> 385     {
> 386       error_t err;
> 387       vm_size_t nwrote;
> 388
> 389       assert (fd < _hurd_init_dtablesize);
>
>
> That is why I'm thinking that apparently exposing the libc functions
> happens before setting up TLS, and thus potential for mayhem if libc
> assumes that TLS is set up. The loading itself is apparently done in the
> _dl_map_object_deps call of dl_main.

Well, if that's why you're thinking libc.so functions are already in
use by ld.so, this will be easy to disprove :)

GDB is super cool, but it's not *that* smart. When you "l __write", it
likely just looks through the "loaded" DSOs and finds the symbol,
looks up its debuginfo, then source, and prints that. It may even say
that there are several places where a symbol with the same name is
defined. Here's what I get (on a different executable):

Thread 4 hit Temporary breakpoint 1, 0x080483f0 in main ()
(gdb) l __write
file: "../sysdeps/mach/hurd/dl-sysdep.c", line number: 389, symbol: "__write"
384     ../sysdeps/mach/hurd/dl-sysdep.c: No such file or directory.
file: "../sysdeps/mach/hurd/write.c", line number: 25, symbol:
"__GI___libc_write"
20      ../sysdeps/mach/hurd/write.c: No such file or directory.

Point is, GDB can look up symbols in DSOs, but it doesn't understand
symbol resolution rules: RTLD_LOCAL vs GLOBAL, linking namespaces,
whether a DSO has already been relocated or not, all of those things.

What you should really check is not what GDB prints on "l __write",
but rather what the GOT/PLT slots inside ld.so contain; that is where
ld.so will jump when it calls the functions. Here's an annotated GDB
session (with upstream Debian's glibc):

$ gdb -q ./hello
Reading symbols from ./hello...
# Start running so gdb can resolve addresses & symbols inside ld.so:
(gdb) starti
Starting program: /home/bugaevc/hello
Thread 4 stopped.
0x0001d550 in _start () from /lib/ld.so
# Let's look at the GOT/PLT entry for __write (actually __write_nocancel):
(gdb) p &'__write_nocancel@got.plt'
$1 = (<text from jump slot in .got.plt, no debug info> *) 0x36034
<__write_nocancel@got.plt>
(gdb) p '__write_nocancel@got.plt'
$2 = (<text from jump slot in .got.plt, no debug info>) 0xde6
# The entry itself is at 0x36034 (this will come in useful later), but
as of _start, it contains garbage (which is to be expected). Now let's
advance to TLS setup, and check again:
(gdb) advance __i386_set_gdt
__i386_set_gdt (target_thread=96, selector=0x1037b94, desc=...) at
./build-tree/hurd-i386-libc/mach/RPC_i386_set_gdt.c:79
79      ./build-tree/hurd-i386-libc/mach/RPC_i386_set_gdt.c: No such
file or directory.
(gdb) p '__write_nocancel@got.plt'
$3 = (<text from jump slot in .got.plt, no debug info>) 0x1c1f0 <__write>
# See, now the PLT entry points to __write. But whose __write this is?
(gdb) info symbol 0x1c1f0
__write_nocancel in section .text of /lib/ld.so
# It's ld.so's! That's because it has initially relocated itself so
that its symbols point back to itself.
# And now let's advance to where the signal thread is set up:
(gdb) tb _hurdsig_init
Function "_hurdsig_init" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Temporary breakpoint 1 (_hurdsig_init) pending.
(gdb) c
Continuing.
Thread 4 hit Temporary breakpoint 1, _hurdsig_init
(intarray=0x103c000, intarraysize=5) at ./hurd/hurdsig.c:1453
1453    ./hurd/hurdsig.c: No such file or directory.
# Sanity check: are we inside libc.so now?
(gdb) info symbol $eip
_hurdsig_init in section .text of /lib/i386-gnu/libc.so.0.3
# Yes we are, good. Let's look at the PLT entry:
(gdb) p '__write_nocancel@got.plt'
$4 = (<text from jump slot in .got.plt, no debug info>) 0x11b5820
<__GI___write_nocancel>
# Huh, it clearly points to a different __write_nocancel now! But
whose PLT entry are we looking at now, ld.so's or libc.so's? Who
knows, let's put in that address from above explicitly:
(gdb) p *(void**) 0x36034
$5 = (void *) 0x11b5820 <__GI___write_nocancel>
# And just to be very sure, this is libc.so's __write_nocancel, right?
(gdb) info symbol 0x11b5820
__write_nocancel in section .text of /lib/i386-gnu/libc.so.0.3
# Right :)

Hope I'm making my point clear: "l __write" is no basis to suspect
that ld.so has already been bound to libc.so function. Something else
must be going on.

I'll be back with more results, and thank you again.

Sergey

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 24/34] hurd: Only check for TLS initialization inside rtld or in static builds
  2023-04-13 10:02                 ` Sergey Bugaev
@ 2023-04-13 10:10                   ` Samuel Thibault
  2023-04-13 12:17                     ` Sergey Bugaev
  0 siblings, 1 reply; 140+ messages in thread
From: Samuel Thibault @ 2023-04-13 10:10 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: libc-alpha, bug-hurd

Sergey Bugaev via Libc-alpha, le jeu. 13 avril 2023 13:02:58 +0300, a ecrit:
> this is our very own thread port, the result of mach_thread_self ()
> which was called just several moments ago in hurd_self_sigstate ()!

IIRC this is cached inside glibc... in a TLS variable probably. And thus
if that cache is not properly set up because TLS/non-TLS is not clear at
some point, mayhem happens :)

> > (gdb) watch $gs
> > Watchpoint 2: $gs
> > (gdb) c
> > Continuing.
> 
> Cool, I didn't know you could watch a register like that -- although
> it appears to be super slow, so it must be not using hardware
> watchpoints.

Yes, it's all software. Gdb can do a lot in software, it's just very slow :)

> What you should really check is not what GDB prints on "l __write",
> but rather what the GOT/PLT slots inside ld.so contain;

Yes, sure, I just don't have time to dive into that.

Samuel

^ permalink raw reply	[flat|nested] 140+ messages in thread

* [RFC PATCH glibc v2 26/34] hurd: Remove __hurd_local_reply_port
  2023-04-11 20:18       ` Samuel Thibault
@ 2023-04-13 11:58         ` Sergey Bugaev
  2023-04-13 13:12           ` Samuel Thibault
  2023-04-14 17:33           ` Samuel Thibault
  0 siblings, 2 replies; 140+ messages in thread
From: Sergey Bugaev @ 2023-04-13 11:58 UTC (permalink / raw)
  To: libc-alpha, bug-hurd, Samuel Thibault; +Cc: Sergey Bugaev

Now that the signal code no longer accesses it, the only real user of it
was mig-reply.c, so move the logic for managing the port there.

If we're in SHARED and outside of rtld, we know that __LIBC_NO_TLS ()
always evaluates to 0, and a TLS reply port will always be used, not
__hurd_reply_port0. Still, the compiler does not see that
__hurd_reply_port0 is never used due to its address being taken. To deal
with this, explicitly compile out __hurd_reply_port0 when we know we
won't use it.

Also, instead of accessing the port via THREAD_SELF->reply_port, this
uses THREAD_GETMEM and THREAD_SETMEM directly, avoiding possible
miscompilations.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
---
Changes since v1:
* Only deallocate the port in __mig_dealloc_reply_port if it's the same
  as the stored port, because of signals.
* Add a comment detailing the reasoning.
* Add two assertions: that ARG and PORT are exactly the same (unless PORT
   has been invalidated), and that we succeed deallocating PORT.

NOTE: Completely untested! Do your own testing! You have been warned!

 hurd/hurd/threadvar.h         |  7 ----
 sysdeps/mach/hurd/mig-reply.c | 70 +++++++++++++++++++++++++++++------
 2 files changed, 58 insertions(+), 19 deletions(-)

diff --git a/hurd/hurd/threadvar.h b/hurd/hurd/threadvar.h
index f5c6a278..c476d988 100644
--- a/hurd/hurd/threadvar.h
+++ b/hurd/hurd/threadvar.h
@@ -29,11 +29,4 @@
 extern unsigned long int __hurd_sigthread_stack_base;
 extern unsigned long int __hurd_sigthread_stack_end;
 
-/* Store the MiG reply port reply port until we enable TLS.  */
-extern mach_port_t __hurd_reply_port0;
-
-/* This returns either the TLS reply port variable, or a single-thread variable
-   when TLS is not initialized yet.  */
-#define __hurd_local_reply_port (*(__LIBC_NO_TLS () ? &__hurd_reply_port0 : &THREAD_SELF->reply_port))
-
 #endif	/* hurd/threadvar.h */
diff --git a/sysdeps/mach/hurd/mig-reply.c b/sysdeps/mach/hurd/mig-reply.c
index 33ff260e..3fdee80e 100644
--- a/sysdeps/mach/hurd/mig-reply.c
+++ b/sysdeps/mach/hurd/mig-reply.c
@@ -17,22 +17,46 @@
 
 #include <mach.h>
 #include <mach/mig_support.h>
-#include <hurd/threadvar.h>
+#include <tls.h>
 
 /* These functions are called by MiG-generated code.  */
 
+#if !defined (SHARED) || IS_IN (rtld)
 mach_port_t __hurd_reply_port0;
+#endif
+
+static mach_port_t
+get_reply_port (void)
+{
+#if !defined (SHARED) || IS_IN (rtld)
+  if (__LIBC_NO_TLS ())
+    return __hurd_reply_port0;
+#endif
+  return THREAD_GETMEM (THREAD_SELF, reply_port);
+}
+
+static void
+set_reply_port (mach_port_t port)
+{
+#if !defined (SHARED) || IS_IN (rtld)
+  if (__LIBC_NO_TLS ())
+    __hurd_reply_port0 = port;
+  else
+#endif
+    THREAD_SETMEM (THREAD_SELF, reply_port, port);
+}
 
 /* Called by MiG to get a reply port.  */
 mach_port_t
 __mig_get_reply_port (void)
 {
-  if (__hurd_local_reply_port == MACH_PORT_NULL
-      || (&__hurd_local_reply_port != &__hurd_reply_port0
-	  && __hurd_local_reply_port == __hurd_reply_port0))
-    __hurd_local_reply_port = __mach_reply_port ();
-
-  return __hurd_local_reply_port;
+  mach_port_t port = get_reply_port ();
+  if (__glibc_unlikely (port == MACH_PORT_NULL))
+    {
+      port = __mach_reply_port ();
+      set_reply_port (port);
+    }
+  return port;
 }
 weak_alias (__mig_get_reply_port, mig_get_reply_port)
 libc_hidden_def (__mig_get_reply_port)
@@ -41,12 +65,34 @@ libc_hidden_def (__mig_get_reply_port)
 void
 __mig_dealloc_reply_port (mach_port_t arg)
 {
-  mach_port_t port = __hurd_local_reply_port;
-  __hurd_local_reply_port = MACH_PORT_NULL;	/* So the mod_refs RPC won't use it.  */
+  error_t err;
+  mach_port_t port = get_reply_port ();
+
+  set_reply_port (MACH_PORT_NULL);	/* So the mod_refs RPC won't use it.  */
+
+  /* Normally, ARG should be the same as PORT that we store.  However, if a
+     signal has interrupted the RPC, the stored PORT has been deallocated and
+     reset to MACH_PORT_NULL (or possibly MACH_PORT_DEAD).  In this case the
+     MIG routine still has the old name, which it passes to us here.  We must
+     not deallocate (or otherwise touch) it, since it may be already allocated
+     to another port right.  Fortunately MIG itself doesn't do anything with
+     the reply port on errors either, other than immediately calling this
+     function.
+
+     And so:
+     1. Assert that things are sane, i.e. and PORT is either invalid or same
+        as ARG.
+     2. Only deallocate the name if our stored PORT still names it.  In that
+        case we're sure the right has not been deallocated / the name reused.
+    */
+
+  if (!MACH_PORT_VALID (port))
+    return;
+  assert (port == arg);
 
-  if (MACH_PORT_VALID (port))
-    __mach_port_mod_refs (__mach_task_self (), port,
-			  MACH_PORT_RIGHT_RECEIVE, -1);
+  err = __mach_port_mod_refs (__mach_task_self (), port,
+                              MACH_PORT_RIGHT_RECEIVE, -1);
+  assert_perror (err);
 }
 weak_alias (__mig_dealloc_reply_port, mig_dealloc_reply_port)
 libc_hidden_def (__mig_dealloc_reply_port)
-- 
2.39.2


^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 24/34] hurd: Only check for TLS initialization inside rtld or in static builds
  2023-04-13 10:10                   ` Samuel Thibault
@ 2023-04-13 12:17                     ` Sergey Bugaev
  2023-04-13 21:47                       ` Samuel Thibault
  0 siblings, 1 reply; 140+ messages in thread
From: Sergey Bugaev @ 2023-04-13 12:17 UTC (permalink / raw)
  To: Samuel Thibault; +Cc: libc-alpha, bug-hurd

Alright, here's some more analysis.

I was unable to fetch your core dump (403), but the test case and
libc/ld all 200'ed, and the crash / hang reproduces -- awesome.

and guess what? Firstly, the error we get from mach_port_mod_refs is
EMACH_RCV_INVALID_NAME 268451842 (ipc/rcv) invalid name
so my hunch that this one reply port was broken turned out correct. So
now looking at how we get it...

(gdb) disas __mig_get_reply_port
Dump of assembler code for function __GI___mig_get_reply_port:
   0x0001c310 <+0>:       call   0x1cb9e2 <__x86.get_pc_thunk.cx>
   0x0001c315 <+5>:       add    $0x28ecdf,%ecx
   0x0001c31b <+11>:      mov    %gs:0x0,%eax
   0x0001c321 <+17>:      mov    0x38(%eax),%edx
   0x0001c324 <+20>:      test   %edx,%edx
   0x0001c326 <+22>:      je     0x1c340 <__GI___mig_get_reply_port+48>
   0x0001c328 <+24>:      lea    0x16d8(%ecx),%ecx
   0x0001c32e <+30>:      add    $0x38,%eax
   0x0001c331 <+33>:      cmp    %ecx,%eax
   0x0001c333 <+35>:      je     0x1c339 <__GI___mig_get_reply_port+41>
   0x0001c335 <+37>:      cmp    (%ecx),%edx
   0x0001c337 <+39>:      je     0x1c340 <__GI___mig_get_reply_port+48>
   0x0001c339 <+41>:      mov    %edx,%eax
   0x0001c33b <+43>:      ret
   0x0001c33c <+44>:      lea    0x0(%esi,%eiz,1),%esi
   0x0001c340 <+48>:      sub    $0xc,%esp
   0x0001c343 <+51>:      call   0x1ba40 <__GI___mach_reply_port>
   0x0001c348 <+56>:      mov    %gs:0x0,%eax
   0x0001c34e <+62>:      mov    0x38(%eax),%eax
   0x0001c351 <+65>:      add    $0xc,%esp
   0x0001c354 <+68>:      ret

That is surely very different from the one I cited in the cover
letter! Look at what it's doing to the result of mach_reply_port (in
%eax) -- it straight-up overwrites it with the tcb pointer.

That is, of course, exactly the __seg_gs miscompilation I reported,
and exactly what "hurd: Remove __hurd_local_reply_port" was supposed
to work around (by not accessing it as THREAD_SELF->reply_port, but
rather using THREAD_SETMEM). I have now sent the second version of
that patch, please try applying it and test if that fixes it.

And the commit that has broken things here was
748511f0bb61785f976e18843d707a8ba8fffe29 ("hurd: i386 TLS tweaks"),
where I made THREAD_SELF (and friends) work through __seg_gs,
triggering the miscompilation. I'm surprised your testing hasn't
caught it earlier, but maybe the extra branch/indirection for the
no-tls case was masking the miscompilation. Please also check if the
other reply port tweak you reverted today is also innocent.

I have uploaded my own builds of libc.so and ld.so at [0] & [1] (but
these are with v1 of "hurd: Remove __hurd_local_reply_port", and with
all of this patchset applied).
[0] https://darnassus.sceen.net/~bugaevc/libc.so
[1] https://darnassus.sceen.net/~bugaevc/ld.so

Please test whether they work on your system.

Sergey

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc v2 26/34] hurd: Remove __hurd_local_reply_port
  2023-04-13 11:58         ` [RFC PATCH glibc v2 " Sergey Bugaev
@ 2023-04-13 13:12           ` Samuel Thibault
  2023-04-13 13:20             ` Sergey Bugaev
  2023-04-14 17:33           ` Samuel Thibault
  1 sibling, 1 reply; 140+ messages in thread
From: Samuel Thibault @ 2023-04-13 13:12 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: libc-alpha, bug-hurd

Sergey Bugaev, le jeu. 13 avril 2023 14:58:12 +0300, a ecrit:
> NOTE: Completely untested! Do your own testing! You have been warned!

Doesn't work :)


(gdb) bt
#0  0x08000db3 in abort () at ../sysdeps/mach/hurd/dl-sysdep.c:753
#1  0x0802328a in __mig_dealloc_reply_port (arg=<optimized out>)
    at ../sysdeps/mach/hurd/mig-reply.c:91
#2  0x08019d67 in _dl_sysdep_start_cleanup ()
    at ../sysdeps/mach/hurd/dl-sysdep.c:241
#3  0x0801dcb6 in dl_main (phdr=<optimized out>, phnum=<optimized out>,
    user_entry=<optimized out>, auxv=<optimized out>) at rtld.c:2387
#4  0x0801ad9d in go (argdata=0x1001d40)
    at ../sysdeps/mach/hurd/dl-sysdep.c:172
#5  0x08020733 in _hurd_startup (argptr=<optimized out>, main=<optimized out>)
    at hurdstartup.c:184
#6  0x0801ac05 in _dl_sysdep_start (start_argptr=0x1002000,
    dl_main=0x801c530 <dl_main>) at ../sysdeps/mach/hurd/dl-sysdep.c:229
#7  0x0801c285 in _dl_start_final (arg=<optimized out>) at rtld.c:495
#8  _dl_start (arg=<optimized out>) at rtld.c:582
#9  0x0801b2cb in _start () from /usr/src/glibc-upstream/build/elf/ld.so.1

(gdb) up
#1  0x0802328a in __mig_dealloc_reply_port (arg=<optimized out>)
    at ../sysdeps/mach/hurd/mig-reply.c:91
91        assert (port == arg);
(gdb) up
#2  0x08019d67 in _dl_sysdep_start_cleanup ()
    at ../sysdeps/mach/hurd/dl-sysdep.c:241
241       __mig_dealloc_reply_port (MACH_PORT_NULL);

Samuel

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc v2 26/34] hurd: Remove __hurd_local_reply_port
  2023-04-13 13:12           ` Samuel Thibault
@ 2023-04-13 13:20             ` Sergey Bugaev
  2023-04-13 21:28               ` Samuel Thibault
  0 siblings, 1 reply; 140+ messages in thread
From: Sergey Bugaev @ 2023-04-13 13:20 UTC (permalink / raw)
  To: Samuel Thibault; +Cc: libc-alpha, bug-hurd

On Thu, Apr 13, 2023 at 4:12 PM Samuel Thibault <samuel.thibault@gnu.org> wrote:
    at ../sysdeps/mach/hurd/dl-sysdep.c:241
> 241       __mig_dealloc_reply_port (MACH_PORT_NULL);

Uhh, who deallocs a reply port like that :| You can't pass random crap
into __mig_dealloc_reply_port and rely on its particular
implementation, which *happened* to deallocate the current port.

Apparently FATAL_PREPARE in dl-sysdep.h is also defined to do the same.

I'd rather fix these both to do
__mig_dealloc_reply_port (__mig_get_reply_port ());
but we can also explicitly support passing MACH_PORT_NULL to mean
"dealloc whatever you have stored", i.e. the previous behavior.

Which one would you prefer?

Sergey

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc v2 26/34] hurd: Remove __hurd_local_reply_port
  2023-04-13 13:20             ` Sergey Bugaev
@ 2023-04-13 21:28               ` Samuel Thibault
  0 siblings, 0 replies; 140+ messages in thread
From: Samuel Thibault @ 2023-04-13 21:28 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: libc-alpha, bug-hurd

Hello,

Sergey Bugaev, le jeu. 13 avril 2023 16:20:50 +0300, a ecrit:
> On Thu, Apr 13, 2023 at 4:12 PM Samuel Thibault <samuel.thibault@gnu.org> wrote:
>     at ../sysdeps/mach/hurd/dl-sysdep.c:241
> > 241       __mig_dealloc_reply_port (MACH_PORT_NULL);
> 
> Uhh, who deallocs a reply port like that :| You can't pass random crap
> into __mig_dealloc_reply_port and rely on its particular
> implementation, which *happened* to deallocate the current port.
> 
> Apparently FATAL_PREPARE in dl-sysdep.h is also defined to do the same.
> 
> I'd rather fix these both to do
> __mig_dealloc_reply_port (__mig_get_reply_port ());

That looks reasonable to me, yes.

Samuel

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 24/34] hurd: Only check for TLS initialization inside rtld or in static builds
  2023-04-13 12:17                     ` Sergey Bugaev
@ 2023-04-13 21:47                       ` Samuel Thibault
  2023-04-13 22:21                         ` Samuel Thibault
  2023-04-14  8:29                         ` Sergey Bugaev
  0 siblings, 2 replies; 140+ messages in thread
From: Samuel Thibault @ 2023-04-13 21:47 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: libc-alpha, bug-hurd

Hello,

Sergey Bugaev, le jeu. 13 avril 2023 15:17:51 +0300, a ecrit:
> I have now sent the second version of
> that patch, please try applying it and test if that fixes it.

I'll give it a try.

> Please also check if the other reply port tweak you reverted today is
> also innocent.

The same tests fail, but differently :)

€ ./testrun.sh  signal/tst-signal --direct
Set handler.
Sending myself signal 15.
Received signal 15 (Terminated).
Fatal glibc error: ../sysdeps/mach/hurd/mig-reply.c:92 (__mig_dealloc_reply_port): assertion failed: port == arg
Abandon (core dumped)

#0  0x01027a5c in __GI___mach_msg_trap ()
    at /usr/src/glibc-upstream/build/mach/mach_msg_trap.S:2
2       kernel_trap (__mach_msg_trap,-25,7)
[Current thread is 1 (process 20128)]
(gdb) bt
#0  0x01027a5c in __GI___mach_msg_trap ()
    at /usr/src/glibc-upstream/build/mach/mach_msg_trap.S:2
#1  0x010281f6 in __GI___mach_msg (msg=0x10017d0, option=3, send_size=48,
    rcv_size=32, rcv_name=31, timeout=0, notify=0) at msg.c:111
#2  0x012eb1e8 in __msg_sig_post (process=27, signal=6, sigcode=0, refport=35)
    at /usr/src/glibc-upstream/build/hurd/RPC_msg_sig_post.c:158
#3  0x01074dbc in kill_port (refport=<optimized out>, msgport=<optimized out>)
    at ../sysdeps/mach/hurd/kill.c:67
#4  kill_pid (pid=pid@entry=20128) at ../sysdeps/mach/hurd/kill.c:104
#5  0x0107509c in __GI___kill (pid=<optimized out>, sig=<optimized out>)
    at ../sysdeps/mach/hurd/kill.c:138
#6  0x01074242 in __GI_raise (signo=6) at ../sysdeps/htl/raise.c:52
#7  __GI_raise (signo=6) at ../sysdeps/htl/raise.c:34
#8  0x010277b1 in __GI_abort () at abort.c:79
#9  0x0102791c in __libc_message (fmt=<optimized out>)
    at ../sysdeps/posix/libc_fatal.c:150
#10 0x0106bc20 in __libc_assert_fail (assertion=0x1222762 "port == arg",
    file=0x121c2a0 "../sysdeps/mach/hurd/mig-reply.c", line=92,
    function=0x121c2c4 <__PRETTY_FUNCTION__.0> "__mig_dealloc_reply_port")
    at __libc_assert_fail.c:31
#11 0x010283d2 in __GI___mig_dealloc_reply_port (arg=<optimized out>)
    at ../sysdeps/mach/hurd/mig-reply.c:92
#12 0x012eb23e in __msg_sig_post (process=27, signal=15, sigcode=0, refport=35)
    at /usr/src/glibc-upstream/build/hurd/RPC_msg_sig_post.c:160
#13 0x01074dbc in kill_port (refport=<optimized out>, msgport=<optimized out>)
    at ../sysdeps/mach/hurd/kill.c:67
#14 kill_pid (pid=pid@entry=20128) at ../sysdeps/mach/hurd/kill.c:104
#15 0x0107509c in __GI___kill (pid=<optimized out>, sig=<optimized out>)
    at ../sysdeps/mach/hurd/kill.c:138
#16 0x01074242 in __GI_raise (signo=15) at ../sysdeps/htl/raise.c:52
#17 __GI_raise (signo=15) at ../sysdeps/htl/raise.c:34
#18 0x010075ac in ?? ()
#19 0x0105d88f in __libc_start_call_main (argv=0x0, argc=16807472, main=0x2)
    at ../sysdeps/generic/libc_start_call_main.h:23
#20 __libc_start_main_impl (main=0x2, argc=16807472, argv=0x0, init=0x1007657,
    fini=0x1007540, rtld_fini=0x2, stack_end=0x1001d54)
    at ../csu/libc-start.c:360

I have put these on
https://dept-info.labri.fr/~thibault/tmp/libc.so
https://dept-info.labri.fr/~thibault/tmp/ld.so
https://dept-info.labri.fr/~thibault/tmp/core


Samuel

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 24/34] hurd: Only check for TLS initialization inside rtld or in static builds
  2023-04-13 21:47                       ` Samuel Thibault
@ 2023-04-13 22:21                         ` Samuel Thibault
  2023-04-14  8:29                         ` Sergey Bugaev
  1 sibling, 0 replies; 140+ messages in thread
From: Samuel Thibault @ 2023-04-13 22:21 UTC (permalink / raw)
  To: Sergey Bugaev, libc-alpha, bug-hurd

Samuel Thibault, le jeu. 13 avril 2023 23:47:38 +0200, a ecrit:
> Sergey Bugaev, le jeu. 13 avril 2023 15:17:51 +0300, a ecrit:
> > I have now sent the second version of
> > that patch, please try applying it and test if that fixes it.
> 
> I'll give it a try.

The first tests seem to be passing, I'll wait for the whole testsuite to
pass before pushing again.

Samuel

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 24/34] hurd: Only check for TLS initialization inside rtld or in static builds
  2023-04-13 21:47                       ` Samuel Thibault
  2023-04-13 22:21                         ` Samuel Thibault
@ 2023-04-14  8:29                         ` Sergey Bugaev
  2023-04-14  8:36                           ` Samuel Thibault
  1 sibling, 1 reply; 140+ messages in thread
From: Sergey Bugaev @ 2023-04-14  8:29 UTC (permalink / raw)
  To: Samuel Thibault; +Cc: libc-alpha, bug-hurd

On Fri, Apr 14, 2023 at 12:47 AM Samuel Thibault
<samuel.thibault@gnu.org> wrote:
> #10 0x0106bc20 in __libc_assert_fail (assertion=0x1222762 "port == arg",
>     file=0x121c2a0 "../sysdeps/mach/hurd/mig-reply.c", line=92,
>     function=0x121c2c4 <__PRETTY_FUNCTION__.0> "__mig_dealloc_reply_port")
>     at __libc_assert_fail.c:31
> #11 0x010283d2 in __GI___mig_dealloc_reply_port (arg=<optimized out>)
>     at ../sysdeps/mach/hurd/mig-reply.c:92
> #12 0x012eb23e in __msg_sig_post (process=27, signal=15, sigcode=0, refport=35)
>     at /usr/src/glibc-upstream/build/hurd/RPC_msg_sig_post.c:160
> #13 0x01074dbc in kill_port (refport=<optimized out>, msgport=<optimized out>)
>     at ../sysdeps/mach/hurd/kill.c:67

Interesting...

So first of all we're wrong, and the signal code does not destroy the
reply port. In fact it takes care to restore it:

  /* Destroy the MiG reply port used by the signal handler, and restore the
     reply port in use by the thread when interrupted.  */
  reply_port = THREAD_GETMEM (THREAD_SELF, reply_port);
  THREAD_SETMEM (THREAD_SELF, reply_port, scp->sc_reply_port);
  if (MACH_PORT_VALID (reply_port))
    __mach_port_destroy (__mach_task_self (), reply_port);

(Yes, that's the very same code we've altered recently, but it also
restored the reply port before my changes.)

See, it destroys the current reply port, and restores
scp->sc_reply_port. So then when we jump back to the user's code
(which should be in intr-msg), it gets MACH_RCV_TIMED_OUT (if that's
what happened), and proceeds to destroy the port itself.

One notable thing here: the sigreturn code (above) uses sc_reply_port
to destroy the current reply port. So:
* if the rcv timed out, we're going to destroy the reply port, but we
  haven't yet, so the server could fake a reply to mach_port_destroy
* if the mach_port_destroy RPC itself fails, we'll dealloc the user's port
  right here, and then it'll mismatch what the user expects it to be

The latter is in fact what's tripping the assertion in your test case.
mach_port_destroy (well, your test case contains my
mach_port_mod_refs) expects to receive a matching reply, but instead
we get a msg_sig_post_reply. We'd have caught this earlier if we
didn't neglect the result of mach_port_destroy.

Q: But why do we get msg_sig_post_reply here, why not in
   rpc_wait_trampoline, *before* running the signal handler?
A: Because msg_sig_post is uninterruptible. (and this is stupid! and so
   frustrating! we should just make it interruptible)

So: we should not use the user's reply port for this RPC. This is my
fault (747812349d42427c835aeac987aa67641d84f1ad). In my defense, there
was no comment explaining why this would be a bad idea; we should
write one. I'll prepare a patch.

But secondly, if we are not destroying the user's reply port, but
restoring it, then I don't think the "port = MACH_PORT_NULL, arg =
stale name" case can happen? So we don't need to handle it?

We should really just assert (arg == port), and this will help us find
more broken code.

Thoughts?

Sergey

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 24/34] hurd: Only check for TLS initialization inside rtld or in static builds
  2023-04-14  8:29                         ` Sergey Bugaev
@ 2023-04-14  8:36                           ` Samuel Thibault
  2023-04-14  8:53                             ` Sergey Bugaev
  0 siblings, 1 reply; 140+ messages in thread
From: Samuel Thibault @ 2023-04-14  8:36 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: libc-alpha, bug-hurd

Sergey Bugaev, le ven. 14 avril 2023 11:29:37 +0300, a ecrit:
> But secondly, if we are not destroying the user's reply port, but
> restoring it, then I don't think the "port = MACH_PORT_NULL, arg =
> stale name" case can happen? So we don't need to handle it?
> 
> We should really just assert (arg == port), and this will help us find
> more broken code.

I'd rather aim for that, yes.

Samuel

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 24/34] hurd: Only check for TLS initialization inside rtld or in static builds
  2023-04-14  8:36                           ` Samuel Thibault
@ 2023-04-14  8:53                             ` Sergey Bugaev
  2023-04-14  9:09                               ` Samuel Thibault
  2023-04-17  7:16                               ` Samuel Thibault
  0 siblings, 2 replies; 140+ messages in thread
From: Sergey Bugaev @ 2023-04-14  8:53 UTC (permalink / raw)
  To: Samuel Thibault; +Cc: libc-alpha, bug-hurd

On Fri, Apr 14, 2023 at 11:39 AM Samuel Thibault
<samuel.thibault@gnu.org> wrote:
> Sergey Bugaev, le ven. 14 avril 2023 11:29:37 +0300, a ecrit:
> > But secondly, if we are not destroying the user's reply port, but
> > restoring it, then I don't think the "port = MACH_PORT_NULL, arg =
> > stale name" case can happen? So we don't need to handle it?

And just as I sent this, I discovered that there is in fact a place
where we do destroy the port! Ugh!

It's in _hurdsig_abort_rpcs, if the interrupt_operation call fails.

Let's maybe not do that either? We're already making mach_msg seem to
have returned EINTR, which intr-msg knows how to handle.

Currently it's doing this:

    case EINTR:
      /* Either the process was stopped and continued,
         or the server doesn't support interrupt_operation.  */
      if (ss->intr_port != MACH_PORT_NULL)
        /* If this signal was for us and it should interrupt calls, the
           signal thread will have cleared SS->intr_port.
           Since it's not cleared, the signal was for another thread,
           or SA_RESTART is set.  Restart the interrupted call.  */
        {
          /* Make sure we have a valid reply port.  The one we were using
             may have been destroyed by interruption.  */
          m->header.msgh_local_port = rcv_name = __mig_get_reply_port ();
          m->header.msgh_bits = msgh_bits;
          option = user_option;
          timeout = user_timeout;
          goto message;
        }
      err = EINTR;

      /* The EINTR return indicates cancellation, so clear the flag.  */
      ss->cancel = 0;
      break;

but I'm thinking it instead should be doing this:

    case EINTR:
      /* Either the process was stopped and continued,
         or the server doesn't support interrupt_operation.  */
      if (ss->intr_port != MACH_PORT_NULL)
        /* If this signal was for us and it should interrupt calls, the
           signal thread will have cleared SS->intr_port.
           Since it's not cleared, the signal was for another thread,
           or SA_RESTART is set.  Restart the interrupted call.  */
        {
          /* Our RPC was interrupted, and the server may have kept the reply
             right.  Get a fresh reply port from MIG.  */
          __mig_dealloc_reply_port (rcv_name);
          m->header.msgh_local_port = rcv_name = __mig_get_reply_port ();

          m->header.msgh_bits = msgh_bits;
          option = user_option;
          timeout = user_timeout;
          goto message;
        }
      err = EINTR;

      /* The EINTR return indicates cancellation, so clear the flag.  */
      ss->cancel = 0;
      break;

...coupled with _hurdsig_abort_rpcs not deallocating our port. wdyt?

Sergey

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 24/34] hurd: Only check for TLS initialization inside rtld or in static builds
  2023-04-14  8:53                             ` Sergey Bugaev
@ 2023-04-14  9:09                               ` Samuel Thibault
  2023-04-14  9:23                                 ` Sergey Bugaev
  2023-04-17  7:16                               ` Samuel Thibault
  1 sibling, 1 reply; 140+ messages in thread
From: Samuel Thibault @ 2023-04-14  9:09 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: libc-alpha, bug-hurd

Sergey Bugaev via Libc-alpha, le ven. 14 avril 2023 11:53:43 +0300, a ecrit:
> It's in _hurdsig_abort_rpcs, if the interrupt_operation call fails.
> 
> Let's maybe not do that either? We're already making mach_msg seem to
> have returned EINTR, which intr-msg knows how to handle.

Mmm, yes, but we need to make *sure* we don't re-use the port and
that it gets dropped at some point not too far, otherwise the
server will stay stuck trying to reply. Managing to make the port
a dead name seems a good way to me. Something like adding a send
right to the port, then dropping the receive right. And making the
__mig_dealloc_reply_port detect that case (if dropping the receive right
returns KERN_INVALID_VALUE, it means it has indeed become a dead
name for a send right, which one can drop instead).

Again, in such code I don't think I can see the whole picture so it's
testsuites that will find out the various cases.

Samuel

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 24/34] hurd: Only check for TLS initialization inside rtld or in static builds
  2023-04-14  9:09                               ` Samuel Thibault
@ 2023-04-14  9:23                                 ` Sergey Bugaev
  2023-04-14  9:31                                   ` Samuel Thibault
  0 siblings, 1 reply; 140+ messages in thread
From: Sergey Bugaev @ 2023-04-14  9:23 UTC (permalink / raw)
  To: Samuel Thibault; +Cc: libc-alpha, bug-hurd

On Fri, Apr 14, 2023 at 12:12 PM Samuel Thibault
<samuel.thibault@gnu.org> wrote:
> Sergey Bugaev via Libc-alpha, le ven. 14 avril 2023 11:53:43 +0300, a ecrit:
> > It's in _hurdsig_abort_rpcs, if the interrupt_operation call fails.
> >
> > Let's maybe not do that either? We're already making mach_msg seem to
> > have returned EINTR, which intr-msg knows how to handle.
>
> Mmm, yes, but we need to make *sure* we don't re-use the port and
> that it gets dropped at some point not too far, otherwise the
> server will stay stuck trying to reply.

We should drop the reply port before waiting for the signal handler to
run, since the handler may block -- is that what you're saying? If it
is, good point!

> Managing to make the port
> a dead name seems a good way to me. Something like adding a send
> right to the port, then dropping the receive right. And making the
> __mig_dealloc_reply_port detect that case (if dropping the receive right
> returns KERN_INVALID_VALUE, it means it has indeed become a dead
> name for a send right, which one can drop instead).

Right, sounds good.

> Again, in such code I don't think I can see the whole picture so it's
> testsuites that will find out the various cases.
>
> Samuel

Sergey

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 24/34] hurd: Only check for TLS initialization inside rtld or in static builds
  2023-04-14  9:23                                 ` Sergey Bugaev
@ 2023-04-14  9:31                                   ` Samuel Thibault
  0 siblings, 0 replies; 140+ messages in thread
From: Samuel Thibault @ 2023-04-14  9:31 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: libc-alpha, bug-hurd

Sergey Bugaev via Libc-alpha, le ven. 14 avril 2023 12:23:00 +0300, a ecrit:
> On Fri, Apr 14, 2023 at 12:12 PM Samuel Thibault
> <samuel.thibault@gnu.org> wrote:
> > Sergey Bugaev via Libc-alpha, le ven. 14 avril 2023 11:53:43 +0300, a ecrit:
> > > It's in _hurdsig_abort_rpcs, if the interrupt_operation call fails.
> > >
> > > Let's maybe not do that either? We're already making mach_msg seem to
> > > have returned EINTR, which intr-msg knows how to handle.
> >
> > Mmm, yes, but we need to make *sure* we don't re-use the port and
> > that it gets dropped at some point not too far, otherwise the
> > server will stay stuck trying to reply.
> 
> We should drop the reply port before waiting for the signal handler to
> run, since the handler may block -- is that what you're saying?

That's a kind of scenario indeed. I don't know if it's actually
exercised in the wild, but I wouldn't be surprised.

Samuel

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc v2 26/34] hurd: Remove __hurd_local_reply_port
  2023-04-13 11:58         ` [RFC PATCH glibc v2 " Sergey Bugaev
  2023-04-13 13:12           ` Samuel Thibault
@ 2023-04-14 17:33           ` Samuel Thibault
  2023-04-14 20:29             ` Sergey Bugaev
  1 sibling, 1 reply; 140+ messages in thread
From: Samuel Thibault @ 2023-04-14 17:33 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: libc-alpha, bug-hurd

Applied with fixing the __mig_dealloc_reply_port(NULL) cases, thanks!

Sergey Bugaev, le jeu. 13 avril 2023 14:58:12 +0300, a ecrit:
> Now that the signal code no longer accesses it, the only real user of it
> was mig-reply.c, so move the logic for managing the port there.
> 
> If we're in SHARED and outside of rtld, we know that __LIBC_NO_TLS ()
> always evaluates to 0, and a TLS reply port will always be used, not
> __hurd_reply_port0. Still, the compiler does not see that
> __hurd_reply_port0 is never used due to its address being taken. To deal
> with this, explicitly compile out __hurd_reply_port0 when we know we
> won't use it.
> 
> Also, instead of accessing the port via THREAD_SELF->reply_port, this
> uses THREAD_GETMEM and THREAD_SETMEM directly, avoiding possible
> miscompilations.
> 
> Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
> ---
> Changes since v1:
> * Only deallocate the port in __mig_dealloc_reply_port if it's the same
>   as the stored port, because of signals.
> * Add a comment detailing the reasoning.
> * Add two assertions: that ARG and PORT are exactly the same (unless PORT
>    has been invalidated), and that we succeed deallocating PORT.
> 
> NOTE: Completely untested! Do your own testing! You have been warned!
> 
>  hurd/hurd/threadvar.h         |  7 ----
>  sysdeps/mach/hurd/mig-reply.c | 70 +++++++++++++++++++++++++++++------
>  2 files changed, 58 insertions(+), 19 deletions(-)
> 
> diff --git a/hurd/hurd/threadvar.h b/hurd/hurd/threadvar.h
> index f5c6a278..c476d988 100644
> --- a/hurd/hurd/threadvar.h
> +++ b/hurd/hurd/threadvar.h
> @@ -29,11 +29,4 @@
>  extern unsigned long int __hurd_sigthread_stack_base;
>  extern unsigned long int __hurd_sigthread_stack_end;
>  
> -/* Store the MiG reply port reply port until we enable TLS.  */
> -extern mach_port_t __hurd_reply_port0;
> -
> -/* This returns either the TLS reply port variable, or a single-thread variable
> -   when TLS is not initialized yet.  */
> -#define __hurd_local_reply_port (*(__LIBC_NO_TLS () ? &__hurd_reply_port0 : &THREAD_SELF->reply_port))
> -
>  #endif	/* hurd/threadvar.h */
> diff --git a/sysdeps/mach/hurd/mig-reply.c b/sysdeps/mach/hurd/mig-reply.c
> index 33ff260e..3fdee80e 100644
> --- a/sysdeps/mach/hurd/mig-reply.c
> +++ b/sysdeps/mach/hurd/mig-reply.c
> @@ -17,22 +17,46 @@
>  
>  #include <mach.h>
>  #include <mach/mig_support.h>
> -#include <hurd/threadvar.h>
> +#include <tls.h>
>  
>  /* These functions are called by MiG-generated code.  */
>  
> +#if !defined (SHARED) || IS_IN (rtld)
>  mach_port_t __hurd_reply_port0;
> +#endif
> +
> +static mach_port_t
> +get_reply_port (void)
> +{
> +#if !defined (SHARED) || IS_IN (rtld)
> +  if (__LIBC_NO_TLS ())
> +    return __hurd_reply_port0;
> +#endif
> +  return THREAD_GETMEM (THREAD_SELF, reply_port);
> +}
> +
> +static void
> +set_reply_port (mach_port_t port)
> +{
> +#if !defined (SHARED) || IS_IN (rtld)
> +  if (__LIBC_NO_TLS ())
> +    __hurd_reply_port0 = port;
> +  else
> +#endif
> +    THREAD_SETMEM (THREAD_SELF, reply_port, port);
> +}
>  
>  /* Called by MiG to get a reply port.  */
>  mach_port_t
>  __mig_get_reply_port (void)
>  {
> -  if (__hurd_local_reply_port == MACH_PORT_NULL
> -      || (&__hurd_local_reply_port != &__hurd_reply_port0
> -	  && __hurd_local_reply_port == __hurd_reply_port0))
> -    __hurd_local_reply_port = __mach_reply_port ();
> -
> -  return __hurd_local_reply_port;
> +  mach_port_t port = get_reply_port ();
> +  if (__glibc_unlikely (port == MACH_PORT_NULL))
> +    {
> +      port = __mach_reply_port ();
> +      set_reply_port (port);
> +    }
> +  return port;
>  }
>  weak_alias (__mig_get_reply_port, mig_get_reply_port)
>  libc_hidden_def (__mig_get_reply_port)
> @@ -41,12 +65,34 @@ libc_hidden_def (__mig_get_reply_port)
>  void
>  __mig_dealloc_reply_port (mach_port_t arg)
>  {
> -  mach_port_t port = __hurd_local_reply_port;
> -  __hurd_local_reply_port = MACH_PORT_NULL;	/* So the mod_refs RPC won't use it.  */
> +  error_t err;
> +  mach_port_t port = get_reply_port ();
> +
> +  set_reply_port (MACH_PORT_NULL);	/* So the mod_refs RPC won't use it.  */
> +
> +  /* Normally, ARG should be the same as PORT that we store.  However, if a
> +     signal has interrupted the RPC, the stored PORT has been deallocated and
> +     reset to MACH_PORT_NULL (or possibly MACH_PORT_DEAD).  In this case the
> +     MIG routine still has the old name, which it passes to us here.  We must
> +     not deallocate (or otherwise touch) it, since it may be already allocated
> +     to another port right.  Fortunately MIG itself doesn't do anything with
> +     the reply port on errors either, other than immediately calling this
> +     function.
> +
> +     And so:
> +     1. Assert that things are sane, i.e. and PORT is either invalid or same
> +        as ARG.
> +     2. Only deallocate the name if our stored PORT still names it.  In that
> +        case we're sure the right has not been deallocated / the name reused.
> +    */
> +
> +  if (!MACH_PORT_VALID (port))
> +    return;
> +  assert (port == arg);
>  
> -  if (MACH_PORT_VALID (port))
> -    __mach_port_mod_refs (__mach_task_self (), port,
> -			  MACH_PORT_RIGHT_RECEIVE, -1);
> +  err = __mach_port_mod_refs (__mach_task_self (), port,
> +                              MACH_PORT_RIGHT_RECEIVE, -1);
> +  assert_perror (err);
>  }
>  weak_alias (__mig_dealloc_reply_port, mig_dealloc_reply_port)
>  libc_hidden_def (__mig_dealloc_reply_port)
> -- 
> 2.39.2
> 

-- 
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 24/34] hurd: Only check for TLS initialization inside rtld or in static builds
  2023-03-19 15:10 ` [RFC PATCH glibc 24/34] hurd: Only check for TLS initialization inside rtld or in static builds Sergey Bugaev
  2023-04-10 21:33   ` Samuel Thibault
  2023-04-11 18:57   ` Samuel Thibault
@ 2023-04-14 17:34   ` Samuel Thibault
  2023-04-14 19:52     ` Sergey Bugaev
  2 siblings, 1 reply; 140+ messages in thread
From: Samuel Thibault @ 2023-04-14 17:34 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: libc-alpha, bug-hurd

Reapplied on top of "Remove __hurd_local_reply_port", thanks!

Sergey Bugaev, le dim. 19 mars 2023 18:10:07 +0300, a ecrit:
> When glibc is built as a shared library, TLS is always initialized by
> the call of TLS_INIT_TP () macro made inside the dynamic loader, prior
> to running the main program (see dl-call_tls_init_tp.h). We can take
> advantage of this: we know for sure that __LIBC_NO_TLS () will evaluate
> to 0 in all other cases, so let the compiler know that explicitly too.
> 
> Also, only define _hurd_tls_init () and TLS_INIT_TP () under the same
> conditions (either !SHARED or inside rtld), to statically assert that
> this is the case.
> 
> Other than a microoptimization, this also helps with avoiding awkward
> sharing of the __libc_tls_initialized variable between ld.so and libc.so
> that we would have to do otherwise -- we know for sure that no sharing
> is required, simply because __libc_tls_initialized would always be set
> to true inside libc.so.
> 
> Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
> ---
>  sysdeps/mach/hurd/Makefile                    |  4 ++
>  sysdeps/mach/hurd/i386/dl-tls-initialized.c   | 21 +++++++++
>  sysdeps/mach/hurd/i386/tls.h                  | 43 +++++++++++--------
>  sysdeps/mach/hurd/x86/init-first.c            | 11 +----
>  sysdeps/mach/hurd/x86_64/dl-tls-initialized.c | 21 +++++++++
>  sysdeps/mach/hurd/x86_64/tls.h                | 19 +++++---
>  6 files changed, 85 insertions(+), 34 deletions(-)
>  create mode 100644 sysdeps/mach/hurd/i386/dl-tls-initialized.c
>  create mode 100644 sysdeps/mach/hurd/x86_64/dl-tls-initialized.c
> 
> diff --git a/sysdeps/mach/hurd/Makefile b/sysdeps/mach/hurd/Makefile
> index d5584930..f43e92ba 100644
> --- a/sysdeps/mach/hurd/Makefile
> +++ b/sysdeps/mach/hurd/Makefile
> @@ -197,6 +197,10 @@ ifeq (hurd, $(subdir))
>  sysdep_routines += cthreads
>  endif
>  
> +ifeq (elf, $(subdir))
> +sysdep-dl-routines += dl-tls-initialized
> +endif
> +
>  ifeq (io, $(subdir))
>  sysdep_routines += f_setlk close_nocancel close_nocancel_nostatus \
>  		   fcntl_nocancel open_nocancel openat_nocancel read_nocancel \
> diff --git a/sysdeps/mach/hurd/i386/dl-tls-initialized.c b/sysdeps/mach/hurd/i386/dl-tls-initialized.c
> new file mode 100644
> index 00000000..493ec239
> --- /dev/null
> +++ b/sysdeps/mach/hurd/i386/dl-tls-initialized.c
> @@ -0,0 +1,21 @@
> +/* Determine whether TLS is initialized, for i386/Hurd.
> +   Copyright (C) 1995-2023 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
> +   <https://www.gnu.org/licenses/>.  */
> +
> +#ifndef SHARED
> +unsigned short __init1_desc;
> +#endif
> diff --git a/sysdeps/mach/hurd/i386/tls.h b/sysdeps/mach/hurd/i386/tls.h
> index 0f8dd241..ee7b8004 100644
> --- a/sysdeps/mach/hurd/i386/tls.h
> +++ b/sysdeps/mach/hurd/i386/tls.h
> @@ -69,18 +69,6 @@ _Static_assert (offsetof (tcbhead_t, __private_ss) == 0x30,
>                    |  (desc->high_word & 0xff000000));			      \
>    })
>  
> -/* Return 1 if TLS is not initialized yet.  */
> -#ifndef SHARED
> -extern unsigned short __init1_desc;
> -#define __HURD_DESC_INITIAL(gs, ds) ((gs) == (ds) || (gs) == __init1_desc)
> -#else
> -#define __HURD_DESC_INITIAL(gs, ds) ((gs) == (ds))
> -#endif
> -
> -#define __LIBC_NO_TLS()							      \
> -  ({ unsigned short ds, gs;						      \
> -     asm ("movw %%ds,%w0; movw %%gs,%w1" : "=q" (ds), "=q" (gs));	      \
> -     __builtin_expect(__HURD_DESC_INITIAL(gs, ds), 0); })
>  #endif
>  
>  /* The TCB can have any size and the memory following the address the
> @@ -125,6 +113,28 @@ extern unsigned short __init1_desc;
>  
>  # define HURD_SEL_LDT(sel) (__builtin_expect ((sel) & 4, 0))
>  
> +#ifndef SHARED
> +extern unsigned short __init1_desc;
> +# define __HURD_DESC_INITIAL(gs, ds) ((gs) == (ds) || (gs) == __init1_desc)
> +#else
> +# define __HURD_DESC_INITIAL(gs, ds) ((gs) == (ds))
> +#endif
> +
> +#if !defined (SHARED) || IS_IN (rtld)
> +/* Return 1 if TLS is not initialized yet.  */
> +extern inline bool __attribute__ ((unused))
> +__LIBC_NO_TLS (void)
> +{
> +  unsigned short ds, gs;
> +  asm ("movw %%ds, %w0\n"
> +       "movw %%gs, %w1"
> +       : "=q" (ds), "=q" (gs));
> +  return __glibc_unlikely (__HURD_DESC_INITIAL (gs, ds));
> +}
> +
> +/* Code to initially initialize the thread pointer.  This might need
> +   special attention since 'errno' is not yet available and if the
> +   operation can cause a failure 'errno' must not be touched.  */
>  static inline bool __attribute__ ((unused))
>  _hurd_tls_init (tcbhead_t *tcb)
>  {
> @@ -168,11 +178,10 @@ out:
>    return success;
>  }
>  
> -/* Code to initially initialize the thread pointer.  This might need
> -   special attention since 'errno' is not yet available and if the
> -   operation can cause a failure 'errno' must not be touched.  */
> -# define TLS_INIT_TP(descr) \
> -    _hurd_tls_init ((tcbhead_t *) (descr))
> +# define TLS_INIT_TP(descr) _hurd_tls_init ((tcbhead_t *) (descr))
> +#else /* defined (SHARED) && !IS_IN (rtld) */
> +# define __LIBC_NO_TLS() 0
> +#endif
>  
>  # if __GNUC_PREREQ (6, 0)
>  
> diff --git a/sysdeps/mach/hurd/x86/init-first.c b/sysdeps/mach/hurd/x86/init-first.c
> index 48c330ec..89a5f44c 100644
> --- a/sysdeps/mach/hurd/x86/init-first.c
> +++ b/sysdeps/mach/hurd/x86/init-first.c
> @@ -40,13 +40,6 @@ extern char **_dl_argv;
>  
>  #ifndef SHARED
>  static tcbhead_t __init1_tcbhead;
> -# ifndef __x86_64__
> -unsigned short __init1_desc;
> -# endif
> -#endif
> -
> -#ifdef __x86_64__
> -unsigned char __libc_tls_initialized;
>  #endif
>  
>  /* Things that want to be run before _hurd_init or much anything else.
> @@ -166,9 +159,7 @@ first_init (void)
>    _hurd_tls_init (&__init1_tcbhead);
>  
>    /* Make sure __LIBC_NO_TLS () keeps evaluating to 1.  */
> -# ifdef __x86_64__
> -  __libc_tls_initialized = 0;
> -# else
> +# ifndef __x86_64__
>    asm ("movw %%gs,%w0" : "=m" (__init1_desc));
>  # endif
>  #endif
> diff --git a/sysdeps/mach/hurd/x86_64/dl-tls-initialized.c b/sysdeps/mach/hurd/x86_64/dl-tls-initialized.c
> new file mode 100644
> index 00000000..d0766f95
> --- /dev/null
> +++ b/sysdeps/mach/hurd/x86_64/dl-tls-initialized.c
> @@ -0,0 +1,21 @@
> +/* Determine whether TLS is initialized, for x86_64/Hurd.
> +   Copyright (C) 1995-2023 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
> +   <https://www.gnu.org/licenses/>.  */
> +
> +#if !defined (SHARED) || IS_IN (rtld)
> +unsigned short __libc_tls_initialized;
> +#endif
> diff --git a/sysdeps/mach/hurd/x86_64/tls.h b/sysdeps/mach/hurd/x86_64/tls.h
> index cf74e1f4..da504d9c 100644
> --- a/sysdeps/mach/hurd/x86_64/tls.h
> +++ b/sysdeps/mach/hurd/x86_64/tls.h
> @@ -68,10 +68,6 @@ _Static_assert (offsetof (tcbhead_t, stack_guard) == 0x28,
>  _Static_assert (offsetof (tcbhead_t, __private_ss) == 0x70,
>                  "split stack pointer offset");
>  
> -extern unsigned char __libc_tls_initialized;
> -
> -# define __LIBC_NO_TLS() __builtin_expect (!__libc_tls_initialized, 0)
> -
>  /* The TCB can have any size and the memory following the address the
>     thread pointer points to is unspecified.  Allocate the TCB there.  */
>  # define TLS_TCB_AT_TP	1
> @@ -87,8 +83,6 @@ extern unsigned char __libc_tls_initialized;
>  # define TCB_ALIGNMENT	64
>  
>  
> -# define TLS_INIT_TP(descr) _hurd_tls_init ((tcbhead_t *) (descr))
> -
>  # define THREAD_SELF							\
>    (*(tcbhead_t * __seg_fs *) offsetof (tcbhead_t, tcb))
>  /* Read member of the thread descriptor directly.  */
> @@ -174,6 +168,10 @@ _hurd_tls_new (thread_t child, tcbhead_t *tcb)
>                               i386_FSGS_BASE_STATE_COUNT);
>  }
>  
> +# if !defined (SHARED) || IS_IN (rtld)
> +extern unsigned char __libc_tls_initialized;
> +#  define __LIBC_NO_TLS() __builtin_expect (!__libc_tls_initialized, 0)
> +
>  static inline bool __attribute__ ((unused))
>  _hurd_tls_init (tcbhead_t *tcb)
>  {
> @@ -184,11 +182,18 @@ _hurd_tls_init (tcbhead_t *tcb)
>    tcb->multiple_threads = 1;
>  
>    err = _hurd_tls_new (self, tcb);
> +  if (err == 0)
> +    __libc_tls_initialized = 1;
>    __mach_port_deallocate (__mach_task_self (), self);
> -  __libc_tls_initialized = 1;
>    return err == 0;
>  }
>  
> +#  define TLS_INIT_TP(descr) _hurd_tls_init ((tcbhead_t *) (descr))
> +# else /* defined (SHARED) && !IS_IN (rtld) */
> +#  define __LIBC_NO_TLS() 0
> +# endif
> +
> +
>  
>  /* Global scope switch support.  */
>  # define THREAD_GSCOPE_FLAG_UNUSED 0
> -- 
> 2.39.2
> 

-- 
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 24/34] hurd: Only check for TLS initialization inside rtld or in static builds
  2023-04-14 17:34   ` Samuel Thibault
@ 2023-04-14 19:52     ` Sergey Bugaev
  0 siblings, 0 replies; 140+ messages in thread
From: Sergey Bugaev @ 2023-04-14 19:52 UTC (permalink / raw)
  To: Samuel Thibault; +Cc: libc-alpha, bug-hurd

On Fri, Apr 14, 2023 at 8:34 PM Samuel Thibault <samuel.thibault@gnu.org> wrote:
> Reapplied on top of "Remove __hurd_local_reply_port", thanks!

Awesome, thank you!

I have implemented the changes we talked about (replacing the receive
right with a dead name...), and they even seem to pass the few tests
from the testsuite I can run manually, but now I'm thinking maybe we
better avoid touching that code, or we'll break something else. So I
sent the other changes (including restoring the usage of
MACH_PORT_DEAD inside sigreturn), but not that patch.

Please test.

Sergey

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc v2 26/34] hurd: Remove __hurd_local_reply_port
  2023-04-14 17:33           ` Samuel Thibault
@ 2023-04-14 20:29             ` Sergey Bugaev
  2023-04-15  6:45               ` Samuel Thibault
  0 siblings, 1 reply; 140+ messages in thread
From: Sergey Bugaev @ 2023-04-14 20:29 UTC (permalink / raw)
  To: Samuel Thibault; +Cc: libc-alpha, bug-hurd

On Fri, Apr 14, 2023 at 8:33 PM Samuel Thibault <samuel.thibault@gnu.org> wrote:
> Applied with fixing the __mig_dealloc_reply_port(NULL) cases, thanks!

By the way: that __mig_dealloc_reply_port () inside
_dl_sysdep_start_cleanup () is not doing what the author of that code
wanted it to do. It deallocates the current reply port, but while
doing that, it creates a fresh one in its place. So we just waste an
RPC (and a syscall). We should just not do that.

It would be nice to not deallocate __mach_{task,host}_self_ too, and
instead migrate them into the new libc.so slots. Again, we'd save some
RPCs and syscalls without really losing anything.

Besides, are we 100% sure that after initially entering libc.so, ld.so
will never do any Mach things (RPCs) anymore? We override __open &
friends, but it might still be using some smaller Mach things, no? If
yes, imagine what would happen when it keeps using its
__mach_{task,host}_self_, which it has deallocated, but not even reset
to MACH_PORT_NULL.

Sergey

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc v2 26/34] hurd: Remove __hurd_local_reply_port
  2023-04-14 20:29             ` Sergey Bugaev
@ 2023-04-15  6:45               ` Samuel Thibault
  2023-04-15  7:34                 ` Sergey Bugaev
  0 siblings, 1 reply; 140+ messages in thread
From: Samuel Thibault @ 2023-04-15  6:45 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: libc-alpha, bug-hurd

Hello,

Sergey Bugaev, le ven. 14 avril 2023 23:29:51 +0300, a ecrit:
> On Fri, Apr 14, 2023 at 8:33 PM Samuel Thibault <samuel.thibault@gnu.org> wrote:
> > Applied with fixing the __mig_dealloc_reply_port(NULL) cases, thanks!
> 
> By the way: that __mig_dealloc_reply_port () inside
> _dl_sysdep_start_cleanup () is not doing what the author of that code
> wanted it to do. It deallocates the current reply port, but while
> doing that, it creates a fresh one in its place.

You mean with the __mach_port_deallocate calls?

> It would be nice to not deallocate __mach_{task,host}_self_ too, and
> instead migrate them into the new libc.so slots.

That'd need different variables names, but that should be doable easily
by redirecting __mach_task_self in mach_init.h dependening on building
ld.so.

> Besides, are we 100% sure that after initially entering libc.so, ld.so
> will never do any Mach things (RPCs) anymore?

AIUI all the OS-dependent things that ld.so calls comes from
dl-sysdep.c, so as long as all these are weak functions, we're safe.

Samuel

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc v2 26/34] hurd: Remove __hurd_local_reply_port
  2023-04-15  6:45               ` Samuel Thibault
@ 2023-04-15  7:34                 ` Sergey Bugaev
  2023-04-15  7:42                   ` Samuel Thibault
  0 siblings, 1 reply; 140+ messages in thread
From: Sergey Bugaev @ 2023-04-15  7:34 UTC (permalink / raw)
  To: Samuel Thibault; +Cc: libc-alpha, bug-hurd

On Sat, Apr 15, 2023 at 9:45 AM Samuel Thibault <samuel.thibault@gnu.org> wrote:
> Sergey Bugaev, le ven. 14 avril 2023 23:29:51 +0300, a ecrit:
> > By the way: that __mig_dealloc_reply_port () inside
> > _dl_sysdep_start_cleanup () is not doing what the author of that code
> > wanted it to do. It deallocates the current reply port, but while
> > doing that, it creates a fresh one in its place.
>
> You mean with the __mach_port_deallocate calls?

Heh, well those actually too, but I didn't even think of that. We
can't deallocate the reply port before the task, but we can't do it
the other way around either -- fun!

What I meant was __mig_dealloc_reply_port itself ends up creating a
new port for the __mach_port_mod_refs RPC. Which is fine: the semantic
of __mig_dealloc_reply_port is "the current reply port (also passed as
an argument) might be broken, do something about it". If you really
want to deallocate and reset the current reply port, you need to do
the dance like sigreturn does:

mach_port_t reply_port = THREAD_GETMEM (THREAD_SELF, reply_port);
THREAD_SETMEM (THREAD_SELF, MACH_PORT_DEAD);
(void) __mach_port_mod_refs (... reply_port ...);
THREAD_SETMEM (THREAD_SELF, MACH_PORT_NULL);

> > It would be nice to not deallocate __mach_{task,host}_self_ too, and
> > instead migrate them into the new libc.so slots.
>
> That'd need different variables names, but that should be doable easily
> by redirecting __mach_task_self in mach_init.h dependening on building
> ld.so.

I think we could look the symbols up in libc.so explicitly, like it's
done for malloc in __rtld_malloc_init_real. But we could also do
__rtld_mach_task_self_ + weak __mach_task_self_ as you're saying.

> > Besides, are we 100% sure that after initially entering libc.so, ld.so
> > will never do any Mach things (RPCs) anymore?
>
> AIUI all the OS-dependent things that ld.so calls comes from
> dl-sysdep.c, so as long as all these are weak functions, we're safe.

But how can we be sure of this?

In fact, this is demonstrably false. elf/dl-profile.c calls __profil,
which pulls sysdeps/mach/hurd/profil.c into rtld, and various other
crap (threading...) along with it.

Yes, I still can't get over the fact that rtld is implicitly pulling
out object files from libc. Even if there's no explicit #include
<mach.h> in rtld.c, it can still reference things that have
system-specific implementations. And who knows how much of the libc
proper this pulls in! Well, you can't know unless you review
elf/librtld.os.map.

Maybe there should be a build step that checks that nothing unexpected
gets pulled in, and that nothing system-dependent is ever accessed
other than through dl-sysdep.

Think of it this way: the compiler can always decide to insert calls
to memcpy even when there are none in the source code (unless we build
with -ffreestanding, which we don't), and memcpy may have a
system-specific implementation (think vm_copy / PAGE_COPY_THRESHOLD).
So we cannot even verify this based on any analysis of the source
code, we need this to be a post-compilation build step.

Sergey

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc v2 26/34] hurd: Remove __hurd_local_reply_port
  2023-04-15  7:34                 ` Sergey Bugaev
@ 2023-04-15  7:42                   ` Samuel Thibault
  0 siblings, 0 replies; 140+ messages in thread
From: Samuel Thibault @ 2023-04-15  7:42 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: libc-alpha, bug-hurd

Sergey Bugaev, le sam. 15 avril 2023 10:34:46 +0300, a ecrit:
> If you really want to deallocate and reset the current reply port, you
> need to do the dance like sigreturn does:
> 
> mach_port_t reply_port = THREAD_GETMEM (THREAD_SELF, reply_port);
> THREAD_SETMEM (THREAD_SELF, MACH_PORT_DEAD);
> (void) __mach_port_mod_refs (... reply_port ...);
> THREAD_SETMEM (THREAD_SELF, MACH_PORT_NULL);

Ok.

> Maybe there should be a build step that checks that nothing unexpected
> gets pulled in, and that nothing system-dependent is ever accessed
> other than through dl-sysdep.

That can be best, yes.

Samuel

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [RFC PATCH glibc 24/34] hurd: Only check for TLS initialization inside rtld or in static builds
  2023-04-14  8:53                             ` Sergey Bugaev
  2023-04-14  9:09                               ` Samuel Thibault
@ 2023-04-17  7:16                               ` Samuel Thibault
  1 sibling, 0 replies; 140+ messages in thread
From: Samuel Thibault @ 2023-04-17  7:16 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: libc-alpha, bug-hurd

Hello,

Sergey Bugaev via Libc-alpha, le ven. 14 avril 2023 11:53:43 +0300, a ecrit:
> -         /* Make sure we have a valid reply port.  The one we were using
> -            may have been destroyed by interruption.  */
> -         m->header.msgh_local_port = rcv_name = __mig_get_reply_port ();

> +         /* Our RPC was interrupted, and the server may have kept the reply
> +            right.  Get a fresh reply port from MIG.  */
> +         __mig_dealloc_reply_port (rcv_name);
> +         m->header.msgh_local_port = rcv_name = __mig_get_reply_port ();

That would be in line with cleaning the __mig_*_reply_port interface,
indeed.

Samuel

^ permalink raw reply	[flat|nested] 140+ messages in thread

end of thread, other threads:[~2023-04-17  7:17 UTC | newest]

Thread overview: 140+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-19 15:09 [RFC PATCH 00/34] The rest of the x86_64-gnu port Sergey Bugaev
2023-03-19 15:09 ` [RFC PATCH gnumach 01/34] Add i386_fsgs_base_state Sergey Bugaev
2023-04-02 22:43   ` Samuel Thibault
2023-03-19 15:09 ` [RFC PATCH gnumach 02/34] Remove bootstrap.defs Sergey Bugaev
2023-04-02 22:43   ` Samuel Thibault
2023-04-03  9:39     ` Sergey Bugaev
2023-03-19 15:09 ` [RFC PATCH gnumach 03/34] Make exception subcode a long Sergey Bugaev
2023-04-02 22:45   ` Samuel Thibault
2023-04-03  9:32     ` Sergey Bugaev
2023-04-06  2:11       ` Flávio Cruz
2023-04-10 23:52         ` Samuel Thibault
2023-03-19 15:09 ` [RFC PATCH glibc 04/34] hurd: " Sergey Bugaev
2023-04-02 22:52   ` Samuel Thibault
2023-03-19 15:09 ` [RFC PATCH glibc 05/34] hurd: Remove __hurd_threadvar_stack_{offset,mask} Sergey Bugaev
2023-04-02 22:53   ` Samuel Thibault
2023-03-19 15:09 ` [RFC PATCH glibc 06/34] hurd: Swap around two function calls Sergey Bugaev
2023-04-02 22:54   ` Samuel Thibault
2023-03-19 15:09 ` [RFC PATCH glibc 07/34] hurd: Fix file name in #error Sergey Bugaev
2023-04-02 22:55   ` Samuel Thibault
2023-03-19 15:09 ` [RFC PATCH glibc 08/34] hurd: Disable O_TRUNC and FS_RETRY_MAGICAL in rtld Sergey Bugaev
2023-04-02 22:57   ` Samuel Thibault
2023-03-19 15:09 ` [RFC PATCH glibc 09/34] hurd: Fix _hurd_setup_sighandler () signature Sergey Bugaev
2023-04-02 22:58   ` Samuel Thibault
2023-03-19 15:09 ` [RFC PATCH glibc 10/34] stdio-common: Fix building when !IS_IN (libc) Sergey Bugaev
2023-04-02 23:01   ` Samuel Thibault
2023-03-19 15:09 ` [RFC PATCH glibc 11/34] mach, hurd: Drop __libc_lock_self0 Sergey Bugaev
2023-04-02 23:02   ` Samuel Thibault
2023-03-19 15:09 ` [RFC PATCH glibc 12/34] hurd: More 64-bit integer casting fixes Sergey Bugaev
2023-04-02 23:03   ` Samuel Thibault
2023-03-19 15:09 ` [RFC PATCH glibc 13/34] x86-64: Disable prefer_map_32bit_exec tunable on non-Linux Sergey Bugaev
2023-04-02 23:09   ` Samuel Thibault
2023-04-03 10:10     ` Sergey Bugaev
2023-04-03 19:02       ` H.J. Lu
2023-04-03 20:11         ` Sergey Bugaev
2023-03-19 15:09 ` [RFC PATCH glibc 14/34] hurd: Move rtld-strncpy-c.c out of mach/hurd/ Sergey Bugaev
2023-04-02 23:10   ` Samuel Thibault
2023-03-19 15:09 ` [RFC PATCH glibc 15/34] hurd: Use uintptr_t for register values in trampoline.c Sergey Bugaev
2023-04-02 23:13   ` Samuel Thibault
2023-03-19 15:09 ` [RFC PATCH glibc 16/34] hurd: Add sys/ucontext.h and sigcontext.h for x86_64 Sergey Bugaev
2023-04-10 18:39   ` Samuel Thibault
2023-04-10 19:07     ` Sergey Bugaev
2023-04-10 19:21       ` Samuel Thibault
2023-04-10 18:58   ` Samuel Thibault
2023-04-10 19:13     ` Sergey Bugaev
2023-04-10 19:21       ` Samuel Thibault
2023-04-10 21:50         ` Sergey Bugaev
2023-04-10 22:23           ` Samuel Thibault
2023-03-19 15:10 ` [RFC PATCH glibc 17/34] hurd: Implement x86_64/intr-msg.h Sergey Bugaev
2023-04-10 18:41   ` Samuel Thibault
2023-03-19 15:10 ` [RFC PATCH glibc 18/34] hurd: Port trampoline.c to x86_64 Sergey Bugaev
2023-04-03 11:56   ` [PATCH v2 18.0/34] Alignment-respecting x86_64 trampoline.c Sergey Bugaev
2023-04-03 11:56     ` [PATCH v2 18.1/34] hurd: Do not declare local variables volatile Sergey Bugaev
2023-04-10 18:42       ` Samuel Thibault
2023-04-03 11:56     ` [PATCH v2 18.2/34] hurd: Port trampoline.c to x86_64 Sergey Bugaev
2023-04-10 19:04       ` Samuel Thibault
2023-04-10 21:33         ` Sergey Bugaev
2023-03-19 15:10 ` [RFC PATCH glibc 19/34] hurd: Move a couple of singal-related files to x86 Sergey Bugaev
2023-04-02 23:15   ` Samuel Thibault
2023-03-19 15:10 ` [RFC PATCH glibc 20/34] htl: Add tcb-offsets.sym for x86_64 Sergey Bugaev
2023-04-02 23:16   ` Samuel Thibault
2023-03-19 15:10 ` [RFC PATCH glibc 21/34] x86_64: Add rtld-stpncpy & rtld-strncpy Sergey Bugaev
2023-04-02 23:18   ` Samuel Thibault
2023-03-19 15:10 ` [RFC PATCH glibc 22/34] htl: Implement thread_set_pcsptp for x86_64 Sergey Bugaev
2023-04-02 23:19   ` Samuel Thibault
2023-03-19 15:10 ` [RFC PATCH glibc 23/34] elf: Stop including tls.h in ldsodefs.h Sergey Bugaev
2023-04-02 23:20   ` Samuel Thibault
2023-04-03  9:26     ` Sergey Bugaev
2023-04-10 21:26   ` Samuel Thibault
2023-03-19 15:10 ` [RFC PATCH glibc 24/34] hurd: Only check for TLS initialization inside rtld or in static builds Sergey Bugaev
2023-04-10 21:33   ` Samuel Thibault
2023-04-11 18:57   ` Samuel Thibault
2023-04-11 19:18     ` Samuel Thibault
2023-04-11 20:03     ` Samuel Thibault
2023-04-11 20:27     ` Sergey Bugaev
2023-04-11 21:23       ` Samuel Thibault
2023-04-12  8:36         ` Sergey Bugaev
2023-04-12  9:00           ` Samuel Thibault
2023-04-12 10:42             ` Sergey Bugaev
2023-04-12 10:45               ` Samuel Thibault
2023-04-12 17:18                 ` Sergey Bugaev
2023-04-12 23:46               ` Samuel Thibault
2023-04-13 10:02                 ` Sergey Bugaev
2023-04-13 10:10                   ` Samuel Thibault
2023-04-13 12:17                     ` Sergey Bugaev
2023-04-13 21:47                       ` Samuel Thibault
2023-04-13 22:21                         ` Samuel Thibault
2023-04-14  8:29                         ` Sergey Bugaev
2023-04-14  8:36                           ` Samuel Thibault
2023-04-14  8:53                             ` Sergey Bugaev
2023-04-14  9:09                               ` Samuel Thibault
2023-04-14  9:23                                 ` Sergey Bugaev
2023-04-14  9:31                                   ` Samuel Thibault
2023-04-17  7:16                               ` Samuel Thibault
2023-04-14 17:34   ` Samuel Thibault
2023-04-14 19:52     ` Sergey Bugaev
2023-03-19 15:10 ` [RFC PATCH glibc 25/34] hurd: Improve reply port handling when exiting signal handlers Sergey Bugaev
2023-04-10 22:03   ` Samuel Thibault
2023-04-11  7:44     ` Sergey Bugaev
2023-04-11 20:15       ` Samuel Thibault
2023-04-11 20:35         ` Sergey Bugaev
2023-04-12 22:54   ` Samuel Thibault
2023-03-19 15:10 ` [RFC PATCH glibc 26/34] hurd: Remove __hurd_local_reply_port Sergey Bugaev
2023-04-10 22:07   ` Samuel Thibault
2023-04-10 22:35     ` Samuel Thibault
2023-04-11  8:00     ` Sergey Bugaev
2023-04-11 20:18       ` Samuel Thibault
2023-04-13 11:58         ` [RFC PATCH glibc v2 " Sergey Bugaev
2023-04-13 13:12           ` Samuel Thibault
2023-04-13 13:20             ` Sergey Bugaev
2023-04-13 21:28               ` Samuel Thibault
2023-04-14 17:33           ` Samuel Thibault
2023-04-14 20:29             ` Sergey Bugaev
2023-04-15  6:45               ` Samuel Thibault
2023-04-15  7:34                 ` Sergey Bugaev
2023-04-15  7:42                   ` Samuel Thibault
2023-03-19 15:10 ` [RFC PATCH glibc 27/34] hurd: Don't leak __hurd_reply_port0 Sergey Bugaev
2023-04-10 22:25   ` Samuel Thibault
2023-03-19 15:10 ` [RFC PATCH glibc 28/34] hurd: Implement _hurd_longjmp_thread_state for x86_64 Sergey Bugaev
2023-04-02 23:23   ` Samuel Thibault
2023-03-19 15:10 ` [RFC PATCH glibc 29/34] hurd: Add vm_param.h " Sergey Bugaev
2023-04-02 23:24   ` Samuel Thibault
2023-03-19 15:10 ` [RFC PATCH glibc 30/34] hurd: Implement longjmp " Sergey Bugaev
2023-03-19 15:10 ` [RFC PATCH glibc 31/34] hurd: Microoptimize _hurd_self_sigstate () Sergey Bugaev
2023-04-02 23:26   ` Samuel Thibault
2023-03-19 15:10 ` [RFC PATCH glibc 32/34] hurd: Implement sigreturn for x86_64 Sergey Bugaev
2023-04-03 11:47   ` [PATCH v2] " Sergey Bugaev
2023-03-19 15:10 ` [RFC PATCH glibc 33/34] hurd: Create abilist files for lib{mach,hurd}user Sergey Bugaev
2023-03-19 15:19   ` Samuel Thibault
2023-03-19 15:39     ` Sergey Bugaev
2023-03-19 15:43       ` Samuel Thibault
2023-03-19 15:10 ` [RFC PATCH glibc 34/34] hurd: Add expected abilist files for x86_64 Sergey Bugaev
2023-03-19 18:04   ` Florian Weimer
2023-03-19 20:14     ` [PATCH v2] " Sergey Bugaev
2023-03-20  6:30       ` Florian Weimer
2023-03-19 16:44 ` [RFC PATCH 00/34] The rest of the x86_64-gnu port Luca
2023-03-20  5:03   ` Flávio Cruz
2023-04-02 23:30 ` Samuel Thibault
2023-04-10 19:20 ` Samuel Thibault
2023-04-10 21:24   ` Sergey Bugaev
2023-04-10 21:27     ` Samuel Thibault

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).