Re: [PATCH] Include device/input.h in console-client

2023-04-24 Thread Flavio Cruz
Hi Samuel On Tue, Jan 10, 2023 at 10:20:19PM +0100, Samuel Thibault wrote: I was expecting it :) I'll wait a bit for the updated gnumach to get uploaded etc. before commiting it. Is it possible to merge this patch given that a new version of gnumach was released recently? Thanks Flavio

Re: [PATCH gnumach] Update task_basic_info and thread_basic_info to include time_value64_t data.

2023-04-24 Thread Flavio Cruz
On Mon, Apr 17, 2023 at 11:49:46AM +0200, Samuel Thibault wrote: Hello, Is this really needed? Since rpc_time_value_t will already be 64bit on 64bit platforms. (I don't hope to bring 64bit time to 32bit Hurd) time_value64_t is slightly better than time_value_t since it is future-proofed to p

[PATCH hurd] Use c_string for default_pager_filename_t to define a new default_pager_paging_storage RPC.

2023-04-24 Thread Flavio Cruz
This brings us a bit closer to having all types' msgt_size representable with a single byte. We will be able to avoid mach_msg_type_long_t entirely for x86_64 since mach_msg_type_t can represent long types using a separate field. --- hurd/default_pager.defs | 30 ++ mac

Re: [PATCH v2 4/4] socket: Add a test for MSG_CMSG_CLOEXEC

2023-04-24 Thread Samuel Thibault
Applied, thanks! Sergey Bugaev, le dim. 23 avril 2023 19:05:48 +0300, a ecrit: > This checks that: > * We can send and receive fds over Unix domain sockets using SCM_RIGHTS; > * msg_controllen, cmsg_level, cmsg_type, cmsg_len are all filled in > correctly on receive; > * Most importantly, the re

Re: [PATCH v2 2/4] hurd: Implement MSG_CMSG_CLOEXEC

2023-04-24 Thread Samuel Thibault
Sergey Bugaev, le mar. 25 avril 2023 00:35:58 +0300, a ecrit: > On Tue, Apr 25, 2023 at 12:10 AM Samuel Thibault > wrote: > > Applied, thanks! > > Thank you -- but I see you changed it to say "fds[j] | fd_flags". > > For one thing it would be nice of you to indicate that this was your > change,

Re: [PATCH v2 2/4] hurd: Implement MSG_CMSG_CLOEXEC

2023-04-24 Thread Sergey Bugaev
On Tue, Apr 25, 2023 at 12:10 AM Samuel Thibault wrote: > Applied, thanks! Thank you -- but I see you changed it to say "fds[j] | fd_flags". For one thing it would be nice of you to indicate that this was your change, not mine, because as things are it looks like I wrote that, but I didn't. Linu

Re: [PATCH 3/4] hurd: Microoptimize mmap ()

2023-04-24 Thread Samuel Thibault
Sergey Bugaev, le mar. 25 avril 2023 00:09:58 +0300, a ecrit: > What I should rather look into is marking __hurd_fail and friends with > __attribute__((cold)); that would take care of all the error branches > everywhere automatically without having to mark things up. Yes, that'd probably be great

Re: [PATCH v2 1/4] hurd: Don't pass FD_CLOEXEC in CMSG_DATA

2023-04-24 Thread Sergey Bugaev
On Tue, Apr 25, 2023 at 12:02 AM Samuel Thibault wrote: > The two patches actually make me realize that there was a confusion here > between FD_* flags and O_* flags. _hurd_intern_fd definitely takes O_* > flags (and translates O_CLOEXEC to FD_CLOEXEC). If we are to transport > some flags, it'd pr

Re: [PATCH 3/4] hurd: Microoptimize mmap ()

2023-04-24 Thread Sergey Bugaev
On Mon, Apr 24, 2023 at 11:47 PM Samuel Thibault wrote: > Is it really worth making the code a bit obscure? No, not really. What happened here was I looked at what my mask computation compiled to, to verify it does the right thing on both x86_64 and i686, and then I saw how the error branches ar

Re: [PATCH v2 2/4] hurd: Implement MSG_CMSG_CLOEXEC

2023-04-24 Thread Samuel Thibault
Applied, thanks! Sergey Bugaev, le dim. 23 avril 2023 19:05:46 +0300, a ecrit: > This is a new flag that can be passed to recvmsg () to make it > atomically set the CLOEXEC flag on all the file descriptors received > using the SCM_RIGHTS mechanism. This is useful for all the same reasons > that th

Re: [PATCH v2 1/4] hurd: Don't pass FD_CLOEXEC in CMSG_DATA

2023-04-24 Thread Samuel Thibault
Sergey Bugaev, le dim. 23 avril 2023 19:05:45 +0300, a ecrit: > It is of no concern to the receiving process whether or not the sender > process wants to close its copy of sent file descriptor upon exec, and > it should not influence whether or not the received file descriptor gets > the FD_CLOEXEC

Re: [RFC PATCH 4/4] hurd: Implement prefer_map_32bit_exec tunable

2023-04-24 Thread Samuel Thibault
Applied, thanks! Sergey Bugaev, le lun. 24 avril 2023 00:55:26 +0300, a ecrit: > This makes the prefer_map_32bit_exec tunable no longer Linux-specific. > > Signed-off-by: Sergey Bugaev > --- > sysdeps/mach/hurd/dl-sysdep.c | 5 > sysdeps/mach/hurd/mmap.c

Re: [PATCH 3/4] hurd: Microoptimize mmap ()

2023-04-24 Thread Samuel Thibault
Hello, Is it really worth making the code a bit obscure? The mapping RPC will be way more expensive than branch misprediction... Samuel Sergey Bugaev, le lun. 24 avril 2023 00:55:25 +0300, a ecrit: > Signed-off-by: Sergey Bugaev > --- > sysdeps/mach/hurd/mmap.c | 8 +--- > 1 file changed,

Re: [PATCH 2/4] hurd: Don't attempt to deallocate MACH_PORT_DEAD

2023-04-24 Thread Samuel Thibault
Applied, thanks! Sergey Bugaev, le lun. 24 avril 2023 00:55:24 +0300, a ecrit: > ...in some more places. > > Signed-off-by: Sergey Bugaev > --- > sysdeps/mach/hurd/dl-sysdep.c | 2 +- > sysdeps/mach/hurd/mmap.c | 6 +++--- > 2 files changed, 4 insertions(+), 4 deletions(-) > > diff --git

Re: [PATCH v2 3/4] hurd: Only deallocate addrport when it's valid

2023-04-24 Thread Samuel Thibault
Applied, thanks! Sergey Bugaev, le dim. 23 avril 2023 19:05:47 +0300, a ecrit: > Signed-off-by: Sergey Bugaev > --- > sysdeps/mach/hurd/recv.c | 3 ++- > sysdeps/mach/hurd/recvfrom.c | 3 ++- > sysdeps/mach/hurd/recvmsg.c | 3 ++- > sysdeps/mach/hurd/sendmsg.c | 5 +++-- > sysdeps/mach/hur

Re: [PATCH 1/4] hurd: Implement MAP_32BIT

2023-04-24 Thread Samuel Thibault
Applied, thanks! Sergey Bugaev, le lun. 24 avril 2023 00:55:23 +0300, a ecrit: > This is a flag that can be passed to mmap () to request that the mapping > being established should be located in the lower 2 GB area of the > address space, so only the lower 31 (not 32) bits can be set in its > addr

Re: [PATCH hurd] Use c_string for default_pager_filename_t to define a new default_pager_paging_storage RPC.

2023-04-24 Thread Samuel Thibault
Flavio Cruz, le lun. 24 avril 2023 00:58:22 -0400, a ecrit: > @@ -76,7 +76,8 @@ skip; /* > default_pager_register_fileserver */ > number of a region whose length is given by the next odd-numbered > element. NAME is used in any diagnostics the default pager pr

Re: [PATCH hurd] Improve portability for rpctrace on x86_64

2023-04-24 Thread Samuel Thibault
Applied, thanks! Flavio Cruz, le lun. 24 avril 2023 00:57:53 -0400, a ecrit: > Defined alignment as __alignof__(uintptr_t) to match MiG. > > Also used char* instead of void* during the message iteration since it's > more portable as pointer arithmetic on void* is a GNU extension. > --- > utils/r

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

2023-04-24 Thread Samuel Thibault
Sergey Bugaev, le lun. 24 avril 2023 23:27:09 +0300, a ecrit: > Alternatively, if it is some fatal crash in userland, what should I > break on in gnumach to detect it? Somewhere in vm_fault.c? The debug_all_traps_with_kdb variable is there for that, you can also enable it live from kdb with debu

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

2023-04-24 Thread Sergey Bugaev
Hi, On Mon, Apr 24, 2023 at 11:02 PM Luca Dariz wrote: > Il 24/04/23 17:19, Sergey Bugaev ha scritto: > > Resending without the attachment, because apparently the email did not > > make it into the list archive so maybe it didn't get to you either; > > and I'm too conscious about email just eatin

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

2023-04-24 Thread Luca Dariz
Il 24/04/23 17:19, Sergey Bugaev ha scritto: Resending without the attachment, because apparently the email did not make it into the list archive so maybe it didn't get to you either; and I'm too conscious about email just eating my letters without any notice or indication since that one time. If

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

2023-04-24 Thread Sergey Bugaev
Resending without the attachment, because apparently the email did not make it into the list archive so maybe it didn't get to you either; and I'm too conscious about email just eating my letters without any notice or indication since that one time. If you didn't get the last one and still want the