Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp4922758pxb; Tue, 5 Oct 2021 13:23:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw47Yev7QgytJ7PmoTZ9xA94INpzpJZe1i3jrHvLP/h7xs6OhFK+XZ+0hioEWcOzDwPOVKv X-Received: by 2002:a17:90b:388a:: with SMTP id mu10mr6241230pjb.0.1633465410524; Tue, 05 Oct 2021 13:23:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633465410; cv=none; d=google.com; s=arc-20160816; b=QyZ7S+P/V30XNoeOMhOCLG8kHPT6OLDHfclEvfnzX7L+Sr5iAa5Hv5FSMvJd/oMa+Q Fl/evsqMBjvwTNsd5kOQ/4GbfIk1SJj+ET8ycXDUUXTsWatf3+Ck73ms0CT87YDoUgIa UWYw84zQpOtEcLaaMgFNLNR7h3EEmbv+ID43lnM9gpAKC8WddJVWwmh74mjwI27U9yLt 3Ew6fnVYbNPb4Ou+skGCH0qSJ6W19jFNOaGYAyVT8fCGqj5ijr/KGTEnzJtvLB0LTkOd wQaWA0eMRjcQqAl9hhqPShirLrmIy/ZjqvBrufaFii2qvaI7RDsHy4cDLnhYAPSiI3mq UgKQ== 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=pkWw02S1GzmyKKu8izkPkaiuAJwfLFlPVE9ao+BtAv0=; b=ezjB0I5wL7zgYqeRcuOi3r6CgS0ak2qNrVb3C/DjKoyNz5DskgeDm8gqwOp5rtC3fy NSlsHnMaY+d5REj6Vy4JdyxHdkohwtpHft4Cx4H2c+BCSCVBDscj5dl4u1ZOmzQ09Rda Intvd7DiweaYhOjVK8FmtQPh/e0JXTPuABn1Gxqr/ho8orMmpB34ep0RI+eehBtX3oX9 HJ7KVpnbJ5F7TODhcUDukiP3hBCGjJJjXdZCWCXI1gpNsuemrbmiLbItt50Oa2I0YI2R hvm2kcj3b5k3EXclj8fe2A/YjDwhROXP5JfkS60EpkjgI/tL0OwkkK+Ef47e1QCx7sld L0JQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=XERVEiBv; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n13si23582330pgj.194.2021.10.05.13.23.04; Tue, 05 Oct 2021 13:23:30 -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=@redhat.com header.s=mimecast20190719 header.b=XERVEiBv; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235976AbhJEUXo (ORCPT + 99 others); Tue, 5 Oct 2021 16:23:44 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:42321 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235947AbhJEUXn (ORCPT ); Tue, 5 Oct 2021 16:23:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1633465311; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pkWw02S1GzmyKKu8izkPkaiuAJwfLFlPVE9ao+BtAv0=; b=XERVEiBvubH7+WqK2kwzHNWSPKEEc9j9rZLUoT7tbWkGiOVp7DCCE4iSP+J8YW0UrrgOMn 6fXRmQwmmYBuGE1VJ1cUu5aeACps3/V++YF++QlTjGhGSmN/YJlGQBZqfv/kXUwWcAN/tg cNLLLFtShPmhf1ixEcrSpgKR/PC+QaE= Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-347-fFiVlLh-OFCmKU09BWSXWA-1; Tue, 05 Oct 2021 16:21:50 -0400 X-MC-Unique: fFiVlLh-OFCmKU09BWSXWA-1 Received: by mail-qk1-f200.google.com with SMTP id m1-20020a05620a290100b0045e5e0b11e6so125566qkp.23 for ; Tue, 05 Oct 2021 13:21:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=pkWw02S1GzmyKKu8izkPkaiuAJwfLFlPVE9ao+BtAv0=; b=kPot0onsxdkjryTVTA0J/lmWDHQLnkDUWEYc9QskjeKlSZWbbhqvJK452hZyDCZRA1 z3+XsH8aXx6RJadMhaj/8b1Y0dKxzcANtsERGoE0pr5BSRYdoZte63PXLrhnwp2USllI IJY+T9lLW7KxsxNJzBUYYrQagPNQSSs1xw/YZFY0B9ckcV9GPeh22re+F3DjILjmRL48 6epTCybpF3Ez5lKX+y08EA0JBC+lPGjzqg0VvBTWiDm7T10gDIQ13qtEhdJ3a33w2Jr2 U4kSm+lePPVeqUjqFOZcPjjzqP0BF9eSnDe2IPMIZbj05fSEfmGEcdx2O42ai9tywk1o k4VQ== X-Gm-Message-State: AOAM530vJkpcSaSWbPdSpQktzHjb6G779na7gNYUmdi/g2db2QL/BB96 gSjkOjCsR9PSf16D/hzPhqBQEM6q4tmS/wE0ZDtifRdWKbyiGPi6XnNGvdUEI/DqmZD2ix88eL9 iHQmD5QLk5hT+o18TY6xj75gB X-Received: by 2002:a37:e93:: with SMTP id 141mr16428894qko.132.1633465310327; Tue, 05 Oct 2021 13:21:50 -0700 (PDT) X-Received: by 2002:a37:e93:: with SMTP id 141mr16428875qko.132.1633465310109; Tue, 05 Oct 2021 13:21:50 -0700 (PDT) Received: from treble ([2600:1700:6e32:6c00::15]) by smtp.gmail.com with ESMTPSA id r19sm1012176qtc.55.2021.10.05.13.21.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Oct 2021 13:21:49 -0700 (PDT) Date: Tue, 5 Oct 2021 13:21:46 -0700 From: Josh Poimboeuf To: Borislav Petkov Cc: "Kuppuswamy, Sathyanarayanan" , Sathyanarayanan Kuppuswamy Natarajan , Randy Dunlap , Thomas Gleixner , Ingo Molnar , x86@kernel.org, Paolo Bonzini , David Hildenbrand , Andrea Arcangeli , Juergen Gross , Deep Shah , VMware Inc , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , Peter H Anvin , Dave Hansen , Tony Luck , Dan Williams , Andi Kleen , Kirill Shutemov , Sean Christopherson , Linux Kernel Mailing List Subject: Re: [PATCH v8 02/11] x86/tdx: Introduce INTEL_TDX_GUEST config option Message-ID: <20211005202146.s3ptxhabwyz3nacm@treble> References: <20211005025205.1784480-1-sathyanarayanan.kuppuswamy@linux.intel.com> <20211005025205.1784480-3-sathyanarayanan.kuppuswamy@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 05, 2021 at 07:29:12PM +0200, Borislav Petkov wrote: > On Tue, Oct 05, 2021 at 07:48:25AM -0700, Kuppuswamy, Sathyanarayanan wrote: > > Since x2APIC will always exist in TDX guest case, we have used select to > > enable the support. But since we have dependency on it, I think "depends" > > might be a better choice. > > Right, and while we're on the subject, this looks silly to me too: > > + depends on SECURITY > ... > + select SECURITY_LOCKDOWN_LSM > > because > > Symbol: SECURITY_LOCKDOWN_LSM [=n] > │ Type : bool > │ Defined at security/lockdown/Kconfig:1 > │ Prompt: Basic module for enforcing kernel lockdown > │ Depends on: SECURITY [=n] > ^^^^^^^^^ > > so that symbol already depends on SECURITY. > > And I have SECURITY=n in my config so I still have to go select SECURITY > by hand so that CONFIG_INTEL_TDX_GUEST becomes visible. And when I > select it, SECURITY_LOCKDOWN_LSM gets enabled too. > > But since I have to go select SECURITY, I can just as well enable > SECURITY_LOCKDOWN_LSM in order to have TDX guest support. > > IOW, I don't see the point for the evil "select"s - just make everything > depends on and be done with it. > > Unless there's an aspect I'm missing... It would also be helpful to explain the dependencies (particularly X86_X2APIC and SECURITY_LOCKDOWN_LSM) in the commit message. -- Josh