Re: [PATCH v2 3/7] syscall.h: add syscall_set_arguments() and syscall_set_return_value()

From: Eugene Syromyatnikov
Date: Fri Jan 17 2025 - 10:44:54 EST


On Fri, Jan 17, 2025 at 2:03 AM H. Peter Anvin <hpa@xxxxxxxxx> wrote:
>
> I link the concept of this patchset, but *please* make it clear in the
> comments that this does not solve the issue of 64-bit kernel arguments
> on 32-bit systems being ABI specific.

Sorry, but I don't see how this is relevant; each architecture has its
own ABI with its own set of peculiarities, and there's a lot of
(completely unrelated) work needed in order to make an ABI that is
architecture-agnostic. All this patch set does is provides a
consistent way to manipulate scno and args across architectures; it
doesn't address the fact that some architectures have mmap2/mmap_pgoff
syscall, or that some have fadvise64_64 in addition to fadvise64, or
the existence of clone2, or socketcall, or ipc; or that some
architectures don't have open or stat; or that scnos on different
architectures or even different bit-widths within the "same"
architecture are different.

> This isn't unique to this patch in any way; the only way to handle it is
> by keeping track of each ABI.

That's true, but this patch doesn't even try to address that.

--
Eugene Syromyatnikov
mailto:evgsyr@xxxxxxxxx
xmpp:esyr@jabber.{ru|org}