Enable PSP security attributes on more SoCs
Subsystems (4)
Mario Limonciello
maintainerv2 cover Enable PSP security attributes on more SoCs
On some older SoCs the PSP doesn't export security attributes in the capabilities register. On these SoCs it is however possible to get the information by a platform access command.
Restructure the driver to move all security attribute handling to a central location and then add support for calling the platform access command on those processors.
v1->v2:
* Add tags (except patch 2)
* Fix kernel robot reported issue
* Move a check from patch 4 to patch 5
Mario Limonciello (5):
crypto: ccp: Represent capabilities register as a union
crypto: ccp: Move security attributes to their own file
crypto: ccp: align psp_platform_access_msg
crypto: ccp: Add support for getting security attributes on some older
systems
crypto: ccp: Move message about TSME being enabled later in init
MAINTAINERS | 6 ++ drivers/crypto/ccp/Makefile | 3 +- drivers/crypto/ccp/dbc.c | 2 +- drivers/crypto/ccp/hsti.c | 138 ++++++++++++++++++++++++++++ drivers/crypto/ccp/hsti.h | 17 ++++ drivers/crypto/ccp/psp-dev.c | 23 ++--- drivers/crypto/ccp/psp-dev.h | 46 +++++----- drivers/crypto/ccp/sp-dev.h | 2 +- drivers/crypto/ccp/sp-pci.c | 67 ++------------ include/linux/psp-platform-access.h | 5 +- 10 files changed, 210 insertions(+), 99 deletions(-) create mode 100644 drivers/crypto/ccp/hsti.c create mode 100644 drivers/crypto/ccp/hsti.h
Signature · 1 line
2.43.0
Mario Limonciello
maintainerPATCH v2 1/5 crypto: ccp: Represent capabilities register as a union
Making the capabilities register a union makes it easier to refer to the members instead of always doing bit shifts.
No intended functional changes.
---v1->v2:
* Add tag
--- drivers/crypto/ccp/dbc.c | 2 +- drivers/crypto/ccp/psp-dev.c | 11 ++++----- drivers/crypto/ccp/psp-dev.h | 44 ++++++++++++++++++++---------------- drivers/crypto/ccp/sp-dev.h | 1 - drivers/crypto/ccp/sp-pci.c | 26 ++++++++++----------- 5 files changed, 42 insertions(+), 42 deletions(-)
drivers/crypto/ccp/dbc.c +1 -1
@@ -223,7 +223,7 @@ int dbc_dev_init(struct psp_device *psp) dbc_dev->dev = dev; dbc_dev->psp = psp; -if (PSP_CAPABILITY (psp,DBC_THRU_EXT )) { +if (psp->capability.dbc_thru_ext) { dbc_dev->use_ext = true; dbc_dev->payload_size = &dbc_dev->mbox->ext_req.header.payload_size; dbc_dev->result = &dbc_dev->mbox->ext_req.header.status;
drivers/crypto/ccp/psp-dev.c +5 -6
@@ -154,11 +154,10 @@ static unsigned int psp_get_capability(struct psp_device *psp)dev_notice (psp->dev,"psp: unable to access the device: you might be running a broken BIOS.\n" );return -ENODEV ; } - psp->capability = val; + psp->capability.raw = val;/* Detect TSME and/or SME status */ -if (PSP_CAPABILITY (psp,PSP_SECURITY_REPORTING ) && - psp->capability & (PSP_SECURITY_TSME_STATUS <<PSP_CAPABILITY_PSP_SECURITY_OFFSET )) { +if (psp->capability.security_reporting && psp->capability.tsme_status) {if (cc_platform_has (CC_ATTR_HOST_MEM_ENCRYPT ))dev_notice (psp->dev,"psp: Both TSME and SME are active, SME is unnecessary when TSME is active.\n" );else
@@ -171,7 +170,7 @@ static unsigned int psp_get_capability(struct psp_device *psp)static int psp_check_sev_support (struct psp_device *psp) {/* Check if device supports SEV feature */ -if (!PSP_CAPABILITY (psp,SEV )) { +if (!psp->capability.sev) {dev_dbg (psp->dev,"psp does not support SEV\n" );return -ENODEV ; }
@@ -182,7 +181,7 @@ static int psp_check_sev_support(struct psp_device *psp)static int psp_check_tee_support (struct psp_device *psp) {/* Check if device supports TEE feature */ -if (!PSP_CAPABILITY (psp,TEE )) { +if (!psp->capability.tee) {dev_dbg (psp->dev,"psp does not support TEE\n" );return -ENODEV ; }
@@ -214,7 +213,7 @@ static int psp_init(struct psp_device *psp)/* dbc must come after platform access as it tests the feature */ if (PSP_FEATURE (psp,DBC ) || -PSP_CAPABILITY (psp,DBC_THRU_EXT )) { + psp->capability.dbc_thru_ext) { ret =dbc_dev_init (psp);if (ret)return ret;
drivers/crypto/ccp/psp-dev.h +24 -20
63 lines not on this page · raw message
drivers/crypto/ccp/sp-dev.h +0 -1
@@ -30,7 +30,6 @@#define PLATFORM_FEATURE_DBC 0x1 -#define PSP_CAPABILITY (psp, cap) (psp->capability & PSP_CAPABILITY_##cap)#define PSP_FEATURE (psp, feat) (psp->vdata && psp->vdata->platform_features & PLATFORM_FEATURE_##feat)/* Structure to hold CCP device data */
drivers/crypto/ccp/sp-pci.c +12 -14
@@ -39,31 +39,30 @@ struct sp_pci { };static struct sp_device *sp_dev_master; -#define security_attribute_show (name, def) \ +#define security_attribute_show (name) \ static ssize_t name##_show(struct device *d, struct device_attribute *attr, \ char *buf) \ { \ struct sp_device *sp = dev_get_drvdata(d); \ struct psp_device *psp = sp->psp_data; \ - int bit = PSP_SECURITY_##def << PSP_CAPABILITY_PSP_SECURITY_OFFSET; \ - return sysfs_emit(buf, "%d\n", (psp->capability & bit) > 0); \ + return sysfs_emit(buf, "%d\n", psp->capability.name); \ } -security_attribute_show(fused_part, FUSED_PART) +security_attribute_show (fused_part)static DEVICE_ATTR_RO (fused_part); -security_attribute_show(debug_lock_on, DEBUG_LOCK_ON) +security_attribute_show (debug_lock_on)static DEVICE_ATTR_RO (debug_lock_on); -security_attribute_show(tsme_status, TSME_STATUS) +security_attribute_show (tsme_status)static DEVICE_ATTR_RO (tsme_status); -security_attribute_show(anti_rollback_status, ANTI_ROLLBACK_STATUS) +security_attribute_show (anti_rollback_status)static DEVICE_ATTR_RO (anti_rollback_status); -security_attribute_show(rpmc_production_enabled, RPMC_PRODUCTION_ENABLED) +security_attribute_show (rpmc_production_enabled)static DEVICE_ATTR_RO (rpmc_production_enabled); -security_attribute_show(rpmc_spirom_available, RPMC_SPIROM_AVAILABLE) +security_attribute_show (rpmc_spirom_available)static DEVICE_ATTR_RO (rpmc_spirom_available); -security_attribute_show(hsp_tpm_available, HSP_TPM_AVAILABLE) +security_attribute_show (hsp_tpm_available)static DEVICE_ATTR_RO (hsp_tpm_available); -security_attribute_show(rom_armor_enforced, ROM_ARMOR_ENFORCED) +security_attribute_show (rom_armor_enforced)static DEVICE_ATTR_RO (rom_armor_enforced);static struct attribute *psp_security_attrs[] = {
@@ -84,7 +83,7 @@ static umode_t psp_security_is_visible(struct kobject *kobj, struct attribute *astruct sp_device *sp =dev_get_drvdata (dev);struct psp_device *psp = sp->psp_data; -if (psp &&PSP_CAPABILITY (psp,PSP_SECURITY_REPORTING )) +if (psp && psp->capability.security_reporting)return 0444 ;return 0 ;
@@ -134,8 +133,7 @@ static umode_t psp_firmware_is_visible(struct kobject *kobj, struct attribute *a psp->vdata->bootloader_info_reg) val =ioread32 (psp->io_regs + psp->vdata->bootloader_info_reg); -if (attr == &dev_attr_tee_version.attr && -PSP_CAPABILITY (psp,TEE ) && +if (attr == &dev_attr_tee_version.attr && psp->capability.tee && psp->vdata->tee->info_reg) val =ioread32 (psp->io_regs + psp->vdata->tee->info_reg);
Signature · 1 line
2.43.0
Mario Limonciello
maintainerPATCH v2 2/5 crypto: ccp: Move security attributes to their own file
In reply to Mario LimoncielloTo prepare for other code that will manipulate security attributes move the handling code out of sp-pci.c. No intended functional changes.
---v1->v2:
* Only add psp_security_attr_group when PSP support enabled (Fixes lkp robot reported Kconfig issue)
--- MAINTAINERS | 6 ++++ drivers/crypto/ccp/Makefile | 3 +- drivers/crypto/ccp/hsti.c | 68 ++++++++++++++++++++++++++++++++++++ drivers/crypto/ccp/hsti.h | 15 ++++++++ drivers/crypto/ccp/psp-dev.c | 1 + drivers/crypto/ccp/sp-pci.c | 58 ++---------------------------- 6 files changed, 95 insertions(+), 56 deletions(-) create mode 100644 drivers/crypto/ccp/hsti.c create mode 100644 drivers/crypto/ccp/hsti.h
MAINTAINERS +6 -0
@@ -991,6 +991,12 @@ F: include/uapi/linux/psp-dbc.h F: tools/crypto/ccp/*.c F: tools/crypto/ccp/*.py +AMD CRYPTOGRAPHIC COPROCESSOR (CCP) DRIVER - HSTI SUPPORT +M: Mario Limonciello <[email protected]> +L: [email protected] +S: Supported +F: drivers/crypto/ccp/hsti.* + AMD DISPLAY CORE M: Harry Wentland <[email protected]> M: Leo Li <[email protected]>
drivers/crypto/ccp/Makefile +2 -1
@@ -12,7 +12,8 @@ ccp-$(CONFIG_CRYPTO_DEV_SP_PSP) += psp-dev.o \ sev-dev.o \ tee-dev.o \ platform-access.o \ - dbc.o + dbc.o \ + hsti.o obj-$(CONFIG_CRYPTO_DEV_CCP_CRYPTO) += ccp-crypto.o ccp-crypto-objs := ccp-crypto-main.o \
drivers/crypto/ccp/hsti.c new file +68 -0
68 lines not on this page · raw message
drivers/crypto/ccp/hsti.h new file +15 -0
@@ -0,0 +1,15 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* +* AMD Secure Processor device driver, security attributes +* +* Copyright (C) 2023-2024 Advanced Micro Devices, Inc. +* +* Author: Mario Limonciello <[email protected]> +*/ + +#ifndef __HSTI_H +#define __HSTI_H + +extern struct attribute_group psp_security_attr_group; + +#endif /* __HSTI_H */
drivers/crypto/ccp/psp-dev.c +1 -0
@@ -19,6 +19,7 @@#include "tee-dev.h" #include "platform-access.h" #include "dbc.h" +#include "hsti.h" struct psp_device *psp_master;
drivers/crypto/ccp/sp-pci.c +3 -55
77 lines not on this page · raw message
Signature · 1 line
2.43.0
Tom Lendacky
maintainerRe: [PATCH v2 2/5] crypto: ccp: Move security attributes to their own file
Quoted 8 lines · Mario Limonciello
To prepare for other code that will manipulate security attributes move the handling code out of
sp-pci.c. No intended functional changes.Signed-off-by Mario Limonciello <[email protected]>---
v1->v2:
* Only addpsp_security_attr_groupwhen PSP support enabled (Fixes lkp robot reportedKconfigissue)
Just verifying that there's no change in behavior in regards to whether the attributes are shown. Previously the attributes were not shown if CONFIG_CRYPTO_DEV_SP_PSP was "n" because the psp value would be NULL in psp_security_is_visible(), right?
Thanks,
Tom
Quoted 11 lines
--- MAINTAINERS | 6 ++++ drivers/crypto/ccp/Makefile | 3 +- drivers/crypto/ccp/hsti.c | 68 ++++++++++++++++++++++++++++++++++++ drivers/crypto/ccp/hsti.h | 15 ++++++++ drivers/crypto/ccp/psp-dev.c | 1 + drivers/crypto/ccp/sp-pci.c | 58 ++---------------------------- 6 files changed, 95 insertions(+), 56 deletions(-)create mode 100644
drivers/crypto/ccp/hsti.c
create mode 100644drivers/crypto/ccp/hsti.h
Mario Limonciello
maintainerRe: [PATCH v2 2/5] crypto: ccp: Move security attributes to their own file
Quoted 11 lines · Tom Lendacky
Quoted 8 lines · Mario Limonciello
To prepare for other code that will manipulate security attributes move the handling code out of
sp-pci.c. No intended functional changes.Signed-off-by Mario Limonciello <[email protected]>---
v1->v2:
* Only addpsp_security_attr_groupwhen PSP support enabled (Fixes lkp robot reportedKconfigissue)Just verifying that there's no change in behavior in regards to whether the attributes are shown. Previously the attributes were not shown if
CONFIG_CRYPTO_DEV_SP_PSPwas "n" because the psp value would be NULL inpsp_security_is_visible(), right?
Yes; that's right.
Re: [PATCH v2 2/5] crypto: ccp: Move security attributes to their own file
Quoted 11 lines · Mario Limonciello
Quoted 10 lines · Tom Lendacky
Quoted 8 lines · Mario Limonciello
To prepare for other code that will manipulate security attributes move the handling code out of
sp-pci.c. No intended functional changes.Signed-off-by Mario Limonciello <[email protected]>---
v1->v2:
* Only addpsp_security_attr_groupwhen PSP support enabled (Fixes lkp robot reportedKconfigissue)
Quoted 3 lines
Quoted 1 line
Just verifying that there's no change in behavior in regards to whether the attributes are shown. Previously the attributes were not shown if
CONFIG_CRYPTO_DEV_SP_PSPwas "n" because the psp value would be NULL inpsp_security_is_visible(), right?Yes; that's right.
Quoted 1 line
Mario Limonciello
maintainerPATCH v2 3/5 crypto: ccp: align psp_platform_access_msg
In reply to Mario LimoncielloAlign the whitespace so that future messages will also be better aligned.
---v1->v2:
* Add tag
--- include/linux/psp-platform-access.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
include/linux/psp-platform-access.h +2 -2
@@ -6,8 +6,8 @@#include <linux/psp.h> enum psp_platform_access_msg { -PSP_CMD_NONE =0x0 , -PSP_I2C_REQ_BUS_CMD =0x64 , +PSP_CMD_NONE =0x0 , +PSP_I2C_REQ_BUS_CMD =0x64 ,PSP_DYNAMIC_BOOST_GET_NONCE ,PSP_DYNAMIC_BOOST_SET_UID ,PSP_DYNAMIC_BOOST_GET_PARAMETER ,
Signature · 1 line
2.43.0
Mario Limonciello
maintainerPATCH v2 4/5 crypto: ccp: Add support for getting security attributes on some older systems
In reply to Mario LimoncielloOlder systems will not populate the security attributes in the capabilities register. The PSP on these systems, however, does have a command to get the security attributes. Use this command during ccp startup to populate the attributes if they're missing.
---v1->v2:
* Move code to patch 5
--- drivers/crypto/ccp/hsti.c | 55 +++++++++++++++++++++++++++++ drivers/crypto/ccp/hsti.h | 2 ++ drivers/crypto/ccp/psp-dev.c | 5 +++ drivers/crypto/ccp/psp-dev.h | 2 -- drivers/crypto/ccp/sp-dev.h | 1 + drivers/crypto/ccp/sp-pci.c | 5 ++- include/linux/psp-platform-access.h | 1 + 7 files changed, 68 insertions(+), 3 deletions(-)
drivers/crypto/ccp/hsti.c +55 -0
@@ -12,6 +12,13 @@#include "psp-dev.h" #include "hsti.h" +#define PSP_CAPABILITY_PSP_SECURITY_OFFSET 8 + +struct hsti_request { +struct psp_req_buffer_hdr header; +u32 hsti; +} __packed; +#define security_attribute_show (name) \ static ssize_t name##_show(struct device *d, struct device_attribute *attr, \ char *buf) \
@@ -66,3 +73,51 @@ struct attribute_group psp_security_attr_group = { .attrs = psp_security_attrs, .is_visible = psp_security_is_visible, }; + +static int psp_poulate_hsti (struct psp_device *psp) +{ +struct hsti_request *req; +int ret; + +/* Are the security attributes already reported? */ +if (psp->capability.security_reporting) +return 0 ; + +/* Allocate command-response buffer */ + req =kzalloc (sizeof (*req),GFP_KERNEL | __GFP_ZERO); +if (!req) +return -ENOMEM ; + + req->header.payload_size =sizeof (req); + + ret =psp_send_platform_access_msg (PSP_CMD_HSTI_QUERY , (struct psp_request *)req); +if (ret) + goto out; + +if (req->header.status !=0 ) { +dev_dbg (psp->dev,"failed to populate HSTI state: %d\n" , req->header.status); + ret = -EINVAL ; + goto out; + } + + psp->capability.security_reporting =1 ; + psp->capability.raw |= req->hsti <<PSP_CAPABILITY_PSP_SECURITY_OFFSET ; + +out: +kfree (req); + +return ret; +} + +int psp_init_hsti (struct psp_device *psp) +{ +int ret; + +if (PSP_FEATURE (psp,HSTI )) { + ret =psp_poulate_hsti (psp); +if (ret) +return ret; + } + +return 0 ; +}
drivers/crypto/ccp/hsti.h +2 -0
@@ -12,4 +12,6 @@extern struct attribute_group psp_security_attr_group; +int psp_init_hsti (struct psp_device *psp); +#endif /* __HSTI_H */
drivers/crypto/ccp/psp-dev.c +5 -0
@@ -220,6 +220,11 @@ static int psp_init(struct psp_device *psp)return ret; } +/* HSTI uses platform access on some systems. */ + ret =psp_init_hsti (psp); +if (ret) +return ret; +return 0 ; }
drivers/crypto/ccp/psp-dev.h +0 -2
@@ -78,8 +78,6 @@ void psp_clear_sev_irq_handler(struct psp_device *psp);struct psp_device *psp_get_master_device (void ); -#define PSP_CAPABILITY_PSP_SECURITY_OFFSET 8 -/** * enum psp_cmd - PSP mailbox commands * @PSP_CMD_TEE_RING_INIT: Initialize TEE ring buffer
drivers/crypto/ccp/sp-dev.h +1 -0
@@ -29,6 +29,7 @@#define CACHE_WB_NO_ALLOC 0xb7#define PLATFORM_FEATURE_DBC 0x1 +#define PLATFORM_FEATURE_HSTI 0x2#define PSP_FEATURE (psp, feat) (psp->vdata && psp->vdata->platform_features & PLATFORM_FEATURE_##feat)
drivers/crypto/ccp/sp-pci.c +4 -1
@@ -397,10 +397,12 @@ static const struct psp_vdata pspv1 = {static const struct psp_vdata pspv2 = { .sev = &sevv2, + .platform_access = &pa_v1, .bootloader_info_reg =0x109ec ,/* C2PMSG_59 */ .feature_reg =0x109fc ,/* C2PMSG_63 */ .inten_reg =0x10690 ,/* P2CMSG_INTEN */ .intsts_reg =0x10694 ,/* P2CMSG_INTSTS */ + .platform_features =PLATFORM_FEATURE_HSTI , };static const struct psp_vdata pspv3 = {
@@ -413,7 +415,8 @@ static const struct psp_vdata pspv3 = { .feature_reg = 0x109fc, /* C2PMSG_63 */ .inten_reg = 0x10690, /* P2CMSG_INTEN */ .intsts_reg = 0x10694, /* P2CMSG_INTSTS */ - .platform_features = PLATFORM_FEATURE_DBC, + .platform_features = PLATFORM_FEATURE_DBC | + PLATFORM_FEATURE_HSTI, };static const struct psp_vdata pspv4 = {
include/linux/psp-platform-access.h +1 -0
@@ -7,6 +7,7 @@enum psp_platform_access_msg {PSP_CMD_NONE =0x0 , +PSP_CMD_HSTI_QUERY =0x14 ,PSP_I2C_REQ_BUS_CMD =0x64 ,PSP_DYNAMIC_BOOST_GET_NONCE ,PSP_DYNAMIC_BOOST_SET_UID ,
Signature · 1 line
2.43.0
Re: [PATCH v2 4/5] crypto: ccp: Add support for getting security attributes on some older systems
Quoted 5 lines · Mario Limonciello
Older systems will not populate the security attributes in the capabilities register. The PSP on these systems, however, does have a command to get the security attributes. Use this command during ccp startup to populate the attributes if they're missing.
Quoted 7 lines
Signed-off-by Mario Limonciello <[email protected]>
Quoted 13 lines
---
v1->v2:
* Move code to patch 5--- drivers/crypto/ccp/hsti.c | 55 +++++++++++++++++++++++++++++ drivers/crypto/ccp/hsti.h | 2 ++ drivers/crypto/ccp/psp-dev.c | 5 +++ drivers/crypto/ccp/psp-dev.h | 2 -- drivers/crypto/ccp/sp-dev.h | 1 + drivers/crypto/ccp/sp-pci.c | 5 ++- include/linux/psp-platform-access.h | 1 + 7 files changed, 68 insertions(+), 3 deletions(-)
Mario Limonciello
maintainerPATCH v2 5/5 crypto: ccp: Move message about TSME being enabled later in init
In reply to Mario LimoncielloSome of the security attributes data is now populated from an HSTI command on some processors, so show the message after it has been populated.
---v1->v2:
* Move code from patch 4
--- drivers/crypto/ccp/hsti.c | 15 +++++++++++++++ drivers/crypto/ccp/psp-dev.c | 8 -------- 2 files changed, 15 insertions(+), 8 deletions(-)
drivers/crypto/ccp/hsti.c +15 -0
@@ -119,5 +119,20 @@ int psp_init_hsti(struct psp_device *psp)return ret; } +/* +* At this stage, if security information hasn't been populated by +* either the PSP or by the driver through the platform command, +* then there is nothing more to do. +*/ +if (!psp->capability.security_reporting) +return 0 ; + +if (psp->capability.tsme_status) { +if (cc_platform_has (CC_ATTR_HOST_MEM_ENCRYPT )) +dev_notice (psp->dev,"psp: Both TSME and SME are active, SME is unnecessary when TSME is active.\n" ); +else +dev_notice (psp->dev,"psp: TSME enabled\n" ); + } +return 0 ; }
drivers/crypto/ccp/psp-dev.c +0 -8
@@ -157,14 +157,6 @@ static unsigned int psp_get_capability(struct psp_device *psp) } psp->capability.raw = val; -/* Detect TSME and/or SME status */ -if (psp->capability.security_reporting && psp->capability.tsme_status) { -if (cc_platform_has (CC_ATTR_HOST_MEM_ENCRYPT )) -dev_notice (psp->dev,"psp: Both TSME and SME are active, SME is unnecessary when TSME is active.\n" ); -else -dev_notice (psp->dev,"psp: TSME enabled\n" ); - } -return 0 ; }
Signature · 1 line
2.43.0
Re: [PATCH v2 5/5] crypto: ccp: Move message about TSME being enabled later in init
Quoted 5 lines · Mario Limonciello
Some of the security attributes data is now populated from an HSTI command on some processors, so show the message after it has been populated.
Signed-off-by Mario Limonciello <[email protected]>
Quoted 8 lines
---
v1->v2:
* Move code from patch 4--- drivers/crypto/ccp/hsti.c | 15 +++++++++++++++ drivers/crypto/ccp/psp-dev.c | 8 -------- 2 files changed, 15 insertions(+), 8 deletions(-)
Quoted 1 line · Mario Limonciello
v1->v2:
Looks great, and the output of "fwupdmgr security" on my pre-production Lenovo T14 (AMD Ryzen 7 PRO 4750U) is now a lot more accurate:
HSI-1
✔ BIOS firmware updates: Enabled +✔ Fused platform: Locked +✔ Supported CPU: Valid ✔ TPM empty PCRs: Valid ✔ TPM v2.0: Found ✔ UEFI bootservice variables: Locked ✔ UEFI platform key: Valid
HSI-2
✔ IOMMU: Enabled +✔ Platform debugging: Locked ✔ TPM PCR0 reconstruction: Valid +✘ SPI write protection: Disabled ✘ BIOS rollback protection: Disabled
HSI-3
+✘ SPI replay protection: Not supported ✘ CET Platform: Not supported ✘ Pre-boot DMA protection: Disabled ✘ Suspend-to-idle: Disabled ✘ Suspend-to-ram: Enabled
HSI-4
+✔ Encrypted RAM: Encrypted
✔ SMAP: Enabled
+✘ Processor rollback protection: Disabled
Richard
Herbert Xu
maintainerQuoted 20 lines · Mario Limonciello
On some older SoCs the PSP doesn't export security attributes in the capabilities register. On these SoCs it is however possible to get the information by a platform access command.
Restructure the driver to move all security attribute handling to a central location and then add support for calling the platform access command on those processors.
v1->v2:
* Add tags (except patch 2)
* Fix kernel robot reported issue
* Move a check from patch 4 to patch 5
Mario Limonciello (5):
crypto: ccp: Represent capabilities register as a union
crypto: ccp: Move security attributes to their own file
crypto: ccp: alignpsp_platform_access_msg
crypto: ccp: Add support for getting security attributes on some older
systems
crypto: ccp: Move message about TSME being enabled later in init
Quoted 16 lines
MAINTAINERS | 6 ++ drivers/crypto/ccp/Makefile | 3 +- drivers/crypto/ccp/dbc.c | 2 +- drivers/crypto/ccp/hsti.c | 138 ++++++++++++++++++++++++++++ drivers/crypto/ccp/hsti.h | 17 ++++ drivers/crypto/ccp/psp-dev.c | 23 ++--- drivers/crypto/ccp/psp-dev.h | 46 +++++----- drivers/crypto/ccp/sp-dev.h | 2 +- drivers/crypto/ccp/sp-pci.c | 67 ++------------ include/linux/psp-platform-access.h | 5 +- 10 files changed, 210 insertions(+), 99 deletions(-) create mode 100644 drivers/crypto/ccp/hsti.c create mode 100644 drivers/crypto/ccp/hsti.hSignature · 1 line
2.43.0
All applied. Thanks.
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt