Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 24 May 2021 15:52:44 +0200
From: Martin Vajnar <martin.vajnar@...il.com>
To: musl@...ts.openwall.com
Cc: Markus Wichmann <nullplan@....net>, Florian Weimer <fweimer@...hat.com>
Subject: Re: Backwards kernel compatibility

Hi, Markus,

sorry for the late reply it was quite busy lately. You're describing
exactly the issue, we are facing in our project. We need to use old kernel
which we have only in binary form and have headers for it. At the same time
we would like to have the latest musl running on it.

The problem we encounter is that for unsupported (or better said, not
supported yet) syscalls we get performance overhead because of the ENOSYS.

We see 2 options to approach this:

 1. remove the syscalls manually/alter the code to not invoke them (hacky)
 2. during musl compile time (maybe even configure-time), parse the
supplied kernel headers and based on availability of syscalls use defines
to steer the code execution (more universal)

Would the 2nd case be something that musl community would be interested in,
should we choose to implement it for the project?


Regards,
Martin

po 10. 5. 2021 v 20:58 odesílatel Markus Wichmann <nullplan@....net> napsal:

> On Mon, May 10, 2021 at 07:50:44AM +0200, Martin Vajnar wrote:
> > Hello guys,
> >
> > I'd like to ask, if it is generally supported to run recent musl on older
> > kernels? My primary concern is that there are new syscalls being added to
> > linux, while at the same time I do not see a switch similar to glibc's to
> > select compatibility mode (--enable-kernel). Is there some means which
> > prevent invocation of unimplemented syscalls on older kernels when using
> > musl?
> >
> > Best regards,
> > Martin Vajnar
>
> In general, musl tries to support all kernel versions from 2.6.0 on. If
> you call a newer system call on a kernel that doesn't support it, you
> will get ENOSYS back, but all algorithms implemented in the library will
> fall back to that smallest common denominator (and some things even
> further).
>
> There is no way to prevent calls to new system calls on older kernels,
> since the kernel already takes care of that.
>
> Ciao,
> Markus
>

Content of type "text/html" skipped

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.