From 2985cfdb04002b8e4c003a4008b2580aaebf75fc Mon Sep 17 00:00:00 2001 From: Al Viro Date: Mon, 18 Aug 2008 10:20:37 -0400 Subject: x86, um: take vm-flags.h to sysdep Signed-off-by: Al Viro Signed-off-by: H. Peter Anvin --- arch/um/include/shared/sysdep-i386/vm-flags.h | 14 +++++++++++ arch/um/include/shared/sysdep-x86_64/vm-flags.h | 33 +++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 arch/um/include/shared/sysdep-i386/vm-flags.h create mode 100644 arch/um/include/shared/sysdep-x86_64/vm-flags.h (limited to 'arch/um/include/shared') diff --git a/arch/um/include/shared/sysdep-i386/vm-flags.h b/arch/um/include/shared/sysdep-i386/vm-flags.h new file mode 100644 index 0000000..e0d24c5 --- /dev/null +++ b/arch/um/include/shared/sysdep-i386/vm-flags.h @@ -0,0 +1,14 @@ +/* + * Copyright (C) 2004 Jeff Dike (jdike@addtoit.com) + * Licensed under the GPL + */ + +#ifndef __VM_FLAGS_I386_H +#define __VM_FLAGS_I386_H + +#define VM_DATA_DEFAULT_FLAGS \ + (VM_READ | VM_WRITE | \ + ((current->personality & READ_IMPLIES_EXEC) ? VM_EXEC : 0 ) | \ + VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) + +#endif diff --git a/arch/um/include/shared/sysdep-x86_64/vm-flags.h b/arch/um/include/shared/sysdep-x86_64/vm-flags.h new file mode 100644 index 0000000..3213edf --- /dev/null +++ b/arch/um/include/shared/sysdep-x86_64/vm-flags.h @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2004 Jeff Dike (jdike@addtoit.com) + * Copyright 2003 PathScale, Inc. + * Licensed under the GPL + */ + +#ifndef __VM_FLAGS_X86_64_H +#define __VM_FLAGS_X86_64_H + +#define __VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ + VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) +#define __VM_STACK_FLAGS (VM_GROWSDOWN | VM_READ | VM_WRITE | \ + VM_EXEC | VM_MAYREAD | VM_MAYWRITE | \ + VM_MAYEXEC) + +extern unsigned long vm_stack_flags, vm_stack_flags32; +extern unsigned long vm_data_default_flags, vm_data_default_flags32; +extern unsigned long vm_force_exec32; + +#ifdef TIF_IA32 +#define VM_DATA_DEFAULT_FLAGS \ + (test_thread_flag(TIF_IA32) ? vm_data_default_flags32 : \ + vm_data_default_flags) + +#define VM_STACK_DEFAULT_FLAGS \ + (test_thread_flag(TIF_IA32) ? vm_stack_flags32 : vm_stack_flags) +#endif + +#define VM_DATA_DEFAULT_FLAGS vm_data_default_flags + +#define VM_STACK_DEFAULT_FLAGS vm_stack_flags + +#endif -- cgit v1.1