linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Lutomirski <luto@amacapital.net>
To: David Miller <davem@davemloft.net>
Cc: Al Viro <viro@zeniv.linux.org.uk>,
	Andrew Lutomirski <luto@kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Ingo Molnar <mingo@kernel.org>, X86 ML <x86@kernel.org>,
	linux-arch <linux-arch@vger.kernel.org>,
	"linux-s390@vger.kernel.org" <linux-s390@vger.kernel.org>
Subject: Re: [PATCH] Rename is_compat_task to in_compat_syscall
Date: Tue, 19 Jan 2016 15:15:21 -0800	[thread overview]
Message-ID: <CALCETrV07e2P-wnaoVfc3vD_qUWJWbjwKcREnBicn97mHCQ1Tg@mail.gmail.com> (raw)
In-Reply-To: <20160119.171643.1125867148856105860.davem@davemloft.net>

On Tue, Jan 19, 2016 at 2:16 PM, David Miller <davem@davemloft.net> wrote:
> From: Al Viro <viro@ZenIV.linux.org.uk>
> Date: Tue, 19 Jan 2016 21:55:36 +0000
>
>> On Tue, Jan 19, 2016 at 01:47:24PM -0800, Andy Lutomirski wrote:
>>> Essentially all users of is_compat_task in the kernel are trying to
>>> determine whether they are executing in the context of a compat
>>> syscall.  On at least x86_64 and sparc, these are not at all the
>>> same question.
>>>
>>> On x86_64 and sparc, therefore, is_compat_task doesn't return the
>>> overall compat state of the task; it returns true if the task is
>>> currently in a compat syscall.
>>
>> The hell it does.  Andy, TIF_32BIT is *NOT* set on syscall entry; it is
>> set by execve().  And 64bit task (with that bit clear) can bloody well
>> issue 32bit syscalls.  Really.
>
> Correct.

See the other thread.  My patch here is garbage, but x86 and sparc
really do work differently here, and I think that x86's behavior is
better than sparc's.

-- 
Andy Lutomirski
AMA Capital Management, LLC

  reply	other threads:[~2016-01-19 23:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-19 21:47 [PATCH] Rename is_compat_task to in_compat_syscall Andy Lutomirski
2016-01-19 21:55 ` Al Viro
2016-01-19 22:16   ` David Miller
2016-01-19 23:15     ` Andy Lutomirski [this message]
2016-01-20  8:58 ` Heiko Carstens

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=CALCETrV07e2P-wnaoVfc3vD_qUWJWbjwKcREnBicn97mHCQ1Tg@mail.gmail.com \
    --to=luto@amacapital.net \
    --cc=davem@davemloft.net \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=viro@zeniv.linux.org.uk \
    --cc=x86@kernel.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 NNTP newsgroup(s).