Skip to contentSkip to conversation

Linux 4.4.168

DISCUSSION Greg KH 1 participant 2 messages Dec 17, 2018 Stable branch

lore
Share & tools
lore

Greg KH

author maintainer
#0 lore raw

I'm announcing the release of the 4.4.168 kernel.

All users of the 4.4 kernel series must upgrade.

The updated 4.4.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.4.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/Makefile                                            |    3 
 Documentation/networking/Makefile                                 |    1 
 Documentation/networking/timestamping/.gitignore                  |    3 
 Documentation/networking/timestamping/Makefile                    |   14 
 Documentation/networking/timestamping/hwtstamp_config.c           |  134 -
 Documentation/networking/timestamping/timestamping.c              |  528 -------
 Documentation/networking/timestamping/txtimestamp.c               |  549 -------
 Makefile                                                          |    2 
 arch/arm/mach-omap1/board-ams-delta.c                             |    3 
 arch/arm/mach-omap2/prm44xx.c                                     |    2 
 arch/cris/arch-v32/drivers/cryptocop.c                            |    4 
 arch/ia64/kernel/err_inject.c                                     |    2 
 arch/mips/mm/gup.c                                                |    2 
 arch/s390/kernel/perf_cpum_cf.c                                   |    2 
 arch/s390/mm/gup.c                                                |    2 
 arch/sh/mm/gup.c                                                  |    3 
 arch/sparc/mm/gup.c                                               |    3 
 arch/x86/include/asm/kvm_host.h                                   |    2 
 arch/x86/include/asm/uaccess.h                                    |   64 
 arch/x86/include/asm/uaccess_32.h                                 |   26 
 arch/x86/include/asm/uaccess_64.h                                 |   94 -
 arch/x86/kernel/cpu/common.c                                      |    3 
 arch/x86/kvm/cpuid.c                                              |   31 
 arch/x86/kvm/cpuid.h                                              |   40 
 arch/x86/kvm/lapic.c                                              |    2 
 arch/x86/kvm/svm.c                                                |  143 +
 arch/x86/kvm/vmx.c                                                |  741 +++++-----
 arch/x86/kvm/x86.c                                                |   14 
 arch/x86/lib/usercopy_32.c                                        |   20 
 arch/x86/mm/gup.c                                                 |    2 
 arch/x86/mm/mpx.c                                                 |    3 
 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c                           |    6 
 drivers/gpu/drm/ast/ast_mode.c                                    |   36 
 drivers/gpu/drm/exynos/exynos_drm_g2d.c                           |    3 
 drivers/gpu/drm/i915/i915_gem_userptr.c                           |    6 
 drivers/gpu/drm/radeon/radeon_ttm.c                               |    2 
 drivers/gpu/drm/via/via_dmablit.c                                 |    4 
 drivers/hwmon/ina2xx.c                                            |    2 
 drivers/hwmon/w83795.c                                            |    2 
 drivers/infiniband/core/umem.c                                    |    6 
 drivers/infiniband/core/umem_odp.c                                |    7 
 drivers/infiniband/hw/mthca/mthca_memfree.c                       |    4 
 drivers/infiniband/hw/qib/qib_user_pages.c                        |    3 
 drivers/infiniband/hw/usnic/usnic_uiom.c                          |    5 
 drivers/media/dvb-frontends/ascot2e.c                             |    4 
 drivers/media/dvb-frontends/cxd2841er.c                           |    4 
 drivers/media/dvb-frontends/horus3a.c                             |    4 
 drivers/media/dvb-frontends/itd1000.c                             |    5 
 drivers/media/dvb-frontends/mt312.c                               |    5 
 drivers/media/dvb-frontends/stb0899_drv.c                         |    3 
 drivers/media/dvb-frontends/stb6100.c                             |    6 
 drivers/media/dvb-frontends/stv0367.c                             |    4 
 drivers/media/dvb-frontends/stv090x.c                             |    4 
 drivers/media/dvb-frontends/stv6110x.c                            |    4 
 drivers/media/dvb-frontends/zl10039.c                             |    4 
 drivers/media/pci/ivtv/ivtv-udma.c                                |    3 
 drivers/media/pci/ivtv/ivtv-yuv.c                                 |    8 
 drivers/media/platform/omap/omap_vout.c                           |    2 
 drivers/media/v4l2-core/videobuf-dma-sg.c                         |    7 
 drivers/media/v4l2-core/videobuf2-memops.c                        |    6 
 drivers/misc/mic/scif/scif_rma.c                                  |    3 
 drivers/misc/sgi-gru/grufault.c                                   |    2 
 drivers/net/ethernet/cavium/thunder/nic_main.c                    |    3 
 drivers/net/ethernet/hisilicon/hip04_eth.c                        |    4 
 drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c                     |    4 
 drivers/net/ethernet/realtek/8139cp.c                             |    5 
 drivers/net/ethernet/rocker/rocker.c                              |   24 
 drivers/net/phy/phy_device.c                                      |   19 
 drivers/net/tun.c                                                 |    6 
 drivers/net/wireless/ath/wil6210/wmi.c                            |    8 
 drivers/scsi/sr_ioctl.c                                           |   21 
 drivers/scsi/st.c                                                 |    5 
 drivers/staging/rdma/hfi1/user_pages.c                            |    2 
 drivers/staging/rdma/ipath/ipath_user_pages.c                     |    2 
 drivers/staging/speakup/kobjects.c                                |    4 
 drivers/usb/gadget/udc/omap_udc.c                                 |   87 -
 drivers/video/fbdev/matrox/matroxfb_Ti3026.c                      |    2 
 drivers/video/fbdev/pvr2fb.c                                      |    2 
 drivers/virt/fsl_hypervisor.c                                     |    4 
 drivers/xen/xlate_mmu.c                                           |    1 
 fs/btrfs/send.c                                                   |   11 
 fs/cachefiles/rdwr.c                                              |    3 
 fs/exec.c                                                         |    9 
 fs/exportfs/expfs.c                                               |    2 
 fs/fscache/object.c                                               |    3 
 fs/hfs/btree.c                                                    |    3 
 fs/hfsplus/btree.c                                                |    3 
 fs/hugetlbfs/inode.c                                              |   30 
 fs/ocfs2/export.c                                                 |    2 
 fs/ocfs2/move_extents.c                                           |   47 
 fs/proc/base.c                                                    |   19 
 fs/pstore/platform.c                                              |    4 
 fs/sysv/inode.c                                                   |    2 
 include/linux/mm.h                                                |   15 
 include/linux/posix-timers.h                                      |    4 
 include/net/neighbour.h                                           |   28 
 include/sound/pcm.h                                               |    2 
 kernel/bpf/verifier.c                                             |   98 +
 kernel/events/uprobes.c                                           |    4 
 kernel/time/posix-cpu-timers.c                                    |    2 
 kernel/time/posix-timers.c                                        |   29 
 kernel/trace/bpf_trace.c                                          |    8 
 lib/debugobjects.c                                                |    3 
 lib/swiotlb.c                                                     |   20 
 mm/frame_vector.c                                                 |    9 
 mm/gup.c                                                          |   42 
 mm/hugetlb.c                                                      |   12 
 mm/memory.c                                                       |   18 
 mm/mempolicy.c                                                    |    2 
 mm/nommu.c                                                        |   42 
 mm/process_vm_access.c                                            |    6 
 mm/util.c                                                         |    2 
 net/ceph/pagevec.c                                                |    2 
 net/core/rtnetlink.c                                              |    3 
 net/ipv4/tcp_output.c                                             |   12 
 net/ipv6/ip6_output.c                                             |   42 
 net/sched/sch_netem.c                                             |    3 
 security/tomoyo/domain.c                                          |    3 
 sound/core/pcm_lib.c                                              |    2 
 sound/core/pcm_native.c                                           |    6 
 sound/soc/omap/omap-dmic.c                                        |    9 
 sound/soc/omap/omap-mcpdm.c                                       |   43 
 sound/soc/soc-core.c                                              |    1 
 tools/testing/selftests/networking/timestamping/.gitignore        |    3 
 tools/testing/selftests/networking/timestamping/Makefile          |    8 
 tools/testing/selftests/networking/timestamping/hwtstamp_config.c |  134 +
 tools/testing/selftests/networking/timestamping/timestamping.c    |  528 +++++++
 tools/testing/selftests/networking/timestamping/txtimestamp.c     |  549 +++++++
 virt/kvm/async_pf.c                                               |    2 
 virt/kvm/kvm_main.c                                               |   11 
 130 files changed, 2649 insertions(+), 2005 deletions(-)

