Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [day] [month] [year] [list]
Date: Wed, 28 Jan 2015 18:46:52 +0100
From: Trutz Behn <me@...tz.be>
To: musl@...ts.openwall.com
Subject: [PATCH] move MREMAP_MAYMOVE and MREMAP_FIXED out of bits

the definitions are generic for all kernel archs. exposure of these
macros now only occurs on the same feature test as for the function
accepting them, which is believed to be more correct.
---
 arch/arm/bits/mman.h        | 3 ---
 arch/i386/bits/mman.h       | 3 ---
 arch/microblaze/bits/mman.h | 3 ---
 arch/mips/bits/mman.h       | 3 ---
 arch/or1k/bits/mman.h       | 3 ---
 arch/powerpc/bits/mman.h    | 3 ---
 arch/sh/bits/mman.h         | 3 ---
 arch/x32/bits/mman.h        | 3 ---
 arch/x86_64/bits/mman.h     | 3 ---
 include/sys/mman.h          | 2 ++
 10 files changed, 2 insertions(+), 27 deletions(-)

diff --git a/arch/arm/bits/mman.h b/arch/arm/bits/mman.h
index 8c4110f17d24..cc854aaee8aa 100644
--- a/arch/arm/bits/mman.h
+++ b/arch/arm/bits/mman.h
@@ -55,7 +55,4 @@
 #define MADV_DODUMP      17
 #define MADV_HWPOISON    100
 #define MADV_SOFT_OFFLINE 101
-
-#define MREMAP_MAYMOVE  1
-#define MREMAP_FIXED    2
 #endif
diff --git a/arch/i386/bits/mman.h b/arch/i386/bits/mman.h
index add638557408..0f53acb7abcb 100644
--- a/arch/i386/bits/mman.h
+++ b/arch/i386/bits/mman.h
@@ -56,7 +56,4 @@
 #define MADV_DODUMP      17
 #define MADV_HWPOISON    100
 #define MADV_SOFT_OFFLINE 101
-
-#define MREMAP_MAYMOVE  1
-#define MREMAP_FIXED    2
 #endif
diff --git a/arch/microblaze/bits/mman.h b/arch/microblaze/bits/mman.h
index 8c4110f17d24..cc854aaee8aa 100644
--- a/arch/microblaze/bits/mman.h
+++ b/arch/microblaze/bits/mman.h
@@ -55,7 +55,4 @@
 #define MADV_DODUMP      17
 #define MADV_HWPOISON    100
 #define MADV_SOFT_OFFLINE 101
-
-#define MREMAP_MAYMOVE  1
-#define MREMAP_FIXED    2
 #endif
diff --git a/arch/mips/bits/mman.h b/arch/mips/bits/mman.h
index ac8dd5e532a5..3125fc2b30fe 100644
--- a/arch/mips/bits/mman.h
+++ b/arch/mips/bits/mman.h
@@ -54,7 +54,4 @@
 #define MADV_DONTDUMP    16
 #define MADV_DODUMP      17
 #define MADV_HWPOISON    100
-
-#define MREMAP_MAYMOVE  1
-#define MREMAP_FIXED    2
 #endif
diff --git a/arch/or1k/bits/mman.h b/arch/or1k/bits/mman.h
index 8c4110f17d24..cc854aaee8aa 100644
--- a/arch/or1k/bits/mman.h
+++ b/arch/or1k/bits/mman.h
@@ -55,7 +55,4 @@
 #define MADV_DODUMP      17
 #define MADV_HWPOISON    100
 #define MADV_SOFT_OFFLINE 101
-
-#define MREMAP_MAYMOVE  1
-#define MREMAP_FIXED    2
 #endif
diff --git a/arch/powerpc/bits/mman.h b/arch/powerpc/bits/mman.h
index 15e3049eb3e6..fe8de2b9d6a3 100644
--- a/arch/powerpc/bits/mman.h
+++ b/arch/powerpc/bits/mman.h
@@ -55,7 +55,4 @@
 #define MADV_DODUMP      17
 #define MADV_HWPOISON    100
 #define MADV_SOFT_OFFLINE 101
-
-#define MREMAP_MAYMOVE  1
-#define MREMAP_FIXED    2
 #endif
diff --git a/arch/sh/bits/mman.h b/arch/sh/bits/mman.h
index f199f4b47f27..f6fc98f04544 100644
--- a/arch/sh/bits/mman.h
+++ b/arch/sh/bits/mman.h
@@ -56,7 +56,4 @@
 #define MADV_DODUMP      17
 #define MADV_HWPOISON    100
 #define MADV_SOFT_OFFLINE 101
-
-#define MREMAP_MAYMOVE  1
-#define MREMAP_FIXED    2
 #endif
diff --git a/arch/x32/bits/mman.h b/arch/x32/bits/mman.h
index dcab47a4862f..846b7eaee8a1 100644
--- a/arch/x32/bits/mman.h
+++ b/arch/x32/bits/mman.h
@@ -56,7 +56,4 @@
 #define MADV_DODUMP      17
 #define MADV_HWPOISON    100
 #define MADV_SOFT_OFFLINE 101
-
-#define MREMAP_MAYMOVE  1
-#define MREMAP_FIXED    2
 #endif
diff --git a/arch/x86_64/bits/mman.h b/arch/x86_64/bits/mman.h
index dcab47a4862f..846b7eaee8a1 100644
--- a/arch/x86_64/bits/mman.h
+++ b/arch/x86_64/bits/mman.h
@@ -56,7 +56,4 @@
 #define MADV_DODUMP      17
 #define MADV_HWPOISON    100
 #define MADV_SOFT_OFFLINE 101
-
-#define MREMAP_MAYMOVE  1
-#define MREMAP_FIXED    2
 #endif
diff --git a/include/sys/mman.h b/include/sys/mman.h
index a34448a6e5c4..9fc2db51d174 100644
--- a/include/sys/mman.h
+++ b/include/sys/mman.h
@@ -32,6 +32,8 @@ int mlockall (int);
 int munlockall (void);
 
 #ifdef _GNU_SOURCE
+#define MREMAP_MAYMOVE 1
+#define MREMAP_FIXED 2
 void *mremap (void *, size_t, size_t, int, ...);
 int remap_file_pages (void *, size_t, int, size_t, int);
 #endif
-- 
2.2.2


Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.