Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp79500ybh; Tue, 14 Jul 2020 18:32:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwff9uCukHcPN0da7Jb22zeSPtZvmYdblUsnFmiSEGwyU6uRdHXdoAVPbRg1PqW0SquTK+G X-Received: by 2002:a17:906:fcc7:: with SMTP id qx7mr7273068ejb.182.1594776755545; Tue, 14 Jul 2020 18:32:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594776755; cv=none; d=google.com; s=arc-20160816; b=m9H9TSSyIo3gtXmXE0En2H2K3n6CRp07PKuFuPffbVsrtOe6dTa/9eXKROPWIimk0d mLDK3duY53BooVs8Yz2kD8PzokwLdKDl1MLY/mCeoxGsy4X/BSp4Lb94PAVAEKdzneS2 bwhX/vcEqC0edxq7oHiupX5VuDYP9hkTozjVZMW1EHoymc7yVmoAP3YCiS76Lzt6Op8u g5ZpBXD3TJO0pIVPo/sSk6ZtZl9NJqt6Q5sXUIuoZtJtdz2E6p4/C2YUH9Che0i6necj wvQoouOdIgyoDcZ8gCQq6KIrzC4Yaw94WmHMZj8r3b1ZZ16Gk5U2TgWsMgeeufG8SdVG d9tA== 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=E7jBTUN+q1MFSKfnbOqN34m9kwFSgfqPOQP4XPd3q20=; b=KGpkrswwZXNx7LAUIZtoTOQG2XFVAF2apqXofN7r6ggEwrBP+xkssQtyUvPDjUqWK8 foUEs690GvRVaY0nC8OsFSV+BIR+bxaFi2eDldJai+cIqwthCXwfTAxq6nXbHrCOACE4 AgAMFm51DN5DfuyCWPZSxAFphGL7cYXITMv+5x3G1vnIBjAuWvA2kOwcAsM5nkn283Wl VhvPbtdl3mUtaKNaO9pMc3VmeZeQ8MDYU7yOePmkZWTpV8OBInKG5urdNKzYXAivlxlu mj2L1pC5pfPNIK8aYhP6XR8yLV+sNso9UCsUm1ugZz28Y3UDoA9n+G5pVCPOaqxA96xQ HpVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=TNYBRU3r; 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 e10si318335edq.65.2020.07.14.18.32.11; Tue, 14 Jul 2020 18:32:35 -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=TNYBRU3r; 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 S1727772AbgGOB33 (ORCPT + 99 others); Tue, 14 Jul 2020 21:29:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44152 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726609AbgGOB33 (ORCPT ); Tue, 14 Jul 2020 21:29:29 -0400 Received: from mail-pg1-x541.google.com (mail-pg1-x541.google.com [IPv6:2607:f8b0:4864:20::541]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 370C6C061755 for ; Tue, 14 Jul 2020 18:29:29 -0700 (PDT) Received: by mail-pg1-x541.google.com with SMTP id d4so911441pgk.4 for ; Tue, 14 Jul 2020 18:29:29 -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=E7jBTUN+q1MFSKfnbOqN34m9kwFSgfqPOQP4XPd3q20=; b=TNYBRU3rt8vQTV68BnfmZdJfy3duhGTQeyyt+yRIYHSFoG9BCK31dGBtdbo1N+7tbt hrI79dVb1fe0ntLBKMc4WL1x6kMHbfxRiEDmzwpmQialwoYqiYVbPw6KH1WAcausmpbJ J7PsSsy2KNGZvf69+Tloxy+LXK3NkkzxsHi28= 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=E7jBTUN+q1MFSKfnbOqN34m9kwFSgfqPOQP4XPd3q20=; b=sy6pposLvc958ZZ2TvjnBEziRwogpNgpB7uNFt8pCxt09J7iuiWkkOz7i/rX8o23D1 MfjBqX0e7rtPRBn/F8thYhP1dnHf1RSJINvSpW1Q0vbKGtqx57dhozZWM5Sp5fFiyitI QIsoBYiv1QmOCThdRa/x9dQ0HZSVuOLEnYragtv3ZG5ZyDwsxpvxhLIaKGDUmAlNebZh rRQAIwpiV7zSyKE283sGuTeL10QaNlDpYLSNxmWzYB4nNPqJ1MY8Jlf48Nxvhwikyd6u hrxhAd6et9XPDUsB/s3HnOqNOXwCezO7rhkRX9EVVfTdaCx/c/Wl8/HTHfLoZUiJImA9 z3Ng== X-Gm-Message-State: AOAM532edjKOXW5zUr+XO4RQBv15zGnEjNmy5rS3ptR6OKLj4wab3jXH m/zVIy64xJNZBAYE6lxi4N3aiQ== X-Received: by 2002:a63:308:: with SMTP id 8mr6053673pgd.112.1594776568754; Tue, 14 Jul 2020 18:29:28 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id d37sm311670pgd.18.2020.07.14.18.29.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jul 2020 18:29:27 -0700 (PDT) Date: Tue, 14 Jul 2020 18:29:27 -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 29/75] x86/idt: Move two function from k/idt.c to i/a/desc.h Message-ID: <202007141827.5A5D64454@keescook> References: <20200714120917.11253-1-joro@8bytes.org> <20200714120917.11253-30-joro@8bytes.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200714120917.11253-30-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:31PM +0200, Joerg Roedel wrote: > From: Joerg Roedel I'm not a huge fan of the Subject. :) Maybe: x86/idt: Make IDT init functions static inlines > > Move these two functions from kernel/idt.c to include/asm/desc.h: > > * init_idt_data() > * idt_init_desc() > > These functions are needed to setup IDT entries very early and need to > be called from head64.c. To be usable this early these functions need to > be compiled without instrumentation and the stack-protector feature. > These features need to be kept enabled for kernel/idt.c, so head64.c > must use its own versions. > > Signed-off-by: Joerg Roedel But regardless: Reviewed-by: Kees Cook -- Kees Cook