Re: [PATCH 5/5] add setting gs/fsbase

2023-04-30 Thread Samuel Thibault
Applied, thanks! Luca Dariz, le mer. 19 avril 2023 21:47:03 +0200, a ecrit: > * i386/i386/i386asm.sym: add offsets for asm > * i386/i386/pcb.c: switch FSBASE/GSBASE on context switch and > implement accessors in thread setstatus/getstatus > * i386/i386/thread.h: add new state to thread saved sta

Re: [RFC PATCH v3 3/6] hurd: Replace reply port with a dead name on failed interruption

2023-04-30 Thread Samuel Thibault
Applied, thanks! Sergey Bugaev, le sam. 29 avril 2023 23:18:19 +0300, a ecrit: > If we're trying to interrupt an interruptible RPC, but the server fails > to respond to our __interrupt_operation () call, we instead destroy the > reply port we were expecting the reply to the RPC on. > > Instead of

Re: [PATCH glibc] Define __mig_strlen to support dynamically sized strings in hurd RPCs

2023-04-30 Thread Samuel Thibault
Applied, thanks! Flavio Cruz via Libc-alpha, le dim. 30 avril 2023 20:09:49 -0400, a ecrit: > We make lib{mach,hurd}user.so only call __mig_strlen which can be > relocated before libc.so is relocated, similar to what is done with > __mig_memcpy. > --- > mach/Makefile |

[PATCH glibc] Define __mig_strlen to support dynamically sized strings in hurd RPCs

2023-04-30 Thread Flavio Cruz
We make lib{mach,hurd}user.so only call __mig_strlen which can be relocated before libc.so is relocated, similar to what is done with __mig_memcpy. --- mach/Makefile | 2 +- mach/Versions | 1 + mach/mach/mig_support.h | 1 + m

Re: [PATCH 4/5 (v4)] x86_64: add 64-bit syscall entry point

2023-04-30 Thread Samuel Thibault
Applied, thanks! Luca Dariz, le mer. 19 avril 2023 21:47:02 +0200, a ecrit: > While theoretically we could still use the same call gate as for > 32-bit userspace, it doesn't seem very common, and gcc seems to not > encode properly the instruction. Instead we use syscall/sysret as > other kernels (

Re: [PATCH mig] Add support for dynamically sized strings

2023-04-30 Thread Samuel Thibault
Flavio Cruz, le dim. 30 avril 2023 19:47:27 -0400, a ecrit: > The only difference with the previous patch is that we use mig_strlen so > that we can pick __mig_strlen when building glibc. Why doing so? For memcpy we have glibc's sysdeps/mach/include/mach/mig_support.h #define memcpy to __mig_memcp

[PATCH mig] Add support for dynamically sized strings

2023-04-30 Thread Flavio Cruz
Dynamically sized strings can be represented as c_string[*] (*). We inline up to 64 bytes but can pass arbitrary strings if needed out of line. Currently implementation is limited to input arguments only (MiG will error out if used as output). In the user stub, we first run mig_strlen on the param

Re: [RFC PATCH v3 5/6] hurd: Make it possible to call memcpy very early

2023-04-30 Thread Samuel Thibault
Applied, thanks! Sergey Bugaev, le sam. 29 avril 2023 23:18:21 +0300, a ecrit: > Normally, in static builds, the first code that runs is _start, in e.g. > sysdeps/x86_64/start.S, which quickly calls __libc_start_main, passing > it the argv etc. Among the first things __libc_start_main does is > in

Re: [PATCH v3 4/6] hurd: Add expected abilist files for x86_64

2023-04-30 Thread Samuel Thibault
Sergey Bugaev, le sam. 29 avril 2023 23:18:20 +0300, a ecrit: > - __pthread_self is now in libc.so, not libpthread.so > (I'm still not sure why this move is being done, though) Other pthread symbols are to move to libc.so too, to align on the move that was done on Linux. Samuel

Re: [PATCH v3 2/6] hurd: Implement longjmp for x86_64

2023-04-30 Thread Samuel Thibault
Applied, thanks! Sergey Bugaev, le sam. 29 avril 2023 23:18:18 +0300, a ecrit: > Checked on x86_64-gnu. > > Signed-off-by: Sergey Bugaev > --- > I have checked that setjmp/longjmp actually works sucessfully, with both > __longjmp and longjmp_chk. I have not been able to check w/ sigaltstack

Re: [PATCH v3 1/6] hurd: Implement sigreturn for x86_64

2023-04-30 Thread Samuel Thibault
Applied, thanks! Sergey Bugaev, le sam. 29 avril 2023 23:18:17 +0300, a ecrit: > Signed-off-by: Sergey Bugaev > --- > This incorporates back the fix made to the i386 version: we do need to call > _hurd_self_sigstate () once after all. > > sysdeps/mach/hurd/x86_64/sigreturn.c | 162 +

Re: [PATCH] Define mig_strlen and __mig_strlen to support dynamically sized strings in hurd RPCs

2023-04-30 Thread Samuel Thibault
Flavio Cruz, le sam. 29 avril 2023 20:27:36 -0400, a ecrit: > diff --git a/mach/Versions b/mach/Versions > index b525cfdcf9..2dff5c477e 100644 > --- a/mach/Versions > +++ b/mach/Versions > @@ -61,6 +61,9 @@ libc { >GLIBC_2.32 { > mach_print; >} > + GLIBC_2.38 { > +mig_strlen; > +

Re: [PATCH] Make __mach_msg_destroy portable for x86_64

2023-04-30 Thread Samuel Thibault
Applied, thanks! Flavio Cruz, le sam. 29 avril 2023 23:02:20 -0400, a ecrit: > We need to align on uintptr_t to make this work for x86_64, > otherwise things will go wrong when RPCs return errors. > --- > mach/msg-destroy.c | 9 + > 1 file changed, 5 insertions(+), 4 deletions(-) > > di