From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752116AbeACNbN (ORCPT + 1 other); Wed, 3 Jan 2018 08:31:13 -0500 Received: from mout.web.de ([212.227.15.4]:50298 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751514AbeACNbM (ORCPT ); Wed, 3 Jan 2018 08:31:12 -0500 Date: Wed, 3 Jan 2018 14:30:36 +0100 From: Lars Wendler To: Thomas Gleixner Cc: LKML , x86@kernel.org, Borislav Betkov , Andy Lutomirski , Dave Hansen , Peter Zijlstra , Greg KH Subject: Re: CONFIG_PAGE_TABLE_ISOLATION=y on x86_64 causes gcc to segfault when building x86_32 binaries Message-ID: <20180103143036.60e592eb@abudhabi.paradoxon.rec> In-Reply-To: References: <20180103123723.1dd26828@abudhabi.paradoxon.rec> Organization: privat X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/SwZwVDr03cVYTyCv4N1aRI."; protocol="application/pgp-signature" X-Provags-ID: V03:K0:pbeVaauyUCJ8861TbYQlWQuYsz6lGkN4UPG6EZABLqb3/jqQ/// MjS1KdZuEqYT8IPSOOBYAL5ElVeAfYdQEm21adI+i+ZXSpW9Q9dizDssk8JkxSIuiHExCWW PwB1YMJXKf24FCGaOu8Csamx6S9PRTbO2V6+n/FiuNnSxxkD6stdu0KNmmWrVYf312G9pCw GuVUB7pWHuSjotFnFVvrw== X-UI-Out-Filterresults: notjunk:1;V01:K0:109HctenGVU=:mHqm6o+C8XM4zHG04T0wc8 HvJDDyzBcoAiyKUTMGopROgynVJiGHtTOrfoz+NQXPR0oKna2bL5HpT0ECOT8JA7WXreJCqIR JzQXWzFyTzRaHsR6PPgccISCZO6sgH+gPCICYzlkzpnOnfEulds81E4Y34nQVt4Y+WtnoOMLj butX8YXoatXiCABCpPJtxsRNqgf2TjXT5m433mxv9pfPi4IQB/PCLewY5xrFMDQ4KIzkVthns KWgXYVONBhD+oXl8jwHLMjYyxhtL7OdDVGjW6MK5OddMEloMmTmBUxT7HAHOGOvFxkn2QFsFT ksh6y72wq4mmvV9s7QB/0CaL/y1O6K9Dr1dgyxBjN/MuQIaghkRQdPbLWhS1Q9lSgRSYDcZU6 7XvmIyvuIaa7kdyIr8GDvVgcr4HFRBJ3n1dGe+eQPJMosdaeV/vktn/+hE9wIB/C8B1jDXMYB bsi741JyEHzu8BxyefcqWsxdttKGz90l3EP1WWuMdTnkxb+RfoXQdewGpR26h80w/Kon7e98U ufnZxG2WxmbU2tphpbAPd/ed59DNsEuBW/B8IWnV0VuaMuZzn8u9fbmvBTtpRyPjJSh8JEkmx +6s4af+Bo2MNqTp46ajyrCQ0WIU8f3rFG7/sHjEXlWJgn49GvzGmpAg9up21lrM6HlLJFgwjg oSreWTnw4Y2Jw/4KrDYMKqULzvK1AMAdHFXvUCkl10HAFOy7v8ZjieIU0bzTI7kp4biiZ/MfX 2yl8yAegiVTsO71j+Fa2b69dpNVcPP6dE1vGl+IwxZSfTmDolbxnhqO5ILyccfwSp5SzTnRCs Jb2XZLTCXYtyRakPwvA/Mx7cMFRAg== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: --Sig_/SwZwVDr03cVYTyCv4N1aRI. Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Am Wed, 3 Jan 2018 13:05:38 +0100 (CET) schrieb Thomas Gleixner : > On Wed, 3 Jan 2018, Thomas Gleixner wrote: > > On Wed, 3 Jan 2018, Lars Wendler wrote: > > Thanks for the report. > > =20 > > > I already had a conversation with Thomas Gleixner about this > > > issue and he asked me to post it here. > > >=20 > > > After upgrading my system to vanilla 4.14.11 kernel with > > > CONFIG_PAGE_TABLE_ISOLATION=3Dy I could no longer build any 32bit > > > binaries because gcc (7.2.0) segfaults. =20 > >=20 > > That's a 64bit binary, right? Yes it is. > > > This only happens with CONFIG_PAGE_TABLE_ISOLATION=3Dy > > > I can get rid of this issue by setting > > > CONFIG_PAGE_TABLE_ISOLATION=3Dn _or_ adding pti=3Doff to the kernel > > > command line (the latter was suggested by Thomas). > > >=20 > > > Please find attached the kernel's config together with the dmesg > > > output of the kernel that produces segfaults and the one with > > > pti=3Doff. I also attached a config.log file from a build where gcc > > > segfaulted. > > >=20 > > > If you need more information, please don't hesitate to ask. =20 > >=20 > > will do. =20 >=20 > Here you go. >=20 > Is this anything special you are trying to build or is a simple >=20 > 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, >=20 > tglx Kind regards Lars --Sig_/SwZwVDr03cVYTyCv4N1aRI. Content-Type: application/pgp-signature Content-Description: Digitale Signatur von OpenPGP -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEWCOBmo8i7LhvVmNAVx3S0DQ8YDkFAlpM2vwACgkQVx3S0DQ8 YDmKJg/7BOu7LQ0qqEGtfym/W8jPy0WMSVqo2xhxlVsaZHym/bi8v1OwcL+4+boZ lRI/15ri3JwDwOwT5mb7nPZJ8gZkXu9GO/AI9Xt8YAjQkBGel41UuNwxE5IphSiw jDfoQDWjnBeIIrP/jr2tk1wsExpFBHwK38bgqg+1b8kyvRIS3EVmk+YHNLJeNhJF T9pv5ZNG49kxc7s6CouKDguqYJqDt2mF5nlY9jR9+xuGu9A2/yBDOdIyftz9LTBS VMj1VMEq/rgvRejoZNSc59CACg6+hzJHn60OesZgeaYRUXMP5ymTyVjU/oS6X+ml 3albe+wBDmSpcPskdpzHaGdzSmIh7jEx5qmUg19wEymhBGBD3aod7RFk4WtSknLX 6OdaCvdb2nNdmX+Z5thUMY2HI/IHs0+hgixguEDhoZ7ihrS4bZyvNNTpITf7gX1S F0l2Np1lP+mle3eSTeIOIip3IomqAU8/u399YCsE9eFJ2P0gKKX0rBdDWtSnXnOG i8kXkSgvpFjE9954hlv3Ezty7ngWHBn97BOFy+u1ZrQRj9Eoo5YcntxqJLk4VECi gX2MLlLWbF1Wf5ZhtLIb4Fy0PqQznY9nXoSJijTlyrSltaSWheqfH0qBKQLFLhID lVWAJzlOJQ9M3uXK6gOGBKCtJ6/tFn5NV+UBF0pbBf/7cKtWwB0= =Dv40 -----END PGP SIGNATURE----- --Sig_/SwZwVDr03cVYTyCv4N1aRI.--