Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753595AbcCYPwC (ORCPT ); Fri, 25 Mar 2016 11:52:02 -0400 Received: from mail-oi0-f41.google.com ([209.85.218.41]:35284 "EHLO mail-oi0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753246AbcCYPwA (ORCPT ); Fri, 25 Mar 2016 11:52:00 -0400 MIME-Version: 1.0 In-Reply-To: <20160325154835.GA13116@codemonkey.org.uk> References: <20160325154835.GA13116@codemonkey.org.uk> From: Andy Lutomirski Date: Fri, 25 Mar 2016 08:51:39 -0700 Message-ID: Subject: Re: x32 processes, with CONFIG_X86_X32 not set To: Dave Jones , Andrew Lutomirski , X86 ML , Linux Kernel Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 906 Lines: 25 On Fri, Mar 25, 2016 at 8:48 AM, Dave Jones 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