Skip to contentSkip to conversation

x86_64: remove old decl (trivial)

PATCH New [email protected] 1 participant 1 message Mar 5, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86_64: remove old decl (trivial)

CC Andi Kleen <[email protected]>

vm_force_exec32 and friends were still alive on 2.6.9 release, but now (and in 2.6.10) they seem deleted.
I've not compile-tested this, but it seems correct. Below some history of why I guess they were deleted (I'm including it so that you can find the changeset which deleted the definitions but forgot the declarations in).

They were used in 2.6.9
arch/x86_64/kernel/setup64.c and arch/x86_64/ia32/sys_ia32.c to implement the NX option:

arch/x86_64/ia32/sys_ia32.c-{
arch/x86_64/ia32/sys_ia32.c- if (prot & PROT_READ)
arch/x86_64/ia32/sys_ia32.c: prot |= vm_force_exec32;
arch/x86_64/ia32/sys_ia32.c- return sys_mprotect(start,len,prot);
arch/x86_64/ia32/sys_ia32.c-}

The above sample code from 2.6.9 or'ed the mask with vm_force_exec32, which was PROT_EXEC (NX disabled) or 0 (NX enabled) depending on the user's choice at boot.

This was deleted because probably replaced by a check on current->personality in do_mmap_pgoff().

---

 linux-2.6.11-paolo/include/asm-x86_64/page.h |    4 ----
 1 files changed, 4 deletions(-)
include/asm-x86_64/page.h renamed from include/asm-x86_64/page.h~x86-64-remove-old-decl +0 -4
diff -puN include/asm-x86_64/page.h~x86-64-remove-old-decl include/asm-x86_64/page.h
@@ -63,10 +63,6 @@ typedef struct { unsigned long pgprot; }
 #define __pgd(x) ((pgd_t) { (x) } )
 #define __pgprot(x)	((pgprot_t) { (x) } )
 
-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;
-
 #define __START_KERNEL		0xffffffff80100000UL
 #define __START_KERNEL_map	0xffffffff80000000UL
 #define __PAGE_OFFSET           0xffff810000000000UL

_