Aaro Koskinen (4):
USB: omap_udc: use devm_request_irq()
USB: omap_udc: fix crashes on probe error and module removal
USB: omap_udc: fix omap_udc_start() on 15xx machines
USB: omap_udc: fix USB gadget functionality on Palm Tungsten E

Alexei Starovoitov (2):
bpf: support 8-byte metafield access
bpf: Prevent memory disambiguation attack

Arnd Bergmann (2):
media: dvb-frontends: fix i2c access helpers for KASAN
rocker: fix rocker_tlv_put_* functions for KASAN

Ashok Raj (1):
KVM/x86: Add IBPB support

Ben Hutchings (3):
bpf/verifier: Add spi variable to check_stack_write() bpf/verifier: Pass instruction index to check_mem_access() and check_xadd() mm/nommu.c: Switch __get_user_pages_unlocked() to use __get_user_pages()

Borislav Petkov (1):
x86/speculation: Use synthetic bits for IBRS/IBPB/STIBP

Christoph Paasch (1):

      net: Prevent invalid access to skb->prev in __qdisc_drop_all

Colin Ian King (1):
fscache, cachefiles: remove redundant variable 'cache'

Dan Williams (3):
x86: Introduce __uaccess_begin_nospec() and uaccess_try_nospec x86/usercopy: Replace open coded stac/clac with __uaccess_{begin, end} x86/uaccess: Use __uaccess_begin_nospec() and uaccess_try_nospec

David Matlack (1):
KVM: nVMX: mark vmcs12 pages dirty on L2 exit

Eric Dumazet (1):
rtnetlink: ndo_dflt_fdb_dump() only work for ARPHRD_ETHER devices

Greg Kroah-Hartman (1):

      Linux 4.4.168

Guenter Roeck (1):
staging: speakup: Replace strncpy with memcpy

Heiner Kallweit (1):
net: phy: don't allow __set_phy_supported to add unsupported modes

Huacai Chen (1):
hwmon: (w83795) temp4_type has writable permission

Janusz Krzysztofik (1):
ARM: OMAP1: ams-delta: Fix possible use of uninitialized field

Jens Axboe (1):
sr: pass down correctly sized SCSI sense buffer

Jim Mattson (1):
KVM: nVMX: Eliminate vmcs02 pool

Josh Elsasser (1):
ixgbe: recognize 1000BaseLX SFP modules as 1Gbps

KarimAllah Ahmed (3):
KVM/VMX: Emulate MSR_IA32_ARCH_CAPABILITIES KVM/VMX: Allow direct access to MSR_IA32_SPEC_CTRL KVM/SVM: Allow direct access to MSR_IA32_SPEC_CTRL

Kees Cook (1):
swiotlb: clean up reporting

Konrad Rzeszutek Wilk (2):
x86/bugs, KVM: Support the combination of guest and host IBRS x86/KVM/VMX: Expose SPEC_CTRL Bit(2) to the guest

Larry Chen (1):
ocfs2: fix deadlock caused by ocfs2_defrag_extent()

Linus Torvalds (3):
x86: reorganize SMAP handling in user space accesses
x86: fix SMAP in 32-bit environments
proc: don't use FOLL_FORCE for reading cmdline and environment

Lior David (1):
wil6210: missing length check in wmi_set_ie

Lorenzo Bianconi (1):
net: thunderx: fix NULL pointer dereference in nic_remove

Lorenzo Stoakes (8):
mm: remove write/force parameters from __get_user_pages_locked()
mm: remove write/force parameters from __get_user_pages_unlocked()
mm: replace get_user_pages_unlocked() write/force parameters with gup_flags
mm: replace get_user_pages_locked() write/force parameters with gup_flags
mm: replace get_vaddr_frames() write/force parameters with gup_flags
mm: replace get_user_pages() write/force parameters with gup_flags
mm: replace __access_remote_vm() write parameter with gup_flags
mm: replace access_remote_vm() write parameter with gup_flags

Martynas Pumputis (1):
bpf: fix check of allowed specifiers in bpf_trace_printk

Mike Kravetz (4):
mm/hugetlb.c: don't call region_abort if region_chg fails
hugetlbfs: fix offset overflow in hugetlbfs mmap
hugetlbfs: check for pgoff value overflow
hugetlbfs: fix bug in pgoff overflow checking

Namhyung Kim (1):

      pstore: Convert console write to use ->write_buf

Nathan Chancellor (1):
ARM: OMAP2+: prm44xx: Fix section annotation on omap44xx_prm_enable_io_wakeup

NeilBrown (1):
fscache: fix race between enablement and dropping of object

Nicolas Dichtel (1):
tun: forbid iface creation with rtnl ops

Nicolin Chen (1):
hwmon: (ina2xx) Fix current value calculation

Pan Bian (5):
exportfs: do not read dentry after free
net: hisilicon: remove unexpected free_netdev
hfs: do not free node before using
hfsplus: do not free node before using
ocfs2: fix potential use after free

Paolo Bonzini (3):
KVM: VMX: introduce alloc_loaded_vmcs
KVM: VMX: make MSR bitmaps per-VCPU KVM/x86: Remove indirect MSR op calls from SPEC_CTRL

Peter Ujfalusi (2):
ASoC: omap-mcpdm: Add pm_qos handling to avoid under/overruns with CPU_IDLE
ASoC: omap-dmic: Add pm_qos handling to avoid overruns with CPU_IDLE

Qian Cai (1):
debugobjects: avoid recursive calls with kmemleak

Radim Krčmář (1):
KVM: nVMX: fix msr bitmaps to prevent L2 from accessing L0 x2APIC

Robbie Ko (1):
Btrfs: send, fix infinite loop due to directory rename dependencies

Shuah Khan (1):
selftests: Move networking/timestamping from Documentation

Srikanth Boddepalli (1):
xen: xlate_mmu: add missing header to fix 'W=1' warning

Stefano Brivio (2):
ipv6: Check available headroom in ip6_xmit() even without options
neighbour: Avoid writing before skb->head in neigh_hh_output()

Su Yanjun (1):
net: 8139cp: fix a BUG triggered by changing mtu with network traffic

Sudip Mukherjee (1):
matroxfb: fix size of memcpy

Takashi Sakamoto (1):
ALSA: pcm: remove SNDRV_PCM_IOCTL1_INFO internal command

Thomas Gleixner (3):
KVM: SVM: Move spec control call after restore of GS x86/bugs, KVM: Extend speculation control for VIRT_SPEC_CTRL
posix-timers: Sanitize overrun handling

Thomas Richter (1):
s390/cpum_cf: Reject request for sampling in event initialization

Tom Lendacky (1):
KVM: SVM: Implement VIRT_SPEC_CTRL support for SSBD

Tzung-Bi Shih (1):
ASoC: dapm: Recalculate audio map forcely when card instantiated

Willy Tarreau (1):
proc: do not access cmdline nor environ from file-backed areas

Y.C. Chen (1):
drm/ast: fixed reading monitor EDID not stable issue

Yi Wang (1):
KVM: x86: fix empty-body warnings

Yuchung Cheng (1):
tcp: fix NULL ref in tail loss probe

YueHaibing (1):
sysv: return 'err' instead of 0 in __sysv_write_inode

author maintainer
#1 lore raw
Documentation/Makefile +1 -2
index fc759598c4c9..59d516b7afcb 100644
@@ -1,4 +1,3 @@
 subdir-y := accounting auxdisplay blackfin connector \
 	filesystems filesystems ia64 laptops misc-devices \
-	networking pcmcia prctl ptp spi timers vDSO video4linux \
-	watchdog
+	pcmcia prctl ptp spi timers vDSO video4linux watchdog
Documentation/networking/Makefile deleted +0 -1
deleted file mode 100644
index 4c5d7c485439..000000000000
@@ -1 +0,0 @@
-subdir-y := timestamping
Documentation/networking/timestamping/.gitignore deleted +0 -3
deleted file mode 100644
index 9e69e982fb38..000000000000
@@ -1,3 +0,0 @@
-timestamping
-txtimestamp
-hwtstamp_config
Documentation/networking/timestamping/Makefile deleted +0 -14
deleted file mode 100644
index 8c20dfaa4d6e..000000000000
@@ -1,14 +0,0 @@
-# To compile, from the source root
-#
-#    make headers_install
-#    make M=documentation
-
-# List of programs to build
-hostprogs-y := hwtstamp_config timestamping txtimestamp
-
-# Tell kbuild to always build the programs
-always := $(hostprogs-y)
-
-HOSTCFLAGS_timestamping.o += -I$(objtree)/usr/include
-HOSTCFLAGS_txtimestamp.o += -I$(objtree)/usr/include
-HOSTCFLAGS_hwtstamp_config.o += -I$(objtree)/usr/include
Documentation/networking/timestamping/hwtstamp_config.c deleted +0 -134

