History

mm: fix the MAP_UNINITIALIZED flag

We can't expose UAPI symbols differently based on CONFIG_ symbols, as userspace won't have them available. Instead always define the flag, but only respect it based on the config option.

Christoph Hellwig committed 7 years ago

Commit 0bf5f941 parent c6333243 files · +7 −11Browse files

Showing the changes to include/uapi (1 of 3 files). Show all

Unified · Split

include/uapi/asm-generic/mman-common.h+3−5
@@ -19,15 +19,13 @@ · 18 unmodified lines
1919 #define MAP_TYPE 0x0f /* Mask for type of mapping */
2020 #define MAP_FIXED 0x10 /* Interpret addr exactly */
2121 #define MAP_ANONYMOUS 0x20 /* don't use a file */
22−#ifdef CONFIG_MMAP_ALLOW_UNINITIALIZED
23−# define MAP_UNINITIALIZED 0x4000000 /* For anonymous mmap, memory could be uninitialized */
24−#else
25−# define MAP_UNINITIALIZED 0x0 /* Don't support this flag */
26−#endif
2722
2823 /* 0x0100 - 0x80000 flags are defined in asm-generic/mman.h */
2924 #define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED which doesn't unmap underlying mapping */
3025
26+#define MAP_UNINITIALIZED 0x4000000 /* For anonymous mmap, memory could be
27+ * uninitialized */
28+
3129 /*
3230 * Flags for mlock
3331 */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t