Linux 4.14.21
Greg KH
maintainerI'm announcing the release of the 4.14.21 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/admin-guide/kernel-parameters.txt | 7 Documentation/dev-tools/index.rst | 1 Documentation/dev-tools/kmemcheck.rst | 733 -------------------- Documentation/devicetree/bindings/dma/snps-dma.txt | 2 Documentation/filesystems/ext4.txt | 2 MAINTAINERS | 10 Makefile | 2 arch/arm/boot/dts/arm-realview-eb-mp.dtsi | 5 arch/arm/boot/dts/exynos5410.dtsi | 1 arch/arm/boot/dts/lpc3250-ea3250.dts | 4 arch/arm/boot/dts/lpc3250-phy3250.dts | 4 arch/arm/boot/dts/mt2701.dtsi | 2 arch/arm/boot/dts/mt7623.dtsi | 1 arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts | 2 arch/arm/boot/dts/s5pv210.dtsi | 1 arch/arm/boot/dts/spear1310-evb.dts | 2 arch/arm/boot/dts/spear1340.dtsi | 4 arch/arm/boot/dts/spear13xx.dtsi | 6 arch/arm/boot/dts/spear600.dtsi | 1 arch/arm/boot/dts/ste-nomadik-stn8815.dtsi | 1 arch/arm/boot/dts/stih407.dtsi | 3 arch/arm/boot/dts/stih410.dtsi | 3 arch/arm/include/asm/dma-iommu.h | 1 arch/arm/include/asm/pgalloc.h | 2 arch/arm/mach-pxa/tosa-bt.c | 4 arch/arm64/boot/dts/qcom/msm8916.dtsi | 5 arch/arm64/include/asm/pgalloc.h | 2 arch/arm64/kernel/cpu_errata.c | 9 arch/arm64/kvm/hyp/switch.c | 4 arch/arm64/mm/proc.S | 14 arch/mips/Kconfig | 12 arch/mips/kernel/setup.c | 16 arch/openrisc/include/asm/dma-mapping.h | 1 arch/powerpc/include/asm/pgalloc.h | 2 arch/powerpc/include/asm/topology.h | 5 arch/powerpc/kernel/exceptions-64s.S | 2 arch/powerpc/kernel/head_32.S | 2 arch/powerpc/mm/numa.c | 5 arch/powerpc/mm/pgtable-radix.c | 95 ++ arch/powerpc/mm/pgtable_64.c | 2 arch/powerpc/mm/tlb-radix.c | 2 arch/powerpc/platforms/pseries/hotplug-cpu.c | 2 arch/powerpc/sysdev/xive/spapr.c | 16 arch/s390/kernel/compat_linux.c | 8 arch/sh/kernel/dwarf.c | 4 arch/sh/kernel/process.c | 2 arch/sparc/mm/init_64.c | 4 arch/unicore32/include/asm/pgalloc.h | 2 arch/x86/Kconfig | 3 arch/x86/Makefile | 5 arch/x86/entry/calling.h | 107 +- arch/x86/entry/entry_64.S | 92 -- arch/x86/entry/entry_64_compat.S | 30 arch/x86/events/intel/core.c | 2 arch/x86/events/intel/lbr.c | 2 arch/x86/events/intel/p6.c | 2 arch/x86/include/asm/acpi.h | 2 arch/x86/include/asm/barrier.h | 2 arch/x86/include/asm/bug.h | 19 arch/x86/include/asm/dma-mapping.h | 1 arch/x86/include/asm/kmemcheck.h | 43 - arch/x86/include/asm/nospec-branch.h | 14 arch/x86/include/asm/page_64.h | 4 arch/x86/include/asm/paravirt.h | 4 arch/x86/include/asm/paravirt_types.h | 2 arch/x86/include/asm/pgtable.h | 5 arch/x86/include/asm/pgtable_32.h | 2 arch/x86/include/asm/pgtable_types.h | 13 arch/x86/include/asm/processor.h | 7 arch/x86/include/asm/string_32.h | 9 arch/x86/include/asm/string_64.h | 8 arch/x86/include/asm/tlbflush.h | 27 arch/x86/include/asm/xor.h | 5 arch/x86/kernel/acpi/apei.c | 2 arch/x86/kernel/amd_nb.c | 2 arch/x86/kernel/apic/apic.c | 6 arch/x86/kernel/apm_32.c | 1 arch/x86/kernel/asm-offsets_32.c | 2 arch/x86/kernel/cpu/amd.c | 28 arch/x86/kernel/cpu/bugs.c | 34 arch/x86/kernel/cpu/centaur.c | 4 arch/x86/kernel/cpu/common.c | 10 arch/x86/kernel/cpu/cyrix.c | 2 arch/x86/kernel/cpu/intel.c | 46 - arch/x86/kernel/cpu/intel_rdt.c | 2 arch/x86/kernel/cpu/mcheck/mce-internal.h | 15 arch/x86/kernel/cpu/mcheck/mce.c | 17 arch/x86/kernel/cpu/microcode/intel.c | 6 arch/x86/kernel/cpu/mtrr/generic.c | 2 arch/x86/kernel/cpu/mtrr/main.c | 4 arch/x86/kernel/cpu/proc.c | 8 arch/x86/kernel/early-quirks.c | 1 arch/x86/kernel/espfix_64.c | 2 arch/x86/kernel/head_32.S | 4 arch/x86/kernel/mpparse.c | 2 arch/x86/kernel/paravirt.c | 6 arch/x86/kernel/relocate_kernel_64.S | 8 arch/x86/kernel/traps.c | 7 arch/x86/kvm/mmu.c | 10 arch/x86/kvm/vmx.c | 7 arch/x86/lib/cpu.c | 2 arch/x86/mm/Makefile | 2 arch/x86/mm/fault.c | 6 arch/x86/mm/init.c | 8 arch/x86/mm/init_64.c | 4 arch/x86/mm/ioremap.c | 2 arch/x86/mm/kmemcheck/Makefile | 1 arch/x86/mm/kmemcheck/error.c | 228 ------ arch/x86/mm/kmemcheck/error.h | 16 arch/x86/mm/kmemcheck/kmemcheck.c | 658 ----------------- arch/x86/mm/kmemcheck/opcode.c | 107 -- arch/x86/mm/kmemcheck/opcode.h | 10 arch/x86/mm/kmemcheck/pte.c | 23 arch/x86/mm/kmemcheck/pte.h | 11 arch/x86/mm/kmemcheck/selftest.c | 71 - arch/x86/mm/kmemcheck/selftest.h | 7 arch/x86/mm/kmemcheck/shadow.c | 173 ---- arch/x86/mm/kmemcheck/shadow.h | 19 arch/x86/mm/kmmio.c | 2 arch/x86/mm/pageattr.c | 10 arch/x86/mm/pgtable.c | 2 arch/x86/mm/pgtable_32.c | 2 arch/x86/mm/tlb.c | 6 arch/x86/platform/efi/efi_64.c | 2 arch/x86/platform/uv/tlb_uv.c | 2 arch/x86/xen/mmu_pv.c | 6 arch/x86/xen/p2m.c | 6 arch/x86/xen/xen-head.S | 16 block/blk-wbt.c | 10 crypto/xor.c | 7 drivers/base/core.c | 3 drivers/block/rbd.c | 4 drivers/bluetooth/Kconfig | 2 drivers/char/hw_random/via-rng.c | 2 drivers/char/random.c | 1 drivers/cpufreq/acpi-cpufreq.c | 2 drivers/cpufreq/longhaul.c | 6 drivers/cpufreq/p4-clockmod.c | 2 drivers/cpufreq/powernow-k7.c | 2 drivers/cpufreq/powernv-cpufreq.c | 4 drivers/cpufreq/speedstep-centrino.c | 4 drivers/cpufreq/speedstep-lib.c | 6 drivers/crypto/padlock-aes.c | 2 drivers/crypto/sunxi-ss/sun4i-ss-prng.c | 6 drivers/devfreq/devfreq.c | 2 drivers/dma-buf/reservation.c | 8 drivers/edac/amd64_edac.c | 2 drivers/gpu/drm/amd/powerplay/smumgr/rv_smumgr.h | 2 drivers/gpu/drm/ast/ast_mode.c | 1 drivers/gpu/drm/i915/i915_drv.h | 1 drivers/gpu/drm/i915/i915_pci.c | 193 ++++- drivers/gpu/drm/qxl/qxl_cmd.c | 6 drivers/gpu/drm/qxl/qxl_display.c | 112 ++- drivers/gpu/drm/qxl/qxl_drv.h | 4 drivers/gpu/drm/qxl/qxl_dumb.c | 1 drivers/gpu/drm/radeon/radeon_uvd.c | 2 drivers/gpu/drm/radeon/si_dpm.c | 5 drivers/gpu/drm/ttm/ttm_bo.c | 3 drivers/gpu/drm/ttm/ttm_bo_vm.c | 3 drivers/hwmon/coretemp.c | 6 drivers/hwmon/hwmon-vid.c | 2 drivers/hwmon/k10temp.c | 2 drivers/hwmon/k8temp.c | 2 drivers/infiniband/core/device.c | 20 drivers/infiniband/core/sysfs.c | 1 drivers/infiniband/core/user_mad.c | 2 drivers/infiniband/core/uverbs_std_types.c | 2 drivers/infiniband/hw/mlx4/main.c | 13 drivers/infiniband/hw/qib/qib_rc.c | 6 drivers/infiniband/sw/rxe/rxe_loc.h | 1 drivers/infiniband/sw/rxe/rxe_qp.c | 12 drivers/infiniband/sw/rxe/rxe_req.c | 9 drivers/infiniband/sw/rxe/rxe_resp.c | 2 drivers/infiniband/sw/rxe/rxe_verbs.c | 2 drivers/infiniband/sw/rxe/rxe_verbs.h | 3 drivers/md/dm.c | 3 drivers/media/tuners/r820t.c | 13 drivers/misc/c2port/core.c | 2 drivers/mmc/host/bcm2835.c | 3 drivers/mmc/host/meson-gx-mmc.c | 19 drivers/mmc/host/sdhci-of-esdhc.c | 64 + drivers/mmc/host/sdhci.c | 164 ++++ drivers/mmc/host/sdhci.h | 3 drivers/mtd/nand/vf610_nfc.c | 6 drivers/net/ethernet/marvell/mvpp2.c | 11 drivers/net/ethernet/mellanox/mlx4/qp.c | 3 drivers/net/wireless/marvell/mwifiex/pcie.c | 5 drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c | 5 drivers/net/wireless/realtek/rtlwifi/wifi.h | 1 drivers/pci/dwc/pci-keystone.c | 5 drivers/pci/host/pcie-iproc-platform.c | 7 drivers/pci/host/pcie-iproc.c | 8 drivers/pci/host/pcie-iproc.h | 2 drivers/pci/quirks.c | 2 drivers/platform/x86/apple-gmux.c | 48 - drivers/rtc/rtc-opal.c | 12 drivers/scsi/scsi_sysfs.c | 5 drivers/scsi/smartpqi/Makefile | 2 drivers/target/iscsi/iscsi_target_auth.c | 3 drivers/target/iscsi/iscsi_target_nego.c | 3 drivers/usb/Kconfig | 8 drivers/usb/host/Kconfig | 8 drivers/video/console/dummycon.c | 1 drivers/video/fbdev/atmel_lcdfb.c | 8 drivers/video/fbdev/geode/video_gx.c | 2 drivers/xen/xenbus/xenbus.h | 1 drivers/xen/xenbus/xenbus_comms.c | 1 drivers/xen/xenbus/xenbus_xs.c | 3 fs/btrfs/inode.c | 41 - fs/btrfs/tree-log.c | 32 fs/dcache.c | 2 fs/ext4/inode.c | 16 fs/ext4/super.c | 1 fs/jbd2/transaction.c | 5 fs/mbcache.c | 1 fs/ocfs2/dlmglue.c | 9 fs/overlayfs/inode.c | 37 - fs/overlayfs/super.c | 1 fs/overlayfs/util.c | 4 fs/seq_file.c | 5 include/drm/i915_pciids.h | 160 ++-- include/linux/c2port.h | 4 include/linux/compiler-gcc.h | 7 include/linux/compiler.h | 4 include/linux/cpuidle.h | 2 include/linux/dma-mapping.h | 8 include/linux/filter.h | 2 include/linux/gfp.h | 9 include/linux/interrupt.h | 15 include/linux/jbd2.h | 431 +++++++---- include/linux/kmemcheck.h | 172 ---- include/linux/mlx5/driver.h | 2 include/linux/mm_inline.h | 6 include/linux/mm_types.h | 8 include/linux/net.h | 3 include/linux/nospec.h | 36 include/linux/ring_buffer.h | 3 include/linux/skbuff.h | 3 include/linux/slab.h | 6 include/linux/thread_info.h | 5 include/net/inet_sock.h | 3 include/net/inet_timewait_sock.h | 4 include/net/sock.h | 3 include/rdma/ib_verbs.h | 2 include/trace/events/mmflags.h | 1 include/trace/events/xen.h | 2 init/do_mounts.c | 3 init/main.c | 1 kernel/bpf/core.c | 6 kernel/fork.c | 12 kernel/locking/lockdep.c | 3 kernel/memremap.c | 3 kernel/signal.c | 3 kernel/softirq.c | 10 kernel/sysctl.c | 10 kernel/trace/Kconfig | 2 kernel/trace/ring_buffer.c | 3 kernel/trace/trace_events_filter.c | 9 lib/Kconfig.debug | 6 lib/Kconfig.kmemcheck | 94 -- lib/swiotlb.c | 15 mm/Kconfig.debug | 1 mm/Makefile | 2 mm/kmemcheck.c | 126 --- mm/kmemleak.c | 9 mm/memory-failure.c | 2 mm/memory.c | 2 mm/page_alloc.c | 14 mm/slab.c | 16 mm/slab.h | 7 mm/slab_common.c | 2 mm/slub.c | 31 net/9p/trans_virtio.c | 3 net/core/skbuff.c | 5 net/core/sock.c | 2 net/ipv4/inet_timewait_sock.c | 3 net/ipv4/tcp_input.c | 1 net/mpls/af_mpls.c | 24 net/socket.c | 1 net/sunrpc/xprtrdma/rpc_rdma.c | 2 net/sunrpc/xprtrdma/verbs.c | 8 scripts/kernel-doc | 2 sound/core/seq/seq_clientmgr.c | 8 sound/pci/hda/patch_realtek.c | 72 + sound/soc/intel/common/sst-match-acpi.c | 8 sound/usb/mixer.c | 18 sound/usb/pcm.c | 9 sound/usb/quirks.c | 7 tools/include/linux/kmemcheck.h | 9 tools/objtool/check.c | 12 tools/perf/builtin-kmem.c | 1 tools/testing/selftests/seccomp/seccomp_bpf.c | 4 tools/testing/selftests/vm/compaction_test.c | 2 tools/testing/selftests/x86/Makefile | 22 tools/testing/selftests/x86/mpx-mini-test.c | 32 tools/testing/selftests/x86/protection_keys.c | 28 tools/testing/selftests/x86/single_step_syscall.c | 5 tools/testing/selftests/x86/test_mremap_vdso.c | 4 tools/testing/selftests/x86/test_vdso.c | 55 + tools/testing/selftests/x86/test_vsyscall.c | 11 300 files changed, 1958 insertions(+), 3841 deletions(-)
Alex Deucher (1):
drm/radeon: Add dpm quirk for Jet PRO (v2)
Alexander Potapenko (1):
mbcache: initialize entry->e_referenced in mb_cache_entry_create()
Alexey Kardashevskiy (1):
powerpc/mm: Flush radix process translations when setting MMU type
Amir Goldstein (1):
ovl: hash directory inodes for fsnotify
Anders Roxell (1):
selftests: seccomp: fix compile error seccomp_bpf
Andrey Grodzovsky (1):
drm/amd/powerplay: Fix smu_table_entry.handle type
Andy Lutomirski (1):
x86/mm: Rename flush_tlb_single() and flush_tlb_one() to __flush_tlb_one_[user|kernel]()
Anuj Phogat (1):
drm/i915/kbl: Change a KBL pci id to GT2 from GT1.5
Arnd Bergmann (9):
kselftest: fix OOM in memory compaction test
ARM: lpc3250: fix uda1380 gpio numbers
ARM: dts: nomadik: add interrupt-parent for clcd
mm: hide a #warning for COMPILE_TEST
Bluetooth: BT_HCIUART now depends on SERIAL_DEV_BUS
ARM: dts: exynos: fix RTC interrupt for exynos5410
ARM: pxa/tosa-bt: add MODULE_LICENSE tag
ARM: dts: s5pv210: add interrupt-parent for ohci
media: r820t: fix r820t_write_reg for KASAN
Artem Savkov (2):
crypto: sun4i_ss_prng - fix return value of sun4i_ss_prng_generate
crypto: sun4i_ss_prng - convert lock to _bh in sun4i_ss_prng_generate
Balbir Singh (1):
powerpc/mm/radix: Split linear mapping on hot-unplug
Bart Van Assche (4):
IB/core: Fix two kernel warnings triggered by rxe registration RDMA/rxe: Fix a race condition related to the QP error state RDMA/rxe: Fix a race condition in rxe_requester() RDMA/rxe: Fix rxe_qp_cleanup()
Benjamin Herrenschmidt (1):
powerpc: Fix DABR match on hash based systems
Bjorn Andersson (3):
PM / devfreq: Propagate error from devfreq_add_device()
arm64: dts: msm8916: Correct ipc references for smsm
arm64: dts: msm8916: Add missing #phy-cells
Bodong Wang (1):
IB/core: Fix ib_wc structure size to remain in 64 bytes boundary
Borislav Petkov (1):
x86/entry/64: Remove the unused 'icebp' macro
Brian Norris (1):
mwifiex: resolve reset vs. remove()/shutdown() deadlocks
Christian König (2):
swiotlb: suppress warning when __GFP_NOWARN is set
dma-buf: fix reservation_object_wait_timeout_rcu once more v2
Chuck Lever (2):
xprtrdma: Fix calculation of ri_max_send_sges
xprtrdma: Fix BUG after a device removal
Corentin Labbe (1):
MIPS: Fix typo BIG_ENDIAN to CPU_BIG_ENDIAN
Cédric Le Goater (1):
powerpc/xive: Use hw CPU ids when configuring the CPU queues
Dan Carpenter (1):
x86/spectre: Fix an error message
Dan Williams (5):
x86/entry/64: Clear extra registers beyond syscall arguments, to reduce speculation attack surface x86/entry/64/compat: Clear registers for compat syscalls, to reduce speculation attack surface x86/entry/64: Clear registers for exceptions/interrupts, to reduce speculation attack surface x86/speculation: Fix up array_index_nospec_mask() asm constraint
mpls, nospec: Sanitize array index in mpls_label_ok()
Daniel Mack (1):
ALSA: usb: add more device quirks for USB DSD devices
Daniel Vetter (1):
drm/ast: Load lut in crtc_commit
David Disseldorp (1):
target/iscsi: avoid NULL dereference in CHAP auth error path
David Woodhouse (4):
x86/speculation: Update Speculation Control microcode blacklist
x86/speculation: Correct Speculation Control microcode blacklist again
Revert "x86/speculation: Simplify indirect_branch_prediction_barrier()"
KVM/x86: Reduce retpoline performance impact in slot_handle_level_range(), by always inlining iterator helper methods
Dominik Brodowski (12):
x86/entry/64: Merge SAVE_C_REGS and SAVE_EXTRA_REGS, remove unused extensions x86/entry/64: Merge the POP_C_REGS and POP_EXTRA_REGS macros into a single POP_REGS macro x86/entry/64: Interleave XOR register clearing with PUSH instructions x86/entry/64: Introduce the PUSH_AND_CLEAN_REGS macro
x86/entry/64: Use PUSH_AND_CLEAN_REGS in more cases
x86/entry/64: Get rid of the ALLOC_PT_GPREGS_ON_STACK and SAVE_AND_CLEAR_REGS macros x86/entry/64: Indent PUSH_AND_CLEAR_REGS and POP_REGS properly selftests/x86: Fix vDSO selftest segfault for vsyscall=none
selftests/x86: Clean up and document sscanf() usage
selftests/x86: Do not rely on "int $0x80" in test_mremap_vdso.c selftests/x86: Do not rely on "int $0x80" in single_step_syscall.c selftests/x86: Disable tests requiring 32-bit support on pure 64-bit systems
Dongdong Liu (1):
PCI: Disable MSI for HiSilicon Hip06/Hip07 only in Root Port mode
Ernesto A. Fernández (1):
ext4: correct documentation for grpid mount option
Eugene Syromiatnikov (1):
s390: fix handling of -1 in set{,fs}[gu]id16 syscalls
Felix Kuehling (1):
drm/ttm: Don't add swapped BOs to swap-LRU list
Florian Westphal (1):
iscsi-target: make sure to wake up sleeping login worker
Gang He (1):
ocfs2: try a blocking lock before return AOP_TRUNCATED_PAGE
Geert Uytterhoeven (2):
compiler-gcc.h: Introduce __optimize function attribute compiler-gcc.h: __nostackprotector needs gcc-4.4 and up
Gerd Hoffmann (1):
qxl: alloc & use shadow for dumb buffers
Greg Kroah-Hartman (1):
Linux 4.14.21
Greg Kurz (1):
9p/trans_virtio: discard zero-length reply
Gustavo A. R. Silva (1):
x86/cpu: Change type of x86_cache_size variable to unsigned int
Hannes Reinecke (1):
scsi: core: check for device state in __scsi_remove_target()
Harshad Shirwadkar (1):
ext4: fix a race in the ext4 shutdown path
Hui Wang (1):
ALSA: hda - Fix headset mic detection problem for two Dell machines
Ilya Dryomov (1):
rbd: whitelist RBD_FEATURE_OPERATIONS feature bit
Ingo Molnar (3):
x86/speculation: Clean up various Spectre related details selftests/x86/pkeys: Remove unused functions x86/entry/64: Fix CR3 restore in paranoid_exit()
Jack Morgenstein (2):
IB/umad: Fix use of unprotected device pointer
IB/mlx4: Fix incorrectly releasing steerable UD QPs when have only ETH ports
James Hogan (1):
usb: Move USB_UHCI_BIG_ENDIAN_* out of USB_SUPPORT
Jan H. Schönherr (1):
mm: Fix memory size alignment in devm_memremap_pages_release()
Jan-Marek Glogowski (1):
ALSA: hda/realtek: PCI quirk for Fujitsu U7x7
Jens Axboe (1):
blk-wbt: account flush requests correctly
Jerome Brunet (1):
Revert "mmc: meson-gx: include tx phase in the tuning process"
Jia Zhang (1):
x86/cpu: Rename cpu_data.x86_mask to cpu_data.x86_stepping
Joao Martins (1):
xenbus: track caller request id
Johan Hovold (2):
PCI: keystone: Fix interrupt-controller-node lookup
video: fbdev: atmel_lcdfb: fix display-timings lookup
Josh Poimboeuf (3):
x86/entry/64: Fix paranoid_entry() frame pointer warning
objtool: Fix segfault in ignore_unreachable_insn() x86/debug, objtool: Annotate WARN()-related UD2 as reachable
Juergen Gross (1):
x86/xen: init %gs very early to avoid page faults with stack protector
Julia Lawall (1):
drm/radeon: adjust tested variable
Kailang Yang (2):
ALSA: hda/realtek - Add headset mode support for Dell laptop
ALSA: hda/realtek - Enable Thinkpad Dock device for ALC298 platform
KarimAllah Ahmed (2):
X86/nVMX: Properly set spec_ctrl and pred_cmd before merging MSRs KVM/nVMX: Set the CPU_BASED_USE_MSR_BITMAPS if we have a valid L02 MSR bitmap
Kirill A. Shutemov (1):
x86/kexec: Make kexec (mostly) work in 5-level paging mode
Kirill Marinushkin (1):
ALSA: usb-audio: Fix UAC2 get_ctl request with a RANGE attribute
Larry Finger (1):
rtlwifi: rtl8821ae: Fix connection lost problem correctly
Lassi Ylikojola (1):
ALSA: usb-audio: add implicit fb quirk for Behringer UFX1204
Levin, Alexander (Sasha Levin) (4):
kmemcheck: remove annotations
kmemcheck: stop using GFP_NOTRACK and SLAB_NOTRACK
kmemcheck: remove whats left of NOTRACK flags
kmemcheck: rip it out
Linus Walleij (2):
mmc: sdhci: Implement an SDHCI-specific bounce buffer
ARM: dts: Delete bogus reference to the charlcd
Lionel Landwerlin (1):
drm/i915: add GT number to intel_device_info
Liu Bo (6):
Btrfs: fix deadlock in run_delalloc_nocow
Btrfs: fix crash due to not cleaning up tree log block's dirty bits
Btrfs: fix extent state leak from tree log
Btrfs: fix btrfs_evict_inode to handle abnormal inodes correctly
Btrfs: fix use-after-free on root->orphan_block_rsv
Btrfs: fix unexpected -EEXIST when creating new inode
Lucas De Marchi (1):
x86/gpu: add CFL to early quirks
Lukas Wunner (2):
PM / runtime: Update links_count also if !CONFIG_SRCU Revert "apple-gmux: lock iGP IO to protect from vgaarb changes"
Mahesh Salgaonkar (1):
powerpc/radix: Remove trace_tlbie call from radix__flush_tlb_all
Marcin Nowakowski (1):
MIPS: Fix incorrect mem=X@Y handling
Matthias Brugger (2):
arm: dts: mt7623: Update ethsys binding
arm: dts: mt2701: Add reset-cells
Michael J. Ruhl (1):
IB/core: Avoid a potential OOPs for an unused optional parameter
Michal Hocko (1):
kmemcheck: rip it out for real
Mike Marciniszyn (1):
IB/qib: Fix comparison error with qperf compare/swap test
Miklos Szeredi (1):
seq_file: fix incomplete reset on read from zero offset
Mikulas Patocka (1):
mvpp2: fix multicast address filter
Nadav Amit (1):
x86/mm/pti: Fix PTI comment in entry_SYSCALL_64()
Nathan Fontenot (1):
powerpc/numa: Invalidate numa_cpu_lookup_table on cpu remove
NeilBrown (1):
dm: correctly handle chained bios in dec_pending()
Nicolas Pitre (1):
console/dummy: leave .con_font_get set to NULL
Patrice Chotard (1):
ARM: dts: STi: Add gpio polarity for "hdmi,hpd-gpio" property
Peter Zijlstra (2):
x86/debug: Use UD2 for WARN() x86/speculation: Add <asm/msr-index.h> dependency
Phil Elwell (1):
mmc: bcm2835: Don't overwrite max frequency unconditionally
Pierre-Louis Bossart (1):
ASoC: acpi: fix machine driver selection based on quirk
Rafael J. Wysocki (2):
x86: PM: Make APM idle driver initialize polling state
PM: cpuidle: Fix cpuidle_poll_state_init() prototype
Randy Dunlap (1):
tracing: Prevent PROFILE_ALL_BRANCHES when FORTIFY_SOURCE=y
Ray Jui (1):
PCI: iproc: Fix NULL pointer dereference for BCMA
Ray Strode (2):
drm/qxl: unref cursor bo when finished with it drm/qxl: reapply cursor after resetting primary
Rui Wang (1):
selftests/x86/mpx: Fix incorrect bounds with old _sigfault
Sagi Grimberg (1):
mlx5: fix mlx5_get_vector_affinity to start from completion vector 0
Sean Wang (1):
arm: dts: mt7623: fix card detection issue on bananapi-r2
Shanker Donthineni (1):
arm64: Add missing Falkor part number for branch predictor hardening
Shilpasri G Bhat (1):
cpufreq: powernv: Dont assume distinct pstate values for nominal and pmin
Simon Gaiser (1):
xen: Fix {set,clear}_foreign_p2m_mapping on autotranslating guests
Stefan Agner (1):
mtd: nand: vf610: set correct ooblayout
Steffen Weber (1):
scsi: smartpqi: allow static build ("built-in")
Steven Rostedt (VMware) (1):
tracing: Fix parsing of globs with a wildcard at the beginning
Stewart Smith (1):
rtc-opal: Fix handling of firmware error codes, prevent busy loops
Takashi Iwai (1):
ALSA: seq: Fix racy pool initializations
Tobin C. Harding (1):
jbd2: fix sphinx kernel-doc build warnings
Tom St Denis (1):
drm/ttm: Fix 'buf' pointer update in ttm_bo_vm_access_kmap() (v2)
Tony Luck (1):
x86/mm, mm/hwpoison: Don't unconditionally unmap kernel 1:1 pages
Viresh Kumar (3):
arm: spear600: Add missing interrupt-parent of rtc
arm: spear13xx: Fix dmas cells
arm: spear13xx: Fix spics gpio controller's warning
Will Deacon (2):
nospec: Move array_index_nospec() parameter checking into separate macro
arm64: proc: Set PTE_NG for table entries to avoid traversing them twice
Zhouyi Zhou (1):
ext4: save error to disk in __ext4_grp_locked_error()
yangbo lu (1):
mmc: sdhci-of-esdhc: disable SD clock for clock value 0
yinbo.zhu (2):
mmc: sdhci-of-esdhc: fix eMMC couldn't work after kexec
mmc: sdhci-of-esdhc: fix the mmc error after sleep on ls1046ardb
Greg KH
maintainerDocumentation/admin-guide/kernel-parameters.txt +0 -7
@@ -1841,13 +1841,6 @@ Built with CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF=y, the default is off. - kmemcheck= [X86] Boot-time kmemcheck enable/disable/one-shot mode - Valid arguments: 0, 1, 2 - kmemcheck=0 (disabled) - kmemcheck=1 (enabled) - kmemcheck=2 (one-shot mode) - Default: 2 (one-shot mode) - kvm.ignore_msrs=[KVM] Ignore guest accesses to unhandled MSRs. Default is 0 (don't ignore, but inject #GP)
Documentation/dev-tools/index.rst +0 -1
@@ -21,7 +21,6 @@ whole; patches welcome! kasan ubsan kmemleak - kmemcheck gdb-kernel-debugging kgdb kselftest
Documentation/dev-tools/kmemcheck.rst deleted +0 -733
733 lines not on this page · raw message
Documentation/devicetree/bindings/dma/snps-dma.txt +1 -1
@@ -64,6 +64,6 @@ Example: reg = <0xe0000000 0x1000>; interrupts = <0 35 0x4>; dmas = <&dmahost 12 0 1>, - <&dmahost 13 0 1 0>; + <&dmahost 13 1 0>; dma-names = "rx", "rx"; };
Documentation/filesystems/ext4.txt +1 -1
@@ -233,7 +233,7 @@ data_err=ignore(*) Just print an error message if an error occurs data_err=abort Abort the journal if an error occurs in a file data buffer in ordered mode. -grpid Give objects the same group ID as their creator. +grpid New objects have the group ID of their parent. bsdgroups nogrpid (*) New objects have the group ID of their creator.
MAINTAINERS +0 -10
@@ -7670,16 +7670,6 @@ F: include/linux/kdb.h F: include/linux/kgdb.h F: kernel/debug/ -KMEMCHECK -M: Vegard Nossum <[email protected]> -M: Pekka Enberg <[email protected]> -S: Maintained -F: Documentation/dev-tools/kmemcheck.rst -F: arch/x86/include/asm/kmemcheck.h -F: arch/x86/mm/kmemcheck/ -F: include/linux/kmemcheck.h -F: mm/kmemcheck.c - KMEMLEAK M: Catalin Marinas <[email protected]> S: Maintained
Makefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 4 PATCHLEVEL = 14 -SUBLEVEL = 20 +SUBLEVEL = 21 EXTRAVERSION = NAME = Petit Gorille
arch/arm/boot/dts/arm-realview-eb-mp.dtsi +0 -5
@@ -150,11 +150,6 @@ interrupts = <0 8 IRQ_TYPE_LEVEL_HIGH>; }; -&charlcd { - interrupt-parent = <&intc>; - interrupts = <0 IRQ_TYPE_LEVEL_HIGH>; -}; - &serial0 { interrupt-parent = <&intc>; interrupts = <0 4 IRQ_TYPE_LEVEL_HIGH>;
arch/arm/boot/dts/exynos5410.dtsi +0 -1
@@ -333,7 +333,6 @@ &rtc { clocks = <&clock CLK_RTC>; clock-names = "rtc"; - interrupt-parent = <&pmu_system_controller>; status = "disabled"; };
arch/arm/boot/dts/lpc3250-ea3250.dts +2 -2
@@ -156,8 +156,8 @@ uda1380: uda1380@18 { compatible = "nxp,uda1380"; reg = <0x18>; - power-gpio = <&gpio 0x59 0>; - reset-gpio = <&gpio 0x51 0>; + power-gpio = <&gpio 3 10 0>; + reset-gpio = <&gpio 3 2 0>; dac-clk = "wspll"; };
arch/arm/boot/dts/lpc3250-phy3250.dts +2 -2
@@ -81,8 +81,8 @@ uda1380: uda1380@18 { compatible = "nxp,uda1380"; reg = <0x18>; - power-gpio = <&gpio 0x59 0>; - reset-gpio = <&gpio 0x51 0>; + power-gpio = <&gpio 3 10 0>; + reset-gpio = <&gpio 3 2 0>; dac-clk = "wspll"; };
arch/arm/boot/dts/mt2701.dtsi +2 -0
@@ -593,6 +593,7 @@ compatible = "mediatek,mt2701-hifsys", "syscon"; reg = <0 0x1a000000 0 0x1000>; #clock-cells = <1>; + #reset-cells = <1>; }; usb0: usb@1a1c0000 {
@@ -677,6 +678,7 @@ compatible = "mediatek,mt2701-ethsys", "syscon"; reg = <0 0x1b000000 0 0x1000>; #clock-cells = <1>; + #reset-cells = <1>; }; eth: ethernet@1b100000 {
arch/arm/boot/dts/mt7623.dtsi +1 -0
@@ -753,6 +753,7 @@ "syscon"; reg = <0 0x1b000000 0 0x1000>; #clock-cells = <1>; + #reset-cells = <1>; }; eth: ethernet@1b100000 {
arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts +1 -1
@@ -204,7 +204,7 @@ bus-width = <4>; max-frequency = <50000000>; cap-sd-highspeed; - cd-gpios = <&pio 261 0>; + cd-gpios = <&pio 261 GPIO_ACTIVE_LOW>; vmmc-supply = <&mt6323_vmch_reg>; vqmmc-supply = <&mt6323_vio18_reg>; };
arch/arm/boot/dts/s5pv210.dtsi +1 -0
@@ -463,6 +463,7 @@ compatible = "samsung,exynos4210-ohci"; reg = <0xec300000 0x100>; interrupts = <23>; + interrupt-parent = <&vic1>; clocks = <&clocks CLK_USB_HOST>; clock-names = "usbhost"; #address-cells = <1>;
arch/arm/boot/dts/spear1310-evb.dts +1 -1
@@ -349,7 +349,7 @@ spi0: spi@e0100000 { status = "okay"; num-cs = <3>; - cs-gpios = <&gpio1 7 0>, <&spics 0>, <&spics 1>; + cs-gpios = <&gpio1 7 0>, <&spics 0 0>, <&spics 1 0>; stmpe610@0 { compatible = "st,stmpe610";
arch/arm/boot/dts/spear1340.dtsi +2 -2
@@ -142,8 +142,8 @@ reg = <0xb4100000 0x1000>; interrupts = <0 105 0x4>; status = "disabled"; - dmas = <&dwdma0 0x600 0 0 1>, /* 0xC << 11 */ - <&dwdma0 0x680 0 1 0>; /* 0xD << 7 */ + dmas = <&dwdma0 12 0 1>, + <&dwdma0 13 1 0>; dma-names = "tx", "rx"; };
arch/arm/boot/dts/spear13xx.dtsi +3 -3
@@ -100,7 +100,7 @@ reg = <0xb2800000 0x1000>; interrupts = <0 29 0x4>; status = "disabled"; - dmas = <&dwdma0 0 0 0 0>; + dmas = <&dwdma0 0 0 0>; dma-names = "data"; };
@@ -290,8 +290,8 @@ #size-cells = <0>; interrupts = <0 31 0x4>; status = "disabled"; - dmas = <&dwdma0 0x2000 0 0 0>, /* 0x4 << 11 */ - <&dwdma0 0x0280 0 0 0>; /* 0x5 << 7 */ + dmas = <&dwdma0 4 0 0>, + <&dwdma0 5 0 0>; dma-names = "tx", "rx"; };
arch/arm/boot/dts/spear600.dtsi +1 -0
@@ -194,6 +194,7 @@ rtc: rtc@fc900000 { compatible = "st,spear600-rtc"; reg = <0xfc900000 0x1000>; + interrupt-parent = <&vic0>; interrupts = <10>; status = "disabled"; };
arch/arm/boot/dts/ste-nomadik-stn8815.dtsi +1 -0
@@ -750,6 +750,7 @@ reg = <0x10120000 0x1000>; interrupt-names = "combined"; interrupts = <14>; + interrupt-parent = <&vica>; clocks = <&clcdclk>, <&hclkclcd>; clock-names = "clcdclk", "apb_pclk"; status = "disabled";
arch/arm/boot/dts/stih407.dtsi +2 -1
@@ -8,6 +8,7 @@ */ #include "stih407-clock.dtsi" #include "stih407-family.dtsi" +#include <dt-bindings/gpio/gpio.h> / { soc { sti-display-subsystem {
@@ -122,7 +123,7 @@ <&clk_s_d2_quadfs 0>, <&clk_s_d2_quadfs 1>; - hdmi,hpd-gpio = <&pio5 3>; + hdmi,hpd-gpio = <&pio5 3 GPIO_ACTIVE_LOW>; reset-names = "hdmi"; resets = <&softreset STIH407_HDMI_TX_PHY_SOFTRESET>; ddc = <&hdmiddc>;
arch/arm/boot/dts/stih410.dtsi +2 -1
@@ -9,6 +9,7 @@ #include "stih410-clock.dtsi" #include "stih407-family.dtsi" #include "stih410-pinctrl.dtsi" +#include <dt-bindings/gpio/gpio.h> / { aliases { bdisp0 = &bdisp0;
@@ -213,7 +214,7 @@ <&clk_s_d2_quadfs 0>, <&clk_s_d2_quadfs 1>; - hdmi,hpd-gpio = <&pio5 3>; + hdmi,hpd-gpio = <&pio5 3 GPIO_ACTIVE_LOW>; reset-names = "hdmi"; resets = <&softreset STIH407_HDMI_TX_PHY_SOFTRESET>; ddc = <&hdmiddc>;
arch/arm/include/asm/dma-iommu.h +0 -1
@@ -7,7 +7,6 @@#include <linux/mm_types.h> #include <linux/scatterlist.h> #include <linux/dma-debug.h> -#include <linux/kmemcheck.h> #include <linux/kref.h> #define ARM_MAPPING_ERROR (~(dma_addr_t)0x0)
arch/arm/include/asm/pgalloc.h +1 -1
@@ -57,7 +57,7 @@ static inline void pud_populate(struct mm_struct *mm, pud_t *pud, pmd_t *pmd)extern pgd_t *pgd_alloc (struct mm_struct *mm);extern void pgd_free (struct mm_struct *mm,pgd_t *pgd); -#define PGALLOC_GFP (GFP_KERNEL | __GFP_NOTRACK | __GFP_ZERO) +#define PGALLOC_GFP (GFP_KERNEL | __GFP_ZERO)static inline void clean_pte_table (pte_t *pte) {
arch/arm/mach-pxa/tosa-bt.c +4 -0
@@ -132,3 +132,7 @@ static struct platform_driver tosa_bt_driver = { }, };module_platform_driver (tosa_bt_driver); + +MODULE_LICENSE ("GPL" ); +MODULE_AUTHOR ("Dmitry Baryshkov" ); +MODULE_DESCRIPTION ("Bluetooth built-in chip control" );
arch/arm64/boot/dts/qcom/msm8916.dtsi +3 -2
@@ -901,6 +901,7 @@ "dsi_phy_regulator"; #clock-cells = <1>; + #phy-cells = <0>; clocks = <&gcc GCC_MDSS_AHB_CLK>; clock-names = "iface_clk";
@@ -1430,8 +1431,8 @@ #address-cells = <1>; #size-cells = <0>; - qcom,ipc-1 = <&apcs 0 13>; - qcom,ipc-6 = <&apcs 0 19>; + qcom,ipc-1 = <&apcs 8 13>; + qcom,ipc-3 = <&apcs 8 19>; apps_smsm: apps@0 { reg = <0>;
arch/arm64/include/asm/pgalloc.h +1 -1
@@ -26,7 +26,7 @@#define check_pgt_cache () do { } while (0) -#define PGALLOC_GFP (GFP_KERNEL | __GFP_NOTRACK | __GFP_ZERO) +#define PGALLOC_GFP (GFP_KERNEL | __GFP_ZERO)#define PGD_SIZE (PTRS_PER_PGD * sizeof(pgd_t))#if CONFIG_PGTABLE_LEVELS >2
arch/arm64/kernel/cpu_errata.c +9 -0
@@ -406,6 +406,15 @@ const struct arm64_cpu_capabilities arm64_errata[] = { .capability = ARM64_HARDEN_BP_POST_GUEST_EXIT, MIDR_ALL_VERSIONS(MIDR_QCOM_FALKOR_V1), }, + { + .capability = ARM64_HARDEN_BRANCH_PREDICTOR, +MIDR_ALL_VERSIONS (MIDR_QCOM_FALKOR ), + .enable = qcom_enable_link_stack_sanitization, + }, + { + .capability =ARM64_HARDEN_BP_POST_GUEST_EXIT , + MIDR_ALL_VERSIONS(MIDR_QCOM_FALKOR), + }, { .capability =ARM64_HARDEN_BRANCH_PREDICTOR , MIDR_ALL_VERSIONS(MIDR_BRCM_VULCAN),
arch/arm64/kvm/hyp/switch.c +3 -1
@@ -371,8 +371,10 @@ int __hyp_text __kvm_vcpu_run(struct kvm_vcpu *vcpu)u32 midr =read_cpuid_id ();/* Apply BTAC predictors mitigation to all Falkor chips */ -if ((midr &MIDR_CPU_MODEL_MASK ) ==MIDR_QCOM_FALKOR_V1 ) +if (((midr &MIDR_CPU_MODEL_MASK ) ==MIDR_QCOM_FALKOR ) || + ((midr &MIDR_CPU_MODEL_MASK ) ==MIDR_QCOM_FALKOR_V1 )) {__qcom_hyp_sanitize_btac_predictors (); + } } fp_enabled =__fpsimd_enabled ();
arch/arm64/mm/proc.S +9 -5
@@ -190,7 +190,8 @@ ENDPROC(idmap_cpu_replace_ttbr1) dc cvac, cur_\()\type\()p // Ensure any existing dirty dmb sy // lines are written back before ldr \type, [cur_\()\type\()p] // loading the entry - tbz \type, #0, next_\()\type // Skip invalid entries + tbz \type, #0, skip_\()\type // Skip invalid and + tbnz \type, #11, skip_\()\type // non-global entries .endm .macro __idmap_kpti_put_pgtable_ent_ng, type
@@ -249,8 +250,9 @@ ENTRY(idmap_kpti_install_ng_mappings) add end_pgdp, cur_pgdp, #(PTRS_PER_PGD * 8) do_pgd: __idmap_kpti_get_pgtable_ent pgd tbnz pgd, #1, walk_puds - __idmap_kpti_put_pgtable_ent_ng pgd next_pgd: + __idmap_kpti_put_pgtable_ent_ng pgd +skip_pgd: add cur_pgdp, cur_pgdp, #8 cmp cur_pgdp, end_pgdp b.ne do_pgd
@@ -278,8 +280,9 @@ walk_puds: add end_pudp, cur_pudp, #(PTRS_PER_PUD * 8) do_pud: __idmap_kpti_get_pgtable_ent pud tbnz pud, #1, walk_pmds - __idmap_kpti_put_pgtable_ent_ng pud next_pud: + __idmap_kpti_put_pgtable_ent_ng pud +skip_pud: add cur_pudp, cur_pudp, 8 cmp cur_pudp, end_pudp b.ne do_pud
@@ -298,8 +301,9 @@ walk_pmds: add end_pmdp, cur_pmdp, #(PTRS_PER_PMD * 8) do_pmd: __idmap_kpti_get_pgtable_ent pmd tbnz pmd, #1, walk_ptes - __idmap_kpti_put_pgtable_ent_ng pmd next_pmd: + __idmap_kpti_put_pgtable_ent_ng pmd +skip_pmd: add cur_pmdp, cur_pmdp, #8 cmp cur_pmdp, end_pmdp b.ne do_pmd
@@ -317,7 +321,7 @@ walk_ptes: add end_ptep, cur_ptep, #(PTRS_PER_PTE * 8) do_pte: __idmap_kpti_get_pgtable_ent pte __idmap_kpti_put_pgtable_ent_ng pte -next_pte: +skip_pte: add cur_ptep, cur_ptep, #8 cmp cur_ptep, end_ptep b.ne do_pte
arch/mips/Kconfig +6 -6
@@ -119,12 +119,12 @@ config MIPS_GENERIC select SYS_SUPPORTS_MULTITHREADING select SYS_SUPPORTS_RELOCATABLE select SYS_SUPPORTS_SMARTMIPS - select USB_EHCI_BIG_ENDIAN_DESC if BIG_ENDIAN - select USB_EHCI_BIG_ENDIAN_MMIO if BIG_ENDIAN - select USB_OHCI_BIG_ENDIAN_DESC if BIG_ENDIAN - select USB_OHCI_BIG_ENDIAN_MMIO if BIG_ENDIAN - select USB_UHCI_BIG_ENDIAN_DESC if BIG_ENDIAN - select USB_UHCI_BIG_ENDIAN_MMIO if BIG_ENDIAN + select USB_EHCI_BIG_ENDIAN_DESC if CPU_BIG_ENDIAN + select USB_EHCI_BIG_ENDIAN_MMIO if CPU_BIG_ENDIAN + select USB_OHCI_BIG_ENDIAN_DESC if CPU_BIG_ENDIAN + select USB_OHCI_BIG_ENDIAN_MMIO if CPU_BIG_ENDIAN + select USB_UHCI_BIG_ENDIAN_DESC if CPU_BIG_ENDIAN + select USB_UHCI_BIG_ENDIAN_MMIO if CPU_BIG_ENDIAN select USE_OF help Select this to build a kernel which aims to support multiple boards,
arch/mips/kernel/setup.c +12 -4
@@ -374,6 +374,7 @@ static void __init bootmem_init(void)unsigned long reserved_end;unsigned long mapstart = ~0UL ;unsigned long bootmap_size; +phys_addr_t ramstart = (phys_addr_t )ULLONG_MAX ;bool bootmap_valid = false;int i;
@@ -394,7 +395,8 @@ static void __init bootmem_init(void) max_low_pfn =0 ;/* -* Find the highest page frame number we have available. +* Find the highest page frame number we have available +* and the lowest used RAM address */ for (i =0 ; i < boot_mem_map.nr_map; i++) {unsigned long start, end;
@@ -406,6 +408,8 @@ static void __init bootmem_init(void) end =PFN_DOWN (boot_mem_map.map[i].addr + boot_mem_map.map[i].size); + ramstart =min (ramstart, boot_mem_map.map[i].addr); +#ifndef CONFIG_HIGHMEM /* * Skip highmem here so we get an accurate max_low_pfn if low
@@ -435,6 +439,13 @@ static void __init bootmem_init(void) mapstart =max (reserved_end, start); } +/* +* Reserve any memory between the start of RAM and PHYS_OFFSET +*/ +if (ramstart >PHYS_OFFSET ) +add_memory_region (PHYS_OFFSET , ramstart -PHYS_OFFSET , +BOOT_MEM_RESERVED ); +if (min_low_pfn >= max_low_pfn)panic ("Incorrect memory mapping !!!" );if (min_low_pfn >ARCH_PFN_OFFSET ) {
@@ -663,9 +674,6 @@ static int __init early_parse_mem(char *p)add_memory_region (start, size,BOOT_MEM_RAM ); -if (start && start >PHYS_OFFSET ) -add_memory_region (PHYS_OFFSET , start -PHYS_OFFSET , -BOOT_MEM_RESERVED );return 0 ; }early_param ("mem" , early_parse_mem);
arch/openrisc/include/asm/dma-mapping.h +0 -1
@@ -23,7 +23,6 @@*/ #include <linux/dma-debug.h> -#include <linux/kmemcheck.h> #include <linux/dma-mapping.h> extern const struct dma_map_ops or1k_dma_map_ops;
arch/powerpc/include/asm/pgalloc.h +1 -1
@@ -18,7 +18,7 @@ static inline gfp_t pgtable_gfp_flags(struct mm_struct *mm, gfp_t gfp) }#endif /* MODULE */ -#define PGALLOC_GFP (GFP_KERNEL | __GFP_NOTRACK | __GFP_ZERO) +#define PGALLOC_GFP (GFP_KERNEL | __GFP_ZERO)#ifdef CONFIG_PPC_BOOK3S #include <asm/book3s/pgalloc.h>
arch/powerpc/include/asm/topology.h +5 -0
@@ -44,6 +44,11 @@ extern int sysfs_add_device_to_node(struct device *dev, int nid);extern void sysfs_remove_device_from_node (struct device *dev,int nid);extern int numa_update_cpu_topology (bool cpus_locked); +static inline void update_numa_cpu_lookup_table (unsigned int cpu,int node) +{ + numa_cpu_lookup_table[cpu] = node; +} +static inline int early_cpu_to_node (int cpu) {int nid;
arch/powerpc/kernel/exceptions-64s.S +1 -1
@@ -1617,7 +1617,7 @@ USE_TEXT_SECTION() .balign IFETCH_ALIGN_BYTES do_hash_page: #ifdef CONFIG_PPC_STD_MMU_64 - lis r0,DSISR_BAD_FAULT_64S@h + lis r0,(DSISR_BAD_FAULT_64S|DSISR_DABRMATCH)@h ori r0,r0,DSISR_BAD_FAULT_64S@l and. r0,r4,r0 /* weird error? */ bne- handle_page_fault /* if not, try to insert a HPTE */
arch/powerpc/kernel/head_32.S +1 -1
@@ -388,7 +388,7 @@ DataAccess: EXCEPTION_PROLOG mfspr r10,SPRN_DSISR stw r10,_DSISR(r11) - andis. r0,r10,DSISR_BAD_FAULT_32S@h + andis. r0,r10,(DSISR_BAD_FAULT_32S|DSISR_DABRMATCH)@h bne 1f /* if not, try to put a PTE */ mfspr r4,SPRN_DAR /* into the hash table */ rlwinm r3,r10,32-15,21,21 /* DSISR_STORE -> _PAGE_RW */
arch/powerpc/mm/numa.c +0 -5
@@ -142,11 +142,6 @@ static void reset_numa_cpu_lookup_table(void) numa_cpu_lookup_table[cpu] =-1 ; } -static void update_numa_cpu_lookup_table (unsigned int cpu,int node) -{ - numa_cpu_lookup_table[cpu] = node; -} -static void map_cpu_to_node (int cpu,int node) {update_numa_cpu_lookup_table (cpu, node);
arch/powerpc/mm/pgtable-radix.c +74 -21
131 lines not on this page · raw message
arch/powerpc/mm/pgtable_64.c +2 -0
@@ -483,6 +483,8 @@ void mmu_partition_table_set_entry(unsigned int lpid, unsigned long dw0,if (old &PATB_HR ) { asm volatile(PPC_TLBIE_5(%0,%1,2,0,1) : : "r" (TLBIEL_INVAL_SET_LPID), "r" (lpid)); + asm volatile(PPC_TLBIE_5(%0,%1,2,1,1) : : + "r" (TLBIEL_INVAL_SET_LPID), "r" (lpid));trace_tlbie (lpid,0 ,TLBIEL_INVAL_SET_LPID , lpid,2 ,0 ,1 ); }else { asm volatile(PPC_TLBIE_5(%0,%1,2,0,0) : :
arch/powerpc/mm/tlb-radix.c +0 -2
@@ -453,14 +453,12 @@ void radix__flush_tlb_all(void)*/ asm volatile(PPC_TLBIE_5(%0, %4, %3, %2, %1) : : "r"(rb), "i"(r), "i"(1), "i"(ric), "r"(rs) : "memory"); - trace_tlbie(0 ,0 , rb, rs, ric, prs, r);/* * now flush host entires by passing PRS = 0 and LPID == 0 */ asm volatile(PPC_TLBIE_5(%0, %4, %3, %2, %1) : : "r"(rb), "i"(r), "i"(prs), "i"(ric), "r"(0) : "memory"); asmvolatile ("eieio; tlbsync; ptesync" : : :"memory" ); -trace_tlbie (0 ,0 , rb,0 , ric, prs, r); } void radix__flush_tlb_pte_p9_dd1(unsigned long old_pte, struct mm_struct *mm,
arch/powerpc/platforms/pseries/hotplug-cpu.c +2 -0
@@ -36,6 +36,7 @@#include <asm/xics.h> #include <asm/xive.h> #include <asm/plpar_wrappers.h> +#include <asm/topology.h> #include "pseries.h" #include "offline_states.h"
@@ -331,6 +332,7 @@ static void pseries_remove_processor(struct device_node *np)BUG_ON (cpu_online (cpu));set_cpu_present (cpu, false);set_hard_smp_processor_id (cpu,-1 ); +update_numa_cpu_lookup_table (cpu,-1 );break ; }if (cpu >= nr_cpu_ids)
arch/powerpc/sysdev/xive/spapr.c +10 -6
@@ -356,7 +356,8 @@ static int xive_spapr_configure_queue(u32 target, struct xive_q *q, u8 prio, rc =plpar_int_get_queue_info (0 , target, prio, &esn_page, &esn_size);if (rc) { -pr_err ("Error %lld getting queue info prio %d\n" , rc, prio); +pr_err ("Error %lld getting queue info CPU %d prio %d\n" , rc, + target, prio); rc = -EIO ; goto fail; }
@@ -370,7 +371,8 @@ static int xive_spapr_configure_queue(u32 target, struct xive_q *q, u8 prio,/* Configure and enable the queue in HW */ rc =plpar_int_set_queue_config (flags, target, prio, qpage_phys, order);if (rc) { -pr_err ("Error %lld setting queue for prio %d\n" , rc, prio); +pr_err ("Error %lld setting queue for CPU %d prio %d\n" , rc, + target, prio); rc = -EIO ; }else { q->qpage = qpage;
@@ -389,8 +391,8 @@ static int xive_spapr_setup_queue(unsigned int cpu, struct xive_cpu *xc,if (IS_ERR (qpage))return PTR_ERR (qpage); -return xive_spapr_configure_queue (cpu, q, prio, qpage, - xive_queue_shift); +return xive_spapr_configure_queue (get_hard_smp_processor_id (cpu), + q, prio, qpage, xive_queue_shift); } static void xive_spapr_cleanup_queue(unsigned int cpu, struct xive_cpu *xc,
@@ -399,10 +401,12 @@ static void xive_spapr_cleanup_queue(unsigned int cpu, struct xive_cpu *xc,struct xive_q *q = &xc->queue[prio];unsigned int alloc_order;long rc; +int hw_cpu =get_hard_smp_processor_id (cpu); - rc =plpar_int_set_queue_config (0 , cpu, prio,0 ,0 ); + rc =plpar_int_set_queue_config (0 , hw_cpu, prio,0 ,0 );if (rc) -pr_err ("Error %ld setting queue for prio %d\n" , rc, prio); +pr_err ("Error %ld setting queue for CPU %d prio %d\n" , rc, + hw_cpu, prio); alloc_order =xive_alloc_order (xive_queue_shift);free_pages ((unsigned long )q->qpage, alloc_order);
arch/s390/kernel/compat_linux.c +4 -4
@@ -110,7 +110,7 @@ COMPAT_SYSCALL_DEFINE2(s390_setregid16, u16, rgid, u16, egid) COMPAT_SYSCALL_DEFINE1(s390_setgid16, u16, gid) { -return sys_setgid ((gid_t )gid); +return sys_setgid (low2highgid (gid)); }COMPAT_SYSCALL_DEFINE2 (s390_setreuid16, u16, ruid, u16, euid)
@@ -120,7 +120,7 @@ COMPAT_SYSCALL_DEFINE2(s390_setreuid16, u16, ruid, u16, euid) COMPAT_SYSCALL_DEFINE1(s390_setuid16, u16, uid) { -return sys_setuid ((uid_t )uid); +return sys_setuid (low2highuid (uid)); }COMPAT_SYSCALL_DEFINE3 (s390_setresuid16, u16, ruid, u16, euid, u16, suid)
@@ -173,12 +173,12 @@ COMPAT_SYSCALL_DEFINE3(s390_getresgid16, u16 __user *, rgidp, COMPAT_SYSCALL_DEFINE1(s390_setfsuid16, u16, uid) { -return sys_setfsuid ((uid_t )uid); +return sys_setfsuid (low2highuid (uid)); } COMPAT_SYSCALL_DEFINE1(s390_setfsgid16, u16, gid) { -return sys_setfsgid ((gid_t )gid); +return sys_setfsgid (low2highgid (gid)); }static int groups16_to_user (u16 __user *grouplist,struct group_info *group_info)
arch/sh/kernel/dwarf.c +2 -2
@@ -1172,11 +1172,11 @@ static int __init dwarf_unwinder_init(void) dwarf_frame_cachep =kmem_cache_create ("dwarf_frames" ,sizeof (struct dwarf_frame ),0 , -SLAB_PANIC |SLAB_HWCACHE_ALIGN |SLAB_NOTRACK ,NULL ); +SLAB_PANIC |SLAB_HWCACHE_ALIGN ,NULL ); dwarf_reg_cachep =kmem_cache_create ("dwarf_regs" ,sizeof (struct dwarf_reg ),0 , -SLAB_PANIC |SLAB_HWCACHE_ALIGN |SLAB_NOTRACK ,NULL ); +SLAB_PANIC |SLAB_HWCACHE_ALIGN ,NULL ); dwarf_frame_pool =mempool_create_slab_pool (DWARF_FRAME_MIN_REQ , dwarf_frame_cachep);
arch/sh/kernel/process.c +1 -1
@@ -59,7 +59,7 @@ void arch_task_cache_init(void) task_xstate_cachep =kmem_cache_create ("task_xstate" , xstate_size, __alignof__(union thread_xstate ), -SLAB_PANIC |SLAB_NOTRACK ,NULL ); +SLAB_PANIC ,NULL ); }#ifdef CONFIG_SH_FPU_EMU
arch/sparc/mm/init_64.c +2 -2
@@ -2934,7 +2934,7 @@ void __flush_tlb_all(void)pte_t *pte_alloc_one_kernel (struct mm_struct *mm,unsigned long address) { -struct page *page =alloc_page (GFP_KERNEL | __GFP_NOTRACK | __GFP_ZERO); +struct page *page =alloc_page (GFP_KERNEL | __GFP_ZERO);pte_t *pte =NULL ;if (page)
@@ -2946,7 +2946,7 @@ pte_t *pte_alloc_one_kernel(struct mm_struct *mm,pgtable_t pte_alloc_one (struct mm_struct *mm,unsigned long address) { -struct page *page =alloc_page (GFP_KERNEL | __GFP_NOTRACK | __GFP_ZERO); +struct page *page =alloc_page (GFP_KERNEL | __GFP_ZERO);if (!page)return NULL ;if (!pgtable_page_ctor (page)) {
arch/unicore32/include/asm/pgalloc.h +1 -1
@@ -28,7 +28,7 @@ extern void free_pgd_slow(struct mm_struct *mm, pgd_t *pgd);#define pgd_alloc (mm) get_pgd_slow(mm)#define pgd_free (mm, pgd) free_pgd_slow(mm, pgd) -#define PGALLOC_GFP (GFP_KERNEL | __GFP_NOTRACK | __GFP_ZERO) +#define PGALLOC_GFP (GFP_KERNEL | __GFP_ZERO)/* * Allocate one PTE table.
arch/x86/Kconfig +1 -2
@@ -111,7 +111,6 @@ config X86 select HAVE_ARCH_JUMP_LABEL select HAVE_ARCH_KASAN if X86_64 select HAVE_ARCH_KGDB - select HAVE_ARCH_KMEMCHECK select HAVE_ARCH_MMAP_RND_BITS if MMU select HAVE_ARCH_MMAP_RND_COMPAT_BITS if MMU && COMPAT select HAVE_ARCH_COMPAT_MMAP_BASES if MMU && COMPAT
@@ -1443,7 +1442,7 @@ config ARCH_DMA_ADDR_T_64BIT config X86_DIRECT_GBPAGES def_bool y - depends on X86_64 && !DEBUG_PAGEALLOC && !KMEMCHECK + depends on X86_64 && !DEBUG_PAGEALLOC ---help--- Certain kernel features effectively disable kernel linear 1 GB mappings (even if the CPU otherwise
arch/x86/Makefile +0 -5
@@ -158,11 +158,6 @@ ifdef CONFIG_X86_X32 endif export CONFIG_X86_X32_ABI -# Don't unroll struct assignments with kmemcheck enabled -ifeq ($(CONFIG_KMEMCHECK),y) - KBUILD_CFLAGS += $(call cc-option,-fno-builtin-memcpy) -endif - # # If the function graph tracer is used with mcount instead of fentry, # '-maccumulate-outgoing-args' is needed to prevent a GCC bug
arch/x86/entry/calling.h +48 -59
135 lines not on this page · raw message
arch/x86/entry/entry_64.S +19 -73
185 lines not on this page · raw message
arch/x86/entry/entry_64_compat.S +30 -0
@@ -85,15 +85,25 @@ ENTRY(entry_SYSENTER_compat) pushq %rcx /* pt_regs->cx */ pushq $-ENOSYS /* pt_regs->ax */ pushq $0 /* pt_regs->r8 = 0 */ + xorq %r8, %r8 /* nospec r8 */ pushq $0 /* pt_regs->r9 = 0 */ + xorq %r9, %r9 /* nospec r9 */ pushq $0 /* pt_regs->r10 = 0 */ + xorq %r10, %r10 /* nospec r10 */ pushq $0 /* pt_regs->r11 = 0 */ + xorq %r11, %r11 /* nospec r11 */ pushq %rbx /* pt_regs->rbx */ + xorl %ebx, %ebx /* nospec rbx */ pushq %rbp /* pt_regs->rbp (will be overwritten) */ + xorl %ebp, %ebp /* nospec rbp */ pushq $0 /* pt_regs->r12 = 0 */ + xorq %r12, %r12 /* nospec r12 */ pushq $0 /* pt_regs->r13 = 0 */ + xorq %r13, %r13 /* nospec r13 */ pushq $0 /* pt_regs->r14 = 0 */ + xorq %r14, %r14 /* nospec r14 */ pushq $0 /* pt_regs->r15 = 0 */ + xorq %r15, %r15 /* nospec r15 */ cld /*
@@ -214,15 +224,25 @@ GLOBAL(entry_SYSCALL_compat_after_hwframe) pushq %rbp /* pt_regs->cx (stashed in bp) */ pushq $-ENOSYS /* pt_regs->ax */ pushq $0 /* pt_regs->r8 = 0 */ + xorq %r8, %r8 /* nospec r8 */ pushq $0 /* pt_regs->r9 = 0 */ + xorq %r9, %r9 /* nospec r9 */ pushq $0 /* pt_regs->r10 = 0 */ + xorq %r10, %r10 /* nospec r10 */ pushq $0 /* pt_regs->r11 = 0 */ + xorq %r11, %r11 /* nospec r11 */ pushq %rbx /* pt_regs->rbx */ + xorl %ebx, %ebx /* nospec rbx */ pushq %rbp /* pt_regs->rbp (will be overwritten) */ + xorl %ebp, %ebp /* nospec rbp */ pushq $0 /* pt_regs->r12 = 0 */ + xorq %r12, %r12 /* nospec r12 */ pushq $0 /* pt_regs->r13 = 0 */ + xorq %r13, %r13 /* nospec r13 */ pushq $0 /* pt_regs->r14 = 0 */ + xorq %r14, %r14 /* nospec r14 */ pushq $0 /* pt_regs->r15 = 0 */ + xorq %r15, %r15 /* nospec r15 */ /* * User mode is traced as though IRQs are on, and SYSENTER
@@ -338,15 +358,25 @@ ENTRY(entry_INT80_compat) pushq %rcx /* pt_regs->cx */ pushq $-ENOSYS /* pt_regs->ax */ pushq $0 /* pt_regs->r8 = 0 */ + xorq %r8, %r8 /* nospec r8 */ pushq $0 /* pt_regs->r9 = 0 */ + xorq %r9, %r9 /* nospec r9 */ pushq $0 /* pt_regs->r10 = 0 */ + xorq %r10, %r10 /* nospec r10 */ pushq $0 /* pt_regs->r11 = 0 */ + xorq %r11, %r11 /* nospec r11 */ pushq %rbx /* pt_regs->rbx */ + xorl %ebx, %ebx /* nospec rbx */ pushq %rbp /* pt_regs->rbp */ + xorl %ebp, %ebp /* nospec rbp */ pushq %r12 /* pt_regs->r12 */ + xorq %r12, %r12 /* nospec r12 */ pushq %r13 /* pt_regs->r13 */ + xorq %r13, %r13 /* nospec r13 */ pushq %r14 /* pt_regs->r14 */ + xorq %r14, %r14 /* nospec r14 */ pushq %r15 /* pt_regs->r15 */ + xorq %r15, %r15 /* nospec r15 */ cld /*
arch/x86/events/intel/core.c +1 -1
@@ -3559,7 +3559,7 @@ static int intel_snb_pebs_broken(int cpu)break ;case INTEL_FAM6_SANDYBRIDGE_X : -switch (cpu_data (cpu).x86_mask) { +switch (cpu_data (cpu).x86_stepping) {case 6 : rev =0x618 ;break ;case 7 : rev =0x70c ;break ; }
arch/x86/events/intel/lbr.c +1 -1
@@ -1186,7 +1186,7 @@ void __init intel_pmu_lbr_init_atom(void)* on PMU interrupt */ if (boot_cpu_data.x86_model ==28 - && boot_cpu_data.x86_mask <10 ) { + && boot_cpu_data.x86_stepping <10 ) {pr_cont ("LBR disabled due to erratum" );return ; }
arch/x86/events/intel/p6.c +1 -1
@@ -234,7 +234,7 @@ static __initconst const struct x86_pmu p6_pmu = {static __init void p6_pmu_rdpmc_quirk (void ) { -if (boot_cpu_data.x86_mask <9 ) { +if (boot_cpu_data.x86_stepping <9 ) {/* * PPro erratum 26; fixed in stepping 9 and above. */
arch/x86/include/asm/acpi.h +1 -1
@@ -94,7 +94,7 @@ static inline unsigned int acpi_processor_cstate_check(unsigned int max_cstate)if (boot_cpu_data.x86 ==0x0F && boot_cpu_data.x86_vendor ==X86_VENDOR_AMD && boot_cpu_data.x86_model <=0x05 && - boot_cpu_data.x86_mask <0x0A ) + boot_cpu_data.x86_stepping <0x0A )return 1 ;else if (boot_cpu_has (X86_BUG_AMD_APIC_C1E ))return 1 ;
arch/x86/include/asm/barrier.h +1 -1
@@ -40,7 +40,7 @@ static inline unsigned long array_index_mask_nospec(unsigned long index, asm ("cmp %1,%2; sbb %0,%0;" :"=r" (mask) - :"r" (size),"r" (index) + :"g" (size),"r" (index) :"cc" );return mask; }
arch/x86/include/asm/bug.h +10 -9
@@ -5,23 +5,20 @@#include <linux/stringify.h> /* -* Since some emulators terminate on UD2, we cannot use it for WARN. -* Since various instruction decoders disagree on the length of UD1, -* we cannot use it either. So use UD0 for WARN. +* Despite that some emulators terminate on UD2, we use it for WARN(). * -* (binutils knows about "ud1" but {en,de}codes it as 2 bytes, whereas -* our kernel decoder thinks it takes a ModRM byte, which seems consistent -* with various things like the Intel SDM instruction encoding rules) +* Since various instruction decoders/specs disagree on the encoding of +* UD0/UD1. */ -#define ASM_UD0 ".byte 0x0f, 0xff" +#define ASM_UD0 ".byte 0x0f, 0xff"/* + ModRM (for Intel) */ #define ASM_UD1 ".byte 0x0f, 0xb9"/* + ModRM */ #define ASM_UD2 ".byte 0x0f, 0x0b"#define INSN_UD0 0xff0f#define INSN_UD2 0x0b0f -#define LEN_UD0 2 +#define LEN_UD2 2#ifdef CONFIG_GENERIC_BUG
@@ -77,7 +74,11 @@ do { \unreachable (); \ } while (0) -#define __WARN_FLAGS (flags) _BUG_FLAGS(ASM_UD0, BUGFLAG_WARNING|(flags)) +#define __WARN_FLAGS (flags) \ +do { \ + _BUG_FLAGS(ASM_UD2, BUGFLAG_WARNING|(flags)); \ + annotate_reachable(); \ +} while (0)#include <asm-generic/bug.h>
arch/x86/include/asm/dma-mapping.h +0 -1
@@ -7,7 +7,6 @@* Documentation/DMA-API.txt for documentation. */ -#include <linux/kmemcheck.h> #include <linux/scatterlist.h> #include <linux/dma-debug.h> #include <asm/io.h>
arch/x86/include/asm/kmemcheck.h deleted +0 -43
43 lines not on this page · raw message
arch/x86/include/asm/nospec-branch.h +10 -4
@@ -6,6 +6,7 @@#include <asm/alternative.h> #include <asm/alternative-asm.h> #include <asm/cpufeatures.h> +#include <asm/msr-index.h> #ifdef __ASSEMBLY__
@@ -164,10 +165,15 @@ static inline void vmexit_fill_RSB(void)static inline void indirect_branch_prediction_barrier (void ) { -alternative_input ("" , -"call __ibp_barrier" , -X86_FEATURE_USE_IBPB , -ASM_NO_INPUT_CLOBBER ("eax" ,"ecx" ,"edx" ,"memory" )); + asm volatile(ALTERNATIVE("", + "movl %[msr], %%ecx\n\t" + "movl %[val], %%eax\n\t" + "movl $0, %%edx\n\t" + "wrmsr", + X86_FEATURE_USE_IBPB) + : : [msr] "i" (MSR_IA32_PRED_CMD), + [val] "i" (PRED_CMD_IBPB) + : "eax", "ecx", "edx", "memory"); }#endif /* __ASSEMBLY__ */
arch/x86/include/asm/page_64.h +0 -4
@@ -52,10 +52,6 @@ static inline void clear_page(void *page)void copy_page (void *to,void *from); -#ifdef CONFIG_X86_MCE -#define arch_unmap_kpfn arch_unmap_kpfn -#endif -#endif /* !__ASSEMBLY__ */ #ifdef CONFIG_X86_VSYSCALL_EMULATION
arch/x86/include/asm/paravirt.h +2 -2
@@ -297,9 +297,9 @@ static inline void __flush_tlb_global(void) {PVOP_VCALL0 (pv_mmu_ops.flush_tlb_kernel); } -static inline void __flush_tlb_single (unsigned long addr) +static inline void __flush_tlb_one_user (unsigned long addr) { -PVOP_VCALL1 (pv_mmu_ops.flush_tlb_single, addr); +PVOP_VCALL1 (pv_mmu_ops.flush_tlb_one_user, addr); } static inline void flush_tlb_others(const struct cpumask *cpumask,
arch/x86/include/asm/paravirt_types.h +1 -1
@@ -217,7 +217,7 @@ struct pv_mmu_ops {/* TLB operations */ void (*flush_tlb_user)(void );void (*flush_tlb_kernel)(void ); -void (*flush_tlb_single)(unsigned long addr); +void (*flush_tlb_one_user)(unsigned long addr);void (*flush_tlb_others)(const struct cpumask *cpus,const struct flush_tlb_info *info);
arch/x86/include/asm/pgtable.h +0 -5
@@ -668,11 +668,6 @@ static inline bool pte_accessible(struct mm_struct *mm, pte_t a)return false; } -static inline int pte_hidden (pte_t pte) -{ -return pte_flags (pte) & _PAGE_HIDDEN; -} -static inline int pmd_present (pmd_t pmd) {/*
arch/x86/include/asm/pgtable_32.h +1 -1
@@ -61,7 +61,7 @@ void paging_init(void);#define kpte_clear_flush (ptep, vaddr) \ do { \ pte_clear(&init_mm, (vaddr), (ptep)); \ - __flush_tlb_one((vaddr)); \ + __flush_tlb_one_kernel((vaddr)); \ } while (0)#endif /* !__ASSEMBLY__ */
arch/x86/include/asm/pgtable_types.h +0 -13
@@ -32,7 +32,6 @@#define _PAGE_BIT_SPECIAL _PAGE_BIT_SOFTW1#define _PAGE_BIT_CPA_TEST _PAGE_BIT_SOFTW1 -#define _PAGE_BIT_HIDDEN _PAGE_BIT_SOFTW3/* hidden by kmemcheck */ #define _PAGE_BIT_SOFT_DIRTY _PAGE_BIT_SOFTW3/* software dirty tracking */ #define _PAGE_BIT_DEVMAP _PAGE_BIT_SOFTW4
@@ -79,18 +78,6 @@#define _PAGE_KNL_ERRATUM_MASK 0#endif -#ifdef CONFIG_KMEMCHECK -#define _PAGE_HIDDEN (_AT(pteval_t, 1) << _PAGE_BIT_HIDDEN) -#else -#define _PAGE_HIDDEN (_AT(pteval_t, 0)) -#endif - -/* -* The same hidden bit is used by kmemcheck, but since kmemcheck -* works on kernel pages while soft-dirty engine on user space, -* they do not conflict with each other. -*/ -#ifdef CONFIG_MEM_SOFT_DIRTY #define _PAGE_SOFT_DIRTY (_AT(pteval_t, 1) << _PAGE_BIT_SOFT_DIRTY)#else
arch/x86/include/asm/processor.h +2 -5
@@ -91,7 +91,7 @@ struct cpuinfo_x86 {__u8 x86;/* CPU family */ __u8 x86_vendor;/* CPU vendor */ __u8 x86_model; -__u8 x86_mask; +__u8 x86_stepping;#ifdef CONFIG_X86_64 /* Number of 4K pages in DTLB/ITLB combined(in pages): */ int x86_tlbsize;
@@ -109,7 +109,7 @@ struct cpuinfo_x86 {char x86_vendor_id[16 ];char x86_model_id[64 ];/* in KB - valid for CPUS which support this call: */ -int x86_cache_size; +unsigned int x86_cache_size;int x86_cache_alignment;/* In bytes */ /* Cache QoS architectural values: */ int x86_cache_max_rmid;/* max index */
@@ -968,7 +968,4 @@ bool xen_set_default_idle(void);void stop_this_cpu (void *dummy);void df_debug (struct pt_regs *regs,long error_code); - -void __ibp_barrier (void ); -#endif /* _ASM_X86_PROCESSOR_H */
arch/x86/include/asm/string_32.h +0 -9
@@ -179,8 +179,6 @@ static inline void *__memcpy3d(void *to, const void *from, size_t len)* No 3D Now! */ -#ifndef CONFIG_KMEMCHECK -#if (__GNUC__ >=4 )#define memcpy (t, f, n) __builtin_memcpy(t, f, n)#else
@@ -189,13 +187,6 @@ static inline void *__memcpy3d(void *to, const void *from, size_t len) ? __constant_memcpy((t), (f), (n)) \ : __memcpy((t), (f), (n)))#endif -#else -/* -* kmemcheck becomes very happy if we use the REP instructions unconditionally, -* because it means that we know both memory operands in advance. -*/ -#define memcpy (t, f, n) __memcpy((t), (f), (n)) -#endif #endif #endif /* !CONFIG_FORTIFY_SOURCE */
arch/x86/include/asm/string_64.h +0 -8
@@ -33,7 +33,6 @@ extern void *memcpy(void *to, const void *from, size_t len);extern void *__memcpy (void *to,const void *from,size_t len);#ifndef CONFIG_FORTIFY_SOURCE -#ifndef CONFIG_KMEMCHECK #if (__GNUC__ ==4 && __GNUC_MINOR__ <3 ) || __GNUC__ <4 #define memcpy (dst, src, len) \ ({ \
@@ -46,13 +45,6 @@ extern void *__memcpy(void *to, const void *from, size_t len); __ret; \ })#endif -#else -/* -* kmemcheck becomes very happy if we use the REP instructions unconditionally, -* because it means that we know both memory operands in advance. -*/ -#define memcpy (dst, src, len) __inline_memcpy((dst), (src), (len)) -#endif #endif /* !CONFIG_FORTIFY_SOURCE */ #define __HAVE_ARCH_MEMSET
arch/x86/include/asm/tlbflush.h +20 -7
@@ -140,7 +140,7 @@ static inline unsigned long build_cr3_noflush(pgd_t *pgd, u16 asid)#else #define __flush_tlb () __native_flush_tlb()#define __flush_tlb_global () __native_flush_tlb_global() -#define __flush_tlb_single (addr) __native_flush_tlb_single(addr) +#define __flush_tlb_one_user (addr) __native_flush_tlb_one_user(addr)#endif static inline bool tlb_defer_switch_to_init_mm (void )
@@ -397,7 +397,7 @@ static inline void __native_flush_tlb_global(void)/* * flush one page in the user mapping */ -static inline void __native_flush_tlb_single (unsigned long addr) +static inline void __native_flush_tlb_one_user (unsigned long addr) {u32 loaded_mm_asid =this_cpu_read (cpu_tlbstate.loaded_mm_asid);
@@ -434,18 +434,31 @@ static inline void __flush_tlb_all(void)/* * flush one page in the kernel mapping */ -static inline void __flush_tlb_one (unsigned long addr) +static inline void __flush_tlb_one_kernel (unsigned long addr) {count_vm_tlb_event (NR_TLB_LOCAL_FLUSH_ONE ); -__flush_tlb_single (addr); + +/* +* If PTI is off, then __flush_tlb_one_user() is just INVLPG or its +* paravirt equivalent. Even with PCID, this is sufficient: we only +* use PCID if we also use global PTEs for the kernel mapping, and +* INVLPG flushes global translations across all address spaces. +* +* If PTI is on, then the kernel is mapped with non-global PTEs, and +* __flush_tlb_one_user() will flush the given address for the current +* kernel address space and for its usermode counterpart, but it does +* not flush it for other address spaces. +*/ +__flush_tlb_one_user (addr);if (!static_cpu_has (X86_FEATURE_PTI ))return ;/* -* __flush_tlb_single() will have cleared the TLB entry for this ASID, -* but since kernel space is replicated across all, we must also -* invalidate all others. +* See above. We need to propagate the flush to all other address +* spaces. In principle, we only need to propagate it to kernelmode +* address spaces, but the extra bookkeeping we would need is not +* worth it. */ invalidate_other_asid (); }
arch/x86/include/asm/xor.h +1 -4
@@ -1,7 +1,4 @@ -#ifdef CONFIG_KMEMCHECK -/* kmemcheck doesn't handle MMX/SSE/SSE2 instructions */ -# include <asm-generic/xor.h> -#elif !defined(_ASM_X86_XOR_H) +#ifndef _ASM_X86_XOR_H#define _ASM_X86_XOR_H/*
arch/x86/kernel/acpi/apei.c +1 -1
@@ -55,5 +55,5 @@ void arch_apei_report_mem_error(int sev, struct cper_sec_mem_err *mem_err)void arch_apei_flush_tlb_one (unsigned long addr) { -__flush_tlb_one (addr); +__flush_tlb_one_kernel (addr); }
arch/x86/kernel/amd_nb.c +1 -1
@@ -235,7 +235,7 @@ int amd_cache_northbridges(void)if (boot_cpu_data.x86 ==0x10 && boot_cpu_data.x86_model >=0x8 && (boot_cpu_data.x86_model >0x9 || - boot_cpu_data.x86_mask >=0x1 )) + boot_cpu_data.x86_stepping >=0x1 )) amd_northbridges.flags |=AMD_NB_L3_INDEX_DISABLE ;if (boot_cpu_data.x86 ==0x15 )
arch/x86/kernel/apic/apic.c +3 -3
@@ -553,7 +553,7 @@ static DEFINE_PER_CPU(struct clock_event_device, lapic_events);static u32 hsx_deadline_rev (void ) { -switch (boot_cpu_data.x86_mask) { +switch (boot_cpu_data.x86_stepping) {case 0x02 :return 0x3a ;/* EP */ case 0x04 :return 0x0f ;/* EX */ }
@@ -563,7 +563,7 @@ static u32 hsx_deadline_rev(void)static u32 bdx_deadline_rev (void ) { -switch (boot_cpu_data.x86_mask) { +switch (boot_cpu_data.x86_stepping) {case 0x02 :return 0x00000011 ;case 0x03 :return 0x0700000e ;case 0x04 :return 0x0f00000c ;
@@ -575,7 +575,7 @@ static u32 bdx_deadline_rev(void)static u32 skx_deadline_rev (void ) { -switch (boot_cpu_data.x86_mask) { +switch (boot_cpu_data.x86_stepping) {case 0x03 :return 0x01000136 ;case 0x04 :return 0x02000014 ; }
arch/x86/kernel/apm_32.c +1 -0
@@ -2389,6 +2389,7 @@ static int __init apm_init(void)if (HZ !=100 ) idle_period = (idle_period *HZ ) /100 ;if (idle_threshold <100 ) { +cpuidle_poll_state_init (&apm_idle_driver);if (!cpuidle_register_driver (&apm_idle_driver))if (cpuidle_register_device (&apm_cpuidle_device))cpuidle_unregister_driver (&apm_idle_driver);
arch/x86/kernel/asm-offsets_32.c +1 -1
@@ -18,7 +18,7 @@ void foo(void)OFFSET (CPUINFO_x86, cpuinfo_x86, x86);OFFSET (CPUINFO_x86_vendor, cpuinfo_x86, x86_vendor);OFFSET (CPUINFO_x86_model, cpuinfo_x86, x86_model); -OFFSET (CPUINFO_x86_mask, cpuinfo_x86, x86_mask); +OFFSET (CPUINFO_x86_stepping, cpuinfo_x86, x86_stepping);OFFSET (CPUINFO_cpuid_level, cpuinfo_x86, cpuid_level);OFFSET (CPUINFO_x86_capability, cpuinfo_x86, x86_capability);OFFSET (CPUINFO_x86_vendor_id, cpuinfo_x86, x86_vendor_id);
arch/x86/kernel/cpu/amd.c +14 -14
@@ -119,7 +119,7 @@ static void init_amd_k6(struct cpuinfo_x86 *c)return ; } -if (c->x86_model ==6 && c->x86_mask ==1 ) { +if (c->x86_model ==6 && c->x86_stepping ==1 ) {const int K6_BUG_LOOP =1000000 ;int n;void (*f_vide)(void );
@@ -149,7 +149,7 @@ static void init_amd_k6(struct cpuinfo_x86 *c)/* K6 with old style WHCR */ if (c->x86_model <8 || - (c->x86_model ==8 && c->x86_mask <8 )) { + (c->x86_model ==8 && c->x86_stepping <8 )) {/* We can only write allocate on the low 508Mb */ if (mbytes >508 ) mbytes =508 ;
@@ -168,7 +168,7 @@ static void init_amd_k6(struct cpuinfo_x86 *c)return ; } -if ((c->x86_model ==8 && c->x86_mask >7 ) || +if ((c->x86_model ==8 && c->x86_stepping >7 ) || c->x86_model ==9 || c->x86_model ==13 ) {/* The more serious chips .. */
@@ -221,7 +221,7 @@ static void init_amd_k7(struct cpuinfo_x86 *c)* are more robust with CLK_CTL set to 200xxxxx instead of 600xxxxx * As per AMD technical note 27212 0.2 */ -if ((c->x86_model ==8 && c->x86_mask >=1 ) || (c->x86_model >8 )) { +if ((c->x86_model ==8 && c->x86_stepping >=1 ) || (c->x86_model >8 )) {rdmsr (MSR_K7_CLK_CTL , l, h);if ((l &0xfff00000 ) !=0x20000000 ) { pr_info("CPU: CLK_CTL MSR was %x. Reprogramming to %x\n",
@@ -241,12 +241,12 @@ static void init_amd_k7(struct cpuinfo_x86 *c)* but they are not certified as MP capable. */ /* Athlon 660/661 is valid. */ -if ((c->x86_model ==6 ) && ((c->x86_mask ==0 ) || - (c->x86_mask ==1 ))) +if ((c->x86_model ==6 ) && ((c->x86_stepping ==0 ) || + (c->x86_stepping ==1 )))return ;/* Duron 670 is valid */ -if ((c->x86_model ==7 ) && (c->x86_mask ==0 )) +if ((c->x86_model ==7 ) && (c->x86_stepping ==0 ))return ;/*
@@ -256,8 +256,8 @@ static void init_amd_k7(struct cpuinfo_x86 *c)* See http://www.heise.de/newsticker/data/jow-18.10.01-000 for * more. */ -if (((c->x86_model ==6 ) && (c->x86_mask >=2 )) || - ((c->x86_model ==7 ) && (c->x86_mask >=1 )) || +if (((c->x86_model ==6 ) && (c->x86_stepping >=2 )) || + ((c->x86_model ==7 ) && (c->x86_stepping >=1 )) || (c->x86_model >7 ))if (cpu_has (c,X86_FEATURE_MP ))return ;
@@ -583,7 +583,7 @@ static void early_init_amd(struct cpuinfo_x86 *c)/* Set MTRR capability flag if appropriate */ if (c->x86 ==5 )if (c->x86_model ==13 || c->x86_model ==9 || - (c->x86_model ==8 && c->x86_mask >=8 )) + (c->x86_model ==8 && c->x86_stepping >=8 ))set_cpu_cap (c,X86_FEATURE_K6_MTRR );#endif #if defined(CONFIG_X86_LOCAL_APIC ) && defined(CONFIG_PCI )
@@ -769,7 +769,7 @@ static void init_amd_zn(struct cpuinfo_x86 *c)* Fix erratum 1076: CPB feature bit not being set in CPUID. It affects * all up to and including B1. */ -if (c->x86_model <=1 && c->x86_mask <=1 ) +if (c->x86_model <=1 && c->x86_stepping <=1 )set_cpu_cap (c,X86_FEATURE_CPB ); }
@@ -880,11 +880,11 @@ static unsigned int amd_size_cache(struct cpuinfo_x86 *c, unsigned int size)/* AMD errata T13 (order #21922) */ if ((c->x86 ==6 )) {/* Duron Rev A0 */ -if (c->x86_model ==3 && c->x86_mask ==0 ) +if (c->x86_model ==3 && c->x86_stepping ==0 ) size =64 ;/* Tbird rev A1/A2 */ if (c->x86_model ==4 && - (c->x86_mask ==0 || c->x86_mask ==1 )) + (c->x86_stepping ==0 || c->x86_stepping ==1 )) size =256 ; }return size;
@@ -1021,7 +1021,7 @@ static bool cpu_has_amd_erratum(struct cpuinfo_x86 *cpu, const int *erratum) }/* OSVW unavailable or ID unknown, match family-model-stepping range */ - ms = (cpu->x86_model <<4 ) | cpu->x86_mask; + ms = (cpu->x86_model <<4 ) | cpu->x86_stepping;while ((range = *erratum++)) if ((cpu->x86 == AMD_MODEL_RANGE_FAMILY(range)) && (ms >= AMD_MODEL_RANGE_START(range)) &&
arch/x86/kernel/cpu/bugs.c +11 -23
@@ -162,8 +162,7 @@ static enum spectre_v2_mitigation_cmd __init spectre_v2_parse_cmdline(void)if (cmdline_find_option_bool (boot_command_line,"nospectre_v2" ))return SPECTRE_V2_CMD_NONE ;else { - ret =cmdline_find_option (boot_command_line,"spectre_v2" , arg, -sizeof (arg)); + ret =cmdline_find_option (boot_command_line,"spectre_v2" , arg,sizeof (arg));if (ret <0 )return SPECTRE_V2_CMD_AUTO ;
@@ -175,8 +174,7 @@ static enum spectre_v2_mitigation_cmd __init spectre_v2_parse_cmdline(void) }if (i >=ARRAY_SIZE (mitigation_options)) { -pr_err ("unknown option (%s). Switching to AUTO select\n" , - mitigation_options[i].option); +pr_err ("unknown option (%s). Switching to AUTO select\n" , arg);return SPECTRE_V2_CMD_AUTO ; } }
@@ -185,8 +183,7 @@ static enum spectre_v2_mitigation_cmd __init spectre_v2_parse_cmdline(void) cmd == SPECTRE_V2_CMD_RETPOLINE_AMD || cmd == SPECTRE_V2_CMD_RETPOLINE_GENERIC) && !IS_ENABLED(CONFIG_RETPOLINE)) { -pr_err ("%s selected but not compiled in. Switching to AUTO select\n" , - mitigation_options[i].option); +pr_err ("%s selected but not compiled in. Switching to AUTO select\n" , mitigation_options[i].option);return SPECTRE_V2_CMD_AUTO ; }
@@ -256,14 +253,14 @@ static void __init spectre_v2_select_mitigation(void) goto retpoline_auto;break ; } -pr_err ("kernel not compiled with retpoline; no mitigation available!" ); +pr_err ("Spectre mitigation: kernel not compiled with retpoline; no mitigation available!" );return ; retpoline_auto:if (boot_cpu_data.x86_vendor ==X86_VENDOR_AMD ) { retpoline_amd:if (!boot_cpu_has (X86_FEATURE_LFENCE_RDTSC )) { -pr_err ("LFENCE not serializing. Switching to generic retpoline\n" ); +pr_err ("Spectre mitigation: LFENCE not serializing, switching to generic retpoline\n" ); goto retpoline_generic; } mode = retp_compiler() ? SPECTRE_V2_RETPOLINE_AMD :
@@ -281,7 +278,7 @@ static void __init spectre_v2_select_mitigation(void)pr_info ("%s\n" , spectre_v2_strings[mode]);/* -* If neither SMEP or KPTI are available, there is a risk of +* If neither SMEP nor PTI are available, there is a risk of * hitting userspace addresses in the RSB after a context switch * from a shallow call stack to a deeper one. To prevent this fill * the entire RSB, even when using IBRS.
@@ -295,21 +292,20 @@ static void __init spectre_v2_select_mitigation(void)if ((!boot_cpu_has (X86_FEATURE_PTI ) && !boot_cpu_has (X86_FEATURE_SMEP )) ||is_skylake_era ()) {setup_force_cpu_cap (X86_FEATURE_RSB_CTXSW ); -pr_info ("Filling RSB on context switch\n" ); +pr_info ("Spectre v2 mitigation: Filling RSB on context switch\n" ); }/* Initialize Indirect Branch Prediction Barrier if supported */ if (boot_cpu_has (X86_FEATURE_IBPB )) {setup_force_cpu_cap (X86_FEATURE_USE_IBPB ); -pr_info ("Enabling Indirect Branch Prediction Barrier\n" ); +pr_info ("Spectre v2 mitigation: Enabling Indirect Branch Prediction Barrier\n" ); } }#undef pr_fmt#ifdef CONFIG_SYSFS -ssize_t cpu_show_meltdown (struct device *dev, -struct device_attribute *attr,char *buf) +ssize_t cpu_show_meltdown (struct device *dev,struct device_attribute *attr,char *buf) {if (!boot_cpu_has_bug (X86_BUG_CPU_MELTDOWN ))return sprintf (buf,"Not affected\n" );
@@ -318,16 +314,14 @@ ssize_t cpu_show_meltdown(struct device *dev,return sprintf (buf,"Vulnerable\n" ); } -ssize_t cpu_show_spectre_v1 (struct device *dev, -struct device_attribute *attr,char *buf) +ssize_t cpu_show_spectre_v1 (struct device *dev,struct device_attribute *attr,char *buf) {if (!boot_cpu_has_bug (X86_BUG_SPECTRE_V1 ))return sprintf (buf,"Not affected\n" );return sprintf (buf,"Mitigation: __user pointer sanitization\n" ); } -ssize_t cpu_show_spectre_v2 (struct device *dev, -struct device_attribute *attr,char *buf) +ssize_t cpu_show_spectre_v2 (struct device *dev,struct device_attribute *attr,char *buf) {if (!boot_cpu_has_bug (X86_BUG_SPECTRE_V2 ))return sprintf (buf,"Not affected\n" );
@@ -337,9 +331,3 @@ ssize_t cpu_show_spectre_v2(struct device *dev, spectre_v2_module_string()); }#endif - -void __ibp_barrier (void ) -{ -__wrmsr (MSR_IA32_PRED_CMD ,PRED_CMD_IBPB ,0 ); -} -EXPORT_SYMBOL_GPL (__ibp_barrier);
arch/x86/kernel/cpu/centaur.c +2 -2
@@ -136,7 +136,7 @@ static void init_centaur(struct cpuinfo_x86 *c)clear_cpu_cap (c,X86_FEATURE_TSC );break ;case 8 : -switch (c->x86_mask) { +switch (c->x86_stepping) {default : name ="2" ;break ;
@@ -211,7 +211,7 @@ centaur_size_cache(struct cpuinfo_x86 *c, unsigned int size)* - Note, it seems this may only be in engineering samples. */ if ((c->x86 ==6 ) && (c->x86_model ==9 ) && - (c->x86_mask ==1 ) && (size ==65 )) + (c->x86_stepping ==1 ) && (size ==65 )) size -=1 ;return size; }
arch/x86/kernel/cpu/common.c +5 -5
@@ -707,7 +707,7 @@ void cpu_detect(struct cpuinfo_x86 *c)cpuid (0x00000001 , &tfms, &misc, &junk, &cap0); c->x86 =x86_family (tfms); c->x86_model =x86_model (tfms); - c->x86_mask =x86_stepping (tfms); + c->x86_stepping =x86_stepping (tfms);if (cap0 & (1 <<19 )) { c->x86_clflush_size = ((misc >>8 ) &0xff ) *8 ;
@@ -1160,9 +1160,9 @@ static void identify_cpu(struct cpuinfo_x86 *c)int i; c->loops_per_jiffy = loops_per_jiffy; - c->x86_cache_size =-1 ; + c->x86_cache_size =0 ; c->x86_vendor =X86_VENDOR_UNKNOWN ; - c->x86_model = c->x86_mask =0 ;/* So far unknown... */ + c->x86_model = c->x86_stepping =0 ;/* So far unknown... */ c->x86_vendor_id[0 ] ='\0' ;/* Unset */ c->x86_model_id[0 ] ='\0' ;/* Unset */ c->x86_max_cores =1 ;
@@ -1353,8 +1353,8 @@ void print_cpu_info(struct cpuinfo_x86 *c)pr_cont (" (family: 0x%x, model: 0x%x" , c->x86, c->x86_model); -if (c->x86_mask || c->cpuid_level >=0 ) -pr_cont (", stepping: 0x%x)\n" , c->x86_mask); +if (c->x86_stepping || c->cpuid_level >=0 ) +pr_cont (", stepping: 0x%x)\n" , c->x86_stepping);else pr_cont (")\n" ); }
arch/x86/kernel/cpu/cyrix.c +1 -1
@@ -215,7 +215,7 @@ static void init_cyrix(struct cpuinfo_x86 *c)/* common case step number/rev -- exceptions handled below */ c->x86_model = (dir1 >>4 ) +1 ; - c->x86_mask = dir1 &0xf ; + c->x86_stepping = dir1 &0xf ;/* Now cook; the original recipe is by Channing Corn, from Cyrix. * We do the same thing for each generation: we work out
arch/x86/kernel/cpu/intel.c +14 -32
120 lines not on this page · raw message
arch/x86/kernel/cpu/intel_rdt.c +1 -1
@@ -771,7 +771,7 @@ static __init void rdt_quirks(void)cache_alloc_hsw_probe ();break ;case INTEL_FAM6_SKYLAKE_X : -if (boot_cpu_data.x86_mask <=4 ) +if (boot_cpu_data.x86_stepping <=4 )set_rdt_options ("!cmt,!mbmtotal,!mbmlocal,!l3cat" ); } }
arch/x86/kernel/cpu/mcheck/mce-internal.h +15 -0
@@ -115,4 +115,19 @@ static inline void mce_unregister_injector_chain(struct notifier_block *nb) { }extern struct mca_config mca_cfg; +#ifndef CONFIG_X86_64 +/* +* On 32-bit systems it would be difficult to safely unmap a poison page +* from the kernel 1:1 map because there are no non-canonical addresses that +* we can use to refer to the address without risking a speculative access. +* However, this isn't much of an issue because: +* 1) Few unmappable pages are in the 1:1 map. Most are in HIGHMEM which +* are only mapped into the kernel as needed +* 2) Few people would run a 32-bit kernel on a machine that supports +* recoverable errors because they have too much memory to boot 32-bit. +*/ +static inline void mce_unmap_kpfn (unsigned long pfn) {} +#define mce_unmap_kpfn mce_unmap_kpfn +#endif +#endif /* __X86_MCE_INTERNAL_H__ */
arch/x86/kernel/cpu/mcheck/mce.c +11 -6
@@ -106,6 +106,10 @@ static struct irq_work mce_irq_work;static void (*quirk_no_way_out)(int bank,struct mce *m,struct pt_regs *regs); +#ifndef mce_unmap_kpfn +static void mce_unmap_kpfn (unsigned long pfn); +#endif +/* * CPU/chipset specific EDAC code can register a notifier call here to print * MCE errors in a human-readable form.
@@ -582,7 +586,8 @@ static int srao_decode_notifier(struct notifier_block *nb, unsigned long val,if (mce_usable_address (mce) && (mce->severity ==MCE_AO_SEVERITY )) { pfn = mce->addr >>PAGE_SHIFT ; -memory_failure (pfn,MCE_VECTOR ,0 ); +if (memory_failure (pfn,MCE_VECTOR ,0 )) +mce_unmap_kpfn (pfn); }return NOTIFY_OK ;
@@ -1049,12 +1054,13 @@ static int do_memory_failure(struct mce *m) ret =memory_failure (m->addr >>PAGE_SHIFT ,MCE_VECTOR , flags);if (ret)pr_err ("Memory error not recovered" ); +else +mce_unmap_kpfn (m->addr >>PAGE_SHIFT );return ret; } -#if defined(arch_unmap_kpfn) && defined(CONFIG_MEMORY_FAILURE ) - -void arch_unmap_kpfn (unsigned long pfn) +#ifndef mce_unmap_kpfn +static void mce_unmap_kpfn (unsigned long pfn) {unsigned long decoy_addr;
@@ -1065,7 +1071,7 @@ void arch_unmap_kpfn(unsigned long pfn)* We would like to just call: * set_memory_np((unsigned long)pfn_to_kaddr(pfn), 1); * but doing that would radically increase the odds of a -* speculative access to the posion page because we'd have +* speculative access to the poison page because we'd have * the virtual address of the kernel 1:1 mapping sitting * around in registers. * Instead we get tricky. We create a non-canonical address
@@ -1090,7 +1096,6 @@ void arch_unmap_kpfn(unsigned long pfn)if (set_memory_np (decoy_addr,1 )) pr_warn("Could not invalidate pfn=0x%lx from 1:1 map\n", pfn); - }#endif
arch/x86/kernel/cpu/microcode/intel.c +3 -3
@@ -921,7 +921,7 @@ static bool is_blacklisted(unsigned int cpu)*/ if (c->x86 ==6 && c->x86_model ==INTEL_FAM6_BROADWELL_X && - c->x86_mask ==0x01 && + c->x86_stepping ==0x01 && llc_size_per_core >2621440 && c->microcode <0x0b000021 ) {pr_err_once ("Erratum BDF90: late loading with revision < 0x0b000021 (0x%x) disabled.\n" , c->microcode);
@@ -944,7 +944,7 @@ static enum ucode_state request_microcode_fw(int cpu, struct device *device,return UCODE_NFOUND ;sprintf (name,"intel-ucode/%02x-%02x-%02x" , - c->x86, c->x86_model, c->x86_mask); + c->x86, c->x86_model, c->x86_stepping);if (request_firmware_direct (&firmware, name, device)) {pr_debug ("data file %s load failed\n" , name);
@@ -982,7 +982,7 @@ static struct microcode_ops microcode_intel_ops = {static int __init calc_llc_size_per_core (struct cpuinfo_x86 *c) { -u64 llc_size = c->x86_cache_size *1024 ; +u64 llc_size = c->x86_cache_size *1024ULL ;do_div (llc_size, c->x86_max_cores);
arch/x86/kernel/cpu/mtrr/generic.c +1 -1
@@ -859,7 +859,7 @@ int generic_validate_add_page(unsigned long base, unsigned long size,*/ if (is_cpu (INTEL ) && boot_cpu_data.x86 ==6 && boot_cpu_data.x86_model ==1 && - boot_cpu_data.x86_mask <=7 ) { + boot_cpu_data.x86_stepping <=7 ) {if (base & ((1 << (22 -PAGE_SHIFT )) -1 )) {pr_warn ("mtrr: base(0x%lx000) is not 4 MiB aligned\n" , base);return -EINVAL ;
arch/x86/kernel/cpu/mtrr/main.c +2 -2
@@ -711,8 +711,8 @@ void __init mtrr_bp_init(void)if (boot_cpu_data.x86_vendor ==X86_VENDOR_INTEL && boot_cpu_data.x86 ==0xF && boot_cpu_data.x86_model ==0x3 && - (boot_cpu_data.x86_mask ==0x3 || - boot_cpu_data.x86_mask ==0x4 )) + (boot_cpu_data.x86_stepping ==0x3 || + boot_cpu_data.x86_stepping ==0x4 )) phys_addr =36 ; size_or_mask =SIZE_OR_MASK_BITS (phys_addr);
arch/x86/kernel/cpu/proc.c +4 -4
@@ -72,8 +72,8 @@ static int show_cpuinfo(struct seq_file *m, void *v) c->x86_model, c->x86_model_id[0] ? c->x86_model_id : "unknown"); -if (c->x86_mask || c->cpuid_level >=0 ) -seq_printf (m,"stepping\t: %d\n" , c->x86_mask); +if (c->x86_stepping || c->cpuid_level >=0 ) +seq_printf (m,"stepping\t: %d\n" , c->x86_stepping);else seq_puts (m,"stepping\t: unknown\n" );if (c->microcode)
@@ -91,8 +91,8 @@ static int show_cpuinfo(struct seq_file *m, void *v) }/* Cache size */ -if (c->x86_cache_size >=0 ) -seq_printf (m,"cache size\t: %d KB\n" , c->x86_cache_size); +if (c->x86_cache_size) +seq_printf (m,"cache size\t: %u KB\n" , c->x86_cache_size);show_cpuinfo_core (m, c, cpu);show_cpuinfo_misc (m, c);
arch/x86/kernel/early-quirks.c +1 -0
@@ -527,6 +527,7 @@ static const struct pci_device_id intel_early_ids[] __initconst = {INTEL_SKL_IDS (&gen9_early_ops),INTEL_BXT_IDS (&gen9_early_ops),INTEL_KBL_IDS (&gen9_early_ops), +INTEL_CFL_IDS (&gen9_early_ops),INTEL_GLK_IDS (&gen9_early_ops), INTEL_CNL_IDS(&gen9_early_ops), };
arch/x86/kernel/espfix_64.c +1 -1
@@ -57,7 +57,7 @@# error "Need more virtual address space for the ESPFIX hack"#endif -#define PGALLOC_GFP (GFP_KERNEL | __GFP_NOTRACK | __GFP_ZERO) +#define PGALLOC_GFP (GFP_KERNEL | __GFP_ZERO)/* This contains the *bottom* address of the espfix stack */ DEFINE_PER_CPU_READ_MOSTLY(unsigned long, espfix_stack);
arch/x86/kernel/head_32.S +2 -2
@@ -37,7 +37,7 @@ #define X86 new_cpu_data+CPUINFO_x86 #define X86_VENDOR new_cpu_data+CPUINFO_x86_vendor #define X86_MODEL new_cpu_data+CPUINFO_x86_model -#define X86_MASK new_cpu_data+CPUINFO_x86_mask +#define X86_STEPPING new_cpu_data+CPUINFO_x86_stepping #define X86_HARD_MATH new_cpu_data+CPUINFO_hard_math #define X86_CPUID new_cpu_data+CPUINFO_cpuid_level #define X86_CAPABILITY new_cpu_data+CPUINFO_x86_capability
@@ -332,7 +332,7 @@ ENTRY(startup_32_smp) shrb $4,%al movb %al,X86_MODEL andb $0x0f,%cl # mask mask revision - movb %cl,X86_MASK + movb %cl,X86_STEPPING movl %edx,X86_CAPABILITY .Lis486:
arch/x86/kernel/mpparse.c +1 -1
@@ -407,7 +407,7 @@ static inline void __init construct_default_ISA_mptable(int mpc_default_type) processor.apicver = mpc_default_type >4 ?0x10 :0x01 ; processor.cpuflag =CPU_ENABLED ; processor.cpufeature = (boot_cpu_data.x86 <<8 ) | - (boot_cpu_data.x86_model <<4 ) | boot_cpu_data.x86_mask; + (boot_cpu_data.x86_model <<4 ) | boot_cpu_data.x86_stepping; processor.featureflag = boot_cpu_data.x86_capability[CPUID_1_EDX ]; processor.reserved[0 ] =0 ; processor.reserved[1 ] =0 ;
arch/x86/kernel/paravirt.c +3 -3
@@ -190,9 +190,9 @@ static void native_flush_tlb_global(void)__native_flush_tlb_global (); } -static void native_flush_tlb_single (unsigned long addr) +static void native_flush_tlb_one_user (unsigned long addr) { -__native_flush_tlb_single (addr); +__native_flush_tlb_one_user (addr); }struct static_key paravirt_steal_enabled;
@@ -391,7 +391,7 @@ struct pv_mmu_ops pv_mmu_ops __ro_after_init = { .flush_tlb_user = native_flush_tlb, .flush_tlb_kernel = native_flush_tlb_global, - .flush_tlb_single = native_flush_tlb_single, + .flush_tlb_one_user = native_flush_tlb_one_user, .flush_tlb_others = native_flush_tlb_others, .pgd_alloc = __paravirt_pgd_alloc,
arch/x86/kernel/relocate_kernel_64.S +8 -0
@@ -68,6 +68,9 @@ relocate_kernel: movq %cr4, %rax movq %rax, CR4(%r11) + /* Save CR4. Required to enable the right paging mode later. */ + movq %rax, %r13 + /* zero out flags, and disable interrupts */ pushq $0 popfq
@@ -126,8 +129,13 @@ identity_mapped: /* * Set cr4 to a known state: * - physical address extension enabled + * - 5-level paging, if it was enabled before */ movl $X86_CR4_PAE, %eax + testq $X86_CR4_LA57, %r13 + jz 1f + orl $X86_CR4_LA57, %eax +1: movq %rax, %cr4 jmp 1f
arch/x86/kernel/traps.c +1 -6
@@ -42,7 +42,6 @@#include <linux/edac.h> #endif -#include <asm/kmemcheck.h> #include <asm/stacktrace.h> #include <asm/processor.h> #include <asm/debugreg.h>
@@ -181,7 +180,7 @@ int fixup_bug(struct pt_regs *regs, int trapnr)break ;case BUG_TRAP_TYPE_WARN : - regs->ip +=LEN_UD0 ; + regs->ip +=LEN_UD2 ;return 1 ; }
@@ -764,10 +763,6 @@ dotraplinkage void do_debug(struct pt_regs *regs, long error_code)if (!dr6 &&user_mode (regs)) user_icebp =1 ; -/* Catch kmemcheck conditions! */ -if ((dr6 &DR_STEP ) &&kmemcheck_trap (regs)) - goto exit; -/* Store the virtualized DR6 value */ tsk->thread.debugreg6 = dr6;
arch/x86/kvm/mmu.c +5 -5
@@ -5063,7 +5063,7 @@ void kvm_mmu_uninit_vm(struct kvm *kvm)typedef bool (*slot_level_handler ) (struct kvm *kvm,struct kvm_rmap_head *rmap_head);/* The caller should hold mmu-lock before calling this function. */ -static bool +static __always_inline boolslot_handle_level_range (struct kvm *kvm,struct kvm_memory_slot *memslot,slot_level_handler fn,int start_level,int end_level,gfn_t start_gfn,gfn_t end_gfn,bool lock_flush_tlb)
@@ -5093,7 +5093,7 @@ slot_handle_level_range(struct kvm *kvm, struct kvm_memory_slot *memslot,return flush; } -static bool +static __always_inline boolslot_handle_level (struct kvm *kvm,struct kvm_memory_slot *memslot,slot_level_handler fn,int start_level,int end_level,bool lock_flush_tlb)
@@ -5104,7 +5104,7 @@ slot_handle_level(struct kvm *kvm, struct kvm_memory_slot *memslot, lock_flush_tlb); } -static bool +static __always_inline boolslot_handle_all_level (struct kvm *kvm,struct kvm_memory_slot *memslot,slot_level_handler fn,bool lock_flush_tlb) {
@@ -5112,7 +5112,7 @@ slot_handle_all_level(struct kvm *kvm, struct kvm_memory_slot *memslot, PT_MAX_HUGEPAGE_LEVEL, lock_flush_tlb); } -static bool +static __always_inline boolslot_handle_large_level (struct kvm *kvm,struct kvm_memory_slot *memslot,slot_level_handler fn,bool lock_flush_tlb) {
@@ -5120,7 +5120,7 @@ slot_handle_large_level(struct kvm *kvm, struct kvm_memory_slot *memslot, PT_MAX_HUGEPAGE_LEVEL, lock_flush_tlb); } -static bool +static __always_inline boolslot_handle_leaf (struct kvm *kvm,struct kvm_memory_slot *memslot,slot_level_handler fn,bool lock_flush_tlb) {
arch/x86/kvm/vmx.c +4 -3
@@ -10127,7 +10127,8 @@ static void nested_get_vmcs12_pages(struct kvm_vcpu *vcpu,if (cpu_has_vmx_msr_bitmap () &&nested_cpu_has (vmcs12,CPU_BASED_USE_MSR_BITMAPS ) &&nested_vmx_merge_msr_bitmap (vcpu, vmcs12)) - ; +vmcs_set_bits (CPU_BASED_VM_EXEC_CONTROL , +CPU_BASED_USE_MSR_BITMAPS );else vmcs_clear_bits (CPU_BASED_VM_EXEC_CONTROL ,CPU_BASED_USE_MSR_BITMAPS );
@@ -10216,8 +10217,8 @@ static inline bool nested_vmx_merge_msr_bitmap(struct kvm_vcpu *vcpu,* updated to reflect this when L1 (or its L2s) actually write to * the MSR. */ -bool pred_cmd =msr_write_intercepted_l01 (vcpu,MSR_IA32_PRED_CMD ); -bool spec_ctrl =msr_write_intercepted_l01 (vcpu,MSR_IA32_SPEC_CTRL ); +bool pred_cmd = !msr_write_intercepted_l01 (vcpu,MSR_IA32_PRED_CMD ); +bool spec_ctrl = !msr_write_intercepted_l01 (vcpu,MSR_IA32_SPEC_CTRL );if (!nested_cpu_has_virt_x2apic_mode (vmcs12) && !pred_cmd && !spec_ctrl)
arch/x86/lib/cpu.c +1 -1
@@ -18,7 +18,7 @@ unsigned int x86_model(unsigned int sig) {unsigned int fam, model; - fam =x86_family (sig); + fam =x86_family (sig); model = (sig >>4 ) &0xf ;
arch/x86/mm/Makefile +0 -2
@@ -29,8 +29,6 @@ obj-$(CONFIG_X86_PTDUMP) += debug_pagetables.o obj-$(CONFIG_HIGHMEM) += highmem_32.o -obj-$(CONFIG_KMEMCHECK) += kmemcheck/ - KASAN_SANITIZE_kasan_init_$(BITS).o := n obj-$(CONFIG_KASAN) += kasan_init_$(BITS).o
arch/x86/mm/fault.c +0 -6
@@ -20,7 +20,6 @@#include <asm/cpufeature.h> /* boot_cpu_has, ... */ #include <asm/traps.h> /* dotraplinkage, ... */ #include <asm/pgalloc.h> /* pgd_*(), ... */ -#include <asm/kmemcheck.h> /* kmemcheck_*(), ... */ #include <asm/fixmap.h> /* VSYSCALL_ADDR */ #include <asm/vsyscall.h> /* emulate_vsyscall */ #include <asm/vm86.h> /* struct vm86 */
@@ -1257,8 +1256,6 @@ __do_page_fault(struct pt_regs *regs, unsigned long error_code,* Detect and handle instructions that would cause a page fault for * both a tracked kernel page and a userspace page. */ -if (kmemcheck_active (regs)) -kmemcheck_hide (regs);prefetchw (&mm->mmap_sem);if (unlikely (kmmio_fault (regs, address)))
@@ -1281,9 +1278,6 @@ __do_page_fault(struct pt_regs *regs, unsigned long error_code,if (!(error_code & (X86_PF_RSVD |X86_PF_USER |X86_PF_PROT ))) {if (vmalloc_fault (address) >=0 )return ;
Lines of this file are not shown. View the raw message.
arch/x86/mm/kmemcheck/error.c deleted +0 -228
228 lines not on this page · raw message
arch/x86/mm/kmemcheck/kmemcheck.c deleted +0 -658
658 lines not on this page · raw message
arch/x86/mm/kmemcheck/opcode.c deleted +0 -107
107 lines not on this page · raw message
arch/x86/mm/kmemcheck/opcode.h deleted +0 -10
Lines of this file are not shown. View the raw message.
arch/x86/mm/kmemcheck/selftest.c deleted +0 -71
71 lines not on this page · raw message
arch/x86/mm/kmemcheck/selftest.h deleted +0 -7
Lines of this file are not shown. View the raw message.
arch/x86/mm/kmemcheck/shadow.c deleted +0 -173
173 lines not on this page · raw message
arch/x86/mm/kmemcheck/shadow.h deleted +0 -19
Lines of this file are not shown. View the raw message.
drivers/crypto/sunxi-ss/sun4i-ss-prng.c +3 -3
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/powerplay/smumgr/rv_smumgr.h +1 -1
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/i915/i915_pci.c +150 -43
193 lines not on this page · raw message
drivers/gpu/drm/qxl/qxl_display.c +108 -4
112 lines not on this page · raw message
drivers/infiniband/core/uverbs_std_types.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/mmc/host/sdhci-of-esdhc.c +37 -27
64 lines not on this page · raw message
drivers/mmc/host/sdhci.c +156 -8
164 lines not on this page · raw message
drivers/net/ethernet/mellanox/mlx4/qp.c +3 -0
Lines of this file are not shown. View the raw message.
drivers/net/wireless/marvell/mwifiex/pcie.c +4 -1
Lines of this file are not shown. View the raw message.
drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c +3 -2
Lines of this file are not shown. View the raw message.
drivers/net/wireless/realtek/rtlwifi/wifi.h +1 -0
Lines of this file are not shown. View the raw message.
drivers/platform/x86/apple-gmux.c +1 -47
48 lines not on this page · raw message
drivers/target/iscsi/iscsi_target_auth.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/target/iscsi/iscsi_target_nego.c +3 -0
Lines of this file are not shown. View the raw message.
fs/btrfs/inode.c +26 -15
41 lines not on this page · raw message
include/drm/i915_pciids.h +102 -58
160 lines not on this page · raw message
include/linux/jbd2.h +268 -163
431 lines not on this page · raw message
include/linux/kmemcheck.h deleted +0 -172
172 lines not on this page · raw message
lib/Kconfig.kmemcheck deleted +0 -94
94 lines not on this page · raw message
mm/kmemcheck.c deleted +0 -126
126 lines not on this page · raw message
sound/pci/hda/patch_realtek.c +72 -0
72 lines not on this page · raw message
sound/soc/intel/common/sst-match-acpi.c +3 -5
Lines of this file are not shown. View the raw message.
tools/include/linux/kmemcheck.h deleted +0 -9
Lines of this file are not shown. View the raw message.
tools/testing/selftests/seccomp/seccomp_bpf.c +2 -2
Lines of this file are not shown. View the raw message.
tools/testing/selftests/vm/compaction_test.c +2 -0
Lines of this file are not shown. View the raw message.
tools/testing/selftests/x86/mpx-mini-test.c +30 -2
Lines of this file are not shown. View the raw message.
tools/testing/selftests/x86/protection_keys.c +0 -28
Lines of this file are not shown. View the raw message.
tools/testing/selftests/x86/single_step_syscall.c +4 -1
Lines of this file are not shown. View the raw message.
tools/testing/selftests/x86/test_mremap_vdso.c +4 -0
Lines of this file are not shown. View the raw message.
tools/testing/selftests/x86/test_vdso.c +48 -7
55 lines not on this page · raw message
tools/testing/selftests/x86/test_vsyscall.c +8 -3
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.