[tree-wide] finally take no_llseek outno_llseek had been defined to NULL two years ago, in commit 868941b14441("fs: remove no_llseek")To quote that commit, At -rc1 we'll need do a mechanical
[tree-wide] finally take no_llseek outno_llseek had been defined to NULL two years ago, in commit 868941b14441("fs: remove no_llseek")To quote that commit, At -rc1 we'll need do a mechanical removal of no_llseek - git grep -l -w no_llseek | grep -v porting.rst | while read i; do sed -i '/\<no_llseek\>/d' $i done would do it.Unfortunately, that hadn't been done. Linus, could you do that now, sothat we could finally put that thing to rest? All instances are of theform .llseek = no_llseek,so it's obviously safe.Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
show more ...
x86/sev: Take advantage of configfs visibility support in TSMThe TSM attestation report support provides multiple configfs attributetypes (both for standard and binary attributes) to allow for add
x86/sev: Take advantage of configfs visibility support in TSMThe TSM attestation report support provides multiple configfs attributetypes (both for standard and binary attributes) to allow for additionalattributes to be displayed for SNP as compared to TDX. With the abilityto hide attributes via configfs, consolidate the multiple attribute groupsinto a single standard attribute group and a single binary attributegroup. Modify the TDX support to hide the attributes that were previously"hidden" as a result of registering the selective attribute groups.Co-developed-by: Dan Williams <dan.j.williams@intel.com>Signed-off-by: Dan Williams <dan.j.williams@intel.com>Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>Reviewed-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>Link: https://lore.kernel.org/r/8873c45d0c8abc35aaf01d7833a55788a6905727.1717600736.git.thomas.lendacky@amd.com
virt: tdx-guest: Add Quote generation support using TSM_REPORTSIn TDX guest, the attestation process is used to verify the TDX guesttrustworthiness to other entities before provisioning secrets to
virt: tdx-guest: Add Quote generation support using TSM_REPORTSIn TDX guest, the attestation process is used to verify the TDX guesttrustworthiness to other entities before provisioning secrets to theguest. The first step in the attestation process is TDREPORTgeneration, which involves getting the guest measurement data in theformat of TDREPORT, which is further used to validate the authenticityof the TDX guest. TDREPORT by design is integrity-protected and canonly be verified on the local machine.To support remote verification of the TDREPORT in a SGX-basedattestation, the TDREPORT needs to be sent to the SGX Quoting Enclave(QE) to convert it to a remotely verifiable Quote. SGX QE by design canonly run outside of the TDX guest (i.e. in a host process or in anormal VM) and guest can use communication channels like vsock orTCP/IP to send the TDREPORT to the QE. But for security concerns, theTDX guest may not support these communication channels. To handle suchcases, TDX defines a GetQuote hypercall which can be used by the guestto request the host VMM to communicate with the SGX QE. More detailsabout GetQuote hypercall can be found in TDX Guest-Host CommunicationInterface (GHCI) for Intel TDX 1.0, section titled"TDG.VP.VMCALL<GetQuote>".Trusted Security Module (TSM) [1] exposes a common ABI for ConfidentialComputing Guest platforms to get the measurement data via ConfigFS.Extend the TSM framework and add support to allow an attestation agentto get the TDX Quote data (included usage example below). report=/sys/kernel/config/tsm/report/report0 mkdir $report dd if=/dev/urandom bs=64 count=1 > $report/inblob hexdump -C $report/outblob rmdir $reportGetQuote TDVMCALL requires TD guest pass a 4K aligned shared bufferwith TDREPORT data as input, which is further used by the VMM to copythe TD Quote result after successful Quote generation. To create theshared buffer, allocate a large enough memory and mark it shared usingset_memory_decrypted() in tdx_guest_init(). This buffer will be re-usedfor GetQuote requests in the TDX TSM handler.Although this method reserves a fixed chunk of memory for GetQuoterequests, such one time allocation can help avoid memory fragmentationrelated allocation failures later in the uptime of the guest.Since the Quote generation process is not time-critical or frequentlyused, the current version uses a polling model for Quote requests andit also does not support parallel GetQuote requests.Link: https://lore.kernel.org/lkml/169342399185.3934343.3035845348326944519.stgit@dwillia2-xfh.jf.intel.com/ [1]Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>Reviewed-by: Erdem Aktas <erdemaktas@google.com>Tested-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>Tested-by: Peter Gonda <pgonda@google.com>Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com>Signed-off-by: Dan Williams <dan.j.williams@intel.com>
virt: Add TDX guest driverTDX guest driver exposes IOCTL interfaces to service TDX guestuser-specific requests. Currently, it is only used to allow the user toget the TDREPORT to support TDX atte
virt: Add TDX guest driverTDX guest driver exposes IOCTL interfaces to service TDX guestuser-specific requests. Currently, it is only used to allow the user toget the TDREPORT to support TDX attestation.Details about the TDX attestation process are documented inDocumentation/x86/tdx.rst, and the IOCTL details are documented inDocumentation/virt/coco/tdx-guest.rst.Operations like getting TDREPORT involves sending a blob of data asinput and getting another blob of data as output. It was consideredto use a sysfs interface for this, but it doesn't fit well into thestandard sysfs model for configuring values. It would be possible todo read/write on files, but it would need multiple file descriptors,which would be somewhat messy. IOCTLs seem to be the best fittingand simplest model for this use case. The AMD sev-guest driver alsouses the IOCTL interface to support attestation.[Bagas Sanjaya: Ack is for documentation portion]Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>Reviewed-by: Bagas Sanjaya <bagasdotme@gmail.com>Reviewed-by: Tony Luck <tony.luck@intel.com>Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>Acked-by: Kai Huang <kai.huang@intel.com>Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>Acked-by: Wander Lairson Costa <wander@redhat.com>Link: https://lore.kernel.org/all/20221116223820.819090-3-sathyanarayanan.kuppuswamy%40linux.intel.com