* x32 processes, with CONFIG_X86_X32 not set
@ 2016-03-25 15:48 Dave Jones
2016-03-25 15:51 ` Andy Lutomirski
0 siblings, 1 reply; 5+ messages in thread
From: Dave Jones @ 2016-03-25 15:48 UTC (permalink / raw)
To: luto; +Cc: x86, Linux Kernel
I had a trinity process get stuck last overnight.
The reason for it getting stuck is my bug (I think), but
there's an odd unrelated thing I noticed while debugging this..
$ strace -p 20966
strace: Process 20966 attached
strace: [ Process PID=20966 runs in x32 mode. ]
So I don't use that new-fangled x32 stuff.
I don't even have CONFIG_X86_X32 compiled in.
Is this strace getting confused, or did we somehow screw
up the syscall entry code ?
Dave
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: x32 processes, with CONFIG_X86_X32 not set
2016-03-25 15:48 x32 processes, with CONFIG_X86_X32 not set Dave Jones
@ 2016-03-25 15:51 ` Andy Lutomirski
2016-03-25 15:58 ` Dave Jones
0 siblings, 1 reply; 5+ messages in thread
From: Andy Lutomirski @ 2016-03-25 15:51 UTC (permalink / raw)
To: Dave Jones, Andrew Lutomirski, X86 ML, Linux Kernel
On Fri, Mar 25, 2016 at 8:48 AM, Dave Jones <davej@codemonkey.org.uk> wrote:
> I had a trinity process get stuck last overnight.
> The reason for it getting stuck is my bug (I think), but
> there's an odd unrelated thing I noticed while debugging this..
>
> $ strace -p 20966
> strace: Process 20966 attached
> strace: [ Process PID=20966 runs in x32 mode. ]
>
> So I don't use that new-fangled x32 stuff.
> I don't even have CONFIG_X86_X32 compiled in.
>
> Is this strace getting confused, or did we somehow screw
> up the syscall entry code ?
>
> Dave
>
I think you're just seeing an oddity of how x32 works. Unlike
"compat", x32-ness of the current syscall isn't a special magic state
variable; it's just but 31 in the syscall nr. So trying to do an x32
syscall on a non-x32 syscall should still show bit 31 set to ptracers,
and the strace probably decodes this as being in x32 mode.
--Andy
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: x32 processes, with CONFIG_X86_X32 not set
2016-03-25 15:51 ` Andy Lutomirski
@ 2016-03-25 15:58 ` Dave Jones
2016-04-08 0:20 ` Andy Lutomirski
0 siblings, 1 reply; 5+ messages in thread
From: Dave Jones @ 2016-03-25 15:58 UTC (permalink / raw)
To: Andy Lutomirski; +Cc: Andrew Lutomirski, X86 ML, Linux Kernel
On Fri, Mar 25, 2016 at 08:51:39AM -0700, Andy Lutomirski wrote:
> On Fri, Mar 25, 2016 at 8:48 AM, Dave Jones <davej@codemonkey.org.uk> wrote:
> > I had a trinity process get stuck last overnight.
> > The reason for it getting stuck is my bug (I think), but
> > there's an odd unrelated thing I noticed while debugging this..
> >
> > $ strace -p 20966
> > strace: Process 20966 attached
> > strace: [ Process PID=20966 runs in x32 mode. ]
> >
> > So I don't use that new-fangled x32 stuff.
> > I don't even have CONFIG_X86_X32 compiled in.
> >
> > Is this strace getting confused, or did we somehow screw
> > up the syscall entry code ?
> >
> > Dave
> >
>
> I think you're just seeing an oddity of how x32 works. Unlike
> "compat", x32-ness of the current syscall isn't a special magic state
> variable; it's just but 31 in the syscall nr. So trying to do an x32
> syscall on a non-x32 syscall should still show bit 31 set to ptracers,
> and the strace probably decodes this as being in x32 mode.
But this is an x86-64 binary, and it's the main process, not one of the fuzzing
child processes. It shouldn't be even trying to do anything weird.
It creates a bunch of fd's, then enters a loop forking/reaping children.
(In this case it actually hung while creating the fd's)
Trinity doesn't actually have any knowledge of x32 at all, mostly because
it's been irrelevant to me (and most other people).
Dave
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: x32 processes, with CONFIG_X86_X32 not set
2016-03-25 15:58 ` Dave Jones
@ 2016-04-08 0:20 ` Andy Lutomirski
2016-04-08 1:32 ` Dave Jones
0 siblings, 1 reply; 5+ messages in thread
From: Andy Lutomirski @ 2016-04-08 0:20 UTC (permalink / raw)
To: Dave Jones, Andy Lutomirski, Andrew Lutomirski, X86 ML,
Linux Kernel
On Fri, Mar 25, 2016 at 8:58 AM, Dave Jones <davej@codemonkey.org.uk> wrote:
> On Fri, Mar 25, 2016 at 08:51:39AM -0700, Andy Lutomirski wrote:
> > On Fri, Mar 25, 2016 at 8:48 AM, Dave Jones <davej@codemonkey.org.uk> wrote:
> > > I had a trinity process get stuck last overnight.
> > > The reason for it getting stuck is my bug (I think), but
> > > there's an odd unrelated thing I noticed while debugging this..
> > >
> > > $ strace -p 20966
> > > strace: Process 20966 attached
> > > strace: [ Process PID=20966 runs in x32 mode. ]
> > >
> > > So I don't use that new-fangled x32 stuff.
> > > I don't even have CONFIG_X86_X32 compiled in.
> > >
> > > Is this strace getting confused, or did we somehow screw
> > > up the syscall entry code ?
> > >
> > > Dave
> > >
> >
> > I think you're just seeing an oddity of how x32 works. Unlike
> > "compat", x32-ness of the current syscall isn't a special magic state
> > variable; it's just but 31 in the syscall nr. So trying to do an x32
> > syscall on a non-x32 syscall should still show bit 31 set to ptracers,
> > and the strace probably decodes this as being in x32 mode.
>
> But this is an x86-64 binary, and it's the main process, not one of the fuzzing
> child processes. It shouldn't be even trying to do anything weird.
> It creates a bunch of fd's, then enters a loop forking/reaping children.
> (In this case it actually hung while creating the fd's)
>
> Trinity doesn't actually have any knowledge of x32 at all, mostly because
> it's been irrelevant to me (and most other people).
>
Hmm. Do you have the next couple lines of strace output by any
chance? I'm wondering if this is a classic bug/misfeature/confusion
in the way that orig_ax works.
FWIW, the way that strace detects 32-bit mode is bogus, and I don't
actually know how strace detects x32 mode.
> Dave
>
>
--
Andy Lutomirski
AMA Capital Management, LLC
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: x32 processes, with CONFIG_X86_X32 not set
2016-04-08 0:20 ` Andy Lutomirski
@ 2016-04-08 1:32 ` Dave Jones
0 siblings, 0 replies; 5+ messages in thread
From: Dave Jones @ 2016-04-08 1:32 UTC (permalink / raw)
To: Andy Lutomirski; +Cc: Andrew Lutomirski, X86 ML, Linux Kernel
On Thu, Apr 07, 2016 at 05:20:50PM -0700, Andy Lutomirski wrote:
> > > > I had a trinity process get stuck last overnight.
> > > > The reason for it getting stuck is my bug (I think), but
> > > > there's an odd unrelated thing I noticed while debugging this..
> > > >
> > > > $ strace -p 20966
> > > > strace: Process 20966 attached
> > > > strace: [ Process PID=20966 runs in x32 mode. ]
> > > >
> > > > So I don't use that new-fangled x32 stuff.
> > > > I don't even have CONFIG_X86_X32 compiled in.
> > > >
> > > > Is this strace getting confused, or did we somehow screw
> > > > up the syscall entry code ?
> > > >
> > > > Dave
> > > >
> > >
> > > I think you're just seeing an oddity of how x32 works. Unlike
> > > "compat", x32-ness of the current syscall isn't a special magic state
> > > variable; it's just but 31 in the syscall nr. So trying to do an x32
> > > syscall on a non-x32 syscall should still show bit 31 set to ptracers,
> > > and the strace probably decodes this as being in x32 mode.
> >
> > But this is an x86-64 binary, and it's the main process, not one of the fuzzing
> > child processes. It shouldn't be even trying to do anything weird.
> > It creates a bunch of fd's, then enters a loop forking/reaping children.
> > (In this case it actually hung while creating the fd's)
> >
> > Trinity doesn't actually have any knowledge of x32 at all, mostly because
> > it's been irrelevant to me (and most other people).
> >
>
> Hmm. Do you have the next couple lines of strace output by any
> chance? I'm wondering if this is a classic bug/misfeature/confusion
> in the way that orig_ax works.
I don't. That box got rebooted a couple dozen times since then.
FWIW, I've not seen this happen since. Very strange.
Dave
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-04-08 1:32 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-25 15:48 x32 processes, with CONFIG_X86_X32 not set Dave Jones
2016-03-25 15:51 ` Andy Lutomirski
2016-03-25 15:58 ` Dave Jones
2016-04-08 0:20 ` Andy Lutomirski
2016-04-08 1:32 ` Dave Jones
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).