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
| ||
|
Date: Thu, 9 Jul 2020 17:09:21 -0700 From: Randy Dunlap <rdunlap@...radead.org> To: André Almeida <andrealmeid@...labora.com>, linux-kernel@...r.kernel.org, tglx@...utronix.de, peterz@...radead.org Cc: krisman@...labora.com, kernel@...labora.com, dvhart@...radead.org, mingo@...hat.com, pgriffais@...vesoftware.com, fweimer@...hat.com, libc-alpha@...rceware.org, malteskarupke@....de, linux-api@...r.kernel.org, arnd@...db.de Subject: Re: [RFC v2 1/4] futex2: Add new futex interface Hi, On 7/9/20 10:59 AM, André Almeida wrote: > > > diff --git a/kernel/futex2.c b/kernel/futex2.c > new file mode 100644 > index 000000000000..b87a10ba7c01 > --- /dev/null > +++ b/kernel/futex2.c > @@ -0,0 +1,73 @@ > +// SPDX-License-Identifier: GPL-2.0-or-later > +/* > + * futex2 system call interface by André Almeida <andrealmeid@...labora.com> > + * > + * Copyright 2020 Collabora Ltd. > + */ > + > +#include <linux/syscalls.h> > + > +#include <asm/futex.h> > + > +/* > + * Set of flags that futex2 operates. If we got something that is not in this > + * set, it can be a unsupported futex1 operation like BITSET or PI, so we > + * refuse to accept > + */ > +#define FUTEX2_MASK (FUTEX_SIZE_MASK | FUTEX_PRIVATE_FLAG | FUTEX_CLOCK_REALTIME) > + > +/** > + * sys_futex_wait: Wait on a futex address if (*uaddr) == val Function name line should use - as separator, not :, so * sys_futex_wait - Wait on a futex address if (*uaddr) == val > + * @uaddr: User address of futex > + * @val: Expected value of futex > + * @flags: Checks if futex is private, the size of futex and the clockid > + * @timo: Optional absolute timeout. Supports only 64bit time. > + */ > +SYSCALL_DEFINE4(futex_wait, void __user *, uaddr, unsigned long, val, > + unsigned long, flags, struct __kernel_timespec __user *, timo) > +{ ... > +} > + > +/** > + * sys_futex_wake: Wake a number of futexes waiting in an address Same here: * sys_futex_wake - Wake a number of futexes waiting in an address or could it be "on an address": * sys_futex_wake - Wake a number of futexes waiting on an address > + * @uaddr: Address of futex to be woken up > + * @nr_wake: Number of futexes to be woken up > + * @flags: Checks if futex is private and the size of futex > + */ > +SYSCALL_DEFINE3(futex_wake, void __user *, uaddr, unsigned int, nr_wake, > + unsigned long, flags) > +{ thanks. -- ~Randy
Powered by blists - more mailing lists