Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp4427283rwd; Sun, 4 Jun 2023 05:17:45 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ49ic7ybwsExjEnPobC01vTe/Ap9zC/CCQKQY35tz1vvcpTYIlW9ye7lGYaXn8aZ6gEM9vn X-Received: by 2002:a05:6a20:734f:b0:10a:f8d3:2cf3 with SMTP id v15-20020a056a20734f00b0010af8d32cf3mr1248148pzc.7.1685881065186; Sun, 04 Jun 2023 05:17:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685881065; cv=none; d=google.com; s=arc-20160816; b=zEg2zOBcn2DTB+BIIvMPP3UoOc3c8/RWnAeGuEiUNg/lq3UvNbQkGAQCXTJPmwtyIr I0R59ecTeczfHRWyO4X9ENov8MdRZAvUO95fz104mM4dshzsyuCUfizcfz2no+iECtdO PAW8iWS0vfkKVf/9yXJdTcd+H8spmqDBTCCW2iiYvgwrOn4+4WV5xTtEl7cbgASyoBeK 76mDrBMe8YkOkSY/wBADZICodWTr3Knsn/1mVbvfc784zBwQPRyR9BZ/zS3sHkGW0yz5 k520VPwrj2F1UVpowpz+Zj+8HxlefnrHUvQY9ID5DfnU2AsfUolDctntzMnHtXyZwkpq pvyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:date:references:in-reply-to :message-id:mime-version:user-agent:feedback-id:dkim-signature :dkim-signature; bh=DEQ24KaCgZ4/pEUSv8IkC2IlBgiOfkfs8fsUXXMnOhs=; b=kgLs98I4koeuzxVeBS7yzfc4Y4iopQ+hWwBRLkA+AlntvVd+94JxLLp5u5TFid40SE tCA4TgcZwxCJRp8QS/XGpCiWbizM85GE50LWDwyxcdeZV+GMqKa2mGMEK3Ci/H/Gvt4e cruJSt9ypAUhOdpk+/bpz9/lMg1w9qbn51ETU34sNnNsFpD9DNoC+KOmKV/Gu4fnRAPy truRp7PWYMRHwEpco2RMhWoCee94cW3R7ZAikSe1Li0/5qN+nWTMYWEudFFrPDk77kwa a2JvJTiJIGMt5DYxxBUDjUgHsnab0kgXlzinj6Mq8eeWHRBr7k2UKLqx4TUT9huryvAj pFJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm1 header.b=O13GmFiv; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=zn8g6WPW; 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 e125-20020a636983000000b005347b00fd75si4091133pgc.175.2023.06.04.05.17.31; Sun, 04 Jun 2023 05:17:45 -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=@arndb.de header.s=fm1 header.b=O13GmFiv; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=zn8g6WPW; 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 S231349AbjFDLjH (ORCPT + 99 others); Sun, 4 Jun 2023 07:39:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36762 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229670AbjFDLjF (ORCPT ); Sun, 4 Jun 2023 07:39:05 -0400 Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 24667CD; Sun, 4 Jun 2023 04:39:04 -0700 (PDT) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id E72555C00F5; Sun, 4 Jun 2023 07:39:00 -0400 (EDT) Received: from imap51 ([10.202.2.101]) by compute6.internal (MEProxy); Sun, 04 Jun 2023 07:39:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm1; t=1685878740; x=1685965140; bh=DE Q24KaCgZ4/pEUSv8IkC2IlBgiOfkfs8fsUXXMnOhs=; b=O13GmFivotkhY/CCsM kQ1Jrf5MmMFSE8POyLnqrnysH1lWvf5kcc9FOhAOJCd2w7+i2fLDtgnKnvQ2h3K6 +vw/Oce3ODUC4VXzS3fp3vNO6xdxTU/YLZ16LH2Yp2XoMbnddwzUIBt+mlayzaF8 MDpUM03/GvC4U2x2/baCB09tmp6jwcMpJTjn4WjF+450F6mvzn0LzNMSfMTB5p0/ tOY9X6H5mvCX9xgnbcCDP6NkkR+smQgIe7TIWX9w8BYCr4NqrO+BVTUZGymhbtAq /Gqh+iF2fCI5jKckvc5Xu5zAx6DcvVq03iGPOzrvvgZ6T9DYKBY0Z50NwtTmi5cA F7uA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; t=1685878740; x=1685965140; bh=DEQ24KaCgZ4/p EUSv8IkC2IlBgiOfkfs8fsUXXMnOhs=; b=zn8g6WPW+s68N+nwbcsnTobAjgL6q bVJ1ymrzhsmcx9OPlVor6CPkp/OYvlCIRlFA964UNAD7U7EX942TVX8RCnhcKsXi KkN97cz9B5cQMTSYVluX0gAaF2jbSOf/aB+piI6KOU7K7IQ2sw1jkpIr4UtSV7Pn jeyP87Z5VBMYTNC+pPPhkaOho4j5/la0avjLK3GOw95VVtqRS/MPjIKIOYXxDRuN 4J4RiqGLe3x/tbasqp4tfg0FUhkR92h/F0L2hbqI/0lrBrddS3FXnlerDlCk4D8e 9j8oeWADcMXK578Jy3al5WlB6sRN3GHwyE7n7z2wXX5HzqhREKJsuFdjQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeeljedggeefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtsehttdertderredtnecuhfhrohhmpedftehr nhguuceuvghrghhmrghnnhdfuceorghrnhgusegrrhhnuggsrdguvgeqnecuggftrfgrth htvghrnhepvefhffeltdegheeffffhtdegvdehjedtgfekueevgfduffettedtkeekueef hedunecuffhomhgrihhnpehkvghrnhgvlhdrohhrghenucevlhhushhtvghrufhiiigvpe dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrrhhnugesrghrnhgusgdruggv X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 55000B60086; Sun, 4 Jun 2023 07:39:00 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-447-ge2460e13b3-fm-20230525.001-ge2460e13 Mime-Version: 1.0 Message-Id: <54edae1f-0c1c-4beb-b6ac-fcd61fc81de8@app.fastmail.com> In-Reply-To: References: <68dace9e2532316ff454894697ecfd99e419a523.1685777982.git.falcon@tinylab.org> <2fccaff5-2354-4ac0-8389-1004d47d8dc9@t-8ch.de> <51e1db37-3981-4ea5-9348-b6f6b31ecc8a@app.fastmail.com> Date: Sun, 04 Jun 2023 13:38:39 +0200 From: "Arnd Bergmann" To: "Willy Tarreau" Cc: "Zhangjin Wu" , =?UTF-8?Q?Thomas_Wei=C3=9Fschuh?= , linux-kernel , linux-kselftest , linux-riscv Subject: Re: [PATCH v3 11/12] selftests/nolibc: add new gettimeofday test cases Content-Type: text/plain X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_PASS,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 Sun, Jun 4, 2023, at 13:27, Willy Tarreau wrote: > On Sun, Jun 04, 2023 at 11:24:39AM +0200, Arnd Bergmann wrote: >> >> For user supplied non-normalized timeval values, it's not obvious >> whether we need the full 64-bit division > > We don't have to care about these here for the microsecond part, > because for decades these were exclusively 32-bit. Also the only > one consuming this field would have been settimeofday() and it's > already documented as returning EINVAL if tv_usec is not within > the expected 0..999999 range. Right > Over time we managed > to make simple code compile with both glibc and nolibc, but when it > comes at the cost of adding size and burden for the developers, such > as forcing them to add libgcc, I prefer that we slightly limit the > domain of application instead. Good point. This also reminds me that the compilers I build for https://mirrors.edge.kernel.org/pub/tools/crosstool/ don't always have every version of libgcc that may be needed, for instance the mips compilers only provide a big-endian libgcc and the arm compilers only provide a little-endian one, even though the compilers can build code both ways with the right flags. Arnd