|
|
Message-ID: <amKTgOA68fL1T83u@google.com> Date: Thu, 23 Jul 2026 15:23:22 -0700 From: Nick Desaulniers <ndesaulniers@...gle.com> To: Szabolcs Nagy <nsz@...t70.net> Cc: Jake Adamson <jakeadamson@...gle.com>, musl@...ts.openwall.com, Peter Oskolkov <posk@...gle.com>, Peter Zijlstra <peterz@...radead.org>, mathieu.desnoyers@...icios.com Subject: Re: Question: number of arguments of musl's membarrier does not match Linux syscall On Thu, Jul 23, 2026 at 11:34:51PM +0200, Szabolcs Nagy wrote: > * 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 Oops, did it get reported, yet? I didn't see any follow ups one the original LKML thread. https://lore.kernel.org/all/20200923233618.2572849-1-posk@google.com/T/#u Patch from 2020...perhaps too late to do anything about it. Though shall not break userspace... > > 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.