From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============0355505258967058308==" MIME-Version: 1.0 From: Josh Triplett To: kbuild-all@lists.01.org Subject: Re: [lkp] [+573 bytes kernel size regression] [i386-tinyconfig] [00f2dfd8c2] open: introduce openat2(2) syscall Date: Wed, 25 Dec 2019 02:03:52 -0800 Message-ID: <20191225100352.GB22699@localhost> In-Reply-To: <20191206023346.tubqtdmdbi4truix@yavin.dot.cyphar.com> List-Id: --===============0355505258967058308== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On Fri, Dec 06, 2019 at 01:33:46PM +1100, Aleksa Sarai wrote: > On 2019-11-12, Josh Triplett wrote: > > It would be nice if (for instance) it was possible to compile out the > > old openat and *only* support openat2, or otherwise compile out unused > > syscalls. In general, we're watching for new code that can't be built > > out of the kernel even in "allnoconfig"/"tinyconfig". > = > Based on discussions with the glibc folks, it appears it's not longer > their policy to emulate syscalls in userspace due to all of the > headaches associated with it. > = > So while you could (with some work) emulate openat(2) with openat2(2), I > don't think there's a clear path to making openat(2) optional -- much > like open(2) didn't become optional after openat(2). Not all embedded systems run glibc. If your userspace consists of a single application or a small set of applications, or you compile everything against a known set of libraryies that make all the syscalls, you can know that either everything uses the new syscall or everything uses the old syscall, and compile out the one you don't use. --===============0355505258967058308==--