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 978F61F910 for ; Tue, 8 Nov 2022 12:04:54 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="H6NF/lyc"; dkim-atps=neutral Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9915A3858426 for ; Tue, 8 Nov 2022 12:04:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9915A3858426 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1667909089; bh=zT1AnBdqBcChvmg2Aox4K1182lDGp8YrfCBeB+K8a44=; 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=H6NF/lyc9mKFaPjNJwiNCsTWoBqRUgS9CEmsSH2wQ/IXs97dfY7D2iKsMwEsnVhyF R8VHyLJs546qHWXOg6NnqLafcTPMIwSP1boqmw1VVBkfmHXWvzqcgsALlqhYWQff2f u/u+vaj1PwX0zGtYLNAZ5mpSxLdyW8Vt43oIijNs= Received: from mail-oi1-x22e.google.com (mail-oi1-x22e.google.com [IPv6:2607:f8b0:4864:20::22e]) by sourceware.org (Postfix) with ESMTPS id 942983858D26 for ; Tue, 8 Nov 2022 12:04:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 942983858D26 Received: by mail-oi1-x22e.google.com with SMTP id r76so15228567oie.13 for ; Tue, 08 Nov 2022 04:04:28 -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=zT1AnBdqBcChvmg2Aox4K1182lDGp8YrfCBeB+K8a44=; b=JyTVTz10tcS1dpQtsXz46jKy/9Q24rc7GbhPldDMmu1pdbfSDRVd1YMFu9m9Yz1ZjR y1jzw2EhH0/pZmjRK99buMmjyt5muI5uO/imvSyLEZHoNl4qXwrhlkYcrww2AxeSNWWu 8Nhk0aZkGuK101S/71RlVldlx+BgPoVoAzxOcxaOko7P2o3LXFsDd5fICPyppzcTawqa 9lMFlKcbz+pKctyiyBMcjV4TdXo2ykNoPKZYoMI1Yx5Rncg4iQwXt0aJ9QTg+M5m6j0K emD4KojVoGvpPp06k8/2PfZL6BxLtASj8JizzoLKGmftyKFpNmhWoBT7FVAD8/IETaLJ jkfg== X-Gm-Message-State: ACrzQf3kXGsOKBnO5NTvCNjUgmU93c/4H5q3TFKQmgxNhMWYb8tIi+64 vr/8AyW5aYKzJInDUxR2v4n4osd3tyJxqt7r X-Google-Smtp-Source: AMsMyM7DLq7iihJe6+DmVQDDZiytNjduM1hMWvwbAcI+OtU9gSmfgP2+g3sIfWn82SddI9MVuPWBww== X-Received: by 2002:a05:6808:2224:b0:35a:416a:97bd with SMTP id bd36-20020a056808222400b0035a416a97bdmr17918290oib.277.1667909067762; Tue, 08 Nov 2022 04:04:27 -0800 (PST) Received: from ?IPV6:2804:1b3:a7c0:a9f4:fc60:ae8f:c4b6:cf0a? ([2804:1b3:a7c0:a9f4:fc60:ae8f:c4b6:cf0a]) by smtp.gmail.com with ESMTPSA id x26-20020a056870a79a00b0012752d3212fsm4445931oao.53.2022.11.08.04.04.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 08 Nov 2022 04:04:27 -0800 (PST) Message-ID: <9ccb6d5c-e054-29cd-06ce-04ef5ee312b8@linaro.org> Date: Tue, 8 Nov 2022 09:04:24 -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] Rename STAT_HAS_TIME32 to KERNEL_STAT64_HAS_TIME32 Content-Language: en-US To: Arnd Bergmann , YunQiang Su , Xi Ruoyao Cc: syq@debian.org, aurelien@aurel32.net, Jiaxun Yang , "Maciej W. Rozycki" References: <20221104015428.1545677-1-yunqiang.su@cipunited.com> <50e745fa-0508-43f1-bd0a-cfa789239f7e@app.fastmail.com> <6100f772-fab4-4e92-a6a9-cf882954df9d@app.fastmail.com> <8c9f4e1a-b77b-2257-7558-41b27dbe7344@linaro.org> <5ae33887-9a56-482f-b8b3-c223ad2959ee@app.fastmail.com> Organization: Linaro In-Reply-To: <5ae33887-9a56-482f-b8b3-c223ad2959ee@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 08:21, Arnd Bergmann wrote: > On Mon, Nov 7, 2022, at 19:45, Adhemerval Zanella Netto wrote: >> On 07/11/22 15:24, Arnd Bergmann wrote: > >>> What is the glibc behavior for i386 with 64-bit time_t on a >>> kernel without statx? Does that also intepret a time value >>> of -1u as a 2106 timestamp, or does it convert that into a >>> 1969 timestamp like the other (not mips/pa-risc) 64-bit >>> architectures do? >> >> The time_t for glibc is always signed and for legacy 32-bit ABIs >> it issues fstatat64 and assumes that kernel will handle potential >> overflow by returning a proper error (if syscall succeeds then the >> file times are within the signed 32 bit time_t range). >> >> My understanding is mips is the only outlier here with unsigned >> kernel stat times, which on glibc is handled with a special function >> that just that interprets the values as 2106 timestamp >> (__cp_kstat_stat64_t64). > > Ok, got it. In this case I guess we should probably follow the > same behavior in the kernel when we add the truncation and > use the 1902..2038 range for all 32-bit targets but use the > 1970..2106 range for mips64. Not sure what to do about > mips32 compat mode though. At the moment, the o32/n32 stat64 > is shared with the n64 stat ("newstat") variant, but if n64 > actually wants a different behavior, we may need to add custom > handlers for that. > > Arnd The mips64n32 uses the same code path as mips64, but mips32 assumes the same ABI for old legacy 32 bit architectures (fstatat64 syscall with signed time_t). So for compat mode mips32 is also handled as unsigned? Is it only for compat mode, and not for 32-bit kernel?