mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nicolin Chen <nicolinc@nvidia.com>
To: Mostafa Saleh <smostafa@google.com>
Cc: <linux-kernel@vger.kernel.org>, <iommu@lists.linux.dev>,
	<linux-arm-kernel@lists.infradead.org>, <will@kernel.org>,
	<robin.murphy@arm.com>, <joro@8bytes.org>, <jgg@ziepe.ca>,
	<praan@google.com>
Subject: Re: [PATCH 4/7] iommu/arm-smmu-v3-test: Fix arm_smmu_v3_test_debug_print_used_bits()
Date: Fri, 28 Aug 2026 09:12:49 -0700	[thread overview]
Message-ID: <apGzgQ8Rq42h+Rlw@nvidia.com> (raw)
In-Reply-To: <20260828125409.1921538-5-smostafa@google.com>

On Fri, Aug 28, 2026 at 12:53:39PM +0000, Mostafa Saleh wrote:
> arm_smmu_v3_test_debug_print_used_bits() hardcodes arm_smmu_get_ste_used()
> instead of using the provided writer->ops->get_used() callback.
> This caused Context Descriptors to be incorrectly parsed as STEs.
> 
> Fixes: 56e1a4cc2588 ("iommu/arm-smmu-v3: Add unit tests for arm_smmu_write_entry")
> Reported-by: Sashiko <>
> Signed-off-by: Mostafa Saleh <smostafa@google.com>
> ---
>  drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-test.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-test.c b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-test.c
> index add671363c82..eae08d4d77ec 100644
> --- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-test.c
> +++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-test.c
> @@ -125,8 +125,8 @@ arm_smmu_v3_test_debug_print_used_bits(struct arm_smmu_entry_writer *writer,
>  {
>  	__le64 used_bits[NUM_ENTRY_QWORDS] = {};
>  
> -	arm_smmu_get_ste_used(ste, used_bits);
> -	pr_debug("STE used bits: ");
> +	writer->ops->get_used(ste, used_bits);
> +	pr_debug("Entry used bits: ");

Nit: the name of the 2nd function parameter is still "ste" being
used at writer->ops->get_used. Maybe it should change to "ent"?

Otherwise,

Reviewed-by: Nicolin Chen <nicolinc@nvidia.com>

  parent reply	other threads:[~2026-08-28 16:13 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-28 12:53 [PATCH 0/7] iommu/arm-smmu-v3: Fixes reported by Sashiko Mostafa Saleh
2026-08-28 12:53 ` [PATCH 1/7] iommu/arm-smmu-v3: Ensure L2 tables are visible before L1 ptrs Mostafa Saleh
2026-08-28 14:27   ` Jason Gunthorpe
2026-08-28 16:03   ` Nicolin Chen
2026-08-28 12:53 ` [PATCH 2/7] iommu/arm-smmu-v3: Prevent rbtree corruption from duplicate streams Mostafa Saleh
2026-08-28 14:27   ` Jason Gunthorpe
2026-08-28 15:51   ` Nicolin Chen
2026-08-28 12:53 ` [PATCH 3/7] iommu/arm-smmu-v3-iommufd: Fix error path in arm_vsmmu_cache_invalidate() Mostafa Saleh
2026-08-28 14:27   ` Jason Gunthorpe
2026-08-28 12:53 ` [PATCH 4/7] iommu/arm-smmu-v3-test: Fix arm_smmu_v3_test_debug_print_used_bits() Mostafa Saleh
2026-08-28 14:27   ` Jason Gunthorpe
2026-08-28 16:12   ` Nicolin Chen [this message]
2026-08-28 12:53 ` [PATCH 5/7] iommu/arm-smmu-v3-test: Add missing error checks for inv array Mostafa Saleh
2026-08-28 14:27   ` Jason Gunthorpe
2026-08-28 12:53 ` [PATCH 6/7] iommu/arm-smmu-v3-test: Fix OOB in arm_smmu_v3_invs_test_verify() Mostafa Saleh
2026-08-28 14:27   ` Jason Gunthorpe
2026-08-28 16:14   ` Nicolin Chen
2026-08-28 12:53 ` [PATCH 7/7] iommu/arm-smmu-v3-test: Fix UBSAN error Mostafa Saleh
2026-08-28 14:27   ` Jason Gunthorpe
2026-08-28 16:14   ` Nicolin Chen

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=apGzgQ8Rq42h+Rlw@nvidia.com \
    --to=nicolinc@nvidia.com \
    --cc=iommu@lists.linux.dev \
    --cc=jgg@ziepe.ca \
    --cc=joro@8bytes.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=praan@google.com \
    --cc=robin.murphy@arm.com \
    --cc=smostafa@google.com \
    --cc=will@kernel.org \
    /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®