Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp78905ybh; Tue, 14 Jul 2020 18:31:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxgLPfQZ5vgI2+ZuVV2ucR/ACu19z1nmh8o3Dc4DtK55n6ec2vLqb3ZiGPO4ujL8IQOVcv6 X-Received: by 2002:a17:906:4a45:: with SMTP id a5mr6915389ejv.384.1594776692745; Tue, 14 Jul 2020 18:31:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594776692; cv=none; d=google.com; s=arc-20160816; b=IcTvsmcqGEW7DKMs8+CrB65hH/Q0KY7LprUfuorTcZaSxSIeuzSvgoWzZ7kmRqMSiL uCot/3qWcn1ZjFcmYKTuoeyLzUIGbCRQJyobz/Ss93N/Gonw+VNzjet/3PSYZP+Bs35k d4sZD9R519uPePDPyATBtzFzpotJZLWm0S6+qLoRMDpAhdeGfvlJX57Zq6Y4ppR2BBMi xDPjPZcJrM/UZmsCNGsCuwzsone+pH0+c0Ib3YOiG4OcO/F91NP2gK3PFdehDaFR+8xN RqSja6FprDKfZHTRd4kz2uIu4AbPA2RpHZLXOG8p1mZ+/1tNfqEZ9w8vPUo8cizTGX0K im7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=//8Ju0FArBc4zb01MxBoUcI/VYVDSlzg+BW3vSvSIkE=; b=Zge4DvU3ohHbuXFECimesy4hgSZghS9Wsx2i9l5//lFuzNn6cmgTkXhW5yrQnliIiF VD2NxBIbj4j6BRlOB1nGp4BAlZ+WqJF3o8Jbo1hTFRq81OWbjDDmoVGC8Jng9jN41zWM xfcwv+wAgkZViZw+1ieeOh1XiVUjxtFEn2f7gnRheC2TsnafinMrNtYJm/vtTdD8m4Nd 3ozFvPcXB0H71PrZ1lASQwwcSo7UQh40Y7MRFNJ2z0JnuR99o230TqONbJHU7y70nFgX 3aYfdUle9lDAqMX+VxS9sulqZ6sG4u7lD5hVB+ZeNhj7EbN1et+Mu5UMN0byIEdRgxTj ljJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=aGa5ZBgH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g15si295938edm.229.2020.07.14.18.31.10; Tue, 14 Jul 2020 18:31:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=aGa5ZBgH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728001AbgGOB0B (ORCPT + 99 others); Tue, 14 Jul 2020 21:26:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43620 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726356AbgGOB0A (ORCPT ); Tue, 14 Jul 2020 21:26:00 -0400 Received: from mail-pf1-x441.google.com (mail-pf1-x441.google.com [IPv6:2607:f8b0:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B0EDC061755 for ; Tue, 14 Jul 2020 18:26:00 -0700 (PDT) Received: by mail-pf1-x441.google.com with SMTP id s26so672622pfm.4 for ; Tue, 14 Jul 2020 18:26:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=//8Ju0FArBc4zb01MxBoUcI/VYVDSlzg+BW3vSvSIkE=; b=aGa5ZBgHdWlGrdfvyqG//oW9uMRL8c4lif5pE5f9n31J0nGMfTfTLdQH8s0aTTbj5E XseYVdFj/m/ggc4SYgZzFFvS4yWNkLyoDsxCgYX3tfj9qjanEQCxrddTm1aZfG0VbwNO xgWTY5KoMFbPTRNg4DxovW5nmKheMJSQTsCOE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=//8Ju0FArBc4zb01MxBoUcI/VYVDSlzg+BW3vSvSIkE=; b=nzAP7CFZe4se+g2hBiPra58z3H/8WLh/GHAlZnTXRYhHmib7MxJXMM6mi8S1mDdnCs DlNKzlLnda4Ynp+7zdLpXUezRNXaUR3afOF3HKz4zkA8MNV72uGd9tZ0ck3AgrZjYKfn RLqbYdNRIGcPql9dWvdHcFo353HuvfhU+qbknQMadEslh7CyclTB+PRO7AJQFxQj6Bmw AV9XOKb8i9bca/6nL7atbRpj1p/pAKrpoIHMxSVnwHEv2NGrb3AK5H6jV4kiCw4SVwWz UWMWFndTZ639kTvNyoPcb/+e78gxyU290NAdppjo+07Tfey9yYzutfGcXeLYtwJiBHx+ GNtw== X-Gm-Message-State: AOAM530rpC5+vzBHFA/k5NA4PNt6wXP1RrK4U1bf7hesG4r9QBYom00L zFi1MMbAk3XYbdGEpsA2dS69dg== X-Received: by 2002:a63:5004:: with SMTP id e4mr5816911pgb.208.1594776360077; Tue, 14 Jul 2020 18:26:00 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id l23sm246555pjy.45.2020.07.14.18.25.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jul 2020 18:25:59 -0700 (PDT) Date: Tue, 14 Jul 2020 18:25:58 -0700 From: Kees Cook To: Joerg Roedel Cc: x86@kernel.org, Joerg Roedel , hpa@zytor.com, Andy Lutomirski , Dave Hansen , Peter Zijlstra , Jiri Slaby , Dan Williams , Tom Lendacky , Juergen Gross , David Rientjes , Cfir Cohen , Erdem Aktas , Masami Hiramatsu , Mike Stunes , Sean Christopherson , Martin Radev , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, virtualization@lists.linux-foundation.org Subject: Re: [PATCH v4 27/75] x86/idt: Move IDT to data segment Message-ID: <202007141825.7A90799@keescook> References: <20200714120917.11253-1-joro@8bytes.org> <20200714120917.11253-28-joro@8bytes.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200714120917.11253-28-joro@8bytes.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 14, 2020 at 02:08:29PM +0200, Joerg Roedel wrote: > From: Joerg Roedel > > With SEV-ES, exception handling is needed very early, even before the > kernel has cleared the bss segment. In order to prevent clearing the > currently used IDT, move the IDT to the data segment. > > Signed-off-by: Joerg Roedel Reviewed-by: Kees Cook -- Kees Cook