Skip to contentSkip to conversation

Linux 4.14.10

DISCUSSION Greg KH 4 participants 10 messages Dec 29, 2017 – Jan 16, 2018 Stable branch

lore
Share & tools
lore

Greg KH

author maintainer
#0 lore raw

I'm announcing the release of the 4.14.10 kernel.

All users of the 4.14 kernel series must upgrade.

The updated 4.14.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.14.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary

thanks,

greg k-h

------------

 Documentation/x86/x86_64/mm.txt                     |   24 
 Makefile                                            |    2 
 arch/arm64/kvm/hyp/debug-sr.c                       |    3 
 arch/parisc/boot/compressed/misc.c                  |    4 
 arch/parisc/kernel/entry.S                          |   12 
 arch/parisc/kernel/hpmc.S                           |    1 
 arch/powerpc/include/asm/mmu_context.h              |    5 
 arch/powerpc/kvm/book3s_xive.c                      |    7 
 arch/powerpc/perf/core-book3s.c                     |    8 
 arch/um/include/asm/mmu_context.h                   |    3 
 arch/unicore32/include/asm/mmu_context.h            |    5 
 arch/x86/Kconfig                                    |    3 
 arch/x86/entry/entry_32.S                           |   12 
 arch/x86/entry/entry_64.S                           |    4 
 arch/x86/entry/vsyscall/vsyscall_64.c               |   38 
 arch/x86/include/asm/cpu_entry_area.h               |   68 +
 arch/x86/include/asm/desc.h                         |    1 
 arch/x86/include/asm/espfix.h                       |    7 
 arch/x86/include/asm/fixmap.h                       |   71 -
 arch/x86/include/asm/inat.h                         |   10 
 arch/x86/include/asm/invpcid.h                      |   53 
 arch/x86/include/asm/mmu.h                          |    4 
 arch/x86/include/asm/mmu_context.h                  |   54 -
 arch/x86/include/asm/pgtable_32_types.h             |   15 
 arch/x86/include/asm/pgtable_64_types.h             |   47 
 arch/x86/include/asm/processor.h                    |    6 
 arch/x86/include/asm/stacktrace.h                   |    4 
 arch/x86/include/asm/tlbflush.h                     |  136 +-
 arch/x86/kernel/asm-offsets.c                       |    4 
 arch/x86/kernel/asm-offsets_32.c                    |    2 
 arch/x86/kernel/cpu/common.c                        |  100 -
 arch/x86/kernel/cpu/microcode/intel.c               |   13 
 arch/x86/kernel/dumpstack.c                         |   11 
 arch/x86/kernel/dumpstack_32.c                      |    6 
 arch/x86/kernel/dumpstack_64.c                      |   12 
 arch/x86/kernel/ldt.c                               |   47 
 arch/x86/kernel/smpboot.c                           |    6 
 arch/x86/kernel/traps.c                             |    6 
 arch/x86/kvm/emulate.c                              |   32 
 arch/x86/kvm/mmu.c                                  |    8 
 arch/x86/kvm/x86.c                                  |    2 
 arch/x86/lib/x86-opcode-map.txt                     |   13 
 arch/x86/mm/Makefile                                |    2 
 arch/x86/mm/cpu_entry_area.c                        |  139 ++
 arch/x86/mm/dump_pagetables.c                       |   98 +
 arch/x86/mm/init_32.c                               |    6 
 arch/x86/mm/kasan_init_64.c                         |   29 
 arch/x86/mm/pgtable_32.c                            |    1 
 arch/x86/mm/tlb.c                                   |   10 
 arch/x86/platform/uv/tlb_uv.c                       |    2 
 arch/x86/xen/mmu_pv.c                               |    2 
 block/bio.c                                         |    2 
 block/blk-throttle.c                                |    8 
 crypto/af_alg.c                                     |    6 
 crypto/algif_aead.c                                 |   16 
 crypto/algif_skcipher.c                             |   16 
 crypto/mcryptd.c                                    |   23 
 crypto/skcipher.c                                   |   10 
 drivers/acpi/apei/erst.c                            |    2 
 drivers/acpi/nfit/core.c                            |    9 
 drivers/char/ipmi/ipmi_si_intf.c                    |    1 
 drivers/clk/sunxi/clk-sun9i-mmc.c                   |   12 
 drivers/gpu/drm/i915/i915_gem.c                     |    9 
 drivers/gpu/drm/sun4i/sun4i_tcon.c                  |    4 
 drivers/mfd/cros_ec_spi.c                           |    1 
 drivers/mfd/twl4030-audio.c                         |    9 
 drivers/mfd/twl6040.c                               |   12 
 drivers/net/ethernet/marvell/mvneta.c               |    8 
 drivers/nvdimm/btt.c                                |  201 +++
 drivers/nvdimm/btt.h                                |   45 
 drivers/nvdimm/pfn_devs.c                           |   20 
 drivers/parisc/lba_pci.c                            |   33 
 drivers/pci/pci-driver.c                            |    7 
 drivers/pinctrl/intel/pinctrl-cherryview.c          |   16 
 drivers/spi/spi-armada-3700.c                       |    8 
 drivers/spi/spi-xilinx.c                            |   11 
 include/asm-generic/mm_hooks.h                      |    5 
 include/asm-generic/pgtable.h                       |    5 
 include/crypto/mcryptd.h                            |    1 
 include/linux/bio.h                                 |    2 
 include/linux/blk_types.h                           |    9 
 include/linux/blkdev.h                              |    2 
 init/main.c                                         |    6 
 kernel/fork.c                                       |    3 
 net/ipv6/route.c                                    |   58 -
 sound/core/rawmidi.c                                |   15 
 sound/pci/hda/patch_hdmi.c                          |    6 
 sound/pci/hda/patch_realtek.c                       |   35 
 sound/usb/mixer.c                                   |   27 
 sound/usb/quirks.c                                  |    7 
 tools/objtool/.gitignore                            |    2 
 tools/objtool/Makefile                              |   30 
 tools/objtool/arch/x86/Build                        |   10 
 tools/objtool/arch/x86/decode.c                     |    6 
 tools/objtool/arch/x86/include/asm/inat.h           |  244 ++++
 tools/objtool/arch/x86/include/asm/inat_types.h     |   29 
 tools/objtool/arch/x86/include/asm/insn.h           |  211 +++
 tools/objtool/arch/x86/include/asm/orc_types.h      |  107 +
 tools/objtool/arch/x86/insn/gen-insn-attr-x86.awk   |  393 -------
 tools/objtool/arch/x86/insn/inat.c                  |   97 -
 tools/objtool/arch/x86/insn/inat.h                  |  234 ----
 tools/objtool/arch/x86/insn/inat_types.h            |   29 
 tools/objtool/arch/x86/insn/insn.c                  |  606 -----------
 tools/objtool/arch/x86/insn/insn.h                  |  211 ---
 tools/objtool/arch/x86/insn/x86-opcode-map.txt      | 1063 -------------------
 tools/objtool/arch/x86/lib/inat.c                   |   97 +
 tools/objtool/arch/x86/lib/insn.c                   |  606 +++++++++++
 tools/objtool/arch/x86/lib/x86-opcode-map.txt       | 1072 ++++++++++++++++++++
 tools/objtool/arch/x86/tools/gen-insn-attr-x86.awk  |  393 +++++++
 tools/objtool/orc.h                                 |    2 
 tools/objtool/orc_dump.c                            |    7 
 tools/objtool/orc_types.h                           |  107 -
 tools/objtool/sync-check.sh                         |   29 
 tools/perf/util/intel-pt-decoder/x86-opcode-map.txt |   15 
 tools/testing/selftests/x86/ldt_gdt.c               |    9 
 virt/kvm/arm/mmu.c                                  |   10 
 116 files changed, 4023 insertions(+), 3424 deletions(-)

Andy Lutomirski (3):
x86/vsyscall/64: Explicitly set _PAGE_USER in the pagetable hierarchy x86/vsyscall/64: Warn and fail vsyscall emulation in NATIVE mode x86/mm/64: Improve the memory map documentation

Chen-Yu Tsai (1):
clk: sunxi: sun9i-mmc: Implement reset callback for reset controls

Chris Wilson (1):
drm/i915: Flush pending GTT writes before unbinding

Cédric Le Goater (1):
KVM: PPC: Book3S: fix XIVE migration of pending interrupts

Dan Williams (3):
acpi, nfit: fix health event notification
libnvdimm, dax: fix 1GB-aligned namespaces vs physical misalignment libnvdimm, pfn: fix start_pad handling for aligned namespaces

Dave Hansen (4):
x86/entry: Rename SYSENTER_stack to CPU_ENTRY_AREA_entry_stack x86/mm: Move the CR3 construction functions to tlbflush.h x86/mm: Remove hard-coded ASID limit checks
x86/mm: Put MMU to hardware ASID translation in one place

Eric Biggers (1):
crypto: skcipher - set walk.iv for zero-length inputs

Greg Kroah-Hartman (2):

      Revert "ipv6: grab rt->rt6i_ref before allocating pcpu rt"
      Linux 4.14.10

Guneshwor Singh (1):
ALSA: hda - Add vendor id for Cannonlake HDMI codec

Helge Deller (3):
parisc: Align os_hpmc_size on word boundary
parisc: Fix indenting in puts()
parisc: Hide Diva-built-in serial aux and graphics card

Ingo Molnar (1):
tools/headers: Sync objtool UAPI header

Jens Axboe (1):
block: unalign call_single_data in struct request

Johan Hovold (2):
mfd: twl4030-audio: Fix sibling-node lookup
mfd: twl6040: Fix child-node lookup

John David Anglin (1):
Revert "parisc: Re-enable interrupts early"

John Einar Reitan (1):
Revert "ipmi_si: fix memory leak on new_smi"

Jon Hunter (1):
mfd: cros ec: spi: Don't send first message too soon

Josh Poimboeuf (3):
objtool: Move synced files to their original relative locations
objtool: Move kernel headers/code sync check to a script
objtool: Fix cross-build

Julien Thierry (1):
arm64: kvm: Prevent restoring stale PMSCR_EL1 for vcpu

Jussi Laako (1):
ALSA: usb-audio: Add native DSD support for Esoteric D-05X

Kailang Yang (1):
ALSA: hda/realtek - Fix Dell AIO LineOut issue

Laurent Vivier (1):
KVM: PPC: Book3S HV: Fix pending_pri value in kvmppc_xive_get_icp()

Marc Zyngier (1):
KVM: arm/arm64: Fix HYP unmapping going off limits

Maxime Chevallier (1):
spi: a3700: Fix clk prescaling for coefficient over 15

Maxime Ripard (1):
drm/sun4i: Fix error path handling

Mika Westerberg (1):
pinctrl: cherryview: Mask all interrupts on Intel_Strago based systems

Mikulas Patocka (1):
objtool: Fix 64-bit build on 32-bit host

Paolo Bonzini (1):
kvm: x86: fix RSM when PCID is non-zero

Peter Zijlstra (8):
x86/ldt: Rework locking
x86/doc: Remove obvious weirdnesses from the x86 MM layout documentation x86/uv: Use the right TLB-flush API
x86/microcode: Dont abuse the TLB-flush interface
x86/mm: Use __flush_tlb_one() for kernel memory
x86/mm: Remove superfluous barriers
x86/mm: Add comments to clarify which TLB-flush functions are supposed to flush what x86/mm: Create asm/invpcid.h

Rafael J. Wysocki (1):
PCI / PM: Force devices to D0 in pci_pm_thaw_noirq()

Randy Dunlap (1):
x86/decoder: Fix and update the opcodes map

Ravi Bangoria (1):
powerpc/perf: Dereference BHRB entries safely

Ricardo Neri (1):
x86/insn-eval: Add utility functions to get segment selector

Ricardo Ribalda Delgado (1):
spi: xilinx: Detect stall with Unknown commands

Sebastian Andrzej Siewior (1):
crypto: mcryptd - protect the per-CPU queue with a lock

Shaohua Li (1):
block-throttle: avoid double charge

Stephan Mueller (2):
crypto: af_alg - wait for data at beginning of recvmsg
crypto: af_alg - fix race accessing cipher request

Takashi Iwai (3):
ACPI: APEI / ERST: Fix missing error handling in erst_reader()
ALSA: rawmidi: Avoid racy info ioctl via ctl device
ALSA: usb-audio: Fix the missing ctl name suffix at parsing SU

Thomas Gleixner (9):
x86/Kconfig: Limit NR_CPUS on 32-bit to a sane amount x86/mm/dump_pagetables: Check PAGE_PRESENT for real x86/mm/dump_pagetables: Make the address hints correct and readable arch, mm: Allow arch_dup_mmap() to fail
x86/ldt: Prevent LDT inheritance on exec
x86/cpu_entry_area: Move it to a separate unit x86/cpu_entry_area: Move it out of the fixmap
init: Invoke init_espfix_bsp() from mm_init() x86/cpu_entry_area: Prevent wraparound in setup_cpu_entry_area_ptes() on 32bit

Vishal Verma (1):
libnvdimm, btt: Fix an incompatibility in the log layout

Wanpeng Li (2):
KVM: MMU: Fix infinite loop when there is no available mmu page
KVM: X86: Fix load RFLAGS w/o the fixed bit

Yelena Krivosheev (3):
net: mvneta: clear interface link status on port disable
net: mvneta: use proper rxq_number in loop on rx queues
net: mvneta: eliminate wrong call to handle rx descriptor error

author maintainer
#1 lore raw
Documentation/x86/x86_64/mm.txt +11 -13
index 3448e675b462..51101708a03a 100644
@@ -1,6 +1,4 @@
 
-<previous description obsolete, deleted>
-
 Virtual memory map with 4 level page tables:
 
 0000000000000000 - 00007fffffffffff (=47 bits) user space, different per mm
@@ -14,13 +12,15 @@ ffffea0000000000 - ffffeaffffffffff (=40 bits) virtual memory map (1TB)
 ... unused hole ...
 ffffec0000000000 - fffffbffffffffff (=44 bits) kasan shadow memory (16TB)
 ... unused hole ...
+fffffe8000000000 - fffffeffffffffff (=39 bits) cpu_entry_area mapping
 ffffff0000000000 - ffffff7fffffffff (=39 bits) %esp fixup stacks
 ... unused hole ...
 ffffffef00000000 - fffffffeffffffff (=64 GB) EFI region mapping space
 ... unused hole ...
 ffffffff80000000 - ffffffff9fffffff (=512 MB)  kernel text mapping, from phys 0
-ffffffffa0000000 - ffffffffff5fffff (=1526 MB) module mapping space (variable)
-ffffffffff600000 - ffffffffffdfffff (=8 MB) vsyscalls
+ffffffffa0000000 - [fixmap start]   (~1526 MB) module mapping space (variable)
+[fixmap start]   - ffffffffff5fffff kernel-internal fixmap range
+ffffffffff600000 - ffffffffff600fff (=4 kB) legacy vsyscall ABI
 ffffffffffe00000 - ffffffffffffffff (=2 MB) unused hole
 
 Virtual memory map with 5 level page tables:
@@ -36,19 +36,22 @@ ffd4000000000000 - ffd5ffffffffffff (=49 bits) virtual memory map (512TB)
 ... unused hole ...
 ffdf000000000000 - fffffc0000000000 (=53 bits) kasan shadow memory (8PB)
 ... unused hole ...
+fffffe8000000000 - fffffeffffffffff (=39 bits) cpu_entry_area mapping
 ffffff0000000000 - ffffff7fffffffff (=39 bits) %esp fixup stacks
 ... unused hole ...
 ffffffef00000000 - fffffffeffffffff (=64 GB) EFI region mapping space
 ... unused hole ...
 ffffffff80000000 - ffffffff9fffffff (=512 MB)  kernel text mapping, from phys 0
-ffffffffa0000000 - ffffffffff5fffff (=1526 MB) module mapping space
-ffffffffff600000 - ffffffffffdfffff (=8 MB) vsyscalls
+ffffffffa0000000 - [fixmap start]   (~1526 MB) module mapping space
+[fixmap start]   - ffffffffff5fffff kernel-internal fixmap range
+ffffffffff600000 - ffffffffff600fff (=4 kB) legacy vsyscall ABI
 ffffffffffe00000 - ffffffffffffffff (=2 MB) unused hole
 
 Architecture defines a 64-bit virtual address. Implementations can support
 less. Currently supported are 48- and 57-bit virtual addresses. Bits 63
-through to the most-significant implemented bit are set to either all ones
-or all zero. This causes hole between user space and kernel addresses.
+through to the most-significant implemented bit are sign extended.
+This causes hole between user space and kernel addresses if you interpret them
+as unsigned.
 
 The direct mapping covers all memory in the system up to the highest
 memory address (this means in some cases it can also include PCI memory
@@ -58,9 +61,6 @@ vmalloc space is lazily synchronized into the different PML4/PML5 pages of
 the processes using the page fault handler, with init_top_pgt as
 reference.
 
-Current X86-64 implementations support up to 46 bits of address space (64 TB),
-which is our current limit. This expands into MBZ space in the page tables.
-
 We map EFI runtime services in the 'efi_pgd' PGD in a 64Gb large virtual
 memory window (this size is arbitrary, it can be raised later if needed).
 The mappings are not part of any other kernel PGD and are only available
@@ -72,5 +72,3 @@ following fixmap section.
 Note that if CONFIG_RANDOMIZE_MEMORY is enabled, the direct mapping of all
 physical memory, vmalloc/ioremap space and virtual memory map are randomized.
 Their order is preserved but their base will be offset early at boot time.
-
--Andi Kleen, Jul 2004
Makefile +1 -1
index ed2132c6d286..9edfb78836a9 100644
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 VERSION = 4
 PATCHLEVEL = 14
-SUBLEVEL = 9
+SUBLEVEL = 10
 EXTRAVERSION =
 NAME = Petit Gorille
 
arch/arm64/kvm/hyp/debug-sr.c +3 -0
index f5154ed3da6c..2add22699764 100644
@@ -84,6 +84,9 @@ static void __hyp_text __debug_save_spe_nvhe(u64 *pmscr_el1)
 {
 	u64 reg;
 
+	/* Clear pmscr in case of early return */
+	*pmscr_el1 = 0;
+
 	/* SPE present on this CPU? */
 	if (!cpuid_feature_extract_unsigned_field(read_sysreg(id_aa64dfr0_el1),
 						  ID_AA64DFR0_PMSVER_SHIFT))
arch/parisc/boot/compressed/misc.c +2 -2
index 9345b44b86f0..f57118e1f6b4 100644
@@ -123,8 +123,8 @@ int puts(const char *s)
 	while ((nuline = strchr(s, '\n')) != NULL) {
 		if (nuline != s)
 			pdc_iodc_print(s, nuline - s);
-			pdc_iodc_print("\r\n", 2);
-			s = nuline + 1;
+		pdc_iodc_print("\r\n", 2);
+		s = nuline + 1;
 	}
 	if (*s != '\0')
 		pdc_iodc_print(s, strlen(s));
arch/parisc/kernel/entry.S +9 -3
index a4fd296c958e..f3cecf5117cf 100644
@@ -878,9 +878,6 @@ ENTRY_CFI(syscall_exit_rfi)
 	STREG   %r19,PT_SR7(%r16)
 
 intr_return:
-	/* NOTE: Need to enable interrupts incase we schedule. */
-	ssm     PSW_SM_I, %r0
-
 	/* check for reschedule */
 	mfctl   %cr30,%r1
 	LDREG   TI_FLAGS(%r1),%r19	/* sched.h: TIF_NEED_RESCHED */
@@ -907,6 +904,11 @@ intr_check_sig:
 	LDREG	PT_IASQ1(%r16), %r20
 	cmpib,COND(=),n 0,%r20,intr_restore /* backward */
 
+	/* NOTE: We need to enable interrupts if we have to deliver
+	 * signals. We used to do this earlier but it caused kernel
+	 * stack overflows. */
+	ssm     PSW_SM_I, %r0
+
 	copy	%r0, %r25			/* long in_syscall = 0 */
 #ifdef CONFIG_64BIT
 	ldo	-16(%r30),%r29			/* Reference param save area */
@@ -958,6 +960,10 @@ intr_do_resched:
 	cmpib,COND(=)	0, %r20, intr_do_preempt
 	nop
 
+	/* NOTE: We need to enable interrupts if we schedule.  We used
+	 * to do this earlier but it caused kernel stack overflows. */
+	ssm     PSW_SM_I, %r0
+
 #ifdef CONFIG_64BIT
 	ldo	-16(%r30),%r29		/* Reference param save area */
 #endif
arch/parisc/kernel/hpmc.S +1 -0
index e3a8e5e4d5de..8d072c44f300 100644
@@ -305,6 +305,7 @@ ENDPROC_CFI(os_hpmc)
 
 
 	__INITRODATA
+	.align 4
 	.export os_hpmc_size
 os_hpmc_size:
 	.word .os_hpmc_end-.os_hpmc
arch/powerpc/include/asm/mmu_context.h +3 -2
index 492d8140a395..44fdf4786638 100644
@@ -114,9 +114,10 @@ static inline void enter_lazy_tlb(struct mm_struct *mm,
 #endif
 }
 
-static inline void arch_dup_mmap(struct mm_struct *oldmm,
-				 struct mm_struct *mm)
+static inline int arch_dup_mmap(struct mm_struct *oldmm,
+				struct mm_struct *mm)
 {
+	return 0;
 }
 
 static inline void arch_exit_mmap(struct mm_struct *mm)
arch/powerpc/kvm/book3s_xive.c +4 -3
index bf457843e032..0d750d274c4e 100644
@@ -725,7 +725,8 @@ u64 kvmppc_xive_get_icp(struct kvm_vcpu *vcpu)
 
 	/* Return the per-cpu state for state saving/migration */
 	return (u64)xc->cppr << KVM_REG_PPC_ICP_CPPR_SHIFT |
-	       (u64)xc->mfrr << KVM_REG_PPC_ICP_MFRR_SHIFT;
+	       (u64)xc->mfrr << KVM_REG_PPC_ICP_MFRR_SHIFT |
+	       (u64)0xff << KVM_REG_PPC_ICP_PPRI_SHIFT;
 }
 
 int kvmppc_xive_set_icp(struct kvm_vcpu *vcpu, u64 icpval)
@@ -1558,7 +1559,7 @@ static int xive_set_source(struct kvmppc_xive *xive, long irq, u64 addr)
 
 	/*
 	 * Restore P and Q. If the interrupt was pending, we
-	 * force both P and Q, which will trigger a resend.
+	 * force Q and !P, which will trigger a resend.
 	 *
 	 * That means that a guest that had both an interrupt
 	 * pending (queued) and Q set will restore with only
@@ -1566,7 +1567,7 @@ static int xive_set_source(struct kvmppc_xive *xive, long irq, u64 addr)
 	 * is perfectly fine as coalescing interrupts that haven't
 	 * been presented yet is always allowed.
 	 */
-	if (val & KVM_XICS_PRESENTED || val & KVM_XICS_PENDING)
+	if (val & KVM_XICS_PRESENTED && !(val & KVM_XICS_PENDING))
 		state->old_p = true;
 	if (val & KVM_XICS_QUEUED || val & KVM_XICS_PENDING)
 		state->old_q = true;
arch/powerpc/perf/core-book3s.c +6 -2
index 9e3da168d54c..b4209a68b85d 100644
@@ -410,8 +410,12 @@ static __u64 power_pmu_bhrb_to(u64 addr)
 	int ret;
 	__u64 target;
 
-	if (is_kernel_addr(addr))
-		return branch_target((unsigned int *)addr);
+	if (is_kernel_addr(addr)) {
+		if (probe_kernel_read(&instr, (void *)addr, sizeof(instr)))
+			return 0;
+
+		return branch_target(&instr);
+	}
 
 	/* Userspace: need copy instruction here then translate it */
 	pagefault_disable();
arch/um/include/asm/mmu_context.h +2 -1
index b668e351fd6c..fca34b2177e2 100644
@@ -15,9 +15,10 @@ extern void uml_setup_stubs(struct mm_struct *mm);
 /*
  * Needed since we do not use the asm-generic/mm_hooks.h:
  */
-static inline void arch_dup_mmap(struct mm_struct *oldmm, struct mm_struct *mm)
+static inline int arch_dup_mmap(struct mm_struct *oldmm, struct mm_struct *mm)
 {
 	uml_setup_stubs(mm);
+	return 0;
 }
 extern void arch_exit_mmap(struct mm_struct *mm);
 static inline void arch_unmap(struct mm_struct *mm,
arch/unicore32/include/asm/mmu_context.h +3 -2
index 59b06b48f27d..5c205a9cb5a6 100644
@@ -81,9 +81,10 @@ do { \
 	} \
 } while (0)
 
-static inline void arch_dup_mmap(struct mm_struct *oldmm,
-				 struct mm_struct *mm)
+static inline int arch_dup_mmap(struct mm_struct *oldmm,
+				struct mm_struct *mm)
 {
+	return 0;
 }
 
 static inline void arch_unmap(struct mm_struct *mm,
arch/x86/Kconfig +2 -1
index 48646160eb83..592c974d4558 100644
@@ -925,7 +925,8 @@ config MAXSMP
 config NR_CPUS
 	int "Maximum number of CPUs" if SMP && !MAXSMP
 	range 2 8 if SMP && X86_32 && !X86_BIGSMP
-	range 2 512 if SMP && !MAXSMP && !CPUMASK_OFFSTACK
+	range 2 64 if SMP && X86_32 && X86_BIGSMP
+	range 2 512 if SMP && !MAXSMP && !CPUMASK_OFFSTACK && X86_64
 	range 2 8192 if SMP && !MAXSMP && CPUMASK_OFFSTACK && X86_64
 	default "1" if !SMP
 	default "8192" if MAXSMP
arch/x86/entry/entry_32.S +6 -6
index bd8b57a5c874..ace8f321a5a1 100644
@@ -942,9 +942,9 @@ ENTRY(debug)
 
 	/* Are we currently on the SYSENTER stack? */
 	movl	PER_CPU_VAR(cpu_entry_area), %ecx
-	addl	$CPU_ENTRY_AREA_SYSENTER_stack + SIZEOF_SYSENTER_stack, %ecx
-	subl	%eax, %ecx	/* ecx = (end of SYSENTER_stack) - esp */
-	cmpl	$SIZEOF_SYSENTER_stack, %ecx
+	addl	$CPU_ENTRY_AREA_entry_stack + SIZEOF_entry_stack, %ecx
+	subl	%eax, %ecx	/* ecx = (end of entry_stack) - esp */
+	cmpl	$SIZEOF_entry_stack, %ecx
 	jb	.Ldebug_from_sysenter_stack
 
 	TRACE_IRQS_OFF
@@ -986,9 +986,9 @@ ENTRY(nmi)
 
 	/* Are we currently on the SYSENTER stack? */
 	movl	PER_CPU_VAR(cpu_entry_area), %ecx
-	addl	$CPU_ENTRY_AREA_SYSENTER_stack + SIZEOF_SYSENTER_stack, %ecx
-	subl	%eax, %ecx	/* ecx = (end of SYSENTER_stack) - esp */
-	cmpl	$SIZEOF_SYSENTER_stack, %ecx
+	addl	$CPU_ENTRY_AREA_entry_stack + SIZEOF_entry_stack, %ecx
+	subl	%eax, %ecx	/* ecx = (end of entry_stack) - esp */
+	cmpl	$SIZEOF_entry_stack, %ecx
 	jb	.Lnmi_from_sysenter_stack
 
 	/* Not on SYSENTER stack. */
arch/x86/entry/entry_64.S +2 -2
index 6abe3fcaece9..22c891c3b78d 100644
@@ -154,8 +154,8 @@ END(native_usergs_sysret64)
 	_entry_trampoline - CPU_ENTRY_AREA_entry_trampoline(%rip)
 
 /* The top word of the SYSENTER stack is hot and is usable as scratch space. */
-#define RSP_SCRATCH	CPU_ENTRY_AREA_SYSENTER_stack + \
-			SIZEOF_SYSENTER_stack - 8 + CPU_ENTRY_AREA
+#define RSP_SCRATCH	CPU_ENTRY_AREA_entry_stack + \
+			SIZEOF_entry_stack - 8 + CPU_ENTRY_AREA
 
 ENTRY(entry_SYSCALL_64_trampoline)
 	UNWIND_HINT_EMPTY
arch/x86/entry/vsyscall/vsyscall_64.c +37 -1
index f279ba2643dc..1faf40f2dda9 100644
@@ -37,6 +37,7 @@
 #include <asm/unistd.h>
 #include <asm/fixmap.h>
 #include <asm/traps.h>
+#include <asm/paravirt.h>
 
 #define CREATE_TRACE_POINTS
 #include "vsyscall_trace.h"
@@ -138,6 +139,10 @@ bool emulate_vsyscall(struct pt_regs *regs, unsigned long address)
 
 	WARN_ON_ONCE(address != regs->ip);
 
+	/* This should be unreachable in NATIVE mode. */
+	if (WARN_ON(vsyscall_mode == NATIVE))
+		return false;
+
 	if (vsyscall_mode == NONE) {
 		warn_bad_vsyscall(KERN_INFO, regs,
 				  "vsyscall attempted with vsyscall=none");
@@ -329,16 +334,47 @@ int in_gate_area_no_mm(unsigned long addr)
 	return vsyscall_mode != NONE && (addr & PAGE_MASK) == VSYSCALL_ADDR;
 }
 
+/*
+ * The VSYSCALL page is the only user-accessible page in the kernel address
+ * range.  Normally, the kernel page tables can have _PAGE_USER clear, but
+ * the tables covering VSYSCALL_ADDR need _PAGE_USER set if vsyscalls
+ * are enabled.
+ *
+ * Some day we may create a "minimal" vsyscall mode in which we emulate
+ * vsyscalls but leave the page not present.  If so, we skip calling
+ * this.
+ */
+static void __init set_vsyscall_pgtable_user_bits(void)
+{
+	pgd_t *pgd;
+	p4d_t *p4d;
+	pud_t *pud;
+	pmd_t *pmd;
+
+	pgd = pgd_offset_k(VSYSCALL_ADDR);
+	set_pgd(pgd, __pgd(pgd_val(*pgd) | _PAGE_USER));
+	p4d = p4d_offset(pgd, VSYSCALL_ADDR);
+#if CONFIG_PGTABLE_LEVELS >= 5
+	p4d->p4d |= _PAGE_USER;
+#endif
+	pud = pud_offset(p4d, VSYSCALL_ADDR);
+	set_pud(pud, __pud(pud_val(*pud) | _PAGE_USER));
+	pmd = pmd_offset(pud, VSYSCALL_ADDR);
+	set_pmd(pmd, __pmd(pmd_val(*pmd) | _PAGE_USER));
+}
+
 void __init map_vsyscall(void)
 {
 	extern char __vsyscall_page;
 	unsigned long physaddr_vsyscall = __pa_symbol(&__vsyscall_page);
 
-	if (vsyscall_mode != NONE)
+	if (vsyscall_mode != NONE) {
 		__set_fixmap(VSYSCALL_PAGE, physaddr_vsyscall,
 			     vsyscall_mode == NATIVE
 			     ? PAGE_KERNEL_VSYSCALL
 			     : PAGE_KERNEL_VVAR);
+		set_vsyscall_pgtable_user_bits();
+	}
 
 	BUILD_BUG_ON((unsigned long)__fix_to_virt(VSYSCALL_PAGE) !=
 		     (unsigned long)VSYSCALL_ADDR);
arch/x86/include/asm/cpu_entry_area.h new file +68 -0

68 lines not on this page · raw message

arch/x86/include/asm/desc.h +1 -0
index 2ace1f90d138..bc359dd2f7f6 100644
@@ -7,6 +7,7 @@
 #include <asm/mmu.h>
 #include <asm/fixmap.h>
 #include <asm/irq_vectors.h>
+#include <asm/cpu_entry_area.h>
 
 #include <linux/smp.h>
 #include <linux/percpu.h>
arch/x86/include/asm/espfix.h +4 -3
index 0211029076ea..6777480d8a42 100644
@@ -2,7 +2,7 @@
 #ifndef _ASM_X86_ESPFIX_H
 #define _ASM_X86_ESPFIX_H
 
-#ifdef CONFIG_X86_64
+#ifdef CONFIG_X86_ESPFIX64
 
 #include <asm/percpu.h>
 
@@ -11,7 +11,8 @@ DECLARE_PER_CPU_READ_MOSTLY(unsigned long, espfix_waddr);
 
 extern void init_espfix_bsp(void);
 extern void init_espfix_ap(int cpu);
-
-#endif /* CONFIG_X86_64 */
+#else
+static inline void init_espfix_ap(int cpu) { }
+#endif
 
 #endif /* _ASM_X86_ESPFIX_H */
arch/x86/include/asm/fixmap.h +1 -70

100 lines not on this page · raw message

arch/x86/include/asm/inat.h +10 -0
index 02aff0867211..1c78580e58be 100644
@@ -97,6 +97,16 @@
 #define INAT_MAKE_GROUP(grp)	((grp << INAT_GRP_OFFS) | INAT_MODRM)
 #define INAT_MAKE_IMM(imm)	(imm << INAT_IMM_OFFS)
 
+/* Identifiers for segment registers */
+#define INAT_SEG_REG_IGNORE	0
+#define INAT_SEG_REG_DEFAULT	1
+#define INAT_SEG_REG_CS		2
+#define INAT_SEG_REG_SS		3
+#define INAT_SEG_REG_DS		4
+#define INAT_SEG_REG_ES		5
+#define INAT_SEG_REG_FS		6
+#define INAT_SEG_REG_GS		7
+
 /* Attribute search APIs */
 extern insn_attr_t inat_get_opcode_attribute(insn_byte_t opcode);
 extern int inat_get_last_prefix_id(insn_byte_t last_pfx);
arch/x86/include/asm/invpcid.h new file +53 -0

53 lines not on this page · raw message

arch/x86/include/asm/mmu.h +3 -1
index 9ea26f167497..5ff3e8af2c20 100644
@@ -3,6 +3,7 @@
 #define _ASM_X86_MMU_H
 
 #include <linux/spinlock.h>
+#include <linux/rwsem.h>
 #include <linux/mutex.h>
 #include <linux/atomic.h>
 
@@ -27,7 +28,8 @@ typedef struct {
 	atomic64_t tlb_gen;
 
 #ifdef CONFIG_MODIFY_LDT_SYSCALL
-	struct ldt_struct *ldt;
+	struct rw_semaphore	ldt_usr_sem;
+	struct ldt_struct	*ldt;
 #endif
 
 #ifdef CONFIG_X86_64
arch/x86/include/asm/mmu_context.h +18 -36

97 lines not on this page · raw message

arch/x86/include/asm/pgtable_32_types.h +12 -3
index f2ca9b28fd68..ce245b0cdfca 100644
@@ -38,13 +38,22 @@ extern bool __vmalloc_start_set; /* set once high_memory is set */
 #define LAST_PKMAP 1024
 #endif
 
-#define PKMAP_BASE ((FIXADDR_START - PAGE_SIZE * (LAST_PKMAP + 1))	\
-		    & PMD_MASK)
+/*
+ * Define this here and validate with BUILD_BUG_ON() in pgtable_32.c
+ * to avoid include recursion hell
+ */
+#define CPU_ENTRY_AREA_PAGES	(NR_CPUS * 40)
+
+#define CPU_ENTRY_AREA_BASE				\
+	((FIXADDR_START - PAGE_SIZE * (CPU_ENTRY_AREA_PAGES + 1)) & PMD_MASK)
+
+#define PKMAP_BASE		\
+	((CPU_ENTRY_AREA_BASE - PAGE_SIZE) & PMD_MASK)
 
 #ifdef CONFIG_HIGHMEM
 # define VMALLOC_END	(PKMAP_BASE - 2 * PAGE_SIZE)
 #else
-# define VMALLOC_END	(FIXADDR_START - 2 * PAGE_SIZE)
+# define VMALLOC_END	(CPU_ENTRY_AREA_BASE - 2 * PAGE_SIZE)
 #endif
 
 #define MODULES_VADDR	VMALLOC_START
arch/x86/include/asm/pgtable_64_types.h +28 -19

60 lines not on this page · raw message

arch/x86/include/asm/processor.h +3 -3
index da943411d3d8..9e482d8b0b97 100644
@@ -336,12 +336,12 @@ struct x86_hw_tss {
 #define IO_BITMAP_OFFSET		(offsetof(struct tss_struct, io_bitmap) - offsetof(struct tss_struct, x86_tss))
 #define INVALID_IO_BITMAP_OFFSET	0x8000
 
-struct SYSENTER_stack {
+struct entry_stack {
 	unsigned long		words[64];
 };
 
-struct SYSENTER_stack_page {
-	struct SYSENTER_stack stack;
+struct entry_stack_page {
+	struct entry_stack stack;
 } __aligned(PAGE_SIZE);
 
 struct tss_struct {
arch/x86/include/asm/stacktrace.h +2 -2
index f8062bfd43a0..f73706878772 100644
@@ -16,7 +16,7 @@ enum stack_type {
 	STACK_TYPE_TASK,
 	STACK_TYPE_IRQ,
 	STACK_TYPE_SOFTIRQ,
-	STACK_TYPE_SYSENTER,
+	STACK_TYPE_ENTRY,
 	STACK_TYPE_EXCEPTION,
 	STACK_TYPE_EXCEPTION_LAST = STACK_TYPE_EXCEPTION + N_EXCEPTION_STACKS-1,
 };
@@ -29,7 +29,7 @@ struct stack_info {
 bool in_task_stack(unsigned long *stack, struct task_struct *task,
 		   struct stack_info *info);
 
-bool in_sysenter_stack(unsigned long *stack, struct stack_info *info);
+bool in_entry_stack(unsigned long *stack, struct stack_info *info);
 
 int get_stack_info(unsigned long *stack, struct task_struct *task,
 		   struct stack_info *info, unsigned long *visit_mask);
arch/x86/include/asm/tlbflush.h +72 -64

196 lines not on this page · raw message

arch/x86/kernel/asm-offsets.c +2 -2
index cd360a5e0dca..676b7cf4b62b 100644
@@ -97,6 +97,6 @@ void common(void) {
 	/* Layout info for cpu_entry_area */
 	OFFSET(CPU_ENTRY_AREA_tss, cpu_entry_area, tss);
 	OFFSET(CPU_ENTRY_AREA_entry_trampoline, cpu_entry_area, entry_trampoline);
-	OFFSET(CPU_ENTRY_AREA_SYSENTER_stack, cpu_entry_area, SYSENTER_stack_page);
-	DEFINE(SIZEOF_SYSENTER_stack, sizeof(struct SYSENTER_stack));
+	OFFSET(CPU_ENTRY_AREA_entry_stack, cpu_entry_area, entry_stack_page);
+	DEFINE(SIZEOF_entry_stack, sizeof(struct entry_stack));
 }
arch/x86/kernel/asm-offsets_32.c +1 -1
index 7d20d9c0b3d6..fa1261eefa16 100644
@@ -48,7 +48,7 @@ void foo(void)
 
 	/* Offset from the sysenter stack to tss.sp0 */
 	DEFINE(TSS_sysenter_sp0, offsetof(struct cpu_entry_area, tss.x86_tss.sp0) -
-	       offsetofend(struct cpu_entry_area, SYSENTER_stack_page.stack));
+	       offsetofend(struct cpu_entry_area, entry_stack_page.stack));
 
 #ifdef CONFIG_CC_STACKPROTECTOR
 	BLANK();
arch/x86/kernel/cpu/common.c +3 -97

126 lines not on this page · raw message

arch/x86/kernel/cpu/microcode/intel.c +0 -13
index 7dbcb7adf797..8ccdca6d3f9e 100644
@@ -565,15 +565,6 @@ static void print_ucode(struct ucode_cpu_info *uci)
 }
 #else
 
-/*
- * Flush global tlb. We only do this in x86_64 where paging has been enabled
- * already and PGE should be enabled as well.
- */
-static inline void flush_tlb_early(void)
-{
-	__native_flush_tlb_global_irq_disabled();
-}
-
 static inline void print_ucode(struct ucode_cpu_info *uci)
 {
 	struct microcode_intel *mc;
@@ -602,10 +593,6 @@ static int apply_microcode_early(struct ucode_cpu_info *uci, bool early)
 	if (rev != mc->hdr.rev)
 		return -1;
 
-#ifdef CONFIG_X86_64
-	/* Flush global tlb. This is precaution. */
-	flush_tlb_early();
-#endif
 	uci->cpu_sig.rev = rev;
 
 	if (early)
arch/x86/kernel/dumpstack.c +6 -5
index bbd6d986e2d0..36b17e0febe8 100644
@@ -18,6 +18,7 @@
 #include <linux/nmi.h>
 #include <linux/sysfs.h>
 
+#include <asm/cpu_entry_area.h>
 #include <asm/stacktrace.h>
 #include <asm/unwind.h>
 
@@ -43,9 +44,9 @@ bool in_task_stack(unsigned long *stack, struct task_struct *task,
 	return true;
 }
 
-bool in_sysenter_stack(unsigned long *stack, struct stack_info *info)
+bool in_entry_stack(unsigned long *stack, struct stack_info *info)
 {
-	struct SYSENTER_stack *ss = cpu_SYSENTER_stack(smp_processor_id());
+	struct entry_stack *ss = cpu_entry_stack(smp_processor_id());
 
 	void *begin = ss;
 	void *end = ss + 1;
@@ -53,7 +54,7 @@ bool in_sysenter_stack(unsigned long *stack, struct stack_info *info)
 	if ((void *)stack < begin || (void *)stack >= end)
 		return false;
 
-	info->type	= STACK_TYPE_SYSENTER;
+	info->type	= STACK_TYPE_ENTRY;
 	info->begin	= begin;
 	info->end	= end;
 	info->next_sp	= NULL;
@@ -111,13 +112,13 @@ void show_trace_log_lvl(struct task_struct *task, struct pt_regs *regs,
 	 * - task stack
 	 * - interrupt stack
 	 * - HW exception stacks (double fault, nmi, debug, mce)
-	 * - SYSENTER stack
+	 * - entry stack
 	 *
 	 * x86-32 can have up to four stacks:
 	 * - task stack
 	 * - softirq stack
 	 * - hardirq stack
-	 * - SYSENTER stack
+	 * - entry stack
 	 */
 	for (regs = NULL; stack; stack = PTR_ALIGN(stack_info.next_sp, sizeof(long))) {
 		const char *stack_name;
arch/x86/kernel/dumpstack_32.c +3 -3
index 5ff13a6b3680..04170f63e3a1 100644
@@ -26,8 +26,8 @@ const char *stack_type_name(enum stack_type type)
 	if (type == STACK_TYPE_SOFTIRQ)
 		return "SOFTIRQ";
 
-	if (type == STACK_TYPE_SYSENTER)
-		return "SYSENTER";
+	if (type == STACK_TYPE_ENTRY)
+		return "ENTRY_TRAMPOLINE";
 
 	return NULL;
 }
@@ -96,7 +96,7 @@ int get_stack_info(unsigned long *stack, struct task_struct *task,
 	if (task != current)
 		goto unknown;
 
-	if (in_sysenter_stack(stack, info))
+	if (in_entry_stack(stack, info))
 		goto recursion_check;
 
 	if (in_hardirq_stack(stack, info))
arch/x86/kernel/dumpstack_64.c +9 -3
index abc828f8c297..563e28d14f2c 100644
@@ -37,8 +37,14 @@ const char *stack_type_name(enum stack_type type)
 	if (type == STACK_TYPE_IRQ)
 		return "IRQ";
 
-	if (type == STACK_TYPE_SYSENTER)
-		return "SYSENTER";
+	if (type == STACK_TYPE_ENTRY) {
+		/*
+		 * On 64-bit, we have a generic entry stack that we
+		 * use for all the kernel entry points, including
+		 * SYSENTER.
+		 */
+		return "ENTRY_TRAMPOLINE";
+	}
 
 	if (type >= STACK_TYPE_EXCEPTION && type <= STACK_TYPE_EXCEPTION_LAST)
 		return exception_stack_names[type - STACK_TYPE_EXCEPTION];
@@ -118,7 +124,7 @@ int get_stack_info(unsigned long *stack, struct task_struct *task,
 	if (in_irq_stack(stack, info))
 		goto recursion_check;
 
-	if (in_sysenter_stack(stack, info))
+	if (in_entry_stack(stack, info))
 		goto recursion_check;
 
 	goto unknown;
arch/x86/kernel/ldt.c +24 -23

107 lines not on this page · raw message

arch/x86/kernel/smpboot.c +1 -5
index 142126ab5aae..12bf07d44dfe 100644
@@ -990,12 +990,8 @@ static int do_boot_cpu(int apicid, int cpu, struct task_struct *idle,
 	initial_code = (unsigned long)start_secondary;
 	initial_stack  = idle->thread.sp;
 
-	/*
-	 * Enable the espfix hack for this CPU
-	*/
-#ifdef CONFIG_X86_ESPFIX64
+	/* Enable the espfix hack for this CPU */
 	init_espfix_ap(cpu);
-#endif
 
 	/* So we see what's up */
 	announce_cpu(cpu, apicid);
arch/x86/kernel/traps.c +4 -2
index 74136fd16f49..7c16fe0b60c2 100644
@@ -52,6 +52,7 @@
 #include <asm/traps.h>
 #include <asm/desc.h>
 #include <asm/fpu/internal.h>
+#include <asm/cpu_entry_area.h>
 #include <asm/mce.h>
 #include <asm/fixmap.h>
 #include <asm/mach_traps.h>
@@ -950,8 +951,9 @@ void __init trap_init(void)
 	 * "sidt" instruction will not leak the location of the kernel, and
 	 * to defend the IDT against arbitrary memory write vulnerabilities.
 	 * It will be reloaded in cpu_init() */
-	__set_fixmap(FIX_RO_IDT, __pa_symbol(idt_table), PAGE_KERNEL_RO);
-	idt_descr.address = fix_to_virt(FIX_RO_IDT);
+	cea_set_pte(CPU_ENTRY_AREA_RO_IDT_VADDR, __pa_symbol(idt_table),
+		    PAGE_KERNEL_RO);
+	idt_descr.address = CPU_ENTRY_AREA_RO_IDT;
 
 	/*
 	 * Should be a barrier for any external CPU state:
arch/x86/kvm/emulate.c +25 -7
index d90cdc77e077..7bbb5da2b49d 100644
@@ -2404,9 +2404,21 @@ static int rsm_load_seg_64(struct x86_emulate_ctxt *ctxt, u64 smbase, int n)
 }
 
 static int rsm_enter_protected_mode(struct x86_emulate_ctxt *ctxt,
-				     u64 cr0, u64 cr4)
+				    u64 cr0, u64 cr3, u64 cr4)
 {
 	int bad;
+	u64 pcid;
+
+	/* In order to later set CR4.PCIDE, CR3[11:0] must be zero.  */
+	pcid = 0;
+	if (cr4 & X86_CR4_PCIDE) {
+		pcid = cr3 & 0xfff;
+		cr3 &= ~0xfff;
+	}
+
+	bad = ctxt->ops->set_cr(ctxt, 3, cr3);
+	if (bad)
+		return X86EMUL_UNHANDLEABLE;
 
 	/*
 	 * First enable PAE, long mode needs it before CR0.PG = 1 is set.
@@ -2425,6 +2437,12 @@ static int rsm_enter_protected_mode(struct x86_emulate_ctxt *ctxt,
 		bad = ctxt->ops->set_cr(ctxt, 4, cr4);
 		if (bad)
 			return X86EMUL_UNHANDLEABLE;
+		if (pcid) {
+			bad = ctxt->ops->set_cr(ctxt, 3, cr3 | pcid);
+			if (bad)
+				return X86EMUL_UNHANDLEABLE;
+		}
+
 	}
 
 	return X86EMUL_CONTINUE;
@@ -2435,11 +2453,11 @@ static int rsm_load_state_32(struct x86_emulate_ctxt *ctxt, u64 smbase)
 	struct desc_struct desc;
 	struct desc_ptr dt;
 	u16 selector;
-	u32 val, cr0, cr4;
+	u32 val, cr0, cr3, cr4;
 	int i;
 
 	cr0 =                      GET_SMSTATE(u32, smbase, 0x7ffc);
-	ctxt->ops->set_cr(ctxt, 3, GET_SMSTATE(u32, smbase, 0x7ff8));
+	cr3 =                      GET_SMSTATE(u32, smbase, 0x7ff8);
 	ctxt->eflags =             GET_SMSTATE(u32, smbase, 0x7ff4) | X86_EFLAGS_FIXED;
 	ctxt->_eip =               GET_SMSTATE(u32, smbase, 0x7ff0);
 
@@ -2481,14 +2499,14 @@ static int rsm_load_state_32(struct x86_emulate_ctxt *ctxt, u64 smbase)
 
 	ctxt->ops->set_smbase(ctxt, GET_SMSTATE(u32, smbase, 0x7ef8));
 
-	return rsm_enter_protected_mode(ctxt, cr0, cr4);
+	return rsm_enter_protected_mode(ctxt, cr0, cr3, cr4);
 }
 
 static int rsm_load_state_64(struct x86_emulate_ctxt *ctxt, u64 smbase)
 {
 	struct desc_struct desc;
 	struct desc_ptr dt;
-	u64 val, cr0, cr4;
+	u64 val, cr0, cr3, cr4;
 	u32 base3;
 	u16 selector;
 	int i, r;
@@ -2505,7 +2523,7 @@ static int rsm_load_state_64(struct x86_emulate_ctxt *ctxt, u64 smbase)
 	ctxt->ops->set_dr(ctxt, 7, (val & DR7_VOLATILE) | DR7_FIXED_1);
 
 	cr0 =                       GET_SMSTATE(u64, smbase, 0x7f58);
-	ctxt->ops->set_cr(ctxt, 3,  GET_SMSTATE(u64, smbase, 0x7f50));
+	cr3 =                       GET_SMSTATE(u64, smbase, 0x7f50);
 	cr4 =                       GET_SMSTATE(u64, smbase, 0x7f48);
 	ctxt->ops->set_smbase(ctxt, GET_SMSTATE(u32, smbase, 0x7f00));
 	val =                       GET_SMSTATE(u64, smbase, 0x7ed0);
@@ -2533,7 +2551,7 @@ static int rsm_load_state_64(struct x86_emulate_ctxt *ctxt, u64 smbase)
 	dt.address =                GET_SMSTATE(u64, smbase, 0x7e68);
 	ctxt->ops->set_gdt(ctxt, &dt);
 
-	r = rsm_enter_protected_mode(ctxt, cr0, cr4);
+	r = rsm_enter_protected_mode(ctxt, cr0, cr3, cr4);
 	if (r != X86EMUL_CONTINUE)
 		return r;
 
arch/x86/kvm/mmu.c +4 -4
index 13ebeedcec07..0fce8d73403c 100644
@@ -3382,7 +3382,7 @@ static int mmu_alloc_direct_roots(struct kvm_vcpu *vcpu)
 		spin_lock(&vcpu->kvm->mmu_lock);
 		if(make_mmu_pages_available(vcpu) < 0) {
 			spin_unlock(&vcpu->kvm->mmu_lock);
-			return 1;
+			return -ENOSPC;
 		}
 		sp = kvm_mmu_get_page(vcpu, 0, 0,
 				vcpu->arch.mmu.shadow_root_level, 1, ACC_ALL);
@@ -3397,7 +3397,7 @@ static int mmu_alloc_direct_roots(struct kvm_vcpu *vcpu)
 			spin_lock(&vcpu->kvm->mmu_lock);
 			if (make_mmu_pages_available(vcpu) < 0) {
 				spin_unlock(&vcpu->kvm->mmu_lock);
-				return 1;
+				return -ENOSPC;
 			}
 			sp = kvm_mmu_get_page(vcpu, i << (30 - PAGE_SHIFT),
 					i << 30, PT32_ROOT_LEVEL, 1, ACC_ALL);
@@ -3437,7 +3437,7 @@ static int mmu_alloc_shadow_roots(struct kvm_vcpu *vcpu)
 		spin_lock(&vcpu->kvm->mmu_lock);
 		if (make_mmu_pages_available(vcpu) < 0) {
 			spin_unlock(&vcpu->kvm->mmu_lock);
-			return 1;
+			return -ENOSPC;
 		}
 		sp = kvm_mmu_get_page(vcpu, root_gfn, 0,
 				vcpu->arch.mmu.shadow_root_level, 0, ACC_ALL);
@@ -3474,7 +3474,7 @@ static int mmu_alloc_shadow_roots(struct kvm_vcpu *vcpu)
 		spin_lock(&vcpu->kvm->mmu_lock);
 		if (make_mmu_pages_available(vcpu) < 0) {
 			spin_unlock(&vcpu->kvm->mmu_lock);
-			return 1;
+			return -ENOSPC;
 		}
 		sp = kvm_mmu_get_page(vcpu, root_gfn, i << 30, PT32_ROOT_LEVEL,
 				      0, ACC_ALL);
arch/x86/kvm/x86.c +1 -1
index df62cdc7a258..075619a92ce7 100644
@@ -7359,7 +7359,7 @@ int kvm_arch_vcpu_ioctl_set_regs(struct kvm_vcpu *vcpu, struct kvm_regs *regs)
 #endif
 
 	kvm_rip_write(vcpu, regs->rip);
-	kvm_set_rflags(vcpu, regs->rflags);
+	kvm_set_rflags(vcpu, regs->rflags | X86_EFLAGS_FIXED);
 
 	vcpu->arch.exception.pending = false;
 
arch/x86/lib/x86-opcode-map.txt +11 -2
index c4d55919fac1..e0b85930dd77 100644
@@ -607,7 +607,7 @@ fb: psubq Pq,Qq | vpsubq Vx,Hx,Wx (66),(v1)
 fc: paddb Pq,Qq | vpaddb Vx,Hx,Wx (66),(v1)
 fd: paddw Pq,Qq | vpaddw Vx,Hx,Wx (66),(v1)
 fe: paddd Pq,Qq | vpaddd Vx,Hx,Wx (66),(v1)
-ff:
+ff: UD0
 EndTable
 
 Table: 3-byte opcode 1 (0x0f 0x38)
@@ -717,7 +717,7 @@ AVXcode: 2
 7e: vpermt2d/q Vx,Hx,Wx (66),(ev)
 7f: vpermt2ps/d Vx,Hx,Wx (66),(ev)
 80: INVEPT Gy,Mdq (66)
-81: INVPID Gy,Mdq (66)
+81: INVVPID Gy,Mdq (66)
 82: INVPCID Gy,Mdq (66)
 83: vpmultishiftqb Vx,Hx,Wx (66),(ev)
 88: vexpandps/d Vpd,Wpd (66),(ev)
@@ -970,6 +970,15 @@ GrpTable: Grp9
 EndTable
 
 GrpTable: Grp10
+# all are UD1
+0: UD1
+1: UD1
+2: UD1
+3: UD1
+4: UD1
+5: UD1
+6: UD1
+7: UD1
 EndTable
 
 # Grp11A and Grp11B are expressed as Grp11 in Intel SDM
arch/x86/mm/Makefile +1 -1
index 7ba7f3d7f477..2e0017af8f9b 100644
@@ -10,7 +10,7 @@ CFLAGS_REMOVE_mem_encrypt.o	= -pg
 endif
 
 obj-y	:=  init.o init_$(BITS).o fault.o ioremap.o extable.o pageattr.o mmap.o \
-	    pat.o pgtable.o physaddr.o setup_nx.o tlb.o
+	    pat.o pgtable.o physaddr.o setup_nx.o tlb.o cpu_entry_area.o
 
 # Make sure __phys_addr has no stackprotector
 nostackp := $(call cc-option, -fno-stack-protector)
arch/x86/mm/cpu_entry_area.c new file +139 -0

139 lines not on this page · raw message

arch/x86/mm/dump_pagetables.c +59 -39

140 lines not on this page · raw message

arch/x86/mm/init_32.c +6 -0
index 8a64a6f2848d..135c9a7898c7 100644
@@ -50,6 +50,7 @@
 #include <asm/setup.h>
 #include <asm/set_memory.h>
 #include <asm/page_types.h>
+#include <asm/cpu_entry_area.h>
 #include <asm/init.h>
 
 #include "mm_internal.h"
@@ -766,6 +767,7 @@ void __init mem_init(void)
 	mem_init_print_info(NULL);
 	printk(KERN_INFO "virtual kernel memory layout:\n"
 		"    fixmap  : 0x%08lx - 0x%08lx   (%4ld kB)\n"
+		"  cpu_entry : 0x%08lx - 0x%08lx   (%4ld kB)\n"
 #ifdef CONFIG_HIGHMEM
 		"    pkmap   : 0x%08lx - 0x%08lx   (%4ld kB)\n"
 #endif
@@ -777,6 +779,10 @@ void __init mem_init(void)
 		FIXADDR_START, FIXADDR_TOP,
 		(FIXADDR_TOP - FIXADDR_START) >> 10,
 
+		CPU_ENTRY_AREA_BASE,
+		CPU_ENTRY_AREA_BASE + CPU_ENTRY_AREA_MAP_SIZE,
+		CPU_ENTRY_AREA_MAP_SIZE >> 10,
+
 #ifdef CONFIG_HIGHMEM
 		PKMAP_BASE, PKMAP_BASE+LAST_PKMAP*PAGE_SIZE,
 		(LAST_PKMAP*PAGE_SIZE) >> 10,
arch/x86/mm/kasan_init_64.c +16 -13
index 9ec70d780f1f..47388f0c0e59 100644
@@ -15,6 +15,7 @@
 #include <asm/tlbflush.h>
 #include <asm/sections.h>
 #include <asm/pgtable.h>
+#include <asm/cpu_entry_area.h>
 
 extern struct range pfn_mapped[E820_MAX_ENTRIES];
 
@@ -322,31 +323,33 @@ void __init kasan_init(void)
 		map_range(&pfn_mapped[i]);
 	}
 
-	kasan_populate_zero_shadow(
-		kasan_mem_to_shadow((void *)PAGE_OFFSET + MAXMEM),
-		kasan_mem_to_shadow((void *)__START_KERNEL_map));
-
-	kasan_populate_shadow((unsigned long)kasan_mem_to_shadow(_stext),
-			      (unsigned long)kasan_mem_to_shadow(_end),
-			      early_pfn_to_nid(__pa(_stext)));
-
-	shadow_cpu_entry_begin = (void *)__fix_to_virt(FIX_CPU_ENTRY_AREA_BOTTOM);
+	shadow_cpu_entry_begin = (void *)CPU_ENTRY_AREA_BASE;
 	shadow_cpu_entry_begin = kasan_mem_to_shadow(shadow_cpu_entry_begin);
 	shadow_cpu_entry_begin = (void *)round_down((unsigned long)shadow_cpu_entry_begin,
 						PAGE_SIZE);
 
-	shadow_cpu_entry_end = (void *)(__fix_to_virt(FIX_CPU_ENTRY_AREA_TOP) + PAGE_SIZE);
+	shadow_cpu_entry_end = (void *)(CPU_ENTRY_AREA_BASE +
+					CPU_ENTRY_AREA_MAP_SIZE);
 	shadow_cpu_entry_end = kasan_mem_to_shadow(shadow_cpu_entry_end);
 	shadow_cpu_entry_end = (void *)round_up((unsigned long)shadow_cpu_entry_end,
 					PAGE_SIZE);
 
-	kasan_populate_zero_shadow(kasan_mem_to_shadow((void *)MODULES_END),
-				   shadow_cpu_entry_begin);
+	kasan_populate_zero_shadow(
+		kasan_mem_to_shadow((void *)PAGE_OFFSET + MAXMEM),
+		shadow_cpu_entry_begin);
 
 	kasan_populate_shadow((unsigned long)shadow_cpu_entry_begin,
 			      (unsigned long)shadow_cpu_entry_end, 0);
 
-	kasan_populate_zero_shadow(shadow_cpu_entry_end, (void *)KASAN_SHADOW_END);
+	kasan_populate_zero_shadow(shadow_cpu_entry_end,
+				kasan_mem_to_shadow((void *)__START_KERNEL_map));
+
+	kasan_populate_shadow((unsigned long)kasan_mem_to_shadow(_stext),
+			      (unsigned long)kasan_mem_to_shadow(_end),
+			      early_pfn_to_nid(__pa(_stext)));
+
+	kasan_populate_zero_shadow(kasan_mem_to_shadow((void *)MODULES_END),
+				(void *)KASAN_SHADOW_END);
 
 	load_cr3(init_top_pgt);
 	__flush_tlb_all();
arch/x86/mm/pgtable_32.c +1 -0
index 6b9bf023a700..c3c5274410a9 100644
@@ -10,6 +10,7 @@
 #include <linux/pagemap.h>
 #include <linux/spinlock.h>
 
+#include <asm/cpu_entry_area.h>
 #include <asm/pgtable.h>
 #include <asm/pgalloc.h>
 #include <asm/fixmap.h>
arch/x86/mm/tlb.c +5 -5
index 3118392cdf75..0a1be3adc97e 100644
@@ -128,7 +128,7 @@ void switch_mm_irqs_off(struct mm_struct *prev, struct mm_struct *next,
 	 * isn't free.
 	 */
 #ifdef CONFIG_DEBUG_VM
-	if (WARN_ON_ONCE(__read_cr3() != build_cr3(real_prev, prev_asid))) {
+	if (WARN_ON_ONCE(__read_cr3() != build_cr3(real_prev->pgd, prev_asid))) {
 		/*
 		 * If we were to BUG here, we'd be very likely to kill
 		 * the system so hard that we don't see the call trace.
@@ -195,7 +195,7 @@ void switch_mm_irqs_off(struct mm_struct *prev, struct mm_struct *next,
 		if (need_flush) {
 			this_cpu_write(cpu_tlbstate.ctxs[new_asid].ctx_id, next->context.ctx_id);
 			this_cpu_write(cpu_tlbstate.ctxs[new_asid].tlb_gen, next_tlb_gen);
-			write_cr3(build_cr3(next, new_asid));
+			write_cr3(build_cr3(next->pgd, new_asid));
 
 			/*
 			 * NB: This gets called via leave_mm() in the idle path
@@ -208,7 +208,7 @@ void switch_mm_irqs_off(struct mm_struct *prev, struct mm_struct *next,
 			trace_tlb_flush_rcuidle(TLB_FLUSH_ON_TASK_SWITCH, TLB_FLUSH_ALL);
 		} else {
 			/* The new ASID is already up to date. */
-			write_cr3(build_cr3_noflush(next, new_asid));
+			write_cr3(build_cr3_noflush(next->pgd, new_asid));
 
 			/* See above wrt _rcuidle. */
 			trace_tlb_flush_rcuidle(TLB_FLUSH_ON_TASK_SWITCH, 0);
@@ -288,7 +288,7 @@ void initialize_tlbstate_and_flush(void)
 		!(cr4_read_shadow() & X86_CR4_PCIDE));
 
 	/* Force ASID 0 and force a TLB flush. */
-	write_cr3(build_cr3(mm, 0));
+	write_cr3(build_cr3(mm->pgd, 0));
 
 	/* Reinitialize tlbstate. */
 	this_cpu_write(cpu_tlbstate.loaded_mm_asid, 0);
@@ -551,7 +551,7 @@ static void do_kernel_range_flush(void *info)
 
 	/* flush range by one by one 'invlpg' */
 	for (addr = f->start; addr < f->end; addr += PAGE_SIZE)
-		__flush_tlb_single(addr);
+		__flush_tlb_one(addr);
 }
 
 void flush_tlb_kernel_range(unsigned long start, unsigned long end)
arch/x86/platform/uv/tlb_uv.c +1 -1
index f44c0bc95aa2..8538a6723171 100644
@@ -299,7 +299,7 @@ static void bau_process_message(struct msg_desc *mdp, struct bau_control *bcp,
 		local_flush_tlb();
 		stat->d_alltlb++;
 	} else {
-		__flush_tlb_one(msg->address);
+		__flush_tlb_single(msg->address);
 		stat->d_onetlb++;
 	}
 	stat->d_requestee++;
arch/x86/xen/mmu_pv.c +0 -2
index c2454237fa67..a0e2b8c6e5c7 100644
@@ -2261,7 +2261,6 @@ static void xen_set_fixmap(unsigned idx, phys_addr_t phys, pgprot_t prot)
 
 	switch (idx) {
 	case FIX_BTMAP_END ... FIX_BTMAP_BEGIN:
-	case FIX_RO_IDT:
 #ifdef CONFIG_X86_32
 	case FIX_WP_TEST:
 # ifdef CONFIG_HIGHMEM
@@ -2272,7 +2271,6 @@ static void xen_set_fixmap(unsigned idx, phys_addr_t phys, pgprot_t prot)
 #endif
 	case FIX_TEXT_POKE0:
 	case FIX_TEXT_POKE1:
-	case FIX_CPU_ENTRY_AREA_TOP ... FIX_CPU_ENTRY_AREA_BOTTOM:
 		/* All local page mappings */
 		pte = pfn_pte(phys, prot);
 		break;
block/bio.c +2 -0
index 33fa6b4af312..7f978eac9a7a 100644
@@ -599,6 +599,8 @@ void __bio_clone_fast(struct bio *bio, struct bio *bio_src)
 	bio->bi_disk = bio_src->bi_disk;
 	bio->bi_partno = bio_src->bi_partno;
 	bio_set_flag(bio, BIO_CLONED);
+	if (bio_flagged(bio_src, BIO_THROTTLED))
+		bio_set_flag(bio, BIO_THROTTLED);
 	bio->bi_opf = bio_src->bi_opf;
 	bio->bi_write_hint = bio_src->bi_write_hint;
 	bio->bi_iter = bio_src->bi_iter;
block/blk-throttle.c +1 -7
index 8631763866c6..a8cd7b3d9647 100644
@@ -2223,13 +2223,7 @@ bool blk_throtl_bio(struct request_queue *q, struct blkcg_gq *blkg,
 out_unlock:
 	spin_unlock_irq(q->queue_lock);
 out:
-	/*
-	 * As multiple blk-throtls may stack in the same issue path, we
-	 * don't want bios to leave with the flag set.  Clear the flag if
-	 * being issued.
-	 */
-	if (!throttled)
-		bio_clear_flag(bio, BIO_THROTTLED);
+	bio_set_flag(bio, BIO_THROTTLED);
 
 #ifdef CONFIG_BLK_DEV_THROTTLING_LOW
 	if (throttled || !td->track_bio_latency)
crypto/af_alg.c +0 -6
index e181073ef64d..6ec360213107 100644
@@ -1165,12 +1165,6 @@ int af_alg_get_rsgl(struct sock *sk, struct msghdr *msg, int flags,
 		if (!af_alg_readable(sk))
 			break;
 
-		if (!ctx->used) {
-			err = af_alg_wait_for_data(sk, flags);
-			if (err)
-				return err;
-		}
-
 		seglen = min_t(size_t, (maxsize - len),
 			       msg_data_left(msg));
 
crypto/algif_aead.c +11 -5
index 3d793bc2aa82..782cb8fec323 100644
@@ -111,6 +111,12 @@ static int _aead_recvmsg(struct socket *sock, struct msghdr *msg,
 	size_t usedpages = 0;		/* [in]  RX bufs to be used from user */
 	size_t processed = 0;		/* [in]  TX bufs to be consumed */
 
+	if (!ctx->used) {
+		err = af_alg_wait_for_data(sk, flags);
+		if (err)
+			return err;
+	}
+
 	/*
 	 * Data length provided by caller via sendmsg/sendpage that has not
 	 * yet been processed.
@@ -285,6 +291,10 @@ static int _aead_recvmsg(struct socket *sock, struct msghdr *msg,
 		/* AIO operation */
 		sock_hold(sk);
 		areq->iocb = msg->msg_iocb;
+
+		/* Remember output size that will be generated. */
+		areq->outlen = outlen;
+
 		aead_request_set_callback(&areq->cra_u.aead_req,
 					  CRYPTO_TFM_REQ_MAY_BACKLOG,
 					  af_alg_async_cb, areq);
@@ -292,12 +302,8 @@ static int _aead_recvmsg(struct socket *sock, struct msghdr *msg,
 				 crypto_aead_decrypt(&areq->cra_u.aead_req);
 
 		/* AIO operation in progress */
-		if (err == -EINPROGRESS || err == -EBUSY) {
-			/* Remember output size that will be generated. */
-			areq->outlen = outlen;
-
+		if (err == -EINPROGRESS || err == -EBUSY)
 			return -EIOCBQUEUED;
-		}
 
 		sock_put(sk);
 	} else {
crypto/algif_skcipher.c +11 -5
index 30ee2a8e8f42..7a3e663d54d5 100644
@@ -72,6 +72,12 @@ static int _skcipher_recvmsg(struct socket *sock, struct msghdr *msg,
 	int err = 0;
 	size_t len = 0;
 
+	if (!ctx->used) {
+		err = af_alg_wait_for_data(sk, flags);
+		if (err)
+			return err;
+	}
+
 	/* Allocate cipher request for current operation. */
 	areq = af_alg_alloc_areq(sk, sizeof(struct af_alg_async_req) +
 				     crypto_skcipher_reqsize(tfm));
@@ -119,6 +125,10 @@ static int _skcipher_recvmsg(struct socket *sock, struct msghdr *msg,
 		/* AIO operation */
 		sock_hold(sk);
 		areq->iocb = msg->msg_iocb;
+
+		/* Remember output size that will be generated. */
+		areq->outlen = len;
+
 		skcipher_request_set_callback(&areq->cra_u.skcipher_req,
 					      CRYPTO_TFM_REQ_MAY_SLEEP,
 					      af_alg_async_cb, areq);
@@ -127,12 +137,8 @@ static int _skcipher_recvmsg(struct socket *sock, struct msghdr *msg,
 			crypto_skcipher_decrypt(&areq->cra_u.skcipher_req);
 
 		/* AIO operation in progress */
-		if (err == -EINPROGRESS || err == -EBUSY) {
-			/* Remember output size that will be generated. */
-			areq->outlen = len;
-
+		if (err == -EINPROGRESS || err == -EBUSY)
 			return -EIOCBQUEUED;
-		}
 
 		sock_put(sk);
 	} else {
crypto/mcryptd.c +10 -13
index 4e6472658852..eca04d3729b3 100644
@@ -81,6 +81,7 @@ static int mcryptd_init_queue(struct mcryptd_queue *queue,
 		pr_debug("cpu_queue #%d %p\n", cpu, queue->cpu_queue);
 		crypto_init_queue(&cpu_queue->queue, max_cpu_qlen);
 		INIT_WORK(&cpu_queue->work, mcryptd_queue_worker);
+		spin_lock_init(&cpu_queue->q_lock);
 	}
 	return 0;
 }
@@ -104,15 +105,16 @@ static int mcryptd_enqueue_request(struct mcryptd_queue *queue,
 	int cpu, err;
 	struct mcryptd_cpu_queue *cpu_queue;
 
-	cpu = get_cpu();
-	cpu_queue = this_cpu_ptr(queue->cpu_queue);
-	rctx->tag.cpu = cpu;
+	cpu_queue = raw_cpu_ptr(queue->cpu_queue);
+	spin_lock(&cpu_queue->q_lock);
+	cpu = smp_processor_id();
+	rctx->tag.cpu = smp_processor_id();
 
 	err = crypto_enqueue_request(&cpu_queue->queue, request);
 	pr_debug("enqueue request: cpu %d cpu_queue %p request %p\n",
 		 cpu, cpu_queue, request);
+	spin_unlock(&cpu_queue->q_lock);
 	queue_work_on(cpu, kcrypto_wq, &cpu_queue->work);
-	put_cpu();
 
 	return err;
 }
@@ -161,16 +163,11 @@ static void mcryptd_queue_worker(struct work_struct *work)
 	cpu_queue = container_of(work, struct mcryptd_cpu_queue, work);
 	i = 0;
 	while (i < MCRYPTD_BATCH || single_task_running()) {
-		/*
-		 * preempt_disable/enable is used to prevent
-		 * being preempted by mcryptd_enqueue_request()
-		 */
-		local_bh_disable();
-		preempt_disable();
+
+		spin_lock_bh(&cpu_queue->q_lock);
 		backlog = crypto_get_backlog(&cpu_queue->queue);
 		req = crypto_dequeue_request(&cpu_queue->queue);
-		preempt_enable();
-		local_bh_enable();
+		spin_unlock_bh(&cpu_queue->q_lock);
 
 		if (!req) {
 			mcryptd_opportunistic_flush();
@@ -185,7 +182,7 @@ static void mcryptd_queue_worker(struct work_struct *work)
 		++i;
 	}
 	if (cpu_queue->queue.qlen)
-		queue_work(kcrypto_wq, &cpu_queue->work);
+		queue_work_on(smp_processor_id(), kcrypto_wq, &cpu_queue->work);
 }
 
 void mcryptd_flusher(struct work_struct *__work)
crypto/skcipher.c +4 -6
index 778e0ff42bfa..11af5fd6a443 100644
@@ -449,6 +449,8 @@ static int skcipher_walk_skcipher(struct skcipher_walk *walk,
 
 	walk->total = req->cryptlen;
 	walk->nbytes = 0;
+	walk->iv = req->iv;
+	walk->oiv = req->iv;
 
 	if (unlikely(!walk->total))
 		return 0;
@@ -456,9 +458,6 @@ static int skcipher_walk_skcipher(struct skcipher_walk *walk,
 	scatterwalk_start(&walk->in, req->src);
 	scatterwalk_start(&walk->out, req->dst);
 
-	walk->iv = req->iv;
-	walk->oiv = req->iv;
-
 	walk->flags &= ~SKCIPHER_WALK_SLEEP;
 	walk->flags |= req->base.flags & CRYPTO_TFM_REQ_MAY_SLEEP ?
 		       SKCIPHER_WALK_SLEEP : 0;
@@ -510,6 +509,8 @@ static int skcipher_walk_aead_common(struct skcipher_walk *walk,
 	int err;
 
 	walk->nbytes = 0;
+	walk->iv = req->iv;
+	walk->oiv = req->iv;
 
 	if (unlikely(!walk->total))
 		return 0;
@@ -525,9 +526,6 @@ static int skcipher_walk_aead_common(struct skcipher_walk *walk,
 	scatterwalk_done(&walk->in, 0, walk->total);
 	scatterwalk_done(&walk->out, 0, walk->total);
 
-	walk->iv = req->iv;
-	walk->oiv = req->iv;
-
 	if (req->base.flags & CRYPTO_TFM_REQ_MAY_SLEEP)
 		walk->flags |= SKCIPHER_WALK_SLEEP;
 	else
drivers/acpi/apei/erst.c +1 -1
index 2c462beee551..a943cf17faa7 100644
@@ -1007,7 +1007,7 @@ static ssize_t erst_reader(struct pstore_record *record)
 	/* The record may be cleared by others, try read next record */
 	if (len == -ENOENT)
 		goto skip;
-	else if (len < sizeof(*rcd)) {
+	else if (len < 0 || len < sizeof(*rcd)) {
 		rc = -EIO;
 		goto out;
 	}
drivers/acpi/nfit/core.c +8 -1
index 9c2c49b6a240..dea0fb3d6f64 100644
@@ -1457,6 +1457,11 @@ static int acpi_nfit_add_dimm(struct acpi_nfit_desc *acpi_desc,
 				dev_name(&adev_dimm->dev));
 		return -ENXIO;
 	}
+	/*
+	 * Record nfit_mem for the notification path to track back to
+	 * the nfit sysfs attributes for this dimm device object.
+	 */
+	dev_set_drvdata(&adev_dimm->dev, nfit_mem);
 
 	/*
 	 * Until standardization materializes we need to consider 4
@@ -1516,9 +1521,11 @@ static void shutdown_dimm_notify(void *data)
 			sysfs_put(nfit_mem->flags_attr);
 			nfit_mem->flags_attr = NULL;
 		}
-		if (adev_dimm)
+		if (adev_dimm) {
 			acpi_remove_notify_handler(adev_dimm->handle,
 					ACPI_DEVICE_NOTIFY, acpi_nvdimm_notify);
+			dev_set_drvdata(&adev_dimm->dev, NULL);
+		}
 	}
 	mutex_unlock(&acpi_desc->init_mutex);
 }
drivers/char/ipmi/ipmi_si_intf.c +0 -1
index e1cbb78c6806..c04aa11f0e21 100644
@@ -3469,7 +3469,6 @@ static int add_smi(struct smi_info *new_smi)
 				 ipmi_addr_src_to_str(new_smi->addr_source),
 				 si_to_str[new_smi->si_type]);
 			rv = -EBUSY;
-			kfree(new_smi);
 			goto out_err;
 		}
 	}
drivers/clk/sunxi/clk-sun9i-mmc.c +12 -0
index 6041bdba2e97..f69f9e8c6f38 100644
@@ -16,6 +16,7 @@
 
 #include <linux/clk.h>
 #include <linux/clk-provider.h>
+#include <linux/delay.h>
 #include <linux/init.h>
 #include <linux/of.h>
 #include <linux/of_device.h>
@@ -83,9 +84,20 @@ static int sun9i_mmc_reset_deassert(struct reset_controller_dev *rcdev,
 	return 0;
 }
 
+static int sun9i_mmc_reset_reset(struct reset_controller_dev *rcdev,
+				 unsigned long id)
+{
+	sun9i_mmc_reset_assert(rcdev, id);
+	udelay(10);
+	sun9i_mmc_reset_deassert(rcdev, id);
+
+	return 0;
+}
+
 static const struct reset_control_ops sun9i_mmc_reset_ops = {
 	.assert		= sun9i_mmc_reset_assert,
 	.deassert	= sun9i_mmc_reset_deassert,
+	.reset		= sun9i_mmc_reset_reset,
 };
 
 static int sun9i_a80_mmc_config_clk_probe(struct platform_device *pdev)
drivers/gpu/drm/i915/i915_gem.c +1 -8
index dc1faa49687d..3b2c0538e48d 100644
@@ -325,17 +325,10 @@ int i915_gem_object_unbind(struct drm_i915_gem_object *obj)
 	 * must wait for all rendering to complete to the object (as unbinding
 	 * must anyway), and retire the requests.
 	 */
-	ret = i915_gem_object_wait(obj,
-				   I915_WAIT_INTERRUPTIBLE |
-				   I915_WAIT_LOCKED |
-				   I915_WAIT_ALL,
-				   MAX_SCHEDULE_TIMEOUT,
-				   NULL);
+	ret = i915_gem_object_set_to_cpu_domain(obj, false);
 	if (ret)
 		return ret;
 
-	i915_gem_retire_requests(to_i915(obj->base.dev));
-
 	while ((vma = list_first_entry_or_null(&obj->vma_list,
 					       struct i915_vma,
 					       obj_link))) {
drivers/gpu/drm/sun4i/sun4i_tcon.c +2 -2
index d9791292553e..7b909d814d38 100644
@@ -567,12 +567,12 @@ static int sun4i_tcon_bind(struct device *dev, struct device *master,
 	if (IS_ERR(tcon->crtc)) {
 		dev_err(dev, "Couldn't create our CRTC\n");
 		ret = PTR_ERR(tcon->crtc);
-		goto err_free_clocks;
+		goto err_free_dotclock;
 	}
 
 	ret = sun4i_rgb_init(drm, tcon);
 	if (ret < 0)
-		goto err_free_clocks;
+		goto err_free_dotclock;
 
 	list_add_tail(&tcon->list, &drv->tcon_list);
 
drivers/mfd/cros_ec_spi.c +1 -0
index c9714072e224..a14196e95e9b 100644
@@ -667,6 +667,7 @@ static int cros_ec_spi_probe(struct spi_device *spi)
 			   sizeof(struct ec_response_get_protocol_info);
 	ec_dev->dout_size = sizeof(struct ec_host_request);
 
+	ec_spi->last_transfer_ns = ktime_get_ns();
 
 	err = cros_ec_register(ec_dev);
 	if (err) {
drivers/mfd/twl4030-audio.c +7 -2
index da16bf45fab4..dc94ffc6321a 100644
@@ -159,13 +159,18 @@ unsigned int twl4030_audio_get_mclk(void)
 EXPORT_SYMBOL_GPL(twl4030_audio_get_mclk);
 
 static bool twl4030_audio_has_codec(struct twl4030_audio_data *pdata,
-			      struct device_node *node)
+			      struct device_node *parent)
 {
+	struct device_node *node;
+
 	if (pdata && pdata->codec)
 		return true;
 
-	if (of_find_node_by_name(node, "codec"))
+	node = of_get_child_by_name(parent, "codec");
+	if (node) {
+		of_node_put(node);
 		return true;
+	}
 
 	return false;
 }
drivers/mfd/twl6040.c +8 -4
index d66502d36ba0..dd19f17a1b63 100644
@@ -97,12 +97,16 @@ static struct reg_sequence twl6040_patch[] = {
 };
 
 
-static bool twl6040_has_vibra(struct device_node *node)
+static bool twl6040_has_vibra(struct device_node *parent)
 {
-#ifdef CONFIG_OF
-	if (of_find_node_by_name(node, "vibra"))
+	struct device_node *node;
+
+	node = of_get_child_by_name(parent, "vibra");
+	if (node) {
+		of_node_put(node);
 		return true;
-#endif
+	}
+
 	return false;
 }
 
drivers/net/ethernet/marvell/mvneta.c +6 -2
index bc93b69cfd1e..a539263cd79c 100644
@@ -1214,6 +1214,10 @@ static void mvneta_port_disable(struct mvneta_port *pp)
 	val &= ~MVNETA_GMAC0_PORT_ENABLE;
 	mvreg_write(pp, MVNETA_GMAC_CTRL_0, val);
 
+	pp->link = 0;
+	pp->duplex = -1;
+	pp->speed = 0;
+
 	udelay(200);
 }
 
@@ -1958,9 +1962,9 @@ static int mvneta_rx_swbm(struct mvneta_port *pp, int rx_todo,
 
 		if (!mvneta_rxq_desc_is_first_last(rx_status) ||
 		    (rx_status & MVNETA_RXD_ERR_SUMMARY)) {
+			mvneta_rx_error(pp, rx_desc);
 err_drop_frame:
 			dev->stats.rx_errors++;
-			mvneta_rx_error(pp, rx_desc);
 			/* leave the descriptor untouched */
 			continue;
 		}
@@ -3011,7 +3015,7 @@ static void mvneta_cleanup_rxqs(struct mvneta_port *pp)
 {
 	int queue;
 
-	for (queue = 0; queue < txq_number; queue++)
+	for (queue = 0; queue < rxq_number; queue++)
 		mvneta_rxq_deinit(pp, &pp->rxqs[queue]);
 }
 
drivers/nvdimm/btt.c +167 -34

307 lines not on this page · raw message

drivers/nvdimm/btt.h +44 -1

74 lines not on this page · raw message

drivers/nvdimm/pfn_devs.c +15 -5
index 65cc171c721d..2adada1a5855 100644
@@ -364,9 +364,9 @@ struct device *nd_pfn_create(struct nd_region *nd_region)
 int nd_pfn_validate(struct nd_pfn *nd_pfn, const char *sig)
 {
 	u64 checksum, offset;
-	unsigned long align;
 	enum nd_pfn_mode mode;
 	struct nd_namespace_io *nsio;
+	unsigned long align, start_pad;
 	struct nd_pfn_sb *pfn_sb = nd_pfn->pfn_sb;
 	struct nd_namespace_common *ndns = nd_pfn->ndns;
 	const u8 *parent_uuid = nd_dev_to_uuid(&ndns->dev);
@@ -410,6 +410,7 @@ int nd_pfn_validate(struct nd_pfn *nd_pfn, const char *sig)
 
 	align = le32_to_cpu(pfn_sb->align);
 	offset = le64_to_cpu(pfn_sb->dataoff);
+	start_pad = le32_to_cpu(pfn_sb->start_pad);
 	if (align == 0)
 		align = 1UL << ilog2(offset);
 	mode = le32_to_cpu(pfn_sb->mode);
@@ -468,7 +469,7 @@ int nd_pfn_validate(struct nd_pfn *nd_pfn, const char *sig)
 		return -EBUSY;
 	}
 
-	if ((align && !IS_ALIGNED(offset, align))
+	if ((align && !IS_ALIGNED(nsio->res.start + offset + start_pad, align))
 			|| !IS_ALIGNED(offset, PAGE_SIZE)) {
 		dev_err(&nd_pfn->dev,
 				"bad offset: %#llx dax disabled align: %#lx\n",
@@ -582,6 +583,12 @@ static struct vmem_altmap *__nvdimm_setup_pfn(struct nd_pfn *nd_pfn,
 	return altmap;
 }
 
+static u64 phys_pmem_align_down(struct nd_pfn *nd_pfn, u64 phys)
+{
+	return min_t(u64, PHYS_SECTION_ALIGN_DOWN(phys),
+			ALIGN_DOWN(phys, nd_pfn->align));
+}
+
 static int nd_pfn_init(struct nd_pfn *nd_pfn)
 {
 	u32 dax_label_reserve = is_nd_dax(&nd_pfn->dev) ? SZ_128K : 0;
@@ -637,13 +644,16 @@ static int nd_pfn_init(struct nd_pfn *nd_pfn)
 	start = nsio->res.start;
 	size = PHYS_SECTION_ALIGN_UP(start + size) - start;
 	if (region_intersects(start, size, IORESOURCE_SYSTEM_RAM,
-				IORES_DESC_NONE) == REGION_MIXED) {
+				IORES_DESC_NONE) == REGION_MIXED
+			|| !IS_ALIGNED(start + resource_size(&nsio->res),
+				nd_pfn->align)) {
 		size = resource_size(&nsio->res);
-		end_trunc = start + size - PHYS_SECTION_ALIGN_DOWN(start + size);
+		end_trunc = start + size - phys_pmem_align_down(nd_pfn,
+				start + size);
 	}
 
 	if (start_pad + end_trunc)
-		dev_info(&nd_pfn->dev, "%s section collision, truncate %d bytes\n",
+		dev_info(&nd_pfn->dev, "%s alignment collision, truncate %d bytes\n",
 				dev_name(&ndns->dev), start_pad + end_trunc);
 
 	/*
drivers/parisc/lba_pci.c +33 -0
index a25fed52f7e9..41b740aed3a3 100644
@@ -1692,3 +1692,36 @@ void lba_set_iregs(struct parisc_device *lba, u32 ibase, u32 imask)
 	iounmap(base_addr);
 }
 
+
+/*
+ * The design of the Diva management card in rp34x0 machines (rp3410, rp3440)
+ * seems rushed, so that many built-in components simply don't work.
+ * The following quirks disable the serial AUX port and the built-in ATI RV100
+ * Radeon 7000 graphics card which both don't have any external connectors and
+ * thus are useless, and even worse, e.g. the AUX port occupies ttyS0 and as
+ * such makes those machines the only PARISC machines on which we can't use
+ * ttyS0 as boot console.
+ */
+static void quirk_diva_ati_card(struct pci_dev *dev)
+{
+	if (dev->subsystem_vendor != PCI_VENDOR_ID_HP ||
+	    dev->subsystem_device != 0x1292)
+		return;
+
+	dev_info(&dev->dev, "Hiding Diva built-in ATI card");
+	dev->device = 0;
+}
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RADEON_QY,
+	quirk_diva_ati_card);
+
+static void quirk_diva_aux_disable(struct pci_dev *dev)
+{
+	if (dev->subsystem_vendor != PCI_VENDOR_ID_HP ||
+	    dev->subsystem_device != 0x1291)
+		return;
+
+	dev_info(&dev->dev, "Hiding Diva built-in AUX serial device");
+	dev->device = 0;
+}
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_DIVA_AUX,
+	quirk_diva_aux_disable);
drivers/pci/pci-driver.c +6 -1
index 11bd267fc137..bb0927de79dd 100644
@@ -968,7 +968,12 @@ static int pci_pm_thaw_noirq(struct device *dev)
 	if (pci_has_legacy_pm_support(pci_dev))
 		return pci_legacy_resume_early(dev);
 
-	pci_update_current_state(pci_dev, PCI_D0);
+	/*
+	 * pci_restore_state() requires the device to be in D0 (because of MSI
+	 * restoration among other things), so force it into D0 in case the
+	 * driver's "freeze" callbacks put it into a low-power state directly.
+	 */
+	pci_set_power_state(pci_dev, PCI_D0);
 	pci_restore_state(pci_dev);
 
 	if (drv && drv->pm && drv->pm->thaw_noirq)
drivers/pinctrl/intel/pinctrl-cherryview.c +16 -0
index fadbca907c7c..0907531a02ca 100644
@@ -1620,6 +1620,22 @@ static int chv_gpio_probe(struct chv_pinctrl *pctrl, int irq)
 			clear_bit(i, chip->irq_valid_mask);
 	}
 
+	/*
+	 * The same set of machines in chv_no_valid_mask[] have incorrectly
+	 * configured GPIOs that generate spurious interrupts so we use
+	 * this same list to apply another quirk for them.
+	 *
+	 * See also https://bugzilla.kernel.org/show_bug.cgi?id=197953.
+	 */
+	if (!need_valid_mask) {
+		/*
+		 * Mask all interrupts the community is able to generate
+		 * but leave the ones that can only generate GPEs unmasked.
+		 */
+		chv_writel(GENMASK(31, pctrl->community->nirqs),
+			   pctrl->regs + CHV_INTMASK);
+	}
+
 	/* Clear all interrupts */
 	chv_writel(0xffff, pctrl->regs + CHV_INTSTAT);
 
drivers/spi/spi-armada-3700.c +8 -0
index 568e1c65aa82..fe3fa1e8517a 100644
@@ -79,6 +79,7 @@
 #define A3700_SPI_BYTE_LEN		BIT(5)
 #define A3700_SPI_CLK_PRESCALE		BIT(0)
 #define A3700_SPI_CLK_PRESCALE_MASK	(0x1f)
+#define A3700_SPI_CLK_EVEN_OFFS		(0x10)
 
 #define A3700_SPI_WFIFO_THRS_BIT	28
 #define A3700_SPI_RFIFO_THRS_BIT	24
@@ -220,6 +221,13 @@ static void a3700_spi_clock_set(struct a3700_spi *a3700_spi,
 
 	prescale = DIV_ROUND_UP(clk_get_rate(a3700_spi->clk), speed_hz);
 
+	/* For prescaler values over 15, we can only set it by steps of 2.
+	 * Starting from A3700_SPI_CLK_EVEN_OFFS, we set values from 0 up to
+	 * 30. We only use this range from 16 to 30.
+	 */
+	if (prescale > 15)
+		prescale = A3700_SPI_CLK_EVEN_OFFS + DIV_ROUND_UP(prescale, 2);
+
 	val = spireg_read(a3700_spi, A3700_SPI_IF_CFG_REG);
 	val = val & ~A3700_SPI_CLK_PRESCALE_MASK;
 
drivers/spi/spi-xilinx.c +11 -0
index bc7100b93dfc..e0b9fe1d0e37 100644
@@ -271,6 +271,7 @@ static int xilinx_spi_txrx_bufs(struct spi_device *spi, struct spi_transfer *t)
 	while (remaining_words) {
 		int n_words, tx_words, rx_words;
 		u32 sr;
+		int stalled;
 
 		n_words = min(remaining_words, xspi->buffer_size);
 
@@ -299,7 +300,17 @@ static int xilinx_spi_txrx_bufs(struct spi_device *spi, struct spi_transfer *t)
 
 		/* Read out all the data from the Rx FIFO */
 		rx_words = n_words;
+		stalled = 10;
 		while (rx_words) {
+			if (rx_words == n_words && !(stalled--) &&
+			    !(sr & XSPI_SR_TX_EMPTY_MASK) &&
+			    (sr & XSPI_SR_RX_EMPTY_MASK)) {
+				dev_err(&spi->dev,
+					"Detected stall. Check C_SPI_MODE and C_SPI_MEMORY\n");
+				xspi_init_hw(xspi);
+				return -EIO;
+			}
+
 			if ((sr & XSPI_SR_TX_EMPTY_MASK) && (rx_words > 1)) {
 				xilinx_spi_rx(xspi);
 				rx_words--;
include/asm-generic/mm_hooks.h +3 -2
index ea189d88a3cc..8ac4e68a12f0 100644
@@ -7,9 +7,10 @@
 #ifndef _ASM_GENERIC_MM_HOOKS_H
 #define _ASM_GENERIC_MM_HOOKS_H
 
-static inline void arch_dup_mmap(struct mm_struct *oldmm,
-				 struct mm_struct *mm)
+static inline int arch_dup_mmap(struct mm_struct *oldmm,
+				struct mm_struct *mm)
 {
+	return 0;
 }
 
 static inline void arch_exit_mmap(struct mm_struct *mm)
include/asm-generic/pgtable.h +5 -0
index 1ac457511f4e..045a7f52ab3a 100644
@@ -1025,6 +1025,11 @@ static inline int pmd_clear_huge(pmd_t *pmd)
 struct file;
 int phys_mem_access_prot_allowed(struct file *file, unsigned long pfn,
 			unsigned long size, pgprot_t *vma_prot);
+
+#ifndef CONFIG_X86_ESPFIX64
+static inline void init_espfix_bsp(void) { }
+#endif
+
 #endif /* !__ASSEMBLY__ */
 
 #ifndef io_remap_pfn_range
include/crypto/mcryptd.h +1 -0
index cceafa01f907..b67404fc4b34 100644
@@ -27,6 +27,7 @@ static inline struct mcryptd_ahash *__mcryptd_ahash_cast(
 
 struct mcryptd_cpu_queue {
 	struct crypto_queue queue;
+	spinlock_t q_lock;
 	struct work_struct work;
 };
 
include/linux/bio.h +2 -0
index 275c91c99516..45f00dd6323c 100644
@@ -504,6 +504,8 @@ extern unsigned int bvec_nr_vecs(unsigned short idx);
 
 #define bio_set_dev(bio, bdev) 			\
 do {						\
+	if ((bio)->bi_disk != (bdev)->bd_disk)	\
+		bio_clear_flag(bio, BIO_THROTTLED);\
 	(bio)->bi_disk = (bdev)->bd_disk;	\
 	(bio)->bi_partno = (bdev)->bd_partno;	\
 } while (0)
include/linux/blk_types.h +4 -5
index 96ac3815542c..1c8a8a2aedf7 100644
@@ -50,8 +50,6 @@ struct blk_issue_stat {
 struct bio {
 	struct bio		*bi_next;	/* request queue link */
 	struct gendisk		*bi_disk;
-	u8			bi_partno;
-	blk_status_t		bi_status;
 	unsigned int		bi_opf;		/* bottom bits req flags,
 						 * top bits REQ_OP. Use
 						 * accessors.
@@ -59,8 +57,8 @@ struct bio {
 	unsigned short		bi_flags;	/* status, etc and bvec pool number */
 	unsigned short		bi_ioprio;
 	unsigned short		bi_write_hint;
-
-	struct bvec_iter	bi_iter;
+	blk_status_t		bi_status;
+	u8			bi_partno;
 
 	/* Number of segments in this BIO after
 	 * physical address coalescing is performed.
@@ -74,8 +72,9 @@ struct bio {
 	unsigned int		bi_seg_front_size;
 	unsigned int		bi_seg_back_size;
 
-	atomic_t		__bi_remaining;
+	struct bvec_iter	bi_iter;
 
+	atomic_t		__bi_remaining;
 	bio_end_io_t		*bi_end_io;
 
 	void			*bi_private;
include/linux/blkdev.h +1 -1
index 8da66379f7ea..fd47bd96b5d3 100644
@@ -135,7 +135,7 @@ typedef __u32 __bitwise req_flags_t;
 struct request {
 	struct list_head queuelist;
 	union {
-		call_single_data_t csd;
+		struct __call_single_data csd;
 		u64 fifo_time;
 	};
 
init/main.c +2 -4
index 0ee9c6866ada..8a390f60ec81 100644
@@ -504,6 +504,8 @@ static void __init mm_init(void)
 	pgtable_init();
 	vmalloc_init();
 	ioremap_huge_init();
+	/* Should be run before the first non-init thread is created */
+	init_espfix_bsp();
 }
 
 asmlinkage __visible void __init start_kernel(void)
@@ -673,10 +675,6 @@ asmlinkage __visible void __init start_kernel(void)
 #ifdef CONFIG_X86
 	if (efi_enabled(EFI_RUNTIME_SERVICES))
 		efi_enter_virtual_mode();
-#endif
-#ifdef CONFIG_X86_ESPFIX64
-	/* Should be run before the first non-init thread is created */
-	init_espfix_bsp();
 #endif
 	thread_stack_cache_init();
 	cred_init();
kernel/fork.c +1 -2
index 07cc743698d3..500ce64517d9 100644
@@ -721,8 +721,7 @@ static __latent_entropy int dup_mmap(struct mm_struct *mm,
 			goto out;
 	}
 	/* a new mm has just been created */
-	arch_dup_mmap(oldmm, mm);
-	retval = 0;
+	retval = arch_dup_mmap(oldmm, mm);
 out:
 	up_write(&mm->mmap_sem);
 	flush_tlb_mm(oldmm);
net/ipv6/route.c +29 -29

16 lines not on this page · raw message

sound/core/rawmidi.c +12 -3
index b3b353d72527..f055ca10bbc1 100644

Lines of this file are not shown. View the raw message.

sound/pci/hda/patch_hdmi.c +4 -2
index c19c81d230bd..b4f1b6e88305 100644

Lines of this file are not shown. View the raw message.

sound/pci/hda/patch_realtek.c +34 -1
index b076386c8952..9ac4b9076ee2 100644

Lines of this file are not shown. View the raw message.

sound/usb/mixer.c +16 -11
index 4fde4f8d4444..75bce127d768 100644

Lines of this file are not shown. View the raw message.

sound/usb/quirks.c +4 -3
index 20624320b753..8d7db7cd4f88 100644

Lines of this file are not shown. View the raw message.

tools/objtool/.gitignore +1 -1
index d3102c865a95..914cff12899b 100644

Lines of this file are not shown. View the raw message.

tools/objtool/Makefile +10 -20
index 424b1965d06f..ae0272f9a091 100644

Lines of this file are not shown. View the raw message.

tools/objtool/arch/x86/Build +5 -5
index debbdb0b5c43..b998412c017d 100644

Lines of this file are not shown. View the raw message.

tools/objtool/arch/x86/decode.c +3 -3
index 34a579f806e3..8acfc47af70e 100644

Lines of this file are not shown. View the raw message.

tools/objtool/arch/x86/include/asm/inat.h new file +244 -0

244 lines not on this page · raw message

tools/objtool/arch/x86/include/asm/inat_types.h new file +29 -0
new file mode 100644
index 000000000000..cb3c20ce39cf

Lines of this file are not shown. View the raw message.

tools/objtool/arch/x86/include/asm/insn.h new file +211 -0

211 lines not on this page · raw message

tools/objtool/arch/x86/include/asm/orc_types.h new file +107 -0

107 lines not on this page · raw message

tools/objtool/arch/x86/insn/gen-insn-attr-x86.awk deleted +0 -393

393 lines not on this page · raw message

tools/objtool/arch/x86/insn/inat.c deleted +0 -97

97 lines not on this page · raw message

tools/objtool/arch/x86/insn/inat.h deleted +0 -234

234 lines not on this page · raw message

tools/objtool/arch/x86/insn/inat_types.h deleted +0 -29
deleted file mode 100644
index cb3c20ce39cf..000000000000

Lines of this file are not shown. View the raw message.

tools/objtool/arch/x86/insn/insn.c deleted +0 -606

606 lines not on this page · raw message

tools/objtool/arch/x86/insn/insn.h deleted +0 -211

211 lines not on this page · raw message

tools/objtool/arch/x86/insn/x86-opcode-map.txt deleted +0 -1063

1,063 lines not on this page · raw message

tools/objtool/arch/x86/lib/inat.c new file +97 -0

97 lines not on this page · raw message

tools/objtool/arch/x86/lib/insn.c new file +606 -0

606 lines not on this page · raw message

tools/objtool/arch/x86/lib/x86-opcode-map.txt new file +1072 -0

1,072 lines not on this page · raw message

tools/objtool/arch/x86/tools/gen-insn-attr-x86.awk new file +393 -0

393 lines not on this page · raw message

tools/objtool/orc.h +1 -1
index a4139e386ef3..b0e92a6d0903 100644

Lines of this file are not shown. View the raw message.

tools/objtool/orc_dump.c +4 -3
index 36c5bf6a2675..c3343820916a 100644

Lines of this file are not shown. View the raw message.

tools/objtool/orc_types.h deleted +0 -107

107 lines not on this page · raw message

tools/objtool/sync-check.sh new file +29 -0
new file mode 100755
index 000000000000..1470e74e9d66

Lines of this file are not shown. View the raw message.

tools/perf/util/intel-pt-decoder/x86-opcode-map.txt +12 -3
index 12e377184ee4..e0b85930dd77 100644

Lines of this file are not shown. View the raw message.

tools/testing/selftests/x86/ldt_gdt.c +3 -6
index 66e5ce5b91f0..0304ffb714f2 100644

Lines of this file are not shown. View the raw message.

virt/kvm/arm/mmu.c +4 -6
index b36945d49986..b4b69c2d1012 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Part of the diff is not shown here. View the raw message.

#2 lore raw
In reply to Greg KH

No solution found to the permissions on tools/objtool/sync-check.sh ? git or patch is not smart enough for that ? It's obviously extremely easy to solve the problem, but I find that rather strange.

Fran�ois Valenduc

Le 29/12/17 � 18:10, Greg KH a �crit�:

Quoted 290 lines

I'm announcing the release of the 4.14.10 kernel.

All users of the 4.14 kernel series must upgrade.

The updated 4.14.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.14.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary

thanks,

greg k-h

------------

 Documentation/x86/x86_64/mm.txt                     |   24 
 Makefile                                            |    2 
 arch/arm64/kvm/hyp/debug-sr.c                       |    3 
 arch/parisc/boot/compressed/misc.c                  |    4 
 arch/parisc/kernel/entry.S                          |   12 
 arch/parisc/kernel/hpmc.S                           |    1 
 arch/powerpc/include/asm/mmu_context.h              |    5 
 arch/powerpc/kvm/book3s_xive.c                      |    7 
 arch/powerpc/perf/core-book3s.c                     |    8 
 arch/um/include/asm/mmu_context.h                   |    3 
 arch/unicore32/include/asm/mmu_context.h            |    5 
 arch/x86/Kconfig                                    |    3 
 arch/x86/entry/entry_32.S                           |   12 
 arch/x86/entry/entry_64.S                           |    4 
 arch/x86/entry/vsyscall/vsyscall_64.c               |   38 
 arch/x86/include/asm/cpu_entry_area.h               |   68 +
 arch/x86/include/asm/desc.h                         |    1 
 arch/x86/include/asm/espfix.h                       |    7 
 arch/x86/include/asm/fixmap.h                       |   71 -
 arch/x86/include/asm/inat.h                         |   10 
 arch/x86/include/asm/invpcid.h                      |   53 
 arch/x86/include/asm/mmu.h                          |    4 
 arch/x86/include/asm/mmu_context.h                  |   54 -
 arch/x86/include/asm/pgtable_32_types.h             |   15 
 arch/x86/include/asm/pgtable_64_types.h             |   47 
 arch/x86/include/asm/processor.h                    |    6 
 arch/x86/include/asm/stacktrace.h                   |    4 
 arch/x86/include/asm/tlbflush.h                     |  136 +-
 arch/x86/kernel/asm-offsets.c                       |    4 
 arch/x86/kernel/asm-offsets_32.c                    |    2 
 arch/x86/kernel/cpu/common.c                        |  100 -
 arch/x86/kernel/cpu/microcode/intel.c               |   13 
 arch/x86/kernel/dumpstack.c                         |   11 
 arch/x86/kernel/dumpstack_32.c                      |    6 
 arch/x86/kernel/dumpstack_64.c                      |   12 
 arch/x86/kernel/ldt.c                               |   47 
 arch/x86/kernel/smpboot.c                           |    6 
 arch/x86/kernel/traps.c                             |    6 
 arch/x86/kvm/emulate.c                              |   32 
 arch/x86/kvm/mmu.c                                  |    8 
 arch/x86/kvm/x86.c                                  |    2 
 arch/x86/lib/x86-opcode-map.txt                     |   13 
 arch/x86/mm/Makefile                                |    2 
 arch/x86/mm/cpu_entry_area.c                        |  139 ++
 arch/x86/mm/dump_pagetables.c                       |   98 +
 arch/x86/mm/init_32.c                               |    6 
 arch/x86/mm/kasan_init_64.c                         |   29 
 arch/x86/mm/pgtable_32.c                            |    1 
 arch/x86/mm/tlb.c                                   |   10 
 arch/x86/platform/uv/tlb_uv.c                       |    2 
 arch/x86/xen/mmu_pv.c                               |    2 
 block/bio.c                                         |    2 
 block/blk-throttle.c                                |    8 
 crypto/af_alg.c                                     |    6 
 crypto/algif_aead.c                                 |   16 
 crypto/algif_skcipher.c                             |   16 
 crypto/mcryptd.c                                    |   23 
 crypto/skcipher.c                                   |   10 
 drivers/acpi/apei/erst.c                            |    2 
 drivers/acpi/nfit/core.c                            |    9 
 drivers/char/ipmi/ipmi_si_intf.c                    |    1 
 drivers/clk/sunxi/clk-sun9i-mmc.c                   |   12 
 drivers/gpu/drm/i915/i915_gem.c                     |    9 
 drivers/gpu/drm/sun4i/sun4i_tcon.c                  |    4 
 drivers/mfd/cros_ec_spi.c                           |    1 
 drivers/mfd/twl4030-audio.c                         |    9 
 drivers/mfd/twl6040.c                               |   12 
 drivers/net/ethernet/marvell/mvneta.c               |    8 
 drivers/nvdimm/btt.c                                |  201 +++
 drivers/nvdimm/btt.h                                |   45 
 drivers/nvdimm/pfn_devs.c                           |   20 
 drivers/parisc/lba_pci.c                            |   33 
 drivers/pci/pci-driver.c                            |    7 
 drivers/pinctrl/intel/pinctrl-cherryview.c          |   16 
 drivers/spi/spi-armada-3700.c                       |    8 
 drivers/spi/spi-xilinx.c                            |   11 
 include/asm-generic/mm_hooks.h                      |    5 
 include/asm-generic/pgtable.h                       |    5 
 include/crypto/mcryptd.h                            |    1 
 include/linux/bio.h                                 |    2 
 include/linux/blk_types.h                           |    9 
 include/linux/blkdev.h                              |    2 
 init/main.c                                         |    6 
 kernel/fork.c                                       |    3 
 net/ipv6/route.c                                    |   58 -
 sound/core/rawmidi.c                                |   15 
 sound/pci/hda/patch_hdmi.c                          |    6 
 sound/pci/hda/patch_realtek.c                       |   35 
 sound/usb/mixer.c                                   |   27 
 sound/usb/quirks.c                                  |    7 
 tools/objtool/.gitignore                            |    2 
 tools/objtool/Makefile                              |   30 
 tools/objtool/arch/x86/Build                        |   10 
 tools/objtool/arch/x86/decode.c                     |    6 
 tools/objtool/arch/x86/include/asm/inat.h           |  244 ++++
 tools/objtool/arch/x86/include/asm/inat_types.h     |   29 
 tools/objtool/arch/x86/include/asm/insn.h           |  211 +++
 tools/objtool/arch/x86/include/asm/orc_types.h      |  107 +
 tools/objtool/arch/x86/insn/gen-insn-attr-x86.awk   |  393 -------
 tools/objtool/arch/x86/insn/inat.c                  |   97 -
 tools/objtool/arch/x86/insn/inat.h                  |  234 ----
 tools/objtool/arch/x86/insn/inat_types.h            |   29 
 tools/objtool/arch/x86/insn/insn.c                  |  606 -----------
 tools/objtool/arch/x86/insn/insn.h                  |  211 ---
 tools/objtool/arch/x86/insn/x86-opcode-map.txt      | 1063 -------------------
 tools/objtool/arch/x86/lib/inat.c                   |   97 +
 tools/objtool/arch/x86/lib/insn.c                   |  606 +++++++++++
 tools/objtool/arch/x86/lib/x86-opcode-map.txt       | 1072 ++++++++++++++++++++
 tools/objtool/arch/x86/tools/gen-insn-attr-x86.awk  |  393 +++++++
 tools/objtool/orc.h                                 |    2 
 tools/objtool/orc_dump.c                            |    7 
 tools/objtool/orc_types.h                           |  107 -
 tools/objtool/sync-check.sh                         |   29 
 tools/perf/util/intel-pt-decoder/x86-opcode-map.txt |   15 
 tools/testing/selftests/x86/ldt_gdt.c               |    9 
 virt/kvm/arm/mmu.c                                  |   10 
 116 files changed, 4023 insertions(+), 3424 deletions(-)

Andy Lutomirski (3):
x86/vsyscall/64: Explicitly set _PAGE_USER in the pagetable hierarchy x86/vsyscall/64: Warn and fail vsyscall emulation in NATIVE mode x86/mm/64: Improve the memory map documentation

Chen-Yu Tsai (1):
clk: sunxi: sun9i-mmc: Implement reset callback for reset controls

Chris Wilson (1):
drm/i915: Flush pending GTT writes before unbinding

C�dric Le Goater (1):
KVM: PPC: Book3S: fix XIVE migration of pending interrupts

Dan Williams (3):
acpi, nfit: fix health event notification
libnvdimm, dax: fix 1GB-aligned namespaces vs physical misalignment libnvdimm, pfn: fix start_pad handling for aligned namespaces

Dave Hansen (4):
x86/entry: Rename SYSENTER_stack to CPU_ENTRY_AREA_entry_stack x86/mm: Move the CR3 construction functions to tlbflush.h x86/mm: Remove hard-coded ASID limit checks
x86/mm: Put MMU to hardware ASID translation in one place

Eric Biggers (1):
crypto: skcipher - set walk.iv for zero-length inputs

Greg Kroah-Hartman (2):

      Revert "ipv6: grab rt->rt6i_ref before allocating pcpu rt"
      Linux 4.14.10

Guneshwor Singh (1):
ALSA: hda - Add vendor id for Cannonlake HDMI codec

Helge Deller (3):
parisc: Align os_hpmc_size on word boundary
parisc: Fix indenting in puts()
parisc: Hide Diva-built-in serial aux and graphics card

Ingo Molnar (1):
tools/headers: Sync objtool UAPI header

Jens Axboe (1):
block: unalign call_single_data in struct request

Johan Hovold (2):
mfd: twl4030-audio: Fix sibling-node lookup
mfd: twl6040: Fix child-node lookup

John David Anglin (1):
Revert "parisc: Re-enable interrupts early"

John Einar Reitan (1):
Revert "ipmi_si: fix memory leak on new_smi"

Jon Hunter (1):
mfd: cros ec: spi: Don't send first message too soon

Josh Poimboeuf (3):
objtool: Move synced files to their original relative locations
objtool: Move kernel headers/code sync check to a script
objtool: Fix cross-build

Julien Thierry (1):
arm64: kvm: Prevent restoring stale PMSCR_EL1 for vcpu

Jussi Laako (1):
ALSA: usb-audio: Add native DSD support for Esoteric D-05X

Kailang Yang (1):
ALSA: hda/realtek - Fix Dell AIO LineOut issue

Laurent Vivier (1):
KVM: PPC: Book3S HV: Fix pending_pri value in kvmppc_xive_get_icp()

Marc Zyngier (1):
KVM: arm/arm64: Fix HYP unmapping going off limits

Maxime Chevallier (1):
spi: a3700: Fix clk prescaling for coefficient over 15

Maxime Ripard (1):
drm/sun4i: Fix error path handling

Mika Westerberg (1):
pinctrl: cherryview: Mask all interrupts on Intel_Strago based systems

Mikulas Patocka (1):
objtool: Fix 64-bit build on 32-bit host

Paolo Bonzini (1):
kvm: x86: fix RSM when PCID is non-zero

Peter Zijlstra (8):
x86/ldt: Rework locking
x86/doc: Remove obvious weirdnesses from the x86 MM layout documentation x86/uv: Use the right TLB-flush API
x86/microcode: Dont abuse the TLB-flush interface
x86/mm: Use __flush_tlb_one() for kernel memory
x86/mm: Remove superfluous barriers
x86/mm: Add comments to clarify which TLB-flush functions are supposed to flush what x86/mm: Create asm/invpcid.h

Rafael J. Wysocki (1):
PCI / PM: Force devices to D0 in pci_pm_thaw_noirq()

Randy Dunlap (1):
x86/decoder: Fix and update the opcodes map

Ravi Bangoria (1):
powerpc/perf: Dereference BHRB entries safely

Ricardo Neri (1):
x86/insn-eval: Add utility functions to get segment selector

Ricardo Ribalda Delgado (1):
spi: xilinx: Detect stall with Unknown commands

Sebastian Andrzej Siewior (1):
crypto: mcryptd - protect the per-CPU queue with a lock

Shaohua Li (1):
block-throttle: avoid double charge

Stephan Mueller (2):
crypto: af_alg - wait for data at beginning of recvmsg
crypto: af_alg - fix race accessing cipher request

Takashi Iwai (3):
ACPI: APEI / ERST: Fix missing error handling in erst_reader()
ALSA: rawmidi: Avoid racy info ioctl via ctl device
ALSA: usb-audio: Fix the missing ctl name suffix at parsing SU

Thomas Gleixner (9):
x86/Kconfig: Limit NR_CPUS on 32-bit to a sane amount x86/mm/dump_pagetables: Check PAGE_PRESENT for real x86/mm/dump_pagetables: Make the address hints correct and readable arch, mm: Allow arch_dup_mmap() to fail
x86/ldt: Prevent LDT inheritance on exec
x86/cpu_entry_area: Move it to a separate unit x86/cpu_entry_area: Move it out of the fixmap
init: Invoke init_espfix_bsp() from mm_init() x86/cpu_entry_area: Prevent wraparound in setup_cpu_entry_area_ptes() on 32bit

Vishal Verma (1):
libnvdimm, btt: Fix an incompatibility in the log layout

Wanpeng Li (2):
KVM: MMU: Fix infinite loop when there is no available mmu page
KVM: X86: Fix load RFLAGS w/o the fixed bit

Yelena Krivosheev (3):
net: mvneta: clear interface link status on port disable
net: mvneta: use proper rxq_number in loop on rx queues
net: mvneta: eliminate wrong call to handle rx descriptor error

#3 lore raw
Quoted 1 line · Fran�ois Valenduc

No solution found to the permissions on tools/objtool/sync-check.sh ?

Is the permission not correct in the repo? Is it not correct in the patch I sent out in response to this?

Quoted 2 lines

git or patch is not smart enough for that ? It's obviously extremely easy to solve the problem, but I find that rather strange.

git and patch handle it just fine, quilt has issues, which I worked around very easily. Are you having problems with the git tree as-is?

thanks,

greg k-h

#4 lore raw

Le 29/12/17 à 18:32, Greg KH a écrit :

Quoted 5 lines · François Valenduc
Quoted 1 line

No solution found to the permissions on tools/objtool/sync-check.sh ?

Is the permission not correct in the repo? Is it not correct in the patch I sent out in response to this?

Quoted 8 lines
Quoted 2 lines

git or patch is not smart enough for that ? It's obviously extremely easy to solve the problem, but I find that rather strange.

git and patch handle it just fine, quilt has issues, which I worked around very easily. Are you having problems with the git tree as-is?

thanks,

greg k-h

It seems I messed up with enigmail. So in case you couldn't read my reply, I send it again.

I didn't see the posts of Toralf Forster before replying to your annoucement. But my problem is exactly the same. I extracted the patch from git (with git diff v4.14.9..v4.14.10). The permissions are also wrong if I download the patch from kernel.org. In both cases, sync-check.sh is not executable.

Regards,

François Valenduc

#5 lore raw
Quoted 15 lines · Fran�ois Valenduc

Le 29/12/17 � 18:32, Greg KH a �crit�:

Quoted 5 lines · Fran�ois Valenduc
Quoted 1 line

No solution found to the permissions on tools/objtool/sync-check.sh ?

Is the permission not correct in the repo? Is it not correct in the patch I sent out in response to this?

Quoted 8 lines
Quoted 2 lines

git or patch is not smart enough for that ? It's obviously extremely easy to solve the problem, but I find that rather strange.

git and patch handle it just fine, quilt has issues, which I worked around very easily. Are you having problems with the git tree as-is?

thanks,

greg k-h

Quoted 8 lines

It seems I messed up with enigmail. So in case you couldn't read my reply, I send it again.

I didn't see the posts of Toralf Forster before replying to your annoucement. But my problem is exactly the same. I extracted the patch from git (with git diff v4.14.9..v4.14.10). The permissions are also wrong if I download the patch from kernel.org. In both cases, sync-check.sh is not executable.

That's fine, but when you apply the patch, you need to keep the file mode. So be careful as to how you apply it.

I just got told that there's a patch in Andrew's tree that fixes this (it doesn't rely on the mode of the file.) Hopefully it gets into Linus's tree soon and then I can queue it up into the stable tree to help people who don't only use git.

thanks,

greg k-h

#6 lore raw

Le 29/12/17 à 18:42, Greg KH a écrit :

Quoted 26 lines · François Valenduc
Quoted 14 lines

Le 29/12/17 à 18:32, Greg KH a écrit :

Quoted 5 lines · François Valenduc
Quoted 1 line

No solution found to the permissions on tools/objtool/sync-check.sh ?

Is the permission not correct in the repo? Is it not correct in the patch I sent out in response to this?

Quoted 8 lines
Quoted 2 lines

git or patch is not smart enough for that ? It's obviously extremely easy to solve the problem, but I find that rather strange.

git and patch handle it just fine, quilt has issues, which I worked around very easily. Are you having problems with the git tree as-is?

thanks,

greg k-h

Quoted 8 lines

It seems I messed up with enigmail. So in case you couldn't read my reply, I send it again.

I didn't see the posts of Toralf Forster before replying to your annoucement. But my problem is exactly the same. I extracted the patch from git (with git diff v4.14.9..v4.14.10). The permissions are also wrong if I download the patch from kernel.org. In both cases, sync-check.sh is not executable.

That's fine, but when you apply the patch, you need to keep the file mode. So be careful as to how you apply it.

Quoted 8 lines

I just got told that there's a patch in Andrew's tree that fixes this (it doesn't rely on the mode of the file.) Hopefully it gets into Linus's tree soon and then I can queue it up into the stable tree to help people who don't only use git.

thanks,

greg k-h

I tried like this:
git diff v4.14.9..v4.14.10 | (cd /usr/src/linux-4.14 && patch -p1 ) or xzcat .../patch-4.14.9-10.xz | patch -p1
As I said, in both cases, sync-check.sh is not executable.

But if I do git archive --prefix=linux-4.14/ | (cd ../ && tar xvfp - ), sync-script.sh is executable.

Would there be something wrong with the patch command ?

Regards,

François Valenduc

#7 lore raw
Quoted 38 lines · Fran�ois Valenduc

Le 29/12/17 � 18:42, Greg KH a �crit�:

Quoted 26 lines · Fran�ois Valenduc
Quoted 14 lines

Le 29/12/17 � 18:32, Greg KH a �crit�:

Quoted 5 lines · Fran�ois Valenduc
Quoted 1 line

No solution found to the permissions on tools/objtool/sync-check.sh ?

Is the permission not correct in the repo? Is it not correct in the patch I sent out in response to this?

Quoted 8 lines
Quoted 2 lines

git or patch is not smart enough for that ? It's obviously extremely easy to solve the problem, but I find that rather strange.

git and patch handle it just fine, quilt has issues, which I worked around very easily. Are you having problems with the git tree as-is?

thanks,

greg k-h

Quoted 8 lines

It seems I messed up with enigmail. So in case you couldn't read my reply, I send it again.

I didn't see the posts of Toralf Forster before replying to your annoucement. But my problem is exactly the same. I extracted the patch from git (with git diff v4.14.9..v4.14.10). The permissions are also wrong if I download the patch from kernel.org. In both cases, sync-check.sh is not executable.

That's fine, but when you apply the patch, you need to keep the file mode. So be careful as to how you apply it.

Quoted 8 lines

I just got told that there's a patch in Andrew's tree that fixes this (it doesn't rely on the mode of the file.) Hopefully it gets into Linus's tree soon and then I can queue it up into the stable tree to help people who don't only use git.

thanks,

greg k-h

Quoted 8 lines

I tried like this:
git diff v4.14.9..v4.14.10 | (cd /usr/src/linux-4.14 && patch -p1 ) or xzcat .../patch-4.14.9-10.xz | patch -p1
As I said, in both cases, sync-check.sh is not executable.

But if I do git archive --prefix=linux-4.14/ | (cd ../ && tar xvfp - ), sync-script.sh is executable.

Would there be something wrong with the patch command ?

Yes, patch is the problem here, it's not keeping the file permission, sorry.

greg k-h

#8 lore raw
In reply to Greg KH
Quoted 25 lines · Greg KH
Quoted 15 lines · François Valenduc

Le 29/12/17 à 18:32, Greg KH a écrit :

Quoted 5 lines · François Valenduc
Quoted 1 line

No solution found to the permissions on tools/objtool/sync-check.sh ?

Is the permission not correct in the repo? Is it not correct in the patch I sent out in response to this?

Quoted 8 lines
Quoted 2 lines

git or patch is not smart enough for that ? It's obviously extremely easy to solve the problem, but I find that rather strange.

git and patch handle it just fine, quilt has issues, which I worked around very easily. Are you having problems with the git tree as-is?

thanks,

greg k-h

Quoted 8 lines

It seems I messed up with enigmail. So in case you couldn't read my reply, I send it again.

I didn't see the posts of Toralf Forster before replying to your annoucement. But my problem is exactly the same. I extracted the patch from git (with git diff v4.14.9..v4.14.10). The permissions are also wrong if I download the patch from kernel.org. In both cases, sync-check.sh is not executable.

Quoted 7 lines

That's fine, but when you apply the patch, you need to keep the file mode. So be careful as to how you apply it.

I just got told that there's a patch in Andrew's tree that fixes this (it doesn't rely on the mode of the file.) Hopefully it gets into Linus's tree soon and then I can queue it up into the stable tree to help people who don't only use git.

This is now in 4.15-rc8 as commit 0f908ccbeca aka:
"tools/objtool/Makefile: don't assume sync-check.sh is executable"

I've been using it since it came out, would be great to add that to all stable series where 3bd51c5a371de was applied.

thanks,
Holger

author maintainer
#9 lore raw
Quoted 34 lines · Holger Hoffst�tte
Quoted 25 lines · Greg KH
Quoted 15 lines · Fran�ois Valenduc

Le 29/12/17 � 18:32, Greg KH a �crit�:

Quoted 5 lines · Fran�ois Valenduc
Quoted 1 line

No solution found to the permissions on tools/objtool/sync-check.sh ?

Is the permission not correct in the repo? Is it not correct in the patch I sent out in response to this?

Quoted 8 lines
Quoted 2 lines

git or patch is not smart enough for that ? It's obviously extremely easy to solve the problem, but I find that rather strange.

git and patch handle it just fine, quilt has issues, which I worked around very easily. Are you having problems with the git tree as-is?

thanks,

greg k-h

Quoted 8 lines

It seems I messed up with enigmail. So in case you couldn't read my reply, I send it again.

I didn't see the posts of Toralf Forster before replying to your annoucement. But my problem is exactly the same. I extracted the patch from git (with git diff v4.14.9..v4.14.10). The permissions are also wrong if I download the patch from kernel.org. In both cases, sync-check.sh is not executable.

Quoted 7 lines

That's fine, but when you apply the patch, you need to keep the file mode. So be careful as to how you apply it.

I just got told that there's a patch in Andrew's tree that fixes this (it doesn't rely on the mode of the file.) Hopefully it gets into Linus's tree soon and then I can queue it up into the stable tree to help people who don't only use git.

Quoted 5 lines

This is now in 4.15-rc8 as commit 0f908ccbeca aka:
"tools/objtool/Makefile: don't assume sync-check.sh is executable"

I've been using it since it came out, would be great to add that to all stable series where 3bd51c5a371de was applied.

Thanks, I'll queue it up for the next round after this one. Then the gentoo users will be a bit happier :)

greg k-h