1
0
mirror of https://git.yoctoproject.org/meta-arm synced 2026-07-19 04:47:08 +00:00

Compare commits

...

6 Commits

Author SHA1 Message Date
Ross Burton b68089f264 CI: only run pending-updates on master
This job takes a few minutes and isn't useful unless it's being ran for
master, or is being actively worked on.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2025-11-04 09:33:19 -05:00
Peter Hoyes 21894cc2ea arm/classes: Fix IMAGE_POSTPROCESS_COMMAND in fvpboot
Since OE-core 6fd8af0d, the semicolon delimeter in bb.build_exec_func
variables is not needed. The commit silently removes any stray ';' but
failed to handle ';' when assigning to vardeps.

In meta-arm, this has the effect of changes to FVP_* variables not being
picked up when rebuilding the image recipe since mickledore.

This is ancient history now, so just remove the semicolon to fix the
variable dependency issue when using fvpboot in meta-arm.

Signed-off-by: Peter Hoyes <peter.hoyes@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2025-08-13 05:00:22 -04:00
Hongxu Jia 2de04c3d31 optee-os_4.4.0: fix CVE-2025-46733
Backport a patch from upstream [1] to fix CVE-2025-46733

[1] https://github.com/OP-TEE/optee_os/commit/941a58d78c99c4754fbd4ec3079ec9e1d596af8f

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2025-07-30 05:01:19 -04:00
Hamideh Izadyar f87642b6ca arm/trusted-firmware-m: apply TF-M downstream patches
Apply TF-M downstream patches in the main TF-M recipe, rather than doing
it in corstone1000 recipe.

Signed-off-by: Hamideh Izadyar <hamideh.izadyar@arm.com>
Signed-off-by: Ross Burton <ross.burton@arm.com>
2025-07-29 17:57:58 +01:00
Ross Burton 8e2c715fab CI: use walnascar branch of meta-virtualization
This layer has a walnascar branch now, so use it as master is no longer
compatible with walnascar.

Signed-off-by: Ross Burton <ross.burton@arm.com>
2025-07-14 11:41:23 +01:00
Jon Mason ed9d996aa9 arm-systemready/ir-acs: Update URL
The github URL where the image was located has gone away on the master
branch.  Update the URL to point to the legacy branch, which should stay
around (according to the documentation).

