|
|
Message-ID: <20260723213451.GE3520958@port70.net> Date: Thu, 23 Jul 2026 23:34:51 +0200 From: Szabolcs Nagy <nsz@...t70.net> To: Jake Adamson <jakeadamson@...gle.com> Cc: musl@...ts.openwall.com Subject: Re: Question: number of arguments of musl's membarrier does not match Linux syscall * Jake Adamson <jakeadamson@...gle.com> [2026-07-23 13:34:02 -0700]: > Hi I'm adding membarrier() to Android's Bionic and I noticed that > there are a different number of arguments in Musl than in Linux’s > system call. Is there a reason for that and is there any nuisance that > I should be thinking about when adding it? And do you plan on adding > the cpu_id argument? google broke it (silently) https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2a36ab717e8fe678d98f81c14a0b124712719840 good example why libc does not like wrapping new syscalls (the contract is not documented and reasonable assumptions get broken instead of using a new syscall number) now it has to be var arg if we want backward compat. > > Linux: int cmd, unsigned int flags, int cpu_id > https://man7.org/linux/man-pages/man2/membarrier.2.html > > > Musl: int cmd, int flags > https://git.musl-libc.org/cgit/musl/tree/src/linux/membarrier.c > > Jake Adamson > Android Native Tools and Libraries, Software Engineer
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.