134 lines not on this page · raw message

Documentation/networking/timestamping/timestamping.c deleted +0 -528

528 lines not on this page · raw message

Documentation/networking/timestamping/txtimestamp.c deleted +0 -549

549 lines not on this page · raw message

Makefile +1 -1
index 6b30551caee4..082f82471b51 100644
@@ -1,6 +1,6 @@
 VERSION = 4
 PATCHLEVEL = 4
-SUBLEVEL = 167
+SUBLEVEL = 168
 EXTRAVERSION =
 NAME = Blurry Fish Butt
 
arch/arm/mach-omap1/board-ams-delta.c +3 -0
index a95499ea8706..fa1d41edce68 100644
@@ -511,6 +511,9 @@ static void modem_pm(struct uart_port *port, unsigned int state, unsigned old)
 {
 	struct modem_private_data *priv = port->private_data;
 
+	if (!priv)
+		return;
+
 	if (IS_ERR(priv->regulator))
 		return;
 
arch/arm/mach-omap2/prm44xx.c +1 -1
index 30768003f854..8c505284bc0c 100644
@@ -344,7 +344,7 @@ static void omap44xx_prm_reconfigure_io_chain(void)
  * to occur, WAKEUPENABLE bits must be set in the pad mux registers, and
  * omap44xx_prm_reconfigure_io_chain() must be called.  No return value.
  */
-static void __init omap44xx_prm_enable_io_wakeup(void)
+static void omap44xx_prm_enable_io_wakeup(void)
 {
 	s32 inst = omap4_prmst_get_prm_dev_inst();
 
arch/cris/arch-v32/drivers/cryptocop.c +1 -3
index 877da1908234..98e2a5dbcfda 100644
@@ -2724,7 +2724,6 @@ static int cryptocop_ioctl_process(struct inode *inode, struct file *filp, unsig
 			     (unsigned long int)(oper.indata + prev_ix),
 			     noinpages,
 			     0,  /* read access only for in data */
-			     0, /* no force */
 			     inpages,
 			     NULL);
 
@@ -2740,8 +2739,7 @@ static int cryptocop_ioctl_process(struct inode *inode, struct file *filp, unsig
 				     current->mm,
 				     (unsigned long int)oper.cipher_outdata,
 				     nooutpages,
-				     1, /* write access for out data */
-				     0, /* no force */
+				     FOLL_WRITE, /* write access for out data */
 				     outpages,
 				     NULL);
 		up_read(&current->mm->mmap_sem);
arch/ia64/kernel/err_inject.c +1 -1
index 0c161ed6d18e..8205b456de7a 100644
@@ -143,7 +143,7 @@ store_virtual_to_phys(struct device *dev, struct device_attribute *attr,
 	int ret;
 
         ret = get_user_pages(current, current->mm, virt_addr,
-                        1, VM_READ, 0, NULL, NULL);
+			     1, FOLL_WRITE, NULL, NULL);
 	if (ret<=0) {
 #ifdef ERR_INJ_DEBUG
 		printk("Virtual address %lx is not existing.\n",virt_addr);
arch/mips/mm/gup.c +1 -1
index 349995d19c7f..e596e0a1cecc 100644
@@ -303,7 +303,7 @@ slow_irqon:
 
 	ret = get_user_pages_unlocked(current, mm, start,
 				      (end - start) >> PAGE_SHIFT,
-				      write, 0, pages);
+				      pages, write ? FOLL_WRITE : 0);
 
 	/* Have to be a bit careful with return values */
 	if (nr > 0) {
arch/s390/kernel/perf_cpum_cf.c +2 -0
index 929c147e07b4..1b69bfdf59f9 100644
@@ -344,6 +344,8 @@ static int __hw_perf_event_init(struct perf_event *event)
 		break;
 
 	case PERF_TYPE_HARDWARE:
+		if (is_sampling_event(event))	/* No sampling support */
+			return -ENOENT;
 		ev = attr->config;
 		/* Count user space (problem-state) only */
 		if (!attr->exclude_user && attr->exclude_kernel) {
arch/s390/mm/gup.c +1 -1
index 12bbf0e8478f..7ad41be8b373 100644
@@ -242,7 +242,7 @@ int get_user_pages_fast(unsigned long start, int nr_pages, int write,
 	start += nr << PAGE_SHIFT;
 	pages += nr;
 	ret = get_user_pages_unlocked(current, mm, start,
-			     nr_pages - nr, write, 0, pages);
+			     nr_pages - nr, pages, write ? FOLL_WRITE : 0);
 	/* Have to be a bit careful with return values */
 	if (nr > 0)
 		ret = (ret < 0) ? nr : ret + nr;
arch/sh/mm/gup.c +2 -1
index e7af6a65baab..8c51a0e94854 100644
@@ -258,7 +258,8 @@ slow_irqon:
 		pages += nr;
 
 		ret = get_user_pages_unlocked(current, mm, start,
-			(end - start) >> PAGE_SHIFT, write, 0, pages);
+			(end - start) >> PAGE_SHIFT, pages,
+			write ? FOLL_WRITE : 0);
 
 		/* Have to be a bit careful with return values */
 		if (nr > 0) {
arch/sparc/mm/gup.c +2 -1
index 2e5c4fc2daa9..150f48303fb0 100644
@@ -250,7 +250,8 @@ slow:
 		pages += nr;
 
 		ret = get_user_pages_unlocked(current, mm, start,
-			(end - start) >> PAGE_SHIFT, write, 0, pages);
+			(end - start) >> PAGE_SHIFT, pages,
+			write ? FOLL_WRITE : 0);
 
 		/* Have to be a bit careful with return values */
 		if (nr > 0) {
arch/x86/include/asm/kvm_host.h +1 -1
index 3a37cdbdfbaa..c048d0d70cc4 100644
@@ -765,7 +765,7 @@ struct kvm_x86_ops {
 	int (*hardware_setup)(void);               /* __init */
 	void (*hardware_unsetup)(void);            /* __exit */
 	bool (*cpu_has_accelerated_tpr)(void);
-	bool (*cpu_has_high_real_mode_segbase)(void);
+	bool (*has_emulated_msr)(int index);
 	void (*cpuid_update)(struct kvm_vcpu *vcpu);
 
 	/* Create, but do not attach this VCPU */
arch/x86/include/asm/uaccess.h +45 -19

178 lines not on this page · raw message

arch/x86/include/asm/uaccess_32.h +26 -0
index f5dcb5204dcd..f575ee3aea5c 100644
@@ -48,20 +48,28 @@ __copy_to_user_inatomic(void __user *to, const void *from, unsigned long n)
 
 		switch (n) {
 		case 1:
+			__uaccess_begin_nospec();
 			__put_user_size(*(u8 *)from, (u8 __user *)to,
 					1, ret, 1);
+			__uaccess_end();
 			return ret;
 		case 2:
+			__uaccess_begin_nospec();
 			__put_user_size(*(u16 *)from, (u16 __user *)to,
 					2, ret, 2);
+			__uaccess_end();
 			return ret;
 		case 4:
+			__uaccess_begin_nospec();
 			__put_user_size(*(u32 *)from, (u32 __user *)to,
 					4, ret, 4);
+			__uaccess_end();
 			return ret;
 		case 8:
+			__uaccess_begin_nospec();
 			__put_user_size(*(u64 *)from, (u64 __user *)to,
 					8, ret, 8);
+			__uaccess_end();
 			return ret;
 		}
 	}
@@ -103,13 +111,19 @@ __copy_from_user_inatomic(void *to, const void __user *from, unsigned long n)
 
 		switch (n) {
 		case 1:
+			__uaccess_begin_nospec();
 			__get_user_size(*(u8 *)to, from, 1, ret, 1);
+			__uaccess_end();
 			return ret;
 		case 2:
+			__uaccess_begin_nospec();
 			__get_user_size(*(u16 *)to, from, 2, ret, 2);
+			__uaccess_end();
 			return ret;
 		case 4:
+			__uaccess_begin_nospec();
 			__get_user_size(*(u32 *)to, from, 4, ret, 4);
+			__uaccess_end();
 			return ret;
 		}
 	}
@@ -148,13 +162,19 @@ __copy_from_user(void *to, const void __user *from, unsigned long n)
 
 		switch (n) {
 		case 1:
+			__uaccess_begin_nospec();
 			__get_user_size(*(u8 *)to, from, 1, ret, 1);
+			__uaccess_end();
 			return ret;
 		case 2:
+			__uaccess_begin_nospec();
 			__get_user_size(*(u16 *)to, from, 2, ret, 2);
+			__uaccess_end();
 			return ret;
 		case 4:
+			__uaccess_begin_nospec();
 			__get_user_size(*(u32 *)to, from, 4, ret, 4);
+			__uaccess_end();
 			return ret;
 		}
 	}
@@ -170,13 +190,19 @@ static __always_inline unsigned long __copy_from_user_nocache(void *to,
 
 		switch (n) {
 		case 1:
+			__uaccess_begin_nospec();
 			__get_user_size(*(u8 *)to, from, 1, ret, 1);
+			__uaccess_end();
 			return ret;
 		case 2:
+			__uaccess_begin_nospec();
 			__get_user_size(*(u16 *)to, from, 2, ret, 2);
+			__uaccess_end();
 			return ret;
 		case 4:
+			__uaccess_begin_nospec();
 			__get_user_size(*(u32 *)to, from, 4, ret, 4);
+			__uaccess_end();
 			return ret;
 		}
 	}
arch/x86/include/asm/uaccess_64.h +66 -28

175 lines not on this page · raw message

arch/x86/kernel/cpu/common.c +2 -1
index b12c0287d6cf..e8b46f575306 100644
@@ -693,7 +693,8 @@ static void init_speculation_control(struct cpuinfo_x86 *c)
 	if (cpu_has(c, X86_FEATURE_INTEL_STIBP))
 		set_cpu_cap(c, X86_FEATURE_STIBP);
 
-	if (cpu_has(c, X86_FEATURE_SPEC_CTRL_SSBD))
+	if (cpu_has(c, X86_FEATURE_SPEC_CTRL_SSBD) ||
+	    cpu_has(c, X86_FEATURE_VIRT_SSBD))
 		set_cpu_cap(c, X86_FEATURE_SSBD);
 
 	if (cpu_has(c, X86_FEATURE_AMD_IBRS)) {
arch/x86/kvm/cpuid.c +28 -3
index 338d13d4fd2f..b857bb9f6f23 100644
@@ -341,6 +341,10 @@ static inline int __do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function,
 		F(3DNOWPREFETCH) | F(OSVW) | 0 /* IBS */ | F(XOP) |
 		0 /* SKINIT, WDT, LWP */ | F(FMA4) | F(TBM);
 
+	/* cpuid 0x80000008.ebx */
+	const u32 kvm_cpuid_8000_0008_ebx_x86_features =
+		F(AMD_IBPB) | F(AMD_IBRS) | F(VIRT_SSBD);
+
 	/* cpuid 0xC0000001.edx */
 	const u32 kvm_supported_word5_x86_features =
 		F(XSTORE) | F(XSTORE_EN) | F(XCRYPT) | F(XCRYPT_EN) |
@@ -358,6 +362,10 @@ static inline int __do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function,
 	const u32 kvm_supported_word10_x86_features =
 		F(XSAVEOPT) | F(XSAVEC) | F(XGETBV1) | f_xsaves;
 
+	/* cpuid 7.0.edx*/
+	const u32 kvm_cpuid_7_0_edx_x86_features =
+		F(SPEC_CTRL) | F(SPEC_CTRL_SSBD) | F(ARCH_CAPABILITIES);
+
 	/* all calls to cpuid_count() should be made on the same cpu */
 	get_cpu();
 
@@ -435,11 +443,14 @@ static inline int __do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function,
 			cpuid_mask(&entry->ebx, 9);
 			// TSC_ADJUST is emulated
 			entry->ebx |= F(TSC_ADJUST);
-		} else
+			entry->edx &= kvm_cpuid_7_0_edx_x86_features;
+			cpuid_mask(&entry->edx, CPUID_7_EDX);
+		} else {
 			entry->ebx = 0;
+			entry->edx = 0;
+		}
 		entry->eax = 0;
 		entry->ecx = 0;
-		entry->edx = 0;
 		break;
 	}
 	case 9:
