Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4861984rdh; Wed, 29 Nov 2023 12:55:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IEtKyj/XlxJWxt4iUO/FQoagKa5gkJuWydqID6DSBTWHlqP4fgqJzmCif1CYO8fK0y8IXZn X-Received: by 2002:a05:6830:1db6:b0:6d6:4558:bd56 with SMTP id z22-20020a0568301db600b006d64558bd56mr21501820oti.5.1701291310759; Wed, 29 Nov 2023 12:55:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701291310; cv=none; d=google.com; s=arc-20160816; b=eKl1+dBUx7AzmgegVZb/Pu+jaljUmORvNjNTjhTfedFfjDdSx1Ax/uzTVyaqdyFNxK 9AToh3WolbSRsu4+clNjhQi7gEKnPJUblAB5A+POLWWdW0JRZgvEit0PRLZhxAfBQt0d rVe5RazyZ07gDhyNopDZHj171JQPZiOtKyl6csqI/WCDNRkSPuzrJiKQ0+klRWemROeN 1VPstG/Yobk+yRFkvSouFj78IiD577fBSS0bnCZl/qFc1mYQAeqs4AGblcJOAUM0hg/A Lqq/ZOEJKlR7sSy25ZExXo4OD+cLPUuPFE/uAn6+ehq1AywEIIc/vXx0/XY2O41p9erC 69Qw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=XHijwGm6NVFiHKrEw0H9Z4fyN3jsvPOuZ7CFlGvf8i8=; fh=H9QLabgsX+6vCTzeAJj0QJWAv1EKlu/tFbRHdBovLTM=; b=Ocup7Yr9/xrIEt74+U/45CbzwRnDDtrL1IfGmMZaM749HCojkMAJLYpUz2s8wrEB1S QLUYHdkapqEHiCsxPvStJnfRs5Ka/ad+s44Bq0upfV/8pnH/I3BWX5EVnGtiaqjJk1YL C+sNCWL0JByz2n3fgt4NjXOv0pHp068ORgIAfTrkFJa+2YziNgaViIh0O2zLjSkJ+ZoC nZT6ejM3BvPPmPa2gmp4Q5xfuPJYkygGL/pOmH0a1N4uRQyH/P01IdkF8t0+OajyC08f fAX0isNO0il++YPdw/kOiDvPxf8EQwEDuQIsseVstUVevMKSB9qxaQDZf44CU7jx0wwY pK+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=xDGDOBm4; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id be14-20020a656e4e000000b005bdd6caa886si16348881pgb.76.2023.11.29.12.55.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 12:55:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=xDGDOBm4; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 6C5828062410; Wed, 29 Nov 2023 12:55:08 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229556AbjK2Uyx (ORCPT + 99 others); Wed, 29 Nov 2023 15:54:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34726 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233852AbjK2Uyw (ORCPT ); Wed, 29 Nov 2023 15:54:52 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B18A710C3 for ; Wed, 29 Nov 2023 12:54:58 -0800 (PST) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1701291297; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=XHijwGm6NVFiHKrEw0H9Z4fyN3jsvPOuZ7CFlGvf8i8=; b=xDGDOBm4q1VzEIWuH0G1gREsW+/mo1XdBjswfVmZ9/uZew5ojKcOWLrr+hbArnFENKOPRQ sw/LNwiu17n7oLX4jZFMQ7EfNKATT3DcVNDQIF9FZy/GYrJswdbeUBXkTeEdQaiFX7kW3v AuXd+Igxb8FJUS+YDQAR5iGq2TGGTAnnXiX5s8RQ29fEzKkqmat0zhm7SORUjQ4PJC96c7 d6kDaCLvmF/zDW8QNDYoQSZVStfZxMT6lCToO9Ff+yeFxg2DvmJy3wrV989BtWyn/vSidv Vx7udQqCIGu465UUUYbNeQrMHowMwwDnp4Y7dBOsRmuj8ZLZ8sDCp2U2LDVj7Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1701291297; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=XHijwGm6NVFiHKrEw0H9Z4fyN3jsvPOuZ7CFlGvf8i8=; b=hQDR6KboiiQcVWyu6xYHgCT3S8ww7nDG2ypitiHslclkOu52BZG3El0yDVNl36Bl51tXjK A5fV38sPpgf6asBw== To: Wei Gao , mingo@redhat.com, peterz@infradead.org, dvhart@infradead.org, dave@stgolabs.net, andrealmeid@igalia.com, linux-kernel@vger.kernel.org Cc: wei gao Subject: Re: [PATCH v1] futex: Add compat_sys_futex_waitv for 32bit compatibility In-Reply-To: <20231123053140.16062-1-wegao@suse.com> References: <20231123053140.16062-1-wegao@suse.com> Date: Wed, 29 Nov 2023 21:54:56 +0100 Message-ID: <87a5qwz3dr.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Wed, 29 Nov 2023 12:55:08 -0800 (PST) On Thu, Nov 23 2023 at 00:31, Wei Gao wrote: > The new function copy main logic of current sys_futex_waitv, just update parameter > type from "struct __kernel_timespec __user *" to "struct old_timespec32 __user *," > and use get_old_timespec32 within the new function to get timeout > value. That's not how it works. struct __kernel_timespec is the same on 64bit and 32bit syscalls. User space has to use the proper type when invoking a syscall and and not just decide that it can use something arbitrary. All new syscalls which deal with time use the Y2038 aware data types and do not have compat fallbacks because there is no requirement to have them. If user space want's to use struct timespec on 32bit nevertheless in the programm for a new syscall, which is obviously stupid in the context of Y2038, then it's a user space problem to convert back and forth between the two data types. Fix LTP to be Y2038 safe instead. Thanks, tglx