lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <732f202e-c0de-493e-adec-59fe069b17c9@t-8ch.de>
Date: Sun, 22 Dec 2024 12:39:01 +0100
From: Thomas Weißschuh <linux@...ssschuh.net>
To: Willy Tarreau <w@....eu>
Cc: Shuah Khan <shuah@...nel.org>, 
	Paul Walmsley <paul.walmsley@...ive.com>, Palmer Dabbelt <palmer@...belt.com>, 
	Albert Ou <aou@...s.berkeley.edu>, linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org, 
	linux-riscv@...ts.infradead.org, Zhangjin Wu <falcon@...ylab.org>
Subject: Re: [PATCH 1/6] tools/nolibc: add support for waitid()

Hi Willy!

On 2024-12-21 17:35:40+0100, Willy Tarreau wrote:
> On Sat, Dec 21, 2024 at 03:44:28PM +0100, Thomas Weißschuh wrote:
> > waitid() is the modern variant of the family of wait-like syscalls.
> > Some architectures have dropped support for wait(), wait4() and waitpid()
> > but all of them support waitid().
> > It is more flexible and easier to use than the older ones.
> 
> I'm generally fine with the series, but I'm starting to get concerned
> that some simple applications that used to rely on wait() or waitpid()
> will not work on this architecture. Just like we did for some early
> syscalls that got replaced (e.g. open->openat etc), I think we'll have
> to implement a default wrapper relying on waitid() for all these calls
> in this case, and maybe as well for lseek->llseek() btw, what do you
> think ?

Indeed, it would be nice to have full compatibility. However there are
more syscalls missing than wait() and lseek(). These are just the
missing ones affecting nolibc-test.
Adding wrappers will be more work. This series is only meant to
ensure that the existing limited support does not regress.

We can add compatibility wrappers one after the other on top.
I think Zhangjin implemented and proposed a few before, but a few of
them ended up complicated.

> The single fact that you've had to modify some of the nolibc-test code
> (which is supposed to be the application here) indicates that we're
> progressively going away from what applications need on certain archs.
> Ideally an application relying on long-established calls should continue
> to work unmodified.

Agreed.

> Maybe it will be time for us to run an overall audit of arch-dependent
> syscalls we currently have, to make sure that the common ones continue
> to work fine there (and waitpid() definitely is as common a syscall as
> open() since it's the good old and portable one).

Isn't this what nolibc-test is already doing?
Or do you also want to compare it to non-current kernel versions?

In general the special rv32 syscalls are not really
architecture-dependent, they just dropped the "legacy" ones, especially
all using 32bit timestamps.


Thomas

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