@@ -583,7 +594,21 @@ static inline int __do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function,
 		if (!g_phys_as)
 			g_phys_as = phys_as;
 		entry->eax = g_phys_as | (virt_as << 8);
-		entry->ebx = entry->edx = 0;
+		entry->edx = 0;
+		/*
+		 * IBRS, IBPB and VIRT_SSBD aren't necessarily present in
+		 * hardware cpuid
+		 */
+		if (boot_cpu_has(X86_FEATURE_AMD_IBPB))
+			entry->ebx |= F(AMD_IBPB);
+		if (boot_cpu_has(X86_FEATURE_AMD_IBRS))
+			entry->ebx |= F(AMD_IBRS);
+		if (boot_cpu_has(X86_FEATURE_VIRT_SSBD))
+			entry->ebx |= F(VIRT_SSBD);
+		entry->ebx &= kvm_cpuid_8000_0008_ebx_x86_features;
+		cpuid_mask(&entry->ebx, CPUID_8000_0008_EBX);
+		if (boot_cpu_has(X86_FEATURE_LS_CFG_SSBD))
+			entry->ebx |= F(VIRT_SSBD);
 		break;
 	}
 	case 0x80000019:
arch/x86/kvm/cpuid.h +40 -0
index d1534feefcfe..72f159f4d456 100644
@@ -159,6 +159,46 @@ static inline bool guest_cpuid_has_rdtscp(struct kvm_vcpu *vcpu)
 	return best && (best->edx & bit(X86_FEATURE_RDTSCP));
 }
 
