From: Jason Gunthorpe <jgg@ziepe.ca>
To: Nicolin Chen <nicolinc@nvidia.com>
Cc: Robin Murphy <robin.murphy@arm.com>,
will@kernel.org, joro@8bytes.org, thunder.leizhen@huawei.com,
tglx@linutronix.de, john.garry@huawei.com,
jean-philippe@linaro.org, christophe.jaillet@wanadoo.fr,
linux-arm-kernel@lists.infradead.org,
iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iommu/arm-smmu-v3: Align size in __arm_smmu_tlb_inv_range
Date: Tue, 19 Apr 2022 17:02:33 -0300 [thread overview]
Message-ID: <20220419200233.GN64706@ziepe.ca> (raw)
In-Reply-To: <Yloj6GM+yykImKvp@Asurada-Nvidia>
On Fri, Apr 15, 2022 at 07:03:20PM -0700, Nicolin Chen wrote:
> diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-sva.c b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-sva.c
> index d816759a6bcf..e280568bb513 100644
> +++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-sva.c
> @@ -183,7 +183,7 @@ static void arm_smmu_mm_invalidate_range(struct mmu_notifier *mn,
> {
> struct arm_smmu_mmu_notifier *smmu_mn = mn_to_smmu(mn);
> struct arm_smmu_domain *smmu_domain = smmu_mn->domain;
> - size_t size = end - start + 1;
> + size_t size = end - start;
+1 to this bug fix. You should send a formal patch for stable with a fixes/etc
mmu notifiers uses 'end' not 'last' in alignment with how VMA's work:
include/linux/mm_types.h: unsigned long vm_end; /* The first byte after our end address
Jason
WARNING: multiple messages have this Message-ID (diff)
From: Jason Gunthorpe <jgg@ziepe.ca>
To: Nicolin Chen <nicolinc@nvidia.com>
Cc: jean-philippe@linaro.org, Robin Murphy <robin.murphy@arm.com>,
linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org,
christophe.jaillet@wanadoo.fr, tglx@linutronix.de,
will@kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] iommu/arm-smmu-v3: Align size in __arm_smmu_tlb_inv_range
Date: Tue, 19 Apr 2022 17:02:33 -0300 [thread overview]
Message-ID: <20220419200233.GN64706@ziepe.ca> (raw)
In-Reply-To: <Yloj6GM+yykImKvp@Asurada-Nvidia>
On Fri, Apr 15, 2022 at 07:03:20PM -0700, Nicolin Chen wrote:
> diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-sva.c b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-sva.c
> index d816759a6bcf..e280568bb513 100644
> +++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-sva.c
> @@ -183,7 +183,7 @@ static void arm_smmu_mm_invalidate_range(struct mmu_notifier *mn,
> {
> struct arm_smmu_mmu_notifier *smmu_mn = mn_to_smmu(mn);
> struct arm_smmu_domain *smmu_domain = smmu_mn->domain;
> - size_t size = end - start + 1;
> + size_t size = end - start;
+1 to this bug fix. You should send a formal patch for stable with a fixes/etc
mmu notifiers uses 'end' not 'last' in alignment with how VMA's work:
include/linux/mm_types.h: unsigned long vm_end; /* The first byte after our end address
Jason
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
WARNING: multiple messages have this Message-ID (diff)
From: Jason Gunthorpe <jgg@ziepe.ca>
To: Nicolin Chen <nicolinc@nvidia.com>
Cc: Robin Murphy <robin.murphy@arm.com>,
will@kernel.org, joro@8bytes.org, thunder.leizhen@huawei.com,
tglx@linutronix.de, john.garry@huawei.com,
jean-philippe@linaro.org, christophe.jaillet@wanadoo.fr,
linux-arm-kernel@lists.infradead.org,
iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iommu/arm-smmu-v3: Align size in __arm_smmu_tlb_inv_range
Date: Tue, 19 Apr 2022 17:02:33 -0300 [thread overview]
Message-ID: <20220419200233.GN64706@ziepe.ca> (raw)
In-Reply-To: <Yloj6GM+yykImKvp@Asurada-Nvidia>
On Fri, Apr 15, 2022 at 07:03:20PM -0700, Nicolin Chen wrote:
> diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-sva.c b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-sva.c
> index d816759a6bcf..e280568bb513 100644
> +++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-sva.c
> @@ -183,7 +183,7 @@ static void arm_smmu_mm_invalidate_range(struct mmu_notifier *mn,
> {
> struct arm_smmu_mmu_notifier *smmu_mn = mn_to_smmu(mn);
> struct arm_smmu_domain *smmu_domain = smmu_mn->domain;
> - size_t size = end - start + 1;
> + size_t size = end - start;
+1 to this bug fix. You should send a formal patch for stable with a fixes/etc
mmu notifiers uses 'end' not 'last' in alignment with how VMA's work:
include/linux/mm_types.h: unsigned long vm_end; /* The first byte after our end address
Jason
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-04-19 20:02 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-13 4:17 [PATCH] iommu/arm-smmu-v3: Align size in __arm_smmu_tlb_inv_range Nicolin Chen
2022-04-13 4:17 ` Nicolin Chen
2022-04-13 4:17 ` Nicolin Chen via iommu
2022-04-13 13:40 ` Robin Murphy
2022-04-13 13:40 ` Robin Murphy
2022-04-13 13:40 ` Robin Murphy
2022-04-13 20:19 ` Nicolin Chen
2022-04-13 20:19 ` Nicolin Chen
2022-04-13 20:19 ` Nicolin Chen via iommu
2022-04-14 10:32 ` Robin Murphy
2022-04-14 10:32 ` Robin Murphy
2022-04-14 10:32 ` Robin Murphy
2022-04-15 3:56 ` Nicolin Chen
2022-04-15 3:56 ` Nicolin Chen
2022-04-15 3:56 ` Nicolin Chen via iommu
2022-04-16 2:03 ` Nicolin Chen via iommu
2022-04-16 2:03 ` Nicolin Chen
2022-04-16 2:03 ` Nicolin Chen
2022-04-19 20:02 ` Jason Gunthorpe [this message]
2022-04-19 20:02 ` Jason Gunthorpe
2022-04-19 20:02 ` Jason Gunthorpe
2022-04-19 20:05 ` Nicolin Chen
2022-04-19 20:05 ` Nicolin Chen
2022-04-19 20:05 ` Nicolin Chen via iommu
2022-04-19 20:15 ` Robin Murphy
2022-04-19 20:15 ` Robin Murphy
2022-04-19 20:15 ` Robin Murphy
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=20220419200233.GN64706@ziepe.ca \
--to=jgg@ziepe.ca \
--cc=christophe.jaillet@wanadoo.fr \
--cc=iommu@lists.linux-foundation.org \
--cc=jean-philippe@linaro.org \
--cc=john.garry@huawei.com \
--cc=joro@8bytes.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nicolinc@nvidia.com \
--cc=robin.murphy@arm.com \
--cc=tglx@linutronix.de \
--cc=thunder.leizhen@huawei.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 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.