[wrecked] hugetlb-provide-safer-dummy-values-for-hpage_mask-and-hpage_size.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: hugetlb: provide safer dummy values for HPAGE_MASK and HPAGE_SIZE
has been removed from the -mm tree.  Its filename was
     hugetlb-provide-safer-dummy-values-for-hpage_mask-and-hpage_size.patch

This patch was dropped because other changes were merged, which wrecked this patch

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
From: David Daney <david.daney@xxxxxxxxxx>
Subject: hugetlb: provide safer dummy values for HPAGE_MASK and HPAGE_SIZE

It was pointed out by David Rientjes that the dummy values for HPAGE_MASK
and HPAGE_SIZE are quite unsafe.  It they are inadvertently used with
!CONFIG_HUGETLB_PAGE, compilation would succeed, but the resulting code
would surly not do anything sensible.

Place BUG() in the these dummy definitions, as we do in similar
circumstances in other places, so any abuse can be easily detected.

Signed-off-by: David Daney <david.daney@xxxxxxxxxx>
Cc: David Rientjes <rientjes@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 include/linux/hugetlb.h |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff -puN include/linux/hugetlb.h~hugetlb-provide-safer-dummy-values-for-hpage_mask-and-hpage_size include/linux/hugetlb.h
--- a/include/linux/hugetlb.h~hugetlb-provide-safer-dummy-values-for-hpage_mask-and-hpage_size
+++ a/include/linux/hugetlb.h
@@ -111,8 +111,9 @@ static inline void copy_huge_page(struct
 #define hugetlb_change_protection(vma, address, end, newprot)
 
 #ifndef HPAGE_MASK
-#define HPAGE_MASK	PAGE_MASK		/* Keep the compiler happy */
-#define HPAGE_SIZE	PAGE_SIZE
+/* Keep the compiler happy with some dummy (but BUGgy) values */
+#define HPAGE_MASK	({BUG(); 0; })
+#define HPAGE_SIZE	({BUG(); 0; })
 #define HPAGE_SHIFT	({BUG(); 0; })
 #endif
 
_

Patches currently in -mm which might be from david.daney@xxxxxxxxxx are

origin.patch
linux-next.patch
hugetlb-provide-safer-dummy-values-for-hpage_mask-and-hpage_size-fix.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux