OSDN Git Service

Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 25 Oct 2018 18:14:36 +0000 (11:14 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 25 Oct 2018 18:14:36 +0000 (11:14 -0700)
Pull timekeeping updates from Thomas Gleixner:
 "The timers and timekeeping departement provides:

   - Another large y2038 update with further preparations for providing
     the y2038 safe timespecs closer to the syscalls.

   - An overhaul of the SHCMT clocksource driver

   - SPDX license identifier updates

   - Small cleanups and fixes all over the place"

* 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (31 commits)
  tick/sched : Remove redundant cpu_online() check
  clocksource/drivers/dw_apb: Add reset control
  clocksource: Remove obsolete CLOCKSOURCE_OF_DECLARE
  clocksource/drivers: Unify the names to timer-* format
  clocksource/drivers/sh_cmt: Add R-Car gen3 support
  dt-bindings: timer: renesas: cmt: document R-Car gen3 support
  clocksource/drivers/sh_cmt: Properly line-wrap sh_cmt_of_table[] initializer
  clocksource/drivers/sh_cmt: Fix clocksource width for 32-bit machines
  clocksource/drivers/sh_cmt: Fixup for 64-bit machines
  clocksource/drivers/sh_tmu: Convert to SPDX identifiers
  clocksource/drivers/sh_mtu2: Convert to SPDX identifiers
  clocksource/drivers/sh_cmt: Convert to SPDX identifiers
  clocksource/drivers/renesas-ostm: Convert to SPDX identifiers
  clocksource: Convert to using %pOFn instead of device_node.name
  tick/broadcast: Remove redundant check
  RISC-V: Request newstat syscalls
  y2038: signal: Change rt_sigtimedwait to use __kernel_timespec
  y2038: socket: Change recvmmsg to use __kernel_timespec
  y2038: sched: Change sched_rr_get_interval to use __kernel_timespec
  y2038: utimes: Rework #ifdef guards for compat syscalls
  ...

13 files changed:
1  2 
MAINTAINERS
arch/arm64/include/asm/compat.h
arch/x86/include/asm/compat.h
fs/read_write.c
include/linux/clocksource.h
include/linux/compat.h
include/linux/timekeeping.h
ipc/mqueue.c
ipc/shm.c
kernel/sched/core.c
kernel/signal.c
kernel/time/posix-timers.c
net/socket.c

diff --combined MAINTAINERS
@@@ -324,6 -324,7 +324,6 @@@ F: Documentation/ABI/testing/sysfs-bus-
  F:    Documentation/ABI/testing/configfs-acpi
  F:    drivers/pci/*acpi*
  F:    drivers/pci/*/*acpi*
 -F:    drivers/pci/*/*/*acpi*
  F:    tools/power/acpi/
  
  ACPI APEI
@@@ -839,7 -840,7 +839,7 @@@ ANALOG DEVICES INC ADGS1408 DRIVE
  M:    Mircea Caprioru <mircea.caprioru@analog.com>
  S:    Supported
  F:    drivers/mux/adgs1408.c
 -F:    Documentation/devicetree/bindings/mux/adgs1408.txt
 +F:    Documentation/devicetree/bindings/mux/adi,adgs1408.txt
  
  ANALOG DEVICES INC ADP5061 DRIVER
  M:    Stefan Popa <stefan.popa@analog.com>
@@@ -1180,7 -1181,7 +1180,7 @@@ N:      ow
  F:    arch/arm/mach-actions/
  F:    arch/arm/boot/dts/owl-*
  F:    arch/arm64/boot/dts/actions/
- F:    drivers/clocksource/owl-*
+ F:    drivers/clocksource/timer-owl*
  F:    drivers/pinctrl/actions/*
  F:    drivers/soc/actions/
  F:    include/dt-bindings/power/owl-*
@@@ -1250,7 -1251,7 +1250,7 @@@ N:      meso
  
  ARM/Annapurna Labs ALPINE ARCHITECTURE
  M:    Tsahee Zidenberg <tsahee@annapurnalabs.com>
 -M:    Antoine Tenart <antoine.tenart@free-electrons.com>
 +M:    Antoine Tenart <antoine.tenart@bootlin.com>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  S:    Maintained
  F:    arch/arm/mach-alpine/
@@@ -1603,7 -1604,7 +1603,7 @@@ L:      linux-arm-kernel@lists.infradead.or
  S:    Maintained
  F:    arch/arm/boot/dts/lpc43*
  F:    drivers/clk/nxp/clk-lpc18xx*
- F:    drivers/clocksource/time-lpc32xx.c
+ F:    drivers/clocksource/timer-lpc32xx.c
  F:    drivers/i2c/busses/i2c-lpc2k.c
  F:    drivers/memory/pl172.c
  F:    drivers/mtd/spi-nor/nxp-spifi.c
@@@ -2195,7 -2196,6 +2195,7 @@@ F:      drivers/clk/uniphier
  F:    drivers/gpio/gpio-uniphier.c
  F:    drivers/i2c/busses/i2c-uniphier*
  F:    drivers/irqchip/irq-uniphier-aidet.c
 +F:    drivers/mmc/host/uniphier-sd.c
  F:    drivers/pinctrl/uniphier/
  F:    drivers/reset/reset-uniphier.c
  F:    drivers/tty/serial/8250/8250_uniphier.c
@@@ -2220,7 -2220,7 +2220,7 @@@ F:      arch/arm/mach-vexpress
  F:    */*/vexpress*
  F:    */*/*/vexpress*
  F:    drivers/clk/versatile/clk-vexpress-osc.c
- F:    drivers/clocksource/versatile.c
+ F:    drivers/clocksource/timer-versatile.c
  N:    mps2
  
  ARM/VFP SUPPORT
@@@ -2242,7 -2242,7 +2242,7 @@@ M:      Tony Prisk <linux@prisktech.co.nz
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  S:    Maintained
  F:    arch/arm/mach-vt8500/
- F:    drivers/clocksource/vt8500_timer.c
+ F:    drivers/clocksource/timer-vt8500.c
  F:    drivers/i2c/busses/i2c-wmt.c
  F:    drivers/mmc/host/wmt-sdmmc.c
  F:    drivers/pwm/pwm-vt8500.c
@@@ -2307,11 -2307,10 +2307,11 @@@ F:   drivers/cpuidle/cpuidle-zynq.
  F:    drivers/block/xsysace.c
  N:    zynq
  N:    xilinx
- F:    drivers/clocksource/cadence_ttc_timer.c
+ F:    drivers/clocksource/timer-cadence-ttc.c
  F:    drivers/i2c/busses/i2c-cadence.c
  F:    drivers/mmc/host/sdhci-of-arasan.c
  F:    drivers/edac/synopsys_edac.c
 +F:    drivers/i2c/busses/i2c-xiic.c
  
  ARM64 PORT (AARCH64 ARCHITECTURE)
  M:    Catalin Marinas <catalin.marinas@arm.com>
@@@ -2956,6 -2955,7 +2956,6 @@@ F:      include/linux/bcm963xx_tag.
  
  BROADCOM BNX2 GIGABIT ETHERNET DRIVER
  M:    Rasesh Mody <rasesh.mody@cavium.com>
 -M:    Harish Patil <harish.patil@cavium.com>
  M:    Dept-GELinuxNICDev@cavium.com
  L:    netdev@vger.kernel.org
  S:    Supported
@@@ -2976,7 -2976,6 +2976,7 @@@ F:      drivers/scsi/bnx2i
  
  BROADCOM BNX2X 10 GIGABIT ETHERNET DRIVER
  M:    Ariel Elior <ariel.elior@cavium.com>
 +M:    Sudarsana Kalluru <sudarsana.kalluru@cavium.com>
  M:    everest-linux-l2@cavium.com
  L:    netdev@vger.kernel.org
  S:    Supported
@@@ -3007,14 -3006,6 +3007,14 @@@ S:    Supporte
  F:    drivers/gpio/gpio-brcmstb.c
  F:    Documentation/devicetree/bindings/gpio/brcm,brcmstb-gpio.txt
  
 +BROADCOM BRCMSTB I2C DRIVER
 +M:    Kamal Dasu <kdasu.kdev@gmail.com>
 +L:    linux-i2c@vger.kernel.org
 +L:    bcm-kernel-feedback-list@broadcom.com
 +S:    Supported
 +F:    drivers/i2c/busses/i2c-brcmstb.c
 +F:    Documentation/devicetree/bindings/i2c/i2c-brcmstb.txt
 +
  BROADCOM BRCMSTB USB2 and USB3 PHY DRIVER
  M:    Al Cooper <alcooperx@gmail.com>
  L:    linux-kernel@vger.kernel.org
@@@ -3122,15 -3113,6 +3122,15 @@@ S:    Maintaine
  F:    Documentation/devicetree/bindings/memory-controllers/brcm,dpfe-cpu.txt
  F:    drivers/memory/brcmstb_dpfe.c
  
 +BROADCOM SPI DRIVER
 +M:    Kamal Dasu <kdasu.kdev@gmail.com>
 +M:    bcm-kernel-feedback-list@broadcom.com
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/spi/brcm,spi-bcm-qspi.txt
 +F:    drivers/spi/spi-bcm-qspi.*
 +F:    drivers/spi/spi-brcmstb-qspi.c
 +F:    drivers/spi/spi-iproc-qspi.c
 +
  BROADCOM SYSTEMPORT ETHERNET DRIVER
  M:    Florian Fainelli <f.fainelli@gmail.com>
  L:    netdev@vger.kernel.org
@@@ -3691,12 -3673,6 +3691,12 @@@ S:    Maintaine
  F:    Documentation/devicetree/bindings/media/coda.txt
  F:    drivers/media/platform/coda/
  
 +CODE OF CONDUCT
 +M:    Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 +S:    Supported
 +F:    Documentation/process/code-of-conduct.rst
 +F:    Documentation/process/code-of-conduct-interpretation.rst
 +
  COMMON CLK FRAMEWORK
  M:    Michael Turquette <mturquette@baylibre.com>
  M:    Stephen Boyd <sboyd@kernel.org>
@@@ -4055,7 -4031,7 +4055,7 @@@ M:      Uma Krishnan <ukrishn@linux.vnet.ibm
  L:    linux-scsi@vger.kernel.org
  S:    Supported
  F:    drivers/scsi/cxlflash/
 -F:    include/uapi/scsi/cxlflash_ioctls.h
 +F:    include/uapi/scsi/cxlflash_ioctl.h
  F:    Documentation/powerpc/cxlflash.txt
  
  CYBERPRO FB DRIVER
@@@ -4194,11 -4170,6 +4194,11 @@@ S:    Maintaine
  F:    drivers/platform/x86/dell-smbios-wmi.c
  F:    tools/wmi/dell-smbios-example.c
  
 +DEFZA FDDI NETWORK DRIVER
 +M:    "Maciej W. Rozycki" <macro@linux-mips.org>
 +S:    Maintained
 +F:    drivers/net/fddi/defza.*
 +
  DELL LAPTOP DRIVER
  M:    Matthew Garrett <mjg59@srcf.ucam.org>
  M:    Pali Rohár <pali.rohar@gmail.com>
@@@ -4514,12 -4485,11 +4514,12 @@@ S:   Maintaine
  F:    Documentation/
  F:    scripts/kernel-doc
  X:    Documentation/ABI/
 +X:    Documentation/acpi/
  X:    Documentation/devicetree/
 -X:    Documentation/acpi
 -X:    Documentation/power
 -X:    Documentation/spi
 -X:    Documentation/media
 +X:    Documentation/i2c/
 +X:    Documentation/media/
 +X:    Documentation/power/
 +X:    Documentation/spi/
  T:    git git://git.lwn.net/linux.git docs-next
  
  DOCUMENTATION/ITALIAN
@@@ -4557,13 -4527,9 +4557,13 @@@ F:    drivers/soc/fsl/dpi
  
  DPAA2 ETHERNET DRIVER
  M:    Ioana Radulescu <ruxandra.radulescu@nxp.com>
 -L:    linux-kernel@vger.kernel.org
 +L:    netdev@vger.kernel.org
  S:    Maintained
 -F:    drivers/staging/fsl-dpaa2/ethernet
 +F:    drivers/net/ethernet/freescale/dpaa2/dpaa2-eth*
 +F:    drivers/net/ethernet/freescale/dpaa2/dpni*
 +F:    drivers/net/ethernet/freescale/dpaa2/dpkg.h
 +F:    drivers/net/ethernet/freescale/dpaa2/Makefile
 +F:    drivers/net/ethernet/freescale/dpaa2/Kconfig
  
  DPAA2 ETHERNET SWITCH DRIVER
  M:    Ioana Radulescu <ruxandra.radulescu@nxp.com>
@@@ -4574,10 -4540,9 +4574,10 @@@ F:    drivers/staging/fsl-dpaa2/eths
  
  DPAA2 PTP CLOCK DRIVER
  M:    Yangbo Lu <yangbo.lu@nxp.com>
 -L:    linux-kernel@vger.kernel.org
 +L:    netdev@vger.kernel.org
  S:    Maintained
 -F:    drivers/staging/fsl-dpaa2/rtc
 +F:    drivers/net/ethernet/freescale/dpaa2/dpaa2-ptp*
 +F:    drivers/net/ethernet/freescale/dpaa2/dprtc*
  
  DPT_I2O SCSI RAID DRIVER
  M:    Adaptec OEM Raid Solutions <aacraid@microsemi.com>
@@@ -5364,8 -5329,7 +5364,8 @@@ S:      Maintaine
  F:    drivers/edac/r82600_edac.c
  
  EDAC-SBRIDGE
 -M:    Mauro Carvalho Chehab <mchehab@kernel.org>
 +M:    Tony Luck <tony.luck@intel.com>
 +R:    Qiuxu Zhuo <qiuxu.zhuo@intel.com>
  L:    linux-edac@vger.kernel.org
  S:    Maintained
  F:    drivers/edac/sb_edac.c
@@@ -5505,8 -5469,7 +5505,8 @@@ S:      Odd Fixe
  F:    drivers/net/ethernet/agere/
  
  ETHERNET BRIDGE
 -M:    Stephen Hemminger <stephen@networkplumber.org>
 +M:    Roopa Prabhu <roopa@cumulusnetworks.com>
 +M:    Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
  L:    bridge@lists.linux-foundation.org (moderated for non-subscribers)
  L:    netdev@vger.kernel.org
  W:    http://www.linuxfoundation.org/en/Net:Bridge
@@@ -5550,7 -5513,7 +5550,7 @@@ W:      http://ext4.wiki.kernel.or
  Q:    http://patchwork.ozlabs.org/project/linux-ext4/list/
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git
  S:    Maintained
 -F:    Documentation/filesystems/ext4.txt
 +F:    Documentation/filesystems/ext4/ext4.rst
  F:    fs/ext4/
  
  Extended Verification Module (EVM)
@@@ -5661,8 -5624,6 +5661,8 @@@ F:      lib/fault-inject.
  
  FBTFT Framebuffer drivers
  M:    Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
 +L:    dri-devel@lists.freedesktop.org
 +L:    linux-fbdev@vger.kernel.org
  S:    Maintained
  F:    drivers/staging/fbtft/
  
@@@ -6098,7 -6059,7 +6098,7 @@@ F:      Documentation/gcc-plugins.tx
  
  GASKET DRIVER FRAMEWORK
  M:    Rob Springer <rspringer@google.com>
 -M:    John Joseph <jnjoseph@google.com>
 +M:    Todd Poynor <toddpoynor@google.com>
  M:    Ben Chan <benchan@chromium.org>
  S:    Maintained
  F:    drivers/staging/gasket/
@@@ -6490,7 -6451,6 +6490,7 @@@ F:      Documentation/devicetree/bindings/hw
  F:    Documentation/hwmon/
  F:    drivers/hwmon/
  F:    include/linux/hwmon*.h
 +F:    include/trace/events/hwmon*.h
  
  HARDWARE RANDOM NUMBER GENERATOR CORE
  M:    Matt Mackall <mpm@selenic.com>
@@@ -6799,12 -6759,6 +6799,12 @@@ S:    Maintaine
  F:    mm/memory-failure.c
  F:    mm/hwpoison-inject.c
  
 +HYGON PROCESSOR SUPPORT
 +M:    Pu Wen <puwen@hygon.cn>
 +L:    linux-kernel@vger.kernel.org
 +S:    Maintained
 +F:    arch/x86/kernel/cpu/hygon.c
 +
  Hyper-V CORE AND DRIVERS
  M:    "K. Y. Srinivasan" <kys@microsoft.com>
  M:    Haiyang Zhang <haiyangz@microsoft.com>
@@@ -7061,20 -7015,6 +7061,20 @@@ F:    drivers/crypto/vmx/aes
  F:    drivers/crypto/vmx/ghash*
  F:    drivers/crypto/vmx/ppc-xlate.pl
  
 +IBM Power PCI Hotplug Driver for RPA-compliant PPC64 platform
 +M:    Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
 +L:    linux-pci@vger.kernel.org
 +L:    linuxppc-dev@lists.ozlabs.org
 +S:    Supported
 +F:    drivers/pci/hotplug/rpaphp*
 +
 +IBM Power IO DLPAR Driver for RPA-compliant PPC64 platform
 +M:    Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
 +L:    linux-pci@vger.kernel.org
 +L:    linuxppc-dev@lists.ozlabs.org
 +S:    Supported
 +F:    drivers/pci/hotplug/rpadlpar*
 +
  IBM ServeRAID RAID DRIVER
  S:    Orphan
  F:    drivers/scsi/ips.*
@@@ -7384,16 -7324,15 +7384,16 @@@ T:   git git://git.kernel.org/pub/scm/lin
  S:    Supported
  F:    Documentation/networking/e100.rst
  F:    Documentation/networking/e1000.rst
 -F:    Documentation/networking/e1000e.txt
 -F:    Documentation/networking/igb.txt
 -F:    Documentation/networking/igbvf.txt
 -F:    Documentation/networking/ixgb.txt
 -F:    Documentation/networking/ixgbe.txt
 -F:    Documentation/networking/ixgbevf.txt
 -F:    Documentation/networking/i40e.txt
 -F:    Documentation/networking/i40evf.txt
 -F:    Documentation/networking/ice.txt
 +F:    Documentation/networking/e1000e.rst
 +F:    Documentation/networking/fm10k.rst
 +F:    Documentation/networking/igb.rst
 +F:    Documentation/networking/igbvf.rst
 +F:    Documentation/networking/ixgb.rst
 +F:    Documentation/networking/ixgbe.rst
 +F:    Documentation/networking/ixgbevf.rst
 +F:    Documentation/networking/i40e.rst
 +F:    Documentation/networking/iavf.rst
 +F:    Documentation/networking/ice.rst
  F:    drivers/net/ethernet/intel/
  F:    drivers/net/ethernet/intel/*/
  F:    include/linux/avf/virtchnl.h
@@@ -7415,12 -7354,6 +7415,12 @@@ T:    git https://github.com/intel/gvt-lin
  S:    Supported
  F:    drivers/gpu/drm/i915/gvt/
  
 +INTEL PMIC GPIO DRIVER
 +R:    Andy Shevchenko <andriy.shevchenko@linux.intel.com>
 +S:    Maintained
 +F:    drivers/gpio/gpio-*cove.c
 +F:    drivers/gpio/gpio-msic.c
 +
  INTEL HID EVENT DRIVER
  M:    Alex Hung <alex.hung@canonical.com>
  L:    platform-driver-x86@vger.kernel.org
@@@ -7547,14 -7480,6 +7547,14 @@@ F:    drivers/platform/x86/intel_punit_ipc
  F:    arch/x86/include/asm/intel_pmc_ipc.h
  F:    arch/x86/include/asm/intel_punit_ipc.h
  
 +INTEL MULTIFUNCTION PMIC DEVICE DRIVERS
 +R:    Andy Shevchenko <andriy.shevchenko@linux.intel.com>
 +S:    Maintained
 +F:    drivers/mfd/intel_msic.c
 +F:    drivers/mfd/intel_soc_pmic*
 +F:    include/linux/mfd/intel_msic.h
 +F:    include/linux/mfd/intel_soc_pmic*
 +
  INTEL PRO/WIRELESS 2100, 2200BG, 2915ABG NETWORK CONNECTION SUPPORT
  M:    Stanislav Yakovlev <stas.yakovlev@gmail.com>
  L:    linux-wireless@vger.kernel.org
@@@ -7693,7 -7618,6 +7693,7 @@@ M:      Corey Minyard <minyard@acm.org
  L:    openipmi-developer@lists.sourceforge.net (moderated for non-subscribers)
  W:    http://openipmi.sourceforge.net/
  S:    Supported
 +F:    Documentation/devicetree/bindings/ipmi/
  F:    Documentation/IPMI.txt
  F:    drivers/char/ipmi/
  F:    include/linux/ipmi*
@@@ -8242,25 -8166,6 +8242,25 @@@ S:    Maintaine
  F:    net/l3mdev
  F:    include/net/l3mdev.h
  
 +L7 BPF FRAMEWORK
 +M:    John Fastabend <john.fastabend@gmail.com>
 +M:    Daniel Borkmann <daniel@iogearbox.net>
 +L:    netdev@vger.kernel.org
 +S:    Maintained
 +F:    include/linux/skmsg.h
 +F:    net/core/skmsg.c
 +F:    net/core/sock_map.c
 +F:    net/ipv4/tcp_bpf.c
 +
 +LANTIQ / INTEL Ethernet drivers
 +M:    Hauke Mehrtens <hauke@hauke-m.de>
 +L:    netdev@vger.kernel.org
 +S:    Maintained
 +F:    net/dsa/tag_gswip.c
 +F:    drivers/net/ethernet/lantiq_xrx200.c
 +F:    drivers/net/dsa/lantiq_pce.h
 +F:    drivers/net/dsa/lantiq_gswip.c
 +
  LANTIQ MIPS ARCHITECTURE
  M:    John Crispin <john@phrozen.org>
  L:    linux-mips@linux-mips.org
@@@ -8350,9 -8255,9 +8350,9 @@@ F:      drivers/ata/pata_arasan_cf.
  
  LIBATA PATA DRIVERS
  M:    Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
 -M:    Jens Axboe <kernel.dk>
 +M:    Jens Axboe <axboe@kernel.dk>
  L:    linux-ide@vger.kernel.org
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata.git
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git
  S:    Maintained
  F:    drivers/ata/pata_*.c
  F:    drivers/ata/ata_generic.c
@@@ -8370,7 -8275,7 +8370,7 @@@ LIBATA SATA AHCI PLATFORM devices suppo
  M:    Hans de Goede <hdegoede@redhat.com>
  M:    Jens Axboe <axboe@kernel.dk>
  L:    linux-ide@vger.kernel.org
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata.git
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git
  S:    Maintained
  F:    drivers/ata/ahci_platform.c
  F:    drivers/ata/libahci_platform.c
@@@ -8386,7 -8291,7 +8386,7 @@@ F:      drivers/ata/sata_promise.
  LIBATA SUBSYSTEM (Serial and Parallel ATA drivers)
  M:    Jens Axboe <axboe@kernel.dk>
  L:    linux-ide@vger.kernel.org
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata.git
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git
  S:    Maintained
  F:    drivers/ata/
  F:    include/linux/ata.h
@@@ -8394,7 -8299,7 +8394,7 @@@ F:      include/linux/libata.
  F:    Documentation/devicetree/bindings/ata/
  
  LIBLOCKDEP
 -M:    Sasha Levin <alexander.levin@verizon.com>
 +M:    Sasha Levin <alexander.levin@microsoft.com>
  S:    Maintained
  F:    tools/lib/lockdep/
  
@@@ -8676,6 -8581,7 +8676,6 @@@ F:      include/linux/spinlock*.
  F:    arch/*/include/asm/spinlock*.h
  F:    include/linux/rwlock*.h
  F:    include/linux/mutex*.h
 -F:    arch/*/include/asm/mutex*.h
  F:    include/linux/rwsem*.h
  F:    arch/*/include/asm/rwsem.h
  F:    include/linux/seqlock.h
@@@ -8821,7 -8727,7 +8821,7 @@@ M:      Vivien Didelot <vivien.didelot@savoi
  L:    netdev@vger.kernel.org
  S:    Maintained
  F:    drivers/net/dsa/mv88e6xxx/
 -F:    linux/platform_data/mv88e6xxx.h
 +F:    include/linux/platform_data/mv88e6xxx.h
  F:    Documentation/devicetree/bindings/net/dsa/marvell.txt
  
  MARVELL ARMADA DRM SUPPORT
@@@ -8911,15 -8817,6 +8911,15 @@@ S:    Supporte
  F:    drivers/mmc/host/sdhci-xenon*
  F:    Documentation/devicetree/bindings/mmc/marvell,xenon-sdhci.txt
  
 +MARVELL OCTEONTX2 RVU ADMIN FUNCTION DRIVER
 +M:    Sunil Goutham <sgoutham@marvell.com>
 +M:    Linu Cherian <lcherian@marvell.com>
 +M:    Geetha sowjanya <gakula@marvell.com>
 +M:    Jerin Jacob <jerinj@marvell.com>
 +L:    netdev@vger.kernel.org
 +S:    Supported
 +F:    drivers/net/ethernet/marvell/octeontx2/af/
 +
  MATROX FRAMEBUFFER DRIVER
  L:    linux-fbdev@vger.kernel.org
  S:    Orphan
@@@ -8933,6 -8830,13 +8933,6 @@@ S:     Maintaine
  F:    Documentation/hwmon/max16065
  F:    drivers/hwmon/max16065.c
  
 -MAX20751 HARDWARE MONITOR DRIVER
 -M:    Guenter Roeck <linux@roeck-us.net>
 -L:    linux-hwmon@vger.kernel.org
 -S:    Maintained
 -F:    Documentation/hwmon/max20751
 -F:    drivers/hwmon/max20751.c
 -
  MAX2175 SDR TUNER DRIVER
  M:    Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
  L:    linux-media@vger.kernel.org
@@@ -9598,7 -9502,6 +9598,7 @@@ M:      Richard Genoud <richard.genoud@gmail
  S:    Maintained
  F:    drivers/tty/serial/atmel_serial.c
  F:    drivers/tty/serial/atmel_serial.h
 +F:    Documentation/devicetree/bindings/mfd/atmel-usart.txt
  
  MICROCHIP / ATMEL DMA DRIVER
  M:    Ludovic Desroches <ludovic.desroches@microchip.com>
@@@ -9630,21 -9533,6 +9630,21 @@@ S:    Supporte
  F:    drivers/mtd/nand/raw/atmel/*
  F:    Documentation/devicetree/bindings/mtd/atmel-nand.txt
  
 +MICROCHIP AT91 USART MFD DRIVER
 +M:    Radu Pirea <radu_nicolae.pirea@upb.ro>
 +L:    linux-kernel@vger.kernel.org
 +S:    Supported
 +F:    drivers/mfd/at91-usart.c
 +F:    include/dt-bindings/mfd/at91-usart.h
 +F:    Documentation/devicetree/bindings/mfd/atmel-usart.txt
 +
 +MICROCHIP AT91 USART SPI DRIVER
 +M:    Radu Pirea <radu_nicolae.pirea@upb.ro>
 +L:    linux-spi@vger.kernel.org
 +S:    Supported
 +F:    drivers/spi/spi-at91-usart.c
 +F:    Documentation/devicetree/bindings/mfd/atmel-usart.txt
 +
  MICROCHIP KSZ SERIES ETHERNET SWITCH DRIVER
  M:    Woojung Huh <Woojung.Huh@microchip.com>
  M:    Microchip Linux Driver Support <UNGLinuxDriver@microchip.com>
@@@ -9753,8 -9641,7 +9753,8 @@@ MIPS/LOONGSON2 ARCHITECTUR
  M:    Jiaxun Yang <jiaxun.yang@flygoat.com>
  L:    linux-mips@linux-mips.org
  S:    Maintained
 -F:    arch/mips/loongson64/*{2e/2f}*
 +F:    arch/mips/loongson64/fuloong-2e/
 +F:    arch/mips/loongson64/lemote-2f/
  F:    arch/mips/include/asm/mach-loongson64/
  F:    drivers/*/*loongson2*
  F:    drivers/*/*/*loongson2*
@@@ -9794,19 -9681,6 +9794,19 @@@ S:    Maintaine
  F:    arch/arm/boot/dts/mmp*
  F:    arch/arm/mach-mmp/
  
 +MMU GATHER AND TLB INVALIDATION
 +M:    Will Deacon <will.deacon@arm.com>
 +M:    "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
 +M:    Andrew Morton <akpm@linux-foundation.org>
 +M:    Nick Piggin <npiggin@gmail.com>
 +M:    Peter Zijlstra <peterz@infradead.org>
 +L:    linux-arch@vger.kernel.org
 +L:    linux-mm@kvack.org
 +S:    Maintained
 +F:    arch/*/include/asm/tlb.h
 +F:    include/asm-generic/tlb.h
 +F:    mm/mmu_gather.c
 +
  MN88472 MEDIA DRIVER
  M:    Antti Palosaari <crope@iki.fi>
  L:    linux-media@vger.kernel.org
@@@ -9825,6 -9699,13 +9825,6 @@@ Q:     http://patchwork.linuxtv.org/project
  S:    Maintained
  F:    drivers/media/dvb-frontends/mn88473*
  
 -PCI DRIVER FOR MOBIVEIL PCIE IP
 -M:    Subrahmanya Lingappa <l.subrahmanya@mobiveil.co.in>
 -L:    linux-pci@vger.kernel.org
 -S:    Supported
 -F:    Documentation/devicetree/bindings/pci/mobiveil-pcie.txt
 -F:    drivers/pci/controller/pcie-mobiveil.c
 -
  MODULE SUPPORT
  M:    Jessica Yu <jeyu@kernel.org>
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux.git modules-next
@@@ -9974,7 -9855,7 +9974,7 @@@ M:      Peter Rosin <peda@axentia.se
  S:    Maintained
  F:    Documentation/ABI/testing/sysfs-class-mux*
  F:    Documentation/devicetree/bindings/mux/
 -F:    include/linux/dt-bindings/mux/
 +F:    include/dt-bindings/mux/
  F:    include/linux/mux/
  F:    drivers/mux/
  
@@@ -10011,13 -9892,6 +10011,13 @@@ S:  Supporte
  F:    drivers/gpu/drm/mxsfb/
  F:    Documentation/devicetree/bindings/display/mxsfb.txt
  
 +MYLEX DAC960 PCI RAID Controller
 +M:    Hannes Reinecke <hare@kernel.org>
 +L:    linux-scsi@vger.kernel.org
 +S:    Supported
 +F:    drivers/scsi/myrb.*
 +F:    drivers/scsi/myrs.*
 +
  MYRICOM MYRI-10G 10GbE DRIVER (MYRI10GE)
  M:    Chris Lee <christopher.lee@cspi.com>
  L:    netdev@vger.kernel.org
@@@ -10238,6 -10112,7 +10238,6 @@@ L:   netdev@vger.kernel.or
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec.git
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-next.git
  S:    Maintained
 -F:    net/core/flow.c
  F:    net/xfrm/
  F:    net/key/
  F:    net/ipv4/xfrm*
@@@ -10300,8 -10175,6 +10300,8 @@@ NETWORKING [TLS
  M:    Boris Pismenny <borisp@mellanox.com>
  M:    Aviad Yehezkel <aviadye@mellanox.com>
  M:    Dave Watson <davejwatson@fb.com>
 +M:    John Fastabend <john.fastabend@gmail.com>
 +M:    Daniel Borkmann <daniel@iogearbox.net>
  L:    netdev@vger.kernel.org
  S:    Maintained
  F:    net/tls/*
@@@ -11059,7 -10932,7 +11059,7 @@@ M:   Willy Tarreau <willy@haproxy.com
  M:    Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
  S:    Odd Fixes
  F:    Documentation/auxdisplay/lcd-panel-cgram.txt
 -F:    drivers/misc/panel.c
 +F:    drivers/auxdisplay/panel.c
  
  PARALLEL PORT SUBSYSTEM
  M:    Sudip Mukherjee <sudipm.mukherjee@gmail.com>
@@@ -11247,13 -11120,6 +11247,13 @@@ F: include/uapi/linux/switchtec_ioctl.
  F:    include/linux/switchtec.h
  F:    drivers/ntb/hw/mscc/
  
 +PCI DRIVER FOR MOBIVEIL PCIE IP
 +M:    Subrahmanya Lingappa <l.subrahmanya@mobiveil.co.in>
 +L:    linux-pci@vger.kernel.org
 +S:    Supported
 +F:    Documentation/devicetree/bindings/pci/mobiveil-pcie.txt
 +F:    drivers/pci/controller/pcie-mobiveil.c
 +
  PCI DRIVER FOR MVEBU (Marvell Armada 370 and Armada XP SOC support)
  M:    Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  M:    Jason Cooper <jason@lakedaemon.net>
@@@ -11287,7 -11153,7 +11287,7 @@@ F:   drivers/pci/controller/dwc/pci-exyno
  
  PCI DRIVER FOR SYNOPSYS DESIGNWARE
  M:    Jingoo Han <jingoohan1@gmail.com>
 -M:    Joao Pinto <Joao.Pinto@synopsys.com>
 +M:    Gustavo Pimentel <gustavo.pimentel@synopsys.com>
  L:    linux-pci@vger.kernel.org
  S:    Maintained
  F:    Documentation/devicetree/bindings/pci/designware-pcie.txt
@@@ -11306,7 -11172,7 +11306,7 @@@ M:   Murali Karicheri <m-karicheri2@ti.co
  L:    linux-pci@vger.kernel.org
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  S:    Maintained
 -F:    drivers/pci/controller/dwc/*keystone*
 +F:    drivers/pci/controller/dwc/pci-keystone.c
  
  PCI ENDPOINT SUBSYSTEM
  M:    Kishon Vijay Abraham I <kishon@ti.com>
@@@ -11320,14 -11186,8 +11320,14 @@@ F: tools/pci
  
  PCI ENHANCED ERROR HANDLING (EEH) FOR POWERPC
  M:    Russell Currey <ruscur@russell.cc>
 +M:    Sam Bobroff <sbobroff@linux.ibm.com>
 +M:    Oliver O'Halloran <oohall@gmail.com>
  L:    linuxppc-dev@lists.ozlabs.org
  S:    Supported
 +F:    Documentation/PCI/pci-error-recovery.txt
 +F:    drivers/pci/pcie/aer.c
 +F:    drivers/pci/pcie/dpc.c
 +F:    drivers/pci/pcie/err.c
  F:    Documentation/powerpc/eeh-pci-error-recovery.txt
  F:    arch/powerpc/kernel/eeh*.c
  F:    arch/powerpc/platforms/*/eeh*.c
@@@ -11485,10 -11345,10 +11485,10 @@@ S:        Maintaine
  F:    drivers/platform/x86/peaq-wmi.c
  
  PER-CPU MEMORY ALLOCATOR
 +M:    Dennis Zhou <dennis@kernel.org>
  M:    Tejun Heo <tj@kernel.org>
  M:    Christoph Lameter <cl@linux.com>
 -M:    Dennis Zhou <dennisszhou@gmail.com>
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu.git
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/dennis/percpu.git
  S:    Maintained
  F:    include/linux/percpu*.h
  F:    mm/percpu*.c
@@@ -11606,12 -11466,15 +11606,12 @@@ S:        Maintaine
  F:    drivers/pinctrl/intel/
  
  PIN CONTROLLER - MEDIATEK
 -M:    Sean Wang <sean.wang@mediatek.com>
 +M:    Sean Wang <sean.wang@kernel.org>
  L:    linux-mediatek@lists.infradead.org (moderated for non-subscribers)
  S:    Maintained
  F:    Documentation/devicetree/bindings/pinctrl/pinctrl-mt65xx.txt
  F:    Documentation/devicetree/bindings/pinctrl/pinctrl-mt7622.txt
 -F:    drivers/pinctrl/mediatek/mtk-eint.*
 -F:    drivers/pinctrl/mediatek/pinctrl-mtk-common.*
 -F:    drivers/pinctrl/mediatek/pinctrl-mt2701.c
 -F:    drivers/pinctrl/mediatek/pinctrl-mt7622.c
 +F:    drivers/pinctrl/mediatek/
  
  PIN CONTROLLER - QUALCOMM
  M:    Bjorn Andersson <bjorn.andersson@linaro.org>
@@@ -11689,26 -11552,7 +11689,26 @@@ W: http://hwmon.wiki.kernel.org
  W:    http://www.roeck-us.net/linux/drivers/
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git
  S:    Maintained
 +F:    Documentation/devicetree/bindings/hwmon/ibm,cffps1.txt
 +F:    Documentation/devicetree/bindings/hwmon/max31785.txt
 +F:    Documentation/devicetree/bindings/hwmon/ltc2978.txt
 +F:    Documentation/hwmon/adm1275
 +F:    Documentation/hwmon/ibm-cffps
 +F:    Documentation/hwmon/ir35221
 +F:    Documentation/hwmon/lm25066
 +F:    Documentation/hwmon/ltc2978
 +F:    Documentation/hwmon/ltc3815
 +F:    Documentation/hwmon/max16064
 +F:    Documentation/hwmon/max20751
 +F:    Documentation/hwmon/max31785
 +F:    Documentation/hwmon/max34440
 +F:    Documentation/hwmon/max8688
  F:    Documentation/hwmon/pmbus
 +F:    Documentation/hwmon/pmbus-core
 +F:    Documentation/hwmon/tps40422
 +F:    Documentation/hwmon/ucd9000
 +F:    Documentation/hwmon/ucd9200
 +F:    Documentation/hwmon/zl6100
  F:    drivers/hwmon/pmbus/
  F:    include/linux/pmbus.h
  
@@@ -12112,7 -11956,7 +12112,7 @@@ F:   Documentation/scsi/LICENSE.qla4xx
  F:    drivers/scsi/qla4xxx/
  
  QLOGIC QLCNIC (1/10)Gb ETHERNET DRIVER
 -M:    Harish Patil <harish.patil@cavium.com>
 +M:    Shahed Shaikh <Shahed.Shaikh@cavium.com>
  M:    Manish Chopra <manish.chopra@cavium.com>
  M:    Dept-GELinuxNICDev@cavium.com
  L:    netdev@vger.kernel.org
@@@ -12120,6 -11964,7 +12120,6 @@@ S:   Supporte
  F:    drivers/net/ethernet/qlogic/qlcnic/
  
  QLOGIC QLGE 10Gb ETHERNET DRIVER
 -M:    Harish Patil <harish.patil@cavium.com>
  M:    Manish Chopra <manish.chopra@cavium.com>
  M:    Dept-GELinuxNICDev@cavium.com
  L:    netdev@vger.kernel.org
@@@ -12398,7 -12243,6 +12398,7 @@@ F:   Documentation/networking/rds.tx
  
  RDT - RESOURCE ALLOCATION
  M:    Fenghua Yu <fenghua.yu@intel.com>
 +M:    Reinette Chatre <reinette.chatre@intel.com>
  L:    linux-kernel@vger.kernel.org
  S:    Supported
  F:    arch/x86/kernel/cpu/intel_rdt*
@@@ -13195,7 -13039,7 +13195,7 @@@ SELINUX SECURITY MODUL
  M:    Paul Moore <paul@paul-moore.com>
  M:    Stephen Smalley <sds@tycho.nsa.gov>
  M:    Eric Paris <eparis@parisplace.org>
 -L:    selinux@tycho.nsa.gov (moderated for non-subscribers)
 +L:    selinux@vger.kernel.org
  W:    https://selinuxproject.org
  W:    https://github.com/SELinuxProject
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux.git
@@@ -13439,7 -13283,6 +13439,7 @@@ M:   Uwe Kleine-König <u.kleine-koenig@p
  R:    Pengutronix Kernel Team <kernel@pengutronix.de>
  S:    Supported
  F:    drivers/siox/*
 +F:    drivers/gpio/gpio-siox.c
  F:    include/trace/events/siox.h
  
  SIS 190 ETHERNET DRIVER
@@@ -13589,8 -13432,9 +13589,8 @@@ F:   drivers/i2c/busses/i2c-synquacer.
  F:    Documentation/devicetree/bindings/i2c/i2c-synquacer.txt
  
  SOCIONEXT UNIPHIER SOUND DRIVER
 -M:    Katsuhiro Suzuki <suzuki.katsuhiro@socionext.com>
  L:    alsa-devel@alsa-project.org (moderated for non-subscribers)
 -S:    Maintained
 +S:    Orphan
  F:    sound/soc/uniphier/
  
  SOEKRIS NET48XX LED SUPPORT
@@@ -13623,8 -13467,8 +13623,8 @@@ L:   linux-arm-kernel@lists.infradead.or
  S:    Maintained
  F:    Documentation/devicetree/bindings/arm/firmware/sdei.txt
  F:    drivers/firmware/arm_sdei.c
 -F:    include/linux/sdei.h
 -F:    include/uapi/linux/sdei.h
 +F:    include/linux/arm_sdei.h
 +F:    include/uapi/linux/arm_sdei.h
  
  SOFTWARE RAID (Multiple Disks) SUPPORT
  M:    Shaohua Li <shli@kernel.org>
@@@ -14167,12 -14011,6 +14167,12 @@@ S: Supporte
  F:    drivers/reset/reset-axs10x.c
  F:    Documentation/devicetree/bindings/reset/snps,axs10x-reset.txt
  
 +SYNOPSYS CREG GPIO DRIVER
 +M:    Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
 +S:    Maintained
 +F:    drivers/gpio/gpio-creg-snps.c
 +F:    Documentation/devicetree/bindings/gpio/snps,creg-gpio.txt
 +
  SYNOPSYS DESIGNWARE 8250 UART DRIVER
  R:    Andy Shevchenko <andriy.shevchenko@linux.intel.com>
  S:    Maintained
@@@ -14759,13 -14597,6 +14759,13 @@@ L: netdev@vger.kernel.or
  S:    Maintained
  F:    drivers/net/ethernet/ti/netcp*
  
 +TI PCM3060 ASoC CODEC DRIVER
 +M:    Kirill Marinushkin <kmarinushkin@birdec.tech>
 +L:    alsa-devel@alsa-project.org (moderated for non-subscribers)
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/sound/pcm3060.txt
 +F:    sound/soc/codecs/pcm3060*
 +
  TI TAS571X FAMILY ASoC CODEC DRIVER
  M:    Kevin Cernekee <cernekee@chromium.org>
  L:    alsa-devel@alsa-project.org (moderated for non-subscribers)
@@@ -15541,7 -15372,7 +15541,7 @@@ S:   Maintaine
  UVESAFB DRIVER
  M:    Michal Januszewski <spock@gentoo.org>
  L:    linux-fbdev@vger.kernel.org
 -W:    http://dev.gentoo.org/~spock/projects/uvesafb/
 +W:    https://github.com/mjanusz/v86d
  S:    Maintained
  F:    Documentation/fb/uvesafb.txt
  F:    drivers/video/fbdev/uvesafb.*
@@@ -15854,7 -15685,7 +15854,7 @@@ F:   include/linux/regulator
  
  VRF
  M:    David Ahern <dsa@cumulusnetworks.com>
 -M:    Shrijeet Mukherjee <shm@cumulusnetworks.com>
 +M:    Shrijeet Mukherjee <shrijeet@gmail.com>
  L:    netdev@vger.kernel.org
  S:    Maintained
  F:    drivers/net/vrf.c
@@@ -16065,7 -15896,6 +16065,7 @@@ F:   net/x25
  X86 ARCHITECTURE (32-BIT AND 64-BIT)
  M:    Thomas Gleixner <tglx@linutronix.de>
  M:    Ingo Molnar <mingo@redhat.com>
 +M:    Borislav Petkov <bp@alien8.de>
  R:    "H. Peter Anvin" <hpa@zytor.com>
  M:    x86@kernel.org
  L:    linux-kernel@vger.kernel.org
@@@ -16094,15 -15924,6 +16094,15 @@@ M: Borislav Petkov <bp@alien8.de
  S:    Maintained
  F:    arch/x86/kernel/cpu/microcode/*
  
 +X86 MM
 +M:    Dave Hansen <dave.hansen@linux.intel.com>
 +M:    Andy Lutomirski <luto@kernel.org>
 +M:    Peter Zijlstra <peterz@infradead.org>
 +L:    linux-kernel@vger.kernel.org
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/mm
 +S:    Maintained
 +F:    arch/x86/mm/
 +
  X86 PLATFORM DRIVERS
  M:    Darren Hart <dvhart@infradead.org>
  M:    Andy Shevchenko <andy@infradead.org>
@@@ -25,6 -25,8 +25,8 @@@
  #include <linux/sched.h>
  #include <linux/sched/task_stack.h>
  
+ #include <asm-generic/compat.h>
  #define COMPAT_USER_HZ                100
  #ifdef __AARCH64EB__
  #define COMPAT_UTS_MACHINE    "armv8b\0\0"
  #define COMPAT_UTS_MACHINE    "armv8l\0\0"
  #endif
  
- typedef u32           compat_size_t;
- typedef s32           compat_ssize_t;
- typedef s32           compat_clock_t;
- typedef s32           compat_pid_t;
  typedef u16           __compat_uid_t;
  typedef u16           __compat_gid_t;
  typedef u16           __compat_uid16_t;
@@@ -43,27 -41,13 +41,13 @@@ typedef u16                __compat_gid16_t
  typedef u32           __compat_uid32_t;
  typedef u32           __compat_gid32_t;
  typedef u16           compat_mode_t;
- typedef u32           compat_ino_t;
  typedef u32           compat_dev_t;
- typedef s32           compat_off_t;
- typedef s64           compat_loff_t;
  typedef s32           compat_nlink_t;
  typedef u16           compat_ipc_pid_t;
- typedef s32           compat_daddr_t;
  typedef u32           compat_caddr_t;
  typedef __kernel_fsid_t       compat_fsid_t;
- typedef s32           compat_key_t;
- typedef s32           compat_timer_t;
- typedef s16           compat_short_t;
- typedef s32           compat_int_t;
- typedef s32           compat_long_t;
  typedef s64           compat_s64;
- typedef u16           compat_ushort_t;
- typedef u32           compat_uint_t;
- typedef u32           compat_ulong_t;
  typedef u64           compat_u64;
- typedef u32           compat_uptr_t;
  
  struct compat_stat {
  #ifdef __AARCH64EB__
        compat_off_t    st_size;
        compat_off_t    st_blksize;
        compat_off_t    st_blocks;
-       compat_time_t   st_atime;
+       old_time32_t    st_atime;
        compat_ulong_t  st_atime_nsec;
-       compat_time_t   st_mtime;
+       old_time32_t    st_mtime;
        compat_ulong_t  st_mtime_nsec;
-       compat_time_t   st_ctime;
+       old_time32_t    st_ctime;
        compat_ulong_t  st_ctime_nsec;
        compat_ulong_t  __unused4[2];
  };
@@@ -159,7 -143,6 +143,7 @@@ static inline compat_uptr_t ptr_to_comp
  }
  
  #define compat_user_stack_pointer() (user_stack_pointer(task_pt_regs(current)))
 +#define COMPAT_MINSIGSTKSZ    2048
  
  static inline void __user *arch_compat_alloc_user_space(long len)
  {
  #include <asm/user32.h>
  #include <asm/unistd.h>
  
+ #include <asm-generic/compat.h>
  #define COMPAT_USER_HZ                100
  #define COMPAT_UTS_MACHINE    "i686\0\0"
  
- typedef u32           compat_size_t;
- typedef s32           compat_ssize_t;
- typedef s32           compat_clock_t;
- typedef s32           compat_pid_t;
  typedef u16           __compat_uid_t;
  typedef u16           __compat_gid_t;
  typedef u32           __compat_uid32_t;
  typedef u32           __compat_gid32_t;
  typedef u16           compat_mode_t;
- typedef u32           compat_ino_t;
  typedef u16           compat_dev_t;
- typedef s32           compat_off_t;
- typedef s64           compat_loff_t;
  typedef u16           compat_nlink_t;
  typedef u16           compat_ipc_pid_t;
- typedef s32           compat_daddr_t;
  typedef u32           compat_caddr_t;
  typedef __kernel_fsid_t       compat_fsid_t;
- typedef s32           compat_timer_t;
- typedef s32           compat_key_t;
- typedef s32           compat_int_t;
- typedef s32           compat_long_t;
  typedef s64 __attribute__((aligned(4))) compat_s64;
- typedef u32           compat_uint_t;
- typedef u32           compat_ulong_t;
- typedef u32           compat_u32;
  typedef u64 __attribute__((aligned(4))) compat_u64;
- typedef u32           compat_uptr_t;
  
  struct compat_stat {
        compat_dev_t    st_dev;
@@@ -240,6 -225,6 +225,6 @@@ static inline bool in_compat_syscall(vo
  
  struct compat_siginfo;
  int __copy_siginfo_to_user32(struct compat_siginfo __user *to,
 -              const siginfo_t *from, bool x32_ABI);
 +              const kernel_siginfo_t *from, bool x32_ABI);
  
  #endif /* _ASM_X86_COMPAT_H */
diff --combined fs/read_write.c
@@@ -331,7 -331,7 +331,7 @@@ COMPAT_SYSCALL_DEFINE3(lseek, unsigned 
  }
  #endif
  
- #ifdef __ARCH_WANT_SYS_LLSEEK
+ #if !defined(CONFIG_64BIT) || defined(CONFIG_COMPAT)
  SYSCALL_DEFINE5(llseek, unsigned int, fd, unsigned long, offset_high,
                unsigned long, offset_low, loff_t __user *, result,
                unsigned int, whence)
@@@ -1818,8 -1818,8 +1818,8 @@@ int vfs_clone_file_prep_inodes(struct i
  }
  EXPORT_SYMBOL(vfs_clone_file_prep_inodes);
  
 -int vfs_clone_file_range(struct file *file_in, loff_t pos_in,
 -              struct file *file_out, loff_t pos_out, u64 len)
 +int do_clone_file_range(struct file *file_in, loff_t pos_in,
 +                      struct file *file_out, loff_t pos_out, u64 len)
  {
        struct inode *inode_in = file_inode(file_in);
        struct inode *inode_out = file_inode(file_out);
  
        return ret;
  }
 +EXPORT_SYMBOL(do_clone_file_range);
 +
 +int vfs_clone_file_range(struct file *file_in, loff_t pos_in,
 +                       struct file *file_out, loff_t pos_out, u64 len)
 +{
 +      int ret;
 +
 +      file_start_write(file_out);
 +      ret = do_clone_file_range(file_in, pos_in, file_out, pos_out, len);
 +      file_end_write(file_out);
 +
 +      return ret;
 +}
  EXPORT_SYMBOL(vfs_clone_file_range);
  
  /*
@@@ -241,11 -241,6 +241,11 @@@ static inline void __clocksource_update
        __clocksource_update_freq_scale(cs, 1000, khz);
  }
  
 +#ifdef CONFIG_ARCH_CLOCKSOURCE_INIT
 +extern void clocksource_arch_init(struct clocksource *cs);
 +#else
 +static inline void clocksource_arch_init(struct clocksource *cs) { }
 +#endif
  
  extern int timekeeping_notify(struct clocksource *clock);
  
@@@ -262,9 -257,6 +262,6 @@@ extern int clocksource_i8253_init(void)
  #define TIMER_OF_DECLARE(name, compat, fn) \
        OF_DECLARE_1_RET(timer, name, compat, fn)
  
- #define CLOCKSOURCE_OF_DECLARE(name, compat, fn) \
-       TIMER_OF_DECLARE(name, compat, fn)
  #ifdef CONFIG_TIMER_PROBE
  extern void timer_probe(void);
  #else
diff --combined include/linux/compat.h
@@@ -7,7 -7,7 +7,7 @@@
   */
  
  #include <linux/types.h>
- #include <linux/compat_time.h>
+ #include <linux/time.h>
  
  #include <linux/stat.h>
  #include <linux/param.h>      /* for HZ */
@@@ -103,9 -103,6 +103,9 @@@ typedef struct compat_sigaltstack 
        compat_size_t                   ss_size;
  } compat_stack_t;
  #endif
 +#ifndef COMPAT_MINSIGSTKSZ
 +#define COMPAT_MINSIGSTKSZ    MINSIGSTKSZ
 +#endif
  
  #define compat_jiffies_to_clock_t(x)  \
                (((unsigned long)(x) * COMPAT_USER_HZ) / HZ)
  typedef __compat_uid32_t      compat_uid_t;
  typedef __compat_gid32_t      compat_gid_t;
  
