linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 1/1] x86_64: remove old decl (trivial)
@ 2005-03-04 19:10 blaisorblade
  0 siblings, 0 replies; only message in thread
From: blaisorblade @ 2005-03-04 19:10 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel, blaisorblade, ak


CC: Andi Kleen <ak@suse.de>

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().

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
---

 linux-2.6.11-paolo/include/asm-x86_64/page.h |    4 ----
 1 files changed, 4 deletions(-)

diff -puN include/asm-x86_64/page.h~x86-64-remove-old-decl include/asm-x86_64/page.h
--- linux-2.6.11/include/asm-x86_64/page.h~x86-64-remove-old-decl	2005-03-04 20:01:30.054785960 +0100
+++ linux-2.6.11-paolo/include/asm-x86_64/page.h	2005-03-04 20:02:27.189100224 +0100
@@ -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
_

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-03-05 16:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-04 19:10 [patch 1/1] x86_64: remove old decl (trivial) blaisorblade

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).