Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp2516804rdb; Mon, 12 Feb 2024 07:24:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IFT7RF7vFBQbmi5q7e0GBYC0fo+W+1irxm8M6nEjuxHeMwVy/d0/XePq8KeKzIf/jZcx22X X-Received: by 2002:a05:6358:1212:b0:178:72c6:a3c5 with SMTP id h18-20020a056358121200b0017872c6a3c5mr8736150rwi.25.1707751454765; Mon, 12 Feb 2024 07:24:14 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707751454; cv=pass; d=google.com; s=arc-20160816; b=rQ9cMXNvAkywjD6DAVw55nBSm+AnWdyEj8CQoMiQ3ioGFh13SdBeFCDv43g5dOBKtp 8wdxtytB6ty8+KfPwOp8tyMF/pa55SkcRRWgs3NB4zBjZ0U8FslE19tFKzALGg9E/bSh WPLxqXdU2pC9+Yf3KFYMMXanPZqdMrbg98IKhkL/yt+jxp+Waa3m/9GzcSM0FiLxcPYv weYLkYmfYsbABXS0YzV5Ok7heBAgqexMwM7lGW5qjZWc3KNvJFEppBeR6P2AKb4hfaUp Qr1yULwvBxOpeY6WDhpQJ2Yqs57x4tdPWTOKbmXPbLLKuPzTLKgUQyq5psrJuw1MohJh 1XHw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=KsEb0BbBVcQ2IXh7aH2dFddVGrsblbhtwI9qnd0N/JI=; fh=WhPzjwtjFvRl5n5/+gzwJSxSmxtPnELZIpCxe5nojaI=; b=nWv1rbGtd5s6Xe7+x4P5aSdpHXGjo+zjdswucuGXj7O4dkK3KDHnVa9AI1t7YTM+wd vrkmWPKMswwZHijvov4ZJezIJ5tzL56/a3y3TJW3OOxNLGDYiPY9Qj0Z4LxQWT8XZOZJ d8emw0ZvCuTKhoa5XRJJNlKdFkRVErBxXBV7avaEpUlnn2X0ZM4qs8Smvz8tgmKlxiVS amtpQmk55xwKGdlzBALthDIwEBgmFjpdsQvWPpF6AJwc6YSYA8inj8Pbol48N313q2ny 0POX+RyQWDWabBDlU6xscn/yDlJhQaPKllZPtPY7lpJgwW4cpjOKkNyYF5c8iLaBQpVh ZIYg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Pb7TQuAh; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-61888-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61888-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=2; AJvYcCXO6K4OGM/9eA7u0BKEc3i4z/8bE628Byduge3V7f+OIJM8nhsSGBddi9/B87dUUM6m+AUUi//1Tr4VjG3D37dWe7602c9nYqldXcfrPw== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id u9-20020a0562141c0900b0068cb5578ae0si584090qvc.265.2024.02.12.07.24.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 07:24:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-61888-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Pb7TQuAh; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-61888-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61888-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 826541C21B7F for ; Mon, 12 Feb 2024 15:24:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7A9E03CF4C; Mon, 12 Feb 2024 15:24:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Pb7TQuAh" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9BEF23C694; Mon, 12 Feb 2024 15:24:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707751446; cv=none; b=Jb5Q8xUZcF+role7K2rTTwm5HOMwiRSvH4bhR0SQvstc4I97qrJ82OrKJ1R5SQRec+047QqZIi7YNfB0J375/kDd1z0mgNLC2e7QKBSsuiPXnPU3IeXqkPARFQe6C+jlKEqDXZUprPSeo7uHBInBU0OfAf1nMTU1d9m5cW6wiJo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707751446; c=relaxed/simple; bh=WWUVJAhmle29IPDO4RHpaZbuj8n80ec/lO+P4P9s3sU=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=n1nV2cHLeQjZ7N3rXCY/kROOG3K1V4vsOqSKdDcRW9aZ9NlW0x2olqg9Im2dJ5msbFiZCcMbyc+YBkL14GsAoBsv+/weDsg14z17xGFebMs1Q7neV/IZ94b84MQr1ac7++yzfcTX3BvUDIrIONkTkP5sAjrv+Tl/WS2DFOLaAKI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Pb7TQuAh; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3341CC43399; Mon, 12 Feb 2024 15:24:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707751446; bh=WWUVJAhmle29IPDO4RHpaZbuj8n80ec/lO+P4P9s3sU=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=Pb7TQuAh5LA2V0Z1dQbw1kV4UTkB48nJHh5Z7sC/btLGtAe5e9A1pMVEDYkxshldY VguzMoWcI2M+N3bbvhtS0dLP0+pHzaSiK7F5dgAQi64/pCfVQStkqtzAhzavXURgB2 wtzkzz6aXMms0If8UyhaF9f3mod0RbGSfQxQ7+cvkiAg8jXcUU3cE7fVyqZTaIsKFO WRrZWf0UTZqwRyiDk7e0O+S2eWYsmJ5KY8uo4DRj9vpeHoaXtn0DWmIYcLp61Vt5Nu dPWJatH+M8jGWtmsL+qLgUPbKcJd2c72qZbpk40uV4GlarsmD6LwUHeg8LB7CeuoWj 6U0pLrcxB2mNw== Received: by mail-lf1-f53.google.com with SMTP id 2adb3069b0e04-511490772f6so4043318e87.2; Mon, 12 Feb 2024 07:24:06 -0800 (PST) X-Gm-Message-State: AOJu0YzQpL+F1BfV8Yavm1AFPSbEqdcU5Bdv2ySK/VuRH2QQwAMCVERT US8HufFcuJA5TjkTchpoQGTYiTFeZ8uudz6/bIvd+Qou8gO58VVeD1qsxdI4o/rmpOfRTVKXVeb piiVkQXSG3EZ0/V+wR9jKOOV0T8w= X-Received: by 2002:a05:6512:238d:b0:511:81ed:1a53 with SMTP id c13-20020a056512238d00b0051181ed1a53mr5043463lfv.42.1707751444365; Mon, 12 Feb 2024 07:24:04 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240129180502.4069817-21-ardb+git@google.com> <20240129180502.4069817-30-ardb+git@google.com> <20240212143717.GWZcotHRH-8a3x1gTH@fat_crate.local> In-Reply-To: <20240212143717.GWZcotHRH-8a3x1gTH@fat_crate.local> From: Ard Biesheuvel Date: Mon, 12 Feb 2024 16:23:53 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3 09/19] x86/head64: Simplify GDT/IDT initialization code To: Borislav Petkov Cc: Ard Biesheuvel , linux-kernel@vger.kernel.org, Kevin Loughlin , Tom Lendacky , Dionna Glaze , Thomas Gleixner , Ingo Molnar , Dave Hansen , Andy Lutomirski , Arnd Bergmann , Nathan Chancellor , Nick Desaulniers , Justin Stitt , Kees Cook , Brian Gerst , linux-arch@vger.kernel.org, llvm@lists.linux.dev Content-Type: text/plain; charset="UTF-8" On Mon, 12 Feb 2024 at 15:37, Borislav Petkov wrote: > > On Mon, Jan 29, 2024 at 07:05:12PM +0100, Ard Biesheuvel wrote: > > From: Ard Biesheuvel > > > > There used to be two separate code paths for programming the IDT early: > > one that was called via the 1:1 mapping, and one via the kernel virtual > > mapping, where the former used explicit pointer fixups to obtain 1:1 > > mapped addresses. > > > > That distinction is now gone so the GDT/IDT init code can be unified and > > simplified accordingly. > > > > Signed-off-by: Ard Biesheuvel > > --- > > arch/x86/kernel/head64.c | 57 +++++++------------- > > 1 file changed, 18 insertions(+), 39 deletions(-) > > Ok, I don't see anything wrong here and since this one is the last of > the cleanup, lemme stop here so that you can send a new revision. We can > deal with whether we want .pi.text later. > OK. I'll have the next rev out shortly, thanks.