Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1373864

Re: x32 processes, with CONFIG_X86_X32 not set

Path csiph.com!aioe.org!gothmog.csi.it!bofh.it!news.nic.it!robomod
From Andy Lutomirski <luto@amacapital.net>
Newsgroups linux.kernel
Subject Re: x32 processes, with CONFIG_X86_X32 not set
Date Fri, 08 Apr 2016 02:30:03 +0200
Message-ID <rlstd-3DX-21@gated-at.bofh.it> (permalink)
References <rgC9R-3Nq-11@gated-at.bofh.it> <rgCjx-3QV-23@gated-at.bofh.it> <rgCjx-3QV-21@gated-at.bofh.it>
X-Original-To Dave Jones <davej@codemonkey.org.uk>, Andy Lutomirski <luto@amacapital.net>, Andrew Lutomirski <luto@kernel.org>, X86 ML <x86@kernel.org>, Linux Kernel <linux-kernel@vger.kernel.org>
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=amacapital-net.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=j/yUPNTndObzf933nG0B39Rl0+oFlHFa+JwE3fTulMs=; b=H1p17CExVXw3TUBiKdzdc+RuwjlEdStiwjkd2JxkvL1NfG/dQ0fFmYFsHIPmRZkXwU jLHlHLTyW2dehYWDjwzfzRovmELFb24SF994B5iEBNFR3Ncayx4zGlyWzd9LYkoEv76L A5AYRGRzV/wruAuI4AFR6nrdEyy7JQ1wRJEujHnRpYpFALyr+tUyg9QOV3S5OSXHEiJB C11ktyCh8V0mtiiXNmLZ+dYot+SmwHU3Z9DO0LH0l8Tme5kpToW8/rqonjJBHOBi4TI2 zdhdahB3pfIvm8bASVw6kXd7ASN+G5+6nX4g0vTeidRSj4MrLJYjJaZU1f2pmmsCQGI2 xJ6w==
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=j/yUPNTndObzf933nG0B39Rl0+oFlHFa+JwE3fTulMs=; b=VXoZBd4cSzYKl9KTspu/1RZWLUni7NWd+h5aK9nMtjZzPZNsOVWPxmRZghQp1FX/bq 0WrIzktaYILETOEwAx+npSvWnNwxn8tMx0TiNO4Vv5sxn/fQGvn3lu7hHUrimdSun1u5 p+/CKpvgMLLiz7pW90PhE3jlxfdPhGgsqQ76U4Wu0XiO2nWYHsWbHvLt+4xNH7CJU/p9 mqJX1vil7I9b16oIUrkAqTu5svmF5wCKEs+DfOMfO/nRtfn5GpCPef+9WQR9cXjToU8v 4HdutZG3t9XSpOI0na3x/wVNaKSOsRpHB6aeA8ASRdlLeJ9YO+jdbWhvTESkswbnZNHK bpQg==
X-Gm-Message-State AD7BkJI+q7Cihyq3DzAJqGxr5CplWr39bAxct8YeIwbR/MWiyYmTF/0gDitK0xnVWLpDIkxSanNAYZloSw7mbnNd
X-Received by 10.157.4.39 with SMTP id 36mr3183933otc.195.1460074869620; Thu, 07 Apr 2016 17:21:09 -0700 (PDT)
MIME-Version 1.0
Content-Type text/plain; charset=UTF-8
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 51
Organization linux.* mail to news gateway
X-Original-Date Thu, 7 Apr 2016 17:20:50 -0700
X-Original-Message-ID <CALCETrXzhmT+Ly19bhEv8S=OtGafYkUMcLatwscCYiGHp_hezA@mail.gmail.com>
X-Original-References <20160325154835.GA13116@codemonkey.org.uk> <CALCETrVYN+bC=G64k3d9tew8BO+cZqndWqf603Xz=LEYtdKjEw@mail.gmail.com> <20160325155844.GB13116@codemonkey.org.uk>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1373864

Show key headers only | View raw


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

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: x32 processes, with CONFIG_X86_X32 not set Andy Lutomirski <luto@amacapital.net> - 2016-04-08 02:30 +0200
  Re: x32 processes, with CONFIG_X86_X32 not set Dave Jones <davej@codemonkey.org.uk> - 2016-04-08 03:40 +0200

csiph-web