Fixes: aebe535aa8 ("arm-systemready: Introduce the Arm SystemReady layer")
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2025-07-08 11:34:06 -04:00
8 changed files with 114 additions and 13 deletions
+5
View File
@@ -252,6 +252,11 @@ musca-s1:
pending-updates:
extends: .setup
# Only run this job for the default branch (master), or if forced with
# BUILD_FORCE_PENDING_UPDATES.
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
- if: $BUILD_FORCE_PENDING_UPDATES != null
artifacts:
paths:
- update-report
-1
View File
@@ -8,4 +8,3 @@ header:
repos:
meta-virtualization:
url: https://git.yoctoproject.org/meta-virtualization
branch: master
@@ -50,16 +50,6 @@ SRC_URI:append:corstone1000-mps3 = " \
file://0003-Fix-psa_key_handle_t-initialization.patch;patchdir=../tfm-psa-adac \
"
# TF-M ships patches for external dependencies that needs to be applied
apply_tfm_patches() {
find ${S}/lib/ext/qcbor -type f -name '*.patch' -print0 | sort -z | xargs -r -t -0 -n 1 patch -p1 -d ${S}/../qcbor/ -i
find ${S}/lib/ext/mbedcrypto -type f -name '*.patch' -print0 | sort -z | xargs -r -t -0 -n 1 patch -p1 -d ${S}/../mbedtls/ -i
find ${S}/lib/ext/mcuboot -type f -name '*.patch' -print0 | sort -z | xargs -r -t -0 -n 1 patch -p1 -d ${S}/../mcuboot/ -i
find ${S}/lib/ext/tf-m-tests -type f -name '*.patch' -print0 | sort -z | xargs -r -t -0 -n 1 patch -p1 -d ${S}/../tf-m-tests/ -i
}
do_patch[postfuncs] += "apply_tfm_patches"
do_install() {
install -D -p -m 0644 ${B}/bin/tfm_s_signed.bin ${D}/firmware/tfm_s_signed.bin
install -D -p -m 0644 ${B}/bin/bl2_signed.bin ${D}/firmware/bl2_signed.bin
@@ -48,7 +48,7 @@ TEST_SUITES = "arm_systemready_ir_acs"
PV = "2.0.0"
PV_DATE = "23.03"
FULL_PV = "v${PV_DATE}_${PV}"
ARM_SYSTEMREADY_IR_ACS_BRANCH ?= "main"
ARM_SYSTEMREADY_IR_ACS_BRANCH ?= "legacy_systemready"
IMAGE_FILENAME = "ir-acs-live-image-generic-arm64-${PV}.wic"
SRC_URI = " \
https://github.com/ARM-software/arm-systemready/raw/${ARM_SYSTEMREADY_IR_ACS_BRANCH}/IR/prebuilt_images/${FULL_PV}/ir-acs-live-image-generic-arm64.wic.xz;name=acs-img;downloadfilename=${IMAGE_FILENAME}.xz \
+1 -1
View File
@@ -31,7 +31,7 @@ EXTRA_IMAGEDEPENDS += "${FVP_PROVIDER}"
IMAGE_CLASSES += "image-artifact-names"
IMAGE_POSTPROCESS_COMMAND += "do_write_fvpboot_conf;"
IMAGE_POSTPROCESS_COMMAND += "do_write_fvpboot_conf"
python do_write_fvpboot_conf() {
# Note that currently this JSON file is in development and the format may
# change at any point, so it should always be used with a matching runfvp.
@@ -55,3 +55,14 @@ SRCREV_tfm-psa-adac = "5f5490cebe66ae997f316f83c3fbf1f97deef625"
SRCREV_FORMAT = "tfm"
S = "${WORKDIR}/git/tfm"
# Apply patches
inherit apply_local_src_patches
LOCAL_SRC_PATCHES_INPUT_DIR = "N/A"
do_apply_local_src_patches() {
apply_local_src_patches ${S}/lib/ext/qcbor ${WORKDIR}/git/qcbor
apply_local_src_patches ${S}/lib/ext/mbedcrypto ${WORKDIR}/git/mbedtls
apply_local_src_patches ${S}/lib/ext/mcuboot ${WORKDIR}/git/mcuboot
apply_local_src_patches ${S}/lib/ext/tf-m-tests ${WORKDIR}/git/tf-m-tests
}
@@ -0,0 +1,95 @@
From 1cd82c9df9bf86f6e2a48e6964db188dd15ed1f5 Mon Sep 17 00:00:00 2001
From: Jens Wiklander <jens.wiklander@linaro.org>
Date: Fri, 4 Apr 2025 10:24:34 +0200
Subject: [PATCH] Add optee.ta.instanceKeepCrashed property
Add the optee.ta.instanceKeepCrashed property to prevent a TA with
gpd.ta.instanceKeepAlive=true to be restarted. This prevents unexpected
resetting of the state of the TA.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Alex Lewontin <alex.lewontin@canonical.com>
Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
CVE: CVE-2025-46733
Upstream-Status: Backport [https://github.com/OP-TEE/optee_os/commit/941a58d78c99c4754fbd4ec3079ec9e1d596af8f]
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
core/kernel/tee_ta_manager.c | 10 +++++++---
lib/libutee/include/user_ta_header.h | 8 +++++++-
ta/user_ta_header.c | 3 +++
3 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/core/kernel/tee_ta_manager.c b/core/kernel/tee_ta_manager.c
index e47404688..75e55a8e4 100644
--- a/core/kernel/tee_ta_manager.c
+++ b/core/kernel/tee_ta_manager.c
@@ -455,6 +455,7 @@ TEE_Result tee_ta_close_session(struct tee_ta_session *csess,
struct tee_ta_session *sess = NULL;
struct tee_ta_ctx *ctx = NULL;
struct ts_ctx *ts_ctx = NULL;
+ bool keep_crashed = false;
bool keep_alive = false;
DMSG("csess 0x%" PRIxVA " id %u",
@@ -501,9 +502,12 @@ TEE_Result tee_ta_close_session(struct tee_ta_session *csess,
panic();
ctx->ref_count--;
- keep_alive = (ctx->flags & TA_FLAG_INSTANCE_KEEP_ALIVE) &&
- (ctx->flags & TA_FLAG_SINGLE_INSTANCE);
- if (!ctx->ref_count && (ctx->panicked || !keep_alive)) {
+ if (ctx->flags & TA_FLAG_SINGLE_INSTANCE)
+ keep_alive = ctx->flags & TA_FLAG_INSTANCE_KEEP_ALIVE;
+ if (keep_alive)
+ keep_crashed = ctx->flags & TA_FLAG_INSTANCE_KEEP_CRASHED;
+ if (!ctx->ref_count &&
+ ((ctx->panicked && !keep_crashed) || !keep_alive)) {
if (!ctx->is_releasing) {
TAILQ_REMOVE(&tee_ctxes, ctx, link);
ctx->is_releasing = true;
diff --git a/lib/libutee/include/user_ta_header.h b/lib/libutee/include/user_ta_header.h
index 0336c64b2..c5622982f 100644
--- a/lib/libutee/include/user_ta_header.h
+++ b/lib/libutee/include/user_ta_header.h
@@ -52,8 +52,13 @@
BIT32(11)
#define TA_FLAG_DEVICE_ENUM_TEE_STORAGE_PRIVATE \
BIT32(12) /* with TEE_STORAGE_PRIVATE */
+/*
+ * Don't restart a TA with TA_FLAG_INSTANCE_KEEP_ALIVE set if it has
+ * crashed.
+ */
+#define TA_FLAG_INSTANCE_KEEP_CRASHED BIT32(13)
-#define TA_FLAGS_MASK GENMASK_32(12, 0)
+#define TA_FLAGS_MASK GENMASK_32(13, 0)
struct ta_head {
TEE_UUID uuid;
@@ -133,6 +138,7 @@ extern struct __elf_phdr_info __elf_phdr_info;
#define TA_PROP_STR_SINGLE_INSTANCE "gpd.ta.singleInstance"
#define TA_PROP_STR_MULTI_SESSION "gpd.ta.multiSession"
#define TA_PROP_STR_KEEP_ALIVE "gpd.ta.instanceKeepAlive"
+#define TA_PROP_STR_KEEP_CRASHED "optee.ta.instanceKeepCrashed"
#define TA_PROP_STR_DATA_SIZE "gpd.ta.dataSize"
#define TA_PROP_STR_STACK_SIZE "gpd.ta.stackSize"
#define TA_PROP_STR_VERSION "gpd.ta.version"
diff --git a/ta/user_ta_header.c b/ta/user_ta_header.c
index 3125af55c..aa804c1ef 100644
--- a/ta/user_ta_header.c
+++ b/ta/user_ta_header.c
@@ -142,6 +142,9 @@ const struct user_ta_property ta_props[] = {
{TA_PROP_STR_KEEP_ALIVE, USER_TA_PROP_TYPE_BOOL,
&(const bool){(TA_FLAGS & TA_FLAG_INSTANCE_KEEP_ALIVE) != 0}},
+ {TA_PROP_STR_KEEP_CRASHED, USER_TA_PROP_TYPE_BOOL,
+ &(const bool){(TA_FLAGS & TA_FLAG_INSTANCE_KEEP_CRASHED) != 0}},
+
{TA_PROP_STR_DATA_SIZE, USER_TA_PROP_TYPE_U32,
&(const uint32_t){TA_DATA_SIZE}},
--
2.49.0
@@ -8,4 +8,5 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
SRCREV = "8f645256efc0dc66bd5c118778b0b50c44469ae1"
SRC_URI += " \
file://0003-optee-enable-clang-support.patch \
file://CVE-2025-46733.patch \
"