Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp78437ybh; Tue, 14 Jul 2020 18:30:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzHwVtJPwmQIFWC843af4nCrRoir2C/QsadP11w4HrAwNVf6EbK2rZ6MjYmVdaH2SBUZNBL X-Received: by 2002:a05:6402:b99:: with SMTP id cf25mr6969013edb.291.1594776639733; Tue, 14 Jul 2020 18:30:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594776639; cv=none; d=google.com; s=arc-20160816; b=m8NXlTMxKRO7XfoarnXfRSALGOG2cyOmSuM2hTjZrvk4gtmP25Ks/CRaevxrN23EzG oYhj3PdZ1963ZzEYrujBPINkCj4Y0rwtBUK8gLJsvmPpqDZDfpC9zgHDAXzj7gUHrv8N WYYpE3wCL9YtclhIivd3ZA4kF9sHC4hXjjhxLNbgygCmcFS244dDnmFyy2UEn5I8nJiO nc7/dMWK/JkeVdA7otFZlG1cxrxgSPXh/dWoeTAeWVKWxOVCpBjRHnWQwFf+UNEwLiKl ILu3p4UR65BoVCp5doLEEFhSrVed/Hx3hLmTZfM1435fkRPpF518Dd4r+nLB7oqwEh1V IUhw== 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=QcW6VJ7a6fNZ0PIZsgk18a6NvkkANLMdBx3aJx5n2P8=; b=sdIL9byLisE30pDUG6TlWW9MDHPexjqH2+oN0Tym664PLfMNy84T8kNedk7prlpaul 5LcLsxsaCtYQ2iXZBnV4kw8cT8y3+08SuhxJFubbAbEJnoDFTB55CElHitVELPIY/jKw 8FkZ065In+9udYvnjiXzb2XJjYlvm/Cf4V8qcs2L66Nm8pssvL5ns3wVcmKYBYGTQ0db i42nvU+LJKAI+ZWwdhGTJKrIKWp8NPe37TB9Czh5clntaYI+Or7yO5Mf60SNu8U8agbo 6R0BpAjhfksaeqZh1WL/3uDclB+WAhO5X3W5G+YbaJiaYdIWDAoRbPfzJ4NUqClWMgZ4 ipdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=LermMRMB; 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 e13si345012ejc.215.2020.07.14.18.30.17; Tue, 14 Jul 2020 18:30:39 -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=LermMRMB; 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 S1727114AbgGOB0e (ORCPT + 99 others); Tue, 14 Jul 2020 21:26:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43710 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726609AbgGOB0d (ORCPT ); Tue, 14 Jul 2020 21:26:33 -0400 Received: from mail-pl1-x643.google.com (mail-pl1-x643.google.com [IPv6:2607:f8b0:4864:20::643]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9DEE7C061794 for ; Tue, 14 Jul 2020 18:26:33 -0700 (PDT) Received: by mail-pl1-x643.google.com with SMTP id k4so711506pld.12 for ; Tue, 14 Jul 2020 18:26:33 -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=QcW6VJ7a6fNZ0PIZsgk18a6NvkkANLMdBx3aJx5n2P8=; b=LermMRMBuE4iPiQWchn6+Y5pFfVd5MDVGRmaF3jnjgwTdKR/jyEitX2LJuReMi4mm9 72HL0CcXQKM56+FAnZYuVZPmiR/qQ66O5ltrce83lFbfsyOoE/4E5/KWjnK6n0t8DbHo ObrL33Mhy4WP8s4TGuuj8FnCo23Gl7p8aCzuM= 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=QcW6VJ7a6fNZ0PIZsgk18a6NvkkANLMdBx3aJx5n2P8=; b=QmdPHH3y1j2QnWsxbdyG2W12/V+nI7xSTEkv74ZdM4up10OCYJHJyWTcGEgmX033Wo YxliSgldC1fi4Z+WjWjHFRta1n9Gbz+CTUnPN06SLq96fYnhZNoUR5e3uyxA8J5DT97N gB9Swk+nmdPVRgcNZagpFG7aG32PdhirWd5am6wdGliFTVI05dAzQtemmZP1HOkkL443 LGH8YncImzB5M5vllBR7zh4unu6EHtH/6EMkc2zdZRgTkwmf9EOm/IJ2wMoS3aLKij5p RN+BZ15GdgAKeL9ybYVd53okSpJMY64Uf3w2Fb06eLRrvrgxWBbVCg1MfUMA5nA07cXl gPQw== X-Gm-Message-State: AOAM530qfGbzwGFlbTmlvDb/Q9grka09IGYyFTpyxM0vBlFYzw7eNuHp iYAdVkCFKd7bPAe4rvSoVdJIkw== X-Received: by 2002:a17:90a:2e85:: with SMTP id r5mr7576594pjd.232.1594776393220; Tue, 14 Jul 2020 18:26:33 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id cl17sm250287pjb.50.2020.07.14.18.26.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jul 2020 18:26:32 -0700 (PDT) Date: Tue, 14 Jul 2020 18:26:31 -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 28/75] x86/idt: Split idt_data setup out of set_intr_gate() Message-ID: <202007141826.8BA5C1E@keescook> References: <20200714120917.11253-1-joro@8bytes.org> <20200714120917.11253-29-joro@8bytes.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200714120917.11253-29-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:30PM +0200, Joerg Roedel wrote: > From: Joerg Roedel > > The code to setup idt_data is needed for early exception handling, but > set_intr_gate() can't be used that early because it has pv-ops in its > code path, which don't work that early. > > Split out the idt_data initialization part from set_intr_gate() so > that it can be used separatly. > > Signed-off-by: Joerg Roedel Reviewed-by: Kees Cook -- Kees Cook