Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 80465
b: refs/heads/master
c: 934d158
h: refs/heads/master
i:
  80463: 8684268
v: v3
  • Loading branch information
Andi Kleen authored and Ingo Molnar committed Jan 30, 2008
1 parent 993072a commit ecd4fb9
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 53 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1e8e23bc469a11fc190a6bace857075d83dc2555
refs/heads/master: 934d15854d04e8ca2495d8f5698164df990d5d66
11 changes: 0 additions & 11 deletions trunk/arch/x86/kernel/smpboot_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ u8 apicid_2_node[MAX_APICID];
extern const unsigned char trampoline_data [];
extern const unsigned char trampoline_end [];
static unsigned char *trampoline_base;
static int trampoline_exec;

static void map_cpu_to_logical_apicid(void);

Expand Down Expand Up @@ -139,10 +138,6 @@ void __init smp_alloc_memory(void)
*/
if (__pa(trampoline_base) >= 0x9F000)
BUG();
/*
* Make the SMP trampoline executable:
*/
trampoline_exec = set_kernel_exec((unsigned long)trampoline_base, 1);
}

/*
Expand Down Expand Up @@ -1290,12 +1285,6 @@ void __init native_smp_cpus_done(unsigned int max_cpus)
setup_ioapic_dest();
#endif
zap_low_mappings();
#ifndef CONFIG_HOTPLUG_CPU
/*
* Disable executability of the SMP trampoline:
*/
set_kernel_exec((unsigned long)trampoline_base, trampoline_exec);
#endif
}

void __init smp_intr_init(void)
Expand Down
29 changes: 0 additions & 29 deletions trunk/arch/x86/mm/init_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -529,35 +529,6 @@ static void __init set_nx(void)
}
}

/*
* Enables/disables executability of a given kernel page and
* returns the previous setting.
*/
int __init set_kernel_exec(unsigned long vaddr, int enable)
{
pte_t *pte;
int ret = 1;
int level;

if (!nx_enabled)
goto out;

pte = lookup_address(vaddr, &level);
BUG_ON(!pte);

if (!pte_exec(*pte))
ret = 0;

if (enable)
pte->pte_high &= ~(1 << (_PAGE_BIT_NX - 32));
else
pte->pte_high |= 1 << (_PAGE_BIT_NX - 32);
pte_update_defer(&init_mm, vaddr, pte);
__flush_tlb_all();
out:
return ret;
}

#endif

/*
Expand Down
12 changes: 0 additions & 12 deletions trunk/include/asm-x86/pgtable_32.h
Original file line number Diff line number Diff line change
Expand Up @@ -184,18 +184,6 @@ static inline void clone_pgd_range(pgd_t *dst, pgd_t *src, int count)
*/
extern pte_t *lookup_address(unsigned long address, int *level);

/*
* Make a given kernel text page executable/non-executable.
* Returns the previous executability setting of that page (which
* is used to restore the previous state). Used by the SMP bootup code.
* NOTE: this is an __init function for security reasons.
*/
#ifdef CONFIG_X86_PAE
extern int set_kernel_exec(unsigned long vaddr, int enable);
#else
static inline int set_kernel_exec(unsigned long vaddr, int enable) { return 0;}
#endif

#if defined(CONFIG_HIGHPTE)
#define pte_offset_map(dir, address) \
((pte_t *)kmap_atomic_pte(pmd_page(*(dir)),KM_PTE0) + pte_index(address))
Expand Down

0 comments on commit ecd4fb9

Please sign in to comment.