Date: Sat, 3 Feb 2024 17:11:42 +0100 From: Paul Floyd <paulf2718@gmail.com> To: freebsd-current@freebsd.org Subject: Re: libc/libsys split coming soon Message-ID: <8a34573d-4a6c-4d5d-a771-b39279059547@gmail.com> In-Reply-To: <Zb1tTz5LXuVQ5Caj@spindle.one-eyed-alien.net> References: <Zb1tTz5LXuVQ5Caj@spindle.one-eyed-alien.net>
next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format. --------------Lzv0HbUPiLaqwaTtWCEXAQwd Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 02/02/2024 23:31, Brooks Davis wrote: > TL;DR: The implementation of system calls is moving to a seperate > library (libsys). No changes are required to existing software (except > to ensure that libsys is present when building custom disk images). > > Code:https://github.com/freebsd/freebsd-src/pull/908 > > After nearly a decade of intermittent work, I'm about to land a series > of patches which moves system calls, vdso support, and libc's parsing of > the ELF auxiliary argument vector into a separate library (libsys). I > plan to do this early next week (February 5th). > > This change serves three primary purposes: > 1. It's easier to completely replace system call implementations for > tracing or compartmentalization purposes. Will that affect code that makes syscalls without currently linking to libc? > 2. It simplifies the implementation of restrictions on system calls such > as those implemented by OpenBSD's msyscall(2) > (https://man.openbsd.org/msyscall.2). That's one to ignore for tools that make syscalls outside of the libc memory mapping. > 3. It allows language runtimes to link with libsys for system call > implementations without requiring libc. I see that pagesize is on the list of functions that are moving. There are a couple of other functions that might cause me problems if libc isn't linked. Could you do a quick test with an exe linked to libsys but not libc running under Valgrind memcheck, please? A+ Paul --------------Lzv0HbUPiLaqwaTtWCEXAQwd Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> </head> <body> <p><br> </p> <div class="moz-cite-prefix">On 02/02/2024 23:31, Brooks Davis wrote:<br> </div> <blockquote type="cite" cite="mid:Zb1tTz5LXuVQ5Caj@spindle.one-eyed-alien.net"> <pre class="moz-quote-pre" wrap="">TL;DR: The implementation of system calls is moving to a seperate library (libsys). No changes are required to existing software (except to ensure that libsys is present when building custom disk images). Code: <a class="moz-txt-link-freetext" href="https://github.com/freebsd/freebsd-src/pull/908">https://github.com/freebsd/freebsd-src/pull/908</a> After nearly a decade of intermittent work, I'm about to land a series of patches which moves system calls, vdso support, and libc's parsing of the ELF auxiliary argument vector into a separate library (libsys). I plan to do this early next week (February 5th). This change serves three primary purposes: 1. It's easier to completely replace system call implementations for tracing or compartmentalization purposes.</pre> </blockquote> <p>Will that affect code that makes syscalls without currently linking to libc?<span style="white-space: pre-wrap"> </span></p> <blockquote type="cite" cite="mid:Zb1tTz5LXuVQ5Caj@spindle.one-eyed-alien.net"> <pre class="moz-quote-pre" wrap=""> 2. It simplifies the implementation of restrictions on system calls such as those implemented by OpenBSD's msyscall(2) (<a class="moz-txt-link-freetext" href="https://man.openbsd.org/msyscall.2">https://man.openbsd.org/msyscall.2</a>).</pre> </blockquote> <p>That's one to ignore for tools that make syscalls outside of the libc memory mapping.<span style="white-space: pre-wrap"> </span></p> <blockquote type="cite" cite="mid:Zb1tTz5LXuVQ5Caj@spindle.one-eyed-alien.net"> <pre class="moz-quote-pre" wrap=""> 3. It allows language runtimes to link with libsys for system call implementations without requiring libc.</pre> </blockquote> <p><span style="white-space: pre-wrap">I see that pagesize is on the list of functions that are moving. There are a couple of other functions that might cause me problems if libc isn't linked.</span></p> <p><span style="white-space: pre-wrap">Could you do a quick test with an exe linked to libsys but not libc running under Valgrind memcheck, please?</span></p> <p><span style="white-space: pre-wrap"> </span></p> <p><span style="white-space: pre-wrap">A+</span></p> <p><span style="white-space: pre-wrap">Paul </span></p> </body> </html> --------------Lzv0HbUPiLaqwaTtWCEXAQwd--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8a34573d-4a6c-4d5d-a771-b39279059547>