All of lore.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	linux-kernel@vger.kernel.org, Ralf Baechle <ralf@linux-mips.org>
Subject: Re: [PATCH] broken TASK_SIZE for ia32_aout
Date: Sun, 06 May 2012 10:58:49 -0700	[thread overview]
Message-ID: <4FA6BBD9.3040308@zytor.com> (raw)
In-Reply-To: <20120506175451.GU6871@ZenIV.linux.org.uk>

On 05/06/2012 10:54 AM, Al Viro wrote:
> 
> Note that we have different semantics for is_compat_task() on x86 and
> everywhere (AFAICS) else: "is this a 32bit syscall" vs. "is this a biarch
> syscall with 32bit pointers, etc.".  On architectures where 32bit syscall
> can't be issued by 64bit task and vice versa there's no difference, but for
> e.g. sparc there definitely is one.  is_compat_task() there goes by what
> the task is, not what kind of syscall is it trying to make.  It mostly
> doesn't matter (is_compat_task() has very few users), but I suspect that
> for e.g. ext4 is_32bit_api() it does matter and is currently broken...
> 
> What kind of semantics do we want?  "Thread property" one, set when we
> set personality on execve(), or "syscall property", like e.g. x86 TIF_IRET
> and TS_COMPAT?

It depends on the ABI properties of the platform.  The x86 compat ABI is
that any task can issue a compat ABI request and get a compat ABI
response (a 64-bit task can call int $0x80 for an ia32 syscall
invocation, or use syscall with either an x86-64 or and x32 system call
number.)  So is_compat_task() returns the current system call mode of
the task, because that is what downstream users need.  One of the
biggest users is the input subsystem, which earns the black mark for
worst possible ABI design, and that definitely depends on the system
call type being invoked.

	-hpa


-- 
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.


  parent reply	other threads:[~2012-05-06 17:58 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-06 16:20 [PATCH] broken TASK_SIZE for ia32_aout Al Viro
2012-05-06 17:16 ` Linus Torvalds
2012-05-06 17:37   ` H. Peter Anvin
2012-05-06 17:54   ` Al Viro
2012-05-06 17:56     ` Al Viro
2012-05-06 17:58     ` H. Peter Anvin [this message]
2012-05-06 18:46       ` Al Viro
2012-05-06 18:48         ` H. Peter Anvin
2012-05-06 19:58           ` Al Viro
2012-05-06 20:32           ` David Miller
2012-05-06 20:51             ` H. Peter Anvin
2012-05-06 23:40               ` David Miller
2012-05-06 23:48                 ` H. Peter Anvin
2012-05-07  2:56                   ` David Miller
2012-05-07  3:05                     ` H. Peter Anvin
2012-05-06 23:32             ` Al Viro
2012-05-06 23:38               ` David Miller
2012-05-07  0:13                 ` Al Viro
2012-05-07  0:24     ` Al Viro
2012-05-06 17:23 ` [tip:x86/urgent] x86, compat: Correct broken TASK_SIZE for ia32 a. out binaries tip-bot for Al Viro

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=4FA6BBD9.3040308@zytor.com \
    --to=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ralf@linux-mips.org \
    --cc=torvalds@linux-foundation.org \
    --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.