- typedef       compat_ulong_t          compat_aio_context_t;
  struct compat_sel_arg_struct;
  struct rusage;
  
- struct compat_utimbuf {
-       compat_time_t           actime;
-       compat_time_t           modtime;
- };
  struct compat_itimerval {
-       struct compat_timeval   it_interval;
-       struct compat_timeval   it_value;
+       struct old_timeval32    it_interval;
+       struct old_timeval32    it_value;
  };
  
  struct itimerval;
@@@ -149,7 -139,7 +142,7 @@@ struct compat_timex 
        compat_long_t constant;
        compat_long_t precision;
        compat_long_t tolerance;
-       struct compat_timeval time;
+       struct old_timeval32 time;
        compat_long_t tick;
        compat_long_t ppsfreq;
        compat_long_t jitter;
@@@ -310,8 -300,8 +303,8 @@@ struct compat_rlimit 
  };
  
  struct compat_rusage {
-       struct compat_timeval ru_utime;
-       struct compat_timeval ru_stime;
+       struct old_timeval32 ru_utime;
+       struct old_timeval32 ru_stime;
        compat_long_t   ru_maxrss;
        compat_long_t   ru_ixrss;
        compat_long_t   ru_idrss;
@@@ -455,13 -445,13 +448,13 @@@ long compat_get_bitmap(unsigned long *m
                       unsigned long bitmap_size);
  long compat_put_bitmap(compat_ulong_t __user *umask, unsigned long *mask,
                       unsigned long bitmap_size);
 -int copy_siginfo_from_user32(siginfo_t *to, const struct compat_siginfo __user *from);
 -int copy_siginfo_to_user32(struct compat_siginfo __user *to, const siginfo_t *from);
 +int copy_siginfo_from_user32(kernel_siginfo_t *to, const struct compat_siginfo __user *from);
 +int copy_siginfo_to_user32(struct compat_siginfo __user *to, const kernel_siginfo_t *from);
  int get_compat_sigevent(struct sigevent *event,
                const struct compat_sigevent __user *u_event);
  
- static inline int compat_timeval_compare(struct compat_timeval *lhs,
-                                       struct compat_timeval *rhs)
+ static inline int old_timeval32_compare(struct old_timeval32 *lhs,
+                                       struct old_timeval32 *rhs)
  {
        if (lhs->tv_sec < rhs->tv_sec)
                return -1;
        return lhs->tv_usec - rhs->tv_usec;
  }
  
- static inline int compat_timespec_compare(struct compat_timespec *lhs,
-                                       struct compat_timespec *rhs)
+ static inline int old_timespec32_compare(struct old_timespec32 *lhs,
+                                       struct old_timespec32 *rhs)
  {
        if (lhs->tv_sec < rhs->tv_sec)
                return -1;
@@@ -555,12 -545,12 +548,12 @@@ asmlinkage long compat_sys_io_getevents
                                        compat_long_t min_nr,
                                        compat_long_t nr,
                                        struct io_event __user *events,
-                                       struct compat_timespec __user *timeout);
+                                       struct old_timespec32 __user *timeout);
  asmlinkage long compat_sys_io_pgetevents(compat_aio_context_t ctx_id,
                                        compat_long_t min_nr,
                                        compat_long_t nr,
                                        struct io_event __user *events,
-                                       struct compat_timespec __user *timeout,
+                                       struct old_timespec32 __user *timeout,
                                        const struct __compat_aio_sigset __user *usig);
  
  /* fs/cookies.c */
