From: Collin Walling <walling@linux.ibm.com>
To: Zhuoying Cai <zycai@linux.ibm.com>,
qemu-s390x@nongnu.org, qemu-devel@nongnu.org
Cc: jrossi@linux.ibm.com, cohuck@redhat.com, berrange@redhat.com,
richard.henderson@linaro.org, pierrick.bouvier@linaro.org,
david@kernel.org, jjherne@linux.ibm.com, pasic@linux.ibm.com,
borntraeger@linux.ibm.com, farman@linux.ibm.com,
mjrosato@linux.ibm.com, iii@linux.ibm.com, eblake@redhat.com,
armbru@redhat.com, alifm@linux.ibm.com, brueckner@linux.ibm.com,
jdaley@linux.ibm.com
Subject: Re: [PATCH v10 09/30] s390x/diag: Implement DIAG 320 subcode 2
Date: Thu, 9 Apr 2026 15:08:09 -0400 [thread overview]
Message-ID: <55daa9f2-af2b-4076-8d08-752c06efd481@linux.ibm.com> (raw)
In-Reply-To: <20260402221453.1602899-10-zycai@linux.ibm.com>
On 4/2/26 18:14, Zhuoying Cai wrote:
> DIAG 320 subcode 2 provides verification-certificates (VCs) that are in the
> certificate store. Only X509 certificates in DER format and SHA-256 hash
> type are recognized.
>
> The subcode value is denoted by setting the second-left-most bit
> of an 8-byte field.
>
> The Verification Certificate Block (VCB) contains the output data
> when the operation completes successfully. It includes a common
> header followed by zero or more Verification Certificate Entries (VCEs),
> depending on the VCB input length and the VC range (from the first VC
> index to the last VC index) in the certificate store.
>
> Each VCE contains information about a certificate retrieved from
> the S390IPLCertificateStore, such as the certificate name, key type,
> key ID length, hash length, and the raw certificate data.
> The key ID and hash are extracted from the raw certificate by the crypto API.
>
> Note: SHA2-256 VC hash type is required for retrieving the hash
> (fingerprint) of the certificate.
>
> Signed-off-by: Zhuoying Cai <zycai@linux.ibm.com>
> ---
> docs/specs/s390x-secure-ipl.rst | 24 +++
> hw/s390x/cert-store.h | 3 +-
> include/hw/s390x/ipl/diag320.h | 55 ++++++
> target/s390x/diag.c | 338 +++++++++++++++++++++++++++++++-
> 4 files changed, 417 insertions(+), 3 deletions(-)
>
[...]
> +
> +static int get_key_type(const S390IPLCertificate *cert)
> +{
> + int rc;
> + Error *err = NULL;
> +
> + rc = qcrypto_x509_check_ecc_curve_p521(cert->raw, cert->size, &err);
> + if (rc == -1) {
> + error_report_err(err);
> + return -1;
> + }
> +
> + return (rc == 1) ? DIAG_320_VCE_KEYTYPE_ECDSA_P521 :
> + DIAG_320_VCE_KEYTYPE_SELF_DESCRIBING;
small nit: remove one space to line up the DIAG_'s.
[...]
Other than that, LGTM!
Reviewed-by: Collin Walling <walling@linux.ibm.com>
--
Regards,
Collin
next prev parent reply other threads:[~2026-04-09 19:08 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-02 22:14 [PATCH v10 00/30] Secure IPL Support for SCSI Scheme of virtio-blk/virtio-scsi Devices Zhuoying Cai
2026-04-02 22:14 ` [PATCH v10 01/30] Add boot-certs to s390-ccw-virtio machine type option Zhuoying Cai
2026-04-02 22:14 ` [PATCH v10 02/30] crypto/x509-utils: Refactor with GNUTLS fallback Zhuoying Cai
2026-04-02 22:14 ` [PATCH v10 03/30] crypto/x509-utils: Add helper functions for certificate store Zhuoying Cai
2026-04-07 15:56 ` Daniel P. Berrangé
2026-04-15 18:34 ` Zhuoying Cai
2026-04-02 22:14 ` [PATCH v10 04/30] hw/s390x/ipl: Create " Zhuoying Cai
2026-04-02 22:14 ` [PATCH v10 05/30] s390x/diag: Introduce DIAG 320 for Certificate Store Facility Zhuoying Cai
2026-04-02 22:14 ` [PATCH v10 06/30] s390x/diag: Refactor address validation check from diag308_parm_check Zhuoying Cai
2026-04-02 22:14 ` [PATCH v10 07/30] s390x/diag: Implement DIAG 320 subcode 1 Zhuoying Cai
2026-04-02 22:14 ` [PATCH v10 08/30] crypto/x509-utils: Add helper functions for DIAG 320 subcode 2 Zhuoying Cai
2026-04-07 16:06 ` Daniel P. Berrangé
2026-04-02 22:14 ` [PATCH v10 09/30] s390x/diag: Implement " Zhuoying Cai
2026-04-09 19:08 ` Collin Walling [this message]
2026-04-02 22:14 ` [PATCH v10 10/30] s390x/diag: Introduce DIAG 508 for secure IPL operations Zhuoying Cai
2026-04-02 22:14 ` [PATCH v10 11/30] crypto/x509-utils: Add helper functions for DIAG 508 subcode 1 Zhuoying Cai
2026-04-07 16:37 ` Daniel P. Berrangé
2026-04-02 22:14 ` [PATCH v10 12/30] s390x/diag: Implement DIAG 508 subcode 1 for signature verification Zhuoying Cai
2026-04-02 22:14 ` [PATCH v10 13/30] s390x/ipl: Introduce IPL Information Report Block (IIRB) Zhuoying Cai
2026-04-02 22:14 ` [PATCH v10 14/30] pc-bios/s390-ccw: Define memory for IPLB and convert IPLB to pointers Zhuoying Cai
2026-04-10 18:40 ` Farhan Ali
2026-04-02 22:14 ` [PATCH v10 15/30] hw/s390x/ipl: Add IPIB flags to IPL Parameter Block Zhuoying Cai
2026-04-09 19:43 ` Collin Walling
2026-04-10 19:16 ` Jared Rossi
2026-04-15 18:38 ` Zhuoying Cai
2026-04-02 22:14 ` [PATCH v10 16/30] s390x: Guest support for Secure-IPL Facility Zhuoying Cai
2026-04-02 22:14 ` [PATCH v10 17/30] pc-bios/s390-ccw: Refactor zipl_run() Zhuoying Cai
2026-04-10 19:24 ` Jared Rossi
2026-04-02 22:14 ` [PATCH v10 18/30] pc-bios/s390-ccw: Rework zipl_load_segment function Zhuoying Cai
2026-04-14 13:25 ` Jared Rossi
2026-04-02 22:14 ` [PATCH v10 19/30] pc-bios/s390-ccw: Add signature verification for secure IPL in audit mode Zhuoying Cai
2026-04-10 19:37 ` Collin Walling
2026-04-20 18:22 ` Zhuoying Cai
2026-04-13 19:59 ` Jared Rossi
2026-04-13 22:05 ` Joshua Daley
2026-04-13 23:07 ` Joshua Daley
2026-04-02 22:14 ` [PATCH v10 20/30] pc-bios/s390-ccw: Add signed component address overlap checks Zhuoying Cai
2026-04-10 19:54 ` Collin Walling
2026-04-28 18:41 ` Zhuoying Cai
2026-04-15 16:36 ` Jared Rossi
2026-04-28 18:42 ` Zhuoying Cai
2026-04-29 14:16 ` Jared Rossi
2026-04-02 22:14 ` [PATCH v10 21/30] s390x: Guest support for Secure-IPL Code Loading Attributes Facility (SCLAF) Zhuoying Cai
2026-04-02 22:14 ` [PATCH v10 22/30] pc-bios/s390-ccw: Add additional security checks for secure boot Zhuoying Cai
2026-04-10 20:51 ` Collin Walling
2026-04-10 20:58 ` Collin Walling
2026-04-15 19:09 ` Jared Rossi
2026-04-02 22:14 ` [PATCH v10 23/30] Add secure-boot to s390-ccw-virtio machine type option Zhuoying Cai
2026-04-02 22:14 ` [PATCH v10 24/30] hw/s390x/ipl: Set IPIB flags for secure IPL Zhuoying Cai
2026-04-10 20:13 ` Collin Walling
2026-04-02 22:14 ` [PATCH v10 25/30] pc-bios/s390-ccw: Handle true secure IPL mode Zhuoying Cai
2026-04-10 20:11 ` Collin Walling
2026-04-30 21:17 ` Zhuoying Cai
2026-04-02 22:14 ` [PATCH v10 26/30] hw/s390x/ipl: Handle secure boot with multiple boot devices Zhuoying Cai
2026-04-02 22:14 ` [PATCH v10 27/30] hw/s390x/ipl: Handle secure boot without specifying a boot device Zhuoying Cai
2026-04-02 22:14 ` [PATCH v10 28/30] tests/functional/s390x: Add secure IPL functional test Zhuoying Cai
2026-04-02 22:14 ` [PATCH v10 29/30] docs/specs: Add secure IPL documentation Zhuoying Cai
2026-04-13 22:53 ` Joshua Daley
2026-04-02 22:14 ` [PATCH v10 30/30] docs/system/s390x: " Zhuoying Cai
2026-04-13 23:03 ` Joshua Daley
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=55daa9f2-af2b-4076-8d08-752c06efd481@linux.ibm.com \
--to=walling@linux.ibm.com \
--cc=alifm@linux.ibm.com \
--cc=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=borntraeger@linux.ibm.com \
--cc=brueckner@linux.ibm.com \
--cc=cohuck@redhat.com \
--cc=david@kernel.org \
--cc=eblake@redhat.com \
--cc=farman@linux.ibm.com \
--cc=iii@linux.ibm.com \
--cc=jdaley@linux.ibm.com \
--cc=jjherne@linux.ibm.com \
--cc=jrossi@linux.ibm.com \
--cc=mjrosato@linux.ibm.com \
--cc=pasic@linux.ibm.com \
--cc=pierrick.bouvier@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=zycai@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.