Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp8831743imu; Sat, 29 Dec 2018 04:49:05 -0800 (PST) X-Google-Smtp-Source: ALg8bN4YmHJfxrTNHGhYUClUTQeS6Q3bPAHr6cGJBrFCrskI8lVSxHABPxnBLOz4QFs6UeKQDSEJ X-Received: by 2002:a17:902:d01:: with SMTP id 1mr31482758plu.127.1546087745792; Sat, 29 Dec 2018 04:49:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546087745; cv=none; d=google.com; s=arc-20160816; b=aqcxeyaq/iU2vLJ4d7BHcVJ9xyd/oXM/IaikMmG3+4/pE25m21LR1nv16jo9bDEENc MZ3R6cy89QGoEud2QOqPS7V0Qa1+W4OOmZ1JfqdMNADK+D7TfvCYezGLyYNtHWd2YUsg GiQmDDo4muoFyh+4A6QEpcU+lN/hCuKnKHgHYyJira6YpKR8pNt57UkijaaaJtVSOXw8 DbR/xfqSEdTqYg5pE/iu4cIAfTcuU9//9Iv1auqUXANsUg9Ptj0q3PK8OG9mGapm5t74 5wVaIxT81I7XXuvI3qTtyVwoLwvLP2gB7v6S1+Ib222dZgf7KJUJ6m+nyJOKx5agfvJI vnbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:mail-followup-to :message-id:subject:to:from:date; bh=fpuSWAdstZpxg17WqFgoNO4pPINOuMI4w/T9a2JpXF4=; b=aERDw2gJ5cYKXHa8nS4mcQDQrhveDzld/4t2M3+OT4rrQNCPbxbL8f4M8zp0WOLLdW FO/711qfctxAAShUSOpnxv+rQcuYehMdeUP7p6H3Qnwpkob8KlGAtZmQOseqXnfbguAF 4suJemM7+0W6ivnunsVdnEBlKm6FR8L4bJkSEzq4AiwK1F7Lp9Lh7KvFQwITzryWw1Go K7rKsRr2BT5y5vP9edTFvB142OdGkr4Ea44+xhu3OiHdv4hwTfDQKAeVa78VsKNTfogw LAQ0Z7tdhU7dHwK5hdoVo1ncE2CwFuP1ruofo863CEoDWBTYhESTKjGDduWc4cqXoj7U XO3w== 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 p9si40547339pgc.448.2018.12.29.04.48.50; Sat, 29 Dec 2018 04:49:05 -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 S1729873AbeL2Chj (ORCPT + 99 others); Fri, 28 Dec 2018 21:37:39 -0500 Received: from nautica.notk.org ([91.121.71.147]:33823 "EHLO nautica.notk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727815AbeL2Chj (ORCPT ); Fri, 28 Dec 2018 21:37:39 -0500 Received: by nautica.notk.org (Postfix, from userid 1001) id D4A26C009; Sat, 29 Dec 2018 03:37:36 +0100 (CET) Date: Sat, 29 Dec 2018 03:37:21 +0100 From: Dominique Martinet To: "Theodore Y. Ts'o" , Peter Maydell , Andreas Dilger , Florian Weimer , linux-fsdevel , Linux API , Ext4 Developers List , lucho@ionkov.net, libc-alpha@sourceware.org, Arnd Bergmann , ericvh@gmail.com, hpa@zytor.com, lkml - Kernel Mailing List , QEMU Developers , rminnich@sandia.gov, v9fs-developer@lists.sourceforge.net Subject: Re: [Qemu-devel] d_off field in struct dirent and 32-on-64 emulation Message-ID: <20181229023721.GA9291@nautica> Mail-Followup-To: "Theodore Y. Ts'o" , Peter Maydell , Andreas Dilger , Florian Weimer , linux-fsdevel , Linux API , Ext4 Developers List , lucho@ionkov.net, libc-alpha@sourceware.org, Arnd Bergmann , ericvh@gmail.com, hpa@zytor.com, lkml - Kernel Mailing List , QEMU Developers , rminnich@sandia.gov, v9fs-developer@lists.sourceforge.net References: <87bm56vqg4.fsf@mid.deneb.enyo.de> <9C6A7D45-CF53-4C61-B5DD-12CA0D419972@dilger.ca> <20181229021157.GG5864@mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20181229021157.GG5864@mit.edu> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Theodore Y. Ts'o wrote on Fri, Dec 28, 2018: > > The problem is that there is no 32-bit API in some cases > > (unless I have misunderstood the kernel code) -- not all > > host architectures implement compat syscalls or allow them > > to be called from 64-bit processes or implement all the older > > syscall variants that had smaller offets. If there was a guaranteed > > "this syscall always exists and always gives me 32-bit offsets" > > we could use it. > > Are there going to be cases where a process or a thread will sometimes > want the 64-bit interface, and sometimes want the 32-bit interface? > Or is it always going to be one or the other? I wonder if we could > simply add a new flag to the process personality(2) flags. That would likely work for qemu user, but the qemu system+9p case is going to be more painful.. More precisely, the 9p protocol does not plan for anything other than 64bit offset so if the vfs needs to hand out a 32bit offset we'll need to make a correspondance table between the 32bit offsets we hand off and the 64bit ones to use; unless some flag can be passed at lopen to tell the server to always hand out 32bit offsets for this directory... And if we do that then 9p servers will need a way to use both APIs in parallel for both types of directories. (Although I'd rather not have to do either in the first place, keeping track of all used offsets just in case seems like a waste even if we only do it for processes in 32bit mode, and a new flag would be a protocol change with 9p not being designed to catter for subtle protocol changes so would be rather painful to roll out) No bright idea here, sorry. -- Dominique Martinet | Asmadeus