Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp8398510imu; Fri, 28 Dec 2018 17:32:00 -0800 (PST) X-Google-Smtp-Source: AFSGD/WfGRMa6nosvsBQhE/founcvriMnWWAiZ0uQUmzqNfKzo+zCynplwkj0g6mpXHim9sUWVb4 X-Received: by 2002:a62:1112:: with SMTP id z18mr29868355pfi.173.1546047120614; Fri, 28 Dec 2018 17:32:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546047120; cv=none; d=google.com; s=arc-20160816; b=j9uMX6vfEuylHG3MPEnQRwYjCTjMUf+ztbbTqv3XR+L3XdgGWQJB59ZxwaZB9KW5ZD 14v9NBdYiC6Fjzayf42VH2CXBEYgKgNy7/nPTJV8r0jjJe8uExjv90EPA5ePLnKdcSD1 C7SRHii1j3yflbtp49X6ScP0jHjiBct8XJrHZbhkSXj9JE7QpYg62Xm518sFStrQh5dp KVdrCwgwFapuEvpC1+5/xqhDqVH74B7WGhj45txszaHp9jAHdW+zi2FJ4SJ9b5h0fMP3 10ynujiX9xzM6xB8bHU7dltfCykoL9yckW7p9wjqRJRCMJK6Lnbp9CdfD/OQYfK3AsoL yQ8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:subject:autocrypt:openpgp:from:references:cc:to :dkim-signature; bh=peoaWa85URI/nMqNmTZfFpMf5z8VF44cEG0YgxPzMCg=; b=Oy8Eo1f01dKV45lxMPRSGctiRSmaPmz3wyMz+Pwhw0r3+M5l139iCHttkUip4GmcuE OpV1kdPzFAwffNvPkdarx4ZzJay4swjB52s2J4IoUPe81BsQM+kRiLiHV3KK7sKwmpuk Rp669dJUY3B3EhGMdgja7wzHBRBEXX1/q4DIr/KqLz1xzKn5GYAaAukqB9w+2cr25XFF H3/Mj4ndqnd0ckLDHfc+Arctlpx3EmMPNaCfR14ojtFwErEUbYq65bdZV7VnVp36FKn0 i9+06qyhMLzBSph7UADiz4KLnM/C9gTJArr9yu7adqYLi8N3r19e9iEXHILsFyn1WVSm cxIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PMDu8fD8; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u21si35388827pgm.21.2018.12.28.17.31.08; Fri, 28 Dec 2018 17:32:00 -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; dkim=pass header.i=@linaro.org header.s=google header.b=PMDu8fD8; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731521AbeL1MVM (ORCPT + 99 others); Fri, 28 Dec 2018 07:21:12 -0500 Received: from mail-qk1-f196.google.com ([209.85.222.196]:37475 "EHLO mail-qk1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726664AbeL1MVK (ORCPT ); Fri, 28 Dec 2018 07:21:10 -0500 Received: by mail-qk1-f196.google.com with SMTP id g125so12447227qke.4 for ; Fri, 28 Dec 2018 04:21:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=to:cc:references:from:openpgp:autocrypt:subject:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=peoaWa85URI/nMqNmTZfFpMf5z8VF44cEG0YgxPzMCg=; b=PMDu8fD8UZqhjK6PFpip264BFJuDcKHI7uCdg6s4Dnb6bnikrUsDc23QFizKYb+e3M HdERgSf3rkpZ4+btP+BIJrrt36oI+q5epTOQ7V9YxrHnJmXPHoTJHZGV4FhVqMAooDen wSmx3FLyIgXpfFcFb8EVsaM5QtmuLN6vtDTY0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:cc:references:from:openpgp:autocrypt:subject :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=peoaWa85URI/nMqNmTZfFpMf5z8VF44cEG0YgxPzMCg=; b=ozEoB5spVi86rERBRtLlOZmNZJ3AqLVTGEWM5D4HUbry3ns/quEjBbPb4rrHE1hjKV 9eSj02FxNsTtpCXPgwaZqz51N7ncKZJVf572RnWeiGXu+RSHdn/6OaNwzcP4ZqQvc9RY pYf+nGz6BWCHWMQ751MtipSf8xmi3FrqBR/Zn3+LzBdUteP6flL03exc1fuO+wIqFLEU JcyX/2rC+NPBnAflljXVdwM3t9rH/np4d9DEOlBM8X+eAPasDjKFHL1H6KsnZ64H4tU2 qJgm37otHPd4QxA3X/A4Nd+J6RvgFVMvAZVn3Fu1UjSNflx+3BW+dZRntwxtD+n9AEEL Q2UA== X-Gm-Message-State: AJcUukcrcL6YuQZJgZRUDnm/42ovCIMhL4pu9gT3KHRLXhDM+zf7Y7Re jGO2N5Ru3ABhNRucpkyg9Uswyg== X-Received: by 2002:a37:27d2:: with SMTP id n201mr24394927qkn.63.1545999668880; Fri, 28 Dec 2018 04:21:08 -0800 (PST) Received: from [192.168.1.132] ([189.61.226.82]) by smtp.googlemail.com with ESMTPSA id o25sm18420917qtj.10.2018.12.28.04.21.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 28 Dec 2018 04:21:08 -0800 (PST) To: Florian Weimer 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, lucho@ionkov.net, hpa@zytor.com, arnd@arndb.de References: <87bm56vqg4.fsf@mid.deneb.enyo.de> <957967d7-5717-8ada-fb30-dfdf19898b6b@linaro.org> <87pntmu9iw.fsf@mid.deneb.enyo.de> <87k1jtvp8u.fsf@mid.deneb.enyo.de> <87ftuhvp08.fsf@mid.deneb.enyo.de> From: Adhemerval Zanella Openpgp: preference=signencrypt Autocrypt: addr=adhemerval.zanella@linaro.org; prefer-encrypt=mutual; keydata= mQINBFcVGkoBEADiQU2x/cBBmAVf5C2d1xgz6zCnlCefbqaflUBw4hB/bEME40QsrVzWZ5Nq 8kxkEczZzAOKkkvv4pRVLlLn/zDtFXhlcvQRJ3yFMGqzBjofucOrmdYkOGo0uCaoJKPT186L NWp53SACXguFJpnw4ODI64ziInzXQs/rUJqrFoVIlrPDmNv/LUv1OVPKz20ETjgfpg8MNwG6 iMizMefCl+RbtXbIEZ3TE/IaDT/jcOirjv96lBKrc/pAL0h/O71Kwbbp43fimW80GhjiaN2y WGByepnkAVP7FyNarhdDpJhoDmUk9yfwNuIuESaCQtfd3vgKKuo6grcKZ8bHy7IXX1XJj2X/ BgRVhVgMHAnDPFIkXtP+SiarkUaLjGzCz7XkUn4XAGDskBNfbizFqYUQCaL2FdbW3DeZqNIa nSzKAZK7Dm9+0VVSRZXP89w71Y7JUV56xL/PlOE+YKKFdEw+gQjQi0e+DZILAtFjJLoCrkEX w4LluMhYX/X8XP6/C3xW0yOZhvHYyn72sV4yJ1uyc/qz3OY32CRy+bwPzAMAkhdwcORA3JPb kPTlimhQqVgvca8m+MQ/JFZ6D+K7QPyvEv7bQ7M+IzFmTkOCwCJ3xqOD6GjX3aphk8Sr0dq3 4Awlf5xFDAG8dn8Uuutb7naGBd/fEv6t8dfkNyzj6yvc4jpVxwARAQABtElBZGhlbWVydmFs IFphbmVsbGEgTm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QAncSilYOcxNU EMVCXPAQTteqkvA+gNqSaK1NM9tY0eQ4iJpo+aoX8HAcn4sZzt2pfUB9vQMTBJ2d4+m/qO6+ cFTAceXmIoFsN8+gFN3i8Is3u12u8xGudcBPvpoy4OoG Subject: Re: d_off field in struct dirent and 32-on-64 emulation Message-ID: <4ee7419d-6537-8683-bf40-175cbdc6b484@linaro.org> Date: Fri, 28 Dec 2018 10:21:03 -0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <87ftuhvp08.fsf@mid.deneb.enyo.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 28/12/2018 10:01, Florian Weimer wrote: > * Florian Weimer: > >> * Adhemerval Zanella: >> >>> On 27/12/2018 16:09, Florian Weimer wrote: >>>> * 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: >>> >>> 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. >> >> Sorry, I don't see how this matters. seekdir and telldir are NOT >> affected by LFS. > > Ah, right. If struct dirent is 64-bit only, then the d_off member > will be 64 bits as well. But it is unclear whether you can use that > with lseek (probably yes, in its 64-bit variant), and it's unlikely > it's going to work with seekdir because of the POSIX-required long int > type. > I was referring to all other API that uses off_t as well (pread for instance), where new ports will have non-LFS variants that will call only LFS variants.