All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Christoph Hellwig <hch@lst.de>,
	akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
	linux-arch@vger.kernel.org, tony.luck@intel.com,
	ralf@linux-mips.org, kyle@mcmartin.ca, benh@kernel.crashing.org,
	schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com,
	davem@davemloft.net, tglx@linutronix.de, mingo@redhat.com,
	hpa@zytor.com, viro@zeniv.linux.org.uk
Subject: Re: [PATCH 4/6] improve sys_personality for compat architectures
Date: Tue, 2 Feb 2010 17:31:45 +0100	[thread overview]
Message-ID: <20100202163145.GA30659@lst.de> (raw)
In-Reply-To: <201002021536.51928.arnd@arndb.de>

On Tue, Feb 02, 2010 at 03:36:51PM +0100, Arnd Bergmann wrote:
> > -       return (long)old;
> > +       return (long)(old == PER_LINUX32 ? PER_LINUX : old);
> >  }
> 
> What does this do for a native 64 bit process setting PER_LINUX32?
> It looks to me like it could never set it back to the original
> value, or am I missing something here?
> 
> It's what the arch specific code does already, but it seems a bit
> strange anyway.

Indeed, this prevents a process from going back to 64bit.  And while
the setarch tool in util-linux also allows going back to 64-bit the
typical use case seems to be going into 32-bit mode.

But if the consensus is that we should fix this properly I can
replace the patch with one introducing a compat_sys_personality
which only gets used for compat tasks.

  reply	other threads:[~2010-02-02 16:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-01 18:56 [PATCH 4/6] improve sys_personality for compat architectures Christoph Hellwig
2010-02-02 14:36 ` Arnd Bergmann
2010-02-02 16:31   ` Christoph Hellwig [this message]
2010-02-03 17:06     ` Arnd Bergmann
2010-02-03 17:13       ` David Miller
2010-02-03 20:04         ` H. Peter Anvin
2010-02-04  7:38           ` Arnd Bergmann
2010-02-04 16:00             ` Christoph Hellwig
2010-03-05 19:49               ` Andrew Morton
2010-03-09 12:58                 ` Christoph Hellwig

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=20100202163145.GA30659@lst.de \
    --to=hch@lst.de \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=benh@kernel.crashing.org \
    --cc=davem@davemloft.net \
    --cc=heiko.carstens@de.ibm.com \
    --cc=hpa@zytor.com \
    --cc=kyle@mcmartin.ca \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=ralf@linux-mips.org \
    --cc=schwidefsky@de.ibm.com \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    --cc=viro@zeniv.linux.org.uk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.