Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp10988168imu; Mon, 31 Dec 2018 10:30:22 -0800 (PST) X-Google-Smtp-Source: ALg8bN51Ku+viDf/p55Qqs2ouJ1yTUZzBY30RHypY3ZHrECU4jSmOyqqFwRZ7n+kgYRfncf5T2dY X-Received: by 2002:a17:902:2:: with SMTP id 2mr11255003pla.228.1546281022833; Mon, 31 Dec 2018 10:30:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546281022; cv=none; d=google.com; s=arc-20160816; b=t/xpz/82IUgQMwS0hS9rc6mGPhlLSqful6zKOVYNGicZWeVH1Q0QCIPDjXnN503PHt DR1OmTAmIx+IfEAqnKFGvITE/xEi4KFvJ/QwPYeQq++orlHgc0SSvKNj7sy6xxVsQlAf SteWuevqqoFqnwuJOAvXpyWclj89HgdRHCoLkhYQkZkhFIb52gI1BK7htZrZRdDednTD L2UOLRa8dQlsLHpeUqcbi61osxXTz8tW1AsML1IJZjGCdtIwZX9UxfPN4Ykp8GGqZ0bP AvvSRn1taHGAfWfN27mKLcgzbEeLdYkcKvJTNzkYjLm6/Ok+jX/2ZkZHxtUvFmo8EW7q nFSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=4IL57bxCLovEnpTaHTXtjGOb+2oJlOrT8ZqxGhs53ng=; b=XAMzYFIgFiqcbNBTvszmHBy3LPRdQwU4D5St2ux3WrM7mva5dS/K0wRT1fmMla//yZ TJ20WaTQstCZwci60Kpl2XTUzkMIAEjiwisPvUaW/TfMw8gMkD5br2JiWIXTFycbxirv gk8xGHCMDk0QACW/6CxcHaXBkLJ9po3K7xgWBdNfYWxamNLj+BDSpBYIp1bZO2btET4D s/iDRVsOa/hoKGCQvjf1iNt60b/MO7xnOaBNch/oa7tYy30VpSAgrNckkl8JyWBxvmaB zNF7vq64fP9D9uvz1OrlLXE2wsn1H5uNTXCon+lSqQVU/G/Kc+SFmbWx62o++14LwTGO iU1w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b19si11170799pfm.100.2018.12.31.10.29.44; Mon, 31 Dec 2018 10:30:22 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727576AbeLaRDy (ORCPT + 99 others); Mon, 31 Dec 2018 12:03:54 -0500 Received: from relay1.mentorg.com ([192.94.38.131]:51574 "EHLO relay1.mentorg.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727557AbeLaRDx (ORCPT ); Mon, 31 Dec 2018 12:03:53 -0500 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=svr-ies-mbx-01.mgc.mentorg.com) by relay1.mentorg.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256) id 1ge0ye-0003Pl-NQ from joseph_myers@mentor.com ; Mon, 31 Dec 2018 09:03:44 -0800 Received: from digraph.polyomino.org.uk (137.202.0.90) by svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Mon, 31 Dec 2018 17:03:41 +0000 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.90_1) (envelope-from ) id 1ge0ya-0007xD-Ke; Mon, 31 Dec 2018 17:03:40 +0000 Date: Mon, 31 Dec 2018 17:03:40 +0000 From: Joseph Myers X-X-Sender: jsm28@digraph.polyomino.org.uk To: Adhemerval Zanella CC: Florian Weimer , , , , , , , , , , , , Subject: Re: d_off field in struct dirent and 32-on-64 emulation In-Reply-To: Message-ID: References: <87bm56vqg4.fsf@mid.deneb.enyo.de> <957967d7-5717-8ada-fb30-dfdf19898b6b@linaro.org> <87pntmu9iw.fsf@mid.deneb.enyo.de> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-02.mgc.mentorg.com (139.181.222.2) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 28 Dec 2018, Adhemerval Zanella wrote: > >> Currently we only have nios2 and csky (unfortunately). But since generic > >> definition for off_t and off64_t still assumes non-LFS support, all new > >> 32-bits ports potentially might carry the issue. > > > > For csky, we could still change the type of the non-standard d_off > > field to long long int. This way, only telldir would have to fail > > when truncation is necessary, as mentioned below: > > I think it makes no sense to continue making non-LFS as default for > newer 32 bits ports, the support will be emulated with LFS syscalls. Any new 32-bit port that uses 64-bit time_t will also use 64-bit offsets (because we don't have any glibc configurations that support the combination of 64-bit time with 32-bit offsets, and don't want to add them). That should apply for RISC-V 32-bit at least. I've filed for missing overflow checks in telldir when the default off_t is wider than long int (currently just applies to x32; not sure why we don't see glibc test failures on x32 resulting from the quiet truncation, as the issue is certainly there in the source code). -- Joseph S. Myers joseph@codesourcery.com