All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lars Wendler <wendler.lars@web.de>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: LKML <linux-kernel@vger.kernel.org>,
	x86@kernel.org, Borislav Betkov <bp@alien8.de>,
	Andy Lutomirski <luto@kernel.org>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Greg KH <gregkh@linuxfoundation.org>
Subject: Re: CONFIG_PAGE_TABLE_ISOLATION=y on x86_64 causes gcc to segfault when building x86_32 binaries
Date: Wed, 3 Jan 2018 14:30:36 +0100	[thread overview]
Message-ID: <20180103143036.60e592eb@abudhabi.paradoxon.rec> (raw)
In-Reply-To: <alpine.DEB.2.20.1801031259530.1957@nanos>

[-- Attachment #1: Type: text/plain, Size: 2055 bytes --]

Am Wed, 3 Jan 2018 13:05:38 +0100 (CET)
schrieb Thomas Gleixner <tglx@linutronix.de>:

> On Wed, 3 Jan 2018, Thomas Gleixner wrote:
> > On Wed, 3 Jan 2018, Lars Wendler wrote:
> > Thanks for the report.
> >   
> > > I already had a conversation with Thomas Gleixner about this
> > > issue and he asked me to post it here.
> > > 
> > > After upgrading my system to vanilla 4.14.11 kernel with
> > > CONFIG_PAGE_TABLE_ISOLATION=y I could no longer build any 32bit
> > > binaries because gcc (7.2.0) segfaults.  
> > 
> > That's a 64bit binary, right?

Yes it is.

> > > This only happens with CONFIG_PAGE_TABLE_ISOLATION=y
> > > I can get rid of this issue by setting
> > > CONFIG_PAGE_TABLE_ISOLATION=n _or_ adding pti=off to the kernel
> > > command line (the latter was suggested by Thomas).
> > > 
> > > Please find attached the kernel's config together with the dmesg
> > > output of the kernel that produces segfaults and the one with
> > > pti=off. I also attached a config.log file from a build where gcc
> > > segfaulted.
> > > 
> > > If you need more information, please don't hesitate to ask.  
> > 
> > will do.  
> 
> Here you go.
> 
> Is this anything special you are trying to build or is a simple
> 
>    gcc -m32 -o hello hello.c

A simple hello world compiles as 32bit binary but running it causes a
segfault. Compiling the same hello world as 64bit does not cause any
segfaults. Switching off pti resolves the issue and I can run the 32bit
hello world.

I first found this issue while trying to emerge gdbm-1.14 as 32bit.
Running configure failed and the config.log file said that gcc produced
a segfault while compiling a test binary called "conftest" (see the
gdbm-1.14-abi_x86_32.x86_config.log attachment in my initial report).

> Also can you please try Linus v4.15-rc6 with PTI enabled so we can see
> whether that's a backport issue or a general one?

Same problem with 4.15-rc6. So I suppose that means it's a general
issue.


> Thanks,
> 
> 	tglx

Kind regards

Lars

[-- Attachment #2: Digitale Signatur von OpenPGP --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2018-01-03 13:31 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20180103123723.1dd26828@abudhabi.paradoxon.rec>
2018-01-03 11:57 ` CONFIG_PAGE_TABLE_ISOLATION=y on x86_64 causes gcc to segfault when building x86_32 binaries Thomas Gleixner
2018-01-03 12:05   ` Thomas Gleixner
2018-01-03 13:30     ` Lars Wendler [this message]
2018-01-03 15:21       ` Thomas Gleixner
2018-01-03 15:42         ` Dave Hansen
2018-01-03 18:52         ` Thomas Gleixner
2018-01-03 22:12           ` Laura Abbott
2018-01-03 22:14           ` Andy Lutomirski
2018-01-03 22:22             ` Thomas Gleixner
2018-01-03 23:43               ` Andy Lutomirski
2018-01-03 22:27             ` Dave Hansen
2018-01-03 22:25           ` [tip:x86/pti] x86/pti: Switch to kernel CR3 at early in entry_SYSCALL_compat() tip-bot for Thomas Gleixner
2018-01-03 23:46           ` CONFIG_PAGE_TABLE_ISOLATION=y on x86_64 causes gcc to segfault when building x86_32 binaries Lars Wendler
2018-01-04  2:44           ` Boris Ostrovsky
2018-01-03 15:40       ` Borislav Petkov
2018-01-03 23:22         ` Lars Wendler

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=20180103143036.60e592eb@abudhabi.paradoxon.rec \
    --to=wendler.lars@web.de \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.