* Sergey Bugaev:
> On Sun, Mar 19, 2023 at 9:05 PM Florian Weimer 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 lo
Nice work indeed Sergey!
On Sun, Mar 19, 2023 at 12:44 PM Luca 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 a
* i386/i386/thread.h: Define STACK_ALIGN which is 16-byte for 64 bit
programs as recommended by the System V AMD64 guidelines.
* i386/i386/pcb.c: Use STACK_ALIGN to align the bootstrap arguments and
ultimately the stack where the program starts on.
* kern/bootstrap.c: Do not align arg_len here
On Sun, Mar 19, 2023 at 9:05 PM Florian Weimer 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 l
Il 19/03/23 18:39, Sergey Bugaev ha scritto:
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.
Actually no, exec is the first dynamic executable alrea
* 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 Su
(un-cc-ing libc-alpha)
> 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-ge
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
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}use
On Sun, Mar 19, 2023 at 6:19 PM Samuel Thibault 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{
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 20
Just like the other existing rtld-str* files, this provides rtld with
usable versions of stpncpy and strncpy.
Signed-off-by: Sergey Bugaev
---
sysdeps/x86_64/multiarch/rtld-stpncpy.S | 18 ++
sysdeps/x86_64/multiarch/rtld-strncpy.S | 18 ++
2 files changed, 36 ins
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
---
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
Signed-off-by: Sergey Bugaev
---
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 en
Nothing in there needs tls.h
Signed-off-by: Sergey Bugaev
---
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
@@
...to keep `sigexc' port initialization in one place, and match what the
comments say.
No functional change.
Signed-off-by: Sergey Bugaev
---
hurd/hurdfault.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/hurd/hurdfault.c b/hurd/hurdfault.c
index a81e7280..4340897d
Signed-off-by: Sergey Bugaev
---
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/i
Signed-off-by: Sergey Bugaev
---
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-machde
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 file
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/m
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
---
sysdeps/{mach/hurd => }/i386/i686/multiarch/rtld-strncpy-c.c | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename sysdeps/{mach/hurd => }/i
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
---
stdio-common/_itoa.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/stdio-common/_itoa.c b/stdio-common/_itoa.c
in
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
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
Signed-off-by: Sergey Bugaev
---
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
These do not need any changes to be used on x86_64.
Signed-off-by: Sergey Bugaev
---
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
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
---
sysdeps/x86/cpu-f
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
---
sysdeps/x86_64/htl/Makefile| 20
sysdeps/x86_64/htl/tcb-offsets.sym | 8
2 files changed, 28 insert
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
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
-
Signed-off-by: Sergey Bugaev
---
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 --gi
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. St
Signed-off-by: Sergey Bugaev
---
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, j
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 potent
Signed-off-by: Sergey Bugaev
---
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 m
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 te
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
---
hurd/hurd/signal.h | 8 +---
1 file changed,
Signed-off-by: Sergey Bugaev
---
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
Signed-off-by: Sergey Bugaev
---
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 10064
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, a
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
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-of
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,
Signed-off-by: Sergey Bugaev
---
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. */
st
---
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_s
45 matches
Mail list logo