public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Andy Lutomirski <luto@kernel.org>
Cc: Matthew Wilcox <willy@infradead.org>,
	Andreas Dilger <adilger@dilger.ca>,
	 Florian Weimer <fw@deneb.enyo.de>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	 Linux API <linux-api@vger.kernel.org>,
	 Ext4 Developers List <linux-ext4@vger.kernel.org>,
	Latchesar Ionkov <lucho@ionkov.net>,
	 libc-alpha <libc-alpha@sourceware.org>,
	Arnd Bergmann <arnd@arndb.de>,
	 Eric Van Hensbergen <ericvh@gmail.com>,
	"H. Peter Anvin" <hpa@zytor.com>,
	 lkml - Kernel Mailing List <linux-kernel@vger.kernel.org>,
	QEMU Developers <qemu-devel@nongnu.org>,
	 Ron Minnich <rminnich@sandia.gov>,
	 V9FS Developers <v9fs-developer@lists.sourceforge.net>
Subject: Re: [Qemu-devel] d_off field in struct dirent and 32-on-64 emulation
Date: Mon, 31 Dec 2018 01:14:00 -0000	[thread overview]
Message-ID: <CAFEAcA_gV734EAxDii8XBOPr82kLYtsZmW5jYfQnT_DEpGOkpQ@mail.gmail.com> (raw)
In-Reply-To: <CALCETrUJn4cV+o3scP1EzYS=JA--5KUXvjuxZDbsnhXra1vrwA@mail.gmail.com>

On Sat, 29 Dec 2018 at 16:49, Andy Lutomirski <luto@kernel.org> wrote:
> > Could you use a prctl to set whether you were running in 32 or 64 bit
> > mode?  Or do you change which kind of task you're emulating too often
> > to make this a good idea?

QEMU's linux-user mode always only runs the single process,
which is a fixed guest architecture. But it also wants to
make system calls on its own behalf, as well as the ones it
is passing through from the guest, and I suspect it would
confuse the host libc if we changed the semantics of those
under its feet.

> How would this work?  We already have the separate
> COMPAT_DEFINE_SYSCALL entries *and* in_compat_syscall(). Now we’d have
> a third degree of freedom.
>
> Either the arches people care about should add reasonable ways to
> issue 32-bit syscalls from 64-bit mode or there should be an explicit
> way to ask for the 32-bit directory offsets.

The first of those is not sufficient for QEMU if done
as a per-architecture thing, because there may not even be
a 32-bit syscall interface on the host kernel. The second
sounds better -- there's nothing conceptually architecture
specific about what we want to do or which is tied to the
idea of whether there's a 32-bit compat mode in the host
architecture or not.

thanks
-- PMM

  reply	other threads:[~2018-12-30 13:59 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-27 17:56 Florian Weimer
2018-12-27 17:58 ` [Qemu-devel] " Peter Maydell
2018-12-28  1:03   ` Andreas Dilger
2018-12-28 11:56     ` Peter Maydell
2018-12-29  1:38       ` Andreas Dilger
2018-12-29  1:55         ` Peter Maydell
2018-12-29  2:02           ` Matthew Wilcox
2018-12-31  0:26             ` Andy Lutomirski
2018-12-31  1:14               ` Peter Maydell [this message]
2018-12-29  2:23       ` Theodore Y. Ts'o
2018-12-29  4:04         ` Dominique Martinet
2018-12-29  8:55           ` Theodore Y. Ts'o
2018-12-29  9:47             ` [V9fs-developer] " Dominique Martinet
     [not found] ` <C65D3222-723F-4C0B-AF02-38488C302E84@amacapital.net>
2018-12-27 18:03   ` Florian Weimer
2018-12-27 18:09 ` Adhemerval Zanella
2018-12-27 18:26   ` Florian Weimer
2018-12-28 12:01     ` Adhemerval Zanella
2018-12-28 12:21       ` Florian Weimer
2018-12-28 14:13         ` Florian Weimer
2018-12-28 14:13           ` Adhemerval Zanella
2018-12-31 17:26       ` Joseph Myers
2019-01-02 13:16         ` Adhemerval Zanella
2019-01-04  2:33           ` Mao Han
2019-01-04  9:22             ` Florian Weimer
2019-01-04 11:04               ` Adhemerval Zanella
2019-01-04 11:11                 ` Florian Weimer
2019-01-04 12:10                   ` Adhemerval Zanella
2019-01-07  2:06                 ` Mao Han
2018-12-28  8:08 ` Dmitry V. Levin
2018-12-28  9:54   ` Florian Weimer
2018-12-28 16:56 ` Andy Lutomirski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAFEAcA_gV734EAxDii8XBOPr82kLYtsZmW5jYfQnT_DEpGOkpQ@mail.gmail.com \
    --to=peter.maydell@linaro.org \
    --cc=adilger@dilger.ca \
    --cc=arnd@arndb.de \
    --cc=ericvh@gmail.com \
    --cc=fw@deneb.enyo.de \
    --cc=hpa@zytor.com \
    --cc=libc-alpha@sourceware.org \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lucho@ionkov.net \
    --cc=luto@kernel.org \
    --cc=qemu-devel@nongnu.org \
    --cc=rminnich@sandia.gov \
    --cc=v9fs-developer@lists.sourceforge.net \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).