public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@linux.intel.com>
To: Philipp Kern <pkern@google.com>, Andy Lutomirski <luto@amacapital.net>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"H. J. Lu" <hjl.tools@gmail.com>, Eric Paris <eparis@redhat.com>
Subject: Re: [PATCH] x32: Mask away the x32 syscall bit in the ptrace codepath
Date: Wed, 28 May 2014 15:37:17 -0700	[thread overview]
Message-ID: <5386651D.9080001@linux.intel.com> (raw)
In-Reply-To: <CAA2ZrUSzXUp=uipjwCDLsXPOhPwp7m1oSfR8zdKJaQCgg2aoeQ@mail.gmail.com>

On 05/28/2014 02:53 PM, Philipp Kern wrote:
> On Wed, May 28, 2014 at 11:43 PM, Andy Lutomirski <luto@amacapital.net> wrote:
>> However: are you sure that entry_64.S handles this?  It looks like
>> tracesys has higher priority than badsys.  And strace can certainly
>> see out-of-range syscalls. […]
> 
> Not only can it see them: It must see that this bit is set as that's
> the only identifier it has to deduce that the binary is running in x32
> mode.

Yes... keep in mind the ABI is a local property: just because the binary
is running in x32 mode doesn't mean it can't access x86-64 or i386
system calls (or similar for x86-64 processes.)  A process started in
i386 mode can transition to long mode and execute x86-64 or x32 system
calls, too.

	-hpa


      parent reply	other threads:[~2014-05-28 22:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-28 12:19 [PATCH] x32: Mask away the x32 syscall bit in the ptrace codepath Philipp Kern
2014-05-28 20:47 ` Andy Lutomirski
2014-05-28 20:58   ` Philipp Kern
2014-05-28 21:01   ` H. Peter Anvin
2014-05-28 21:15     ` Andy Lutomirski
2014-05-28 21:19       ` H. Peter Anvin
2014-05-28 21:43         ` Andy Lutomirski
2014-05-28 21:53           ` Philipp Kern
2014-05-28 21:55             ` Andy Lutomirski
2014-05-28 22:37             ` H. Peter Anvin [this message]

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=5386651D.9080001@linux.intel.com \
    --to=hpa@linux.intel.com \
    --cc=eparis@redhat.com \
    --cc=hjl.tools@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=pkern@google.com \
    /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