+static inline bool guest_cpuid_has_ibpb(struct kvm_vcpu *vcpu)
+{
+	struct kvm_cpuid_entry2 *best;
+
+	best = kvm_find_cpuid_entry(vcpu, 0x80000008, 0);
+	if (best && (best->ebx & bit(X86_FEATURE_AMD_IBPB)))
+		return true;
+	best = kvm_find_cpuid_entry(vcpu, 7, 0);
+	return best && (best->edx & bit(X86_FEATURE_SPEC_CTRL));
+}
+
+static inline bool guest_cpuid_has_spec_ctrl(struct kvm_vcpu *vcpu)
+{
+	struct kvm_cpuid_entry2 *best;
+
+	best = kvm_find_cpuid_entry(vcpu, 0x80000008, 0);
+	if (best && (best->ebx & bit(X86_FEATURE_AMD_IBRS)))
+		return true;
+	best = kvm_find_cpuid_entry(vcpu, 7, 0);
+	return best && (best->edx & (bit(X86_FEATURE_SPEC_CTRL) | bit(X86_FEATURE_SPEC_CTRL_SSBD)));
+}
+
+static inline bool guest_cpuid_has_arch_capabilities(struct kvm_vcpu *vcpu)
+{
+	struct kvm_cpuid_entry2 *best;
+
+	best = kvm_find_cpuid_entry(vcpu, 7, 0);
+	return best && (best->edx & bit(X86_FEATURE_ARCH_CAPABILITIES));
+}
+
+static inline bool guest_cpuid_has_virt_ssbd(struct kvm_vcpu *vcpu)
+{
+	struct kvm_cpuid_entry2 *best;
+
+	best = kvm_find_cpuid_entry(vcpu, 0x80000008, 0);
+	return best && (best->ebx & bit(X86_FEATURE_VIRT_SSBD));
+}
+
+
+
 /*
  * NRIPS is provided through cpuidfn 0x8000000a.edx bit 3
  */
arch/x86/kvm/lapic.c +1 -1
index a1afd80a68aa..3c70f6c76d3a 100644
@@ -56,7 +56,7 @@
 #define APIC_BUS_CYCLE_NS 1
 
 /* #define apic_debug(fmt,arg...) printk(KERN_WARNING fmt,##arg) */
-#define apic_debug(fmt, arg...)
+#define apic_debug(fmt, arg...) do {} while (0)
 
 #define APIC_LVT_NUM			6
 /* 14 is the version for Xeon and Pentium 8.4.8*/
arch/x86/kvm/svm.c +141 -2

232 lines not on this page · raw message

arch/x86/kvm/vmx.c +417 -324

877 lines not on this page · raw message

arch/x86/kvm/x86.c +5 -9
index e6ab034f0bc7..aa1a0277a678 100644

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

arch/x86/lib/usercopy_32.c +10 -10
index 91d93b95bd86..0a6fcae404f8 100644

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

arch/x86/mm/gup.c +1 -1
index ae9a37bf1371..7d2542ad346a 100644

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

