On 24.05.2018 14:45, Martin Husemann wrote: > On Thu, May 24, 2018 at 02:39:01PM +0200, Kamil Rytarowski wrote: >> It looks like there is no better within the C ABI to serialize arbitrary >> arguments. We want for example 2 integers returned from SYS_pipe. > > You could do that with a minor variant of the version I suggested. > I think we will end up in the same position like with sysctl(2)/__sysctl(2) and portability issues. C types are not great here for serialization. I assume that using an intermediate format like char* and passing a text back and forth for input and output arguments is overkill. We can keep both syscalls in the compat layer for 8.0 and keep running golang or similar programs and keep building it until transition. >> I'm going to switch sanitizers to dlsym(3) trickery (RTLD_NEXT) and see >> how good it will work. > > Why not just call the "_" versions? I.e. mmap(...) -> _mmap(...). > I was doing this with a local patch for sysctl(3). Cons of this approach: - We need to either #define mmap _mmap before inclusion of system headers or try to redefine the prototype. Global redefinition of a symbol can interfere with definition of interceptors. - It's not universal for all libc/libpthread symbols (for example getpid(2)). - It's a maintenance burden as it breaks quickly for upstream changes (confirmed with a local patch for _sysctl). > Martin > > >
Attachment:
signature.asc
Description: OpenPGP digital signature