* [PATCH] Revert "iommu/io-pgtable-arm: Check for v7s-incapable systems"
@ 2018-12-13 9:19 ` Yong Wu
0 siblings, 0 replies; 7+ messages in thread
From: Yong Wu @ 2018-12-13 9:19 UTC (permalink / raw)
To: Robin Murphy, Will Deacon, Joerg Roedel, Matthias Brugger
Cc: Tomasz Figa, linux-mediatek, srv_heupstream, linux-kernel,
linux-arm-kernel, iommu, yong.wu, youlin.pei, Nicolas Boichat,
CK Hu, Stephen Boyd
This reverts commit 82db33dc5e49fb625262d81125625d07a0d6184e.
After the commit 29859aeb8a6e ("iommu/io-pgtable-arm-v7s: Abort
allocation when table address overflows the PTE"), v7s will return fail
if the page table allocation isn't expected. this PHYS_OFFSET check
is unnecessary now.
And this check may lead to fail. For example, If CONFIG_RANDOMIZE_BASE
is enabled, the "memstart_addr" will be updated randomly, then the
PHYS_OFFSET may be random.
Reported-by: CK Hu <ck.hu@mediatek.com>
Signed-off-by: Yong Wu <yong.wu@mediatek.com>
---
drivers/iommu/io-pgtable-arm-v7s.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/iommu/io-pgtable-arm-v7s.c b/drivers/iommu/io-pgtable-arm-v7s.c
index 445c3bd..cec29bf 100644
--- a/drivers/iommu/io-pgtable-arm-v7s.c
+++ b/drivers/iommu/io-pgtable-arm-v7s.c
@@ -709,10 +709,6 @@ static struct io_pgtable *arm_v7s_alloc_pgtable(struct io_pgtable_cfg *cfg,
{
struct arm_v7s_io_pgtable *data;
-#ifdef PHYS_OFFSET
- if (upper_32_bits(PHYS_OFFSET))
- return NULL;
-#endif
if (cfg->ias > ARM_V7S_ADDR_BITS || cfg->oas > ARM_V7S_ADDR_BITS)
return NULL;
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH] Revert "iommu/io-pgtable-arm: Check for v7s-incapable systems"
@ 2018-12-13 9:19 ` Yong Wu
0 siblings, 0 replies; 7+ messages in thread
From: Yong Wu @ 2018-12-13 9:19 UTC (permalink / raw)
To: Robin Murphy, Will Deacon, Joerg Roedel, Matthias Brugger
Cc: Tomasz Figa, linux-mediatek, srv_heupstream, linux-kernel,
linux-arm-kernel, iommu, yong.wu, youlin.pei, Nicolas Boichat,
CK Hu, Stephen Boyd
This reverts commit 82db33dc5e49fb625262d81125625d07a0d6184e.
After the commit 29859aeb8a6e ("iommu/io-pgtable-arm-v7s: Abort
allocation when table address overflows the PTE"), v7s will return fail
if the page table allocation isn't expected. this PHYS_OFFSET check
is unnecessary now.
And this check may lead to fail. For example, If CONFIG_RANDOMIZE_BASE
is enabled, the "memstart_addr" will be updated randomly, then the
PHYS_OFFSET may be random.
Reported-by: CK Hu <ck.hu@mediatek.com>
Signed-off-by: Yong Wu <yong.wu@mediatek.com>
---
drivers/iommu/io-pgtable-arm-v7s.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/iommu/io-pgtable-arm-v7s.c b/drivers/iommu/io-pgtable-arm-v7s.c
index 445c3bd..cec29bf 100644
--- a/drivers/iommu/io-pgtable-arm-v7s.c
+++ b/drivers/iommu/io-pgtable-arm-v7s.c
@@ -709,10 +709,6 @@ static struct io_pgtable *arm_v7s_alloc_pgtable(struct io_pgtable_cfg *cfg,
{
struct arm_v7s_io_pgtable *data;
-#ifdef PHYS_OFFSET
- if (upper_32_bits(PHYS_OFFSET))
- return NULL;
-#endif
if (cfg->ias > ARM_V7S_ADDR_BITS || cfg->oas > ARM_V7S_ADDR_BITS)
return NULL;
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH] Revert "iommu/io-pgtable-arm: Check for v7s-incapable systems"
@ 2018-12-13 9:19 ` Yong Wu
0 siblings, 0 replies; 7+ messages in thread
From: Yong Wu @ 2018-12-13 9:19 UTC (permalink / raw)
To: Robin Murphy, Will Deacon, Joerg Roedel, Matthias Brugger
Cc: youlin.pei, Nicolas Boichat, srv_heupstream, linux-kernel,
Stephen Boyd, Tomasz Figa, iommu, linux-mediatek, yong.wu, CK Hu,
linux-arm-kernel
This reverts commit 82db33dc5e49fb625262d81125625d07a0d6184e.
After the commit 29859aeb8a6e ("iommu/io-pgtable-arm-v7s: Abort
allocation when table address overflows the PTE"), v7s will return fail
if the page table allocation isn't expected. this PHYS_OFFSET check
is unnecessary now.
And this check may lead to fail. For example, If CONFIG_RANDOMIZE_BASE
is enabled, the "memstart_addr" will be updated randomly, then the
PHYS_OFFSET may be random.
Reported-by: CK Hu <ck.hu@mediatek.com>
Signed-off-by: Yong Wu <yong.wu@mediatek.com>
---
drivers/iommu/io-pgtable-arm-v7s.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/iommu/io-pgtable-arm-v7s.c b/drivers/iommu/io-pgtable-arm-v7s.c
index 445c3bd..cec29bf 100644
--- a/drivers/iommu/io-pgtable-arm-v7s.c
+++ b/drivers/iommu/io-pgtable-arm-v7s.c
@@ -709,10 +709,6 @@ static struct io_pgtable *arm_v7s_alloc_pgtable(struct io_pgtable_cfg *cfg,
{
struct arm_v7s_io_pgtable *data;
-#ifdef PHYS_OFFSET
- if (upper_32_bits(PHYS_OFFSET))
- return NULL;
-#endif
if (cfg->ias > ARM_V7S_ADDR_BITS || cfg->oas > ARM_V7S_ADDR_BITS)
return NULL;
--
1.9.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] Revert "iommu/io-pgtable-arm: Check for v7s-incapable systems"
2018-12-13 9:19 ` Yong Wu
@ 2018-12-13 10:26 ` Robin Murphy
-1 siblings, 0 replies; 7+ messages in thread
From: Robin Murphy @ 2018-12-13 10:26 UTC (permalink / raw)
To: Yong Wu, Will Deacon, Joerg Roedel, Matthias Brugger
Cc: Tomasz Figa, linux-mediatek, srv_heupstream, linux-kernel,
linux-arm-kernel, iommu, youlin.pei, Nicolas Boichat, CK Hu,
Stephen Boyd
On 2018-12-13 9:19 am, Yong Wu wrote:
> This reverts commit 82db33dc5e49fb625262d81125625d07a0d6184e.
>
> After the commit 29859aeb8a6e ("iommu/io-pgtable-arm-v7s: Abort
> allocation when table address overflows the PTE"), v7s will return fail
> if the page table allocation isn't expected. this PHYS_OFFSET check
> is unnecessary now.
>
> And this check may lead to fail. For example, If CONFIG_RANDOMIZE_BASE
> is enabled, the "memstart_addr" will be updated randomly, then the
> PHYS_OFFSET may be random.
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Joerg, if you have any more fixes to send for 4.19, please consider
picking this up directly.
Thanks,
Robin.
> Reported-by: CK Hu <ck.hu@mediatek.com>
> Signed-off-by: Yong Wu <yong.wu@mediatek.com>
> ---
> drivers/iommu/io-pgtable-arm-v7s.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/drivers/iommu/io-pgtable-arm-v7s.c b/drivers/iommu/io-pgtable-arm-v7s.c
> index 445c3bd..cec29bf 100644
> --- a/drivers/iommu/io-pgtable-arm-v7s.c
> +++ b/drivers/iommu/io-pgtable-arm-v7s.c
> @@ -709,10 +709,6 @@ static struct io_pgtable *arm_v7s_alloc_pgtable(struct io_pgtable_cfg *cfg,
> {
> struct arm_v7s_io_pgtable *data;
>
> -#ifdef PHYS_OFFSET
> - if (upper_32_bits(PHYS_OFFSET))
> - return NULL;
> -#endif
> if (cfg->ias > ARM_V7S_ADDR_BITS || cfg->oas > ARM_V7S_ADDR_BITS)
> return NULL;
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Revert "iommu/io-pgtable-arm: Check for v7s-incapable systems"
@ 2018-12-13 10:26 ` Robin Murphy
0 siblings, 0 replies; 7+ messages in thread
From: Robin Murphy @ 2018-12-13 10:26 UTC (permalink / raw)
To: Yong Wu, Will Deacon, Joerg Roedel, Matthias Brugger
Cc: youlin.pei, Nicolas Boichat, srv_heupstream, linux-kernel,
Stephen Boyd, Tomasz Figa, iommu, linux-mediatek, CK Hu,
linux-arm-kernel
On 2018-12-13 9:19 am, Yong Wu wrote:
> This reverts commit 82db33dc5e49fb625262d81125625d07a0d6184e.
>
> After the commit 29859aeb8a6e ("iommu/io-pgtable-arm-v7s: Abort
> allocation when table address overflows the PTE"), v7s will return fail
> if the page table allocation isn't expected. this PHYS_OFFSET check
> is unnecessary now.
>
> And this check may lead to fail. For example, If CONFIG_RANDOMIZE_BASE
> is enabled, the "memstart_addr" will be updated randomly, then the
> PHYS_OFFSET may be random.
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Joerg, if you have any more fixes to send for 4.19, please consider
picking this up directly.
Thanks,
Robin.
> Reported-by: CK Hu <ck.hu@mediatek.com>
> Signed-off-by: Yong Wu <yong.wu@mediatek.com>
> ---
> drivers/iommu/io-pgtable-arm-v7s.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/drivers/iommu/io-pgtable-arm-v7s.c b/drivers/iommu/io-pgtable-arm-v7s.c
> index 445c3bd..cec29bf 100644
> --- a/drivers/iommu/io-pgtable-arm-v7s.c
> +++ b/drivers/iommu/io-pgtable-arm-v7s.c
> @@ -709,10 +709,6 @@ static struct io_pgtable *arm_v7s_alloc_pgtable(struct io_pgtable_cfg *cfg,
> {
> struct arm_v7s_io_pgtable *data;
>
> -#ifdef PHYS_OFFSET
> - if (upper_32_bits(PHYS_OFFSET))
> - return NULL;
> -#endif
> if (cfg->ias > ARM_V7S_ADDR_BITS || cfg->oas > ARM_V7S_ADDR_BITS)
> return NULL;
>
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Revert "iommu/io-pgtable-arm: Check for v7s-incapable systems"
2018-12-13 9:19 ` Yong Wu
@ 2018-12-17 9:20 ` Joerg Roedel
-1 siblings, 0 replies; 7+ messages in thread
From: Joerg Roedel @ 2018-12-17 9:20 UTC (permalink / raw)
To: Yong Wu
Cc: Robin Murphy, Will Deacon, Matthias Brugger, Tomasz Figa,
linux-mediatek, srv_heupstream, linux-kernel, linux-arm-kernel,
iommu, youlin.pei, Nicolas Boichat, CK Hu, Stephen Boyd
On Thu, Dec 13, 2018 at 05:19:48PM +0800, Yong Wu wrote:
> This reverts commit 82db33dc5e49fb625262d81125625d07a0d6184e.
>
> After the commit 29859aeb8a6e ("iommu/io-pgtable-arm-v7s: Abort
> allocation when table address overflows the PTE"), v7s will return fail
> if the page table allocation isn't expected. this PHYS_OFFSET check
> is unnecessary now.
>
> And this check may lead to fail. For example, If CONFIG_RANDOMIZE_BASE
> is enabled, the "memstart_addr" will be updated randomly, then the
> PHYS_OFFSET may be random.
>
> Reported-by: CK Hu <ck.hu@mediatek.com>
> Signed-off-by: Yong Wu <yong.wu@mediatek.com>
> ---
> drivers/iommu/io-pgtable-arm-v7s.c | 4 ----
> 1 file changed, 4 deletions(-)
Applied to iommu/fixes, thanks.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Revert "iommu/io-pgtable-arm: Check for v7s-incapable systems"
@ 2018-12-17 9:20 ` Joerg Roedel
0 siblings, 0 replies; 7+ messages in thread
From: Joerg Roedel @ 2018-12-17 9:20 UTC (permalink / raw)
To: Yong Wu
Cc: youlin.pei, Nicolas Boichat, srv_heupstream, Will Deacon,
linux-kernel, Stephen Boyd, Tomasz Figa, iommu, CK Hu,
linux-mediatek, Matthias Brugger, Robin Murphy, linux-arm-kernel
On Thu, Dec 13, 2018 at 05:19:48PM +0800, Yong Wu wrote:
> This reverts commit 82db33dc5e49fb625262d81125625d07a0d6184e.
>
> After the commit 29859aeb8a6e ("iommu/io-pgtable-arm-v7s: Abort
> allocation when table address overflows the PTE"), v7s will return fail
> if the page table allocation isn't expected. this PHYS_OFFSET check
> is unnecessary now.
>
> And this check may lead to fail. For example, If CONFIG_RANDOMIZE_BASE
> is enabled, the "memstart_addr" will be updated randomly, then the
> PHYS_OFFSET may be random.
>
> Reported-by: CK Hu <ck.hu@mediatek.com>
> Signed-off-by: Yong Wu <yong.wu@mediatek.com>
> ---
> drivers/iommu/io-pgtable-arm-v7s.c | 4 ----
> 1 file changed, 4 deletions(-)
Applied to iommu/fixes, thanks.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2018-12-17 9:20 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-13 9:19 [PATCH] Revert "iommu/io-pgtable-arm: Check for v7s-incapable systems" Yong Wu
2018-12-13 9:19 ` Yong Wu
2018-12-13 9:19 ` Yong Wu
2018-12-13 10:26 ` Robin Murphy
2018-12-13 10:26 ` Robin Murphy
2018-12-17 9:20 ` Joerg Roedel
2018-12-17 9:20 ` Joerg Roedel
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.