@@@ -645,11 -635,11 +638,11 @@@ asmlinkage long compat_sys_sendfile64(i
  asmlinkage long compat_sys_pselect6(int n, compat_ulong_t __user *inp,
                                    compat_ulong_t __user *outp,
                                    compat_ulong_t __user *exp,
-                                   struct compat_timespec __user *tsp,
+                                   struct old_timespec32 __user *tsp,
                                    void __user *sig);
  asmlinkage long compat_sys_ppoll(struct pollfd __user *ufds,
                                 unsigned int nfds,
-                                struct compat_timespec __user *tsp,
+                                struct old_timespec32 __user *tsp,
                                 const compat_sigset_t __user *sigmask,
                                 compat_size_t sigsetsize);
  
@@@ -674,15 -664,15 +667,15 @@@ asmlinkage long compat_sys_newfstat(uns
  
  /* fs/timerfd.c */
  asmlinkage long compat_sys_timerfd_gettime(int ufd,
-                                  struct compat_itimerspec __user *otmr);
+                                  struct old_itimerspec32 __user *otmr);
  asmlinkage long compat_sys_timerfd_settime(int ufd, int flags,
-                                  const struct compat_itimerspec __user *utmr,
-                                  struct compat_itimerspec __user *otmr);
+                                  const struct old_itimerspec32 __user *utmr,
+                                  struct old_itimerspec32 __user *otmr);
  
  /* fs/utimes.c */
  asmlinkage long compat_sys_utimensat(unsigned int dfd,
                                     const char __user *filename,
-                                    struct compat_timespec __user *t,
+                                    struct old_timespec32 __user *t,
                                     int flags);
  
  /* kernel/exit.c */