arch/x86/mm/mpx.c +1 -2
index 7ed47b1e6f42..7e94fc6f608a 100644

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

drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +5 -1
index e40a6d8b0b92..062c23125b2a 100644

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

drivers/gpu/drm/ast/ast_mode.c +30 -6
index 21085f669e21..b19ba1792607 100644

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

drivers/gpu/drm/exynos/exynos_drm_g2d.c +2 -1
index c17efdb238a6..639ea28808e2 100644

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

drivers/gpu/drm/i915/i915_gem_userptr.c +5 -1
index 359fe2b8bb8a..b02113b57d51 100644

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

drivers/gpu/drm/radeon/radeon_ttm.c +1 -1
index d684e2b79d2b..0c380fe77382 100644

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

drivers/gpu/drm/via/via_dmablit.c +2 -2
index d0cbd5ecd7f0..4459cb32d1fe 100644

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

drivers/hwmon/ina2xx.c +1 -1
index 9ac6e1673375..1f291b344178 100644

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

drivers/hwmon/w83795.c +1 -1
index 49276bbdac3d..1bb80f992aa8 100644

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

drivers/infiniband/core/umem.c +5 -1
index 98fd9a594841..8762eac47570 100644

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

drivers/infiniband/core/umem_odp.c +5 -2
index 40becdb3196e..738ccfee7cae 100644

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

drivers/infiniband/hw/mthca/mthca_memfree.c +2 -2
index 7d2e42dd6926..8676685dbf3d 100644

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

drivers/infiniband/hw/qib/qib_user_pages.c +2 -1
index ab1588ae1c85..75c3f0dffe63 100644

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

drivers/infiniband/hw/usnic/usnic_uiom.c +4 -1
index 645a5f6e6c88..7f0d75e29441 100644

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

drivers/media/dvb-frontends/ascot2e.c +3 -1
index f770f6a2c987..3ea9edc8cdbe 100644

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

drivers/media/dvb-frontends/cxd2841er.c +3 -1
index 107853b0fddd..bde77671a37c 100644

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

drivers/media/dvb-frontends/horus3a.c +3 -1
index 000606af70f7..f770ab72a8e3 100644

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

drivers/media/dvb-frontends/itd1000.c +3 -2
index cadcae4cff89..ac9d2591bb6f 100644

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

drivers/media/dvb-frontends/mt312.c +4 -1
index c36e6764eead..c44188271028 100644

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

drivers/media/dvb-frontends/stb0899_drv.c +2 -1
index 756650f154ab..ad9b7d4f8d95 100644

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

drivers/media/dvb-frontends/stb6100.c +4 -2
index 4ef8a5c7003e..44fac2570034 100644

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

drivers/media/dvb-frontends/stv0367.c +3 -1
index 44cb73f68af6..ddd0d778ad6e 100644

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

drivers/media/dvb-frontends/stv090x.c +3 -1
index 25bdf6e0f963..f0377e2b341b 100644

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

drivers/media/dvb-frontends/stv6110x.c +3 -1
index e66154e5c1d7..45d14869e7b8 100644

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

drivers/media/dvb-frontends/zl10039.c +3 -1
index ee09ec26c553..b273e4fd8024 100644

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

drivers/media/pci/ivtv/ivtv-udma.c +2 -1
index 24152accc66c..8729fdebef8f 100644

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

drivers/media/pci/ivtv/ivtv-yuv.c +4 -4
index 2b8e7b2f2b86..9cd995f418e0 100644

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

drivers/media/platform/omap/omap_vout.c +1 -1
index 70c28d19ea04..596359576109 100644

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

drivers/media/v4l2-core/videobuf-dma-sg.c +5 -2
index f669cedca8bd..f74a74d91b9e 100644

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

drivers/media/v4l2-core/videobuf2-memops.c +5 -1
index 3c3b517f1d1c..1cd322e939c7 100644

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

drivers/misc/mic/scif/scif_rma.c +1 -2
index 8bd63128d536..71c69e1c4ac0 100644

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

drivers/misc/sgi-gru/grufault.c +1 -1
index f74fc0ca2ef9..e6b723c6a2af 100644

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

drivers/net/ethernet/cavium/thunder/nic_main.c +3 -0
index 16baaafed26c..cbdeb54eab51 100644

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

drivers/net/ethernet/hisilicon/hip04_eth.c +1 -3
index 253f8ed0537a..60c727b0b7ab 100644

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

drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c +3 -1
index ffd2e74e5638..dcd718ce13d5 100644

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

drivers/net/ethernet/realtek/8139cp.c +5 -0
index deae10d7426d..9b588251f2a7 100644

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

drivers/net/ethernet/rocker/rocker.c +18 -6
index 3920c3eb6006..df6063faad2e 100644

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

drivers/net/phy/phy_device.c +8 -11
index 1f2f25a71d18..70f26b30729c 100644

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

drivers/net/tun.c +3 -3
index 5ac0b850d6b1..fd9ff9eff237 100644

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

drivers/net/wireless/ath/wil6210/wmi.c +7 -1
index 6ed26baca0e5..7af8479acb98 100644

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

drivers/scsi/sr_ioctl.c +7 -14
index 03054c0e7689..3c3e8115f73d 100644

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

drivers/scsi/st.c +2 -3
index 2e522951b619..088a68ab4246 100644

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

drivers/staging/rdma/hfi1/user_pages.c +1 -1
index 9071afbd7bf4..b776b74d3d14 100644

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

drivers/staging/rdma/ipath/ipath_user_pages.c +1 -1
index d29b4daf61f8..f69ec728e0de 100644

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

drivers/staging/speakup/kobjects.c +2 -2
index 06ef26872462..52aed7cfeb24 100644

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

drivers/usb/gadget/udc/omap_udc.c +30 -57

87 lines not on this page · raw message

