Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp4797646rwb; Mon, 31 Jul 2023 12:21:45 -0700 (PDT) X-Google-Smtp-Source: APBJJlHN3tX6TMKN24kcy/JS1EzRPhlBG417UhEimGP1FtLhJ5ucQCQplykseb78Nnx3O5vR2hHd X-Received: by 2002:a17:90a:c7d8:b0:261:2824:6b8c with SMTP id gf24-20020a17090ac7d800b0026128246b8cmr12876774pjb.13.1690831304843; Mon, 31 Jul 2023 12:21:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690831304; cv=none; d=google.com; s=arc-20160816; b=lknz29CrscGmRlPYWdsRSGHbCidt4MdSW7a8/MN1LjIZS5j/cS1u3sj2C4JRw2E7ZR 3N3P9jJrM/YclET5c7rRSBnQnMHZFQ/n8ZvGuw6m1ypkO+SP1D7FrCG3eX0zVGgiJ05K jLCinGQ/Bp6TzaBJgjqJxBuSl3WPgy/khfEFCa1X0GS/y24KtyeH4dpRpIyorcRjucF6 AxPdC0jacl7cCVXSZYMLzalSsQDokvyZRvwHKaH/9dZKK2RC1IC4cDBrOU6Tbv1etzME Vz07RkKk3ICUrR60vyhQri5BkGQaibn0InGgQcdzbrPLCpFZh9/o+sI9pUBxEsuGhpsj E64A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=FWxe5J1hE38eMUz7xvskScrwN5CGj61RpGiQj1KfL8k=; fh=2YoCZkvP955s1pH4h6JVKq608i+nkJ2P4+BtlQus3UA=; b=BXx88SpPF0IXMIod5dRPFrcOfrUmQl1AWkIgZRee/9zmFvOX2vOt0pbv17+dsx2hqZ t/hKj+nZY4SMmORkBgR3QwEbay52qoX2vUwN/yFnolwT7Iqi/JynAgJ4Uo53ZRx6sKs0 1yodfFGV/F4OtKJnaEc2IIAnZ4/w32o646N420AutEYbchwtrublVlQlsCwYozk2DG8R 9vmR1U3ZLaFrBk6lNOT1B/ayjxdKH72DGmdjl98FRItOrqeMc772ai78Vw65hHrvipus oLHTrjVjefMIpsTtdeOtb1H+J2lNSz/MORzG9qUWPHpEZpoqWd9wU0SxNggLD8V5ICWO FhsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="N/PvmfIJ"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cx10-20020a17090afd8a00b0025690b76c95si7693444pjb.10.2023.07.31.12.21.33; Mon, 31 Jul 2023 12:21:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="N/PvmfIJ"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232546AbjGaRjK (ORCPT + 99 others); Mon, 31 Jul 2023 13:39:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230483AbjGaRjJ (ORCPT ); Mon, 31 Jul 2023 13:39:09 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C7D0C7; Mon, 31 Jul 2023 10:39:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=FWxe5J1hE38eMUz7xvskScrwN5CGj61RpGiQj1KfL8k=; b=N/PvmfIJka0LmTfamlvuygudrb JsbinBTLLKNiq37bm5mPPAVv09JhACMF/0Xkb7VJbrwYVu2oOHZydYjUI0rzG51C7GloDM58pGP/B O8NPzkWqqzqXbvkiENP+6mMw9GWCP9lDcxrYAFFg/59l8TWowq+Yg3BkjPBLmqd4TpOJkMUKx7vOq 5MwhUEpkM23PYPrSMEL6LXc1d9KYsimAjG90HseJwi5J+UGUNqABkgUocYhXWXtTfZ9X8UkfhJubJ RjyPZo/De79puk4DXLKnGKryAlMAHfcK30fNBlCKVn/aIYrErIJTcA0NngTqsHMNyNtFvVaiHWrkQ ZzwQOeXQ==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1qQWrA-002vaJ-91; Mon, 31 Jul 2023 17:38:56 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 51E00300134; Mon, 31 Jul 2023 19:38:56 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 366B5203C0B01; Mon, 31 Jul 2023 19:38:56 +0200 (CEST) Date: Mon, 31 Jul 2023 19:38:56 +0200 From: Peter Zijlstra To: Thomas Gleixner Cc: axboe@kernel.dk, linux-kernel@vger.kernel.org, mingo@redhat.com, dvhart@infradead.org, dave@stgolabs.net, andrealmeid@igalia.com, Andrew Morton , urezki@gmail.com, hch@infradead.org, lstoakes@gmail.com, Arnd Bergmann , linux-api@vger.kernel.org, linux-mm@kvack.org, linux-arch@vger.kernel.org, malteskarupke@web.de Subject: Re: [PATCH v1 09/14] futex: Add sys_futex_requeue() Message-ID: <20230731173856.GQ29590@hirez.programming.kicks-ass.net> References: <20230721102237.268073801@infradead.org> <20230721105744.298661259@infradead.org> <87sf94m222.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87sf94m222.ffs@tglx> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 31, 2023 at 07:19:17PM +0200, Thomas Gleixner wrote: > On Fri, Jul 21 2023 at 12:22, Peter Zijlstra wrote: > > +/* > > + * sys_futex_requeue - Requeue a waiter from one futex to another > > + * @waiters: array describing the source and destination futex > > + * @flags: unused > > + * @nr_wake: number of futexes to wake > > + * @nr_requeue: number of futexes to requeue > > + * > > + * Identical to the traditional FUTEX_CMP_REQUEUE op, except it is part of the > > + * futex2 family of calls. > > + */ > > + > > +SYSCALL_DEFINE4(futex_requeue, > > + struct futex_waitv __user *, waiters, > > + unsigned int, flags, > > + int, nr_wake, > > + int, nr_requeue) > > +{ > > + struct futex_vector futexes[2]; > > + u32 cmpval; > > So this is explictely u32. I'm completely confused vs. the 64 bit futex > size variant enablement earlier in the series by now. As per the previous email; these patches only enable the syscall part of 64bit futexes, they do not convert the core, and per futex_flags_valid() (patches 4 and 13), explicitly disallow having FUTEX2_64 set. - /* Only 32bit futexes are implemented -- for now */ - if ((flags & FLAGS_SIZE_MASK) != FLAGS_SIZE_32) + /* 64bit futexes aren't implemented -- yet */ + if ((flags & FLAGS_SIZE_MASK) == FLAGS_SIZE_64) return false;