Re: [PATCH v4 03/12] firmware: qcom_scm: Introduce PAS context initialization and destroy helper

From: Bryan O'Donoghue

Date: Tue Oct 07 2025 - 18:16:31 EST


On 07/10/2025 22:23, Manivannan Sadhasivam wrote:
+void qcom_scm_pas_context_destroy(struct qcom_scm_pas_context *ctx)
+{
+ kfree(ctx->metadata);
+ ctx->metadata = NULL;
+ ctx->dev = NULL;
+ ctx->pas_id = 0;
+ ctx->mem_phys = 0;
+ ctx->mem_size = 0;
Why do you need to zero initialize these fields before freeing? Are they
carrying any sensitive data that warrants zero initialization?

Mukesh, have to say I don't think adding my RB to this patch is really warranted.

I gave review feedback that the above looked odd.

https://lore.kernel.org/linux-arm-msm/9139706a-708c-4be6-a994-120cce0cd0e6@xxxxxxxxxx

Could you please drop my RB here, and fix the above in your next version.

Also please add me to the cc list for the whole series.

---
bod