--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -37,6 +37,7 @@
#include <linux/page_owner.h>
#include <linux/sched/sysctl.h>
#include <linux/memory-tiers.h>
+#include <linux/compat.h>
#include <asm/tlb.h>
#include <asm/pgalloc.h>
@@ -811,6 +812,14 @@ static unsigned long __thp_get_unmapped_area(struct file *filp,
loff_t off_align = round_up(off, size);
unsigned long len_pad, ret;
+ /*
+ * It doesn't make too much sense to froce huge page alignment on
+ * 32 bit system or compat userspace due to the contrained virtual
+ * address space and address entropy.
+ */
FWIW,
Bernhard noticed that "froce" and "contrained", could you fix that before applying the patch?
thanks,