@@@ -694,7 -684,7 +687,7 @@@ asmlinkage long compat_sys_waitid(int, 
  
  /* kernel/futex.c */
  asmlinkage long compat_sys_futex(u32 __user *uaddr, int op, u32 val,
-               struct compat_timespec __user *utime, u32 __user *uaddr2,
+               struct old_timespec32 __user *utime, u32 __user *uaddr2,
                u32 val3);
  asmlinkage long
  compat_sys_set_robust_list(struct compat_robust_list_head __user *head,
@@@ -704,8 -694,8 +697,8 @@@ compat_sys_get_robust_list(int pid, com
                           compat_size_t __user *len_ptr);
  
  /* kernel/hrtimer.c */
- asmlinkage long compat_sys_nanosleep(struct compat_timespec __user *rqtp,
-                                    struct compat_timespec __user *rmtp);
+ asmlinkage long compat_sys_nanosleep(struct old_timespec32 __user *rqtp,
+                                    struct old_timespec32 __user *rmtp);
  
  /* kernel/itimer.c */
  asmlinkage long compat_sys_getitimer(int which,
@@@ -725,19 -715,19 +718,19 @@@ asmlinkage long compat_sys_timer_create
                        struct compat_sigevent __user *timer_event_spec,
                        timer_t __user *created_timer_id);
  asmlinkage long compat_sys_timer_gettime(timer_t timer_id,
-                                struct compat_itimerspec __user *setting);
+                                struct old_itimerspec32 __user *setting);
  asmlinkage long compat_sys_timer_settime(timer_t timer_id, int flags,
-                                        struct compat_itimerspec __user *new,
-                                        struct compat_itimerspec __user *old);
+                                        struct old_itimerspec32 __user *new,
+                                        struct old_itimerspec32 __user *old);
  asmlinkage long compat_sys_clock_settime(clockid_t which_clock,
-                                        struct compat_timespec __user *tp);
+                                        struct old_timespec32 __user *tp);
  asmlinkage long compat_sys_clock_gettime(clockid_t which_clock,
-                                        struct compat_timespec __user *tp);
+                                        struct old_timespec32 __user *tp);
  asmlinkage long compat_sys_clock_getres(clockid_t which_clock,
-                                       struct compat_timespec __user *tp);
+                                       struct old_timespec32 __user *tp);
  asmlinkage long compat_sys_clock_nanosleep(clockid_t which_clock, int flags,
-                                          struct compat_timespec __user *rqtp,
-                                          struct compat_timespec __user *rmtp);
+                                          struct old_timespec32 __user *rqtp,
+                                          struct old_timespec32 __user *rmtp);
  
  /* kernel/ptrace.c */
  asmlinkage long compat_sys_ptrace(compat_long_t request, compat_long_t pid,
@@@ -751,7 -741,7 +744,7 @@@ asmlinkage long compat_sys_sched_getaff
                                     unsigned int len,
                                     compat_ulong_t __user *user_mask_ptr);
  asmlinkage long compat_sys_sched_rr_get_interval(compat_pid_t pid,
-                                                struct compat_timespec __user *interval);
+                                                struct old_timespec32 __user *interval);
  
  /* kernel/signal.c */
  asmlinkage long compat_sys_sigaltstack(const compat_stack_t __user *uss_ptr,
@@@ -771,7 -761,7 +764,7 @@@ asmlinkage long compat_sys_rt_sigpendin
                                         compat_size_t sigsetsize);
  asmlinkage long compat_sys_rt_sigtimedwait(compat_sigset_t __user *uthese,
                struct compat_siginfo __user *uinfo,
-               struct compat_timespec __user *uts, compat_size_t sigsetsize);
+               struct old_timespec32 __user *uts, compat_size_t sigsetsize);
  asmlinkage long compat_sys_rt_sigqueueinfo(compat_pid_t pid, int sig,
                                struct compat_siginfo __user *uinfo);
  /* No generic prototype for rt_sigreturn */
