* [PATCH 1/2] arm64: fix incorrect use of pgprot_t variable
@ 2015-06-30 16:04 Ard Biesheuvel
2015-06-30 16:04 ` [PATCH 2/2] arm/arm64: KVM: fix two build failured under STRICT_MM_TYPECHECKS Ard Biesheuvel
2015-06-30 17:04 ` [PATCH 1/2] arm64: fix incorrect use of pgprot_t variable Catalin Marinas
0 siblings, 2 replies; 5+ messages in thread
From: Ard Biesheuvel @ 2015-06-30 16:04 UTC (permalink / raw)
To: linux-arm-kernel
This fixes a build failure under STRICT_MM_TYPECHECKS, by adding
a missing pgprot_val() around a pgport_t reference.
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
arch/arm64/mm/mmu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c
index 5b8b664422d3..79f29bab7259 100644
--- a/arch/arm64/mm/mmu.c
+++ b/arch/arm64/mm/mmu.c
@@ -116,7 +116,7 @@ void split_pud(pud_t *old_pud, pmd_t *pmd)
int i = 0;
do {
- set_pmd(pmd, __pmd(addr | prot));
+ set_pmd(pmd, __pmd(addr | pgprot_val(prot)));
addr += PMD_SIZE;
} while (pmd++, i++, i < PTRS_PER_PMD);
}
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH 2/2] arm/arm64: KVM: fix two build failured under STRICT_MM_TYPECHECKS
2015-06-30 16:04 [PATCH 1/2] arm64: fix incorrect use of pgprot_t variable Ard Biesheuvel
@ 2015-06-30 16:04 ` Ard Biesheuvel
2015-06-30 17:03 ` Catalin Marinas
2015-06-30 17:04 ` [PATCH 1/2] arm64: fix incorrect use of pgprot_t variable Catalin Marinas
1 sibling, 1 reply; 5+ messages in thread
From: Ard Biesheuvel @ 2015-06-30 16:04 UTC (permalink / raw)
To: linux-arm-kernel
This fixes two instances where a pgprot_t is used as the operand
of a bitwise & operation. In order to comply with STRICT_MM_TYPECHECKS,
bitwise arithmetic on a pgprot_t should go via the pgprot_val()
accessor.
Cc: kvmarm at lists.cs.columbia.edu
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
arch/arm/kvm/mmu.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/arch/arm/kvm/mmu.c b/arch/arm/kvm/mmu.c
index 1d5accbd3dcf..a255c7dd534b 100644
--- a/arch/arm/kvm/mmu.c
+++ b/arch/arm/kvm/mmu.c
@@ -213,7 +213,8 @@ static void unmap_ptes(struct kvm *kvm, pmd_t *pmd,
kvm_tlb_flush_vmid_ipa(kvm, addr);
/* No need to invalidate the cache for device mappings */
- if ((pte_val(old_pte) & PAGE_S2_DEVICE) != PAGE_S2_DEVICE)
+ if ((pte_val(old_pte) & pgprot_val(PAGE_S2_DEVICE)) !=
+ pgprot_val(PAGE_S2_DEVICE))
kvm_flush_dcache_pte(old_pte);
put_page(virt_to_page(pte));
@@ -306,7 +307,8 @@ static void stage2_flush_ptes(struct kvm *kvm, pmd_t *pmd,
pte = pte_offset_kernel(pmd, addr);
do {
if (!pte_none(*pte) &&
- (pte_val(*pte) & PAGE_S2_DEVICE) != PAGE_S2_DEVICE)
+ (pte_val(*pte) & pgprot_val(PAGE_S2_DEVICE)) !=
+ pgprot_val(PAGE_S2_DEVICE))
kvm_flush_dcache_pte(*pte);
} while (pte++, addr += PAGE_SIZE, addr != end);
}
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH 2/2] arm/arm64: KVM: fix two build failured under STRICT_MM_TYPECHECKS
2015-06-30 16:04 ` [PATCH 2/2] arm/arm64: KVM: fix two build failured under STRICT_MM_TYPECHECKS Ard Biesheuvel
@ 2015-06-30 17:03 ` Catalin Marinas
2015-07-01 10:56 ` Marc Zyngier
0 siblings, 1 reply; 5+ messages in thread
From: Catalin Marinas @ 2015-06-30 17:03 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Jun 30, 2015 at 06:04:50PM +0200, Ard Biesheuvel wrote:
> This fixes two instances where a pgprot_t is used as the operand
> of a bitwise & operation. In order to comply with STRICT_MM_TYPECHECKS,
> bitwise arithmetic on a pgprot_t should go via the pgprot_val()
> accessor.
>
> Cc: kvmarm at lists.cs.columbia.edu
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
(I guess it will go via the kvm tree)
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/2] arm/arm64: KVM: fix two build failured under STRICT_MM_TYPECHECKS
2015-06-30 17:03 ` Catalin Marinas
@ 2015-07-01 10:56 ` Marc Zyngier
0 siblings, 0 replies; 5+ messages in thread
From: Marc Zyngier @ 2015-07-01 10:56 UTC (permalink / raw)
To: linux-arm-kernel
On 30/06/15 18:03, Catalin Marinas wrote:
> On Tue, Jun 30, 2015 at 06:04:50PM +0200, Ard Biesheuvel wrote:
>> This fixes two instances where a pgprot_t is used as the operand
>> of a bitwise & operation. In order to comply with STRICT_MM_TYPECHECKS,
>> bitwise arithmetic on a pgprot_t should go via the pgprot_val()
>> accessor.
>>
>> Cc: kvmarm at lists.cs.columbia.edu
>> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
>
> Acked-by: Catalin Marinas <catalin.marinas@arm.com>
>
> (I guess it will go via the kvm tree)
Yes, I'll queue it.
Thanks,
M.
--
Jazz is not dead. It just smells funny...
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] arm64: fix incorrect use of pgprot_t variable
2015-06-30 16:04 [PATCH 1/2] arm64: fix incorrect use of pgprot_t variable Ard Biesheuvel
2015-06-30 16:04 ` [PATCH 2/2] arm/arm64: KVM: fix two build failured under STRICT_MM_TYPECHECKS Ard Biesheuvel
@ 2015-06-30 17:04 ` Catalin Marinas
1 sibling, 0 replies; 5+ messages in thread
From: Catalin Marinas @ 2015-06-30 17:04 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Jun 30, 2015 at 06:04:49PM +0200, Ard Biesheuvel wrote:
> This fixes a build failure under STRICT_MM_TYPECHECKS, by adding
> a missing pgprot_val() around a pgport_t reference.
>
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Applied. Thanks.
--
Catalin
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-07-01 10:56 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-30 16:04 [PATCH 1/2] arm64: fix incorrect use of pgprot_t variable Ard Biesheuvel
2015-06-30 16:04 ` [PATCH 2/2] arm/arm64: KVM: fix two build failured under STRICT_MM_TYPECHECKS Ard Biesheuvel
2015-06-30 17:03 ` Catalin Marinas
2015-07-01 10:56 ` Marc Zyngier
2015-06-30 17:04 ` [PATCH 1/2] arm64: fix incorrect use of pgprot_t variable Catalin Marinas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).