@@ -32,7 +32,7 @@
pkey-31 and exec-only key */
#define PKEY_BITS_PER_PKEY 2
#define HPAGE_SIZE (1UL << 24)
-#define PAGE_SIZE (1UL << 16)
+#define PAGE_SIZE sysconf(_SC_PAGESIZE)
static inline u32 pkey_bit_position(int pkey)
{
@@ -146,7 +146,12 @@ void abort_hooks(void)
* will then fault, which makes sure that the fault code handles
* execute-only memory properly.
*/
+#ifdef __powerpc64__
+/* This way, both 4K and 64K alignment are maintained */
+__attribute__((__aligned__(65536)))
+#else
__attribute__((__aligned__(PAGE_SIZE)))
+#endif
void lots_o_noops_around_write(int *write_to_me)
{
dprintf3("running %s()\n", __func__);