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

2023-04-22 Thread Luca Dariz
Hi Sergey, Il 20/04/23 13:51, Sergey Bugaev ha scritto: On Wed, Apr 19, 2023 at 11:52 PM Sergey Bugaev wrote: We do reach the call to __thread_set_state (), but then it uses __mig_memcpy (), which is just 'return memcpy (...)'. And (because of the static build?), that memcpy () is the full real

Re: [RFC PATCH v2 1/7] misc: Convert daemon () to GNU coding style

2023-04-22 Thread Samuel Thibault
Applied, thanks! Adhemerval Zanella Netto, le ven. 21 avril 2023 09:18:19 -0300, a ecrit: > > > On 19/04/23 13:02, Sergey Bugaev wrote: > > This is nicer, and is going to be required for the following changes > > to reasonably stay within the 79 column limit. > > > > No functional change. > >

Re: [RFC PATCH v2 3/7] Use O_CLOEXEC in more places (BZ #15722)

2023-04-22 Thread Samuel Thibault
Applied, thanks! Adhemerval Zanella Netto, le ven. 21 avril 2023 09:55:58 -0300, a ecrit: > > > On 19/04/23 13:02, Sergey Bugaev wrote: > > When opening a temporary file without O_CLOEXEC we risk leaking the > > file descriptor if another thread calls (fork and then) exec while we > > have the f

Re: [VERY RFC PATCH 2/2] hurd: Make it possible to call memcpy very early

2023-04-22 Thread Samuel Thibault
Sergey Bugaev, le ven. 21 avril 2023 16:56:57 +0300, a ecrit: > On Fri, Apr 21, 2023 at 3:58 PM Adhemerval Zanella Netto > wrote: > > > Yes, sure, I wasn't really suggesting we do that change. My point is, > > > I would like to make the same memcpy callsites both work during early > > > startup an

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

2023-04-22 Thread Sergey Bugaev
On Sat, Apr 22, 2023 at 2:17 PM Luca Dariz wrote: > Hi Sergey, Hi, > Il 20/04/23 13:51, Sergey Bugaev ha scritto: > > On Wed, Apr 19, 2023 at 11:52 PM Sergey Bugaev wrote: > > We do reach the call to __thread_set_state (), but then it uses > > __mig_memcpy (), which is just 'return memcpy (...)

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

2023-04-22 Thread Samuel Thibault
Sergey Bugaev, le sam. 22 avril 2023 15:11:30 +0300, a ecrit: > So please suggest your favorite REPL :) bc ? :) Samuel

Re: [VERY RFC PATCH 2/2] hurd: Make it possible to call memcpy very early

2023-04-22 Thread Sergey Bugaev
On Sat, Apr 22, 2023 at 2:59 PM Samuel Thibault wrote: > Perhaps we can generate "init" variants of the RPCs that we need at > initialization, that are made to use the base memcpy implementation, and > only use them in the init code? If we undo 56010b73e81e2cb1082e418699f98353598fe671 for static

Re: [VERY RFC PATCH 2/2] hurd: Make it possible to call memcpy very early

2023-04-22 Thread Samuel Thibault
Sergey Bugaev, le sam. 22 avril 2023 15:18:08 +0300, a ecrit: > We should only need to de-ifunc-ify init-first.c, > thread_set_state, hurdstartup.c, and exec_startup_get_info. If they > all go through __mig_memcpy which is in a separate translation unit, > we'd have to make __mig_memcpy slow for ev

Re: [VERY RFC PATCH 2/2] hurd: Make it possible to call memcpy very early

2023-04-22 Thread Sergey Bugaev
On Sat, Apr 22, 2023 at 7:20 PM Samuel Thibault wrote: > But what about the memcpy calls from the RPC stubs used by the init > code? Ah, I see that we do actually call more than I thought before _start1. In particular, we initialize the dtable (so the ctty stuff...) and get our pid/pgrp from the