drivers/video/fbdev/matrox/matroxfb_Ti3026.c +1 -1
index 195ad7cac1ba..68fa037d8cbc 100644

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

drivers/video/fbdev/pvr2fb.c +1 -1
index 0e24eb9c219c..750a384bf191 100644

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

drivers/virt/fsl_hypervisor.c +2 -2
index 32c8fc5f7a5c..590a0f51a249 100644

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

drivers/xen/xlate_mmu.c +1 -0
index 5063c5e796b7..84a1fab0dd6b 100644

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

fs/btrfs/send.c +8 -3
index 83c73738165e..40d1ab957fb6 100644

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

fs/cachefiles/rdwr.c +0 -3
index 5b68cf526887..c05ab2ec0fef 100644

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

fs/exec.c +7 -2
index 910fc70c4542..3dad755b7048 100644

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

fs/exportfs/expfs.c +1 -1
index 714cd37a6ba3..6599c6124552 100644

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

fs/fscache/object.c +3 -0
index 7a182c87f378..ab1d7f35f6c2 100644

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

fs/hfs/btree.c +2 -1
index 1ab19e660e69..1ff5774a5382 100644

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

fs/hfsplus/btree.c +2 -1
index 3345c7553edc..7adc8a327e03 100644

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

fs/hugetlbfs/inode.c +27 -3
index a17da8b57fc6..ab34f613fa85 100644

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

fs/ocfs2/export.c +1 -1
index 827fc9809bc2..3494e220b510 100644

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

fs/ocfs2/move_extents.c +26 -21

47 lines not on this page · raw message

fs/proc/base.c +12 -7
index 4beed301e224..bd8c26a409a7 100644

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

fs/pstore/platform.c +2 -2
index 588461bb2dd4..e97e7d74e134 100644

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

fs/sysv/inode.c +1 -1
index 02fa1dcc5969..29f5b2e589a1 100644

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

include/linux/mm.h +7 -8
index d4e8077fca96..251adf4d8a71 100644

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

include/linux/posix-timers.h +2 -2
index 907f3fd191ac..3e28a1a8d823 100644

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

include/net/neighbour.h +23 -5
index 8b683841e574..f6017ddc4ded 100644

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

include/sound/pcm.h +1 -1
index b0be09279943..ffc161906d36 100644

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

kernel/bpf/verifier.c +77 -21

98 lines not on this page · raw message

kernel/events/uprobes.c +2 -2
index 7108097fa2f2..aad43c88a668 100644

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

kernel/time/posix-cpu-timers.c +1 -1
index 80016b329d94..8fc68e60c795 100644

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

kernel/time/posix-timers.c +19 -10
index fc7c37ad90a0..0e6ed2e7d066 100644

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

kernel/trace/bpf_trace.c +5 -3
index 4228fd3682c3..3dd40c736067 100644

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

lib/debugobjects.c +2 -1
index a26328ec39f1..bb37541cd441 100644

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

lib/swiotlb.c +9 -11
index 771234d050c7..6bc452b33b76 100644

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

mm/frame_vector.c +3 -6
index 7cf2b7163222..c1e7926a41c4 100644

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

mm/gup.c +22 -20

42 lines not on this page · raw message

mm/hugetlb.c +11 -1
index 6f99a0f906bb..f1a45f5077fe 100644

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

mm/memory.c +12 -6
index 5aee9ec8b8c6..fa752df6dc85 100644

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

mm/mempolicy.c +1 -1
index be9840bf11d1..44134ba6fb53 100644

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

mm/nommu.c +18 -24

42 lines not on this page · raw message

mm/process_vm_access.c +5 -1
index 5d453e58ddbf..1b5a6104c5fc 100644

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

mm/util.c +1 -1
index 5fae5b9c2885..db39235970c6 100644

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

net/ceph/pagevec.c +1 -1
index d4f5f220a8e5..28453d698d86 100644

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

net/core/rtnetlink.c +3 -0
index d2a46ffe6382..d52b633164c9 100644

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

net/ipv4/tcp_output.c +8 -4
index 2d3c9df8d75c..b55b8954dae5 100644

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

net/ipv6/ip6_output.c +21 -21

42 lines not on this page · raw message

net/sched/sch_netem.c +3 -0
index 743ff23885da..7acf1f2b8dfc 100644

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

security/tomoyo/domain.c +2 -1
index 38651454ed08..6f388e77999c 100644

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

sound/core/pcm_lib.c +0 -2
index 5bc7ddf8fc70..3ce2b8771762 100644

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

sound/core/pcm_native.c +1 -5
index 0ad194002c0c..9b6dcdea4431 100644

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

sound/soc/omap/omap-dmic.c +9 -0
index 09db2aec12a3..776e809a8aab 100644

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

sound/soc/omap/omap-mcpdm.c +42 -1

43 lines not on this page · raw message

sound/soc/soc-core.c +1 -0
index fa6b74a304a7..b927f9c81d92 100644

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

tools/testing/selftests/networking/timestamping/.gitignore new file +3 -0
new file mode 100644
index 000000000000..9e69e982fb38

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

tools/testing/selftests/networking/timestamping/Makefile new file +8 -0
new file mode 100644
index 000000000000..ccbb9edbbbb9

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

tools/testing/selftests/networking/timestamping/hwtstamp_config.c new file +134 -0

134 lines not on this page · raw message

tools/testing/selftests/networking/timestamping/timestamping.c new file +528 -0

528 lines not on this page · raw message

tools/testing/selftests/networking/timestamping/txtimestamp.c new file +549 -0

549 lines not on this page · raw message

virt/kvm/async_pf.c +1 -1
index 4f70d12e392d..eddce59986ee 100644

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

virt/kvm/kvm_main.c +8 -3
index b814ae6822b6..e4be695eb789 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.