From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E1CA6CDB474 for ; Tue, 17 Oct 2023 17:10:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234913AbjJQRKc (ORCPT ); Tue, 17 Oct 2023 13:10:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38816 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235057AbjJQRKZ (ORCPT ); Tue, 17 Oct 2023 13:10:25 -0400 Received: from mail.zytor.com (unknown [IPv6:2607:7c80:54:3::138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C659AB for ; Tue, 17 Oct 2023 10:10:21 -0700 (PDT) Received: from [IPv6:::1] ([172.58.89.53]) (authenticated bits=0) by mail.zytor.com (8.17.1/8.17.1) with ESMTPSA id 39HH9EBK4087569 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NO); Tue, 17 Oct 2023 10:09:27 -0700 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.zytor.com 39HH9EBK4087569 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com; s=2023101201; t=1697562573; bh=/v3M2x69Cr/SCf4Q5j/CgswfLfSC36REEd2JtW8+rsY=; h=Date:From:To:CC:Subject:In-Reply-To:References:From; b=nt5K9f+n2RZ0ct4/NQNT/SUbkrZivO2I9s8PW339u6rORZa3AcFBVibLlKA1p0OMv QVZSTJw+97unO5TyUc4Moj9PmvdIk8zKQucF/+mAsLHf6jVvxxCbY99qkWjyHB2VR0 dcHYB765eSFED01+Mndkw+ej8cEu2RHJNXdRorRt5AeeYMa62zDVTicP7ivEyUYYR5 DOKF1xH0snkGtJLWjdSA9+YaGdj7LToAJ4LIveoqbMqhuUs77TvlnqTvIxlPHTZfxZ lti/5Z6a2/abF6iCffEuuF7ozA4CkRXdY7MwwbxKiNY8Hl4UVhaAWx2tzxdnTS+62I Ys90ifzIVPJLA== Date: Tue, 17 Oct 2023 09:34:41 -0700 From: "H. Peter Anvin" To: Ingo Molnar , Hou Wenlong CC: linux-kernel@vger.kernel.org, Lai Jiangshan , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "maintainer:X86 ARCHITECTURE 32-BIT AND 64-BIT" , Josh Poimboeuf , Anshuman Khandual , Mike Rapoport , Pasha Tatashin Subject: =?US-ASCII?Q?Re=3A_=5BPATCH_RFC_1/7=5D_x86/head/64=3A_Mark_star?= =?US-ASCII?Q?tup=5Fgdt_and_startup=5Fgdt=5Fdescr_as_=5F=5Finitdata?= User-Agent: K-9 Mail for Android In-Reply-To: References: <20231017072311.GA46993@k08j02272.eu95sqa> Message-ID: <77B66FD0-ED28-4D3F-8D28-467AC4FCD00D@zytor.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On October 17, 2023 6:02:27 AM PDT, Ingo Molnar wrote: > >* Hou Wenlong wrote: > >> Hi Ingo, >>=20 >> I have sent patch #6 separately for x86=2E Do you have any ideas about= =20 >> building the head code as PIE? Should I resend the patchset for the PIE= =20 >> feature? > >So I had a brief look, and despite reading 0/43 it was unclear to me what= =20 >the precise advantages of building as PIE are=2E > >Ie=2E could you please outline: > > - *Exactly* how much PIE based KASLR randomization would gain us in term= s=20 > of randomization granularity and effective number of randomization bit= s,=20 > compared to the current status quo? > > - How is code generation changed at the instruction level - how does=20 > kernel size change and what are the micro-advantages/disadvantages? > > - Are there any other advantages/motivation than improving KASLR? > >Ie=2E before asking us to apply ~50 patches and add a whole new build mod= e=20 >and the maintainance overhead to support it into infinity and beyond, cou= ld=20 >you please offer a better list of pros and cons? > >Thanks, > > Ingo If the goal is better KASLR, then what we really should spend time on was = Kristen Accardi's fgKASLR patches, which not only exponentially(!) increase= s the randomization entrophy but also *actually* avoids the "one leak and i= t's over" problem=2E However, she gave up on it because she got no interest, despite working co= de=2E