@@@ -785,9 -775,9 +778,9 @@@ asmlinkage long compat_sys_setrlimit(un
  asmlinkage long compat_sys_getrusage(int who, struct compat_rusage __user *ru);
  
  /* kernel/time.c */
- asmlinkage long compat_sys_gettimeofday(struct compat_timeval __user *tv,
+ asmlinkage long compat_sys_gettimeofday(struct old_timeval32 __user *tv,
                struct timezone __user *tz);
- asmlinkage long compat_sys_settimeofday(struct compat_timeval __user *tv,
+ asmlinkage long compat_sys_settimeofday(struct old_timeval32 __user *tv,
                struct timezone __user *tz);
  asmlinkage long compat_sys_adjtimex(struct compat_timex __user *utp);
  
@@@ -801,11 -791,11 +794,11 @@@ asmlinkage long compat_sys_mq_open(cons
  asmlinkage long compat_sys_mq_timedsend(mqd_t mqdes,
                        const char __user *u_msg_ptr,
                        compat_size_t msg_len, unsigned int msg_prio,
-                       const struct compat_timespec __user *u_abs_timeout);
+                       const struct old_timespec32 __user *u_abs_timeout);
  asmlinkage ssize_t compat_sys_mq_timedreceive(mqd_t mqdes,
                        char __user *u_msg_ptr,
                        compat_size_t msg_len, unsigned int __user *u_msg_prio,
-                       const struct compat_timespec __user *u_abs_timeout);
+                       const struct old_timespec32 __user *u_abs_timeout);
  asmlinkage long compat_sys_mq_notify(mqd_t mqdes,
                        const struct compat_sigevent __user *u_notification);
  asmlinkage long compat_sys_mq_getsetattr(mqd_t mqdes,
@@@ -822,7 -812,7 +815,7 @@@ asmlinkage long compat_sys_msgsnd(int m
  /* ipc/sem.c */
  asmlinkage long compat_sys_semctl(int semid, int semnum, int cmd, int arg);
  asmlinkage long compat_sys_semtimedop(int semid, struct sembuf __user *tsems,
-               unsigned nsems, const struct compat_timespec __user *timeout);
+               unsigned nsems, const struct old_timespec32 __user *timeout);
  
  /* ipc/shm.c */
  asmlinkage long compat_sys_shmctl(int first, int second, void __user *uptr);
@@@ -879,7 -869,7 +872,7 @@@ asmlinkage long compat_sys_rt_tgsigqueu
                                        struct compat_siginfo __user *uinfo);
  asmlinkage long compat_sys_recvmmsg(int fd, struct compat_mmsghdr __user *mmsg,
                                    unsigned vlen, unsigned int flags,
-                                   struct compat_timespec __user *timeout);
+                                   struct old_timespec32 __user *timeout);
  asmlinkage long compat_sys_wait4(compat_pid_t pid,
                                 compat_uint_t __user *stat_addr, int options,
                                 struct compat_rusage __user *ru);
@@@ -931,7 -921,7 +924,7 @@@ asmlinkage long compat_sys_pwritev64v2(
  asmlinkage long compat_sys_open(const char __user *filename, int flags,
                                umode_t mode);
  asmlinkage long compat_sys_utimes(const char __user *filename,
-                                 struct compat_timeval __user *t);
+                                 struct old_timeval32 __user *t);
  
  /* __ARCH_WANT_SYSCALL_NO_FLAGS */
  asmlinkage long compat_sys_signalfd(int ufd,
@@@ -945,15 -935,15 +938,15 @@@ asmlinkage long compat_sys_newlstat(con
                                    struct compat_stat __user *statbuf);
  
  /* __ARCH_WANT_SYSCALL_DEPRECATED */
- asmlinkage long compat_sys_time(compat_time_t __user *tloc);
+ asmlinkage long compat_sys_time(old_time32_t __user *tloc);
  asmlinkage long compat_sys_utime(const char __user *filename,
-                                struct compat_utimbuf __user *t);
+                                struct old_utimbuf32 __user *t);
  asmlinkage long compat_sys_futimesat(unsigned int dfd,
                                     const char __user *filename,
-                                    struct compat_timeval __user *t);
+                                    struct old_timeval32 __user *t);
  asmlinkage long compat_sys_select(int n, compat_ulong_t __user *inp,
                compat_ulong_t __user *outp, compat_ulong_t __user *exp,
-               struct compat_timeval __user *tvp);
+               struct old_timeval32 __user *tvp);
  asmlinkage long compat_sys_ustat(unsigned dev, struct compat_ustat __user *u32);
  asmlinkage long compat_sys_recv(int fd, void __user *buf, compat_size_t len,
                                unsigned flags);
