[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 8 Aug 2022 09:05:18 -0300
From: Wander Lairson Costa <wander@...hat.com>
To: Sathyanarayanan Kuppuswamy
<sathyanarayanan.kuppuswamy@...ux.intel.com>
Cc: Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
"H . Peter Anvin" <hpa@...or.com>,
"Kirill A . Shutemov" <kirill.shutemov@...ux.intel.com>,
Tony Luck <tony.luck@...el.com>,
Andi Kleen <ak@...ux.intel.com>,
Kai Huang <kai.huang@...el.com>,
Isaku Yamahata <isaku.yamahata@...il.com>,
marcelo.cerri@...onical.com, tim.gardner@...onical.com,
khalid.elmously@...onical.com, philip.cox@...onical.com,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v10 1/2] x86/tdx: Add TDX Guest attestation interface driver
On Fri, Aug 5, 2022 at 6:35 PM Sathyanarayanan Kuppuswamy
<sathyanarayanan.kuppuswamy@...ux.intel.com> wrote:
>
>
>
> On 8/5/22 12:47 PM, Wander Lairson Costa wrote:
> > On Wed, Aug 03, 2022 at 05:33:22PM -0700, Kuppuswamy Sathyanarayanan wrote:
> >> +/**
> >> + * struct tdx_report_req: Get TDREPORT using REPORTDATA as input.
> >> + *
> >> + * @subtype : Subtype of TDREPORT (fixed as 0 by TDX Module
> >> + * specification, but added a parameter to handle
> >> + * future extension).
> >> + * @reportdata : User-defined REPORTDATA to be included into
> >> + * TDREPORT. Typically it can be some nonce
> >> + * provided by attestation service, so the
> >> + * generated TDREPORT can be uniquely verified.
> >> + * @rpd_len : Length of the REPORTDATA (fixed as 64 bytes by
> >> + * the TDX Module specification, but parameter is
> >> + * added to handle future extension).
> >> + * @tdreport : TDREPORT output from TDCALL[TDG.MR.REPORT].
> >> + * @tdr_len : Length of the TDREPORT (fixed as 1024 bytes by
> >> + * the TDX Module specification, but a parameter
> >> + * is added to accommodate future extension).
> >> + *
> >> + * Used in TDX_CMD_GET_REPORT IOCTL request.
> >> + */
> >> +struct tdx_report_req {
> >> + __u8 subtype;
> >> + __u64 reportdata;
> >> + __u32 rpd_len;
> >> + __u64 tdreport;
> >> + __u32 tdr_len;
> >> +};
> >
> > Any reason why reportdata and tdreport aren't "void *"?
>
> It is the recommended way to pass the pointers.
>
> https://docs.kernel.org/driver-api/ioctl.html
>
Ah, right. In this case, we should use the u64_to_user_ptr() function
for pointer conversion as recommended.
Powered by blists - more mailing lists