Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 172de656 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/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
parents 95d08585 fa81511b
Loading
Loading
Loading
Loading
+4 −4
Original line number Original line Diff line number Diff line
@@ -2218,10 +2218,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
	noreplace-smp	[X86-32,SMP] Don't replace SMP instructions
	noreplace-smp	[X86-32,SMP] Don't replace SMP instructions
			with UP alternatives
			with UP alternatives


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


	noresume	[SWSUSP] Disables resume and restores original swap
	noresume	[SWSUSP] Disables resume and restores original swap
			space.
			space.
+1 −0
Original line number Original line Diff line number Diff line
@@ -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,
static inline void huge_ptep_clear_flush(struct vm_area_struct *vma,
					 unsigned long addr, pte_t *ptep)
					 unsigned long addr, pte_t *ptep)
{
{
	ptep_clear_flush(vma, addr, ptep);
}
}


static inline int huge_pte_none(pte_t pte)
static inline int huge_pte_none(pte_t pte)
+1 −0
Original line number Original line Diff line number Diff line
@@ -27,6 +27,7 @@
static int __init x86_rdrand_setup(char *s)
static int __init x86_rdrand_setup(char *s)
{
{
	setup_clear_cpu_cap(X86_FEATURE_RDRAND);
	setup_clear_cpu_cap(X86_FEATURE_RDRAND);
	setup_clear_cpu_cap(X86_FEATURE_RDSEED);
	return 1;
	return 1;
}
}
__setup("nordrand", x86_rdrand_setup);
__setup("nordrand", x86_rdrand_setup);
+3 −1
Original line number Original line Diff line number Diff line
@@ -20,6 +20,8 @@
#include <asm/mmu_context.h>
#include <asm/mmu_context.h>
#include <asm/syscalls.h>
#include <asm/syscalls.h>


int sysctl_ldt16 = 0;

#ifdef CONFIG_SMP
#ifdef CONFIG_SMP
static void flush_ldt(void *current_mm)
static void flush_ldt(void *current_mm)
{
{
@@ -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.
	 * IRET leaking the high bits of the kernel stack address.
	 */
	 */
#ifdef CONFIG_X86_64
#ifdef CONFIG_X86_64
	if (!ldt_info.seg_32bit) {
	if (!ldt_info.seg_32bit && !sysctl_ldt16) {
		error = -EINVAL;
		error = -EINVAL;
		goto out_unlock;
		goto out_unlock;
	}
	}
+8 −0
Original line number Original line Diff line number Diff line
@@ -39,6 +39,7 @@
#ifdef CONFIG_X86_64
#ifdef CONFIG_X86_64
#define vdso_enabled			sysctl_vsyscall32
#define vdso_enabled			sysctl_vsyscall32
#define arch_setup_additional_pages	syscall32_setup_pages
#define arch_setup_additional_pages	syscall32_setup_pages
extern int sysctl_ldt16;
#endif
#endif


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