@@@ -986,7 -976,7 +979,7 @@@ asmlinkage long compat_sys_sigaction(in
  #endif
  
  /* obsolete: kernel/time/time.c */
- asmlinkage long compat_sys_stime(compat_time_t __user *tptr);
+ asmlinkage long compat_sys_stime(old_time32_t __user *tptr);
  
  /* obsolete: net/socket.c */
  asmlinkage long compat_sys_socketcall(int call, u32 __user *args);
@@@ -1005,15 -995,15 +998,15 @@@ static inline bool in_compat_syscall(vo
  #endif
  
  /**
-  * ns_to_compat_timeval - Compat version of ns_to_timeval
+  * ns_to_old_timeval32 - Compat version of ns_to_timeval
   * @nsec:     the nanoseconds value to be converted
   *
-  * Returns the compat_timeval representation of the nsec parameter.
+  * Returns the old_timeval32 representation of the nsec parameter.
   */
- static inline struct compat_timeval ns_to_compat_timeval(s64 nsec)
+ static inline struct old_timeval32 ns_to_old_timeval32(s64 nsec)
  {
        struct timeval tv;
-       struct compat_timeval ctv;
+       struct old_timeval32 ctv;
  
        tv = ns_to_timeval(nsec);
        ctv.tv_sec = tv.tv_sec;
@@@ -258,17 -258,14 +258,14 @@@ extern void ktime_get_snapshot(struct s
  extern int persistent_clock_is_local;
  
  extern void read_persistent_clock64(struct timespec64 *ts);
 -void read_persistent_clock_and_boot_offset(struct timespec64 *wall_clock,
 -                                         struct timespec64 *boot_offset);
 +void read_persistent_wall_and_boot_offset(struct timespec64 *wall_clock,
 +                                        struct timespec64 *boot_offset);
  extern int update_persistent_clock64(struct timespec64 now);
  
  /*
   * deprecated aliases, don't use in new code
   */
  #define getnstimeofday64(ts)          ktime_get_real_ts64(ts)
- #define get_monotonic_boottime64(ts)  ktime_get_boottime_ts64(ts)
- #define getrawmonotonic64(ts)         ktime_get_raw_ts64(ts)
- #define timekeeping_clocktai64(ts)    ktime_get_clocktai_ts64(ts)
  
  static inline struct timespec64 current_kernel_time64(void)
  {
        return ts;
  }
  
- static inline struct timespec64 get_monotonic_coarse64(void)
- {
-       struct timespec64 ts;
-       ktime_get_coarse_ts64(&ts);
-       return ts;
- }
  #endif
diff --combined ipc/mqueue.c
@@@ -655,7 -655,7 +655,7 @@@ static void __do_notify(struct mqueue_i
         * synchronously. */
        if (info->notify_owner &&
            info->attr.mq_curmsgs == 1) {
 -              struct siginfo sig_i;
 +              struct kernel_siginfo sig_i;
                switch (info->notify.sigev_notify) {
                case SIGEV_NONE:
                        break;
@@@ -1461,10 -1461,10 +1461,10 @@@ COMPAT_SYSCALL_DEFINE3(mq_getsetattr, m
  #endif
  
  #ifdef CONFIG_COMPAT_32BIT_TIME
- static int compat_prepare_timeout(const struct compat_timespec __user *p,
+ static int compat_prepare_timeout(const struct old_timespec32 __user *p,
                                   struct timespec64 *ts)
  {
-       if (compat_get_timespec64(ts, p))
+       if (get_old_timespec32(ts, p))
                return -EFAULT;
        if (!timespec64_valid(ts))
                return -EINVAL;
  COMPAT_SYSCALL_DEFINE5(mq_timedsend, mqd_t, mqdes,
                       const char __user *, u_msg_ptr,
                       compat_size_t, msg_len, unsigned int, msg_prio,
-                      const struct compat_timespec __user *, u_abs_timeout)
+                      const struct old_timespec32 __user *, u_abs_timeout)
  {
        struct timespec64 ts, *p = NULL;
        if (u_abs_timeout) {
  COMPAT_SYSCALL_DEFINE5(mq_timedreceive, mqd_t, mqdes,
                       char __user *, u_msg_ptr,
                       compat_size_t, msg_len, unsigned int __user *, u_msg_prio,
-                      const struct compat_timespec __user *, u_abs_timeout)
+                      const struct old_timespec32 __user *, u_abs_timeout)
  {
        struct timespec64 ts, *p = NULL;
        if (u_abs_timeout) {
diff --combined ipc/shm.c
+++ b/ipc/shm.c
@@@ -199,14 -199,13 +199,14 @@@ static inline struct shmid_kernel *shm_
        }
  
        ipc_unlock_object(ipcp);
 +      ipcp = ERR_PTR(-EIDRM);
  err:
        rcu_read_unlock();
        /*
         * Callers of shm_lock() must validate the status of the returned ipc
         * object pointer and error out as appropriate.
         */
 -      return (void *)ipcp;
 +      return ERR_CAST(ipcp);
  }
  
  static inline void shm_lock_by_ptr(struct shmid_kernel *ipcp)
@@@ -1202,9 -1201,9 +1202,9 @@@ SYSCALL_DEFINE3(shmctl, int, shmid, int
  struct compat_shmid_ds {
        struct compat_ipc_perm shm_perm;
        int shm_segsz;
-       compat_time_t shm_atime;
-       compat_time_t shm_dtime;
-       compat_time_t shm_ctime;
+       old_time32_t shm_atime;
+       old_time32_t shm_dtime;
+       old_time32_t shm_ctime;
        compat_ipc_pid_t shm_cpid;
        compat_ipc_pid_t shm_lpid;
        unsigned short shm_nattch;
diff --combined kernel/sched/core.c
@@@ -135,8 -135,9 +135,8 @@@ static void update_rq_clock_task(struc
   * In theory, the compile should just see 0 here, and optimize out the call
   * to sched_rt_avg_update. But I don't trust it...
   */
 -#if defined(CONFIG_IRQ_TIME_ACCOUNTING) || defined(CONFIG_PARAVIRT_TIME_ACCOUNTING)
 -      s64 steal = 0, irq_delta = 0;
 -#endif
 +      s64 __maybe_unused steal = 0, irq_delta = 0;
 +
  #ifdef CONFIG_IRQ_TIME_ACCOUNTING
        irq_delta = irq_time_read(cpu_of(rq)) - rq->prev_irq_time;
  
  
        rq->clock_task += delta;
  
 -#ifdef HAVE_SCHED_AVG_IRQ
 +#ifdef CONFIG_HAVE_SCHED_AVG_IRQ
        if ((irq_delta + steal) && sched_feat(NONTASK_CAPACITY))
                update_irq_load_avg(rq, irq_delta + steal);
  #endif
@@@ -700,7 -701,6 +700,7 @@@ static void set_load_weight(struct task
        if (idle_policy(p->policy)) {
                load->weight = scale_load(WEIGHT_IDLEPRIO);
                load->inv_weight = WMULT_IDLEPRIO;
 +              p->se.runnable_weight = load->weight;
                return;
        }
  
        } else {
                load->weight = scale_load(sched_prio_to_weight[prio]);
                load->inv_weight = sched_prio_to_wmult[prio];
 +              p->se.runnable_weight = load->weight;
        }
  }
  
@@@ -1168,7 -1167,7 +1168,7 @@@ void set_task_cpu(struct task_struct *p
  
        if (task_cpu(p) != new_cpu) {
                if (p->sched_class->migrate_task_rq)
 -                      p->sched_class->migrate_task_rq(p);
 +                      p->sched_class->migrate_task_rq(p, new_cpu);
                p->se.nr_migrations++;
                rseq_migrate(p);
                perf_event_task_migrate(p);
@@@ -2916,10 -2915,10 +2916,10 @@@ unsigned long nr_iowait(void
  }
  
  /*
 - * Consumers of these two interfaces, like for example the cpufreq menu
 - * governor are using nonsensical data. Boosting frequency for a CPU that has
 - * IO-wait which might not even end up running the task when it does become
 - * runnable.
 + * Consumers of these two interfaces, like for example the cpuidle menu
 + * governor, are using nonsensical data. Preferring shallow idle state selection
 + * for a CPU that has IO-wait which might not even end up running the task when
 + * it does become runnable.
   */
  
  unsigned long nr_iowait_cpu(int cpu)
@@@ -5244,7 -5243,7 +5244,7 @@@ out_unlock
   * an error code.
   */
  SYSCALL_DEFINE2(sched_rr_get_interval, pid_t, pid,
-               struct timespec __user *, interval)
+               struct __kernel_timespec __user *, interval)
  {
        struct timespec64 t;
        int retval = sched_rr_get_interval(pid, &t);
        return retval;
  }
  
- #ifdef CONFIG_COMPAT
+ #ifdef CONFIG_COMPAT_32BIT_TIME
  COMPAT_SYSCALL_DEFINE2(sched_rr_get_interval,
                       compat_pid_t, pid,
-                      struct compat_timespec __user *, interval)
+                      struct old_timespec32 __user *, interval)
  {
        struct timespec64 t;
        int retval = sched_rr_get_interval(pid, &t);
  
        if (retval == 0)
-               retval = compat_put_timespec64(&t, interval);
+               retval = put_old_timespec32(&t, interval);
        return retval;
  }
  #endif
diff --combined kernel/signal.c
@@@ -78,10 -78,6 +78,10 @@@ static bool sig_task_ignored(struct tas
  
        handler = sig_handler(t, sig);
  
 +      /* SIGKILL and SIGSTOP may not be sent to the global init */
 +      if (unlikely(is_global_init(t) && sig_kernel_only(sig)))
 +              return true;
 +
        if (unlikely(t->signal->flags & SIGNAL_UNKILLABLE) &&
            handler == SIG_DFL && !(force && sig_kernel_only(sig)))
                return true;
@@@ -176,7 -172,6 +176,7 @@@ void recalc_sigpending(void
                clear_thread_flag(TIF_SIGPENDING);
  
  }
 +EXPORT_SYMBOL(recalc_sigpending);
  
  void calculate_sigpending(void)
  {
@@@ -467,7 -462,6 +467,7 @@@ void flush_signals(struct task_struct *
        flush_sigqueue(&t->signal->shared_pending);
        spin_unlock_irqrestore(&t->sighand->siglock, flags);
  }
 +EXPORT_SYMBOL(flush_signals);
  
  #ifdef CONFIG_POSIX_TIMERS
  static void __flush_itimer_signals(struct sigpending *pending)
@@@ -549,7 -543,7 +549,7 @@@ bool unhandled_signal(struct task_struc
        return !tsk->ptrace;
  }
  
 -static void collect_signal(int sig, struct sigpending *list, siginfo_t *info,
 +static void collect_signal(int sig, struct sigpending *list, kernel_siginfo_t *info,
                           bool *resched_timer)
  {
        struct sigqueue *q, *first = NULL;
@@@ -595,7 -589,7 +595,7 @@@ still_pending
  }
  
  static int __dequeue_signal(struct sigpending *pending, sigset_t *mask,
 -                      siginfo_t *info, bool *resched_timer)
 +                      kernel_siginfo_t *info, bool *resched_timer)
  {
        int sig = next_signal(pending, mask);
  
   *
   * All callers have to hold the siglock.
   */
 -int dequeue_signal(struct task_struct *tsk, sigset_t *mask, siginfo_t *info)
 +int dequeue_signal(struct task_struct *tsk, sigset_t *mask, kernel_siginfo_t *info)
  {
        bool resched_timer = false;
        int signr;
  #endif
        return signr;
  }
 +EXPORT_SYMBOL_GPL(dequeue_signal);
  
  /*
   * Tell a process that it has a new active signal..
@@@ -737,12 -730,12 +737,12 @@@ static void flush_sigqueue_mask(sigset_
        }
  }
  
 -static inline int is_si_special(const struct siginfo *info)
 +static inline int is_si_special(const struct kernel_siginfo *info)
  {
 -      return info <= SEND_SIG_FORCED;
 +      return info <= SEND_SIG_PRIV;
  }
  
 -static inline bool si_fromuser(const struct siginfo *info)
 +static inline bool si_fromuser(const struct kernel_siginfo *info)
  {
        return info == SEND_SIG_NOINFO ||
                (!is_si_special(info) && SI_FROMUSER(info));
@@@ -767,7 -760,7 +767,7 @@@ static bool kill_ok_by_cred(struct task
   * Bad permissions for sending the signal
   * - the caller must hold the RCU read lock
   */
 -static int check_kill_permission(int sig, struct siginfo *info,
 +static int check_kill_permission(int sig, struct kernel_siginfo *info,
                                 struct task_struct *t)
  {
        struct pid *sid;
@@@ -1010,7 -1003,7 +1010,7 @@@ static inline bool legacy_queue(struct 
  }
  
  #ifdef CONFIG_USER_NS
 -static inline void userns_fixup_signal_uid(struct siginfo *info, struct task_struct *t)
 +static inline void userns_fixup_signal_uid(struct kernel_siginfo *info, struct task_struct *t)
  {
        if (current_user_ns() == task_cred_xxx(t, user_ns))
                return;
        rcu_read_unlock();
  }
  #else
 -static inline void userns_fixup_signal_uid(struct siginfo *info, struct task_struct *t)
 +static inline void userns_fixup_signal_uid(struct kernel_siginfo *info, struct task_struct *t)
  {
        return;
  }
  #endif
  
 -static int __send_signal(int sig, struct siginfo *info, struct task_struct *t,
 +static int __send_signal(int sig, struct kernel_siginfo *info, struct task_struct *t,
                        enum pid_type type, int from_ancestor_ns)
  {
        struct sigpending *pending;
  
        result = TRACE_SIGNAL_IGNORED;
        if (!prepare_signal(sig, t,
 -                      from_ancestor_ns || (info == SEND_SIG_FORCED)))
 +                      from_ancestor_ns || (info == SEND_SIG_PRIV)))
                goto ret;
  
        pending = (type != PIDTYPE_PID) ? &t->signal->shared_pending : &t->pending;
  
        result = TRACE_SIGNAL_DELIVERED;
        /*
 -       * fast-pathed signals for kernel-internal things like SIGSTOP
 -       * or SIGKILL.
 +       * Skip useless siginfo allocation for SIGKILL SIGSTOP,
 +       * and kernel threads.
         */
 -      if (info == SEND_SIG_FORCED)
 +      if (sig_kernel_only(sig) || (t->flags & PF_KTHREAD))
                goto out_set;
  
        /*
@@@ -1150,7 -1143,7 +1150,7 @@@ ret
        return ret;
  }
  
 -static int send_signal(int sig, struct siginfo *info, struct task_struct *t,
 +static int send_signal(int sig, struct kernel_siginfo *info, struct task_struct *t,
                        enum pid_type type)
  {
        int from_ancestor_ns = 0;
@@@ -1197,12 -1190,18 +1197,12 @@@ static int __init setup_print_fatal_sig
  __setup("print-fatal-signals=", setup_print_fatal_signals);
  
  int
 -__group_send_sig_info(int sig, struct siginfo *info, struct task_struct *p)
 +__group_send_sig_info(int sig, struct kernel_siginfo *info, struct task_struct *p)
  {
        return send_signal(sig, info, p, PIDTYPE_TGID);
  }
  
 -static int
 -specific_send_sig_info(int sig, struct siginfo *info, struct task_struct *t)
 -{
 -      return send_signal(sig, info, t, PIDTYPE_PID);
 -}
 -
 -int do_send_sig_info(int sig, struct siginfo *info, struct task_struct *p,
 +int do_send_sig_info(int sig, struct kernel_siginfo *info, struct task_struct *p,
                        enum pid_type type)
  {
        unsigned long flags;
   * that is why we also clear SIGNAL_UNKILLABLE.
   */
  int
 -force_sig_info(int sig, struct siginfo *info, struct task_struct *t)
 +force_sig_info(int sig, struct kernel_siginfo *info, struct task_struct *t)
  {
        unsigned long int flags;
        int ret, blocked, ignored;
         */
        if (action->sa.sa_handler == SIG_DFL && !t->ptrace)
                t->signal->flags &= ~SIGNAL_UNKILLABLE;
 -      ret = specific_send_sig_info(sig, info, t);
 +      ret = send_signal(sig, info, t, PIDTYPE_PID);
        spin_unlock_irqrestore(&t->sighand->siglock, flags);
  
        return ret;
@@@ -1316,8 -1315,8 +1316,8 @@@ struct sighand_struct *__lock_task_sigh
  /*
   * send signal info to all the members of a group
   */
 -int group_send_sig_info(int sig, struct siginfo *info, struct task_struct *p,
 -                      enum pid_type type)
 +int group_send_sig_info(int sig, struct kernel_siginfo *info,
 +                      struct task_struct *p, enum pid_type type)
  {
        int ret;
  
   * control characters do (^C, ^Z etc)
   * - the caller must hold at least a readlock on tasklist_lock
   */
 -int __kill_pgrp_info(int sig, struct siginfo *info, struct pid *pgrp)
 +int __kill_pgrp_info(int sig, struct kernel_siginfo *info, struct pid *pgrp)
  {
        struct task_struct *p = NULL;
        int retval, success;
        return success ? 0 : retval;
  }
  
 -int kill_pid_info(int sig, struct siginfo *info, struct pid *pid)
 +int kill_pid_info(int sig, struct kernel_siginfo *info, struct pid *pid)
  {
        int error = -ESRCH;
        struct task_struct *p;
        }
  }
  
 -static int kill_proc_info(int sig, struct siginfo *info, pid_t pid)
 +static int kill_proc_info(int sig, struct kernel_siginfo *info, pid_t pid)
  {
        int error;
        rcu_read_lock();
@@@ -1394,7 -1393,7 +1394,7 @@@ static inline bool kill_as_cred_perm(co
  }
  
  /* like kill_pid_info(), but doesn't use uid/euid of "current" */
 -int kill_pid_info_as_cred(int sig, struct siginfo *info, struct pid *pid,
 +int kill_pid_info_as_cred(int sig, struct kernel_siginfo *info, struct pid *pid,
                         const struct cred *cred)
  {
        int ret = -EINVAL;
@@@ -1438,7 -1437,7 +1438,7 @@@ EXPORT_SYMBOL_GPL(kill_pid_info_as_cred
   * is probably wrong.  Should make it like BSD or SYSV.
   */
  
 -static int kill_something_info(int sig, struct siginfo *info, pid_t pid)
 +static int kill_something_info(int sig, struct kernel_siginfo *info, pid_t pid)
  {
        int ret;
  
   * These are for backward compatibility with the rest of the kernel source.
   */
  
 -int send_sig_info(int sig, struct siginfo *info, struct task_struct *p)
 +int send_sig_info(int sig, struct kernel_siginfo *info, struct task_struct *p)
  {
        /*
         * Make sure legacy kernel users don't send in bad values
  
        return do_send_sig_info(sig, info, p, PIDTYPE_PID);
  }
 +EXPORT_SYMBOL(send_sig_info);
  
  #define __si_special(priv) \
        ((priv) ? SEND_SIG_PRIV : SEND_SIG_NOINFO)
@@@ -1503,13 -1501,11 +1503,13 @@@ send_sig(int sig, struct task_struct *p
  {
        return send_sig_info(sig, __si_special(priv), p);
  }
 +EXPORT_SYMBOL(send_sig);
  
  void force_sig(int sig, struct task_struct *p)
  {
        force_sig_info(sig, SEND_SIG_PRIV, p);
  }
 +EXPORT_SYMBOL(force_sig);
  
  /*
   * When things go south during signal handling, we
@@@ -1533,7 -1529,7 +1533,7 @@@ int force_sig_fault(int sig, int code, 
        ___ARCH_SI_IA64(int imm, unsigned int flags, unsigned long isr)
        , struct task_struct *t)
  {
 -      struct siginfo info;
 +      struct kernel_siginfo info;
  
        clear_siginfo(&info);
        info.si_signo = sig;
@@@ -1556,7 -1552,7 +1556,7 @@@ int send_sig_fault(int sig, int code, v
        ___ARCH_SI_IA64(int imm, unsigned int flags, unsigned long isr)
        , struct task_struct *t)
  {
 -      struct siginfo info;
 +      struct kernel_siginfo info;
  
        clear_siginfo(&info);
        info.si_signo = sig;
  
  int force_sig_mceerr(int code, void __user *addr, short lsb, struct task_struct *t)
  {
 -      struct siginfo info;
 +      struct kernel_siginfo info;
  
        WARN_ON((code != BUS_MCEERR_AO) && (code != BUS_MCEERR_AR));
        clear_siginfo(&info);
  
  int send_sig_mceerr(int code, void __user *addr, short lsb, struct task_struct *t)
  {
 -      struct siginfo info;
 +      struct kernel_siginfo info;
  
        WARN_ON((code != BUS_MCEERR_AO) && (code != BUS_MCEERR_AR));
        clear_siginfo(&info);
@@@ -1605,7 -1601,7 +1605,7 @@@ EXPORT_SYMBOL(send_sig_mceerr)
  
  int force_sig_bnderr(void __user *addr, void __user *lower, void __user *upper)
  {
 -      struct siginfo info;
 +      struct kernel_siginfo info;
  
        clear_siginfo(&info);
        info.si_signo = SIGSEGV;
  #ifdef SEGV_PKUERR
  int force_sig_pkuerr(void __user *addr, u32 pkey)
  {
 -      struct siginfo info;
 +      struct kernel_siginfo info;
  
        clear_siginfo(&info);
        info.si_signo = SIGSEGV;
   */
  int force_sig_ptrace_errno_trap(int errno, void __user *addr)
  {
 -      struct siginfo info;
 +      struct kernel_siginfo info;
  
        clear_siginfo(&info);
        info.si_signo = SIGTRAP;
@@@ -1766,7 -1762,7 +1766,7 @@@ ret
   */
  bool do_notify_parent(struct task_struct *tsk, int sig)
  {
 -      struct siginfo info;
 +      struct kernel_siginfo info;
        unsigned long flags;
        struct sighand_struct *psig;
        bool autoreap = false;
  static void do_notify_parent_cldstop(struct task_struct *tsk,
                                     bool for_ptracer, int why)
  {
 -      struct siginfo info;
 +      struct kernel_siginfo info;
        unsigned long flags;
        struct task_struct *parent;
        struct sighand_struct *sighand;
@@@ -1971,7 -1967,7 +1971,7 @@@ static bool sigkill_pending(struct task
   * If we actually decide not to stop at all because the tracer
   * is gone, we keep current->exit_code unless clear_code.
   */
 -static void ptrace_stop(int exit_code, int why, int clear_code, siginfo_t *info)
 +static void ptrace_stop(int exit_code, int why, int clear_code, kernel_siginfo_t *info)
        __releases(&current->sighand->siglock)
        __acquires(&current->sighand->siglock)
  {
  
  static void ptrace_do_notify(int signr, int exit_code, int why)
  {
 -      siginfo_t info;
 +      kernel_siginfo_t info;
  
        clear_siginfo(&info);
        info.si_signo = signr;
@@@ -2289,7 -2285,7 +2289,7 @@@ static void do_jobctl_trap(void
        }
  }
  
 -static int ptrace_signal(int signr, siginfo_t *info)
 +static int ptrace_signal(int signr, kernel_siginfo_t *info)
  {
        /*
         * We do not check sig_kernel_stop(signr) but set this marker
  
        /* If the (new) signal is now blocked, requeue it.  */
        if (sigismember(&current->blocked, signr)) {
 -              specific_send_sig_info(signr, info, current);
 +              send_signal(signr, info, current, PIDTYPE_PID);
                signr = 0;
        }
  
@@@ -2640,6 -2636,14 +2640,6 @@@ out
        }
  }
  
 -EXPORT_SYMBOL(recalc_sigpending);
 -EXPORT_SYMBOL_GPL(dequeue_signal);
 -EXPORT_SYMBOL(flush_signals);
 -EXPORT_SYMBOL(force_sig);
 -EXPORT_SYMBOL(send_sig);
 -EXPORT_SYMBOL(send_sig_info);
 -EXPORT_SYMBOL(sigprocmask);
 -
  /*
   * System call entry points.
   */
@@@ -2733,7 -2737,6 +2733,7 @@@ int sigprocmask(int how, sigset_t *set
        __set_current_blocked(&newset);
        return 0;
  }
 +EXPORT_SYMBOL(sigprocmask);
  
  /**
   *  sys_rt_sigprocmask - change the list of currently blocked signals
@@@ -2844,48 -2847,27 +2844,48 @@@ COMPAT_SYSCALL_DEFINE2(rt_sigpending, c
  }
  #endif
  
 -enum siginfo_layout siginfo_layout(int sig, int si_code)
 +static const struct {
 +      unsigned char limit, layout;
 +} sig_sicodes[] = {
 +      [SIGILL]  = { NSIGILL,  SIL_FAULT },
 +      [SIGFPE]  = { NSIGFPE,  SIL_FAULT },
 +      [SIGSEGV] = { NSIGSEGV, SIL_FAULT },
 +      [SIGBUS]  = { NSIGBUS,  SIL_FAULT },
 +      [SIGTRAP] = { NSIGTRAP, SIL_FAULT },
 +#if defined(SIGEMT)
 +      [SIGEMT]  = { NSIGEMT,  SIL_FAULT },
 +#endif
 +      [SIGCHLD] = { NSIGCHLD, SIL_CHLD },
 +      [SIGPOLL] = { NSIGPOLL, SIL_POLL },
 +      [SIGSYS]  = { NSIGSYS,  SIL_SYS },
 +};
 +
 +static bool known_siginfo_layout(unsigned sig, int si_code)
 +{
 +      if (si_code == SI_KERNEL)
 +              return true;
 +      else if ((si_code > SI_USER)) {
 +              if (sig_specific_sicodes(sig)) {
 +                      if (si_code <= sig_sicodes[sig].limit)
 +                              return true;
 +              }
 +              else if (si_code <= NSIGPOLL)
 +                      return true;
 +      }
 +      else if (si_code >= SI_DETHREAD)
 +              return true;
 +      else if (si_code == SI_ASYNCNL)
 +              return true;
 +      return false;
 +}
 +
 +enum siginfo_layout siginfo_layout(unsigned sig, int si_code)
  {
        enum siginfo_layout layout = SIL_KILL;
        if ((si_code > SI_USER) && (si_code < SI_KERNEL)) {
 -              static const struct {
 -                      unsigned char limit, layout;
 -              } filter[] = {
 -                      [SIGILL]  = { NSIGILL,  SIL_FAULT },
 -                      [SIGFPE]  = { NSIGFPE,  SIL_FAULT },
 -                      [SIGSEGV] = { NSIGSEGV, SIL_FAULT },
 -                      [SIGBUS]  = { NSIGBUS,  SIL_FAULT },
 -                      [SIGTRAP] = { NSIGTRAP, SIL_FAULT },
 -#if defined(SIGEMT) && defined(NSIGEMT)
 -                      [SIGEMT]  = { NSIGEMT,  SIL_FAULT },
 -#endif
 -                      [SIGCHLD] = { NSIGCHLD, SIL_CHLD },
 -                      [SIGPOLL] = { NSIGPOLL, SIL_POLL },
 -                      [SIGSYS]  = { NSIGSYS,  SIL_SYS },
 -              };
 -              if ((sig < ARRAY_SIZE(filter)) && (si_code <= filter[sig].limit)) {
 -                      layout = filter[sig].layout;
 +              if ((sig < ARRAY_SIZE(sig_sicodes)) &&
 +                  (si_code <= sig_sicodes[sig].limit)) {
 +                      layout = sig_sicodes[sig].layout;
                        /* Handle the exceptions */
                        if ((sig == SIGBUS) &&
                            (si_code >= BUS_MCEERR_AR) && (si_code <= BUS_MCEERR_AO))
        return layout;
  }
  
 -int copy_siginfo_to_user(siginfo_t __user *to, const siginfo_t *from)
 +static inline char __user *si_expansion(const siginfo_t __user *info)
 +{
 +      return ((char __user *)info) + sizeof(struct kernel_siginfo);
 +}
 +
 +int copy_siginfo_to_user(siginfo_t __user *to, const kernel_siginfo_t *from)
  {
 -      if (copy_to_user(to, from , sizeof(struct siginfo)))
 +      char __user *expansion = si_expansion(to);
 +      if (copy_to_user(to, from , sizeof(struct kernel_siginfo)))
 +              return -EFAULT;
 +      if (clear_user(expansion, SI_EXPANSION_SIZE))
                return -EFAULT;
        return 0;
  }
  
 +static int post_copy_siginfo_from_user(kernel_siginfo_t *info,
 +                                     const siginfo_t __user *from)
 +{
 +      if (unlikely(!known_siginfo_layout(info->si_signo, info->si_code))) {
 +              char __user *expansion = si_expansion(from);
 +              char buf[SI_EXPANSION_SIZE];
 +              int i;
 +              /*
 +               * An unknown si_code might need more than
 +               * sizeof(struct kernel_siginfo) bytes.  Verify all of the
 +               * extra bytes are 0.  This guarantees copy_siginfo_to_user
 +               * will return this data to userspace exactly.
 +               */
 +              if (copy_from_user(&buf, expansion, SI_EXPANSION_SIZE))
 +                      return -EFAULT;
 +              for (i = 0; i < SI_EXPANSION_SIZE; i++) {
 +                      if (buf[i] != 0)
 +                              return -E2BIG;
 +              }
 +      }
 +      return 0;
 +}
 +
 +static int __copy_siginfo_from_user(int signo, kernel_siginfo_t *to,
 +                                  const siginfo_t __user *from)
 +{
 +      if (copy_from_user(to, from, sizeof(struct kernel_siginfo)))
 +              return -EFAULT;
 +      to->si_signo = signo;
 +      return post_copy_siginfo_from_user(to, from);
 +}
 +
 +int copy_siginfo_from_user(kernel_siginfo_t *to, const siginfo_t __user *from)
 +{
 +      if (copy_from_user(to, from, sizeof(struct kernel_siginfo)))
 +              return -EFAULT;
 +      return post_copy_siginfo_from_user(to, from);
 +}
 +
  #ifdef CONFIG_COMPAT
  int copy_siginfo_to_user32(struct compat_siginfo __user *to,
 -                         const struct siginfo *from)
 +                         const struct kernel_siginfo *from)
  #if defined(CONFIG_X86_X32_ABI) || defined(CONFIG_IA32_EMULATION)
  {
        return __copy_siginfo_to_user32(to, from, in_x32_syscall());
  }
  int __copy_siginfo_to_user32(struct compat_siginfo __user *to,
 -                           const struct siginfo *from, bool x32_ABI)
 +                           const struct kernel_siginfo *from, bool x32_ABI)
  #endif
  {
        struct compat_siginfo new;
        return 0;
  }
  
 -int copy_siginfo_from_user32(struct siginfo *to,
 -                           const struct compat_siginfo __user *ufrom)
 +static int post_copy_siginfo_from_user32(kernel_siginfo_t *to,
 +                                       const struct compat_siginfo *from)
  {
 -      struct compat_siginfo from;
 -
 -      if (copy_from_user(&from, ufrom, sizeof(struct compat_siginfo)))
 -              return -EFAULT;
 -
        clear_siginfo(to);
 -      to->si_signo = from.si_signo;
 -      to->si_errno = from.si_errno;
 -      to->si_code  = from.si_code;
 -      switch(siginfo_layout(from.si_signo, from.si_code)) {
 +      to->si_signo = from->si_signo;
 +      to->si_errno = from->si_errno;
 +      to->si_code  = from->si_code;
 +      switch(siginfo_layout(from->si_signo, from->si_code)) {
        case SIL_KILL:
 -              to->si_pid = from.si_pid;
 -              to->si_uid = from.si_uid;
 +              to->si_pid = from->si_pid;
 +              to->si_uid = from->si_uid;
                break;
        case SIL_TIMER:
 -              to->si_tid     = from.si_tid;
 -              to->si_overrun = from.si_overrun;
 -              to->si_int     = from.si_int;
 +              to->si_tid     = from->si_tid;
 +              to->si_overrun = from->si_overrun;
 +              to->si_int     = from->si_int;
                break;
        case SIL_POLL:
 -              to->si_band = from.si_band;
 -              to->si_fd   = from.si_fd;
 +              to->si_band = from->si_band;
 +              to->si_fd   = from->si_fd;
                break;
        case SIL_FAULT:
 -              to->si_addr = compat_ptr(from.si_addr);
 +              to->si_addr = compat_ptr(from->si_addr);
  #ifdef __ARCH_SI_TRAPNO
 -              to->si_trapno = from.si_trapno;
 +              to->si_trapno = from->si_trapno;
  #endif
                break;
        case SIL_FAULT_MCEERR:
 -              to->si_addr = compat_ptr(from.si_addr);
 +              to->si_addr = compat_ptr(from->si_addr);
  #ifdef __ARCH_SI_TRAPNO
 -              to->si_trapno = from.si_trapno;
 +              to->si_trapno = from->si_trapno;
  #endif
 -              to->si_addr_lsb = from.si_addr_lsb;
 +              to->si_addr_lsb = from->si_addr_lsb;
                break;
        case SIL_FAULT_BNDERR:
 -              to->si_addr = compat_ptr(from.si_addr);
 +              to->si_addr = compat_ptr(from->si_addr);
  #ifdef __ARCH_SI_TRAPNO
 -              to->si_trapno = from.si_trapno;
 +              to->si_trapno = from->si_trapno;
  #endif
 -              to->si_lower = compat_ptr(from.si_lower);
 -              to->si_upper = compat_ptr(from.si_upper);
 +              to->si_lower = compat_ptr(from->si_lower);
 +              to->si_upper = compat_ptr(from->si_upper);
                break;
        case SIL_FAULT_PKUERR:
 -              to->si_addr = compat_ptr(from.si_addr);
 +              to->si_addr = compat_ptr(from->si_addr);
  #ifdef __ARCH_SI_TRAPNO
 -              to->si_trapno = from.si_trapno;
 +              to->si_trapno = from->si_trapno;
  #endif
 -              to->si_pkey = from.si_pkey;
 +              to->si_pkey = from->si_pkey;
                break;
        case SIL_CHLD:
 -              to->si_pid    = from.si_pid;
 -              to->si_uid    = from.si_uid;
 -              to->si_status = from.si_status;
 +              to->si_pid    = from->si_pid;
 +              to->si_uid    = from->si_uid;
 +              to->si_status = from->si_status;
  #ifdef CONFIG_X86_X32_ABI
                if (in_x32_syscall()) {
 -                      to->si_utime = from._sifields._sigchld_x32._utime;
 -                      to->si_stime = from._sifields._sigchld_x32._stime;
 +                      to->si_utime = from->_sifields._sigchld_x32._utime;
 +                      to->si_stime = from->_sifields._sigchld_x32._stime;
                } else
  #endif
                {
 -                      to->si_utime = from.si_utime;
 -                      to->si_stime = from.si_stime;
 +                      to->si_utime = from->si_utime;
 +                      to->si_stime = from->si_stime;
                }
                break;
        case SIL_RT:
 -              to->si_pid = from.si_pid;
 -              to->si_uid = from.si_uid;
 -              to->si_int = from.si_int;
 +              to->si_pid = from->si_pid;
 +              to->si_uid = from->si_uid;
 +              to->si_int = from->si_int;
                break;
        case SIL_SYS:
 -              to->si_call_addr = compat_ptr(from.si_call_addr);
 -              to->si_syscall   = from.si_syscall;
 -              to->si_arch      = from.si_arch;
 +              to->si_call_addr = compat_ptr(from->si_call_addr);
 +              to->si_syscall   = from->si_syscall;
 +              to->si_arch      = from->si_arch;
                break;
        }
        return 0;
  }
 +
 +static int __copy_siginfo_from_user32(int signo, struct kernel_siginfo *to,
 +                                    const struct compat_siginfo __user *ufrom)
 +{
 +      struct compat_siginfo from;
 +
 +      if (copy_from_user(&from, ufrom, sizeof(struct compat_siginfo)))
 +              return -EFAULT;
 +
 +      from.si_signo = signo;
 +      return post_copy_siginfo_from_user32(to, &from);
 +}
 +
 +int copy_siginfo_from_user32(struct kernel_siginfo *to,
 +                           const struct compat_siginfo __user *ufrom)
 +{
 +      struct compat_siginfo from;
 +
 +      if (copy_from_user(&from, ufrom, sizeof(struct compat_siginfo)))
 +              return -EFAULT;
 +
 +      return post_copy_siginfo_from_user32(to, &from);
 +}
  #endif /* CONFIG_COMPAT */
  
  /**
   *  @info: if non-null, the signal's siginfo is returned here
   *  @ts: upper bound on process time suspension
   */
 -static int do_sigtimedwait(const sigset_t *which, siginfo_t *info,
 +static int do_sigtimedwait(const sigset_t *which, kernel_siginfo_t *info,
-                   const struct timespec *ts)
+                   const struct timespec64 *ts)
  {
        ktime_t *to = NULL, timeout = KTIME_MAX;
        struct task_struct *tsk = current;
        int sig, ret = 0;
  
        if (ts) {
-               if (!timespec_valid(ts))
+               if (!timespec64_valid(ts))
                        return -EINVAL;
-               timeout = timespec_to_ktime(*ts);
+               timeout = timespec64_to_ktime(*ts);
                to = &timeout;
        }
  
   *  @sigsetsize: size of sigset_t type
   */
  SYSCALL_DEFINE4(rt_sigtimedwait, const sigset_t __user *, uthese,
-               siginfo_t __user *, uinfo, const struct timespec __user *, uts,
+               siginfo_t __user *, uinfo,
+               const struct __kernel_timespec __user *, uts,
                size_t, sigsetsize)
  {
        sigset_t these;
-       struct timespec ts;
+       struct timespec64 ts;
 -      siginfo_t info;
 +      kernel_siginfo_t info;
        int ret;
  
        /* XXX: Don't preclude handling different sized sigset_t's.  */
                return -EFAULT;
  
        if (uts) {
-               if (copy_from_user(&ts, uts, sizeof(ts)))
+               if (get_timespec64(&ts, uts))
                        return -EFAULT;
        }
  
  #ifdef CONFIG_COMPAT
  COMPAT_SYSCALL_DEFINE4(rt_sigtimedwait, compat_sigset_t __user *, uthese,
                struct compat_siginfo __user *, uinfo,
-               struct compat_timespec __user *, uts, compat_size_t, sigsetsize)
+               struct old_timespec32 __user *, uts, compat_size_t, sigsetsize)
  {
        sigset_t s;
-       struct timespec t;
+       struct timespec64 t;
 -      siginfo_t info;
 +      kernel_siginfo_t info;
        long ret;
  
        if (sigsetsize != sizeof(sigset_t))
                return -EFAULT;
  
        if (uts) {
-               if (compat_get_timespec(&t, uts))
+               if (get_old_timespec32(&t, uts))
                        return -EFAULT;
        }
  
   */
  SYSCALL_DEFINE2(kill, pid_t, pid, int, sig)
  {
 -      struct siginfo info;
 +      struct kernel_siginfo info;
  
        clear_siginfo(&info);
        info.si_signo = sig;
  }
  
  static int
 -do_send_specific(pid_t tgid, pid_t pid, int sig, struct siginfo *info)
 +do_send_specific(pid_t tgid, pid_t pid, int sig, struct kernel_siginfo *info)
  {
        struct task_struct *p;
        int error = -ESRCH;
  
  static int do_tkill(pid_t tgid, pid_t pid, int sig)
  {
 -      struct siginfo info;
 +      struct kernel_siginfo info;
  
        clear_siginfo(&info);
        info.si_signo = sig;
@@@ -3383,7 -3301,7 +3384,7 @@@ SYSCALL_DEFINE2(tkill, pid_t, pid, int
        return do_tkill(0, pid, sig);
  }
  
 -static int do_rt_sigqueueinfo(pid_t pid, int sig, siginfo_t *info)
 +static int do_rt_sigqueueinfo(pid_t pid, int sig, kernel_siginfo_t *info)
  {
        /* Not even root can pretend to send signals from the kernel.
         * Nor can they impersonate a kill()/tgkill(), which adds source info.
            (task_pid_vnr(current) != pid))
                return -EPERM;
  
 -      info->si_signo = sig;
 -
        /* POSIX.1b doesn't mention process groups.  */
        return kill_proc_info(sig, info, pid);
  }
  SYSCALL_DEFINE3(rt_sigqueueinfo, pid_t, pid, int, sig,
                siginfo_t __user *, uinfo)
  {
 -      siginfo_t info;
 -      if (copy_from_user(&info, uinfo, sizeof(siginfo_t)))
 -              return -EFAULT;
 +      kernel_siginfo_t info;
 +      int ret = __copy_siginfo_from_user(sig, &info, uinfo);
 +      if (unlikely(ret))
 +              return ret;
        return do_rt_sigqueueinfo(pid, sig, &info);
  }
  
@@@ -3418,15 -3337,15 +3419,15 @@@ COMPAT_SYSCALL_DEFINE3(rt_sigqueueinfo
                        int, sig,
                        struct compat_siginfo __user *, uinfo)
  {
 -      siginfo_t info;
 -      int ret = copy_siginfo_from_user32(&info, uinfo);
 +      kernel_siginfo_t info;
 +      int ret = __copy_siginfo_from_user32(sig, &info, uinfo);
        if (unlikely(ret))
                return ret;
        return do_rt_sigqueueinfo(pid, sig, &info);
  }
  #endif
  
 -static int do_rt_tgsigqueueinfo(pid_t tgid, pid_t pid, int sig, siginfo_t *info)
 +static int do_rt_tgsigqueueinfo(pid_t tgid, pid_t pid, int sig, kernel_siginfo_t *info)
  {
        /* This is only valid for single tasks */
        if (pid <= 0 || tgid <= 0)
            (task_pid_vnr(current) != pid))
                return -EPERM;
  
 -      info->si_signo = sig;
 -
        return do_send_specific(tgid, pid, sig, info);
  }
  
  SYSCALL_DEFINE4(rt_tgsigqueueinfo, pid_t, tgid, pid_t, pid, int, sig,
                siginfo_t __user *, uinfo)
  {
 -      siginfo_t info;
 -
 -      if (copy_from_user(&info, uinfo, sizeof(siginfo_t)))
 -              return -EFAULT;
 -
 +      kernel_siginfo_t info;
 +      int ret = __copy_siginfo_from_user(sig, &info, uinfo);
 +      if (unlikely(ret))
 +              return ret;
        return do_rt_tgsigqueueinfo(tgid, pid, sig, &info);
  }
  
@@@ -3459,10 -3381,10 +3460,10 @@@ COMPAT_SYSCALL_DEFINE4(rt_tgsigqueueinf
                        int, sig,
                        struct compat_siginfo __user *, uinfo)
  {
 -      siginfo_t info;
 -
 -      if (copy_siginfo_from_user32(&info, uinfo))
 -              return -EFAULT;
 +      kernel_siginfo_t info;
 +      int ret = __copy_siginfo_from_user32(sig, &info, uinfo);
 +      if (unlikely(ret))
 +              return ret;
        return do_rt_tgsigqueueinfo(tgid, pid, sig, &info);
  }
  #endif
@@@ -3539,8 -3461,7 +3540,8 @@@ int do_sigaction(int sig, struct k_siga
  }
  
  static int
 -do_sigaltstack (const stack_t *ss, stack_t *oss, unsigned long sp)
 +do_sigaltstack (const stack_t *ss, stack_t *oss, unsigned long sp,
 +              size_t min_ss_size)
  {
        struct task_struct *t = current;
  
                        ss_size = 0;
                        ss_sp = NULL;
                } else {
 -                      if (unlikely(ss_size < MINSIGSTKSZ))
 +                      if (unlikely(ss_size < min_ss_size))
                                return -ENOMEM;
                }
  
@@@ -3588,8 -3509,7 +3589,8 @@@ SYSCALL_DEFINE2(sigaltstack,const stack
        if (uss && copy_from_user(&new, uss, sizeof(stack_t)))
                return -EFAULT;
        err = do_sigaltstack(uss ? &new : NULL, uoss ? &old : NULL,
 -                            current_user_stack_pointer());
 +                            current_user_stack_pointer(),
 +                            MINSIGSTKSZ);
        if (!err && uoss && copy_to_user(uoss, &old, sizeof(stack_t)))
                err = -EFAULT;
        return err;
@@@ -3600,8 -3520,7 +3601,8 @@@ int restore_altstack(const stack_t __us
        stack_t new;
        if (copy_from_user(&new, uss, sizeof(stack_t)))
                return -EFAULT;
 -      (void)do_sigaltstack(&new, NULL, current_user_stack_pointer());
 +      (void)do_sigaltstack(&new, NULL, current_user_stack_pointer(),
 +                           MINSIGSTKSZ);
        /* squash all but EFAULT for now */
        return 0;
  }
@@@ -3635,8 -3554,7 +3636,8 @@@ static int do_compat_sigaltstack(const 
                uss.ss_size = uss32.ss_size;
        }
        ret = do_sigaltstack(uss_ptr ? &uss : NULL, &uoss,
 -                           compat_user_stack_pointer());
 +                           compat_user_stack_pointer(),
 +                           COMPAT_MINSIGSTKSZ);
        if (ret >= 0 && uoss_ptr)  {
                compat_stack_t old;
                memset(&old, 0, sizeof(old));
@@@ -4045,57 -3963,13 +4046,57 @@@ __weak const char *arch_vma_name(struc
        return NULL;
  }
  
 -void __init signals_init(void)
 +static inline void siginfo_buildtime_checks(void)
  {
 -      /* If this check fails, the __ARCH_SI_PREAMBLE_SIZE value is wrong! */
 -      BUILD_BUG_ON(__ARCH_SI_PREAMBLE_SIZE
 -              != offsetof(struct siginfo, _sifields._pad));
        BUILD_BUG_ON(sizeof(struct siginfo) != SI_MAX_SIZE);
  
 +      /* Verify the offsets in the two siginfos match */
 +#define CHECK_OFFSET(field) \
 +      BUILD_BUG_ON(offsetof(siginfo_t, field) != offsetof(kernel_siginfo_t, field))
 +
 +      /* kill */
 +      CHECK_OFFSET(si_pid);
 +      CHECK_OFFSET(si_uid);
 +
 +      /* timer */
 +      CHECK_OFFSET(si_tid);
 +      CHECK_OFFSET(si_overrun);
 +      CHECK_OFFSET(si_value);
 +
 +      /* rt */
 +      CHECK_OFFSET(si_pid);
 +      CHECK_OFFSET(si_uid);
 +      CHECK_OFFSET(si_value);
 +
 +      /* sigchld */
 +      CHECK_OFFSET(si_pid);
 +      CHECK_OFFSET(si_uid);
 +      CHECK_OFFSET(si_status);
 +      CHECK_OFFSET(si_utime);
 +      CHECK_OFFSET(si_stime);
 +
 +      /* sigfault */
 +      CHECK_OFFSET(si_addr);
 +      CHECK_OFFSET(si_addr_lsb);
 +      CHECK_OFFSET(si_lower);
 +      CHECK_OFFSET(si_upper);
 +      CHECK_OFFSET(si_pkey);
 +
 +      /* sigpoll */
 +      CHECK_OFFSET(si_band);
 +      CHECK_OFFSET(si_fd);
 +
 +      /* sigsys */
 +      CHECK_OFFSET(si_call_addr);
 +      CHECK_OFFSET(si_syscall);
 +      CHECK_OFFSET(si_arch);
 +#undef CHECK_OFFSET
 +}
 +
 +void __init signals_init(void)
 +{
 +      siginfo_buildtime_checks();
 +
        sigqueue_cachep = KMEM_CACHE(sigqueue, SLAB_PANIC);
  }
  
@@@ -308,7 -308,7 +308,7 @@@ static void common_hrtimer_rearm(struc
   * To protect against the timer going away while the interrupt is queued,
   * we require that the it_requeue_pending flag be set.
   */
 -void posixtimer_rearm(struct siginfo *info)
 +void posixtimer_rearm(struct kernel_siginfo *info)
  {
        struct k_itimer *timr;
        unsigned long flags;
@@@ -755,13 -755,13 +755,13 @@@ SYSCALL_DEFINE2(timer_gettime, timer_t
  #ifdef CONFIG_COMPAT_32BIT_TIME
  
  COMPAT_SYSCALL_DEFINE2(timer_gettime, timer_t, timer_id,
-                      struct compat_itimerspec __user *, setting)
+                      struct old_itimerspec32 __user *, setting)
  {
        struct itimerspec64 cur_setting;
  
        int ret = do_timer_gettime(timer_id, &cur_setting);
        if (!ret) {
-               if (put_compat_itimerspec64(&cur_setting, setting))
+               if (put_old_itimerspec32(&cur_setting, setting))
                        ret = -EFAULT;
        }
        return ret;
@@@ -928,8 -928,8 +928,8 @@@ SYSCALL_DEFINE4(timer_settime, timer_t
  
  #ifdef CONFIG_COMPAT_32BIT_TIME
  COMPAT_SYSCALL_DEFINE4(timer_settime, timer_t, timer_id, int, flags,
-                      struct compat_itimerspec __user *, new,
-                      struct compat_itimerspec __user *, old)
+                      struct old_itimerspec32 __user *, new,
+                      struct old_itimerspec32 __user *, old)
  {
        struct itimerspec64 new_spec, old_spec;
        struct itimerspec64 *rtn = old ? &old_spec : NULL;
  
        if (!new)
                return -EINVAL;
-       if (get_compat_itimerspec64(&new_spec, new))
+       if (get_old_itimerspec32(&new_spec, new))
                return -EFAULT;
  
        error = do_timer_settime(timer_id, flags, &new_spec, rtn);
        if (!error && old) {
-               if (put_compat_itimerspec64(&old_spec, old))
+               if (put_old_itimerspec32(&old_spec, old))
                        error = -EFAULT;
        }
        return error;
@@@ -1115,7 -1115,7 +1115,7 @@@ SYSCALL_DEFINE2(clock_getres, const clo
  #ifdef CONFIG_COMPAT_32BIT_TIME
  
  COMPAT_SYSCALL_DEFINE2(clock_settime, clockid_t, which_clock,
-                      struct compat_timespec __user *, tp)
+                      struct old_timespec32 __user *, tp)
  {
        const struct k_clock *kc = clockid_to_kclock(which_clock);
        struct timespec64 ts;
        if (!kc || !kc->clock_set)
                return -EINVAL;
  
-       if (compat_get_timespec64(&ts, tp))
+       if (get_old_timespec32(&ts, tp))
                return -EFAULT;
  
        return kc->clock_set(which_clock, &ts);
  }
  
  COMPAT_SYSCALL_DEFINE2(clock_gettime, clockid_t, which_clock,
-                      struct compat_timespec __user *, tp)
+                      struct old_timespec32 __user *, tp)
  {
        const struct k_clock *kc = clockid_to_kclock(which_clock);
        struct timespec64 ts;
  
        err = kc->clock_get(which_clock, &ts);
  
-       if (!err && compat_put_timespec64(&ts, tp))
+       if (!err && put_old_timespec32(&ts, tp))
                err = -EFAULT;
  
        return err;
@@@ -1180,7 -1180,7 +1180,7 @@@ COMPAT_SYSCALL_DEFINE2(clock_adjtime, c
  #ifdef CONFIG_COMPAT_32BIT_TIME
  
  COMPAT_SYSCALL_DEFINE2(clock_getres, clockid_t, which_clock,
-                      struct compat_timespec __user *, tp)
+                      struct old_timespec32 __user *, tp)
  {
        const struct k_clock *kc = clockid_to_kclock(which_clock);
        struct timespec64 ts;
                return -EINVAL;
  
        err = kc->clock_getres(which_clock, &ts);
-       if (!err && tp && compat_put_timespec64(&ts, tp))
+       if (!err && tp && put_old_timespec32(&ts, tp))
                return -EFAULT;
  
        return err;
@@@ -1237,8 -1237,8 +1237,8 @@@ SYSCALL_DEFINE4(clock_nanosleep, const 
  #ifdef CONFIG_COMPAT_32BIT_TIME
  
  COMPAT_SYSCALL_DEFINE4(clock_nanosleep, clockid_t, which_clock, int, flags,
-                      struct compat_timespec __user *, rqtp,
-                      struct compat_timespec __user *, rmtp)
+                      struct old_timespec32 __user *, rqtp,
+                      struct old_timespec32 __user *, rmtp)
  {
        const struct k_clock *kc = clockid_to_kclock(which_clock);
        struct timespec64 t;
        if (!kc->nsleep)
                return -EOPNOTSUPP;
  
-       if (compat_get_timespec64(&t, rqtp))
+       if (get_old_timespec32(&t, rqtp))
                return -EFAULT;
  
        if (!timespec64_valid(&t))
diff --combined net/socket.c
@@@ -941,8 -941,7 +941,8 @@@ void dlci_ioctl_set(int (*hook) (unsign
  EXPORT_SYMBOL(dlci_ioctl_set);
  
  static long sock_do_ioctl(struct net *net, struct socket *sock,
 -                               unsigned int cmd, unsigned long arg)
 +                        unsigned int cmd, unsigned long arg,
 +                        unsigned int ifreq_size)
  {
        int err;
        void __user *argp = (void __user *)arg;
        } else {
                struct ifreq ifr;
                bool need_copyout;
 -              if (copy_from_user(&ifr, argp, sizeof(struct ifreq)))
 +              if (copy_from_user(&ifr, argp, ifreq_size))
                        return -EFAULT;
                err = dev_ioctl(net, cmd, &ifr, &need_copyout);
                if (!err && need_copyout)
 -                      if (copy_to_user(argp, &ifr, sizeof(struct ifreq)))
 +                      if (copy_to_user(argp, &ifr, ifreq_size))
                                return -EFAULT;
        }
        return err;
@@@ -1071,8 -1070,7 +1071,8 @@@ static long sock_ioctl(struct file *fil
                        err = open_related_ns(&net->ns, get_net_ns);
                        break;
                default:
 -                      err = sock_do_ioctl(net, sock, cmd, arg);
 +                      err = sock_do_ioctl(net, sock, cmd, arg,
 +                                          sizeof(struct ifreq));
                        break;
                }
        return err;
@@@ -1475,7 -1473,7 +1475,7 @@@ int __sys_bind(int fd, struct sockaddr 
        sock = sockfd_lookup_light(fd, &err, &fput_needed);
        if (sock) {
                err = move_addr_to_kernel(umyaddr, addrlen, &address);
 -              if (err >= 0) {
 +              if (!err) {
                        err = security_socket_bind(sock,
                                                   (struct sockaddr *)&address,
                                                   addrlen);
@@@ -2342,7 -2340,7 +2342,7 @@@ SYSCALL_DEFINE3(recvmsg, int, fd, struc
   */
  
  int __sys_recvmmsg(int fd, struct mmsghdr __user *mmsg, unsigned int vlen,
-                  unsigned int flags, struct timespec *timeout)
+                  unsigned int flags, struct timespec64 *timeout)
  {
        int fput_needed, err, datagrams;
        struct socket *sock;
  
                if (timeout) {
                        ktime_get_ts64(&timeout64);
-                       *timeout = timespec64_to_timespec(
-                                       timespec64_sub(end_time, timeout64));
+                       *timeout = timespec64_sub(end_time, timeout64);
                        if (timeout->tv_sec < 0) {
                                timeout->tv_sec = timeout->tv_nsec = 0;
                                break;
@@@ -2454,10 -2451,10 +2453,10 @@@ out_put
  
  static int do_sys_recvmmsg(int fd, struct mmsghdr __user *mmsg,
                           unsigned int vlen, unsigned int flags,
-                          struct timespec __user *timeout)
+                          struct __kernel_timespec __user *timeout)
  {
        int datagrams;
-       struct timespec timeout_sys;
+       struct timespec64 timeout_sys;
  
        if (flags & MSG_CMSG_COMPAT)
                return -EINVAL;
        if (!timeout)
                return __sys_recvmmsg(fd, mmsg, vlen, flags, NULL);
  
-       if (copy_from_user(&timeout_sys, timeout, sizeof(timeout_sys)))
+       if (get_timespec64(&timeout_sys, timeout))
                return -EFAULT;
  
        datagrams = __sys_recvmmsg(fd, mmsg, vlen, flags, &timeout_sys);
  
-       if (datagrams > 0 &&
-           copy_to_user(timeout, &timeout_sys, sizeof(timeout_sys)))
+       if (datagrams > 0 && put_timespec64(&timeout_sys, timeout))
                datagrams = -EFAULT;
  
        return datagrams;
  
  SYSCALL_DEFINE5(recvmmsg, int, fd, struct mmsghdr __user *, mmsg,
                unsigned int, vlen, unsigned int, flags,
-               struct timespec __user *, timeout)
+               struct __kernel_timespec __user *, timeout)
  {
        return do_sys_recvmmsg(fd, mmsg, vlen, flags, timeout);
  }
@@@ -2603,7 -2599,7 +2601,7 @@@ SYSCALL_DEFINE2(socketcall, int, call, 
                break;
        case SYS_RECVMMSG:
                err = do_sys_recvmmsg(a0, (struct mmsghdr __user *)a1, a[2],
-                                     a[3], (struct timespec __user *)a[4]);
+                                     a[3], (struct __kernel_timespec __user *)a[4]);
                break;
        case SYS_ACCEPT4:
                err = __sys_accept4(a0, (struct sockaddr __user *)a1,
@@@ -2752,8 -2748,7 +2750,8 @@@ static int do_siocgstamp(struct net *ne
        int err;
  
        set_fs(KERNEL_DS);
 -      err = sock_do_ioctl(net, sock, cmd, (unsigned long)&ktv);
 +      err = sock_do_ioctl(net, sock, cmd, (unsigned long)&ktv,
 +                          sizeof(struct compat_ifreq));
        set_fs(old_fs);
        if (!err)
                err = compat_put_timeval(&ktv, up);
@@@ -2769,8 -2764,7 +2767,8 @@@ static int do_siocgstampns(struct net *
        int err;
  
        set_fs(KERNEL_DS);
 -      err = sock_do_ioctl(net, sock, cmd, (unsigned long)&kts);
 +      err = sock_do_ioctl(net, sock, cmd, (unsigned long)&kts,
 +                          sizeof(struct compat_ifreq));
        set_fs(old_fs);
        if (!err)
                err = compat_put_timespec(&kts, up);
@@@ -2875,14 -2869,9 +2873,14 @@@ static int ethtool_ioctl(struct net *ne
                    copy_in_user(&rxnfc->fs.ring_cookie,
                                 &compat_rxnfc->fs.ring_cookie,
                                 (void __user *)(&rxnfc->fs.location + 1) -
 -                               (void __user *)&rxnfc->fs.ring_cookie) ||
 -                  copy_in_user(&rxnfc->rule_cnt, &compat_rxnfc->rule_cnt,
 -                               sizeof(rxnfc->rule_cnt)))
 +                               (void __user *)&rxnfc->fs.ring_cookie))
 +                      return -EFAULT;
 +              if (ethcmd == ETHTOOL_GRXCLSRLALL) {
 +                      if (put_user(rule_cnt, &rxnfc->rule_cnt))
 +                              return -EFAULT;
 +              } else if (copy_in_user(&rxnfc->rule_cnt,
 +                                      &compat_rxnfc->rule_cnt,
 +                                      sizeof(rxnfc->rule_cnt)))
                        return -EFAULT;
        }
  
@@@ -3081,8 -3070,7 +3079,8 @@@ static int routing_ioctl(struct net *ne
        }
  
        set_fs(KERNEL_DS);
 -      ret = sock_do_ioctl(net, sock, cmd, (unsigned long) r);
 +      ret = sock_do_ioctl(net, sock, cmd, (unsigned long) r,
 +                          sizeof(struct compat_ifreq));
        set_fs(old_fs);
  
  out:
@@@ -3195,8 -3183,7 +3193,8 @@@ static int compat_sock_ioctl_trans(stru
        case SIOCBONDSETHWADDR:
        case SIOCBONDCHANGEACTIVE:
        case SIOCGIFNAME:
 -              return sock_do_ioctl(net, sock, cmd, arg);
 +              return sock_do_ioctl(net, sock, cmd, arg,
 +                                   sizeof(struct compat_ifreq));
        }
  
        return -ENOIOCTLCMD;