Return-Path: Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:59632 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753616AbeAHWGw (ORCPT ); Mon, 8 Jan 2018 17:06:52 -0500 Message-ID: <1515449196.13978.58.camel@decadent.org.uk> Subject: Re: [kaiser-discuss] KPTI backport to 3.16 From: Ben Hutchings To: Juerg Haefliger , stable Date: Mon, 08 Jan 2018 22:06:36 +0000 In-Reply-To: References: <1515368108.13978.37.camel@decadent.org.uk> <1515443976.13978.53.camel@decadent.org.uk> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-7lMHAUZi4Wwtj8r2QsdW" Mime-Version: 1.0 Sender: stable-owner@vger.kernel.org List-ID: --=-7lMHAUZi4Wwtj8r2QsdW Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, 2018-01-08 at 22:13 +0100, Juerg Haefliger wrote: >=20 > On 01/08/2018 09:39 PM, Ben Hutchings wrote: > > On Mon, 2018-01-08 at 08:10 +0100, Juerg Haefliger wrote: > > > Ben, > > >=20 > > > On 01/08/2018 12:35 AM, Ben Hutchings wrote: > > > > I have a backport of KPTI/KAISER to 3.16, based on Hugh Dickins's w= ork > > > > for 3.18, some upstream changes between 3.16 and 3.18, and other > > > > patches that went into 4.4.75. > > > >=20 > > > > I sent this out for review on the stable list after quite minimal > > > > testing, but have done more since then. On bare metal (Sandy Bridg= e, > > > > with pcid but not invpcid) it crashes at boot. In fact it > > > > reboots without any panic message, suggesting a triple fault, as so= on > > > > as I apply the patch that turns on CR4.PCIDE, i.e. without KPTI its= elf. > > >=20 > > > I've seen this as well with my 3.13 tree. As soon as PCID is set on t= he > > > first (non-boot) CPU, the kernel reboots. Note that it seems to work > > > fine with maxcpus=3D1. > >=20 > > I see, this makes sense. > >=20 > > > I've checked the other versions, your 3.2 doesn't have this issue and > > > Hugh's 3.18 doesn't have it either. After some bisecting, I found tha= t > > > the problem was introduced in 3.15 by: > > > cda846f101fb ('x86, realmode: read cr4 and EFER from kernel for 64-bi= t > > > trampoline') > > > and then later fixed again in 4.0 by: > > > 375074cc736a ('x86: Clean up cr4 manipulation') > >=20 > > Thanks! This plus obvious changes to the patches using > > {clear,set}_in_cr4() gets me a kernel that boots on the SNB system. >=20 > Do you have debs I could run some tests against? [...] Here you go: https://www.decadent.org.uk/ben/tmp/linux-image-3.16.53-rc2_3.16.53-rc2-53_= amd64.deb Ben. --=20 Ben Hutchings This sentence contradicts itself - no actually it doesn't. --=-7lMHAUZi4Wwtj8r2QsdW Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEErCspvTSmr92z9o8157/I7JWGEQkFAlpT62wACgkQ57/I7JWG EQkWGBAAyvbSN3Q4L19KBI07XuBpdhTCGIUyhOJEUjiOcwBZhzdf6+07ufCBwAM7 xEtREN7buY6wQCvUGirOCsG+VwIFsw/EXn+P3pXsytBJwBcAWkP7x+KjwIxsojql l48Y/rYsn+PJKRnIBY15t4JozK2fF7fFgeogrk8XXRujqH9RJaMZtUPZpCjlgSWx o5G9NY8popkysuambAYVxdTg9DMK/R31/pPLPOTg4D9VmixH9S8plvdnXjuRi0xK HQRvY4dHMWQblqmKaJ/kSRz/gripXXSeS6mICMRGS0YQZQ8mLEclUCyKED/n46PN HK6vjM39WNr080OL3l62DxasTHSsG+CUeSPEm7KdltuUZAJalWgSwXA0JBZejjZZ 7M8jBJXM2Mpmlr/aE6KF7Q4wC5I+CI5leWpcXzXlbl8P3Uo0/VE1H9pqImcdTHt5 aXKVkkiZKJDwKGvVBUOtw9kd6SBM7aQemoDgFZiA/eKqssgVp415CEQnIw+9UeJ9 t6AK7g8FleC0RRQNGZArJZG72EJo17sreVIzDKBXmfSlvTMymwE7N90NWVAslENh xgxTASyYS/Uyqop4AU/D8z3YV3E2EYf9F0Q/ED3taeKygcwAPl9HsXj8UNcBbKVQ KLWj88xynsEOT6VICOvj4jf9eh6IVJkPUsp2ZrP9viggX/zGKM4= =/yf9 -----END PGP SIGNATURE----- --=-7lMHAUZi4Wwtj8r2QsdW--