From: Aneesh Kumar K.V <aneesh.kumar@kernel.org>
To: Yeoreum Yun <yeoreum.yun@arm.com>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
linux-security-module@vger.kernel.org, linux-doc@vger.kernel.org,
linux-kselftest@vger.kernel.org, linux-acpi@vger.kernel.org,
acpica-devel@lists.linux.dev
Cc: Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>, Jason Gunthorpe <jgg@ziepe.ca>,
Suzuki Poulose <suzuki.poulose@arm.com>,
Steven Price <steven.price@arm.com>,
Sami Mujawar <sami.mujawar@arm.com>,
thuth@redhat.com, "Rafael J. Wysocki" <rafael@kernel.org>,
Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>,
Pawel Chmielewski <pawel.chmielewski@intel.com>,
Jiri Pirko <jiri@resnulli.us>, Jonathan Corbet <corbet@lwn.net>,
Shuah Khan <shuah@kernel.org>, Len Brown <lenb@kernel.org>,
Shuah Khan <skhan@linuxfoundation.org>,
Randy Dunlap <rdunlap@infradead.org>,
Mark Brown <broonie@kernel.org>,
Yeoreum Yun <yeoreum.yun@arm.com>
Subject: Re: [PATCH RFC v3 7/8] attestation: providers: introduce CCA Guest attestation provider
Date: Tue, 01 Dec 2026 18:11:39 +0530 [thread overview]
Message-ID: <yq5abj755g1o.fsf@kernel.org> (raw)
In-Reply-To: <20261127-arm_cca_mr-v3-7-df3230afce8f@arm.com>
Yeoreum Yun <yeoreum.yun@arm.com> writes:
> Introduce CCA Realm Guest attestation provider for retrieving:
>
> - RIM, REM0-REM3 measurement registers.
> - CCA attestation token
> - CCEL event log
>
> used for CCA Realm Guest attestation.
>
> Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
> ---
> drivers/attestation/Kconfig | 10 +
> drivers/attestation/Makefile | 5 +
> drivers/attestation/providers/cca_guest.c | 582 ++++++++++++++++++++++++++++++
> 3 files changed, 597 insertions(+)
>
[ ... 507 lines skipped ... ]
> +static int cca_guest_attest_drv_probe(struct arm_smccc_device *sdev)
> +{
> + int ret, objects_count = 0;
> + unsigned long lower, upper, digest_size;
> + long max_token_size;
> + void *eventlog;
> + size_t eventlog_size;
> + struct cca_guest_attestation *cca_guest_att;
> + int ccel_obj_idx = 0;
> +
> + ret = rsi_request_version(RSI_ABI_VERSION, &lower, &upper);
> + if (ret)
> + return ret;
> +
> + ret = cca_guest_hash_init(&digest_size);
> + if (ret)
> + return ret;
> +
> + max_token_size = cca_guest_get_max_token_size();
> + if (max_token_size <= 0)
> + return -EINVAL;
> +
> + eventlog = cca_guest_ccel_init(&eventlog_size);
> + if (IS_ERR(eventlog))
> + return PTR_ERR(eventlog);
> +
> + pr_info("CCA Realm guest RSI version %lu.%lu\n",
> + RSI_ABI_VERSION_GET_MAJOR(RSI_ABI_VERSION),
> + RSI_ABI_VERSION_GET_MINOR(RSI_ABI_VERSION));
> + pr_info("Maximum Attestation token size: 0x%lx\n", max_token_size);
> + pr_info("Eventlog Size: 0x%zx\n", eventlog_size);
> +
> + cca_guest_attestation_evidence_objects[objects_count++].max_length = max_token_size;
> +
> + if (eventlog && eventlog_size > 0) {
> + ccel_obj_idx = objects_count;
> + cca_guest_attestation_evidence_objects[objects_count++].max_length = eventlog_size;
> + }
> +
> + if (WARN_ON_ONCE(objects_count > ARRAY_SIZE(cca_guest_attestation_evidence_objects)))
> + return -EINVAL;
> +
> + cca_guest_attestation_evidence_caps.objects_count = objects_count;
> +
> + cca_guest_att = attestation_alloc(&sdev->dev,
> + &cca_guest_attestation_provider,
> + &ctlv_attestation_cca_guest_family,
> + struct cca_guest_attestation, att);
> + if (IS_ERR(cca_guest_att)) {
> + ret = PTR_ERR(cca_guest_att);
> + goto free_eventlog;
> + }
> +
> + cca_guest_att->version = RSI_ABI_VERSION;
> + cca_guest_att->digest_size = digest_size;
> + cca_guest_att->max_token_size = max_token_size;
> + cca_guest_att->ccel_obj_idx = ccel_obj_idx;
> + cca_guest_att->ccel_eventlog = eventlog;
> + cca_guest_att->ccel_eventlog_size = eventlog_size;
> + INIT_WORK(&cca_guest_att->state_work, cca_guest_state_workfn);
> +
> + ret = attestation_register(&cca_guest_att->att);
> + if (ret) {
> + attestation_put(&cca_guest_att->att);
> + goto free_eventlog;
> + }
> +
> + dev_set_drvdata(&sdev->dev, cca_guest_att);
> +
> + pr_info("CCA Realm Guest attestation ctlvdev is registered\n");
> +
> + return 0;
> +
> +free_eventlog:
> + if (eventlog)
> + kvfree(eventlog);
> + return ret;
> +}
> +
Could you make the above a helper that can be called from
arm-cca-guest.ko instead of making it an SMCCC driver?
-aneesh
next prev parent reply other threads:[~2026-12-01 12:41 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-27 15:32 [PATCH RFC v3 0/8] attestation: provider: add CCA Realm Guest provider Yeoreum Yun
2026-11-27 15:32 ` [PATCH RFC v3 1/8] arm64: rsi: Add helpers for Arm CCA measurement register operations Yeoreum Yun
2026-11-27 15:32 ` [PATCH RFC v3 2/8] arm64: rsi: Add realm hash algorithm defines Yeoreum Yun
2026-11-27 15:32 ` [PATCH RFC v3 3/8] arm64: acpi: Enable ACPI CCEL support Yeoreum Yun
2026-11-27 16:28 ` Suzuki K Poulose
2026-11-27 18:12 ` Yeoreum Yun
2026-11-27 15:32 ` [PATCH RFC v3 4/8] acpi: add CCtype value macros for CCEL table Yeoreum Yun
2026-11-27 15:33 ` [PATCH RFC v3 5/8] Documentation/ctlv: introduce ctlv-attestation-cca-guest family Yeoreum Yun
2026-11-27 15:33 ` [PATCH RFC v3 6/8] ctlv: add auto-generated files for ctlv-attestation-cca-guest Yeoreum Yun
2026-11-27 15:33 ` [PATCH RFC v3 7/8] attestation: providers: introduce CCA Guest attestation provider Yeoreum Yun
2026-11-27 17:07 ` Jason Gunthorpe
2026-11-27 18:24 ` Yeoreum Yun
2026-11-27 18:35 ` Jason Gunthorpe
2026-11-27 19:11 ` Yeoreum Yun
2026-11-27 19:13 ` Yeoreum Yun
2026-11-27 19:18 ` Jason Gunthorpe
2026-11-27 19:40 ` Yeoreum Yun
2026-11-27 18:27 ` Yeoreum Yun
2026-11-27 18:36 ` Jason Gunthorpe
2026-11-30 12:56 ` Jiri Pirko
2026-12-01 12:41 ` Aneesh Kumar K.V [this message]
2026-12-01 13:09 ` Yeoreum Yun
2026-12-01 13:24 ` Jason Gunthorpe
2026-12-01 13:31 ` Yeoreum Yun
2026-11-27 15:33 ` [PATCH RFC v3 8/8] selftest: attestation: add cca_guest_attestation_test selftest Yeoreum Yun
2026-11-27 17:09 ` Jason Gunthorpe
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=yq5abj755g1o.fsf@kernel.org \
--to=aneesh.kumar@kernel.org \
--cc=acpica-devel@lists.linux.dev \
--cc=broonie@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=corbet@lwn.net \
--cc=jgg@ziepe.ca \
--cc=jiri@resnulli.us \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=maciej.wieczor-retman@intel.com \
--cc=pawel.chmielewski@intel.com \
--cc=rafael@kernel.org \
--cc=rdunlap@infradead.org \
--cc=sami.mujawar@arm.com \
--cc=shuah@kernel.org \
--cc=skhan@linuxfoundation.org \
--cc=steven.price@arm.com \
--cc=suzuki.poulose@arm.com \
--cc=thuth@redhat.com \
--cc=will@kernel.org \
--cc=yeoreum.yun@arm.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.