From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS3215 2.6.0.0/16 X-Spam-Status: No, score=-4.1 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 493311F910 for ; Tue, 8 Nov 2022 14:27:45 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="ZRx8nyjq"; dkim-atps=neutral Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 02391385842F for ; Tue, 8 Nov 2022 14:27:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 02391385842F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1667917659; bh=HvtH1unsYcBtQCtxuVfRo4x22AdNxCIXYWZV0KnwRuE=; h=Date:Subject:To:Cc:References:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=ZRx8nyjqY/UGQACqwD0rqT55ijqCTwzS38CAaWPRKWWYUR4ulCxga+ReDxcDNtVBK o61UABImMAmOzDcPKOyok4YBrBu7vhKiZbNYuSGp4lPiaEelS5HjKVOkad9EhcBYZH Oq/cBbXVmKUZzriLa0NwbjbOdUpzqvJ2tgR9FEw8= Received: from mail-oa1-x34.google.com (mail-oa1-x34.google.com [IPv6:2001:4860:4864:20::34]) by sourceware.org (Postfix) with ESMTPS id 1046D3858C00 for ; Tue, 8 Nov 2022 14:27:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 1046D3858C00 Received: by mail-oa1-x34.google.com with SMTP id 586e51a60fabf-13c569e5ff5so16413634fac.6 for ; Tue, 08 Nov 2022 06:27:16 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=HvtH1unsYcBtQCtxuVfRo4x22AdNxCIXYWZV0KnwRuE=; b=vJWfP+lrNWOlHbsKX5LPBJd68N5pLXOGO9p9us1OIrPfJKadqz1S0/Nhi51p5/GUUm 0So1lUtStbeL9CwYMjcJLqpafSkVElPS1pbcLq3uOD1967+/ZJlEmyreyUrnT3RLrYzQ 6I0WrQr7UcOngjl/UuiOx0iDmKOXQRs87KJuh566yzlBo+DHmvw14UjUB6/DgVMOCOgL 4mp4oRPChJapclpxCNvGtIPicGPJrc5P41K1NGZR9tKKLZX06Oc3UctDNSfyXrea7gN8 +RlpX3AuSRVAwU9nUqzCtv41AyG5JF09s3WV4yWaXcPTRSexcbgkjL/SbIe9M4wiR+i0 CDTg== X-Gm-Message-State: ACrzQf24mH6GLNyu3EtC4qNXEzRbHUhUCRkovDQ45X/3C36hoYhqEfdP XKNN34wka6v63DpB8roPOMHk6Z7vTMrYKeH2 X-Google-Smtp-Source: AMsMyM4hXeM6/zK52adlqxUtm6UvYtwyetz8QO8xGjOxej4RhT3itE21NBjTQdPH7rpaC1rgETmMIQ== X-Received: by 2002:a05:6870:b605:b0:13b:9c14:57d8 with SMTP id cm5-20020a056870b60500b0013b9c1457d8mr34095097oab.101.1667917635205; Tue, 08 Nov 2022 06:27:15 -0800 (PST) Received: from ?IPV6:2804:1b3:a7c0:a9f4:7d29:e035:dbf1:661f? ([2804:1b3:a7c0:a9f4:7d29:e035:dbf1:661f]) by smtp.gmail.com with ESMTPSA id d9-20020a056870960900b0011d02a3fa63sm4655143oaq.14.2022.11.08.06.27.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 08 Nov 2022 06:27:14 -0800 (PST) Message-ID: <3df612e6-d0d5-e2e3-aacf-53f73557c71d@linaro.org> Date: Tue, 8 Nov 2022 11:27:11 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.4.1 Subject: Re: [PATCH v3] Define in_int32_t_range to check if the 64 bit time_t syscall should be used Content-Language: en-US To: Arnd Bergmann , Florian Weimer Cc: YunQiang Su , Xi Ruoyao , aurelien@aurel32.net, Jiaxun Yang , "Maciej W. Rozycki" , YunQiang Su References: <20221104013913.1543593-1-yunqiang.su@cipunited.com> <20221108044945.2173509-1-yunqiang.su@cipunited.com> <652b5ea3-2305-4a1e-b1b5-de81864a844c@app.fastmail.com> <87cz9xk84v.fsf@oldenburg.str.redhat.com> <80f469a6-f432-419d-9cdc-91f2366639d3@app.fastmail.com> <87sfitisjq.fsf@oldenburg.str.redhat.com> <177e1cb4-7952-484c-8838-f3c41c6c1441@app.fastmail.com> <0e823c53-a93f-8ecf-6e83-84b1b78057c8@linaro.org> <1c812047-6cf0-107d-faa3-70532d5ca0de@linaro.org> <5c46fff4-ed17-4043-946f-efed9a07755c@app.fastmail.com> Organization: Linaro In-Reply-To: <5c46fff4-ed17-4043-946f-efed9a07755c@app.fastmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Adhemerval Zanella Netto via Libc-alpha Reply-To: Adhemerval Zanella Netto Errors-To: libc-alpha-bounces+e=80x24.org@sourceware.org Sender: "Libc-alpha" On 08/11/22 11:07, Arnd Bergmann wrote: > On Tue, Nov 8, 2022, at 14:49, Adhemerval Zanella Netto wrote: >> On 08/11/22 10:27, Arnd Bergmann wrote: >> >> Yes, the 32 bit fallback assumes that you either use the default minimum >> kernel or configure with --enable-kernel with a value lower than 5.1. >> And the optimization such as ecf2661281c was added on the basis that for >> such configuration the 32 time_t is always present. >> >> For __ASSUME_TIME64_SYSCALLS (default fro 64 bit time_t ABI and for 32 >> bit time_t with --enable-kernel=5.1) the 32 bit syscall should not be >> issued. > > Ok, good. What is the amount of testing that this combination > (--enable-kernel=5.1, CONFIG_COMPAT_32_BIT_TIME=n) has seen? Is > this something that is already part of some regression test setup, > or rather something that is supposed to work but isn't in > widespread use? I would say not much I am aware off, I usually check only against stock kernels from usual distributions (ubuntu, fedora, etc) and our patchwork instance also uses default kernels. > >> There are still the issue for a default configured glibc when running >> on kernels with CONFIG_COMPAT_32BIT_TIME=y, this would require to remove >> the fallback optimizations for !__ASSUME_TIME64_SYSCALLS. > > You mean CONFIG_COMPAT_32BIT_TIME=n with !__ASSUME_TIME64_SYSCALLS, > right? As I said, I'm not too worried about this corner case, as > long as there is some kind of use feedback that tells users to > change either glibc or kernel configuration. > > My impression is that the optimizing for running on old kernels > is not overly helpful, and that changing the fallback logic > would be better, but this does not feel like a correctness > issue when general-purpose distros always enable > CONFIG_COMPAT_32BIT_TIME, and embedded users that want it > disabled always build a matching glibc as well. I added the optimization mainly because to disable the use of 32 bit time_t support requires a configure switch. It is worries me a bit the combination of CONFIG_COMPAT_32BIT_TIME=n with !__ASSUME_TIME64_SYSCALLS as potential source of obscures bugs, but I think that it would be unlikely in future when newer kernels will be more present.