Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp1754258imw; Tue, 5 Jul 2022 15:02:05 -0700 (PDT) X-Google-Smtp-Source: AGRyM1t5GWoq8OB8zvfcVcxXHzlSBCo8rEA/CHmkNZHhaZjz/FsXOkHYS+qgyIAB1Cd5myoFyxYP X-Received: by 2002:a17:907:9620:b0:722:fc5e:3259 with SMTP id gb32-20020a170907962000b00722fc5e3259mr34243589ejc.579.1657058524732; Tue, 05 Jul 2022 15:02:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657058524; cv=none; d=google.com; s=arc-20160816; b=SxWbtnkogJlG2oSVXxN942QB1luFRIxF2kUgG5/tz16mKYhx38vMhveV8sjmCzAXb0 e5Q8Tmk8VR8kb99rCsE8wwcEuXrU/xXIW3vUNK+MbGiHZHATLG+6A9cFnqepL+5lLfd/ itv+NLP012D70v+Lz6K2LDmlgV+tL0SpItDtQ9w4wbzVyuxMjU6Q3T4n+Uo5Gnw3KDCO kHrkkWBQvRiXEqCTWgxhAwgjNKK3mi/Mi0GBV3FjRMoK4utqVh90b5j5fj8hGje3x8Rq R632CTe1tc28YnEM9oAhPypvkvffY9qRdxUuX4jQdONXha+4B2mGpa9/+2csEZG5/FsZ 9TKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=vQb/jT6dwxivhDp15rfs343XCXWeKAVr1k3tyrLNoGs=; b=QBdLb95BPUIFjiKkQbzr4MFZtOmQP4U9UhQ65FtNWtCsWjZ3hcFggKCD8gqAFminNw UpQZELscGX74USK6LKEdTzuWz0hYMwuKqHws//B4mIt+JGl7dLfXJrNd/620kgASt/+d MgLVfnJw/0FoYqXq3MXL1D1rkWR/GaR5J6AF4Bls/WLlQgl7eNxJf0bTQDS6DbDzLWjU H+hyMhjeneB5dCxAyJkPo2hO8f9z1MXzG8QYRWIx0yt+z9VCfU/UndpMtlQXsdUEKAaX tM/W1GTSCQ/xajxA+2GaWznNTfvmsg8MrVFTaLdZXLpj0qaHSnsFHE6WZJobPxnW8DkX tvdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="LPMg/c2V"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o3-20020a170906974300b00724d542e91bsi12624673ejy.952.2022.07.05.15.01.40; Tue, 05 Jul 2022 15:02:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="LPMg/c2V"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232258AbiGEVWB (ORCPT + 99 others); Tue, 5 Jul 2022 17:22:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51148 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229849AbiGEVWA (ORCPT ); Tue, 5 Jul 2022 17:22:00 -0400 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0855C14037 for ; Tue, 5 Jul 2022 14:21:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1657056119; x=1688592119; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=8prCsjjwtcxisgqVbfhhyvLNe8GZByTgB0MPi1kR0SQ=; b=LPMg/c2VxmNRk76vFLSs5cHR0gTgnIzyjLeJRrQusryTTPooHsRWQQE3 4uUuehHNsMyMojqIQauSZmRK1eeuBAdKo96cF3j91tZXpxJNOersNnU31 Wk426Tdc1K66Yqk7OiskEyzJUSiMGDpKkbrH6PwmmPixWF8qHc1ghaLsZ nws5WFfY6w3fs3gAfon2cUmN83ulDIFrnVK+B/f/C9EHX+6xvasSZA9n7 Wm7sQYLp8pksCV9myaIKsSfNI7qM0M8bi9P+WYNJs3pWHrgnxhphE5fZc GKAIPk90m4VPz7+WrNJHiIAkgE/1LfMG+NIUI8k71iX6EbmjLAuKrHBw5 Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10399"; a="266540723" X-IronPort-AV: E=Sophos;i="5.92,247,1650956400"; d="scan'208";a="266540723" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jul 2022 14:21:56 -0700 X-IronPort-AV: E=Sophos;i="5.92,247,1650956400"; d="scan'208";a="620014817" Received: from yma15-mobl1.amr.corp.intel.com (HELO [10.209.0.58]) ([10.209.0.58]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jul 2022 14:21:55 -0700 Message-ID: <74383158-460e-0cd1-94bc-faca5b8175ea@linux.intel.com> Date: Tue, 5 Jul 2022 14:21:55 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0 Thunderbird/91.9.1 Subject: Re: [PATCH v8 1/5] x86/tdx: Add TDX Guest attestation interface driver Content-Language: en-US To: Dave Hansen , Kai Huang , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org Cc: "H . Peter Anvin" , "Kirill A . Shutemov" , Tony Luck , Andi Kleen , Wander Lairson Costa , Isaku Yamahata , marcelo.cerri@canonical.com, tim.gardner@canonical.com, khalid.elmously@canonical.com, philip.cox@canonical.com, linux-kernel@vger.kernel.org References: <20220609025220.2615197-1-sathyanarayanan.kuppuswamy@linux.intel.com> <20220609025220.2615197-2-sathyanarayanan.kuppuswamy@linux.intel.com> <0f6bedbb-14cc-bf93-5d9f-bfd2c49dc7b2@intel.com> <48b9d807-2d9e-016f-bada-906911d6ecb0@linux.intel.com> <331abea18e728061979301772a9d0d61543f59fb.camel@intel.com> <0b5884b8-9240-63b2-ca4c-20c86fd2e8c1@linux.intel.com> <8b6f3f9f-71c8-2b6f-20a3-5e9c259a1b9a@intel.com> From: Sathyanarayanan Kuppuswamy In-Reply-To: <8b6f3f9f-71c8-2b6f-20a3-5e9c259a1b9a@intel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/5/22 11:52 AM, Dave Hansen wrote: > On 7/5/22 11:45, Sathyanarayanan Kuppuswamy wrote: >> Yes, there are many ways to design this. But I still think IOCTL is a better fit >> for the request/response kind of use case. > > Are there any other similar ABIs in the kernel? What kind of mechanism > do they use? AMD also plans to add attestation support. It also uses IOCTL approach. https://patchwork.kernel.org/project/linux-mm/patch/20220307213356.2797205-44-brijesh.singh@amd.com/ SGX is a related feature. It also uses IOCTL approach for enclave provisioning. arch/x86/kernel/cpu/sgx/ioctl.c Other examples (not very related) are, drivers/platform/chrome/cros_ec_chardev.c - It is an embedded controller driver which has IOCTL support to read memory region from the device. drivers/s390/crypto/pkey_api.c - It has IOCTL interfaces to read/write/generate crypto keys. drivers/crypto/ccp/sev-dev.c - sev_ioctl() has some IOCTL to set/get keys. drivers/platform/x86/intel_scu_ipcutil.c - Uses IOCTL to read contents of registers. -- Sathyanarayanan Kuppuswamy Linux Kernel Developer