From: Tom Lendacky <thomas.lendacky@amd.com>
To: Mario Limonciello <mario.limonciello@amd.com>,
Herbert Xu <herbert@gondor.apana.org.au>,
John Allen <john.allen@amd.com>
Cc: David S Miller <davem@davemloft.net>,
linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 01/10] crypto: ccp: Rename macro for security attributes
Date: Mon, 1 May 2023 13:36:14 -0500 [thread overview]
Message-ID: <83fd1a29-3af2-e2b7-02ea-edbaead8103a@amd.com> (raw)
In-Reply-To: <20230428185543.8381-2-mario.limonciello@amd.com>
On 4/28/23 13:55, Mario Limonciello wrote:
> The attribute_show() macro is only valid for determining the availability
> of security related sysfs entries. Rename the macro to better show this
> relationship.
>
> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Acked-by: Tom Lendacky <thomas.lendacky@amd.com>
> ---
> drivers/crypto/ccp/sp-pci.c | 26 +++++++++++++-------------
> 1 file changed, 13 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/crypto/ccp/sp-pci.c b/drivers/crypto/ccp/sp-pci.c
> index aa15bc4cac2b..85e3dc8853e2 100644
> --- a/drivers/crypto/ccp/sp-pci.c
> +++ b/drivers/crypto/ccp/sp-pci.c
> @@ -32,7 +32,7 @@ struct sp_pci {
> };
> static struct sp_device *sp_dev_master;
>
> -#define attribute_show(name, def) \
> +#define security_attribute_show(name, def) \
> static ssize_t name##_show(struct device *d, struct device_attribute *attr, \
> char *buf) \
> { \
> @@ -42,24 +42,24 @@ static ssize_t name##_show(struct device *d, struct device_attribute *attr, \
> return sysfs_emit(buf, "%d\n", (psp->capability & bit) > 0); \
> }
>
> -attribute_show(fused_part, FUSED_PART)
> +security_attribute_show(fused_part, FUSED_PART)
> static DEVICE_ATTR_RO(fused_part);
> -attribute_show(debug_lock_on, DEBUG_LOCK_ON)
> +security_attribute_show(debug_lock_on, DEBUG_LOCK_ON)
> static DEVICE_ATTR_RO(debug_lock_on);
> -attribute_show(tsme_status, TSME_STATUS)
> +security_attribute_show(tsme_status, TSME_STATUS)
> static DEVICE_ATTR_RO(tsme_status);
> -attribute_show(anti_rollback_status, ANTI_ROLLBACK_STATUS)
> +security_attribute_show(anti_rollback_status, ANTI_ROLLBACK_STATUS)
> static DEVICE_ATTR_RO(anti_rollback_status);
> -attribute_show(rpmc_production_enabled, RPMC_PRODUCTION_ENABLED)
> +security_attribute_show(rpmc_production_enabled, RPMC_PRODUCTION_ENABLED)
> static DEVICE_ATTR_RO(rpmc_production_enabled);
> -attribute_show(rpmc_spirom_available, RPMC_SPIROM_AVAILABLE)
> +security_attribute_show(rpmc_spirom_available, RPMC_SPIROM_AVAILABLE)
> static DEVICE_ATTR_RO(rpmc_spirom_available);
> -attribute_show(hsp_tpm_available, HSP_TPM_AVAILABLE)
> +security_attribute_show(hsp_tpm_available, HSP_TPM_AVAILABLE)
> static DEVICE_ATTR_RO(hsp_tpm_available);
> -attribute_show(rom_armor_enforced, ROM_ARMOR_ENFORCED)
> +security_attribute_show(rom_armor_enforced, ROM_ARMOR_ENFORCED)
> static DEVICE_ATTR_RO(rom_armor_enforced);
>
> -static struct attribute *psp_attrs[] = {
> +static struct attribute *psp_security_attrs[] = {
> &dev_attr_fused_part.attr,
> &dev_attr_debug_lock_on.attr,
> &dev_attr_tsme_status.attr,
> @@ -83,13 +83,13 @@ static umode_t psp_security_is_visible(struct kobject *kobj, struct attribute *a
> return 0;
> }
>
> -static struct attribute_group psp_attr_group = {
> - .attrs = psp_attrs,
> +static struct attribute_group psp_security_attr_group = {
> + .attrs = psp_security_attrs,
> .is_visible = psp_security_is_visible,
> };
>
> static const struct attribute_group *psp_groups[] = {
> - &psp_attr_group,
> + &psp_security_attr_group,
> NULL,
> };
>
next prev parent reply other threads:[~2023-05-01 18:36 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-28 18:55 [PATCH v2 00/10] Add dynamic boost control support Mario Limonciello
2023-04-28 18:55 ` [PATCH v2 01/10] crypto: ccp: Rename macro for security attributes Mario Limonciello
2023-05-01 18:36 ` Tom Lendacky [this message]
2023-04-28 18:55 ` [PATCH v2 02/10] crypto: ccp: Add support for displaying PSP firmware versions Mario Limonciello
2023-05-01 18:38 ` Tom Lendacky
2023-04-28 18:55 ` [PATCH v2 03/10] crypto: ccp: Add bootloader and TEE version offsets Mario Limonciello
2023-05-01 18:39 ` Tom Lendacky
2023-04-28 18:55 ` [PATCH v2 04/10] crypto: ccp: move setting PSP master to earlier in the init Mario Limonciello
2023-05-01 18:47 ` Tom Lendacky
2023-05-01 19:57 ` Limonciello, Mario
2023-04-28 18:55 ` [PATCH v2 05/10] crypto: ccp: Add support for fetching a nonce for dynamic boost control Mario Limonciello
2023-04-28 18:55 ` [PATCH v2 06/10] crypto: ccp: Add support for setting user ID " Mario Limonciello
2023-04-28 18:55 ` [PATCH v2 07/10] crypto: ccp: Add support for getting and setting DBC parameters Mario Limonciello
2023-04-28 18:55 ` [PATCH v2 08/10] crypto: ccp: Add a sample script for Dynamic Boost Control Mario Limonciello
2023-04-28 18:55 ` [PATCH v2 09/10] crypto: ccp: Add unit tests for dynamic boost control Mario Limonciello
2023-04-28 18:55 ` [PATCH v2 10/10] crypto: ccp: Add Mario to MAINTAINERS Mario Limonciello
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83fd1a29-3af2-e2b7-02ea-edbaead8103a@amd.com \
--to=thomas.lendacky@amd.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=john.allen@amd.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mario.limonciello@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox