mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Janosch Frank <frankja@linux.ibm.com>
To: Steffen Eiden <seiden@linux.ibm.com>,
	linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org
Cc: Ingo Franzki <ifranzki@linux.ibm.com>,
	Harald Freudenberger <freude@linux.ibm.com>,
	Christoph Schlameuss <schlameuss@linux.ibm.com>,
	Claudio Imbrenda <imbrenda@linux.ibm.com>
Subject: Re: [PATCH v1 2/2] s390/uv: Provide host-key hashes in sysfs
Date: Tue, 1 Oct 2024 13:41:58 +0200	[thread overview]
Message-ID: <344b4019-0c7c-4e08-ab50-f03b1d51277c@linux.ibm.com> (raw)
In-Reply-To: <20240930132042.2081982-3-seiden@linux.ibm.com>

On 9/30/24 3:20 PM, Steffen Eiden wrote:
> Utilize the new Query Ultravisor Keys to give user space the information
> which host-keys are installed on the system.
> 
> Create a new sysfs directory 'firmware/uv/keys' that contains the hash
> of the host-key and the backup host-key of that system. Additionally,
> the file 'all' contains the response from the UVC possibly containing
> more key-hashes than currently known.
> 
> Reviewed-by: Christoph Schlameuss <schlameuss@linux.ibm.com>
> Signed-off-by: Steffen Eiden <seiden@linux.ibm.com>
> ---
>   arch/s390/include/asm/uv.h | 16 ++++++++
>   arch/s390/kernel/uv.c      | 75 ++++++++++++++++++++++++++++++++++++++
>   2 files changed, 91 insertions(+)
> 
> diff --git a/arch/s390/include/asm/uv.h b/arch/s390/include/asm/uv.h
> index 153d93468b77..7eda73073cdd 100644
> --- a/arch/s390/include/asm/uv.h
> +++ b/arch/s390/include/asm/uv.h
> @@ -31,6 +31,7 @@
>   #define UVC_RC_NEED_DESTROY	0x8000
>   
>   #define UVC_CMD_QUI			0x0001
> +#define UVC_CMD_QUK			0x0002

Should've used the long form here as well.

>   #define UVC_CMD_INIT_UV			0x000f
>   #define UVC_CMD_CREATE_SEC_CONF		0x0100
>   #define UVC_CMD_DESTROY_SEC_CONF	0x0101
> @@ -94,6 +95,7 @@ enum uv_cmds_inst {
>   	BIT_UVC_CMD_ADD_SECRET = 29,
>   	BIT_UVC_CMD_LIST_SECRETS = 30,
>   	BIT_UVC_CMD_LOCK_SECRETS = 31,
> +	BIT_UVC_CMD_QUERY_KEYS = 34,
>   };
>   

[...]

>   static int __init uv_sysfs_dir_init(const struct attribute_group *grp,
> @@ -789,6 +859,11 @@ static int __init uv_sysfs_init(void)
>   	rc = uv_sysfs_dir_init(&uv_query_attr_group, &uv_query_kset, "query");
>   	if (rc)
>   		goto out_ind_files;
> +
> +	// Get installed key hashes if available, ignore any errors

Please use:
/* */

> +	if (test_bit_inv(BIT_UVC_CMD_QUERY_KEYS, uv_info.inst_calls_list))
> +		uv_sysfs_dir_init(&uv_keys_attr_group, &uv_keys_kset, "keys");
> +
>   	return 0;
>   
>   out_ind_files:


      reply	other threads:[~2024-10-01 11:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-30 13:20 [PATCH v1 0/2] s390/uv: Provide Host-key-hashes " Steffen Eiden
2024-09-30 13:20 ` [PATCH v1 1/2] s390/uv: Refactor uv-sysfs creation Steffen Eiden
2024-10-01 11:43   ` Janosch Frank
2024-09-30 13:20 ` [PATCH v1 2/2] s390/uv: Provide host-key hashes in sysfs Steffen Eiden
2024-10-01 11:41   ` Janosch Frank [this message]

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=344b4019-0c7c-4e08-ab50-f03b1d51277c@linux.ibm.com \
    --to=frankja@linux.ibm.com \
    --cc=freude@linux.ibm.com \
    --cc=ifranzki@linux.ibm.com \
    --cc=imbrenda@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=schlameuss@linux.ibm.com \
    --cc=seiden@linux.ibm.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

all inboxes | Powered by JetHome®