Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp123429ybt; Thu, 9 Jul 2020 17:20:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxeaQFoOJih9iSShhPFL4qcMuByODJEqZ1IMRXWopqUvwFKtB1BlJS15bc42KTlCcKIlZb7 X-Received: by 2002:a17:906:1b45:: with SMTP id p5mr58137366ejg.51.1594340430053; Thu, 09 Jul 2020 17:20:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594340430; cv=none; d=google.com; s=arc-20160816; b=OyjC40/L3YbHYxG8lYGkdIJWagYQKtAoYTaFSPs0xbVjp/vOLAvzAkC+392sVUMwBT SF6lpROBYa5Y7jBV1tqeP6OjEdHfgsnwQO/f00wNlawCkEQ2Bfo21/1AmftqdsOpdMix 8fQl+yvPtr1m6XNkdfn97WjMxMaUgJf92H1FxIAHigrJO2ZmlPzX07pnaDgOpYlbmbv9 LWWS4xhFAw9uPYsSz4rRiTM49Q7TzLfGFZ68gPFO7vjnHBYXR1DPBAYTU6d5S4V2iJy8 hgPNpu3JP5aLvNHqGbOp09A/tPwGENMuxZduMz7kYvdbiPH6AuwiTz4QAzgfSrGLowoK b1Vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=7IsAVT4u/ul+NhAWEGWXgMmp1K9kYpNMafEk9EDr0bw=; b=WApIXLxMgVRNIsU7H98ZXkiZSJsP/cfHKao3jW8xm25mKFD5mQJxBw8Lk7xT1+qvEZ ozsFMMlctQAhe54pq34BOb/yLSLQ/mib5DC7vMgeP/ifjcWEQ9nwmQk26UYPZhzUkyJ1 9ljKSyRGCc8NRh5/DNhGgvjoHQt/vVB+xmeqPJI7f/T2JpQ3suDuxL4DEV7IIHs17y4N y7Gw2d0wyz6g/+re9N5JT/LXsaGJVLD1QCY7PlrGNP3qL5kY5r3y2Rqzz/Et0XsGymvT qKOuBiutGuj0No7lFQveS+ixWRPGHur6CzmhYE37RkDq0AgcGajlFSrf8CbcHE80riIw MENw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x6si2806849ejw.73.2020.07.09.17.20.07; Thu, 09 Jul 2020 17:20:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726756AbgGJAT6 (ORCPT + 99 others); Thu, 9 Jul 2020 20:19:58 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:35468 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726272AbgGJAT5 (ORCPT ); Thu, 9 Jul 2020 20:19:57 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: tonyk) with ESMTPSA id 57E6A2A43C8 Subject: Re: [RFC v2 1/4] futex2: Add new futex interface To: Randy Dunlap , linux-kernel@vger.kernel.org, tglx@linutronix.de, peterz@infradead.org Cc: krisman@collabora.com, kernel@collabora.com, dvhart@infradead.org, mingo@redhat.com, pgriffais@valvesoftware.com, fweimer@redhat.com, libc-alpha@sourceware.org, malteskarupke@web.de, linux-api@vger.kernel.org, arnd@arndb.de References: <20200709175921.211387-1-andrealmeid@collabora.com> <20200709175921.211387-2-andrealmeid@collabora.com> From: =?UTF-8?Q?Andr=c3=a9_Almeida?= Message-ID: <9d09639f-6821-8d21-d3cb-ec980338c4e8@collabora.com> Date: Thu, 9 Jul 2020 21:19:47 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, On 7/9/20 9:09 PM, Randy Dunlap wrote: > 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 >> + * >> + * Copyright 2020 Collabora Ltd. >> + */ >> + >> +#include >> + >> +#include >> + >> +/* >> + * 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) >> +{ > Both changes applied for v3, thanks for the feedback. > > thanks. >