Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7386157imu; Thu, 27 Dec 2018 19:29:12 -0800 (PST) X-Google-Smtp-Source: ALg8bN53A7Ptkh9hga5MDWdchiGeW7pDAFwQ/MVMYvWYJP7OVGtgkcRsKOiRuXB0uHEBV+bZg9oV X-Received: by 2002:a65:6215:: with SMTP id d21mr24988646pgv.289.1545967752286; Thu, 27 Dec 2018 19:29:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545967752; cv=none; d=google.com; s=arc-20160816; b=y253YtG2QLF2vo9RAUgveW6Am+/zubvZifqSIQ/cznxnlE/16y+llx1ciiPAhJRUtx uWE/ogr6WwnWten9/qKWcKqkfqdRHPFlcn5taaH4APjosOtAUqBQcTyAIoRvj+xESt8E gE6xuyjwKL75waGE9iJEJFjP4qcY6H9PKB2cS8+Ue63xHpZUbcPDos001Q/iyODwbD/T YxCtcVm8EwlKhW1dLpN9U9OqbKfXXs5eSWLiNTpBqNo46Bzz9O1sK6RGXIjjWHs31dkn ZQ4J9ViUDPuDXJGJuuaZJnZscfa7wOUrwG7a1c/BIHqX5+boyhX/Cr2neWZA4aDI8iVT FT0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:in-reply-to:date :references:subject:cc:to:from; bh=9u3InE57Hyn7fT9UMPEI8sqfRd/UIIQES6+a5TTuryA=; b=MYsKpijK8WhEmRnF/jxxfLLkqRjhukyZtLstGNBXhtuV8Zx4LpcyPAal/mVHmYmIR1 d+mEzd5ecQ0txL68BwFTlTbFnEw80G9fUA9ovbgnigkQwxzgf4h0CTWm7e9Fd4BSbfYW eojtwt+rpXtqh1SVD8sIKdtlShweimcjPU4WZcyewwyxKuKLEXiBFwtrcCV+fb6n9t/W WshZPAaalSHwzTQLrrBkTUXq3A98JSa8Ctlrc1UN4M8uIpmh/CYsVHXbgtf3fLYqDeoG J3aZ6W7m/H71PFVgZRRJkYRN8CLmklncZDdCsknYepEyeqVqM7UTlZpLAuw8MtVl1lvV tNwg== 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 c76si14939934pga.70.2018.12.27.19.28.57; Thu, 27 Dec 2018 19:29:12 -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 S1726462AbeL0SJP (ORCPT + 99 others); Thu, 27 Dec 2018 13:09:15 -0500 Received: from albireo.enyo.de ([5.158.152.32]:48678 "EHLO albireo.enyo.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726138AbeL0SJO (ORCPT ); Thu, 27 Dec 2018 13:09:14 -0500 Received: from [172.17.203.2] (helo=deneb.enyo.de) by albireo.enyo.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) id 1gca5n-0005Pp-6z; Thu, 27 Dec 2018 18:09:11 +0000 Received: from fw by deneb.enyo.de with local (Exim 4.89) (envelope-from ) id 1gca5n-00020w-3v; Thu, 27 Dec 2018 19:09:11 +0100 From: Florian Weimer To: Adhemerval Zanella Cc: linux-fsdevel@vger.kernel.org, linux-api@vger.kernel.org, linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org, v9fs-developer@lists.sourceforge.net, libc-alpha@sourceware.org, qemu-devel@nongnu.org, ericvh@gmail.com, rminnich@sandia.gov, lucho@ionkov.net, hpa@zytor.com, arnd@arndb.de Subject: Re: d_off field in struct dirent and 32-on-64 emulation References: <87bm56vqg4.fsf@mid.deneb.enyo.de> <957967d7-5717-8ada-fb30-dfdf19898b6b@linaro.org> Date: Thu, 27 Dec 2018 19:09:11 +0100 In-Reply-To: <957967d7-5717-8ada-fb30-dfdf19898b6b@linaro.org> (Adhemerval Zanella's message of "Thu, 27 Dec 2018 15:58:47 -0200") Message-ID: <87pntmu9iw.fsf@mid.deneb.enyo.de> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Adhemerval Zanella: > Also for glibc standpoint, although reverting it back to use getdents > syscall for non-LFS mode might fix this issue for architectures that > provides non-LFS getdents syscall it won't be a fix for architectures > that still provides off_t different than off64_t *and* only provides > getdents64 syscall. > > 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: >> There is another annoying aspect: The standards expose d_off through >> the telldir function, and that returns long int on all architectures >> (not off_t, so unchanged by _FILE_OFFSET_BITS). That's mostly a >> userspace issue and thus needing different steps to resolve (possibly >> standards action).