Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp6231848rwd; Mon, 19 Jun 2023 04:30:59 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ77X86nIgFvinuh0fRONu8bj9NhKdDRSIUwxEFn1D8dtjMzF4ZroXDTr9cJop1K8bfiZNZm X-Received: by 2002:a17:90b:a4f:b0:25e:112c:c5e9 with SMTP id gw15-20020a17090b0a4f00b0025e112cc5e9mr4628741pjb.12.1687174259457; Mon, 19 Jun 2023 04:30:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687174259; cv=none; d=google.com; s=arc-20160816; b=wRYZMVX6Pa1ZRTb5mdUaqVNvdFf61T2GwdC9Op6nJIzIHvTEnSWTABUU/mrVugH9mI o820YV+QbZHvJAU9vlPRlipxebK6aJVPotvBhnzfC6bAE2+ZYQs8o3IjRX5atZt55pY4 WzVNGiAL/+SVLgYDEOeVSpzEEVj78/xZYwADcSA+2tlUbqeES8QelGJ9iz0VC+MOUl4x X9z2vHJUwXYTg+F8n0H7oEhx5qrd2aAO26Gv0/Aq7tCmriZfhB3LSd9F0v7t/ROV3F0R /8Nux9lz5H/J4IiRDki0YjZWdjsVs0zKd3H9uXkL6s/FTV/EEr8W3QdduafpheNarRTr q7vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=d8A11+357CMjIdA0I7MWVkyKH580BF3wESN+YUbxR/0=; b=mue82QEJyw1TpH6AmjN1TKdrnGgPg+zDhE3OTuWlsAk8VrfHAH99pYpljOdSEJIkZ4 VHKbuQ51fWrkA/sPFSINLWkFQ/YexAeRtDmt2PcoV5kytRevWSqLl6PzWwYLfgLdK4Bc vhpk/hQWVZKUAv4Y6qXyMnpKzpmBv5Dm640lMypcngvucN6pMIuw9Gq/TcskHCioeW7i GAAuv+sP4iU+zBPhVEpSd88Tg0VsrWBI13Ltitog9W91U6oxIbrbbudmvmWoYATqxUOT r0/m+hg0JbmFhTnunBvQUGi0Hs8gsLbY71PtVpB5pkmwsN59vI2tSCZc9pyflc210MKi E9rg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="Hn+1/wvG"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n4-20020a170902d2c400b001b3a51a3bd5si6901557plc.290.2023.06.19.04.30.47; Mon, 19 Jun 2023 04:30:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="Hn+1/wvG"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232020AbjFSKn6 (ORCPT + 99 others); Mon, 19 Jun 2023 06:43:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47358 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232021AbjFSKnd (ORCPT ); Mon, 19 Jun 2023 06:43:33 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B0DF410D4 for ; Mon, 19 Jun 2023 03:43:14 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4E65F60670 for ; Mon, 19 Jun 2023 10:43:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BEBACC433C0; Mon, 19 Jun 2023 10:43:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1687171393; bh=rNx4yQtapdMWkWm5zVEcQQCg/oEtXvyrJkwZzYmhLMI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Hn+1/wvGz2kQ1r0hnhWdxirc86Sqru5w3MekuU6rUZ+4/Gcmt/r0tZ89hivcN9xaH TQv6AbHl70ydTw90wFcaClp5SY8gjVvshRn1ckkE2AITSLlWb62PLKx8tRA9ZG3BOM uWLdqmc0ecPxVEYqgFHJy6ZClpskfB9cm42eta3uMbWMFehAsN+zR8vUdAEmNLA7Kw vg/Mhe3TS0qD24tTgWylMHrB/swXlxbtwTgszTSfgR0RgAvTxiUF328YZ2CnekzEr4 QM6Zk0z2DsdHryzESshDBzuAFEly9wz/wE+COiKMsmLKbHf0IlNMSQT3CCdFgdZ+gy i3NgQVKYQ/1Pg== Date: Mon, 19 Jun 2023 11:43:08 +0100 From: Lee Jones To: dave.hansen@linux.intel.com, luto@kernel.org, peterz@infradead.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, x86@kernel.org, hpa@zytor.com, linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/1] x86/mm/KASLR: Store pud_page_tramp into entry rather than page Message-ID: <20230619104308.GC1472962@google.com> References: <20230614163859.924309-1-lee@kernel.org> <20230614163859.924309-2-lee@kernel.org> <20230616170027.GM3635807@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230616170027.GM3635807@google.com> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 16 Jun 2023, Lee Jones wrote: > On Wed, 14 Jun 2023, Lee Jones wrote: > > > set_pgd() expects to be passed whole pages to operate on, whereas > > trampoline_pgd_entry is, as the name suggests, an entry. The > > ramifications for using set_pgd() here are that the following thread of > > execution will not only place the suggested value into the > > trampoline_pgd_entry (8-Byte globally stored [.bss]) variable, PTI will > > also attempt to replicate that value into the non-existent neighboring > > user page (located +4k away), leading to the corruption of other global > > [.bss] stored variables. > > > > Suggested-by: Dave Hansen > > Signed-off-by: Lee Jones > > --- > > arch/x86/mm/kaslr.c | 8 ++++---- > > 1 file changed, 4 insertions(+), 4 deletions(-) > > Is there any more you need from me at this point? > > Would you like me to resubmit with the Fixes: tag applied, or is > someone happy to apply it on merge? Superstar, thanks Dave. -- Lee Jones [李琼斯]