Re: [PATCH] [26/31] CPA: Fix reference counting when changing already changed pages
- From: "Jan Beulich" <jbeulich@xxxxxxxxxx>
- Date: Tue, 15 Jan 2008 09:05:44 +0000
+ ref_prot = canon_pgprot(ref_prot);
+ prot = canon_pgprot(prot);
+
if (pgprot_val(prot) != pgprot_val(ref_prot)) {
...
} else if (level == 4) {
...
} else {
/*
* When you're here you either set the same page to PAGE_KERNEL
Doesn't this change require modifying the BUG() here into a BUG_ON() so
that it doesn't trigger if pgprot_val(prot) == pgprot_val(ref_prot) and
level != 4?
+#define canon_pgprot(p) __pgprot(pgprot_val(p) & __supported_pte_mask)
While I remember you stated the inverse, I continue to think that it'd be
safer to mask out the accessed and dirty flags for the comparisons this
macro is being used for.
Jan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- References:
- [PATCH] [0/31] Great change_page_attr patch series v2
- From: Andi Kleen
- [PATCH] [26/31] CPA: Fix reference counting when changing already changed pages
- From: Andi Kleen
- [PATCH] [0/31] Great change_page_attr patch series v2
- Prev by Date: Re: [RFC PATCH 4/4] [RESEND] Recomputing msgmni on memory add / remove
- Next by Date: Re: Latest git-x86 doesn't build on 32bit
- Previous by thread: [PATCH] [26/31] CPA: Fix reference counting when changing already changed pages
- Next by thread: Re: [PATCH] [26/31] CPA: Fix reference counting when changing already changed pages
- Index(es):
Relevant Pages
|