Skip to content

Commit

Permalink
Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/l…
Browse files Browse the repository at this point in the history
…inux/kernel/git/tip/tip

Pull x86 fixes from Peter Anvin.

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86-64, modify_ldt: Make support for 16-bit segments a runtime option
  x86, mm, hugetlb: Add missing TLB page invalidation for hugetlb_cow()
  x86, rdrand: When nordrand is specified, disable RDSEED as well
  • Loading branch information
Linus Torvalds committed May 20, 2014
2 parents 95d0858 + fa81511 commit 172de65
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 5 deletions.
8 changes: 4 additions & 4 deletions Documentation/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2218,10 +2218,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
noreplace-smp [X86-32,SMP] Don't replace SMP instructions
with UP alternatives

nordrand [X86] Disable the direct use of the RDRAND
instruction even if it is supported by the
processor. RDRAND is still available to user
space applications.
nordrand [X86] Disable kernel use of the RDRAND and
RDSEED instructions even if they are supported
by the processor. RDRAND and RDSEED are still
available to user space applications.

noresume [SWSUSP] Disables resume and restores original swap
space.
Expand Down
1 change: 1 addition & 0 deletions arch/x86/include/asm/hugetlb.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ static inline pte_t huge_ptep_get_and_clear(struct mm_struct *mm,
static inline void huge_ptep_clear_flush(struct vm_area_struct *vma,
unsigned long addr, pte_t *ptep)
{
ptep_clear_flush(vma, addr, ptep);
}

static inline int huge_pte_none(pte_t pte)
Expand Down
1 change: 1 addition & 0 deletions arch/x86/kernel/cpu/rdrand.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
static int __init x86_rdrand_setup(char *s)
{
setup_clear_cpu_cap(X86_FEATURE_RDRAND);
setup_clear_cpu_cap(X86_FEATURE_RDSEED);
return 1;
}
__setup("nordrand", x86_rdrand_setup);
Expand Down
4 changes: 3 additions & 1 deletion arch/x86/kernel/ldt.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
#include <asm/mmu_context.h>
#include <asm/syscalls.h>

int sysctl_ldt16 = 0;

#ifdef CONFIG_SMP
static void flush_ldt(void *current_mm)
{
Expand Down Expand Up @@ -234,7 +236,7 @@ static int write_ldt(void __user *ptr, unsigned long bytecount, int oldmode)
* IRET leaking the high bits of the kernel stack address.
*/
#ifdef CONFIG_X86_64
if (!ldt_info.seg_32bit) {
if (!ldt_info.seg_32bit && !sysctl_ldt16) {
error = -EINVAL;
goto out_unlock;
}
Expand Down
8 changes: 8 additions & 0 deletions arch/x86/vdso/vdso32-setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
#ifdef CONFIG_X86_64
#define vdso_enabled sysctl_vsyscall32
#define arch_setup_additional_pages syscall32_setup_pages
extern int sysctl_ldt16;
#endif

/*
Expand Down Expand Up @@ -249,6 +250,13 @@ static struct ctl_table abi_table2[] = {
.mode = 0644,
.proc_handler = proc_dointvec
},
{
.procname = "ldt16",
.data = &sysctl_ldt16,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = proc_dointvec
},
{}
};

Expand Down

0 comments on commit 172de65

Please sign in to comment.