From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-oa1-x34.google.com with SMTP id 586e51a60fabf-13c569e5ff5so16413634fac.6 for ; Tue, 08 Nov 2022 06:27:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=HvtH1unsYcBtQCtxuVfRo4x22AdNxCIXYWZV0KnwRuE=; b=XAg2XVpWTasEK8+Beycg8MQ+A1GeU7baxNcJX25PYcgEtuRlyuxRM8UUAKAGAcjGUy R8XRv0QypZpeeUro65ItJf1xDdkgw2gomMq8wcXkhIrrW0ZlraOCKCNjnlbEnQzQFlnP DYHzcTwi/aFmrvBSYW71k1LztCQM6aPCVaCwj2z4szFs6bYHW9tp3FQnlo+bveF19Bpx CkaiIssALTCb0eildXndS6d2B4eEWvaltMKEA5Wt2DttpHI1VJ9SxT6EQhts7+c5poFT zAF2+egsSLvD0uJbRfSQj52Vy8CPsn077ZAdK5TvyYlISxk24jZqkci0oGSJNPi6WqoC KE7w== 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> From: Adhemerval Zanella Netto 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-Spam-Status: No, score=-5.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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.