From 302e8df8ef41cb06c3d9f4b4f785797434f4a1de Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sat, 15 Feb 2014 21:06:26 +0100 Subject: [PATCH] kernel: Update to 3.13.2. Adds an ARM LPAE kernel. --- kernel/config-arm-generic | 146 +- kernel/config-armv5tel-kirkwood | 263 +- kernel/config-armv7hl-default | 281 +- kernel/config-armv7hl-generic | 311 + kernel/config-armv7hl-lpae | 500 + kernel/config-generic | 186 +- kernel/config-i686-default | 6 - kernel/config-i686-legacy | 11 +- kernel/config-x86-generic | 179 +- kernel/config-x86_64-default | 24 +- kernel/kernel.nm | 82 +- ... grsecurity-3.0-3.13.2-201402091134.patch} | 21516 +++++++++------- .../linux-2.6-silence-acpi-blacklist.patch | 25 - kernel/scripts/configure | 37 +- 14 files changed, 13809 insertions(+), 9758 deletions(-) create mode 100644 kernel/config-armv7hl-generic create mode 100644 kernel/config-armv7hl-lpae rename kernel/patches/{grsecurity-3.0-3.12.4-201312081754.patch => grsecurity-3.0-3.13.2-201402091134.patch} (89%) delete mode 100644 kernel/patches/linux-2.6-silence-acpi-blacklist.patch diff --git a/kernel/config-arm-generic b/kernel/config-arm-generic index 2e337033d..319f296f7 100644 --- a/kernel/config-arm-generic +++ b/kernel/config-arm-generic @@ -1,37 +1,18 @@ CONFIG_ARM=y -CONFIG_MIGHT_HAVE_PCI=y CONFIG_SYS_SUPPORTS_APM_EMULATION=y CONFIG_RWSEM_GENERIC_SPINLOCK=y CONFIG_VECTORS_BASE=0xffff0000 CONFIG_ARM_PATCH_PHYS_VIRT=y -# -# General setup -# -CONFIG_BROKEN_ON_SMP=y - # # IRQ subsystem # CONFIG_HARDIRQS_SW_RESEND=y CONFIG_KTIME_SCALAR=y -# -# Timers subsystem -# -CONFIG_NO_HZ_IDLE=y - -# -# CPU/Task time and stats accounting -# -CONFIG_TICK_CPU_ACCOUNTING=y -# CONFIG_IRQ_TIME_ACCOUNTING is not set - # # RCU Subsystem # -CONFIG_TINY_RCU=y -# CONFIG_RCU_STALL_COMMON is not set CONFIG_GENERIC_SCHED_CLOCK=y CONFIG_PERF_USE_VMALLOC=y @@ -52,10 +33,8 @@ CONFIG_LBDAF=y # # System Type # -# CONFIG_ARCH_MULTIPLATFORM is not set # CONFIG_ARCH_INTEGRATOR is not set # CONFIG_ARCH_REALVIEW is not set -CONFIG_ARCH_VERSATILE=y # CONFIG_ARCH_AT91 is not set # CONFIG_ARCH_CLPS711X is not set # CONFIG_ARCH_GEMINI is not set @@ -68,7 +47,6 @@ CONFIG_ARCH_VERSATILE=y # CONFIG_ARCH_IOP33X is not set # CONFIG_ARCH_IXP4XX is not set # CONFIG_ARCH_DOVE is not set -# CONFIG_ARCH_KIRKWOOD is not set # CONFIG_ARCH_MV78XX0 is not set # CONFIG_ARCH_ORION5X is not set # CONFIG_ARCH_MMP is not set @@ -86,59 +64,32 @@ CONFIG_ARCH_VERSATILE=y # CONFIG_ARCH_S5PC100 is not set # CONFIG_ARCH_S5PV210 is not set # CONFIG_ARCH_EXYNOS is not set -# CONFIG_ARCH_SHARK is not set # CONFIG_ARCH_DAVINCI is not set # CONFIG_ARCH_OMAP1 is not set -# CONFIG_PLAT_SPEAR is not set # -# Versatile platform type +# OMAP Legacy Platform Data Board Type # -CONFIG_ARCH_VERSATILE_PB=y -CONFIG_MACH_VERSATILE_AB=y -CONFIG_MACH_VERSATILE_DT=y -CONFIG_PLAT_VERSATILE_CLOCK=y -CONFIG_PLAT_VERSATILE_CLCD=y -CONFIG_PLAT_VERSATILE_LEDS=y -CONFIG_PLAT_VERSATILE_SCHED_CLOCK=y -CONFIG_PLAT_VERSATILE=y -CONFIG_ARM_TIMER_SP804=y +# CONFIG_PLAT_SPEAR is not set # # Processor Type # -CONFIG_CPU_ARM926T=y -CONFIG_CPU_32v5=y -CONFIG_CPU_ABRT_EV5TJ=y -CONFIG_CPU_PABRT_LEGACY=y -CONFIG_CPU_CACHE_VIVT=y -CONFIG_CPU_COPY_V4WB=y -CONFIG_CPU_TLB_V4WBI=y CONFIG_CPU_CP15=y CONFIG_CPU_CP15_MMU=y -CONFIG_CPU_USE_DOMAINS=y # # Processor Features # -# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set CONFIG_ARM_THUMB=y # CONFIG_CPU_ICACHE_DISABLE is not set # CONFIG_CPU_DCACHE_DISABLE is not set -# CONFIG_CPU_DCACHE_WRITETHROUGH is not set -# CONFIG_CPU_CACHE_ROUND_ROBIN is not set -CONFIG_NEED_KUSER_HELPERS=y -CONFIG_KUSER_HELPERS=y -# CONFIG_CACHE_L2X0 is not set -CONFIG_ARM_L1_CACHE_SHIFT=5 CONFIG_ARM_NR_BANKS=8 CONFIG_MULTI_IRQ_HANDLER=y -CONFIG_ICST=y # # Bus support # -CONFIG_ARM_AMBA=y CONFIG_PCI_SYSCALL=y # CONFIG_PCI_PRI is not set # CONFIG_PCI_PASID is not set @@ -156,7 +107,6 @@ CONFIG_VMSPLIT_3G=y # CONFIG_VMSPLIT_2G is not set # CONFIG_VMSPLIT_1G is not set CONFIG_PAGE_OFFSET=0xC0000000 -CONFIG_ARCH_NR_GPIO=0 CONFIG_HZ_FIXED=0 # CONFIG_HZ_200 is not set # CONFIG_HZ_500 is not set @@ -169,14 +119,7 @@ CONFIG_HIGHMEM=y CONFIG_HW_PERF_EVENTS=y CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y -CONFIG_SPLIT_PTLOCK_CPUS=999999 -# CONFIG_PHYS_ADDR_T_64BIT is not set -CONFIG_ZONE_DMA_FLAG=0 -CONFIG_DEFAULT_MMAP_MIN_ADDR=32768 -CONFIG_NEED_PER_CPU_KM=y -CONFIG_FORCE_MAX_ZONEORDER=11 CONFIG_ALIGNMENT_TRAP=y -# CONFIG_UACCESS_WITH_MEMCPY is not set # # Boot options @@ -187,12 +130,9 @@ CONFIG_ATAGS=y CONFIG_ZBOOT_ROM_TEXT=0 CONFIG_ZBOOT_ROM_BSS=0 CONFIG_ARM_APPENDED_DTB=y -# CONFIG_ARM_ATAG_DTB_COMPAT is not set -CONFIG_CMDLINE="console=ttyAM0,115200 root=/dev/sda1 rootdelay=20" CONFIG_CMDLINE_FROM_BOOTLOADER=y # CONFIG_CMDLINE_EXTEND is not set # CONFIG_CMDLINE_FORCE is not set -# CONFIG_XIP_KERNEL is not set CONFIG_AUTO_ZRELADDR=y # @@ -260,14 +200,12 @@ CONFIG_OF_MDIO=y CONFIG_OF_PCI=y CONFIG_OF_PCI_IRQ=y # CONFIG_BLK_DEV_PCIESSD_MTIP32XX is not set -# CONFIG_MG_DISK is not set # # Misc devices # # CONFIG_SENSORS_LIS3LV02D is not set # CONFIG_SGI_IOC4 is not set -# CONFIG_ARM_CHARLCD is not set # # SCSI Transports @@ -307,11 +245,6 @@ CONFIG_MDIO_BUS_MUX=m CONFIG_MDIO_BUS_MUX_GPIO=m CONFIG_MDIO_BUS_MUX_MMIOREG=m -# -# ISDN feature submodules -# -# CONFIG_ISDN_DRV_LOOP is not set - # # Userland interfaces # @@ -320,12 +253,11 @@ CONFIG_MDIO_BUS_MUX_MMIOREG=m # # Input Device Drivers # -CONFIG_INPUT_PWM_BEEPER=m +# CONFIG_KEYBOARD_SH_KEYSC is not set # # Hardware I/O ports # -CONFIG_SERIO_AMBAKMI=m CONFIG_SERIO_APBPS2=m # CONFIG_SERIO_OLPC_APSP is not set @@ -338,10 +270,12 @@ CONFIG_SERIO_APBPS2=m # # Non-8250 serial port support # -CONFIG_SERIAL_AMBA_PL011=y -CONFIG_SERIAL_AMBA_PL011_CONSOLE=y +CONFIG_SERIAL_SH_SCI=y +CONFIG_SERIAL_SH_SCI_NR_UARTS=2 +# CONFIG_SERIAL_SH_SCI_CONSOLE is not set CONFIG_SERIAL_OF_PLATFORM=y # CONFIG_SERIAL_XILINX_PS_UART is not set +CONFIG_SERIAL_ST_ASC=m # CONFIG_HVC_DCC is not set # @@ -357,11 +291,11 @@ CONFIG_I2C_SIS630=m # I2C system bus drivers (mostly embedded / system-on-chip) # # CONFIG_I2C_DESIGNWARE_PLATFORM is not set -CONFIG_I2C_NOMADIK=m -CONFIG_I2C_VERSATILE=m +CONFIG_I2C_SH_MOBILE=m +CONFIG_I2C_RCAR=m # -# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks. +# Pin controllers # CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y CONFIG_OF_GPIO=y @@ -370,7 +304,6 @@ CONFIG_OF_GPIO=y # Memory mapped GPIO drivers: # # CONFIG_GPIO_EM is not set -# CONFIG_GPIO_PL061 is not set # CONFIG_GPIO_RCAR is not set # CONFIG_GPIO_GRGPIO is not set @@ -379,6 +312,11 @@ CONFIG_OF_GPIO=y # CONFIG_GPIO_ADNP=m +# +# MODULbus GPIO expanders: +# +CONFIG_GPIO_BCM_KONA=y + # # 1-wire Slaves # @@ -395,7 +333,6 @@ CONFIG_SENSORS_VEXPRESS=m # # Watchdog Device Drivers # -# CONFIG_ARM_SP805_WATCHDOG is not set # CONFIG_DW_WATCHDOG is not set # CONFIG_MAX63XX_WATCHDOG is not set @@ -434,6 +371,7 @@ CONFIG_DRM_I2C_CH7006=m CONFIG_DRM_I2C_SIL164=m # CONFIG_DRM_RADEON is not set # CONFIG_DRM_NOUVEAU is not set +CONFIG_DRM_ARMADA=m CONFIG_DRM_RCAR_DU=m CONFIG_DRM_RCAR_LVDS=y CONFIG_DRM_SHMOBILE=m @@ -443,12 +381,6 @@ CONFIG_FB_SYS_COPYAREA=y CONFIG_FB_SYS_IMAGEBLIT=y # CONFIG_FB_BACKLIGHT is not set -# -# Frame buffer hardware drivers -# -# CONFIG_FB_ARMCLCD is not set -CONFIG_BACKLIGHT_PWM=m - # # Console display driver support # @@ -456,7 +388,6 @@ CONFIG_BACKLIGHT_PWM=m CONFIG_SND_COMPRESS_OFFLOAD=m # CONFIG_SND_ALI5451 is not set CONFIG_SND_ARM=y -CONFIG_SND_ARMAACI=m CONFIG_SND_SOC=m CONFIG_SND_ATMEL_SOC=m CONFIG_SND_DESIGNWARE_I2S=m @@ -466,23 +397,19 @@ CONFIG_SND_SIMPLE_CARD=m # # USB Physical Layer drivers # +CONFIG_AM335X_CONTROL_USB=m +CONFIG_AM335X_PHY_USB=m CONFIG_USB_ULPI=y # # MMC/SD/SDIO Host Controller Drivers # -CONFIG_MMC_ARMMMCI=m CONFIG_MMC_DW=m # CONFIG_MMC_DW_IDMAC is not set CONFIG_MMC_DW_PLTFM=m CONFIG_MMC_DW_EXYNOS=m CONFIG_MMC_DW_PCI=m -# -# LED drivers -# -CONFIG_LEDS_PWM=m - # # iptables trigger is under Netfilter config (LED target) # @@ -491,16 +418,12 @@ CONFIG_LEDS_PWM=m # # on-CPU RTC drivers # -CONFIG_RTC_DRV_PL030=m -CONFIG_RTC_DRV_PL031=m CONFIG_RTC_DRV_SNVS=m # # DMA Devices # -# CONFIG_AMBA_PL08X is not set # CONFIG_DW_DMAC is not set -CONFIG_PL330_DMA=y CONFIG_DMA_OF=y # @@ -508,8 +431,8 @@ CONFIG_DMA_OF=y # CONFIG_CLKSRC_OF=y CONFIG_CLKSRC_MMIO=y -CONFIG_PL320_MBOX=y CONFIG_OF_IOMMU=y +# CONFIG_SHMOBILE_IOMMU is not set # # Analog to digital converters @@ -519,14 +442,12 @@ CONFIG_OF_IOMMU=y # # Temperature sensors # -CONFIG_PWM=y -CONFIG_PWM_SYSFS=y -CONFIG_PWM_PCA9685=m CONFIG_IRQCHIP=y -CONFIG_ARM_VIC=y -CONFIG_ARM_VIC_NR=2 -CONFIG_VERSATILE_FPGA_IRQ=y -CONFIG_VERSATILE_FPGA_IRQ_NR=4 + +# +# PHY Subsystem +# +CONFIG_PHY_EXYNOS_DP_VIDEO=m # # Memory Debugging @@ -545,23 +466,6 @@ CONFIG_ARM_UNWIND=y CONFIG_OLD_MCOUNT=y # CONFIG_DEBUG_USER is not set # CONFIG_DEBUG_LL is not set -CONFIG_DEBUG_LL_INCLUDE="debug/pl01x.S" -CONFIG_DEBUG_UART_PL01X=y -# CONFIG_DEBUG_UART_8250 is not set -CONFIG_DEBUG_UART_PHYS=0x101f1000 -CONFIG_DEBUG_UART_VIRT=0xf11f1000 -CONFIG_UNCOMPRESS_INCLUDE="mach/uncompress.h" -# CONFIG_OC_ETM is not set - -# -# Miscellaneous hardening features -# -CONFIG_PAX_MEMORY_SANITIZE=y - -# -# Memory Protections -# -CONFIG_GRKERNSEC_JIT_HARDEN=y # # Executable Protections @@ -603,5 +507,5 @@ CONFIG_CRYPTO_DEV_HIFN_795X_RNG=y # # Library routines # +CONFIG_ARCH_USE_CMPXCHG_LOCKREF=y CONFIG_AUDIT_GENERIC=y -CONFIG_GENERIC_ATOMIC64=y diff --git a/kernel/config-armv5tel-kirkwood b/kernel/config-armv5tel-kirkwood index 1334b0243..b05506fa7 100644 --- a/kernel/config-armv5tel-kirkwood +++ b/kernel/config-armv5tel-kirkwood @@ -1,13 +1,37 @@ CONFIG_ARCH_HAS_CPUFREQ=y +# +# General setup +# +CONFIG_BROKEN_ON_SMP=y + # # IRQ subsystem # CONFIG_GENERIC_IRQ_CHIP=y +# +# Timers subsystem +# +CONFIG_NO_HZ_IDLE=y + +# +# CPU/Task time and stats accounting +# +CONFIG_TICK_CPU_ACCOUNTING=y +# CONFIG_VIRT_CPU_ACCOUNTING_GEN is not set +# CONFIG_IRQ_TIME_ACCOUNTING is not set + +# +# RCU Subsystem +# +CONFIG_TINY_RCU=y +# CONFIG_RCU_STALL_COMMON is not set + # # System Type # +# CONFIG_ARCH_MULTIPLATFORM is not set # CONFIG_ARCH_VERSATILE is not set CONFIG_ARCH_KIRKWOOD=y @@ -41,21 +65,55 @@ CONFIG_PLAT_ORION_LEGACY=y # CONFIG_CPU_FEROCEON=y # CONFIG_CPU_FEROCEON_OLD_ID is not set +CONFIG_CPU_32v5=y CONFIG_CPU_ABRT_EV5T=y +CONFIG_CPU_PABRT_LEGACY=y +CONFIG_CPU_CACHE_VIVT=y CONFIG_CPU_COPY_FEROCEON=y CONFIG_CPU_TLB_FEROCEON=y +CONFIG_CPU_USE_DOMAINS=y # # Processor Features # +# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set +CONFIG_NEED_KUSER_HELPERS=y +CONFIG_KUSER_HELPERS=y CONFIG_OUTER_CACHE=y CONFIG_CACHE_FEROCEON_L2=y # CONFIG_CACHE_FEROCEON_L2_WRITETHROUGH is not set +# CONFIG_CACHE_L2X0 is not set +CONFIG_ARM_L1_CACHE_SHIFT=5 # # PCI host controller drivers # CONFIG_PCI_MVEBU=y +CONFIG_PCCARD=m +# CONFIG_PCMCIA is not set +CONFIG_CARDBUS=y + +# +# PC-card bridges +# +CONFIG_YENTA=m +CONFIG_YENTA_O2=y +CONFIG_YENTA_RICOH=y +CONFIG_YENTA_TI=y +CONFIG_YENTA_ENE_TUNE=y +CONFIG_YENTA_TOSHIBA=y + +# +# Kernel Features +# +CONFIG_ARCH_NR_GPIO=0 +CONFIG_SPLIT_PTLOCK_CPUS=999999 +# CONFIG_PHYS_ADDR_T_64BIT is not set +CONFIG_ZONE_DMA_FLAG=0 +CONFIG_DEFAULT_MMAP_MIN_ADDR=32768 +CONFIG_NEED_PER_CPU_KM=y +CONFIG_FORCE_MAX_ZONEORDER=11 +# CONFIG_UACCESS_WITH_MEMCPY is not set # # Boot options @@ -63,12 +121,13 @@ CONFIG_PCI_MVEBU=y CONFIG_ARM_ATAG_DTB_COMPAT=y CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_FROM_BOOTLOADER=y # CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEND is not set +CONFIG_CMDLINE="console=ttyAM0,115200 root=/dev/sda1 rootdelay=20" +# CONFIG_XIP_KERNEL is not set # # CPU Frequency scaling # CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_TABLE=y CONFIG_CPU_FREQ_GOV_COMMON=y CONFIG_CPU_FREQ_STAT=m CONFIG_CPU_FREQ_STAT_DETAILS=y @@ -88,26 +147,122 @@ CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m # CONFIG_ARM_KIRKWOOD_CPUFREQ=y +# +# CPU Idle +# +# CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED is not set + # # Bluetooth device drivers # CONFIG_RFKILL_REGULATOR=m +# +# Generic Driver Options +# +# CONFIG_FIRMWARE_IN_KERNEL is not set +CONFIG_REGMAP_I2C=m + # # Bus devices # CONFIG_MVEBU_MBUS=y +# CONFIG_MTD is not set + +# +# Device Tree and Open Firmware support +# +CONFIG_PARPORT=m +CONFIG_PARPORT_PC=m +CONFIG_PARPORT_SERIAL=m +# CONFIG_PARPORT_PC_FIFO is not set +# CONFIG_PARPORT_PC_SUPERIO is not set +# CONFIG_PARPORT_GSC is not set +# CONFIG_PARPORT_AX88796 is not set +CONFIG_PARPORT_1284=y +CONFIG_PARPORT_NOT_PC=y +# CONFIG_PARIDE is not set +CONFIG_BLK_DEV_RAM_SIZE=16384 +# CONFIG_MG_DISK is not set + +# +# Misc devices +# +# CONFIG_SRAM is not set + +# +# SCSI Transports +# +CONFIG_SCSI_PPA=m +CONFIG_SCSI_IMM=m +# CONFIG_SCSI_IZIP_EPP16 is not set +# CONFIG_SCSI_IZIP_SLOW_CTR is not set + +# +# PIO-only SFF controllers +# +# CONFIG_PATA_PLATFORM is not set # # Distributed Switch Architecture drivers # +CONFIG_VORTEX=m +CONFIG_PCMCIA_XIRCOM=m CONFIG_MV643XX_ETH=m +# +# MII PHY device drivers +# +# CONFIG_PLIP is not set + +# +# ISDN feature submodules +# +# CONFIG_ISDN_DRV_LOOP is not set + +# +# Input device support +# +# CONFIG_INPUT_FF_MEMLESS is not set +CONFIG_INPUT_MATRIXKMAP=m + +# +# Input Device Drivers +# +# CONFIG_KEYBOARD_SAMSUNG is not set +# CONFIG_MOUSE_GPIO is not set + +# +# Hardware I/O ports +# +# CONFIG_SERIO_PARKBD is not set + +# +# Non-8250 serial port support +# +CONFIG_SERIAL_SCCNXP=m +CONFIG_SERIAL_ARC=m +CONFIG_PRINTER=m +CONFIG_LP_CONSOLE=y +CONFIG_PPDEV=m +CONFIG_I2C=m +CONFIG_I2C_ALGOBIT=m + # # I2C system bus drivers (mostly embedded / system-on-chip) # CONFIG_I2C_MV64XXX=m +# +# External I2C/SMBus adapter drivers +# +CONFIG_I2C_PARPORT=m + +# +# PPS clients support +# +# CONFIG_PPS_CLIENT_PARPORT is not set + # # Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks. # @@ -157,9 +312,12 @@ CONFIG_ORION_WATCHDOG=m # # Multifunction device drivers # +CONFIG_MFD_CORE=m +# CONFIG_ABX500_CORE is not set +# CONFIG_MFD_SYSCON is not set +# CONFIG_MFD_TPS65912 is not set CONFIG_REGULATOR=y # CONFIG_REGULATOR_DEBUG is not set -# CONFIG_REGULATOR_DUMMY is not set CONFIG_REGULATOR_FIXED_VOLTAGE=y # CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set # CONFIG_REGULATOR_USERSPACE_CONSUMER is not set @@ -184,14 +342,62 @@ CONFIG_REGULATOR_PFUZE100=m # CONFIG_REGULATOR_TPS6507X is not set CONFIG_REGULATOR_VEXPRESS=m +# +# Multimedia core support +# +CONFIG_VIDEO_V4L2=m + +# +# Supported MMC/SDIO adapters +# +# CONFIG_MEDIA_PARPORT_SUPPORT is not set + +# +# Media ancillary drivers (tuners, sensors, i2c, frontends) +# +CONFIG_VIDEO_IR_I2C=m + +# +# soc_camera sensor drivers +# +CONFIG_MEDIA_TUNER=m +CONFIG_MEDIA_TUNER_SIMPLE=m +CONFIG_MEDIA_TUNER_TDA8290=m +CONFIG_MEDIA_TUNER_TDA827X=m +CONFIG_MEDIA_TUNER_TDA18271=m +CONFIG_MEDIA_TUNER_TDA9887=m +CONFIG_MEDIA_TUNER_MT20XX=m +CONFIG_MEDIA_TUNER_XC2028=m +CONFIG_MEDIA_TUNER_XC5000=m +CONFIG_MEDIA_TUNER_XC4000=m +CONFIG_MEDIA_TUNER_MC44S803=m + +# +# Graphics support +# +CONFIG_DRM=m +CONFIG_DRM_USB=m +CONFIG_DRM_KMS_HELPER=m + +# +# I2C encoder or helper chips +# +CONFIG_DRM_UDL=m +CONFIG_VIDEO_OUTPUT_CONTROL=m +# CONFIG_FB_MODE_HELPERS is not set + # # Frame buffer hardware drivers # +CONFIG_LCD_PLATFORM=m # CONFIG_BACKLIGHT_PWM is not set # # Console display driver support # +CONFIG_SND_MTS64=m +CONFIG_SND_PORTMAN2X4=m +CONFIG_SND_LX6464ES=m CONFIG_SND_KIRKWOOD_SOC=m CONFIG_SND_KIRKWOOD_SOC_OPENRD=m CONFIG_SND_KIRKWOOD_SOC_T5325=m @@ -203,18 +409,46 @@ CONFIG_SND_SOC_CS42L51=m # CONFIG_USB_EHCI_HCD_ORION=y +# +# USB port drivers +# +CONFIG_USB_USS720=m +CONFIG_USB_SERIAL_MOS7715_PARPORT=y + +# +# USB Physical Layer drivers +# +CONFIG_NOP_USB_XCEIV=m +CONFIG_SAMSUNG_USBPHY=m +CONFIG_SAMSUNG_USB2PHY=m +CONFIG_SAMSUNG_USB3PHY=m +CONFIG_MMC=m + +# +# MMC/SD/SDIO Card Drivers +# +CONFIG_MMC_BLOCK=m + # # MMC/SD/SDIO Host Controller Drivers # +CONFIG_MMC_SDHCI=m CONFIG_MMC_MVSDIO=m # # LED drivers # +# CONFIG_LEDS_GPIO is not set +CONFIG_LEDS_PWM=m CONFIG_LEDS_REGULATOR=m CONFIG_LEDS_NS2=m CONFIG_LEDS_NETXBIG=m +# +# LED Triggers +# +CONFIG_LEDS_TRIGGER_HEARTBEAT=m + # # on-CPU RTC drivers # @@ -226,6 +460,16 @@ CONFIG_RTC_DRV_MV=m CONFIG_ASYNC_TX_ENABLE_CHANNEL_SWITCH=y CONFIG_MV_XOR=y +# +# DMA Clients +# +CONFIG_DMA_ENGINE_RAID=y + +# +# Microsoft Hyper-V guest support +# +# CONFIG_PANEL is not set + # # Android # @@ -252,8 +496,19 @@ CONFIG_MVEBU_DEVBUS=y # # Temperature sensors # +CONFIG_PWM=y +CONFIG_PWM_SYSFS=y +CONFIG_PWM_PCA9685=m CONFIG_ORION_IRQCHIP=y +# +# Lock Debugging (spinlocks, mutexes, etc...) +# +# CONFIG_DEBUG_WW_MUTEX_SLOWPATH is not set +# CONFIG_DEBUG_LOCK_ALLOC is not set +# CONFIG_PROVE_LOCKING is not set +# CONFIG_LOCK_STAT is not set + # # Runtime Testing # @@ -265,6 +520,7 @@ CONFIG_DEBUG_UART_VIRT=0xfed12000 CONFIG_DEBUG_UART_8250_SHIFT=2 # CONFIG_DEBUG_UART_8250_WORD is not set # CONFIG_DEBUG_UART_8250_FLOW_CONTROL is not set +CONFIG_UNCOMPRESS_INCLUDE="mach/uncompress.h" # # Random Number Generation @@ -275,3 +531,6 @@ CONFIG_CRYPTO_DEV_MV_CESA=m # Library routines # CONFIG_RATIONAL=y +CONFIG_HAS_IOPORT=y +CONFIG_GENERIC_ATOMIC64=y +# CONFIG_DDR is not set diff --git a/kernel/config-armv7hl-default b/kernel/config-armv7hl-default index 7c0e3685e..1ab74929e 100644 --- a/kernel/config-armv7hl-default +++ b/kernel/config-armv7hl-default @@ -1,59 +1,40 @@ CONFIG_NO_IOPORT=y -CONFIG_ARCH_HAS_CPUFREQ=y -CONFIG_ARCH_HAS_BANDGAP=y CONFIG_ZONE_DMA=y CONFIG_FIQ=y # -# IRQ subsystem +# Timers subsystem # -CONFIG_GENERIC_IRQ_CHIP=y -CONFIG_SPARSE_IRQ=y -CONFIG_ARCH_HAS_TICK_BROADCAST=y -CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y +# CONFIG_NO_HZ_IDLE is not set +CONFIG_NO_HZ_FULL=y +CONFIG_NO_HZ_FULL_ALL=y +# CONFIG_NO_HZ_FULL_SYSIDLE is not set + +# +# CPU/Task time and stats accounting +# +CONFIG_VIRT_CPU_ACCOUNTING=y +CONFIG_VIRT_CPU_ACCOUNTING_GEN=y # # RCU Subsystem # -CONFIG_TREE_RCU=y -CONFIG_RCU_STALL_COMMON=y CONFIG_CONTEXT_TRACKING=y CONFIG_RCU_USER_QS=y CONFIG_CONTEXT_TRACKING_FORCE=y -CONFIG_RCU_FANOUT=32 -CONFIG_RCU_FANOUT_LEAF=16 -# CONFIG_RCU_FANOUT_EXACT is not set CONFIG_RCU_FAST_NO_HZ=y CONFIG_RCU_NOCB_CPU=y -# CONFIG_RCU_NOCB_CPU_NONE is not set -# CONFIG_RCU_NOCB_CPU_ZERO is not set CONFIG_RCU_NOCB_CPU_ALL=y -# -# Kernel Performance Events And Counters -# -CONFIG_SLUB_CPU_PARTIAL=y -CONFIG_USE_GENERIC_SMP_HELPERS=y - # # IO Schedulers # CONFIG_PADATA=y -CONFIG_MUTEX_SPIN_ON_OWNER=y - -# -# System Type -# -CONFIG_ARCH_MULTIPLATFORM=y -# CONFIG_ARCH_VERSATILE is not set # # CPU Core family selection # CONFIG_ARCH_MULTI_V6=y -CONFIG_ARCH_MULTI_V7=y -CONFIG_ARCH_MULTI_V6_V7=y -# CONFIG_ARCH_MULTI_CPU_AUTO is not set CONFIG_ARCH_MVEBU=y # @@ -63,6 +44,11 @@ CONFIG_MACH_ARMADA_370_XP=y CONFIG_MACH_ARMADA_370=y CONFIG_MACH_ARMADA_XP=y CONFIG_ARCH_BCM=y + +# +# Broadcom SoC Selection +# +# CONFIG_ARCH_BCM_MOBILE is not set CONFIG_ARCH_BCM2835=y CONFIG_ARCH_CNS3XXX=y @@ -156,38 +142,25 @@ CONFIG_IMX_HAVE_PLATFORM_SPI_IMX=y CONFIG_POWER_AVS_OMAP=y CONFIG_POWER_AVS_OMAP_CLASS3=y CONFIG_OMAP_RESET_CLOCKS=y -CONFIG_OMAP_MUX=y -# CONFIG_OMAP_MUX_DEBUG is not set -CONFIG_OMAP_MUX_WARNINGS=y -CONFIG_OMAP_32K_TIMER=y # CONFIG_OMAP3_L2_AUX_SECURE_SAVE_RESTORE is not set -CONFIG_OMAP_DM_TIMER=y -CONFIG_OMAP_PM_NOOP=y -CONFIG_MACH_OMAP_GENERIC=y -CONFIG_ARCH_OMAP=y # CONFIG_ARCH_OMAP2 is not set CONFIG_ARCH_OMAP3=y CONFIG_ARCH_OMAP4=y -CONFIG_SOC_OMAP5=y CONFIG_SOC_AM33XX=y CONFIG_SOC_AM43XX=y -CONFIG_ARCH_OMAP2PLUS=y # # TI OMAP2/3/4 Specific Features # -CONFIG_ARCH_OMAP2PLUS_TYPICAL=y CONFIG_SOC_HAS_OMAP2_SDRC=y -CONFIG_SOC_HAS_REALTIME_COUNTER=y CONFIG_SOC_DRA7XX=y CONFIG_SOC_OMAP3430=y CONFIG_SOC_TI81XX=y CONFIG_OMAP_PACKAGE_CBB=y CONFIG_OMAP_PACKAGE_CUS=y -CONFIG_OMAP_PACKAGE_CBP=y # -# OMAP Board Type +# OMAP Legacy Platform Data Board Type # CONFIG_MACH_OMAP3_BEAGLE=y CONFIG_MACH_DEVKIT8000=y @@ -195,23 +168,16 @@ CONFIG_MACH_OMAP_LDP=y CONFIG_MACH_OMAP3530_LV_SOM=y CONFIG_MACH_OMAP3_TORPEDO=y CONFIG_MACH_OVERO=y -CONFIG_MACH_OMAP3EVM=y CONFIG_MACH_OMAP3517EVM=y CONFIG_MACH_CRANEBOARD=y CONFIG_MACH_OMAP3_PANDORA=y CONFIG_MACH_TOUCHBOOK=y CONFIG_MACH_OMAP_3430SDP=y -CONFIG_MACH_NOKIA_RM680=y CONFIG_MACH_NOKIA_RX51=y -CONFIG_MACH_OMAP_ZOOM2=y -CONFIG_MACH_OMAP_ZOOM3=y CONFIG_MACH_CM_T35=y CONFIG_MACH_CM_T3517=y CONFIG_MACH_CM_T3730=y -CONFIG_MACH_IGEP0020=y -CONFIG_MACH_IGEP0030=y CONFIG_MACH_SBC3530=y -CONFIG_MACH_OMAP_3630SDP=y CONFIG_MACH_TI8168EVM=y CONFIG_MACH_TI8148EVM=y CONFIG_OMAP3_EMU=y @@ -232,7 +198,7 @@ CONFIG_ARCH_EMEV2=y # # SH-Mobile Board Type # -CONFIG_MACH_KZM9D_REFERENCE=y +CONFIG_MACH_KZM9D=y # # Timer and clock configuration @@ -251,7 +217,6 @@ CONFIG_ARCH_ATLAS6=y CONFIG_ARCH_PRIMA2=y CONFIG_ARCH_MARCO=y CONFIG_SIRF_IRQ=y -CONFIG_ARCH_TEGRA=y # # NVIDIA Tegra options @@ -259,10 +224,8 @@ CONFIG_ARCH_TEGRA=y CONFIG_ARCH_TEGRA_2x_SOC=y CONFIG_ARCH_TEGRA_3x_SOC=y CONFIG_ARCH_TEGRA_114_SOC=y -CONFIG_TEGRA_AHB=y -# CONFIG_TEGRA_EMC_SCALING_ENABLE is not set +CONFIG_ARCH_TEGRA_124_SOC=y CONFIG_ARCH_U8500=y -CONFIG_UX500_SOC_COMMON=y CONFIG_UX500_SOC_DB8500=y # @@ -281,12 +244,17 @@ CONFIG_ARCH_VEXPRESS=y # CONFIG_ARCH_VEXPRESS_CORTEX_A5_A9_ERRATA=y CONFIG_ARCH_VEXPRESS_CA9X4=y +CONFIG_ARCH_VEXPRESS_SPC=y +CONFIG_PLAT_VERSATILE_CLCD=y +CONFIG_PLAT_VERSATILE_SCHED_CLOCK=y CONFIG_ARCH_VIRT=y CONFIG_ARCH_VT8500=y CONFIG_ARCH_WM8750=y CONFIG_ARCH_WM8850=y CONFIG_ARCH_ZYNQ=y CONFIG_PLAT_ORION=y +CONFIG_PLAT_VERSATILE=y +CONFIG_ARM_TIMER_SP804=y # # Processor Type @@ -294,37 +262,23 @@ CONFIG_PLAT_ORION=y CONFIG_CPU_PJ4B=y CONFIG_CPU_V6=y CONFIG_CPU_V6K=y -CONFIG_CPU_V7=y CONFIG_CPU_32v6=y -CONFIG_CPU_32v6K=y -CONFIG_CPU_32v7=y CONFIG_CPU_ABRT_EV6=y -CONFIG_CPU_ABRT_EV7=y CONFIG_CPU_PABRT_V6=y -CONFIG_CPU_PABRT_V7=y CONFIG_CPU_CACHE_V6=y -CONFIG_CPU_CACHE_V7=y -CONFIG_CPU_CACHE_VIPT=y -CONFIG_CPU_COPY_V6=y CONFIG_CPU_TLB_V6=y -CONFIG_CPU_TLB_V7=y -CONFIG_CPU_HAS_ASID=y # # Processor Features # -# CONFIG_ARM_THUMBEE is not set -CONFIG_ARM_VIRT_EXT=y -CONFIG_SWP_EMULATE=y -# CONFIG_CPU_BPREDICT_DISABLE is not set +# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set +# CONFIG_CPU_BIG_ENDIAN is not set +CONFIG_KUSER_HELPERS=y CONFIG_DMA_CACHE_RWFO=y CONFIG_OUTER_CACHE=y CONFIG_OUTER_CACHE_SYNC=y -CONFIG_MIGHT_HAVE_CACHE_L2X0=y CONFIG_CACHE_L2X0=y -CONFIG_ARM_L1_CACHE_SHIFT_6=y -CONFIG_ARM_L1_CACHE_SHIFT=6 -CONFIG_ARM_DMA_MEM_BUFFERABLE=y +CONFIG_ARCH_SUPPORTS_BIG_ENDIAN=y CONFIG_PJ4B_ERRATA_4742=y # CONFIG_ARM_ERRATA_326103 is not set CONFIG_ARM_ERRATA_411920=y @@ -339,37 +293,31 @@ CONFIG_ARM_ERRATA_364296=y CONFIG_ARM_ERRATA_764369=y CONFIG_PL310_ERRATA_769419=y CONFIG_ARM_ERRATA_775420=y -CONFIG_ARM_ERRATA_798181=y -# CONFIG_ARM_ERRATA_773022 is not set -CONFIG_TI_PRIV_EDMA=y +CONFIG_ICST=y # # Bus support # +CONFIG_ARM_AMBA=y CONFIG_PCI_DOMAINS=y # # PCI host controller drivers # CONFIG_PCI_MVEBU=y +CONFIG_PCIE_DW=y +CONFIG_PCI_IMX6=y CONFIG_PCI_TEGRA=y # CONFIG_PCCARD is not set # # Kernel Features # -CONFIG_SMP=y -CONFIG_SMP_ON_UP=y -CONFIG_ARM_CPU_TOPOLOGY=y CONFIG_SCHED_MC=y CONFIG_SCHED_SMT=y -# CONFIG_MCPM is not set CONFIG_NR_CPUS=8 -CONFIG_HOTPLUG_CPU=y CONFIG_ARM_PSCI=y -CONFIG_ARCH_NR_GPIO=1024 -CONFIG_ARCH_HAS_HOLES_MEMORYMODEL=y -CONFIG_SPLIT_PTLOCK_CPUS=4 +# CONFIG_PHYS_ADDR_T_64BIT is not set CONFIG_ZONE_DMA_FLAG=1 CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 CONFIG_FORCE_MAX_ZONEORDER=12 @@ -379,11 +327,6 @@ CONFIG_FORCE_MAX_ZONEORDER=12 # CONFIG_CMDLINE="root=/dev/ram0 rw ramdisk=8192 initrd=0x41000000,8M console=ttySAC1,115200 init=/linuxrc mem=256M" -# -# CPU Frequency scaling -# -# CONFIG_CPU_FREQ is not set - # # CPU Idle # @@ -392,35 +335,18 @@ CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED=y # # At least one emulation must be selected # -CONFIG_VFPv3=y -CONFIG_NEON=y CONFIG_KERNEL_MODE_NEON=y # # Power management options # -CONFIG_PM_SLEEP_SMP=y CONFIG_ARCH_HAS_OPP=y CONFIG_PM_OPP=y -# -# Classification -# -CONFIG_RPS=y -CONFIG_RFS_ACCEL=y -CONFIG_XPS=y -CONFIG_NET_FLOW_LIMIT=y - -# -# Bluetooth device drivers -# -# CONFIG_RFKILL_REGULATOR is not set - # # Generic Driver Options # CONFIG_FIRMWARE_IN_KERNEL=y -CONFIG_SOC_BUS=y CONFIG_REGMAP_I2C=y CONFIG_REGMAP_MMIO=y @@ -534,6 +460,17 @@ CONFIG_BLK_DEV_RAM_SIZE=65536 CONFIG_MG_DISK=m CONFIG_MG_DISK_RES=0 +# +# Misc devices +# +# CONFIG_ARM_CHARLCD is not set +CONFIG_SRAM=y + +# +# EEPROM support +# +CONFIG_EEPROM_SUNXI_SID=m + # # Controllers with non-SFF native interface # @@ -603,11 +540,18 @@ CONFIG_INPUT_TWL6040_VIBRA=y # CONFIG_INPUT_WM831X_ON is not set CONFIG_INPUT_SIRFSOC_ONKEY=y +# +# Hardware I/O ports +# +CONFIG_SERIO_AMBAKMI=m + # # Non-8250 serial port support # CONFIG_SERIAL_AMBA_PL010=y # CONFIG_SERIAL_AMBA_PL010_CONSOLE is not set +CONFIG_SERIAL_AMBA_PL011=y +CONFIG_SERIAL_AMBA_PL011_CONSOLE=y CONFIG_SERIAL_SIRFSOC=y # CONFIG_SERIAL_SIRFSOC_CONSOLE is not set CONFIG_SERIAL_TEGRA=y @@ -625,8 +569,8 @@ CONFIG_SERIAL_ARC=y # CONFIG_SERIAL_ARC_CONSOLE is not set CONFIG_HW_RANDOM_BCM2835=y CONFIG_HW_RANDOM_OMAP=m +CONFIG_HW_RANDOM_OMAP3_ROM=m CONFIG_HW_RANDOM_MXC_RNGA=m -CONFIG_I2C=y CONFIG_I2C_ALGOBIT=y # @@ -637,28 +581,24 @@ CONFIG_I2C_DAVINCI=m CONFIG_I2C_IMX=y CONFIG_I2C_MV64XXX=y CONFIG_I2C_NOMADIK=y -CONFIG_I2C_OMAP=y CONFIG_I2C_SIRF=y +CONFIG_I2C_ST=m CONFIG_I2C_TEGRA=y +CONFIG_I2C_VERSATILE=m CONFIG_I2C_WMT=y -# -# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks. -# -CONFIG_PINCTRL=y - # # Pin controllers # CONFIG_PINMUX=y CONFIG_PINCONF=y CONFIG_GENERIC_PINCONF=y -# CONFIG_DEBUG_PINCTRL is not set CONFIG_PINCTRL_ABX500=y CONFIG_PINCTRL_AB8500=y CONFIG_PINCTRL_AB8540=y CONFIG_PINCTRL_AB9540=y CONFIG_PINCTRL_AB8505=y +# CONFIG_PINCTRL_AS3722 is not set CONFIG_PINCTRL_BCM2835=y CONFIG_PINCTRL_IMX=y CONFIG_PINCTRL_IMX35=y @@ -671,7 +611,6 @@ CONFIG_PINCTRL_NOMADIK=y CONFIG_PINCTRL_DB8500=y CONFIG_PINCTRL_DB8540=y CONFIG_PINCTRL_ROCKCHIP=y -# CONFIG_PINCTRL_SINGLE is not set CONFIG_PINCTRL_SIRF=y CONFIG_PINCTRL_SUNXI=y CONFIG_PINCTRL_ST=y @@ -686,7 +625,7 @@ CONFIG_PINCTRL_ARMADA_XP=y CONFIG_PINCTRL_WMT=y CONFIG_PINCTRL_WM8750=y CONFIG_PINCTRL_WM8850=y -CONFIG_ARCH_REQUIRE_GPIOLIB=y +CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y CONFIG_GPIO_GENERIC=y # CONFIG_GPIO_DA9052 is not set # CONFIG_GPIO_DA9055 is not set @@ -704,7 +643,6 @@ CONFIG_GPIO_PL061=y # CONFIG_GPIO_MC9S08DZ60=y # CONFIG_GPIO_RC5T583 is not set -# CONFIG_GPIO_SX150X is not set # CONFIG_GPIO_STMPE is not set # CONFIG_GPIO_TC3589X is not set # CONFIG_GPIO_TPS65912 is not set @@ -726,7 +664,6 @@ CONFIG_GPIO_TWL6040=m # 1-wire Bus Masters # CONFIG_W1_MASTER_MXC=m -# CONFIG_HDQ_MASTER_OMAP is not set # # 1-wire Slaves @@ -741,7 +678,6 @@ CONFIG_W1_MASTER_MXC=m # CONFIG_BATTERY_TWL4030_MADC is not set # CONFIG_BATTERY_RX51 is not set # CONFIG_CHARGER_TWL4030 is not set -# CONFIG_CHARGER_MANAGER is not set # CONFIG_CHARGER_MAX8997 is not set # CONFIG_CHARGER_MAX8998 is not set # CONFIG_CHARGER_TPS65090 is not set @@ -774,11 +710,13 @@ CONFIG_DRA752_THERMAL=y # CONFIG_DA9055_WATCHDOG is not set # CONFIG_WM831X_WATCHDOG is not set # CONFIG_WM8350_WATCHDOG is not set +# CONFIG_ARM_SP805_WATCHDOG is not set CONFIG_OMAP_WATCHDOG=y CONFIG_SUNXI_WATCHDOG=m # CONFIG_TWL4030_WATCHDOG is not set CONFIG_IMX2_WDT=m CONFIG_UX500_WATCHDOG=y +CONFIG_SIRFSOC_WATCHDOG=m CONFIG_BCM2835_WDT=m # @@ -786,6 +724,7 @@ CONFIG_BCM2835_WDT=m # CONFIG_MFD_CORE=y CONFIG_MFD_AS3711=y +CONFIG_MFD_AS3722=y CONFIG_PMIC_ADP5520=y CONFIG_MFD_AAT2870_CORE=y CONFIG_PMIC_DA903X=y @@ -821,7 +760,6 @@ CONFIG_MFD_STMPE=y CONFIG_STMPE_I2C=y CONFIG_MFD_SYSCON=y CONFIG_MFD_LP8788=y -CONFIG_MFD_OMAP_USB_HOST=y CONFIG_MFD_PALMAS=y CONFIG_MFD_TPS65090=y CONFIG_MFD_TPS6586X=y @@ -841,12 +779,7 @@ CONFIG_MFD_WM831X_I2C=y CONFIG_MFD_WM8350=y CONFIG_MFD_WM8350_I2C=y CONFIG_MFD_WM8994=y -CONFIG_REGULATOR=y -# CONFIG_REGULATOR_DEBUG is not set -# CONFIG_REGULATOR_DUMMY is not set CONFIG_REGULATOR_FIXED_VOLTAGE=y -# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set -# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set CONFIG_REGULATOR_88PM800=m CONFIG_REGULATOR_88PM8607=y CONFIG_REGULATOR_AD5398=m @@ -855,6 +788,7 @@ CONFIG_REGULATOR_AAT2870=m CONFIG_REGULATOR_AB3100=y CONFIG_REGULATOR_AB8500=y CONFIG_REGULATOR_AS3711=m +CONFIG_REGULATOR_AS3722=m CONFIG_REGULATOR_DA903X=m CONFIG_REGULATOR_DA9052=m CONFIG_REGULATOR_DA9055=m @@ -904,9 +838,9 @@ CONFIG_REGULATOR_WM8400=m CONFIG_REGULATOR_WM8994=m # -# Multimedia core support +# Media drivers # -CONFIG_VIDEO_V4L2=y +# CONFIG_RC_ST is not set # # Media digital TV PCI Adapters @@ -916,31 +850,16 @@ CONFIG_VIDEO_OMAP2_VOUT_VRFB=y CONFIG_VIDEO_OMAP2_VOUT=m CONFIG_VIDEO_MX3=m CONFIG_VIDEO_CODA=m - -# -# Media ancillary drivers (tuners, sensors, i2c, frontends) -# -CONFIG_VIDEO_IR_I2C=y - -# -# soc_camera sensor drivers -# -CONFIG_MEDIA_TUNER=y -CONFIG_MEDIA_TUNER_SIMPLE=y -CONFIG_MEDIA_TUNER_TDA8290=y -CONFIG_MEDIA_TUNER_TDA827X=y -CONFIG_MEDIA_TUNER_TDA18271=y -CONFIG_MEDIA_TUNER_TDA9887=y -CONFIG_MEDIA_TUNER_MT20XX=y -CONFIG_MEDIA_TUNER_XC2028=y -CONFIG_MEDIA_TUNER_XC5000=y -CONFIG_MEDIA_TUNER_XC4000=y -CONFIG_MEDIA_TUNER_MC44S803=y +CONFIG_VIDEO_TI_VPE=m +# CONFIG_VIDEO_TI_VPE_DEBUG is not set # # Graphics support # +CONFIG_TEGRA_HOST1X=y +# CONFIG_TEGRA_HOST1X_FIREWALL is not set CONFIG_DRM=y +CONFIG_DRM_KMS_HELPER=y # # I2C encoder or helper chips @@ -953,7 +872,9 @@ CONFIG_DRM_EXYNOS_G2D=y # CONFIG_DRM_UDL is not set CONFIG_DRM_OMAP=m CONFIG_DRM_OMAP_NUM_CRTCS=1 -# CONFIG_TEGRA_HOST1X is not set +CONFIG_DRM_TEGRA=y +# CONFIG_DRM_TEGRA_DEBUG is not set +# CONFIG_DRM_TEGRA_STAGING is not set # CONFIG_VIDEO_OUTPUT_CONTROL is not set CONFIG_VIDEOMODE_HELPERS=y CONFIG_FB_MODE_HELPERS=y @@ -961,6 +882,7 @@ CONFIG_FB_MODE_HELPERS=y # # Frame buffer hardware drivers # +# CONFIG_FB_ARMCLCD is not set # CONFIG_FB_IMX is not set # CONFIG_FB_VT8500 is not set # CONFIG_FB_WM8505 is not set @@ -1008,8 +930,12 @@ CONFIG_DISPLAY_PANEL_SHARP_LS037V7DW01=m # Console display driver support # CONFIG_SND_DMAENGINE_PCM=m +CONFIG_SND_ARMAACI=m CONFIG_SND_SOC_AC97_BUS=y CONFIG_SND_SOC_GENERIC_DMAENGINE_PCM=y +CONFIG_SND_DAVINCI_SOC=m +CONFIG_SND_DAVINCI_SOC_MCASP=m +CONFIG_SND_AM33XX_SOC_EVM=m CONFIG_SND_SOC_FSL_SSI=m CONFIG_SND_SOC_FSL_SPDIF=m CONFIG_SND_IMX_SOC=m @@ -1065,16 +991,10 @@ CONFIG_SND_SOC_WM8962=m CONFIG_SND_SOC_WM9712=m CONFIG_SND_SOC_TPA6130A2=m -# -# I2C HID support -# -CONFIG_USB_ARCH_HAS_EHCI=y - # # USB Host Controller Drivers # CONFIG_USB_EHCI_MXC=m -CONFIG_USB_EHCI_HCD_OMAP=y CONFIG_USB_EHCI_HCD_ORION=m CONFIG_USB_EHCI_TEGRA=y # CONFIG_USB_CNS3XXX_EHCI is not set @@ -1088,15 +1008,12 @@ CONFIG_USB_IMX21_HCD=m # USB Physical Layer drivers # CONFIG_AB8500_USB=m -CONFIG_NOP_USB_XCEIV=y CONFIG_OMAP_CONTROL_USB=m -CONFIG_OMAP_USB2=m CONFIG_OMAP_USB3=m CONFIG_SAMSUNG_USBPHY=y CONFIG_SAMSUNG_USB2PHY=y CONFIG_SAMSUNG_USB3PHY=y CONFIG_USB_MXS_PHY=m -CONFIG_USB_ULPI_VIEWPORT=y CONFIG_MMC=y # @@ -1107,6 +1024,7 @@ CONFIG_MMC_BLOCK=y # # MMC/SD/SDIO Host Controller Drivers # +CONFIG_MMC_ARMMMCI=m CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_IO_ACCESSORS=y CONFIG_MMC_SDHCI_CNS3XXX=m @@ -1151,6 +1069,7 @@ CONFIG_LEDS_TRIGGER_HEARTBEAT=y # # CONFIG_RTC_DRV_88PM860X is not set # CONFIG_RTC_DRV_88PM80X is not set +CONFIG_RTC_DRV_AS3722=m # CONFIG_RTC_DRV_LP8788 is not set # CONFIG_RTC_DRV_MAX8907 is not set # CONFIG_RTC_DRV_MAX8925 is not set @@ -1163,6 +1082,7 @@ CONFIG_LEDS_TRIGGER_HEARTBEAT=y # CONFIG_RTC_DRV_TPS65910 is not set # CONFIG_RTC_DRV_TPS80031 is not set # CONFIG_RTC_DRV_RC5T583 is not set +CONFIG_RTC_DRV_S5M=m # # Platform RTC drivers @@ -1179,6 +1099,8 @@ CONFIG_RTC_DRV_AB3100=y # CONFIG_RTC_DRV_IMXDI=m CONFIG_RTC_DRV_OMAP=m +CONFIG_RTC_DRV_PL030=m +CONFIG_RTC_DRV_PL031=m CONFIG_RTC_DRV_VT8500=m CONFIG_RTC_DRV_MV=m CONFIG_RTC_DRV_TEGRA=m @@ -1189,6 +1111,7 @@ CONFIG_RTC_DRV_SIRFSOC=m # DMA Devices # CONFIG_ASYNC_TX_ENABLE_CHANNEL_SWITCH=y +# CONFIG_AMBA_PL08X is not set CONFIG_MV_XOR=y CONFIG_MX3_IPU=y CONFIG_MX3_IPU_IRQS=4 @@ -1196,6 +1119,7 @@ CONFIG_TEGRA20_APB_DMA=y # CONFIG_STE_DMA40 is not set CONFIG_SIRF_DMA=y CONFIG_TI_EDMA=y +CONFIG_PL330_DMA=y CONFIG_IMX_SDMA=m CONFIG_IMX_DMA=m # CONFIG_MXS_DMA is not set @@ -1204,20 +1128,13 @@ CONFIG_TI_CPPI41=m CONFIG_DMA_VIRTUAL_CHANNELS=y # -# Speakup console speech +# DMA Clients # -# CONFIG_MFD_NVEC is not set - -# -# Android -# -# CONFIG_DRM_IMX is not set -CONFIG_COMMON_CLK=y +CONFIG_DMA_ENGINE_RAID=y # # Common Clock Framework # -# CONFIG_COMMON_CLK_DEBUG is not set # CONFIG_COMMON_CLK_WM831X is not set CONFIG_COMMON_CLK_VERSATILE=y # CONFIG_COMMON_CLK_MAX77686 is not set @@ -1225,6 +1142,7 @@ CONFIG_COMMON_CLK_SI5351=m CONFIG_COMMON_CLK_S2MPS11=m CONFIG_CLK_TWL6040=m CONFIG_COMMON_CLK_AXI_CLKGEN=m +CONFIG_COMMON_CLK_KEYSTONE=y CONFIG_MVEBU_CLK_COMMON=y CONFIG_MVEBU_CLK_CPU=y CONFIG_ARMADA_370_CLK=y @@ -1245,16 +1163,14 @@ CONFIG_CADENCE_TTC_TIMER=y CONFIG_CLKSRC_NOMADIK_MTU=y CONFIG_CLKSRC_DBX500_PRCMU=y CONFIG_CLKSRC_DBX500_PRCMU_SCHED_CLOCK=y -CONFIG_ARM_ARCH_TIMER=y CONFIG_ARM_GLOBAL_TIMER=y CONFIG_CLKSRC_ARM_GLOBAL_TIMER_SCHED_CLOCK=y CONFIG_VF_PIT_TIMER=y +CONFIG_PL320_MBOX=y CONFIG_OMAP_MBOX=m CONFIG_OMAP2PLUS_MBOX=m CONFIG_OMAP_MBOX_KFIFO_SIZE=256 -# CONFIG_OMAP_IOMMU is not set # CONFIG_TEGRA_IOMMU_GART is not set -# CONFIG_TEGRA_IOMMU_SMMU is not set # # Rpmsg drivers @@ -1274,39 +1190,30 @@ CONFIG_TEGRA30_MC=y # Temperature sensors # # CONFIG_PWM is not set -CONFIG_ARM_GIC=y +CONFIG_ARM_VIC=y +CONFIG_ARM_VIC_NR=2 CONFIG_ARCH_HAS_RESET_CONTROLLER=y # -# File systems +# PHY Subsystem # -CONFIG_DCACHE_WORD_ACCESS=y +CONFIG_OMAP_USB2=m # # Pseudo filesystems # # CONFIG_JFFS2_FS is not set -# -# Memory Debugging -# -# CONFIG_DEBUG_PER_CPU_MAPS is not set - # # RCU Debugging # CONFIG_RCU_CPU_STALL_TIMEOUT=60 -# CONFIG_RCU_CPU_STALL_INFO is not set # # Runtime Testing # CONFIG_DEBUG_IMX_UART_PORT=1 -CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S" -# CONFIG_DEBUG_UART_PL01X is not set -CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h" CONFIG_OC_ETM=y -# CONFIG_PID_IN_CONTEXTIDR is not set # # Non-executable pages @@ -1339,6 +1246,12 @@ CONFIG_GRKERNSEC_RWXMAP_LOG=y # Crypto core or helper # CONFIG_CRYPTO_PCRYPT=m +CONFIG_CRYPTO_ABLK_HELPER=m + +# +# Ciphers +# +CONFIG_CRYPTO_AES_ARM_BS=m # # Random Number Generation @@ -1359,5 +1272,5 @@ CONFIG_CRYPTO_DEV_UX500=m CONFIG_RATIONAL=y CONFIG_STMP_DEVICE=y CONFIG_GENERIC_ALLOCATOR=y -CONFIG_CPU_RMAP=y +CONFIG_GENERIC_ATOMIC64=y CONFIG_DDR=y diff --git a/kernel/config-armv7hl-generic b/kernel/config-armv7hl-generic new file mode 100644 index 000000000..f3df46959 --- /dev/null +++ b/kernel/config-armv7hl-generic @@ -0,0 +1,311 @@ +CONFIG_MIGHT_HAVE_PCI=y +CONFIG_ARCH_HAS_CPUFREQ=y +CONFIG_ARCH_HAS_BANDGAP=y + +# +# IRQ subsystem +# +CONFIG_GENERIC_IRQ_CHIP=y +CONFIG_SPARSE_IRQ=y +CONFIG_ARCH_HAS_TICK_BROADCAST=y +CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y + +# +# RCU Subsystem +# +CONFIG_TREE_RCU=y +CONFIG_RCU_STALL_COMMON=y +CONFIG_RCU_FANOUT=32 +CONFIG_RCU_FANOUT_LEAF=16 +# CONFIG_RCU_FANOUT_EXACT is not set + +# +# Kernel Performance Events And Counters +# +CONFIG_SLUB_CPU_PARTIAL=y + +# +# IO Schedulers +# +CONFIG_MUTEX_SPIN_ON_OWNER=y + +# +# System Type +# +CONFIG_ARCH_MULTIPLATFORM=y +# CONFIG_ARCH_VERSATILE is not set +# CONFIG_ARCH_KIRKWOOD is not set + +# +# CPU Core family selection +# +CONFIG_ARCH_MULTI_V7=y +CONFIG_ARCH_MULTI_V6_V7=y +# CONFIG_ARCH_MULTI_CPU_AUTO is not set + +# +# OMAP Feature Selections +# +CONFIG_OMAP_MUX=y +# CONFIG_OMAP_MUX_DEBUG is not set +CONFIG_OMAP_MUX_WARNINGS=y +CONFIG_OMAP_32K_TIMER=y +CONFIG_OMAP_DM_TIMER=y +CONFIG_OMAP_PM_NOOP=y +CONFIG_MACH_OMAP_GENERIC=y +CONFIG_ARCH_OMAP=y +CONFIG_SOC_OMAP5=y +CONFIG_ARCH_OMAP2PLUS=y + +# +# TI OMAP2/3/4 Specific Features +# +CONFIG_ARCH_OMAP2PLUS_TYPICAL=y +CONFIG_SOC_HAS_REALTIME_COUNTER=y + +# +# OMAP Legacy Platform Data Board Type +# +CONFIG_ARCH_TEGRA=y + +# +# NVIDIA Tegra options +# +CONFIG_TEGRA_AHB=y +# CONFIG_TEGRA_EMC_SCALING_ENABLE is not set + +# +# Processor Type +# +CONFIG_CPU_V7=y +CONFIG_CPU_32v6K=y +CONFIG_CPU_32v7=y +CONFIG_CPU_ABRT_EV7=y +CONFIG_CPU_PABRT_V7=y +CONFIG_CPU_CACHE_V7=y +CONFIG_CPU_CACHE_VIPT=y +CONFIG_CPU_COPY_V6=y +CONFIG_CPU_TLB_V7=y +CONFIG_CPU_HAS_ASID=y + +# +# Processor Features +# +# CONFIG_ARM_THUMBEE is not set +CONFIG_ARM_VIRT_EXT=y +CONFIG_SWP_EMULATE=y +# CONFIG_CPU_BPREDICT_DISABLE is not set +CONFIG_MIGHT_HAVE_CACHE_L2X0=y +CONFIG_ARM_L1_CACHE_SHIFT_6=y +CONFIG_ARM_L1_CACHE_SHIFT=6 +CONFIG_ARM_DMA_MEM_BUFFERABLE=y +CONFIG_ARM_ERRATA_798181=y +# CONFIG_ARM_ERRATA_773022 is not set +CONFIG_TI_PRIV_EDMA=y + +# +# Kernel Features +# +CONFIG_SMP=y +CONFIG_SMP_ON_UP=y +CONFIG_ARM_CPU_TOPOLOGY=y +# CONFIG_MCPM is not set +# CONFIG_BIG_LITTLE is not set +CONFIG_HOTPLUG_CPU=y +CONFIG_ARCH_NR_GPIO=1024 +CONFIG_ARCH_HAS_HOLES_MEMORYMODEL=y +CONFIG_SPLIT_PTLOCK_CPUS=4 + +# +# Boot options +# +# CONFIG_ARM_ATAG_DTB_COMPAT is not set + +# +# CPU Frequency scaling +# +# CONFIG_CPU_FREQ is not set + +# +# At least one emulation must be selected +# +CONFIG_VFPv3=y +CONFIG_NEON=y + +# +# Power management options +# +CONFIG_PM_SLEEP_SMP=y + +# +# Classification +# +CONFIG_RPS=y +CONFIG_RFS_ACCEL=y +CONFIG_XPS=y +CONFIG_NET_FLOW_LIMIT=y + +# +# Bluetooth device drivers +# +# CONFIG_RFKILL_REGULATOR is not set + +# +# Generic Driver Options +# +CONFIG_SOC_BUS=y + +# +# Non-8250 serial port support +# +CONFIG_I2C=y + +# +# I2C system bus drivers (mostly embedded / system-on-chip) +# +CONFIG_I2C_OMAP=y + +# +# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks. +# +CONFIG_PINCTRL=y + +# +# Pin controllers +# +# CONFIG_DEBUG_PINCTRL is not set +# CONFIG_PINCTRL_SINGLE is not set +CONFIG_ARCH_REQUIRE_GPIOLIB=y + +# +# Memory mapped GPIO drivers: +# +# CONFIG_GPIO_GENERIC_PLATFORM is not set + +# +# I2C GPIO expanders: +# +# CONFIG_GPIO_SX150X is not set + +# +# SPI GPIO expanders: +# +# CONFIG_GPIO_MCP23S08 is not set + +# +# 1-wire Bus Masters +# +# CONFIG_HDQ_MASTER_OMAP is not set + +# +# 1-wire Slaves +# +# CONFIG_CHARGER_MANAGER is not set + +# +# Multifunction device drivers +# +CONFIG_MFD_OMAP_USB_HOST=y +CONFIG_REGULATOR=y +# CONFIG_REGULATOR_DEBUG is not set +# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set +# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set + +# +# Multimedia core support +# +CONFIG_VIDEO_V4L2=y + +# +# Media ancillary drivers (tuners, sensors, i2c, frontends) +# +CONFIG_VIDEO_IR_I2C=y + +# +# soc_camera sensor drivers +# +CONFIG_MEDIA_TUNER=y +CONFIG_MEDIA_TUNER_SIMPLE=y +CONFIG_MEDIA_TUNER_TDA8290=y +CONFIG_MEDIA_TUNER_TDA827X=y +CONFIG_MEDIA_TUNER_TDA18271=y +CONFIG_MEDIA_TUNER_TDA9887=y +CONFIG_MEDIA_TUNER_MT20XX=y +CONFIG_MEDIA_TUNER_XC2028=y +CONFIG_MEDIA_TUNER_XC5000=y +CONFIG_MEDIA_TUNER_XC4000=y +CONFIG_MEDIA_TUNER_MC44S803=y + +# +# I2C HID support +# +CONFIG_USB_ARCH_HAS_EHCI=y + +# +# USB Host Controller Drivers +# +CONFIG_USB_EHCI_HCD_OMAP=y + +# +# USB Physical Layer drivers +# +CONFIG_NOP_USB_XCEIV=y +CONFIG_USB_ULPI_VIEWPORT=y + +# +# Speakup console speech +# +# CONFIG_MFD_NVEC is not set + +# +# Android +# +# CONFIG_DRM_IMX is not set +CONFIG_COMMON_CLK=y + +# +# Common Clock Framework +# +# CONFIG_COMMON_CLK_DEBUG is not set + +# +# Hardware Spinlock drivers +# +CONFIG_ARM_ARCH_TIMER=y +CONFIG_ARM_ARCH_TIMER_EVTSTREAM=y +# CONFIG_OMAP_IOMMU is not set +# CONFIG_TEGRA_IOMMU_SMMU is not set + +# +# Temperature sensors +# +CONFIG_ARM_GIC=y + +# +# File systems +# +CONFIG_DCACHE_WORD_ACCESS=y + +# +# Memory Debugging +# +# CONFIG_DEBUG_PER_CPU_MAPS is not set + +# +# RCU Debugging +# +# CONFIG_RCU_CPU_STALL_INFO is not set + +# +# Runtime Testing +# +CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S" +# CONFIG_DEBUG_UART_PL01X is not set +# CONFIG_DEBUG_UART_8250 is not set +CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h" +# CONFIG_PID_IN_CONTEXTIDR is not set + +# +# Library routines +# +CONFIG_CPU_RMAP=y diff --git a/kernel/config-armv7hl-lpae b/kernel/config-armv7hl-lpae new file mode 100644 index 000000000..8d6b89de1 --- /dev/null +++ b/kernel/config-armv7hl-lpae @@ -0,0 +1,500 @@ + +# +# Timers subsystem +# +CONFIG_NO_HZ_IDLE=y +# CONFIG_NO_HZ_FULL is not set + +# +# CPU/Task time and stats accounting +# +CONFIG_TICK_CPU_ACCOUNTING=y +# CONFIG_VIRT_CPU_ACCOUNTING_GEN is not set +# CONFIG_IRQ_TIME_ACCOUNTING is not set + +# +# RCU Subsystem +# +# CONFIG_RCU_USER_QS is not set +# CONFIG_RCU_FAST_NO_HZ is not set +# CONFIG_RCU_NOCB_CPU is not set + +# +# CPU Core family selection +# +# CONFIG_ARCH_MULTI_V6 is not set +# CONFIG_ARCH_MVEBU is not set +# CONFIG_ARCH_BCM is not set +# CONFIG_ARCH_HIGHBANK is not set +# CONFIG_ARCH_KEYSTONE is not set +# CONFIG_ARCH_MXC is not set + +# +# OMAP Feature Selections +# +# CONFIG_OMAP_RESET_CLOCKS is not set +# CONFIG_ARCH_OMAP3 is not set +# CONFIG_ARCH_OMAP4 is not set +# CONFIG_SOC_AM33XX is not set +# CONFIG_SOC_AM43XX is not set + +# +# TI OMAP2/3/4 Specific Features +# +# CONFIG_SOC_HAS_OMAP2_SDRC is not set +# CONFIG_SOC_DRA7XX is not set + +# +# OMAP Legacy Platform Data Board Type +# +# CONFIG_ARCH_ROCKCHIP is not set +# CONFIG_ARCH_SOCFPGA is not set +# CONFIG_ARCH_STI is not set +# CONFIG_ARCH_SHMOBILE_MULTI is not set +# CONFIG_ARCH_SUNXI is not set +# CONFIG_ARCH_SIRF is not set + +# +# NVIDIA Tegra options +# +# CONFIG_ARCH_TEGRA_2x_SOC is not set +# CONFIG_ARCH_TEGRA_3x_SOC is not set +# CONFIG_ARCH_TEGRA_114_SOC is not set +# CONFIG_ARCH_TEGRA_124_SOC is not set +# CONFIG_ARCH_U8500 is not set +# CONFIG_ARCH_VEXPRESS is not set +# CONFIG_ARCH_VIRT is not set +# CONFIG_ARCH_WM8850 is not set +# CONFIG_ARCH_ZYNQ is not set + +# +# Processor Features +# +CONFIG_ARM_LPAE=y +CONFIG_ARCH_PHYS_ADDR_T_64BIT=y +# CONFIG_CACHE_L2X0 is not set +# CONFIG_ARM_ERRATA_430973 is not set +# CONFIG_ARM_ERRATA_643719 is not set +# CONFIG_ARM_ERRATA_720789 is not set +# CONFIG_ARM_ERRATA_754322 is not set +# CONFIG_ARM_ERRATA_754327 is not set +# CONFIG_ARM_ERRATA_764369 is not set +# CONFIG_ARM_ERRATA_775420 is not set + +# +# PCI host controller drivers +# +# CONFIG_PCI_TEGRA is not set +CONFIG_PCCARD=m +# CONFIG_PCMCIA is not set +CONFIG_CARDBUS=y + +# +# PC-card bridges +# +CONFIG_YENTA=m +CONFIG_YENTA_O2=y +CONFIG_YENTA_RICOH=y +CONFIG_YENTA_TI=y +CONFIG_YENTA_ENE_TUNE=y +CONFIG_YENTA_TOSHIBA=y + +# +# Kernel Features +# +# CONFIG_SCHED_MC is not set +# CONFIG_SCHED_SMT is not set +CONFIG_NR_CPUS=4 +# CONFIG_ARM_PSCI is not set +# CONFIG_THUMB2_KERNEL is not set +CONFIG_SYS_SUPPORTS_HUGETLBFS=y +CONFIG_PHYS_ADDR_T_64BIT=y +CONFIG_ZONE_DMA_FLAG=0 +CONFIG_DEFAULT_MMAP_MIN_ADDR=32768 +# CONFIG_TRANSPARENT_HUGEPAGE is not set +CONFIG_FORCE_MAX_ZONEORDER=11 +# CONFIG_UACCESS_WITH_MEMCPY is not set +# CONFIG_XEN is not set + +# +# Boot options +# +CONFIG_CMDLINE="console=ttyAM0,115200 root=/dev/sda1 rootdelay=20" + +# +# CPU Idle +# +# CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED is not set + +# +# At least one emulation must be selected +# +# CONFIG_KERNEL_MODE_NEON is not set + +# +# Generic Driver Options +# +# CONFIG_FIRMWARE_IN_KERNEL is not set +CONFIG_REGMAP_I2C=m + +# +# Bus devices +# +# CONFIG_OMAP_OCP2SCP is not set +# CONFIG_OMAP_INTERCONNECT is not set +# CONFIG_MTD is not set + +# +# Device Tree and Open Firmware support +# +CONFIG_PARPORT=m +CONFIG_PARPORT_PC=m +CONFIG_PARPORT_SERIAL=m +# CONFIG_PARPORT_PC_FIFO is not set +# CONFIG_PARPORT_PC_SUPERIO is not set +# CONFIG_PARPORT_GSC is not set +# CONFIG_PARPORT_AX88796 is not set +CONFIG_PARPORT_1284=y +CONFIG_PARPORT_NOT_PC=y +# CONFIG_PARIDE is not set +CONFIG_BLK_DEV_RAM_SIZE=16384 +# CONFIG_MG_DISK is not set + +# +# Misc devices +# +# CONFIG_SRAM is not set + +# +# SCSI Transports +# +CONFIG_SCSI_PPA=m +CONFIG_SCSI_IMM=m +# CONFIG_SCSI_IZIP_EPP16 is not set +# CONFIG_SCSI_IZIP_SLOW_CTR is not set + +# +# PIO-only SFF controllers +# +# CONFIG_PATA_PLATFORM is not set + +# +# Distributed Switch Architecture drivers +# +CONFIG_VORTEX=m +CONFIG_PCMCIA_XIRCOM=m + +# +# MII PHY device drivers +# +# CONFIG_PLIP is not set + +# +# Input device support +# +# CONFIG_INPUT_FF_MEMLESS is not set +CONFIG_INPUT_MATRIXKMAP=m + +# +# Input Device Drivers +# +# CONFIG_KEYBOARD_TEGRA is not set +# CONFIG_KEYBOARD_SAMSUNG is not set +# CONFIG_KEYBOARD_OMAP4 is not set +# CONFIG_MOUSE_GPIO is not set + +# +# Hardware I/O ports +# +# CONFIG_SERIO_PARKBD is not set + +# +# Non-8250 serial port support +# +# CONFIG_SERIAL_OMAP is not set +CONFIG_SERIAL_SCCNXP=m +CONFIG_SERIAL_ARC=m +CONFIG_PRINTER=m +CONFIG_LP_CONSOLE=y +CONFIG_PPDEV=m +CONFIG_HW_RANDOM_OMAP=y +CONFIG_I2C_ALGOBIT=m + +# +# I2C system bus drivers (mostly embedded / system-on-chip) +# +# CONFIG_I2C_TEGRA is not set + +# +# External I2C/SMBus adapter drivers +# +CONFIG_I2C_PARPORT=m + +# +# PPS clients support +# +# CONFIG_PPS_CLIENT_PARPORT is not set + +# +# Pin controllers +# +# CONFIG_PINMUX is not set +# CONFIG_PINCONF is not set + +# +# Texas Instruments thermal drivers +# +# CONFIG_TI_SOC_THERMAL is not set + +# +# Watchdog Device Drivers +# +# CONFIG_OMAP_WATCHDOG is not set + +# +# Multifunction device drivers +# +CONFIG_MFD_CORE=m +# CONFIG_MFD_AS3711 is not set +# CONFIG_MFD_AS3722 is not set +# CONFIG_PMIC_ADP5520 is not set +# CONFIG_MFD_AAT2870_CORE is not set +# CONFIG_PMIC_DA903X is not set +# CONFIG_MFD_DA9052_I2C is not set +# CONFIG_MFD_DA9055 is not set +# CONFIG_MFD_DA9063 is not set +# CONFIG_HTC_I2CPLD is not set +# CONFIG_MFD_88PM800 is not set +# CONFIG_MFD_88PM805 is not set +# CONFIG_MFD_88PM860X is not set +# CONFIG_MFD_MAX77686 is not set +# CONFIG_MFD_MAX77693 is not set +# CONFIG_MFD_MAX8907 is not set +# CONFIG_MFD_MAX8925 is not set +# CONFIG_MFD_MAX8997 is not set +# CONFIG_MFD_MAX8998 is not set +# CONFIG_MFD_RC5T583 is not set +# CONFIG_MFD_SEC_CORE is not set +# CONFIG_MFD_SMSC is not set +# CONFIG_ABX500_CORE is not set +# CONFIG_MFD_STMPE is not set +# CONFIG_MFD_SYSCON is not set +# CONFIG_MFD_LP8788 is not set +# CONFIG_MFD_PALMAS is not set +# CONFIG_MFD_TPS65090 is not set +# CONFIG_MFD_TPS6586X is not set +# CONFIG_MFD_TPS65910 is not set +# CONFIG_MFD_TPS65912 is not set +# CONFIG_MFD_TPS65912_I2C is not set +# CONFIG_MFD_TPS80031 is not set +# CONFIG_TWL4030_CORE is not set +# CONFIG_TWL6040_CORE is not set +# CONFIG_MFD_TC3589X is not set +# CONFIG_MFD_WM8400 is not set +# CONFIG_MFD_WM831X_I2C is not set +# CONFIG_MFD_WM8350_I2C is not set +# CONFIG_MFD_WM8994 is not set +# CONFIG_REGULATOR_FIXED_VOLTAGE is not set +# CONFIG_REGULATOR_AD5398 is not set +# CONFIG_REGULATOR_DA9210 is not set +# CONFIG_REGULATOR_FAN53555 is not set +# CONFIG_REGULATOR_GPIO is not set +# CONFIG_REGULATOR_ISL6271A is not set +# CONFIG_REGULATOR_LP3971 is not set +# CONFIG_REGULATOR_LP3972 is not set +# CONFIG_REGULATOR_LP872X is not set +# CONFIG_REGULATOR_LP8755 is not set +# CONFIG_REGULATOR_MAX1586 is not set +# CONFIG_REGULATOR_MAX8649 is not set +# CONFIG_REGULATOR_MAX8660 is not set +# CONFIG_REGULATOR_MAX8952 is not set +# CONFIG_REGULATOR_MAX8973 is not set +# CONFIG_REGULATOR_PFUZE100 is not set +# CONFIG_REGULATOR_TI_ABB is not set +# CONFIG_REGULATOR_TPS51632 is not set +# CONFIG_REGULATOR_TPS62360 is not set +# CONFIG_REGULATOR_TPS65023 is not set +# CONFIG_REGULATOR_TPS6507X is not set +# CONFIG_REGULATOR_VEXPRESS is not set + +# +# Supported MMC/SDIO adapters +# +# CONFIG_MEDIA_PARPORT_SUPPORT is not set + +# +# Graphics support +# +# CONFIG_TEGRA_HOST1X is not set +CONFIG_DRM=m +CONFIG_DRM_USB=m +CONFIG_DRM_KMS_HELPER=m + +# +# I2C encoder or helper chips +# +# CONFIG_DRM_EXYNOS is not set +CONFIG_DRM_UDL=m +# CONFIG_DRM_TEGRA is not set +CONFIG_VIDEO_OUTPUT_CONTROL=m +# CONFIG_FB_MODE_HELPERS is not set + +# +# Frame buffer hardware drivers +# +# CONFIG_OMAP2_DSS is not set +CONFIG_LCD_PLATFORM=m +CONFIG_BACKLIGHT_PWM=m + +# +# Console display driver support +# +CONFIG_SND_MTS64=m +CONFIG_SND_PORTMAN2X4=m +CONFIG_SND_LX6464ES=m + +# +# USB Host Controller Drivers +# +# CONFIG_USB_EHCI_TEGRA is not set + +# +# USB port drivers +# +CONFIG_USB_USS720=m +CONFIG_USB_SERIAL_MOS7715_PARPORT=y + +# +# USB Physical Layer drivers +# +# CONFIG_OMAP_CONTROL_USB is not set +# CONFIG_OMAP_USB3 is not set +CONFIG_SAMSUNG_USBPHY=m +CONFIG_SAMSUNG_USB2PHY=m +CONFIG_SAMSUNG_USB3PHY=m +CONFIG_MMC=m + +# +# MMC/SD/SDIO Card Drivers +# +CONFIG_MMC_BLOCK=m + +# +# MMC/SD/SDIO Host Controller Drivers +# +CONFIG_MMC_SDHCI=m +# CONFIG_MMC_SDHCI_TEGRA is not set +# CONFIG_MMC_OMAP is not set +# CONFIG_MMC_OMAP_HS is not set + +# +# LED drivers +# +# CONFIG_LEDS_GPIO is not set +CONFIG_LEDS_PWM=m +# CONFIG_LEDS_REGULATOR is not set + +# +# LED Triggers +# +CONFIG_LEDS_TRIGGER_HEARTBEAT=m + +# +# on-CPU RTC drivers +# +# CONFIG_RTC_DRV_TEGRA is not set + +# +# DMA Devices +# +# CONFIG_TEGRA20_APB_DMA is not set +# CONFIG_TI_EDMA is not set +# CONFIG_DMA_OMAP is not set +# CONFIG_TI_CPPI41 is not set + +# +# Microsoft Hyper-V guest support +# +# CONFIG_PANEL is not set + +# +# Common Clock Framework +# +# CONFIG_COMMON_CLK_SI5351 is not set + +# +# Hardware Spinlock drivers +# +# CONFIG_HWSPINLOCK_OMAP is not set +# CONFIG_OMAP2PLUS_MBOX is not set +# CONFIG_ARM_SMMU is not set + +# +# Rpmsg drivers +# +# CONFIG_TI_EMIF is not set + +# +# Temperature sensors +# +CONFIG_PWM=y +CONFIG_PWM_SYSFS=y +CONFIG_PWM_PCA9685=m +# CONFIG_PWM_TEGRA is not set + +# +# PHY Subsystem +# +# CONFIG_OMAP_USB2 is not set + +# +# Pseudo filesystems +# +# CONFIG_HUGETLBFS is not set + +# +# Lock Debugging (spinlocks, mutexes, etc...) +# +# CONFIG_DEBUG_WW_MUTEX_SLOWPATH is not set +# CONFIG_DEBUG_LOCK_ALLOC is not set +# CONFIG_PROVE_LOCKING is not set +# CONFIG_LOCK_STAT is not set + +# +# RCU Debugging +# +CONFIG_RCU_CPU_STALL_TIMEOUT=21 + +# +# Non-executable pages +# +# CONFIG_PAX_NOEXEC is not set + +# +# Miscellaneous hardening features +# +# CONFIG_PAX_REFCOUNT is not set + +# +# Memory Protections +# +# CONFIG_GRKERNSEC_OLD_ARM_USERLAND is not set + +# +# Crypto core or helper +# +# CONFIG_CRYPTO_PCRYPT is not set + +# +# Random Number Generation +# +# CONFIG_CRYPTO_DEV_OMAP_SHAM is not set +# CONFIG_CRYPTO_DEV_OMAP_AES is not set +# CONFIG_CRYPTO_DEV_TEGRA_AES is not set + +# +# Library routines +# +CONFIG_HAS_IOPORT=y +# CONFIG_DDR is not set +# CONFIG_KVM is not set diff --git a/kernel/config-generic b/kernel/config-generic index 341447d65..933d8ac5b 100644 --- a/kernel/config-generic +++ b/kernel/config-generic @@ -2,7 +2,6 @@ # CONFIG_LOCKDEP_SUPPORT=y CONFIG_STACKTRACE_SUPPORT=y -CONFIG_HAVE_LATENCYTOP_SUPPORT=y CONFIG_MMU=y CONFIG_NEED_DMA_MAP_STATE=y CONFIG_GENERIC_BUG=y @@ -43,7 +42,6 @@ CONFIG_AUDIT=y CONFIG_AUDITSYSCALL=y CONFIG_AUDIT_WATCH=y CONFIG_AUDIT_TREE=y -CONFIG_AUDIT_LOGINUID_IMMUTABLE=y # # IRQ subsystem @@ -165,6 +163,8 @@ CONFIG_GENERIC_SMP_IDLE_THREAD=y CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y CONFIG_HAVE_CLK=y CONFIG_HAVE_DMA_API_DEBUG=y +CONFIG_HAVE_PERF_REGS=y +CONFIG_HAVE_PERF_USER_STACK_DUMP=y CONFIG_HAVE_ARCH_JUMP_LABEL=y CONFIG_HAVE_ARCH_SECCOMP_FILTER=y CONFIG_SECCOMP_FILTER=y @@ -178,6 +178,7 @@ CONFIG_OLD_SIGSUSPEND3=y CONFIG_SLABINFO=y CONFIG_RT_MUTEXES=y CONFIG_BASE_SMALL=0 +CONFIG_SYSTEM_TRUSTED_KEYRING=y CONFIG_MODULES=y # CONFIG_MODULE_FORCE_LOAD is not set CONFIG_MODULE_UNLOAD=y @@ -240,6 +241,8 @@ CONFIG_FREEZER=y # # Processor type and features # +CONFIG_SWIOTLB=y +CONFIG_IOMMU_HELPER=y CONFIG_PREEMPT_NONE=y # CONFIG_PREEMPT_VOLUNTARY is not set # CONFIG_PREEMPT is not set @@ -297,7 +300,6 @@ CONFIG_PM_CLK=y # # CPU Idle # -# CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED is not set # # Memory power savings @@ -325,19 +327,10 @@ CONFIG_PCI_IOV=y # # PCI host controller drivers # -CONFIG_PCCARD=m -# CONFIG_PCMCIA is not set -CONFIG_CARDBUS=y # # PC-card bridges # -CONFIG_YENTA=m -CONFIG_YENTA_O2=y -CONFIG_YENTA_RICOH=y -CONFIG_YENTA_TI=y -CONFIG_YENTA_ENE_TUNE=y -CONFIG_YENTA_TOSHIBA=y # # Executable file formats / Emulations @@ -416,7 +409,6 @@ CONFIG_DEFAULT_CUBIC=y CONFIG_DEFAULT_TCP_CONG="cubic" CONFIG_TCP_MD5SIG=y CONFIG_IPV6=y -CONFIG_IPV6_PRIVACY=y CONFIG_IPV6_ROUTER_PREF=y CONFIG_IPV6_ROUTE_INFO=y CONFIG_IPV6_OPTIMISTIC_DAD=y @@ -430,6 +422,7 @@ CONFIG_INET6_XFRM_MODE_TRANSPORT=m CONFIG_INET6_XFRM_MODE_TUNNEL=m CONFIG_INET6_XFRM_MODE_BEET=m CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m +CONFIG_IPV6_VTI=m CONFIG_IPV6_SIT=m CONFIG_IPV6_SIT_6RD=y CONFIG_IPV6_NDISC_NODETYPE=y @@ -494,6 +487,17 @@ CONFIG_NF_NAT_IRC=m CONFIG_NF_NAT_SIP=m CONFIG_NF_NAT_TFTP=m CONFIG_NETFILTER_SYNPROXY=m +CONFIG_NF_TABLES=m +CONFIG_NFT_EXTHDR=m +CONFIG_NFT_META=m +CONFIG_NFT_CT=m +CONFIG_NFT_RBTREE=m +CONFIG_NFT_HASH=m +CONFIG_NFT_COUNTER=m +CONFIG_NFT_LOG=m +CONFIG_NFT_LIMIT=m +CONFIG_NFT_NAT=m +# CONFIG_NFT_COMPAT is not set CONFIG_NETFILTER_XTABLES=y # @@ -587,7 +591,9 @@ CONFIG_IP_SET_HASH_IP=m CONFIG_IP_SET_HASH_IPPORT=m CONFIG_IP_SET_HASH_IPPORTIP=m CONFIG_IP_SET_HASH_IPPORTNET=m +CONFIG_IP_SET_HASH_NETPORTNET=m CONFIG_IP_SET_HASH_NET=m +CONFIG_IP_SET_HASH_NETNET=m CONFIG_IP_SET_HASH_NETPORT=m CONFIG_IP_SET_HASH_NETIFACE=m CONFIG_IP_SET_LIST_SET=m @@ -638,6 +644,11 @@ CONFIG_IP_VS_PE_SIP=m CONFIG_NF_DEFRAG_IPV4=y CONFIG_NF_CONNTRACK_IPV4=y # CONFIG_NF_CONNTRACK_PROC_COMPAT is not set +CONFIG_NF_TABLES_IPV4=m +CONFIG_NFT_REJECT_IPV4=m +CONFIG_NFT_CHAIN_ROUTE_IPV4=m +CONFIG_NFT_CHAIN_NAT_IPV4=m +CONFIG_NF_TABLES_ARP=m CONFIG_IP_NF_IPTABLES=y CONFIG_IP_NF_MATCH_AH=m CONFIG_IP_NF_MATCH_ECN=m @@ -670,6 +681,9 @@ CONFIG_IP_NF_ARP_MANGLE=m # CONFIG_NF_DEFRAG_IPV6=y CONFIG_NF_CONNTRACK_IPV6=y +CONFIG_NF_TABLES_IPV6=m +CONFIG_NFT_CHAIN_ROUTE_IPV6=m +CONFIG_NFT_CHAIN_NAT_IPV6=m CONFIG_IP6_NF_IPTABLES=y CONFIG_IP6_NF_MATCH_AH=m CONFIG_IP6_NF_MATCH_EUI64=m @@ -690,6 +704,7 @@ CONFIG_IP6_NF_SECURITY=m CONFIG_NF_NAT_IPV6=m CONFIG_IP6_NF_TARGET_MASQUERADE=m CONFIG_IP6_NF_TARGET_NPT=m +CONFIG_NF_TABLES_BRIDGE=m CONFIG_BRIDGE_NF_EBTABLES=m CONFIG_BRIDGE_EBT_BROUTE=m CONFIG_BRIDGE_EBT_T_FILTER=m @@ -799,6 +814,7 @@ CONFIG_NET_CLS_RSVP=m CONFIG_NET_CLS_RSVP6=m CONFIG_NET_CLS_FLOW=m CONFIG_NET_CLS_CGROUP=m +CONFIG_NET_CLS_BPF=m CONFIG_NET_EMATCH=y CONFIG_NET_EMATCH_STACK=32 CONFIG_NET_EMATCH_CMP=m @@ -834,6 +850,7 @@ CONFIG_VSOCKETS=m CONFIG_NETLINK_MMAP=y CONFIG_NETLINK_DIAG=m # CONFIG_NET_MPLS_GSO is not set +# CONFIG_HSR is not set CONFIG_NETPRIO_CGROUP=m CONFIG_NET_RX_BUSY_POLL=y CONFIG_BQL=y @@ -930,14 +947,12 @@ CONFIG_DEVTMPFS_MOUNT=y CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=y -# CONFIG_FIRMWARE_IN_KERNEL is not set CONFIG_EXTRA_FIRMWARE="" CONFIG_FW_LOADER_USER_HELPER=y # CONFIG_DEBUG_DRIVER is not set # CONFIG_DEBUG_DEVRES is not set # CONFIG_GENERIC_CPU_DEVICES is not set CONFIG_REGMAP=y -CONFIG_REGMAP_I2C=m CONFIG_REGMAP_IRQ=y CONFIG_DMA_SHARED_BUFFER=y @@ -946,22 +961,13 @@ CONFIG_DMA_SHARED_BUFFER=y # CONFIG_CONNECTOR=y CONFIG_PROC_EVENTS=y -# CONFIG_MTD is not set -CONFIG_PARPORT=m -CONFIG_PARPORT_PC=m -CONFIG_PARPORT_SERIAL=m -# CONFIG_PARPORT_PC_FIFO is not set -# CONFIG_PARPORT_PC_SUPERIO is not set -# CONFIG_PARPORT_GSC is not set -# CONFIG_PARPORT_AX88796 is not set -CONFIG_PARPORT_1284=y -CONFIG_PARPORT_NOT_PC=y +CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y # # Protocols # CONFIG_BLK_DEV=y -# CONFIG_PARIDE is not set +# CONFIG_BLK_DEV_NULL_BLK is not set CONFIG_BLK_CPQ_CISS_DA=m # CONFIG_CISS_SCSI_TAPE is not set CONFIG_BLK_DEV_DAC960=m @@ -977,7 +983,6 @@ CONFIG_BLK_DEV_NVME=m CONFIG_BLK_DEV_SX8=m CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_COUNT=16 -CONFIG_BLK_DEV_RAM_SIZE=16384 # CONFIG_BLK_DEV_XIP is not set # CONFIG_CDROM_PKTCDVD is not set # CONFIG_ATA_OVER_ETH is not set @@ -1011,7 +1016,6 @@ CONFIG_BMP085=y CONFIG_BMP085_I2C=m CONFIG_PCH_PHUB=m CONFIG_USB_SWITCH_FSA9480=m -# CONFIG_SRAM is not set # CONFIG_C2PORT is not set # @@ -1035,6 +1039,14 @@ CONFIG_TI_ST=m # Altera FPGA firmware download module # CONFIG_ALTERA_STAPL=m + +# +# Intel MIC Host Driver +# + +# +# Intel MIC Card Driver +# CONFIG_HAVE_IDE=y # CONFIG_IDE is not set @@ -1135,10 +1147,6 @@ CONFIG_SCSI_FUTURE_DOMAIN=m CONFIG_SCSI_IPS=m CONFIG_SCSI_INITIO=m CONFIG_SCSI_INIA100=m -CONFIG_SCSI_PPA=m -CONFIG_SCSI_IMM=m -# CONFIG_SCSI_IZIP_EPP16 is not set -# CONFIG_SCSI_IZIP_SLOW_CTR is not set CONFIG_SCSI_STEX=m CONFIG_SCSI_SYM53C8XX_2=m CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1 @@ -1260,7 +1268,6 @@ CONFIG_PATA_CMD640_PCI=m CONFIG_PATA_MPIIX=m CONFIG_PATA_NS87410=m CONFIG_PATA_OPTI=m -# CONFIG_PATA_PLATFORM is not set CONFIG_PATA_RZ1000=m # @@ -1280,7 +1287,6 @@ CONFIG_MD_MULTIPATH=m CONFIG_MD_FAULTY=m CONFIG_BCACHE=m # CONFIG_BCACHE_DEBUG is not set -# CONFIG_BCACHE_EDEBUG is not set # CONFIG_BCACHE_CLOSURES_DEBUG is not set CONFIG_BLK_DEV_DM=y # CONFIG_DM_DEBUG is not set @@ -1294,8 +1300,8 @@ CONFIG_DM_CACHE=m CONFIG_DM_CACHE_MQ=m CONFIG_DM_CACHE_CLEANER=m CONFIG_DM_MIRROR=y -CONFIG_DM_RAID=m CONFIG_DM_LOG_USERSPACE=m +CONFIG_DM_RAID=m CONFIG_DM_ZERO=y CONFIG_DM_MULTIPATH=m CONFIG_DM_MULTIPATH_QL=m @@ -1384,7 +1390,6 @@ CONFIG_NET_DSA_MV88E6123_61_65=y CONFIG_ETHERNET=y CONFIG_MDIO=m CONFIG_NET_VENDOR_3COM=y -CONFIG_VORTEX=m CONFIG_TYPHOON=m CONFIG_NET_VENDOR_ADAPTEC=y CONFIG_ADAPTEC_STARFIRE=m @@ -1438,7 +1443,6 @@ CONFIG_TULIP_NAPI_HW_MITIGATION=y CONFIG_WINBOND_840=m CONFIG_DM9102=m CONFIG_ULI526X=m -CONFIG_PCMCIA_XIRCOM=m CONFIG_NET_VENDOR_DLINK=y CONFIG_DL2K=m CONFIG_SUNDANCE=m @@ -1573,7 +1577,6 @@ CONFIG_MICREL_PHY=m CONFIG_FIXED_PHY=y CONFIG_MDIO_BITBANG=m # CONFIG_MDIO_GPIO is not set -# CONFIG_PLIP is not set CONFIG_PPP=m CONFIG_PPP_BSDCOMP=m CONFIG_PPP_DEFLATE=m @@ -1603,6 +1606,7 @@ CONFIG_USB_NET_AX88179_178A=m CONFIG_USB_NET_CDCETHER=m CONFIG_USB_NET_CDC_EEM=m CONFIG_USB_NET_CDC_NCM=m +CONFIG_USB_NET_HUAWEI_CDC_NCM=m CONFIG_USB_NET_CDC_MBIM=m CONFIG_USB_NET_DM9601=m CONFIG_USB_NET_SR9700=m @@ -1677,6 +1681,8 @@ CONFIG_ATH10K_PCI=m # CONFIG_ATH10K_DEBUG is not set # CONFIG_ATH10K_DEBUGFS is not set # CONFIG_ATH10K_TRACING is not set +CONFIG_WCN36XX=m +# CONFIG_WCN36XX_DEBUGFS is not set CONFIG_B43=m CONFIG_B43_SSB=y CONFIG_B43_PCI_AUTOSELECT=y @@ -1760,6 +1766,7 @@ CONFIG_RT2800USB_RT53XX=y CONFIG_RT2800USB_RT55XX=y CONFIG_RT2800USB_UNKNOWN=y CONFIG_RT2800_LIB=m +CONFIG_RT2800_LIB_MMIO=m CONFIG_RT2X00_LIB_MMIO=m CONFIG_RT2X00_LIB_PCI=m CONFIG_RT2X00_LIB_USB=m @@ -1905,10 +1912,8 @@ CONFIG_ISDN_HDLC=m # Input device support # CONFIG_INPUT=y -# CONFIG_INPUT_FF_MEMLESS is not set CONFIG_INPUT_POLLDEV=m CONFIG_INPUT_SPARSEKMAP=m -CONFIG_INPUT_MATRIXKMAP=m # # Userland interfaces @@ -1943,7 +1948,6 @@ CONFIG_KEYBOARD_LM8333=m # CONFIG_KEYBOARD_MPR121 is not set # CONFIG_KEYBOARD_NEWTON is not set # CONFIG_KEYBOARD_OPENCORES is not set -# CONFIG_KEYBOARD_SAMSUNG is not set # CONFIG_KEYBOARD_STOWAWAY is not set # CONFIG_KEYBOARD_SUNKBD is not set # CONFIG_KEYBOARD_XTKBD is not set @@ -1962,7 +1966,6 @@ CONFIG_MOUSE_APPLETOUCH=m CONFIG_MOUSE_BCM5974=m CONFIG_MOUSE_CYAPA=m CONFIG_MOUSE_VSXXXAA=m -# CONFIG_MOUSE_GPIO is not set CONFIG_MOUSE_SYNAPTICS_I2C=m CONFIG_MOUSE_SYNAPTICS_USB=m # CONFIG_INPUT_JOYSTICK is not set @@ -1994,7 +1997,6 @@ CONFIG_INPUT_GPIO_ROTARY_ENCODER=m # CONFIG_SERIO=y CONFIG_SERIO_SERPORT=y -# CONFIG_SERIO_PARKBD is not set # CONFIG_SERIO_PCIPS2 is not set CONFIG_SERIO_LIBPS2=y CONFIG_SERIO_RAW=m @@ -2053,21 +2055,15 @@ CONFIG_SERIAL_8250_RSA=y CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_SERIAL_JSM=m -CONFIG_SERIAL_SCCNXP=m # CONFIG_SERIAL_TIMBERDALE is not set # CONFIG_SERIAL_ALTERA_JTAGUART is not set # CONFIG_SERIAL_ALTERA_UART is not set # CONFIG_SERIAL_PCH_UART is not set -CONFIG_SERIAL_ARC=m CONFIG_SERIAL_ARC_NR_PORTS=1 CONFIG_SERIAL_RP2=m CONFIG_SERIAL_RP2_NR_UARTS=32 CONFIG_SERIAL_FSL_LPUART=m -CONFIG_SERIAL_ST_ASC=m # CONFIG_TTY_PRINTK is not set -CONFIG_PRINTER=m -CONFIG_LP_CONSOLE=y -CONFIG_PPDEV=m CONFIG_HVC_DRIVER=y CONFIG_VIRTIO_CONSOLE=y CONFIG_IPMI_HANDLER=m @@ -2087,14 +2083,12 @@ CONFIG_R3964=m CONFIG_RAW_DRIVER=y CONFIG_MAX_RAW_DEVS=8192 # CONFIG_TCG_TPM is not set -CONFIG_I2C=m CONFIG_I2C_BOARDINFO=y CONFIG_I2C_COMPAT=y CONFIG_I2C_CHARDEV=m # CONFIG_I2C_MUX is not set CONFIG_I2C_HELPER_AUTO=y CONFIG_I2C_SMBUS=m -CONFIG_I2C_ALGOBIT=m CONFIG_I2C_ALGOPCA=m # @@ -2136,7 +2130,6 @@ CONFIG_I2C_SIMTEC=m # External I2C/SMBus adapter drivers # CONFIG_I2C_DIOLAN_U2C=m -CONFIG_I2C_PARPORT=m CONFIG_I2C_PARPORT_LIGHT=m # CONFIG_I2C_TAOS_EVM is not set CONFIG_I2C_TINY_USB=m @@ -2169,7 +2162,6 @@ CONFIG_PPS=m # # CONFIG_PPS_CLIENT_KTIMER is not set # CONFIG_PPS_CLIENT_LDISC is not set -# CONFIG_PPS_CLIENT_PARPORT is not set # CONFIG_PPS_CLIENT_GPIO is not set # @@ -2188,16 +2180,14 @@ CONFIG_PTP_1588_CLOCK=m # # Pin controllers # -CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y -CONFIG_GPIO_DEVRES=y CONFIG_GPIOLIB=y +CONFIG_GPIO_DEVRES=y # CONFIG_DEBUG_GPIO is not set CONFIG_GPIO_SYSFS=y # # Memory mapped GPIO drivers: # -# CONFIG_GPIO_GENERIC_PLATFORM is not set CONFIG_GPIO_TS5500=m # CONFIG_GPIO_VX855 is not set @@ -2220,7 +2210,6 @@ CONFIG_GPIO_TS5500=m # # SPI GPIO expanders: # -# CONFIG_GPIO_MCP23S08 is not set # # AC97 GPIO expanders: @@ -2287,6 +2276,7 @@ CONFIG_GENERIC_ADC_BATTERY=m # CONFIG_CHARGER_GPIO is not set # CONFIG_CHARGER_BQ2415X is not set # CONFIG_CHARGER_BQ24190 is not set +# CONFIG_CHARGER_BQ24735 is not set # CONFIG_CHARGER_SMB347 is not set CONFIG_POWER_RESET=y CONFIG_POWER_AVS=y @@ -2481,7 +2471,6 @@ CONFIG_BCMA_POSSIBLE=y # # Multifunction device drivers # -CONFIG_MFD_CORE=m # CONFIG_MFD_CROS_EC is not set # CONFIG_MFD_MC13XXX_I2C is not set # CONFIG_HTC_PASIC3 is not set @@ -2498,21 +2487,17 @@ CONFIG_MFD_RTSX_PCI=m # CONFIG_MFD_SI476X_CORE is not set CONFIG_MFD_SM501=m CONFIG_MFD_SM501_GPIO=y -# CONFIG_ABX500_CORE is not set -# CONFIG_MFD_SYSCON is not set # CONFIG_MFD_TI_AM335X_TSCADC is not set # CONFIG_TPS6105X is not set # CONFIG_TPS65010 is not set # CONFIG_TPS6507X is not set # CONFIG_MFD_TPS65217 is not set -# CONFIG_MFD_TPS65912 is not set CONFIG_MFD_WL1273_CORE=m CONFIG_MFD_LM3533=m # CONFIG_MFD_TIMBERDALE is not set # CONFIG_MFD_TMIO is not set CONFIG_MFD_VX855=m # CONFIG_MFD_ARIZONA_I2C is not set -# CONFIG_REGULATOR is not set CONFIG_MEDIA_SUPPORT=y # @@ -2526,7 +2511,6 @@ CONFIG_MEDIA_RC_SUPPORT=y CONFIG_MEDIA_CONTROLLER=y CONFIG_VIDEO_DEV=y CONFIG_VIDEO_V4L2_SUBDEV_API=y -CONFIG_VIDEO_V4L2=m # CONFIG_VIDEO_ADV_DEBUG is not set # CONFIG_VIDEO_FIXED_MINOR_RANGES is not set CONFIG_VIDEO_TUNER=m @@ -2791,7 +2775,6 @@ CONFIG_VIDEO_RENESAS_VSP1=m # Supported MMC/SDIO adapters # # CONFIG_SMS_SDIO_DRV is not set -# CONFIG_MEDIA_PARPORT_SUPPORT is not set # # Supported FireWire (IEEE 1394) Adapters @@ -2818,7 +2801,6 @@ CONFIG_SMS_SIANO_RC=y # CONFIG_MEDIA_SUBDRV_AUTOSELECT=y CONFIG_MEDIA_ATTACH=y -CONFIG_VIDEO_IR_I2C=m # # Audio decoders, processors and mixers @@ -2864,7 +2846,7 @@ CONFIG_VIDEO_MT9V011=m # # -# Miscelaneous helper chips +# Miscellaneous helper chips # # @@ -2888,24 +2870,13 @@ CONFIG_SOC_CAMERA_OV9640=m CONFIG_SOC_CAMERA_OV9740=m CONFIG_SOC_CAMERA_RJ54N1=m CONFIG_SOC_CAMERA_TW9910=m -CONFIG_MEDIA_TUNER=m -CONFIG_MEDIA_TUNER_SIMPLE=m -CONFIG_MEDIA_TUNER_TDA8290=m -CONFIG_MEDIA_TUNER_TDA827X=m -CONFIG_MEDIA_TUNER_TDA18271=m -CONFIG_MEDIA_TUNER_TDA9887=m -CONFIG_MEDIA_TUNER_MT20XX=m CONFIG_MEDIA_TUNER_MT2060=m CONFIG_MEDIA_TUNER_MT2063=m CONFIG_MEDIA_TUNER_MT2266=m CONFIG_MEDIA_TUNER_MT2131=m CONFIG_MEDIA_TUNER_QT1010=m -CONFIG_MEDIA_TUNER_XC2028=m -CONFIG_MEDIA_TUNER_XC5000=m -CONFIG_MEDIA_TUNER_XC4000=m CONFIG_MEDIA_TUNER_MXL5005S=m CONFIG_MEDIA_TUNER_MXL5007T=m -CONFIG_MEDIA_TUNER_MC44S803=m CONFIG_MEDIA_TUNER_MAX2165=m CONFIG_MEDIA_TUNER_TDA18218=m CONFIG_MEDIA_TUNER_FC0011=m @@ -2955,6 +2926,7 @@ CONFIG_DVB_TUNER_CX24113=m CONFIG_DVB_TDA826X=m CONFIG_DVB_TUA6100=m CONFIG_DVB_CX24116=m +CONFIG_DVB_CX24117=m CONFIG_DVB_SI21XX=m CONFIG_DVB_TS2020=m CONFIG_DVB_DS3000=m @@ -3048,9 +3020,7 @@ CONFIG_DVB_AF9033=m # CONFIG_VGA_ARB=y CONFIG_VGA_ARB_MAX_GPUS=16 -CONFIG_DRM=m -CONFIG_DRM_USB=m -CONFIG_DRM_KMS_HELPER=m +CONFIG_DRM_KMS_FB_HELPER=y # CONFIG_DRM_LOAD_EDID_FIRMWARE is not set CONFIG_DRM_TTM=m @@ -3065,13 +3035,11 @@ CONFIG_DRM_VIA=m CONFIG_DRM_SAVAGE=m CONFIG_DRM_VMWGFX=m # CONFIG_DRM_VMWGFX_FBCON is not set -CONFIG_DRM_UDL=m CONFIG_DRM_AST=m CONFIG_DRM_MGAG200=m CONFIG_DRM_CIRRUS_QEMU=m CONFIG_DRM_QXL=m # CONFIG_VGASTATE is not set -CONFIG_VIDEO_OUTPUT_CONTROL=m CONFIG_HDMI=y CONFIG_FB=y CONFIG_FIRMWARE_EDID=y @@ -3086,7 +3054,6 @@ CONFIG_FB_SYS_FOPS=m CONFIG_FB_DEFERRED_IO=y # CONFIG_FB_SVGALIB is not set # CONFIG_FB_MACMODES is not set -# CONFIG_FB_MODE_HELPERS is not set CONFIG_FB_TILEBLITTING=y # @@ -3132,13 +3099,12 @@ CONFIG_FB_TILEBLITTING=y # CONFIG_EXYNOS_VIDEO is not set CONFIG_BACKLIGHT_LCD_SUPPORT=y CONFIG_LCD_CLASS_DEVICE=m -CONFIG_LCD_PLATFORM=m CONFIG_BACKLIGHT_CLASS_DEVICE=y # CONFIG_BACKLIGHT_GENERIC is not set # CONFIG_BACKLIGHT_LM3533 is not set # CONFIG_BACKLIGHT_ADP8860 is not set # CONFIG_BACKLIGHT_ADP8870 is not set -# CONFIG_BACKLIGHT_LM3630 is not set +# CONFIG_BACKLIGHT_LM3630A is not set # CONFIG_BACKLIGHT_LM3639 is not set # CONFIG_BACKLIGHT_LP855X is not set # CONFIG_BACKLIGHT_GPIO is not set @@ -3198,10 +3164,8 @@ CONFIG_SND_DUMMY=m CONFIG_SND_ALOOP=m CONFIG_SND_VIRMIDI=m CONFIG_SND_MTPAV=m -CONFIG_SND_MTS64=m CONFIG_SND_SERIAL_U16550=m CONFIG_SND_MPU401=m -CONFIG_SND_PORTMAN2X4=m CONFIG_SND_AC97_POWER_SAVE=y CONFIG_SND_AC97_POWER_SAVE_DEFAULT=0 CONFIG_SND_PCI=y @@ -3277,7 +3241,6 @@ CONFIG_SND_INTEL8X0=m CONFIG_SND_INTEL8X0M=m CONFIG_SND_KORG1212=m CONFIG_SND_LOLA=m -CONFIG_SND_LX6464ES=m CONFIG_SND_MAESTRO3=m CONFIG_SND_MAESTRO3_INPUT=y CONFIG_SND_MIXART=m @@ -3303,6 +3266,7 @@ CONFIG_SND_USB_6FIRE=m CONFIG_SND_USB_HIFACE=m CONFIG_SND_FIREWIRE=y CONFIG_SND_FIREWIRE_LIB=m +# CONFIG_SND_DICE is not set CONFIG_SND_FIREWIRE_SPEAKERS=m # CONFIG_SND_ISIGHT is not set # CONFIG_SND_SCS1X is not set @@ -3508,7 +3472,6 @@ CONFIG_USB_CHIPIDEA=m # # USB port drivers # -CONFIG_USB_USS720=m CONFIG_USB_SERIAL=m CONFIG_USB_SERIAL_GENERIC=y CONFIG_USB_SERIAL_SIMPLE=m @@ -3538,7 +3501,6 @@ CONFIG_USB_SERIAL_KLSI=m CONFIG_USB_SERIAL_MCT_U232=m # CONFIG_USB_SERIAL_METRO is not set CONFIG_USB_SERIAL_MOS7720=m -CONFIG_USB_SERIAL_MOS7715_PARPORT=y CONFIG_USB_SERIAL_MOS7840=m # CONFIG_USB_SERIAL_NAVMAN is not set CONFIG_USB_SERIAL_PL2303=m @@ -3600,12 +3562,6 @@ CONFIG_USB_XUSBATM=m # USB Physical Layer drivers # CONFIG_USB_PHY=y -CONFIG_NOP_USB_XCEIV=m -CONFIG_AM335X_CONTROL_USB=m -CONFIG_AM335X_PHY_USB=m -CONFIG_SAMSUNG_USBPHY=m -CONFIG_SAMSUNG_USB2PHY=m -CONFIG_SAMSUNG_USB3PHY=m CONFIG_USB_GPIO_VBUS=m CONFIG_USB_ISP1301=m CONFIG_USB_RCAR_PHY=m @@ -3614,7 +3570,6 @@ CONFIG_UWB=m CONFIG_UWB_HWA=m CONFIG_UWB_WHCI=m CONFIG_UWB_I1480U=m -CONFIG_MMC=m # CONFIG_MMC_DEBUG is not set # CONFIG_MMC_UNSAFE_RESUME is not set # CONFIG_MMC_CLKGATE is not set @@ -3622,7 +3577,6 @@ CONFIG_MMC=m # # MMC/SD/SDIO Card Drivers # -CONFIG_MMC_BLOCK=m CONFIG_MMC_BLOCK_MINORS=8 CONFIG_MMC_BLOCK_BOUNCE=y # CONFIG_SDIO_UART is not set @@ -3631,7 +3585,6 @@ CONFIG_MMC_BLOCK_BOUNCE=y # # MMC/SD/SDIO Host Controller Drivers # -CONFIG_MMC_SDHCI=m CONFIG_MMC_SDHCI_PCI=m CONFIG_MMC_RICOH_MMC=y CONFIG_MMC_SDHCI_PLTFM=m @@ -3670,7 +3623,6 @@ CONFIG_LEDS_LM3530=m CONFIG_LEDS_LM3533=m CONFIG_LEDS_LM3642=m # CONFIG_LEDS_PCA9532 is not set -# CONFIG_LEDS_GPIO is not set CONFIG_LEDS_LP3944=m CONFIG_LEDS_LP55XX_COMMON=m CONFIG_LEDS_LP5521=m @@ -3679,6 +3631,7 @@ CONFIG_LEDS_LP5562=m CONFIG_LEDS_LP8501=m # CONFIG_LEDS_PCA955X is not set CONFIG_LEDS_PCA963X=m +CONFIG_LEDS_PCA9685=m # CONFIG_LEDS_BD2802 is not set CONFIG_LEDS_LT3593=m CONFIG_LEDS_TCA6507=m @@ -3692,7 +3645,6 @@ CONFIG_LEDS_BLINKM=m CONFIG_LEDS_TRIGGERS=y CONFIG_LEDS_TRIGGER_TIMER=m CONFIG_LEDS_TRIGGER_ONESHOT=m -CONFIG_LEDS_TRIGGER_HEARTBEAT=m CONFIG_LEDS_TRIGGER_BACKLIGHT=m # CONFIG_LEDS_TRIGGER_CPU is not set CONFIG_LEDS_TRIGGER_GPIO=m @@ -3792,7 +3744,6 @@ CONFIG_DMA_ENGINE=y # # DMA Clients # -CONFIG_NET_DMA=y CONFIG_ASYNC_TX_DMA=y # CONFIG_DMATEST is not set # CONFIG_AUXDISPLAY is not set @@ -3829,7 +3780,6 @@ CONFIG_ET131X=m # CONFIG_PRISM2_USB is not set # CONFIG_ECHO is not set # CONFIG_COMEDI is not set -# CONFIG_PANEL is not set # CONFIG_R8187SE is not set # CONFIG_RTL8192U is not set CONFIG_RTLLIB=m @@ -3994,6 +3944,7 @@ CONFIG_IIO_CONSUMERS_PER_TRIGGER=2 # Analog to digital converters # # CONFIG_MAX1363 is not set +# CONFIG_MCP3422 is not set # CONFIG_NAU7802 is not set # CONFIG_TI_ADC081C is not set # CONFIG_VIPERBOARD_ADC is not set @@ -4007,7 +3958,6 @@ CONFIG_IIO_CONSUMERS_PER_TRIGGER=2 # CONFIG_HID_SENSOR_IIO_COMMON=m CONFIG_HID_SENSOR_IIO_TRIGGER=m -# CONFIG_HID_SENSOR_ENUM_BASE_QUIRKS is not set CONFIG_IIO_ST_SENSORS_I2C=m CONFIG_IIO_ST_SENSORS_CORE=m @@ -4049,15 +3999,20 @@ CONFIG_IIO_ST_SENSORS_CORE=m # # CONFIG_ADJD_S311 is not set # CONFIG_APDS9300 is not set +# CONFIG_CM36651 is not set +# CONFIG_GP2AP020A00F is not set # CONFIG_HID_SENSOR_ALS is not set # CONFIG_SENSORS_LM3533 is not set +# CONFIG_TCS3472 is not set # CONFIG_SENSORS_TSL2563 is not set +# CONFIG_TSL4531 is not set # CONFIG_VCNL4000 is not set # # Magnetometer sensors # # CONFIG_AK8975 is not set +# CONFIG_MAG3110 is not set # CONFIG_HID_SENSOR_MAGNETOMETER_3D is not set # CONFIG_IIO_ST_MAGN_3AXIS is not set @@ -4082,6 +4037,13 @@ CONFIG_IIO_ST_PRESS_I2C=m # CONFIG_RESET_CONTROLLER is not set # CONFIG_FMC is not set +# +# PHY Subsystem +# +CONFIG_GENERIC_PHY=m +CONFIG_PHY_EXYNOS_MIPI_VIDEO=m +# CONFIG_POWERCAP is not set + # # Firmware Drivers # @@ -4229,6 +4191,7 @@ CONFIG_PNFS_FILE_LAYOUT=m CONFIG_PNFS_BLOCK=m CONFIG_PNFS_OBJLAYOUT=m CONFIG_NFS_V4_1_IMPLEMENTATION_ID_DOMAIN="ipfire.org" +# CONFIG_NFS_V4_1_MIGRATION is not set CONFIG_NFS_V4_SECURITY_LABEL=y CONFIG_NFS_FSCACHE=y # CONFIG_NFS_USE_LEGACY_DNS is not set @@ -4348,6 +4311,7 @@ CONFIG_HEADERS_CHECK=y CONFIG_FRAME_POINTER=y # CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set CONFIG_MAGIC_SYSRQ=y +CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x1 CONFIG_DEBUG_KERNEL=y # @@ -4384,10 +4348,6 @@ CONFIG_TIMER_STATS=y # CONFIG_RT_MUTEX_TESTER is not set # CONFIG_DEBUG_SPINLOCK is not set # CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_WW_MUTEX_SLOWPATH is not set -# CONFIG_DEBUG_LOCK_ALLOC is not set -# CONFIG_PROVE_LOCKING is not set -# CONFIG_LOCK_STAT is not set # CONFIG_DEBUG_ATOMIC_SLEEP is not set # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set CONFIG_STACKTRACE=y @@ -4451,6 +4411,7 @@ CONFIG_RING_BUFFER_BENCHMARK=m # CONFIG_BACKTRACE_SELF_TEST is not set CONFIG_RBTREE_TEST=m # CONFIG_INTERVAL_TREE_TEST is not set +# CONFIG_PERCPU_TEST is not set # CONFIG_ATOMIC64_SELFTEST is not set CONFIG_ASYNC_RAID6_TEST=m # CONFIG_TEST_STRING_HELPERS is not set @@ -4510,6 +4471,7 @@ CONFIG_PAX_RANDMMAP=y # # Miscellaneous hardening features # +CONFIG_PAX_MEMORY_SANITIZE=y CONFIG_PAX_MEMORY_STRUCTLEAK=y CONFIG_PAX_USERCOPY=y # CONFIG_PAX_LATENT_ENTROPY is not set @@ -4524,6 +4486,7 @@ CONFIG_GRKERNSEC_PROC_MEMMAP=y CONFIG_GRKERNSEC_BRUTE=y # CONFIG_GRKERNSEC_MODHARDEN is not set CONFIG_GRKERNSEC_HIDESYM=y +# CONFIG_GRKERNSEC_RANDSTRUCT is not set CONFIG_GRKERNSEC_KERN_LOCKOUT=y # @@ -4611,6 +4574,8 @@ CONFIG_GRKERNSEC_NO_SIMULT_CONNECT=y CONFIG_GRKERNSEC_FLOODTIME=10 CONFIG_GRKERNSEC_FLOODBURST=6 CONFIG_KEYS=y +CONFIG_PERSISTENT_KEYRINGS=y +# CONFIG_BIG_KEYS is not set # CONFIG_ENCRYPTED_KEYS is not set CONFIG_KEYS_DEBUG_PROC_KEYS=y CONFIG_SECURITY_DMESG_RESTRICT=y @@ -4751,6 +4716,7 @@ CONFIG_CRYPTO_ANSI_CPRNG=m CONFIG_CRYPTO_USER_API=y CONFIG_CRYPTO_USER_API_HASH=y CONFIG_CRYPTO_USER_API_SKCIPHER=y +CONFIG_CRYPTO_HASH_INFO=y CONFIG_CRYPTO_HW=y CONFIG_ASYMMETRIC_KEY_TYPE=m CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=m @@ -4782,6 +4748,7 @@ CONFIG_CRC32_SLICEBY8=y CONFIG_CRC7=m CONFIG_LIBCRC32C=m CONFIG_CRC8=m +CONFIG_RANDOM32_SELFTEST=y CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=y CONFIG_LZO_COMPRESS=y @@ -4808,8 +4775,8 @@ CONFIG_TEXTSEARCH=y CONFIG_TEXTSEARCH_KMP=m CONFIG_TEXTSEARCH_BM=m CONFIG_TEXTSEARCH_FSM=m +CONFIG_ASSOCIATIVE_ARRAY=y CONFIG_HAS_IOMEM=y -CONFIG_HAS_IOPORT=y CONFIG_HAS_DMA=y CONFIG_CHECK_SIGNATURE=y CONFIG_DQL=y @@ -4818,7 +4785,6 @@ CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y CONFIG_AVERAGE=y CONFIG_CLZ_TAB=y CONFIG_CORDIC=m -# CONFIG_DDR is not set CONFIG_MPILIB=m CONFIG_OID_REGISTRY=m CONFIG_FONT_SUPPORT=y diff --git a/kernel/config-i686-default b/kernel/config-i686-default index 13c5f2702..7d39dde95 100644 --- a/kernel/config-i686-default +++ b/kernel/config-i686-default @@ -119,7 +119,6 @@ CONFIG_PHYSICAL_ALIGN=0x400000 # # Power management and ACPI options # -CONFIG_ACPI_BLACKLIST_YEAR=1999 CONFIG_X86_APM_BOOT=y CONFIG_APM=y # CONFIG_APM_IGNORE_USER_SUSPEND is not set @@ -221,11 +220,6 @@ CONFIG_I2C_SIS630=m # CONFIG_SCx200_ACB=m -# -# PCI GPIO expanders: -# -# CONFIG_GPIO_LANGWELL is not set - # # Watchdog Device Drivers # diff --git a/kernel/config-i686-legacy b/kernel/config-i686-legacy index 7e72ab369..c3ae439d5 100644 --- a/kernel/config-i686-legacy +++ b/kernel/config-i686-legacy @@ -75,7 +75,6 @@ CONFIG_MDIO_BUS_MUX_MMIOREG=m # Input Device Drivers # CONFIG_MOUSE_PS2_OLPC=y -CONFIG_INPUT_PWM_BEEPER=m # # Hardware I/O ports @@ -122,6 +121,11 @@ CONFIG_GPIO_ADNP=m CONFIG_GPIO_CS5535=y # CONFIG_GPIO_SODAVILLE is not set +# +# MODULbus GPIO expanders: +# +# CONFIG_GPIO_BCM_KONA is not set + # # 1-wire Slaves # @@ -192,6 +196,11 @@ CONFIG_PWM_SYSFS=y CONFIG_PWM_PCA9685=m CONFIG_IRQCHIP=y +# +# PHY Subsystem +# +CONFIG_PHY_EXYNOS_DP_VIDEO=m + # # Non-executable pages # diff --git a/kernel/config-x86-generic b/kernel/config-x86-generic index df5064485..c6b9e21dc 100644 --- a/kernel/config-x86-generic +++ b/kernel/config-x86-generic @@ -14,7 +14,6 @@ CONFIG_ARCH_WANT_HUGE_PMD_SHARE=y CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING=y CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y CONFIG_X86_HT=y -CONFIG_ARCH_CPU_PROBE_RELEASE=y CONFIG_ARCH_SUPPORTS_UPROBES=y # @@ -54,7 +53,6 @@ CONFIG_SLUB_CPU_PARTIAL=y CONFIG_OPROFILE_NMI_TIMER=y CONFIG_ARCH_USE_BUILTIN_BSWAP=y CONFIG_USER_RETURN_NOTIFIER=y -CONFIG_USE_GENERIC_SMP_HELPERS=y CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG=y # @@ -106,8 +104,6 @@ CONFIG_CPU_SUP_CENTAUR=y CONFIG_HPET_TIMER=y CONFIG_HPET_EMULATE_RTC=y CONFIG_DMI=y -CONFIG_SWIOTLB=y -CONFIG_IOMMU_HELPER=y CONFIG_SCHED_SMT=y CONFIG_SCHED_MC=y CONFIG_X86_LOCAL_APIC=y @@ -135,6 +131,7 @@ CONFIG_ARCH_SELECT_MEMORY_MODEL=y CONFIG_SELECT_MEMORY_MODEL=y CONFIG_ARCH_DISCARD_MEMBLOCK=y CONFIG_SPLIT_PTLOCK_CPUS=4 +CONFIG_ARCH_ENABLE_SPLIT_PMD_PTLOCK=y CONFIG_PHYS_ADDR_T_64BIT=y CONFIG_ZONE_DMA_FLAG=1 CONFIG_VIRT_TO_BUS=y @@ -169,13 +166,10 @@ CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y # Power management and ACPI options # CONFIG_HIBERNATE_CALLBACKS=y -CONFIG_HIBERNATION=y -CONFIG_PM_STD_PARTITION="" CONFIG_PM_SLEEP_SMP=y CONFIG_ACPI=y CONFIG_ACPI_SLEEP=y CONFIG_ACPI_PROCFS=y -# CONFIG_ACPI_PROCFS_POWER is not set CONFIG_ACPI_EC_DEBUGFS=m CONFIG_ACPI_AC=y CONFIG_ACPI_BATTERY=y @@ -204,13 +198,13 @@ CONFIG_ACPI_APEI_PCIEAER=y CONFIG_ACPI_APEI_MEMORY_FAILURE=y # CONFIG_ACPI_APEI_EINJ is not set # CONFIG_ACPI_APEI_ERST_DEBUG is not set +CONFIG_ACPI_EXTLOG=m CONFIG_SFI=y # # CPU Frequency scaling # CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_TABLE=y CONFIG_CPU_FREQ_GOV_COMMON=y CONFIG_CPU_FREQ_STAT=m CONFIG_CPU_FREQ_STAT_DETAILS=y @@ -249,6 +243,7 @@ CONFIG_CPU_IDLE=y # CONFIG_CPU_IDLE_MULTIPLE_DRIVERS is not set CONFIG_CPU_IDLE_GOV_LADDER=y CONFIG_CPU_IDLE_GOV_MENU=y +# CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED is not set CONFIG_INTEL_IDLE=y # @@ -272,10 +267,19 @@ CONFIG_PCI_LABEL=y # CONFIG_ISA_DMA_API=y CONFIG_AMD_NB=y +CONFIG_PCCARD=m +# CONFIG_PCMCIA is not set +CONFIG_CARDBUS=y # # PC-card bridges # +CONFIG_YENTA=m +CONFIG_YENTA_O2=y +CONFIG_YENTA_RICOH=y +CONFIG_YENTA_TI=y +CONFIG_YENTA_ENE_TUNE=y +CONFIG_YENTA_TOSHIBA=y CONFIG_HOTPLUG_PCI=y CONFIG_HOTPLUG_PCI_ACPI=y CONFIG_HOTPLUG_PCI_ACPI_IBM=m @@ -300,11 +304,23 @@ CONFIG_RFKILL_GPIO=m # # Generic Driver Options # +# CONFIG_FIRMWARE_IN_KERNEL is not set CONFIG_SYS_HYPERVISOR=y +CONFIG_REGMAP_I2C=m # # Bus devices # +# CONFIG_MTD is not set +CONFIG_PARPORT=m +CONFIG_PARPORT_PC=m +CONFIG_PARPORT_SERIAL=m +# CONFIG_PARPORT_PC_FIFO is not set +# CONFIG_PARPORT_PC_SUPERIO is not set +# CONFIG_PARPORT_GSC is not set +# CONFIG_PARPORT_AX88796 is not set +CONFIG_PARPORT_1284=y +CONFIG_PARPORT_NOT_PC=y CONFIG_PNP=y # CONFIG_PNP_DEBUG_MESSAGES is not set @@ -313,8 +329,9 @@ CONFIG_PNP=y # CONFIG_PNPACPI=y CONFIG_BLK_DEV_FD=m +# CONFIG_PARIDE is not set CONFIG_BLK_DEV_PCIESSD_MTIP32XX=m -CONFIG_BLK_CPQ_DA=m +CONFIG_BLK_DEV_RAM_SIZE=16384 CONFIG_XEN_BLKDEV_FRONTEND=m CONFIG_XEN_BLKDEV_BACKEND=m # CONFIG_BLK_DEV_HD is not set @@ -324,6 +341,7 @@ CONFIG_XEN_BLKDEV_BACKEND=m # CONFIG_SENSORS_LIS3LV02D=m CONFIG_VMWARE_BALLOON=m +# CONFIG_SRAM is not set # # Altera FPGA firmware download module @@ -347,9 +365,18 @@ CONFIG_SCSI_EATA_TAGGED_QUEUE=y CONFIG_SCSI_EATA_MAX_TAGS=16 CONFIG_SCSI_GDTH=m CONFIG_SCSI_ISCI=m +CONFIG_SCSI_PPA=m +CONFIG_SCSI_IMM=m +# CONFIG_SCSI_IZIP_EPP16 is not set +# CONFIG_SCSI_IZIP_SLOW_CTR is not set CONFIG_ATA_ACPI=y # CONFIG_SATA_ZPODD is not set +# +# PIO-only SFF controllers +# +# CONFIG_PATA_PLATFORM is not set + # # Generic fallback / legacy drivers # @@ -381,7 +408,9 @@ CONFIG_VHOST=m # # Distributed Switch Architecture drivers # +CONFIG_VORTEX=m CONFIG_DE4X5=m +CONFIG_PCMCIA_XIRCOM=m CONFIG_IGB_DCA=y CONFIG_IXGBE_DCA=y CONFIG_MLX4_EN=m @@ -394,6 +423,11 @@ CONFIG_ATP=m CONFIG_SUNGEM=m # CONFIG_NET_SB1000 is not set +# +# MII PHY device drivers +# +# CONFIG_PLIP is not set + # # USB Network Adapters # @@ -412,10 +446,18 @@ CONFIG_HISAX_NETJET=y CONFIG_HISAX_NETJET_U=y CONFIG_HISAX_ENTERNOW_PCI=y +# +# Input device support +# +# CONFIG_INPUT_FF_MEMLESS is not set +CONFIG_INPUT_MATRIXKMAP=m + # # Input Device Drivers # +# CONFIG_KEYBOARD_SAMSUNG is not set CONFIG_MOUSE_PS2_LIFEBOOK=y +# CONFIG_MOUSE_GPIO is not set CONFIG_INPUT_PCSPKR=m CONFIG_INPUT_APANEL=m CONFIG_INPUT_ATLAS_BTNS=m @@ -427,6 +469,7 @@ CONFIG_INPUT_IDEAPAD_SLIDEBAR=m # CONFIG_SERIO_I8042=y # CONFIG_SERIO_CT82C710 is not set +# CONFIG_SERIO_PARKBD is not set # # Character devices @@ -443,6 +486,11 @@ CONFIG_SERIAL_8250_DW=m # # Non-8250 serial port support # +CONFIG_SERIAL_SCCNXP=m +CONFIG_SERIAL_ARC=m +CONFIG_PRINTER=m +CONFIG_LP_CONSOLE=y +CONFIG_PPDEV=m CONFIG_HVC_IRQ=y CONFIG_HVC_XEN=y CONFIG_HVC_XEN_FRONTEND=y @@ -454,6 +502,8 @@ CONFIG_HPET=y # CONFIG_HPET_MMAP is not set CONFIG_HANGCHECK_TIMER=m # CONFIG_TELCLOCK is not set +CONFIG_I2C=m +CONFIG_I2C_ALGOBIT=m # # PC SMBus host controller drivers @@ -473,6 +523,16 @@ CONFIG_I2C_SCMI=m CONFIG_I2C_DESIGNWARE_CORE=m CONFIG_I2C_DESIGNWARE_PLATFORM=m +# +# External I2C/SMBus adapter drivers +# +CONFIG_I2C_PARPORT=m + +# +# PPS clients support +# +# CONFIG_PPS_CLIENT_PARPORT is not set + # # Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks. # @@ -486,11 +546,13 @@ CONFIG_PINCTRL=y # CONFIG_PINCONF is not set # CONFIG_DEBUG_PINCTRL is not set # CONFIG_PINCTRL_BAYTRAIL is not set +CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y CONFIG_GPIO_ACPI=y # # Memory mapped GPIO drivers: # +# CONFIG_GPIO_GENERIC_PLATFORM is not set # CONFIG_GPIO_IT8761E is not set # CONFIG_GPIO_F7188X is not set CONFIG_GPIO_SCH=m @@ -501,8 +563,14 @@ CONFIG_GPIO_ICH=m # PCI GPIO expanders: # # CONFIG_GPIO_CS5535 is not set +# CONFIG_GPIO_INTEL_MID is not set # CONFIG_GPIO_PCH is not set +# +# SPI GPIO expanders: +# +# CONFIG_GPIO_MCP23S08 is not set + # # Native drivers # @@ -568,7 +636,17 @@ CONFIG_XEN_WDT=m # # Multifunction device drivers # +CONFIG_MFD_CORE=m CONFIG_MFD_CS5535=m +# CONFIG_ABX500_CORE is not set +# CONFIG_MFD_SYSCON is not set +# CONFIG_MFD_TPS65912 is not set +# CONFIG_REGULATOR is not set + +# +# Multimedia core support +# +CONFIG_VIDEO_V4L2=m # # Media drivers @@ -596,6 +674,31 @@ CONFIG_SOC_CAMERA_SCALE_CROP=m CONFIG_VIDEO_SH_MOBILE_CSI2=m CONFIG_VIDEO_SH_MOBILE_CEU=m +# +# Supported MMC/SDIO adapters +# +# CONFIG_MEDIA_PARPORT_SUPPORT is not set + +# +# Media ancillary drivers (tuners, sensors, i2c, frontends) +# +CONFIG_VIDEO_IR_I2C=m + +# +# soc_camera sensor drivers +# +CONFIG_MEDIA_TUNER=m +CONFIG_MEDIA_TUNER_SIMPLE=m +CONFIG_MEDIA_TUNER_TDA8290=m +CONFIG_MEDIA_TUNER_TDA827X=m +CONFIG_MEDIA_TUNER_TDA18271=m +CONFIG_MEDIA_TUNER_TDA9887=m +CONFIG_MEDIA_TUNER_MT20XX=m +CONFIG_MEDIA_TUNER_XC2028=m +CONFIG_MEDIA_TUNER_XC5000=m +CONFIG_MEDIA_TUNER_XC4000=m +CONFIG_MEDIA_TUNER_MC44S803=m + # # Graphics support # @@ -605,6 +708,9 @@ CONFIG_AGP_INTEL=y CONFIG_AGP_SIS=y CONFIG_AGP_VIA=y CONFIG_VGA_SWITCHEROO=y +CONFIG_DRM=m +CONFIG_DRM_USB=m +CONFIG_DRM_KMS_HELPER=m # # I2C encoder or helper chips @@ -620,15 +726,19 @@ CONFIG_DRM_NOUVEAU_BACKLIGHT=y CONFIG_DRM_I810=m CONFIG_DRM_I915=m CONFIG_DRM_I915_KMS=y +CONFIG_DRM_I915_FBDEV=y # CONFIG_DRM_I915_PRELIMINARY_HW_SUPPORT is not set CONFIG_DRM_SIS=m CONFIG_DRM_GMA500=m CONFIG_DRM_GMA600=y CONFIG_DRM_GMA3600=y +CONFIG_DRM_UDL=m +CONFIG_VIDEO_OUTPUT_CONTROL=m CONFIG_FB_SYS_FILLRECT=m CONFIG_FB_SYS_COPYAREA=m CONFIG_FB_SYS_IMAGEBLIT=m CONFIG_FB_BACKLIGHT=y +# CONFIG_FB_MODE_HELPERS is not set # # Frame buffer hardware drivers @@ -643,6 +753,7 @@ CONFIG_FB_BACKLIGHT=y # CONFIG_FB_INTEL is not set # CONFIG_FB_VIA is not set CONFIG_XEN_FBDEV_FRONTEND=m +CONFIG_LCD_PLATFORM=m CONFIG_BACKLIGHT_APPLE=m # CONFIG_BACKLIGHT_SAHARA is not set @@ -653,6 +764,8 @@ CONFIG_VGA_CONSOLE=y # CONFIG_VGACON_SOFT_SCROLLBACK is not set CONFIG_SND_DMA_SGBUF=y CONFIG_SND_PCSP=m +CONFIG_SND_MTS64=m +CONFIG_SND_PORTMAN2X4=m CONFIG_SND_SB_COMMON=m CONFIG_SND_SB16_DSP=m CONFIG_SND_ALS4000=m @@ -660,23 +773,51 @@ CONFIG_SND_ALI5451=m CONFIG_SND_ASIHPI=m CONFIG_SND_CS5530=m CONFIG_SND_HDA_I915=y +CONFIG_SND_LX6464ES=m CONFIG_SND_USB_USX2Y=m CONFIG_SND_USB_US122L=m # CONFIG_SND_SOC is not set +# +# USB port drivers +# +CONFIG_USB_USS720=m +CONFIG_USB_SERIAL_MOS7715_PARPORT=y + +# +# USB Physical Layer drivers +# +CONFIG_NOP_USB_XCEIV=m +CONFIG_SAMSUNG_USBPHY=m +CONFIG_SAMSUNG_USB2PHY=m +CONFIG_SAMSUNG_USB3PHY=m +CONFIG_MMC=m + +# +# MMC/SD/SDIO Card Drivers +# +CONFIG_MMC_BLOCK=m + # # MMC/SD/SDIO Host Controller Drivers # +CONFIG_MMC_SDHCI=m CONFIG_MMC_SDHCI_ACPI=m CONFIG_MMC_WBSD=m # # LED drivers # +# CONFIG_LEDS_GPIO is not set CONFIG_LEDS_CLEVO_MAIL=m CONFIG_LEDS_INTEL_SS4200=m CONFIG_LEDS_DELL_NETBOOKS=m +# +# LED Triggers +# +CONFIG_LEDS_TRIGGER_HEARTBEAT=m + # # iptables trigger is under Netfilter config (LED target) # @@ -709,6 +850,7 @@ CONFIG_DMA_ACPI=y # # DMA Clients # +CONFIG_DMA_ENGINE_RAID=y CONFIG_DCA=m # CONFIG_VFIO is not set @@ -738,6 +880,7 @@ CONFIG_XEN_PRIVCMD=m CONFIG_XEN_ACPI_PROCESSOR=m CONFIG_XEN_HAVE_PVMMU=y # CONFIG_SLICOSS is not set +# CONFIG_PANEL is not set # # Triggers - standalone @@ -751,7 +894,6 @@ CONFIG_X86_PLATFORM_DEVICES=y CONFIG_ACER_WMI=m CONFIG_ACERHDF=m CONFIG_ASUS_LAPTOP=m -CONFIG_CHROMEOS_LAPTOP=m CONFIG_DELL_LAPTOP=m CONFIG_DELL_WMI=m CONFIG_DELL_WMI_AIO=m @@ -797,6 +939,8 @@ CONFIG_SAMSUNG_Q10=m # CONFIG_INTEL_RST is not set CONFIG_INTEL_SMARTCONNECT=m CONFIG_PVPANIC=m +CONFIG_CHROME_PLATFORMS=y +CONFIG_CHROMEOS_LAPTOP=m CONFIG_COMMON_CLK=y # @@ -843,6 +987,7 @@ CONFIG_ISCSI_IBFT=m CONFIG_EFI_VARS=y CONFIG_EFI_VARS_PSTORE=y # CONFIG_EFI_VARS_PSTORE_DEFAULT_DISABLE is not set +CONFIG_UEFI_CPER=y # # File systems @@ -874,6 +1019,14 @@ CONFIG_HARDLOCKUP_DETECTOR=y # CONFIG_BOOTPARAM_HARDLOCKUP_PANIC is not set CONFIG_BOOTPARAM_HARDLOCKUP_PANIC_VALUE=0 +# +# Lock Debugging (spinlocks, mutexes, etc...) +# +# CONFIG_DEBUG_WW_MUTEX_SLOWPATH is not set +# CONFIG_DEBUG_LOCK_ALLOC is not set +# CONFIG_PROVE_LOCKING is not set +# CONFIG_LOCK_STAT is not set + # # RCU Debugging # @@ -893,6 +1046,7 @@ CONFIG_DYNAMIC_FTRACE_WITH_REGS=y # CONFIG_X86_VERBOSE_BOOTUP is not set CONFIG_EARLY_PRINTK=y # CONFIG_EARLY_PRINTK_DBGP is not set +CONFIG_EARLY_PRINTK_EFI=y # CONFIG_X86_PTDUMP is not set CONFIG_DEBUG_NX_TEST=m CONFIG_DOUBLEFAULT=y @@ -961,7 +1115,7 @@ CONFIG_LSM_MMAP_MIN_ADDR=65536 # CONFIG_CRYPTO_GF128MUL=y CONFIG_CRYPTO_PCRYPT=m -CONFIG_CRYPTO_ABLK_HELPER_X86=y +CONFIG_CRYPTO_ABLK_HELPER=y # # Block modes @@ -989,6 +1143,7 @@ CONFIG_CRYPTO_DEV_PADLOCK_SHA=m CONFIG_KVM_APIC_ARCHITECTURE=y CONFIG_KVM_MMIO=y CONFIG_KVM_ASYNC_PF=y +CONFIG_KVM_VFIO=y CONFIG_KVM=m CONFIG_KVM_INTEL=m CONFIG_KVM_AMD=m @@ -1002,5 +1157,7 @@ CONFIG_RATIONAL=y CONFIG_GENERIC_FIND_FIRST_BIT=y CONFIG_GENERIC_IOMAP=y CONFIG_GENERIC_ALLOCATOR=y +CONFIG_HAS_IOPORT=y CONFIG_CPU_RMAP=y +# CONFIG_DDR is not set CONFIG_UCS2_STRING=y diff --git a/kernel/config-x86_64-default b/kernel/config-x86_64-default index 44109275f..5df966d68 100644 --- a/kernel/config-x86_64-default +++ b/kernel/config-x86_64-default @@ -35,6 +35,7 @@ CONFIG_CONTEXT_TRACKING=y CONFIG_RCU_USER_QS=y CONFIG_CONTEXT_TRACKING_FORCE=y CONFIG_RCU_FANOUT=64 +CONFIG_ARCH_SUPPORTS_INT128=y # CONFIG_NUMA_BALANCING is not set # @@ -90,9 +91,7 @@ CONFIG_USE_PERCPU_NUMA_NODE_ID=y # # Power management and ACPI options # -CONFIG_ARCH_HIBERNATION_HEADER=y CONFIG_ACPI_NUMA=y -CONFIG_ACPI_BLACKLIST_YEAR=0 # # Memory power savings @@ -130,6 +129,11 @@ CONFIG_COMPAT_NETLINK_MESSAGES=y # CONFIG_BPF_JIT=y +# +# Protocols +# +CONFIG_BLK_DEV_SKD=m + # # Misc devices # @@ -137,6 +141,16 @@ CONFIG_BPF_JIT=y CONFIG_SGI_IOC4=m # CONFIG_CS5535_MFGPT is not set +# +# Intel MIC Host Driver +# +# CONFIG_INTEL_MIC_HOST is not set + +# +# Intel MIC Card Driver +# +# CONFIG_INTEL_MIC_CARD is not set + # # SCSI Transports # @@ -151,11 +165,6 @@ CONFIG_SCSI_FLASHPOINT=y # CONFIG_I2C_SIS5595 is not set # CONFIG_I2C_SIS630 is not set -# -# PCI GPIO expanders: -# -CONFIG_GPIO_LANGWELL=y - # # Media digital TV PCI Adapters # @@ -241,4 +250,3 @@ CONFIG_CRYPTO_TWOFISH_AVX_X86_64=m # Library routines # CONFIG_ARCH_USE_CMPXCHG_LOCKREF=y -CONFIG_CMPXCHG_LOCKREF=y diff --git a/kernel/kernel.nm b/kernel/kernel.nm index b53ab8e66..1650e8910 100644 --- a/kernel/kernel.nm +++ b/kernel/kernel.nm @@ -4,7 +4,7 @@ ############################################################################### name = kernel -version = 3.12.4 +version = 3.13.2 release = 1 thisapp = linux-%{version} @@ -107,6 +107,7 @@ build if "%{DISTRO_ARCH}" == "armv7hl" # Build the default unified kernel. build_kernel_default = 1 + build_kernel_lpae = 1 kernel_arch = arm kernel_target = zImage @@ -127,11 +128,20 @@ build kernels += legacy end + # Build lpae kernel + if "%{build_kernel_lpae}" == "1" + kernels += lpae + end + # Build ARM kirkwood kernel. if "%{build_kernel_kirkwood}" == "1" kernels += kirkwood end + perf_make = make %{MAKETUNING} -C tools/perf V=1 WERROR=0 \ + NO_LIBUNWIND=1 HAVE_CPLUS_DEMANGLE=1 NO_GTK2=1 NO_LIBNUMA=1 \ + NO_STRLCPY=1 NO_BIONIC=1 prefix=%{prefix} perfexecdir=lib/perf-core + prepare_cmds rm -f %{DIR_APP}/localversion-grsec @@ -177,6 +187,10 @@ build for kernel in %{kernels}; do configure_kernel ${kernel} done + + # Tools + # Prevent perf from installing any files in /usr/libexec + sed -i %{DIR_APP}/tools/perf/config/Makefile -e "s/libexec/lib/g" end build @@ -303,19 +317,43 @@ build done # Build tools. + # perf + %{perf_make} DESTDIR=%{BUILDROOT} all + # cpupower chmod +x tools/power/cpupower/utils/version-gen.sh make -C tools/power/cpupower CPUFREQ_BENCH=false %{PARALLELISMFLAGS} if [ "%{DISTRO_ARCH}" = "x86_64" ]; then pushd tools/power/cpupower/debug/x86_64 - make %{MAKETUNING} + make %{MAKETUNING} centrino-decode powernow-k8-decode popd elif [ "%{DISTRO_ARCH}" = "i686" ]; then pushd tools/power/cpupower/debug/i386 - make %{MAKETUNING} + make %{MAKETUNING} centrino-decode powernow-k8-decode popd fi + + # Should be built for all x86 architectures + if [ "%{DISTRO_ARCH}" = "x86_64" ]; then + # Won't compile on i686 + # x86_energy_perf_policy.c: In function ‘validate_cpuid’: + # x86_energy_perf_policy.c:154:2: error: PIC register clobbered by ‘ebx’ in ‘asm’ + # asm("cpuid" : "=a" (fms), "=c" (ecx), "=d" (edx) : "a" (1) : "ebx"); + # ^ + pushd tools/power/x86/x86_energy_perf_policy + make + popd + + # Same as above + pushd tools/power/x86/turbostat + make + popd + fi + + pushd tools/thermal/tmon + make + popd end install @@ -339,9 +377,7 @@ build rm -rfv %{BUILDROOT}/lib/firmware # Install tools. - make -C tools/perf DESTDIR=%{BUILDROOT} WERROR=0 \ - HAVE_CPLUS_DEMANGLE=1 prefix=/usr perfexecdir=lib/perf-core \ - install install-man install-python_ext + %{perf_make} DESTDIR=%{BUILDROOT} install-bin install-python_ext # cpupower make -C tools/power/cpupower DESTDIR=%{BUILDROOT} libdir=%{libdir} \ @@ -364,6 +400,24 @@ build fi chmod 0755 %{BUILDROOT}%{libdir}/libcpupower.so* + + # This should be built for all x86 architectures + if [ "%{DISTRO_ARCH}" = "x86_64" ]; then + mkdir -pv %{BUILDROOT}%{mandir}/man8 + + pushd tools/power/x86/x86_energy_perf_policy + make DESTDIR=%{BUILDROOT} install + popd + + pushd tools/power/x86/turbostat + make DESTDIR=%{BUILDROOT} install + popd + fi + + # tmon + pushd tools/thermal/tmon + make INSTALL_ROOT=%{BUILDROOT} install + popd end end @@ -514,6 +568,22 @@ packages end end + if "%{build_kernel_lpae}" == "1" + package kernel-lpae + template KERNEL + + kernel_name = kernel-lpae + kernel_release = %{fullver}.lpae + end + + package kernel-lpae-devel + template KERNELDEVEL + + kernel_name = kernel-lpae + kernel_release = %{fullver}.lpae + end + end + if "%{build_kernel_kirkwood}" == "1" package kernel-kirkwood template KERNEL diff --git a/kernel/patches/grsecurity-3.0-3.12.4-201312081754.patch b/kernel/patches/grsecurity-3.0-3.13.2-201402091134.patch similarity index 89% rename from kernel/patches/grsecurity-3.0-3.12.4-201312081754.patch rename to kernel/patches/grsecurity-3.0-3.13.2-201402091134.patch index fa9c2c7fd..df6cd994f 100644 --- a/kernel/patches/grsecurity-3.0-3.12.4-201312081754.patch +++ b/kernel/patches/grsecurity-3.0-3.13.2-201402091134.patch @@ -1,5 +1,5 @@ diff --git a/Documentation/dontdiff b/Documentation/dontdiff -index b89a739..79768fb 100644 +index b89a739..e289b9b 100644 --- a/Documentation/dontdiff +++ b/Documentation/dontdiff @@ -2,9 +2,11 @@ @@ -61,7 +61,7 @@ index b89a739..79768fb 100644 asm-offsets.h asm_offsets.h autoconf.h* -@@ -92,19 +101,24 @@ bounds.h +@@ -92,32 +101,40 @@ bounds.h bsetup btfixupprep build @@ -86,7 +86,11 @@ index b89a739..79768fb 100644 conmakehash consolemap_deftbl.c* cpustr.h -@@ -115,9 +129,11 @@ devlist.h* + crc32table.h* + cscope.* + defkeymap.c ++devicetable-offsets.h + devlist.h* dnotify_test docproc dslm @@ -98,7 +102,7 @@ index b89a739..79768fb 100644 fixdep flask.h fore200e_mkfirm -@@ -125,12 +141,15 @@ fore200e_pca_fw.c* +@@ -125,12 +142,15 @@ fore200e_pca_fw.c* gconf gconf.glade.h gen-devlist @@ -114,7 +118,7 @@ index b89a739..79768fb 100644 hpet_example hugepage-mmap hugepage-shm -@@ -145,14 +164,14 @@ int32.c +@@ -145,14 +165,14 @@ int32.c int4.c int8.c kallsyms @@ -131,7 +135,7 @@ index b89a739..79768fb 100644 logo_*.c logo_*_clut224.c logo_*_mono.c -@@ -162,14 +181,15 @@ mach-types.h +@@ -162,14 +182,15 @@ mach-types.h machtypes.h map map_hugetlb @@ -148,7 +152,7 @@ index b89a739..79768fb 100644 mkprep mkregtable mktables -@@ -185,6 +205,8 @@ oui.c* +@@ -185,6 +206,8 @@ oui.c* page-types parse.c parse.h @@ -157,7 +161,7 @@ index b89a739..79768fb 100644 patches* pca200e.bin pca200e_ecd.bin2 -@@ -194,6 +216,7 @@ perf-archive +@@ -194,6 +217,7 @@ perf-archive piggyback piggy.gzip piggy.S @@ -165,10 +169,12 @@ index b89a739..79768fb 100644 pnmtologo ppc_defs.h* pss_boot.h -@@ -203,7 +226,10 @@ r200_reg_safe.h +@@ -203,7 +227,12 @@ r200_reg_safe.h r300_reg_safe.h r420_reg_safe.h r600_reg_safe.h ++randomize_layout_hash.h ++randomize_layout_seed.h +realmode.lds +realmode.relocs recordmcount @@ -176,7 +182,7 @@ index b89a739..79768fb 100644 relocs rlim_names.h rn50_reg_safe.h -@@ -213,8 +239,12 @@ series +@@ -213,8 +242,12 @@ series setup setup.bin setup.elf @@ -189,7 +195,7 @@ index b89a739..79768fb 100644 split-include syscalltab.h tables.c -@@ -224,6 +254,7 @@ tftpboot.img +@@ -224,6 +257,7 @@ tftpboot.img timeconst.h times.h* trix_boot.h @@ -197,7 +203,7 @@ index b89a739..79768fb 100644 utsrelease.h* vdso-syms.lds vdso.lds -@@ -235,13 +266,17 @@ vdso32.lds +@@ -235,13 +269,17 @@ vdso32.lds vdso32.so.dbg vdso64.lds vdso64.so.dbg @@ -215,7 +221,7 @@ index b89a739..79768fb 100644 vmlinuz voffset.h vsyscall.lds -@@ -249,9 +284,12 @@ vsyscall_32.lds +@@ -249,9 +287,12 @@ vsyscall_32.lds wanxlfw.inc uImage unifdef @@ -229,10 +235,10 @@ index b89a739..79768fb 100644 +zconf.lex.c zoffset.h diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt -index fcbb736..5508d8c 100644 +index b9e9bd8..bf49b92 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt -@@ -1031,6 +1031,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted. +@@ -1033,6 +1033,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted. Format: such that (rxsize & ~0x1fffc0) == 0. Default: 1024 @@ -243,7 +249,7 @@ index fcbb736..5508d8c 100644 hashdist= [KNL,NUMA] Large hashes allocated during boot are distributed across NUMA nodes. Defaults on for 64-bit NUMA, off otherwise. -@@ -1999,6 +2003,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted. +@@ -2018,6 +2022,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted. noexec=on: enable non-executable mappings (default) noexec=off: disable non-executable mappings @@ -254,7 +260,7 @@ index fcbb736..5508d8c 100644 nosmap [X86] Disable SMAP (Supervisor Mode Access Prevention) even if it is supported by processor. -@@ -2266,6 +2274,25 @@ bytes respectively. Such letter suffixes can also be entirely omitted. +@@ -2285,6 +2293,25 @@ bytes respectively. Such letter suffixes can also be entirely omitted. the specified number of seconds. This is to be used if your oopses keep scrolling off the screen. @@ -281,10 +287,10 @@ index fcbb736..5508d8c 100644 pcd. [PARIDE] diff --git a/Makefile b/Makefile -index 3b7165e..9112a63 100644 +index a7fd5d9..dc8e4db 100644 --- a/Makefile +++ b/Makefile -@@ -241,8 +241,9 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \ +@@ -244,8 +244,9 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \ HOSTCC = gcc HOSTCXX = g++ @@ -296,7 +302,23 @@ index 3b7165e..9112a63 100644 # Decide whether to build built-in, modular, or both. # Normally, just do built-in. -@@ -414,8 +415,8 @@ export RCS_TAR_IGNORE := --exclude SCCS --exclude BitKeeper --exclude .svn \ +@@ -311,9 +312,15 @@ endif + # If the user is running make -s (silent mode), suppress echoing of + # commands + ++ifneq ($(filter 4.%,$(MAKE_VERSION)),) # make-4 ++ifneq ($(filter %s ,$(firstword x$(MAKEFLAGS))),) ++ quiet=silent_ ++endif ++else # make-3.8x + ifneq ($(filter s% -s%,$(MAKEFLAGS)),) + quiet=silent_ + endif ++endif + + export quiet Q KBUILD_VERBOSE + +@@ -417,8 +424,8 @@ export RCS_TAR_IGNORE := --exclude SCCS --exclude BitKeeper --exclude .svn \ # Rules shared between *config targets and build targets # Basic helpers built in scripts/ @@ -307,7 +329,7 @@ index 3b7165e..9112a63 100644 $(Q)$(MAKE) $(build)=scripts/basic $(Q)rm -f .tmp_quiet_recordmcount -@@ -576,6 +577,65 @@ else +@@ -579,6 +586,72 @@ else KBUILD_CFLAGS += -O2 endif @@ -333,6 +355,12 @@ index 3b7165e..9112a63 100644 +KERNEXEC_PLUGIN_CFLAGS += -fplugin-arg-kernexec_plugin-method=$(CONFIG_PAX_KERNEXEC_PLUGIN_METHOD) -DKERNEXEC_PLUGIN +KERNEXEC_PLUGIN_AFLAGS := -DKERNEXEC_PLUGIN +endif ++ifdef CONFIG_GRKERNSEC_RANDSTRUCT ++RANDSTRUCT_PLUGIN_CFLAGS := -fplugin=$(objtree)/tools/gcc/randomize_layout_plugin.so -DRANDSTRUCT_PLUGIN ++ifdef CONFIG_GRKERNSEC_RANDSTRUCT_PERFORMANCE ++RANDSTRUCT_PLUGIN_CFLAGS += -fplugin-arg-randomize_layout_plugin-performance-mode ++endif ++endif +ifdef CONFIG_CHECKER_PLUGIN +ifeq ($(call cc-ifversion, -ge, 0406, y), y) +CHECKER_PLUGIN_CFLAGS := -fplugin=$(objtree)/tools/gcc/checker_plugin.so -DCHECKER_PLUGIN @@ -351,6 +379,7 @@ index 3b7165e..9112a63 100644 +GCC_PLUGINS_CFLAGS := $(CONSTIFY_PLUGIN_CFLAGS) $(STACKLEAK_PLUGIN_CFLAGS) $(KALLOCSTAT_PLUGIN_CFLAGS) +GCC_PLUGINS_CFLAGS += $(KERNEXEC_PLUGIN_CFLAGS) $(CHECKER_PLUGIN_CFLAGS) $(COLORIZE_PLUGIN_CFLAGS) +GCC_PLUGINS_CFLAGS += $(SIZE_OVERFLOW_PLUGIN_CFLAGS) $(LATENT_ENTROPY_PLUGIN_CFLAGS) $(STRUCTLEAK_PLUGIN_CFLAGS) ++GCC_PLUGINS_CFLAGS += $(RANDSTRUCT_PLUGIN_CFLAGS) +GCC_PLUGINS_AFLAGS := $(KERNEXEC_PLUGIN_AFLAGS) +export PLUGINCC GCC_PLUGINS_CFLAGS GCC_PLUGINS_AFLAGS CONSTIFY_PLUGIN +ifeq ($(KBUILD_EXTMOD),) @@ -373,7 +402,16 @@ index 3b7165e..9112a63 100644 include $(srctree)/arch/$(SRCARCH)/Makefile ifdef CONFIG_READABLE_ASM -@@ -733,7 +793,7 @@ export mod_sign_cmd +@@ -619,7 +692,7 @@ endif + + ifdef CONFIG_DEBUG_INFO + KBUILD_CFLAGS += -g +-KBUILD_AFLAGS += -gdwarf-2 ++KBUILD_AFLAGS += -Wa,--gdwarf-2 + endif + + ifdef CONFIG_DEBUG_INFO_REDUCED +@@ -754,7 +827,7 @@ export mod_sign_cmd ifeq ($(KBUILD_EXTMOD),) @@ -382,7 +420,7 @@ index 3b7165e..9112a63 100644 vmlinux-dirs := $(patsubst %/,%,$(filter %/, $(init-y) $(init-m) \ $(core-y) $(core-m) $(drivers-y) $(drivers-m) \ -@@ -782,6 +842,8 @@ endif +@@ -803,6 +876,8 @@ endif # The actual objects are generated when descending, # make sure no implicit rule kicks in @@ -391,7 +429,7 @@ index 3b7165e..9112a63 100644 $(sort $(vmlinux-deps)): $(vmlinux-dirs) ; # Handle descending into subdirectories listed in $(vmlinux-dirs) -@@ -791,7 +853,7 @@ $(sort $(vmlinux-deps)): $(vmlinux-dirs) ; +@@ -812,7 +887,7 @@ $(sort $(vmlinux-deps)): $(vmlinux-dirs) ; # Error messages still appears in the original language PHONY += $(vmlinux-dirs) @@ -400,7 +438,13 @@ index 3b7165e..9112a63 100644 $(Q)$(MAKE) $(build)=$@ define filechk_kernel.release -@@ -838,6 +900,7 @@ prepare0: archprepare FORCE +@@ -855,10 +930,13 @@ prepare1: prepare2 $(version_h) include/generated/utsrelease.h \ + + archprepare: archheaders archscripts prepare1 scripts_basic + ++prepare0: KBUILD_CFLAGS += $(GCC_PLUGINS_CFLAGS) ++prepare0: KBUILD_AFLAGS += $(GCC_PLUGINS_AFLAGS) + prepare0: archprepare FORCE $(Q)$(MAKE) $(build)=. # All the preparing.. @@ -408,7 +452,7 @@ index 3b7165e..9112a63 100644 prepare: prepare0 # Generate some files -@@ -945,6 +1008,8 @@ all: modules +@@ -966,6 +1044,8 @@ all: modules # using awk while concatenating to the final file. PHONY += modules @@ -417,7 +461,7 @@ index 3b7165e..9112a63 100644 modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) modules.builtin $(Q)$(AWK) '!x[$$0]++' $(vmlinux-dirs:%=$(objtree)/%/modules.order) > $(objtree)/modules.order @$(kecho) ' Building modules, stage 2.'; -@@ -960,7 +1025,7 @@ modules.builtin: $(vmlinux-dirs:%=%/modules.builtin) +@@ -981,7 +1061,7 @@ modules.builtin: $(vmlinux-dirs:%=%/modules.builtin) # Target to prepare building external modules PHONY += modules_prepare @@ -426,16 +470,17 @@ index 3b7165e..9112a63 100644 # Target to install modules PHONY += modules_install -@@ -1026,7 +1091,7 @@ MRPROPER_FILES += .config .config.old .version .old_version $(version_h) \ +@@ -1047,7 +1127,8 @@ MRPROPER_FILES += .config .config.old .version .old_version $(version_h) \ Module.symvers tags TAGS cscope* GPATH GTAGS GRTAGS GSYMS \ signing_key.priv signing_key.x509 x509.genkey \ extra_certificates signing_key.x509.keyid \ - signing_key.x509.signer -+ signing_key.x509.signer tools/gcc/size_overflow_hash.h ++ signing_key.x509.signer tools/gcc/size_overflow_hash.h \ ++ tools/gcc/randomize_layout_seed.h # clean - Delete most, but leave enough to build external modules # -@@ -1066,6 +1131,7 @@ distclean: mrproper +@@ -1087,6 +1168,7 @@ distclean: mrproper \( -name '*.orig' -o -name '*.rej' -o -name '*~' \ -o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \ -o -name '.*.rej' \ @@ -443,7 +488,7 @@ index 3b7165e..9112a63 100644 -o -name '*%' -o -name '.*.cmd' -o -name 'core' \) \ -type f -print | xargs rm -f -@@ -1227,6 +1293,8 @@ PHONY += $(module-dirs) modules +@@ -1248,6 +1330,8 @@ PHONY += $(module-dirs) modules $(module-dirs): crmodverdir $(objtree)/Module.symvers $(Q)$(MAKE) $(build)=$(patsubst _module_%,%,$@) @@ -452,7 +497,7 @@ index 3b7165e..9112a63 100644 modules: $(module-dirs) @$(kecho) ' Building modules, stage 2.'; $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost -@@ -1366,17 +1434,21 @@ else +@@ -1387,17 +1471,21 @@ else target-dir = $(if $(KBUILD_EXTMOD),$(dir $<),$(dir $@)) endif @@ -478,7 +523,7 @@ index 3b7165e..9112a63 100644 $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@) %.symtypes: %.c prepare scripts FORCE $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@) -@@ -1386,11 +1458,15 @@ endif +@@ -1407,11 +1495,15 @@ endif $(cmd_crmodverdir) $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \ $(build)=$(build-dir) @@ -562,7 +607,7 @@ index 968d999..d36b2df 100644 registered using atexit. This provides a mean for the dynamic linker to call DT_FINI functions for shared libraries that have diff --git a/arch/alpha/include/asm/pgalloc.h b/arch/alpha/include/asm/pgalloc.h -index bc2a0da..8ad11ee 100644 +index aab14a0..b4fa3e7 100644 --- a/arch/alpha/include/asm/pgalloc.h +++ b/arch/alpha/include/asm/pgalloc.h @@ -29,6 +29,12 @@ pgd_populate(struct mm_struct *mm, pgd_t *pgd, pmd_t *pmd) @@ -829,10 +874,10 @@ index 98838a0..b304fb4 100644 /* Allow reads even for write-only mappings */ if (!(vma->vm_flags & (VM_READ | VM_WRITE))) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig -index 1ad6fb6..9406b3d 100644 +index c1f1a7e..554b0cd 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig -@@ -1832,7 +1832,7 @@ config ALIGNMENT_TRAP +@@ -1828,7 +1828,7 @@ config ALIGNMENT_TRAP config UACCESS_WITH_MEMCPY bool "Use kernel mem{cpy,set}() for {copy_to,clear}_user()" @@ -841,7 +886,7 @@ index 1ad6fb6..9406b3d 100644 default y if CPU_FEROCEON help Implement faster copy_to_user and clear_user methods for CPU -@@ -2097,6 +2097,7 @@ config XIP_PHYS_ADDR +@@ -2100,6 +2100,7 @@ config XIP_PHYS_ADDR config KEXEC bool "Kexec system call (EXPERIMENTAL)" depends on (!SMP || PM_SLEEP_SMP) @@ -850,10 +895,10 @@ index 1ad6fb6..9406b3d 100644 kexec is a system call that implements the ability to shutdown your current kernel, and to start another kernel. It is like a reboot diff --git a/arch/arm/include/asm/atomic.h b/arch/arm/include/asm/atomic.h -index da1c77d..2ee6056 100644 +index 62d2cb5..7a13651 100644 --- a/arch/arm/include/asm/atomic.h +++ b/arch/arm/include/asm/atomic.h -@@ -17,17 +17,35 @@ +@@ -18,17 +18,35 @@ #include #include @@ -889,9 +934,9 @@ index da1c77d..2ee6056 100644 #if __LINUX_ARM_ARCH__ >= 6 -@@ -42,6 +60,35 @@ static inline void atomic_add(int i, atomic_t *v) - int result; +@@ -44,6 +62,36 @@ static inline void atomic_add(int i, atomic_t *v) + prefetchw(&v->counter); __asm__ __volatile__("@ atomic_add\n" +"1: ldrex %1, [%3]\n" +" adds %0, %1, %4\n" @@ -921,11 +966,12 @@ index da1c77d..2ee6056 100644 + unsigned long tmp; + int result; + ++ prefetchw(&v->counter); + __asm__ __volatile__("@ atomic_add_unchecked\n" "1: ldrex %0, [%3]\n" " add %0, %0, %4\n" " strex %1, %0, [%3]\n" -@@ -60,6 +107,42 @@ static inline int atomic_add_return(int i, atomic_t *v) +@@ -62,6 +110,42 @@ static inline int atomic_add_return(int i, atomic_t *v) smp_mb(); __asm__ __volatile__("@ atomic_add_return\n" @@ -968,9 +1014,9 @@ index da1c77d..2ee6056 100644 "1: ldrex %0, [%3]\n" " add %0, %0, %4\n" " strex %1, %0, [%3]\n" -@@ -80,6 +163,35 @@ static inline void atomic_sub(int i, atomic_t *v) - int result; +@@ -83,6 +167,36 @@ static inline void atomic_sub(int i, atomic_t *v) + prefetchw(&v->counter); __asm__ __volatile__("@ atomic_sub\n" +"1: ldrex %1, [%3]\n" +" subs %0, %1, %4\n" @@ -1000,11 +1046,12 @@ index da1c77d..2ee6056 100644 + unsigned long tmp; + int result; + ++ prefetchw(&v->counter); + __asm__ __volatile__("@ atomic_sub_unchecked\n" "1: ldrex %0, [%3]\n" " sub %0, %0, %4\n" " strex %1, %0, [%3]\n" -@@ -98,11 +210,25 @@ static inline int atomic_sub_return(int i, atomic_t *v) +@@ -101,11 +215,25 @@ static inline int atomic_sub_return(int i, atomic_t *v) smp_mb(); __asm__ __volatile__("@ atomic_sub_return\n" @@ -1032,7 +1079,7 @@ index da1c77d..2ee6056 100644 : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter) : "r" (&v->counter), "Ir" (i) : "cc"); -@@ -134,6 +260,28 @@ static inline int atomic_cmpxchg(atomic_t *ptr, int old, int new) +@@ -138,6 +266,28 @@ static inline int atomic_cmpxchg(atomic_t *ptr, int old, int new) return oldval; } @@ -1058,10 +1105,10 @@ index da1c77d..2ee6056 100644 + return oldval; +} + - static inline void atomic_clear_mask(unsigned long mask, unsigned long *addr) - { - unsigned long tmp, tmp2; -@@ -167,7 +315,17 @@ static inline int atomic_add_return(int i, atomic_t *v) + #else /* ARM_ARCH_6 */ + + #ifdef CONFIG_SMP +@@ -156,7 +306,17 @@ static inline int atomic_add_return(int i, atomic_t *v) return val; } @@ -1079,7 +1126,7 @@ index da1c77d..2ee6056 100644 static inline int atomic_sub_return(int i, atomic_t *v) { -@@ -182,6 +340,10 @@ static inline int atomic_sub_return(int i, atomic_t *v) +@@ -171,6 +331,10 @@ static inline int atomic_sub_return(int i, atomic_t *v) return val; } #define atomic_sub(i, v) (void) atomic_sub_return(i, v) @@ -1090,7 +1137,7 @@ index da1c77d..2ee6056 100644 static inline int atomic_cmpxchg(atomic_t *v, int old, int new) { -@@ -197,6 +359,11 @@ static inline int atomic_cmpxchg(atomic_t *v, int old, int new) +@@ -186,9 +350,18 @@ static inline int atomic_cmpxchg(atomic_t *v, int old, int new) return ret; } @@ -1099,10 +1146,6 @@ index da1c77d..2ee6056 100644 + return atomic_cmpxchg(v, old, new); +} + - static inline void atomic_clear_mask(unsigned long mask, unsigned long *addr) - { - unsigned long flags; -@@ -209,6 +376,10 @@ static inline void atomic_clear_mask(unsigned long mask, unsigned long *addr) #endif /* __LINUX_ARM_ARCH__ */ #define atomic_xchg(v, new) (xchg(&((v)->counter), new)) @@ -1113,7 +1156,7 @@ index da1c77d..2ee6056 100644 static inline int __atomic_add_unless(atomic_t *v, int a, int u) { -@@ -221,11 +392,27 @@ static inline int __atomic_add_unless(atomic_t *v, int a, int u) +@@ -201,11 +374,27 @@ static inline int __atomic_add_unless(atomic_t *v, int a, int u) } #define atomic_inc(v) atomic_add(1, v) @@ -1141,13 +1184,13 @@ index da1c77d..2ee6056 100644 #define atomic_dec_return(v) (atomic_sub_return(1, v)) #define atomic_sub_and_test(i, v) (atomic_sub_return(i, v) == 0) -@@ -241,6 +428,14 @@ typedef struct { - u64 __aligned(8) counter; +@@ -221,6 +410,14 @@ typedef struct { + long long counter; } atomic64_t; +#ifdef CONFIG_PAX_REFCOUNT +typedef struct { -+ u64 __aligned(8) counter; ++ long long counter; +} atomic64_unchecked_t; +#else +typedef atomic64_t atomic64_unchecked_t; @@ -1156,13 +1199,13 @@ index da1c77d..2ee6056 100644 #define ATOMIC64_INIT(i) { (i) } #ifdef CONFIG_ARM_LPAE -@@ -257,6 +452,19 @@ static inline u64 atomic64_read(const atomic64_t *v) +@@ -237,6 +434,19 @@ static inline long long atomic64_read(const atomic64_t *v) return result; } -+static inline u64 atomic64_read_unchecked(const atomic64_unchecked_t *v) ++static inline long long atomic64_read_unchecked(const atomic64_unchecked_t *v) +{ -+ u64 result; ++ long long result; + + __asm__ __volatile__("@ atomic64_read_unchecked\n" +" ldrd %0, %H0, [%1]" @@ -1173,15 +1216,15 @@ index da1c77d..2ee6056 100644 + return result; +} + - static inline void atomic64_set(atomic64_t *v, u64 i) + static inline void atomic64_set(atomic64_t *v, long long i) { __asm__ __volatile__("@ atomic64_set\n" -@@ -265,6 +473,15 @@ static inline void atomic64_set(atomic64_t *v, u64 i) +@@ -245,6 +455,15 @@ static inline void atomic64_set(atomic64_t *v, long long i) : "r" (&v->counter), "r" (i) ); } + -+static inline void atomic64_set_unchecked(atomic64_unchecked_t *v, u64 i) ++static inline void atomic64_set_unchecked(atomic64_unchecked_t *v, long long i) +{ + __asm__ __volatile__("@ atomic64_set_unchecked\n" +" strd %2, %H2, [%1]" @@ -1190,15 +1233,15 @@ index da1c77d..2ee6056 100644 + ); +} #else - static inline u64 atomic64_read(const atomic64_t *v) + static inline long long atomic64_read(const atomic64_t *v) { -@@ -279,6 +496,19 @@ static inline u64 atomic64_read(const atomic64_t *v) +@@ -259,6 +478,19 @@ static inline long long atomic64_read(const atomic64_t *v) return result; } -+static inline u64 atomic64_read_unchecked(atomic64_unchecked_t *v) ++static inline long long atomic64_read_unchecked(const atomic64_unchecked_t *v) +{ -+ u64 result; ++ long long result; + + __asm__ __volatile__("@ atomic64_read_unchecked\n" +" ldrexd %0, %H0, [%1]" @@ -1209,18 +1252,19 @@ index da1c77d..2ee6056 100644 + return result; +} + - static inline void atomic64_set(atomic64_t *v, u64 i) + static inline void atomic64_set(atomic64_t *v, long long i) { - u64 tmp; -@@ -292,6 +522,21 @@ static inline void atomic64_set(atomic64_t *v, u64 i) + long long tmp; +@@ -273,6 +505,21 @@ static inline void atomic64_set(atomic64_t *v, long long i) : "r" (&v->counter), "r" (i) : "cc"); } + -+static inline void atomic64_set_unchecked(atomic64_unchecked_t *v, u64 i) ++static inline void atomic64_set_unchecked(atomic64_unchecked_t *v, long long i) +{ -+ u64 tmp; ++ long long tmp; + ++ prefetchw(&v->counter); + __asm__ __volatile__("@ atomic64_set_unchecked\n" +"1: ldrexd %0, %H0, [%2]\n" +" strexd %0, %3, %H3, [%2]\n" @@ -1230,15 +1274,14 @@ index da1c77d..2ee6056 100644 + : "r" (&v->counter), "r" (i) + : "cc"); +} -+ #endif - static inline void atomic64_add(u64 i, atomic64_t *v) -@@ -302,6 +547,36 @@ static inline void atomic64_add(u64 i, atomic64_t *v) + static inline void atomic64_add(long long i, atomic64_t *v) +@@ -284,6 +531,37 @@ static inline void atomic64_add(long long i, atomic64_t *v) __asm__ __volatile__("@ atomic64_add\n" "1: ldrexd %0, %H0, [%3]\n" - " adds %0, %0, %4\n" -+" adcs %H0, %H0, %H4\n" + " adds %Q0, %Q0, %Q4\n" ++" adcs %R0, %R0, %R4\n" + +#ifdef CONFIG_PAX_REFCOUNT +" bvc 3f\n" @@ -1260,31 +1303,23 @@ index da1c77d..2ee6056 100644 + : "cc"); +} + -+static inline void atomic64_add_unchecked(u64 i, atomic64_unchecked_t *v) ++static inline void atomic64_add_unchecked(long long i, atomic64_unchecked_t *v) +{ -+ u64 result; ++ long long result; + unsigned long tmp; + ++ prefetchw(&v->counter); + __asm__ __volatile__("@ atomic64_add_unchecked\n" +"1: ldrexd %0, %H0, [%3]\n" -+" adds %0, %0, %4\n" - " adc %H0, %H0, %H4\n" ++" adds %Q0, %Q0, %Q4\n" + " adc %R0, %R0, %R4\n" " strexd %1, %0, %H0, [%3]\n" " teq %1, #0\n" -@@ -313,12 +588,49 @@ static inline void atomic64_add(u64 i, atomic64_t *v) - - static inline u64 atomic64_add_return(u64 i, atomic64_t *v) - { -- u64 result; -- unsigned long tmp; -+ u64 result, tmp; - - smp_mb(); - +@@ -303,6 +581,44 @@ static inline long long atomic64_add_return(long long i, atomic64_t *v) __asm__ __volatile__("@ atomic64_add_return\n" -+"1: ldrexd %1, %H1, [%3]\n" -+" adds %0, %1, %4\n" -+" adcs %H0, %H1, %H4\n" + "1: ldrexd %0, %H0, [%3]\n" + " adds %Q0, %Q0, %Q4\n" ++" adcs %R0, %R0, %R4\n" + +#ifdef CONFIG_PAX_REFCOUNT +" bvc 3f\n" @@ -1312,22 +1347,24 @@ index da1c77d..2ee6056 100644 + return result; +} + -+static inline u64 atomic64_add_return_unchecked(u64 i, atomic64_unchecked_t *v) ++static inline long long atomic64_add_return_unchecked(long long i, atomic64_unchecked_t *v) +{ -+ u64 result; ++ long long result; + unsigned long tmp; + + smp_mb(); + + __asm__ __volatile__("@ atomic64_add_return_unchecked\n" - "1: ldrexd %0, %H0, [%3]\n" - " adds %0, %0, %4\n" - " adc %H0, %H0, %H4\n" -@@ -342,6 +654,36 @@ static inline void atomic64_sub(u64 i, atomic64_t *v) ++"1: ldrexd %0, %H0, [%3]\n" ++" adds %Q0, %Q0, %Q4\n" + " adc %R0, %R0, %R4\n" + " strexd %1, %0, %H0, [%3]\n" + " teq %1, #0\n" +@@ -325,6 +641,37 @@ static inline void atomic64_sub(long long i, atomic64_t *v) __asm__ __volatile__("@ atomic64_sub\n" "1: ldrexd %0, %H0, [%3]\n" - " subs %0, %0, %4\n" -+" sbcs %H0, %H0, %H4\n" + " subs %Q0, %Q0, %Q4\n" ++" sbcs %R0, %R0, %R4\n" + +#ifdef CONFIG_PAX_REFCOUNT +" bvc 3f\n" @@ -1349,34 +1386,24 @@ index da1c77d..2ee6056 100644 + : "cc"); +} + -+static inline void atomic64_sub_unchecked(u64 i, atomic64_unchecked_t *v) ++static inline void atomic64_sub_unchecked(long long i, atomic64_unchecked_t *v) +{ -+ u64 result; ++ long long result; + unsigned long tmp; + ++ prefetchw(&v->counter); + __asm__ __volatile__("@ atomic64_sub_unchecked\n" +"1: ldrexd %0, %H0, [%3]\n" -+" subs %0, %0, %4\n" - " sbc %H0, %H0, %H4\n" ++" subs %Q0, %Q0, %Q4\n" + " sbc %R0, %R0, %R4\n" " strexd %1, %0, %H0, [%3]\n" " teq %1, #0\n" -@@ -353,18 +695,32 @@ static inline void atomic64_sub(u64 i, atomic64_t *v) - - static inline u64 atomic64_sub_return(u64 i, atomic64_t *v) - { -- u64 result; -- unsigned long tmp; -+ u64 result, tmp; - - smp_mb(); - +@@ -344,17 +691,28 @@ static inline long long atomic64_sub_return(long long i, atomic64_t *v) __asm__ __volatile__("@ atomic64_sub_return\n" --"1: ldrexd %0, %H0, [%3]\n" --" subs %0, %0, %4\n" --" sbc %H0, %H0, %H4\n" -+"1: ldrexd %1, %H1, [%3]\n" -+" subs %0, %1, %4\n" -+" sbcs %H0, %H1, %H4\n" + "1: ldrexd %0, %H0, [%3]\n" + " subs %Q0, %Q0, %Q4\n" +-" sbc %R0, %R0, %R4\n" ++" sbcs %R0, %R0, %R4\n" + +#ifdef CONFIG_PAX_REFCOUNT +" bvc 3f\n" @@ -1398,13 +1425,21 @@ index da1c77d..2ee6056 100644 : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter) : "r" (&v->counter), "r" (i) : "cc"); -@@ -398,6 +754,30 @@ static inline u64 atomic64_cmpxchg(atomic64_t *ptr, u64 old, u64 new) +- +- smp_mb(); +- +- return result; + } + + static inline long long atomic64_cmpxchg(atomic64_t *ptr, long long old, +@@ -382,6 +740,31 @@ static inline long long atomic64_cmpxchg(atomic64_t *ptr, long long old, return oldval; } -+static inline u64 atomic64_cmpxchg_unchecked(atomic64_unchecked_t *ptr, u64 old, u64 new) ++static inline long long atomic64_cmpxchg_unchecked(atomic64_unchecked_t *ptr, long long old, ++ long long new) +{ -+ u64 oldval; ++ long long oldval; + unsigned long res; + + smp_mb(); @@ -1426,36 +1461,35 @@ index da1c77d..2ee6056 100644 + return oldval; +} + - static inline u64 atomic64_xchg(atomic64_t *ptr, u64 new) + static inline long long atomic64_xchg(atomic64_t *ptr, long long new) { - u64 result; -@@ -421,21 +801,34 @@ static inline u64 atomic64_xchg(atomic64_t *ptr, u64 new) - - static inline u64 atomic64_dec_if_positive(atomic64_t *v) + long long result; +@@ -406,20 +789,34 @@ static inline long long atomic64_xchg(atomic64_t *ptr, long long new) + static inline long long atomic64_dec_if_positive(atomic64_t *v) { -- u64 result; + long long result; - unsigned long tmp; -+ u64 result, tmp; ++ u64 tmp; smp_mb(); __asm__ __volatile__("@ atomic64_dec_if_positive\n" -"1: ldrexd %0, %H0, [%3]\n" --" subs %0, %0, #1\n" --" sbc %H0, %H0, #0\n" +-" subs %Q0, %Q0, #1\n" +-" sbc %R0, %R0, #0\n" +"1: ldrexd %1, %H1, [%3]\n" -+" subs %0, %1, #1\n" -+" sbcs %H0, %H1, #0\n" ++" subs %Q0, %Q1, #1\n" ++" sbcs %R0, %R1, #0\n" + +#ifdef CONFIG_PAX_REFCOUNT +" bvc 3f\n" -+" mov %0, %1\n" -+" mov %H0, %H1\n" ++" mov %Q0, %Q1\n" ++" mov %R0, %R1\n" +"2: bkpt 0xf103\n" +"3:\n" +#endif + - " teq %H0, #0\n" + " teq %R0, #0\n" -" bmi 2f\n" +" bmi 4f\n" " strexd %1, %0, %H0, [%3]\n" @@ -1471,15 +1505,15 @@ index da1c77d..2ee6056 100644 : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter) : "r" (&v->counter) : "cc"); -@@ -458,13 +851,25 @@ static inline int atomic64_add_unless(atomic64_t *v, u64 a, u64 u) +@@ -442,13 +839,25 @@ static inline int atomic64_add_unless(atomic64_t *v, long long a, long long u) " teq %0, %5\n" " teqeq %H0, %H5\n" " moveq %1, #0\n" -" beq 2f\n" +" beq 4f\n" - " adds %0, %0, %6\n" --" adc %H0, %H0, %H6\n" -+" adcs %H0, %H0, %H6\n" + " adds %Q0, %Q0, %Q6\n" +-" adc %R0, %R0, %R6\n" ++" adcs %R0, %R0, %R6\n" + +#ifdef CONFIG_PAX_REFCOUNT +" bvc 3f\n" @@ -1500,7 +1534,7 @@ index da1c77d..2ee6056 100644 : "=&r" (val), "+r" (ret), "=&r" (tmp), "+Qo" (v->counter) : "r" (&v->counter), "r" (u), "r" (a) : "cc"); -@@ -477,10 +882,13 @@ static inline int atomic64_add_unless(atomic64_t *v, u64 a, u64 u) +@@ -461,10 +870,13 @@ static inline int atomic64_add_unless(atomic64_t *v, long long a, long long u) #define atomic64_add_negative(a, v) (atomic64_add_return((a), (v)) < 0) #define atomic64_inc(v) atomic64_add(1LL, (v)) @@ -1538,7 +1572,7 @@ index 75fe66b..ba3dee4 100644 #endif diff --git a/arch/arm/include/asm/cacheflush.h b/arch/arm/include/asm/cacheflush.h -index 15f2d5b..43ffa53 100644 +index ee753f1..c9c30a5 100644 --- a/arch/arm/include/asm/cacheflush.h +++ b/arch/arm/include/asm/cacheflush.h @@ -116,7 +116,7 @@ struct cpu_cache_fns { @@ -1576,7 +1610,7 @@ index 6dcc164..b14d917 100644 /* * Fold a partial checksum without adding pseudo headers diff --git a/arch/arm/include/asm/cmpxchg.h b/arch/arm/include/asm/cmpxchg.h -index 4f009c1..466c59b 100644 +index df2fbba..63fe3e1 100644 --- a/arch/arm/include/asm/cmpxchg.h +++ b/arch/arm/include/asm/cmpxchg.h @@ -102,6 +102,8 @@ static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size @@ -1825,7 +1859,7 @@ index 4355f0e..c229913 100644 #ifdef MULTI_USER extern struct cpu_user_fns cpu_user; diff --git a/arch/arm/include/asm/pgalloc.h b/arch/arm/include/asm/pgalloc.h -index 943504f..c37a730 100644 +index 78a7793..e3dc06c 100644 --- a/arch/arm/include/asm/pgalloc.h +++ b/arch/arm/include/asm/pgalloc.h @@ -17,6 +17,7 @@ @@ -1856,7 +1890,7 @@ index 943504f..c37a730 100644 #endif /* CONFIG_ARM_LPAE */ -@@ -126,6 +133,19 @@ static inline void pte_free(struct mm_struct *mm, pgtable_t pte) +@@ -128,6 +135,19 @@ static inline void pte_free(struct mm_struct *mm, pgtable_t pte) __free_page(pte); } @@ -1876,7 +1910,7 @@ index 943504f..c37a730 100644 static inline void __pmd_populate(pmd_t *pmdp, phys_addr_t pte, pmdval_t prot) { -@@ -155,7 +175,7 @@ pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmdp, pte_t *ptep) +@@ -157,7 +177,7 @@ pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmdp, pte_t *ptep) static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmdp, pgtable_t ptep) { @@ -1922,7 +1956,7 @@ index 5cfba15..f415e1a 100644 #define PTE_EXT_AP0 (_AT(pteval_t, 1) << 4) #define PTE_EXT_AP1 (_AT(pteval_t, 2) << 4) diff --git a/arch/arm/include/asm/pgtable-2level.h b/arch/arm/include/asm/pgtable-2level.h -index f97ee02..cc9fe9e 100644 +index 86a659a..70e0120 100644 --- a/arch/arm/include/asm/pgtable-2level.h +++ b/arch/arm/include/asm/pgtable-2level.h @@ -126,6 +126,9 @@ @@ -1948,7 +1982,7 @@ index 626989f..9d67a33 100644 /* diff --git a/arch/arm/include/asm/pgtable-3level.h b/arch/arm/include/asm/pgtable-3level.h -index 5689c18..eea12f9 100644 +index 4f95039..b2dd513 100644 --- a/arch/arm/include/asm/pgtable-3level.h +++ b/arch/arm/include/asm/pgtable-3level.h @@ -82,6 +82,7 @@ @@ -1968,7 +2002,7 @@ index 5689c18..eea12f9 100644 #define L_PTE_DIRTY_HIGH (1 << (55 - 32)) diff --git a/arch/arm/include/asm/pgtable.h b/arch/arm/include/asm/pgtable.h -index be956db..c8f25e2 100644 +index 1571d12..b8a9b43 100644 --- a/arch/arm/include/asm/pgtable.h +++ b/arch/arm/include/asm/pgtable.h @@ -33,6 +33,9 @@ @@ -2087,10 +2121,10 @@ index c4ae171..ea0c0c2 100644 extern struct psci_operations psci_ops; extern struct smp_operations psci_smp_ops; diff --git a/arch/arm/include/asm/smp.h b/arch/arm/include/asm/smp.h -index a8cae71c..65dd797 100644 +index 22a3b9b..7f214ee 100644 --- a/arch/arm/include/asm/smp.h +++ b/arch/arm/include/asm/smp.h -@@ -110,7 +110,7 @@ struct smp_operations { +@@ -112,7 +112,7 @@ struct smp_operations { int (*cpu_disable)(unsigned int cpu); #endif #endif @@ -2100,7 +2134,7 @@ index a8cae71c..65dd797 100644 /* * set platform specific SMP operations diff --git a/arch/arm/include/asm/thread_info.h b/arch/arm/include/asm/thread_info.h -index df5e13d..97efb82 100644 +index 71a06b2..8bb9ae1 100644 --- a/arch/arm/include/asm/thread_info.h +++ b/arch/arm/include/asm/thread_info.h @@ -88,9 +88,9 @@ struct thread_info { @@ -2116,7 +2150,7 @@ index df5e13d..97efb82 100644 .restart_block = { \ .fn = do_no_restart_syscall, \ }, \ -@@ -163,7 +163,11 @@ extern int vfp_restore_user_hwstate(struct user_vfp __user *, +@@ -157,7 +157,11 @@ extern int vfp_restore_user_hwstate(struct user_vfp __user *, #define TIF_SYSCALL_AUDIT 9 #define TIF_SYSCALL_TRACEPOINT 10 #define TIF_SECCOMP 11 /* seccomp syscall filtering active */ @@ -2129,7 +2163,7 @@ index df5e13d..97efb82 100644 #define TIF_USING_IWMMXT 17 #define TIF_MEMDIE 18 /* is terminating due to OOM killer */ #define TIF_RESTORE_SIGMASK 20 -@@ -176,10 +180,11 @@ extern int vfp_restore_user_hwstate(struct user_vfp __user *, +@@ -170,10 +174,11 @@ extern int vfp_restore_user_hwstate(struct user_vfp __user *, #define _TIF_SYSCALL_TRACEPOINT (1 << TIF_SYSCALL_TRACEPOINT) #define _TIF_SECCOMP (1 << TIF_SECCOMP) #define _TIF_USING_IWMMXT (1 << TIF_USING_IWMMXT) @@ -2340,7 +2374,7 @@ index 5af0ed1..cea83883 100644 #define PSR_ENDIAN_MASK 0x00000200 /* Endianness state mask */ diff --git a/arch/arm/kernel/armksyms.c b/arch/arm/kernel/armksyms.c -index 60d3b73..e5a0f22 100644 +index 1f031dd..d9b5e4a 100644 --- a/arch/arm/kernel/armksyms.c +++ b/arch/arm/kernel/armksyms.c @@ -53,7 +53,7 @@ EXPORT_SYMBOL(arm_delay_ops); @@ -2366,7 +2400,7 @@ index 60d3b73..e5a0f22 100644 EXPORT_SYMBOL(__get_user_1); EXPORT_SYMBOL(__get_user_2); diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S -index ec3e5cf..b450ee3 100644 +index b3fb8c9..59cfab2 100644 --- a/arch/arm/kernel/entry-armv.S +++ b/arch/arm/kernel/entry-armv.S @@ -47,6 +47,87 @@ @@ -2515,10 +2549,10 @@ index ec3e5cf..b450ee3 100644 + pax_open_userland 1: ldrt r0, [r4] + pax_close_userland - #ifdef CONFIG_CPU_ENDIAN_BE8 - rev r0, r0 @ little endian instruction - #endif -@@ -451,10 +550,14 @@ __und_usr_thumb: + ARM_BE8(rev r0, r0) @ little endian instruction + + @ r0 = 32-bit ARM instruction which caused the exception +@@ -450,10 +549,14 @@ __und_usr_thumb: */ .arch armv6t2 #endif @@ -2533,7 +2567,7 @@ index ec3e5cf..b450ee3 100644 add r2, r2, #2 @ r2 is PC + 2, make it PC + 4 str r2, [sp, #S_PC] @ it's a 2x16bit instr, update orr r0, r0, r5, lsl #16 -@@ -483,7 +586,8 @@ ENDPROC(__und_usr) +@@ -482,7 +585,8 @@ ENDPROC(__und_usr) */ .pushsection .fixup, "ax" .align 2 @@ -2543,7 +2577,7 @@ index ec3e5cf..b450ee3 100644 .popsection .pushsection __ex_table,"a" .long 1b, 4b -@@ -693,7 +797,7 @@ ENTRY(__switch_to) +@@ -692,7 +796,7 @@ ENTRY(__switch_to) THUMB( str lr, [ip], #4 ) ldr r4, [r2, #TI_TP_VALUE] ldr r5, [r2, #TI_TP_VALUE + 4] @@ -2552,7 +2586,7 @@ index ec3e5cf..b450ee3 100644 ldr r6, [r2, #TI_CPU_DOMAIN] #endif switch_tls r1, r4, r5, r3, r7 -@@ -702,7 +806,7 @@ ENTRY(__switch_to) +@@ -701,7 +805,7 @@ ENTRY(__switch_to) ldr r8, =__stack_chk_guard ldr r7, [r7, #TSK_STACK_CANARY] #endif @@ -2562,7 +2596,7 @@ index ec3e5cf..b450ee3 100644 #endif mov r5, r0 diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S -index bc6bd96..bd026cb 100644 +index a2dcafd..1048b5a 100644 --- a/arch/arm/kernel/entry-common.S +++ b/arch/arm/kernel/entry-common.S @@ -10,18 +10,46 @@ @@ -2615,7 +2649,7 @@ index bc6bd96..bd026cb 100644 .align 5 /* * This is the fast syscall return path. We do as little as -@@ -413,6 +441,12 @@ ENTRY(vector_swi) +@@ -411,6 +439,12 @@ ENTRY(vector_swi) USER( ldr scno, [lr, #-4] ) @ get SWI instruction #endif @@ -2729,7 +2763,7 @@ index 918875d..cd5fa27 100644 flush_icache_range((unsigned long)base + offset, offset + length); diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S -index 476de57..4857a76 100644 +index 32f317e..710ae07 100644 --- a/arch/arm/kernel/head.S +++ b/arch/arm/kernel/head.S @@ -52,7 +52,9 @@ @@ -2743,7 +2777,7 @@ index 476de57..4857a76 100644 .endm /* -@@ -432,7 +434,7 @@ __enable_mmu: +@@ -436,7 +438,7 @@ __enable_mmu: mov r5, #(domain_val(DOMAIN_USER, DOMAIN_MANAGER) | \ domain_val(DOMAIN_KERNEL, DOMAIN_MANAGER) | \ domain_val(DOMAIN_TABLE, DOMAIN_MANAGER) | \ @@ -2753,10 +2787,10 @@ index 476de57..4857a76 100644 mcr p15, 0, r4, c2, c0, 0 @ load page table pointer #endif diff --git a/arch/arm/kernel/module.c b/arch/arm/kernel/module.c -index 084dc88..fce4e68 100644 +index 45e4781..8eac93d 100644 --- a/arch/arm/kernel/module.c +++ b/arch/arm/kernel/module.c -@@ -37,12 +37,39 @@ +@@ -38,12 +38,39 @@ #endif #ifdef CONFIG_MMU @@ -2766,8 +2800,8 @@ index 084dc88..fce4e68 100644 + if (!size || PAGE_ALIGN(size) > MODULES_END - MODULES_VADDR) + return NULL; return __vmalloc_node_range(size, 1, MODULES_VADDR, MODULES_END, -- GFP_KERNEL, PAGE_KERNEL_EXEC, -1, -+ GFP_KERNEL, prot, -1, +- GFP_KERNEL, PAGE_KERNEL_EXEC, NUMA_NO_NODE, ++ GFP_KERNEL, prot, NUMA_NO_NODE, __builtin_return_address(0)); } + @@ -2819,7 +2853,7 @@ index 07314af..c46655c 100644 flush_icache_range((uintptr_t)(addr), (uintptr_t)(addr) + size); diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c -index 94f6b05..efd7312 100644 +index 92f7b15..7048500 100644 --- a/arch/arm/kernel/process.c +++ b/arch/arm/kernel/process.c @@ -217,6 +217,7 @@ void machine_power_off(void) @@ -2850,7 +2884,7 @@ index 94f6b05..efd7312 100644 printk("pc : [<%08lx>] lr : [<%08lx>] psr: %08lx\n" "sp : %08lx ip : %08lx fp : %08lx\n", regs->ARM_pc, regs->ARM_lr, regs->ARM_cpsr, -@@ -422,12 +423,6 @@ unsigned long get_wchan(struct task_struct *p) +@@ -425,12 +426,6 @@ unsigned long get_wchan(struct task_struct *p) return 0; } @@ -2863,7 +2897,7 @@ index 94f6b05..efd7312 100644 #ifdef CONFIG_MMU #ifdef CONFIG_KUSER_HELPERS /* -@@ -443,7 +438,7 @@ static struct vm_area_struct gate_vma = { +@@ -446,7 +441,7 @@ static struct vm_area_struct gate_vma = { static int __init gate_vma_init(void) { @@ -2872,7 +2906,7 @@ index 94f6b05..efd7312 100644 return 0; } arch_initcall(gate_vma_init); -@@ -469,41 +464,16 @@ int in_gate_area_no_mm(unsigned long addr) +@@ -472,41 +467,16 @@ int in_gate_area_no_mm(unsigned long addr) const char *arch_vma_name(struct vm_area_struct *vma) { @@ -2955,10 +2989,10 @@ index 0dd3b79..e018f64 100644 if (secure_computing(scno) == -1) return -1; diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c -index 0e1e2b3..c0e821d 100644 +index 987a7f5..d9d6071 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c -@@ -98,21 +98,23 @@ EXPORT_SYMBOL(system_serial_high); +@@ -100,21 +100,23 @@ EXPORT_SYMBOL(system_serial_high); unsigned int elf_hwcap __read_mostly; EXPORT_SYMBOL(elf_hwcap); @@ -2987,7 +3021,7 @@ index 0e1e2b3..c0e821d 100644 EXPORT_SYMBOL(outer_cache); #endif -@@ -245,9 +247,13 @@ static int __get_cpu_architecture(void) +@@ -247,9 +249,13 @@ static int __get_cpu_architecture(void) asm("mrc p15, 0, %0, c0, c1, 4" : "=r" (mmfr0)); if ((mmfr0 & 0x0000000f) >= 0x00000003 || @@ -3003,7 +3037,7 @@ index 0e1e2b3..c0e821d 100644 (mmfr0 & 0x000000f0) == 0x00000020) cpu_arch = CPU_ARCH_ARMv6; else -@@ -571,7 +577,7 @@ static void __init setup_processor(void) +@@ -573,7 +579,7 @@ static void __init setup_processor(void) __cpu_architecture = __get_cpu_architecture(); #ifdef MULTI_CPU @@ -3013,19 +3047,19 @@ index 0e1e2b3..c0e821d 100644 #ifdef MULTI_TLB cpu_tlb = *list->tlb; diff --git a/arch/arm/kernel/signal.c b/arch/arm/kernel/signal.c -index ab33042..11248a8 100644 +index 04d6388..5115238 100644 --- a/arch/arm/kernel/signal.c +++ b/arch/arm/kernel/signal.c -@@ -45,8 +45,6 @@ static const unsigned long sigreturn_codes[7] = { - MOV_R7_NR_RT_SIGRETURN, SWI_SYS_RT_SIGRETURN, SWI_THUMB_RT_SIGRETURN, - }; +@@ -23,8 +23,6 @@ + + extern const unsigned long sigreturn_codes[7]; -static unsigned long signal_return_offset; - #ifdef CONFIG_CRUNCH static int preserve_crunch_context(struct crunch_sigframe __user *frame) { -@@ -411,8 +409,7 @@ setup_return(struct pt_regs *regs, struct ksignal *ksig, +@@ -395,8 +393,7 @@ setup_return(struct pt_regs *regs, struct ksignal *ksig, * except when the MPU has protected the vectors * page from PL0 */ @@ -3035,7 +3069,7 @@ index ab33042..11248a8 100644 } else #endif { -@@ -616,33 +613,3 @@ do_work_pending(struct pt_regs *regs, unsigned int thread_flags, int syscall) +@@ -600,33 +597,3 @@ do_work_pending(struct pt_regs *regs, unsigned int thread_flags, int syscall) } while (thread_flags & _TIF_WORK_MASK); return 0; } @@ -3070,10 +3104,10 @@ index ab33042..11248a8 100644 - return page; -} diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c -index 72024ea..ae302dd 100644 +index dc894ab..f929a0d 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c -@@ -70,7 +70,7 @@ enum ipi_msg_type { +@@ -73,7 +73,7 @@ enum ipi_msg_type { static DECLARE_COMPLETION(cpu_running); @@ -3083,10 +3117,10 @@ index 72024ea..ae302dd 100644 void __init smp_set_ops(struct smp_operations *ops) { diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c -index 8fcda14..4512b9d 100644 +index 4636d56..ce4ec3d 100644 --- a/arch/arm/kernel/traps.c +++ b/arch/arm/kernel/traps.c -@@ -55,7 +55,7 @@ static void dump_mem(const char *, const char *, unsigned long, unsigned long); +@@ -62,7 +62,7 @@ static void dump_mem(const char *, const char *, unsigned long, unsigned long); void dump_backtrace_entry(unsigned long where, unsigned long from, unsigned long frame) { #ifdef CONFIG_KALLSYMS @@ -3095,7 +3129,7 @@ index 8fcda14..4512b9d 100644 #else printk("Function entered at [<%08lx>] from [<%08lx>]\n", where, from); #endif -@@ -257,6 +257,8 @@ static arch_spinlock_t die_lock = __ARCH_SPIN_LOCK_UNLOCKED; +@@ -264,6 +264,8 @@ static arch_spinlock_t die_lock = __ARCH_SPIN_LOCK_UNLOCKED; static int die_owner = -1; static unsigned int die_nest_count; @@ -3104,7 +3138,7 @@ index 8fcda14..4512b9d 100644 static unsigned long oops_begin(void) { int cpu; -@@ -299,6 +301,9 @@ static void oops_end(unsigned long flags, struct pt_regs *regs, int signr) +@@ -306,6 +308,9 @@ static void oops_end(unsigned long flags, struct pt_regs *regs, int signr) panic("Fatal exception in interrupt"); if (panic_on_oops) panic("Fatal exception"); @@ -3114,7 +3148,7 @@ index 8fcda14..4512b9d 100644 if (signr) do_exit(signr); } -@@ -628,7 +633,9 @@ asmlinkage int arm_syscall(int no, struct pt_regs *regs) +@@ -642,7 +647,9 @@ asmlinkage int arm_syscall(int no, struct pt_regs *regs) * The user helper at 0xffff0fe0 must be used instead. * (see entry-armv.S for details) */ @@ -3124,7 +3158,7 @@ index 8fcda14..4512b9d 100644 } return 0; -@@ -885,7 +892,11 @@ void __init early_trap_init(void *vectors_base) +@@ -899,7 +906,11 @@ void __init early_trap_init(void *vectors_base) kuser_init(vectors_base); flush_icache_range(vectors, vectors + PAGE_SIZE * 2); @@ -3208,7 +3242,7 @@ index 7bcee5c..e2f3249 100644 __data_loc = .; #endif diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c -index 9c697db..115237f 100644 +index 2a700e0..745b980 100644 --- a/arch/arm/kvm/arm.c +++ b/arch/arm/kvm/arm.c @@ -56,7 +56,7 @@ static unsigned long hyp_default_vectors; @@ -3220,7 +3254,7 @@ index 9c697db..115237f 100644 static u8 kvm_next_vmid; static DEFINE_SPINLOCK(kvm_vmid_lock); -@@ -396,7 +396,7 @@ void force_vm_exit(const cpumask_t *mask) +@@ -397,7 +397,7 @@ void force_vm_exit(const cpumask_t *mask) */ static bool need_new_vmid_gen(struct kvm *kvm) { @@ -3229,7 +3263,7 @@ index 9c697db..115237f 100644 } /** -@@ -429,7 +429,7 @@ static void update_vttbr(struct kvm *kvm) +@@ -430,7 +430,7 @@ static void update_vttbr(struct kvm *kvm) /* First user of a new VMID generation? */ if (unlikely(kvm_next_vmid == 0)) { @@ -3238,7 +3272,7 @@ index 9c697db..115237f 100644 kvm_next_vmid = 1; /* -@@ -446,7 +446,7 @@ static void update_vttbr(struct kvm *kvm) +@@ -447,7 +447,7 @@ static void update_vttbr(struct kvm *kvm) kvm_call_hyp(__kvm_flush_vm_context); } @@ -3372,10 +3406,10 @@ index 5306de3..aed6d03 100644 .const_udelay = __loop_const_udelay, .udelay = __loop_udelay, diff --git a/arch/arm/lib/uaccess_with_memcpy.c b/arch/arm/lib/uaccess_with_memcpy.c -index 025f742..a9e5b3b 100644 +index 3e58d71..029817c 100644 --- a/arch/arm/lib/uaccess_with_memcpy.c +++ b/arch/arm/lib/uaccess_with_memcpy.c -@@ -104,7 +104,7 @@ out: +@@ -136,7 +136,7 @@ out: } unsigned long @@ -3384,7 +3418,7 @@ index 025f742..a9e5b3b 100644 { /* * This test is stubbed out of the main function above to keep -@@ -155,7 +155,7 @@ out: +@@ -190,7 +190,7 @@ out: return n; } @@ -3394,7 +3428,7 @@ index 025f742..a9e5b3b 100644 /* See rational for this in __copy_to_user() above. */ if (n < 64) diff --git a/arch/arm/mach-kirkwood/common.c b/arch/arm/mach-kirkwood/common.c -index 1767611..d2e7e24 100644 +index f3407a5..bd4256f 100644 --- a/arch/arm/mach-kirkwood/common.c +++ b/arch/arm/mach-kirkwood/common.c @@ -156,7 +156,16 @@ static void clk_gate_fn_disable(struct clk_hw *hw) @@ -3444,7 +3478,7 @@ index 827d1500..2885dc6 100644 }; diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c -index 579697a..1d5a3b2 100644 +index d24926e..a7645a6 100644 --- a/arch/arm/mach-omap2/gpmc.c +++ b/arch/arm/mach-omap2/gpmc.c @@ -148,7 +148,6 @@ struct omap3_gpmc_regs { @@ -3513,10 +3547,10 @@ index f991016..145ebeb 100644 .resume = dummy_cpu_resume, .scu_prepare = dummy_scu_prepare, diff --git a/arch/arm/mach-omap2/omap-wakeupgen.c b/arch/arm/mach-omap2/omap-wakeupgen.c -index 813c615..ce467c6 100644 +index 3664562..72f85c6 100644 --- a/arch/arm/mach-omap2/omap-wakeupgen.c +++ b/arch/arm/mach-omap2/omap-wakeupgen.c -@@ -339,7 +339,7 @@ static int irq_cpu_hotplug_notify(struct notifier_block *self, +@@ -343,7 +343,7 @@ static int irq_cpu_hotplug_notify(struct notifier_block *self, return NOTIFY_OK; } @@ -3526,10 +3560,10 @@ index 813c615..ce467c6 100644 }; diff --git a/arch/arm/mach-omap2/omap_device.c b/arch/arm/mach-omap2/omap_device.c -index 53f0735..5b54eb6 100644 +index e0a398c..a470fa5 100644 --- a/arch/arm/mach-omap2/omap_device.c +++ b/arch/arm/mach-omap2/omap_device.c -@@ -504,7 +504,7 @@ void omap_device_delete(struct omap_device *od) +@@ -508,7 +508,7 @@ void omap_device_delete(struct omap_device *od) struct platform_device __init *omap_device_build(const char *pdev_name, int pdev_id, struct omap_hwmod *oh, @@ -3538,7 +3572,7 @@ index 53f0735..5b54eb6 100644 { struct omap_hwmod *ohs[] = { oh }; -@@ -532,7 +532,7 @@ struct platform_device __init *omap_device_build(const char *pdev_name, +@@ -536,7 +536,7 @@ struct platform_device __init *omap_device_build(const char *pdev_name, struct platform_device __init *omap_device_build_ss(const char *pdev_name, int pdev_id, struct omap_hwmod **ohs, @@ -3548,10 +3582,10 @@ index 53f0735..5b54eb6 100644 { int ret = -ENOMEM; diff --git a/arch/arm/mach-omap2/omap_device.h b/arch/arm/mach-omap2/omap_device.h -index 17ca1ae..beba869 100644 +index 78c02b3..c94109a 100644 --- a/arch/arm/mach-omap2/omap_device.h +++ b/arch/arm/mach-omap2/omap_device.h -@@ -71,12 +71,12 @@ int omap_device_idle(struct platform_device *pdev); +@@ -72,12 +72,12 @@ int omap_device_idle(struct platform_device *pdev); /* Core code interface */ struct platform_device *omap_device_build(const char *pdev_name, int pdev_id, @@ -3567,7 +3601,7 @@ index 17ca1ae..beba869 100644 struct omap_device *omap_device_alloc(struct platform_device *pdev, struct omap_hwmod **ohs, int oh_cnt); diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c -index 3d5db8c..ddfa144 100644 +index 8a1b5e0..5f30074 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c @@ -194,10 +194,10 @@ struct omap_hwmod_soc_ops { @@ -3583,6 +3617,29 @@ index 3d5db8c..ddfa144 100644 /* omap_hwmod_list contains all registered struct omap_hwmods */ static LIST_HEAD(omap_hwmod_list); +diff --git a/arch/arm/mach-omap2/powerdomains43xx_data.c b/arch/arm/mach-omap2/powerdomains43xx_data.c +index 95fee54..cfa9cf1 100644 +--- a/arch/arm/mach-omap2/powerdomains43xx_data.c ++++ b/arch/arm/mach-omap2/powerdomains43xx_data.c +@@ -10,6 +10,7 @@ + + #include + #include ++#include + + #include "powerdomain.h" + +@@ -129,7 +130,9 @@ static int am43xx_check_vcvp(void) + + void __init am43xx_powerdomains_init(void) + { +- omap4_pwrdm_operations.pwrdm_has_voltdm = am43xx_check_vcvp; ++ pax_open_kernel(); ++ *(void **)&omap4_pwrdm_operations.pwrdm_has_voltdm = am43xx_check_vcvp; ++ pax_close_kernel(); + pwrdm_register_platform_funcs(&omap4_pwrdm_operations); + pwrdm_register_pwrdms(powerdomains_am43xx); + pwrdm_complete_init(); diff --git a/arch/arm/mach-omap2/wd_timer.c b/arch/arm/mach-omap2/wd_timer.c index d15c7bb..b2d1f0c 100644 --- a/arch/arm/mach-omap2/wd_timer.c @@ -3621,10 +3678,10 @@ index b82dcae..44ee5b6 100644 cpuidle_coupled_parallel_barrier(dev, &abort_barrier); diff --git a/arch/arm/mach-ux500/setup.h b/arch/arm/mach-ux500/setup.h -index 656324a..0beba28 100644 +index bdb3564..cebb96f 100644 --- a/arch/arm/mach-ux500/setup.h +++ b/arch/arm/mach-ux500/setup.h -@@ -40,13 +40,6 @@ extern void ux500_timer_init(void); +@@ -39,13 +39,6 @@ extern void ux500_timer_init(void); .type = MT_DEVICE, \ } @@ -3639,7 +3696,7 @@ index 656324a..0beba28 100644 extern void ux500_cpu_die(unsigned int cpu); diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig -index cd2c88e..4dd9b67 100644 +index 1f8fed9..14d7823 100644 --- a/arch/arm/mm/Kconfig +++ b/arch/arm/mm/Kconfig @@ -446,7 +446,7 @@ config CPU_32v5 @@ -3677,10 +3734,10 @@ index cd2c88e..4dd9b67 100644 If all of the binaries and libraries which run on your platform diff --git a/arch/arm/mm/alignment.c b/arch/arm/mm/alignment.c -index 6f4585b..7b6f52b 100644 +index 9240364..a2b8cf3 100644 --- a/arch/arm/mm/alignment.c +++ b/arch/arm/mm/alignment.c -@@ -211,10 +211,12 @@ union offset_union { +@@ -212,10 +212,12 @@ union offset_union { #define __get16_unaligned_check(ins,val,addr) \ do { \ unsigned int err = 0, v, a = addr; \ @@ -3693,7 +3750,7 @@ index 6f4585b..7b6f52b 100644 if (err) \ goto fault; \ } while (0) -@@ -228,6 +230,7 @@ union offset_union { +@@ -229,6 +231,7 @@ union offset_union { #define __get32_unaligned_check(ins,val,addr) \ do { \ unsigned int err = 0, v, a = addr; \ @@ -3701,7 +3758,7 @@ index 6f4585b..7b6f52b 100644 __get8_unaligned_check(ins,v,a,err); \ val = v << ((BE) ? 24 : 0); \ __get8_unaligned_check(ins,v,a,err); \ -@@ -236,6 +239,7 @@ union offset_union { +@@ -237,6 +240,7 @@ union offset_union { val |= v << ((BE) ? 8 : 16); \ __get8_unaligned_check(ins,v,a,err); \ val |= v << ((BE) ? 0 : 24); \ @@ -3709,7 +3766,7 @@ index 6f4585b..7b6f52b 100644 if (err) \ goto fault; \ } while (0) -@@ -249,6 +253,7 @@ union offset_union { +@@ -250,6 +254,7 @@ union offset_union { #define __put16_unaligned_check(ins,val,addr) \ do { \ unsigned int err = 0, v = val, a = addr; \ @@ -3717,7 +3774,7 @@ index 6f4585b..7b6f52b 100644 __asm__( FIRST_BYTE_16 \ ARM( "1: "ins" %1, [%2], #1\n" ) \ THUMB( "1: "ins" %1, [%2]\n" ) \ -@@ -268,6 +273,7 @@ union offset_union { +@@ -269,6 +274,7 @@ union offset_union { " .popsection\n" \ : "=r" (err), "=&r" (v), "=&r" (a) \ : "0" (err), "1" (v), "2" (a)); \ @@ -3725,7 +3782,7 @@ index 6f4585b..7b6f52b 100644 if (err) \ goto fault; \ } while (0) -@@ -281,6 +287,7 @@ union offset_union { +@@ -282,6 +288,7 @@ union offset_union { #define __put32_unaligned_check(ins,val,addr) \ do { \ unsigned int err = 0, v = val, a = addr; \ @@ -3733,7 +3790,7 @@ index 6f4585b..7b6f52b 100644 __asm__( FIRST_BYTE_32 \ ARM( "1: "ins" %1, [%2], #1\n" ) \ THUMB( "1: "ins" %1, [%2]\n" ) \ -@@ -310,6 +317,7 @@ union offset_union { +@@ -311,6 +318,7 @@ union offset_union { " .popsection\n" \ : "=r" (err), "=&r" (v), "=&r" (a) \ : "0" (err), "1" (v), "2" (a)); \ @@ -4047,7 +4104,7 @@ index cf08bdf..772656c 100644 unsigned long search_exception_table(unsigned long addr); diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c -index 18ec4c5..479bb6a 100644 +index 3e8f106..a0a1fe4 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c @@ -30,6 +30,8 @@ @@ -4059,7 +4116,7 @@ index 18ec4c5..479bb6a 100644 #include #include -@@ -684,7 +686,46 @@ void free_initmem(void) +@@ -681,7 +683,46 @@ void free_initmem(void) { #ifdef CONFIG_HAVE_TCM extern char __tcm_start, __tcm_end; @@ -4123,7 +4180,7 @@ index f123d6e..04bf569 100644 return __arm_ioremap_caller(phys_addr, size, mtype, __builtin_return_address(0)); diff --git a/arch/arm/mm/mmap.c b/arch/arm/mm/mmap.c -index 0c63562..7128a90 100644 +index 5e85ed3..b10a7ed 100644 --- a/arch/arm/mm/mmap.c +++ b/arch/arm/mm/mmap.c @@ -59,6 +59,7 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr, @@ -4234,10 +4291,10 @@ index 0c63562..7128a90 100644 } } diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c -index b1d17ee..7a6f4d3 100644 +index 580ef2d..2da06ca 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c -@@ -36,6 +36,22 @@ +@@ -38,6 +38,22 @@ #include "mm.h" #include "tcm.h" @@ -4260,7 +4317,7 @@ index b1d17ee..7a6f4d3 100644 /* * empty_zero_page is a special page that is used for * zero-initialized data and COW. -@@ -228,10 +244,18 @@ __setup("noalign", noalign_setup); +@@ -230,10 +246,18 @@ __setup("noalign", noalign_setup); #endif /* ifdef CONFIG_CPU_CP15 / else */ @@ -4281,7 +4338,7 @@ index b1d17ee..7a6f4d3 100644 [MT_DEVICE] = { /* Strongly ordered / ARMv6 shared device */ .prot_pte = PROT_PTE_DEVICE | L_PTE_MT_DEV_SHARED | L_PTE_SHARED, -@@ -260,16 +284,16 @@ static struct mem_type mem_types[] = { +@@ -262,16 +286,16 @@ static struct mem_type mem_types[] = { [MT_UNCACHED] = { .prot_pte = PROT_PTE_DEVICE, .prot_l1 = PMD_TYPE_TABLE, @@ -4301,7 +4358,7 @@ index b1d17ee..7a6f4d3 100644 .domain = DOMAIN_KERNEL, }, #endif -@@ -277,36 +301,54 @@ static struct mem_type mem_types[] = { +@@ -279,36 +303,54 @@ static struct mem_type mem_types[] = { .prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY | L_PTE_RDONLY, .prot_l1 = PMD_TYPE_TABLE, @@ -4364,7 +4421,7 @@ index b1d17ee..7a6f4d3 100644 .domain = DOMAIN_KERNEL, }, [MT_MEMORY_ITCM] = { -@@ -316,10 +358,10 @@ static struct mem_type mem_types[] = { +@@ -318,10 +360,10 @@ static struct mem_type mem_types[] = { }, [MT_MEMORY_SO] = { .prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY | @@ -4377,7 +4434,7 @@ index b1d17ee..7a6f4d3 100644 .domain = DOMAIN_KERNEL, }, [MT_MEMORY_DMA_READY] = { -@@ -405,9 +447,35 @@ static void __init build_mem_type_table(void) +@@ -407,9 +449,35 @@ static void __init build_mem_type_table(void) * to prevent speculative instruction fetches. */ mem_types[MT_DEVICE].prot_sect |= PMD_SECT_XN; @@ -4413,7 +4470,7 @@ index b1d17ee..7a6f4d3 100644 } if (cpu_arch >= CPU_ARCH_ARMv7 && (cr & CR_TRE)) { /* -@@ -468,6 +536,9 @@ static void __init build_mem_type_table(void) +@@ -470,6 +538,9 @@ static void __init build_mem_type_table(void) * from SVC mode and no access from userspace. */ mem_types[MT_ROM].prot_sect |= PMD_SECT_APX|PMD_SECT_AP_WRITE; @@ -4423,7 +4480,7 @@ index b1d17ee..7a6f4d3 100644 mem_types[MT_MINICLEAN].prot_sect |= PMD_SECT_APX|PMD_SECT_AP_WRITE; mem_types[MT_CACHECLEAN].prot_sect |= PMD_SECT_APX|PMD_SECT_AP_WRITE; #endif -@@ -485,11 +556,17 @@ static void __init build_mem_type_table(void) +@@ -487,11 +558,17 @@ static void __init build_mem_type_table(void) mem_types[MT_DEVICE_WC].prot_pte |= L_PTE_SHARED; mem_types[MT_DEVICE_CACHED].prot_sect |= PMD_SECT_S; mem_types[MT_DEVICE_CACHED].prot_pte |= L_PTE_SHARED; @@ -4445,7 +4502,7 @@ index b1d17ee..7a6f4d3 100644 } } -@@ -500,15 +577,20 @@ static void __init build_mem_type_table(void) +@@ -502,15 +579,20 @@ static void __init build_mem_type_table(void) if (cpu_arch >= CPU_ARCH_ARMv6) { if (cpu_arch >= CPU_ARCH_ARMv7 && (cr & CR_TRE)) { /* Non-cacheable Normal is XCB = 001 */ @@ -4469,7 +4526,7 @@ index b1d17ee..7a6f4d3 100644 } #ifdef CONFIG_ARM_LPAE -@@ -524,6 +606,8 @@ static void __init build_mem_type_table(void) +@@ -526,6 +608,8 @@ static void __init build_mem_type_table(void) vecs_pgprot |= PTE_EXT_AF; #endif @@ -4478,7 +4535,7 @@ index b1d17ee..7a6f4d3 100644 for (i = 0; i < 16; i++) { pteval_t v = pgprot_val(protection_map[i]); protection_map[i] = __pgprot(v | user_pgprot); -@@ -541,10 +625,15 @@ static void __init build_mem_type_table(void) +@@ -543,10 +627,15 @@ static void __init build_mem_type_table(void) mem_types[MT_LOW_VECTORS].prot_l1 |= ecc_mask; mem_types[MT_HIGH_VECTORS].prot_l1 |= ecc_mask; @@ -4497,7 +4554,7 @@ index b1d17ee..7a6f4d3 100644 mem_types[MT_ROM].prot_sect |= cp->pmd; switch (cp->pmd) { -@@ -1186,18 +1275,15 @@ void __init arm_mm_memblock_reserve(void) +@@ -1188,18 +1277,15 @@ void __init arm_mm_memblock_reserve(void) * called function. This means you can't use any function or debugging * method which may touch any device, otherwise the kernel _will_ crash. */ @@ -4520,7 +4577,7 @@ index b1d17ee..7a6f4d3 100644 for (addr = VMALLOC_START; addr; addr += PMD_SIZE) pmd_clear(pmd_off_k(addr)); -@@ -1237,7 +1323,7 @@ static void __init devicemaps_init(const struct machine_desc *mdesc) +@@ -1239,7 +1325,7 @@ static void __init devicemaps_init(const struct machine_desc *mdesc) * location (0xffff0000). If we aren't using high-vectors, also * create a mapping at the low-vectors virtual address. */ @@ -4529,7 +4586,7 @@ index b1d17ee..7a6f4d3 100644 map.virtual = 0xffff0000; map.length = PAGE_SIZE; #ifdef CONFIG_KUSER_HELPERS -@@ -1309,8 +1395,39 @@ static void __init map_lowmem(void) +@@ -1311,8 +1397,39 @@ static void __init map_lowmem(void) map.pfn = __phys_to_pfn(start); map.virtual = __phys_to_virt(start); map.length = end - start; @@ -4846,7 +4903,7 @@ index f4ca594..adc72fd6 100644 #define __cacheline_aligned __aligned(L1_CACHE_BYTES) #define ____cacheline_aligned __aligned(L1_CACHE_BYTES) diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig -index 7740ab1..17fa8c5 100644 +index 4e4119b..dd7de0a 100644 --- a/arch/ia64/Kconfig +++ b/arch/ia64/Kconfig @@ -554,6 +554,7 @@ source "drivers/sn/Kconfig" @@ -4918,7 +4975,7 @@ index 5a83c5c..4d7f553 100644 /* IA-64 relocations: */ diff --git a/arch/ia64/include/asm/pgalloc.h b/arch/ia64/include/asm/pgalloc.h -index 96a8d92..617a1cf 100644 +index 5767cdf..7462574 100644 --- a/arch/ia64/include/asm/pgalloc.h +++ b/arch/ia64/include/asm/pgalloc.h @@ -39,6 +39,12 @@ pgd_populate(struct mm_struct *mm, pgd_t * pgd_entry, pud_t * pud) @@ -5277,7 +5334,7 @@ index 68232db..6ca80af 100644 } diff --git a/arch/ia64/mm/init.c b/arch/ia64/mm/init.c -index b6f7f43..c04320d 100644 +index 88504ab..cbb6c9f 100644 --- a/arch/ia64/mm/init.c +++ b/arch/ia64/mm/init.c @@ -120,6 +120,19 @@ ia64_init_addr_space (void) @@ -5388,10 +5445,10 @@ index 4efe96a..60e8699 100644 #define SMP_CACHE_BYTES L1_CACHE_BYTES diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig -index f75ab4a..adc6968 100644 +index 650de39..6982b02 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig -@@ -2283,6 +2283,7 @@ source "kernel/Kconfig.preempt" +@@ -2268,6 +2268,7 @@ source "kernel/Kconfig.preempt" config KEXEC bool "Kexec system call" @@ -5400,7 +5457,7 @@ index f75ab4a..adc6968 100644 kexec is a system call that implements the ability to shutdown your current kernel, and to start another kernel. It is like a reboot diff --git a/arch/mips/include/asm/atomic.h b/arch/mips/include/asm/atomic.h -index 08b6079..8b554d2 100644 +index 7eed2f2..c4e385d 100644 --- a/arch/mips/include/asm/atomic.h +++ b/arch/mips/include/asm/atomic.h @@ -21,15 +21,39 @@ @@ -6324,10 +6381,10 @@ index b4db69f..8f3b093 100644 #define SMP_CACHE_SHIFT L1_CACHE_SHIFT #define SMP_CACHE_BYTES L1_CACHE_BYTES diff --git a/arch/mips/include/asm/elf.h b/arch/mips/include/asm/elf.h -index cf3ae24..238d22f 100644 +index a66359e..d3d474a 100644 --- a/arch/mips/include/asm/elf.h +++ b/arch/mips/include/asm/elf.h -@@ -372,13 +372,16 @@ extern const char *__elf_platform; +@@ -373,13 +373,16 @@ extern const char *__elf_platform; #define ELF_ET_DYN_BASE (TASK_SIZE / 3 * 2) #endif @@ -6465,7 +6522,7 @@ index f6be474..12ad554 100644 typedef struct { unsigned long long pte; } pte_t; #define pte_val(x) ((x).pte) diff --git a/arch/mips/include/asm/pgalloc.h b/arch/mips/include/asm/pgalloc.h -index 881d18b..cea38bc 100644 +index b336037..5b874cc 100644 --- a/arch/mips/include/asm/pgalloc.h +++ b/arch/mips/include/asm/pgalloc.h @@ -37,6 +37,11 @@ static inline void pud_populate(struct mm_struct *mm, pud_t *pud, pmd_t *pmd) @@ -6493,43 +6550,44 @@ index 25da651..ae2a259 100644 #endif /* __ASM_SMTC_PROC_H */ diff --git a/arch/mips/include/asm/thread_info.h b/arch/mips/include/asm/thread_info.h -index 61215a3..213ee0e 100644 +index 4f58ef6..5e7081b 100644 --- a/arch/mips/include/asm/thread_info.h +++ b/arch/mips/include/asm/thread_info.h -@@ -116,6 +116,8 @@ static inline struct thread_info *current_thread_info(void) - #define TIF_32BIT_ADDR 23 /* 32-bit address space (o32/n32) */ +@@ -115,6 +115,8 @@ static inline struct thread_info *current_thread_info(void) #define TIF_FPUBOUND 24 /* thread bound to FPU-full CPU set */ #define TIF_LOAD_WATCH 25 /* If set, load watch registers */ + #define TIF_SYSCALL_TRACEPOINT 26 /* syscall tracepoint instrumentation */ +/* li takes a 32bit immediate */ +#define TIF_GRSEC_SETXID 29 /* update credentials on syscall entry/exit */ #define TIF_SYSCALL_TRACE 31 /* syscall trace active */ #define _TIF_SYSCALL_TRACE (1<work.syscall_trace -@@ -540,6 +544,11 @@ asmlinkage void syscall_trace_enter(struct pt_regs *regs) - /* do the secure computing check first */ - secure_computing_strict(regs->regs[2]); +@@ -668,6 +672,11 @@ asmlinkage void syscall_trace_enter(struct pt_regs *regs) + tracehook_report_syscall_entry(regs)) + ret = -1; +#ifdef CONFIG_GRKERNSEC_SETXID + if (unlikely(test_and_clear_thread_flag(TIF_GRSEC_SETXID))) + gr_delayed_cred_worker(); +#endif + - if (!(current->ptrace & PT_PTRACED)) - goto out; + if (unlikely(test_thread_flag(TIF_SYSCALL_TRACEPOINT))) + trace_sys_enter(regs, regs->regs[2]); diff --git a/arch/mips/kernel/smtc-proc.c b/arch/mips/kernel/smtc-proc.c index c10aa84..9ec2e60 100644 @@ -6752,10 +6810,10 @@ index 84536bf..79caa4d 100644 } /* Arrange for an interrupt in a short while */ diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c -index 524841f..3eef41e 100644 +index f9c8746..78b64e3 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c -@@ -684,7 +684,18 @@ asmlinkage void do_ov(struct pt_regs *regs) +@@ -690,7 +690,18 @@ asmlinkage void do_ov(struct pt_regs *regs) siginfo_t info; prev_state = exception_enter(); @@ -7076,7 +7134,7 @@ index ad2b503..bdf1651 100644 instruction set this CPU supports. This could be done in user space, but it's not easy, and we've already done it here. */ diff --git a/arch/parisc/include/asm/pgalloc.h b/arch/parisc/include/asm/pgalloc.h -index fc987a1..6e068ef 100644 +index f213f5b..0af3e8e 100644 --- a/arch/parisc/include/asm/pgalloc.h +++ b/arch/parisc/include/asm/pgalloc.h @@ -61,6 +61,11 @@ static inline void pgd_populate(struct mm_struct *mm, pgd_t *pgd, pmd_t *pmd) @@ -7122,10 +7180,10 @@ index 34899b5..02dd060 100644 #define PAGE_KERNEL_EXEC __pgprot(_PAGE_KERNEL_EXEC) #define PAGE_KERNEL_RWX __pgprot(_PAGE_KERNEL_RWX) diff --git a/arch/parisc/include/asm/uaccess.h b/arch/parisc/include/asm/uaccess.h -index e0a8235..ce2f1e1 100644 +index 4006964..fcb3cc2 100644 --- a/arch/parisc/include/asm/uaccess.h +++ b/arch/parisc/include/asm/uaccess.h -@@ -245,10 +245,10 @@ static inline unsigned long __must_check copy_from_user(void *to, +@@ -246,10 +246,10 @@ static inline unsigned long __must_check copy_from_user(void *to, const void __user *from, unsigned long n) { @@ -7139,7 +7197,7 @@ index e0a8235..ce2f1e1 100644 else copy_from_user_overflow(); diff --git a/arch/parisc/kernel/module.c b/arch/parisc/kernel/module.c -index 2a625fb..9908930 100644 +index 50dfafc..b9fc230 100644 --- a/arch/parisc/kernel/module.c +++ b/arch/parisc/kernel/module.c @@ -98,16 +98,38 @@ @@ -7242,7 +7300,7 @@ index 2a625fb..9908930 100644 DEBUGP("register_unwind_table(), sect = %d at 0x%p - 0x%p (gp=0x%lx)\n", me->arch.unwind_section, table, end, gp); diff --git a/arch/parisc/kernel/sys_parisc.c b/arch/parisc/kernel/sys_parisc.c -index 5dfd248..64914ac 100644 +index 0d3a9d4..20a99b0 100644 --- a/arch/parisc/kernel/sys_parisc.c +++ b/arch/parisc/kernel/sys_parisc.c @@ -33,9 +33,11 @@ @@ -7250,11 +7308,11 @@ index 5dfd248..64914ac 100644 #include -static unsigned long get_unshared_area(unsigned long addr, unsigned long len) -+static unsigned long get_unshared_area(struct file *filp, unsigned long addr, unsigned long len, ++static unsigned long get_unshared_area(unsigned long addr, unsigned long len, + unsigned long flags) { struct vm_unmapped_area_info info; -+ unsigned long offset = gr_rand_threadstack_offset(current->mm, filp, flags); ++ unsigned long offset = gr_rand_threadstack_offset(current->mm, NULL, flags); info.flags = 0; info.length = len; @@ -7266,29 +7324,27 @@ index 5dfd248..64914ac 100644 return vm_unmapped_area(&info); } -@@ -61,10 +64,11 @@ static int get_offset(struct address_space *mapping) - return (unsigned long) mapping >> 8; +@@ -69,9 +72,10 @@ static unsigned long shared_align_offset(struct file *filp, unsigned long pgoff) } --static unsigned long get_shared_area(struct address_space *mapping, -- unsigned long addr, unsigned long len, unsigned long pgoff) -+static unsigned long get_shared_area(struct file *filp, struct address_space *mapping, -+ unsigned long addr, unsigned long len, unsigned long pgoff, unsigned long flags) + static unsigned long get_shared_area(struct file *filp, unsigned long addr, +- unsigned long len, unsigned long pgoff) ++ unsigned long len, unsigned long pgoff, unsigned long flags) { struct vm_unmapped_area_info info; + unsigned long offset = gr_rand_threadstack_offset(current->mm, filp, flags); info.flags = 0; info.length = len; -@@ -72,6 +76,7 @@ static unsigned long get_shared_area(struct address_space *mapping, +@@ -79,6 +83,7 @@ static unsigned long get_shared_area(struct file *filp, unsigned long addr, info.high_limit = TASK_SIZE; info.align_mask = PAGE_MASK & (SHMLBA - 1); - info.align_offset = (get_offset(mapping) + pgoff) << PAGE_SHIFT; + info.align_offset = shared_align_offset(filp, pgoff); + info.threadstack_offset = offset; return vm_unmapped_area(&info); } -@@ -86,15 +91,22 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, +@@ -93,13 +98,20 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, return -EINVAL; return addr; } @@ -7303,16 +7359,13 @@ index 5dfd248..64914ac 100644 + + } + - if (filp) { -- addr = get_shared_area(filp->f_mapping, addr, len, pgoff); -+ addr = get_shared_area(filp, filp->f_mapping, addr, len, pgoff, flags); - } else if(flags & MAP_SHARED) { -- addr = get_shared_area(NULL, addr, len, pgoff); -+ addr = get_shared_area(filp, NULL, addr, len, pgoff, flags); - } else { + if (filp || (flags & MAP_SHARED)) +- addr = get_shared_area(filp, addr, len, pgoff); ++ addr = get_shared_area(filp, addr, len, pgoff, flags); + else - addr = get_unshared_area(addr, len); -+ addr = get_unshared_area(filp, addr, len, flags); - } ++ addr = get_unshared_area(addr, len, flags); + return addr; } diff --git a/arch/parisc/kernel/traps.c b/arch/parisc/kernel/traps.c @@ -7331,7 +7384,7 @@ index 1cd1d0c..44ec918 100644 fault_space = regs->iasq[0]; diff --git a/arch/parisc/mm/fault.c b/arch/parisc/mm/fault.c -index 0293588..3b229aa 100644 +index 9d08c71..e2b4d20 100644 --- a/arch/parisc/mm/fault.c +++ b/arch/parisc/mm/fault.c @@ -15,6 +15,7 @@ @@ -7468,7 +7521,7 @@ index 0293588..3b229aa 100644 int fixup_exception(struct pt_regs *regs) { const struct exception_table_entry *fix; -@@ -204,8 +315,33 @@ retry: +@@ -210,8 +321,33 @@ retry: good_area: @@ -7504,10 +7557,10 @@ index 0293588..3b229aa 100644 /* * If for any reason at all we couldn't handle the fault, make diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig -index 38f3b7e..7e485c0 100644 +index b44b52c..4cd253c 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig -@@ -378,6 +378,7 @@ config ARCH_ENABLE_MEMORY_HOTREMOVE +@@ -382,6 +382,7 @@ config ARCH_ENABLE_MEMORY_HOTREMOVE config KEXEC bool "kexec system call" depends on (PPC_BOOK3S || FSL_BOOKE || (44x && !SMP)) @@ -7558,7 +7611,7 @@ index 9e495c9..b6878e5 100644 #define SMP_CACHE_BYTES L1_CACHE_BYTES diff --git a/arch/powerpc/include/asm/elf.h b/arch/powerpc/include/asm/elf.h -index cc0655a..13eac2e 100644 +index 935b5e7..7001d2d 100644 --- a/arch/powerpc/include/asm/elf.h +++ b/arch/powerpc/include/asm/elf.h @@ -28,8 +28,19 @@ @@ -7581,9 +7634,9 @@ index cc0655a..13eac2e 100644 +#endif +#endif - /* - * Our registers are always unsigned longs, whether we're a 32 bit -@@ -123,10 +134,6 @@ extern int arch_setup_additional_pages(struct linux_binprm *bprm, + #define ELF_CORE_EFLAGS (is_elf2_task() ? 2 : 0) + +@@ -127,10 +138,6 @@ extern int arch_setup_additional_pages(struct linux_binprm *bprm, (0x7ff >> (PAGE_SHIFT - 12)) : \ (0x3ffff >> (PAGE_SHIFT - 12))) @@ -7633,7 +7686,7 @@ index 8565c25..2865190 100644 return (vm_flags & VM_SAO) ? __pgprot(_PAGE_SAO) : __pgprot(0); } diff --git a/arch/powerpc/include/asm/page.h b/arch/powerpc/include/asm/page.h -index b9f4262..dcf04f7 100644 +index 32e4e21..62afb12 100644 --- a/arch/powerpc/include/asm/page.h +++ b/arch/powerpc/include/asm/page.h @@ -230,8 +230,9 @@ extern long long virt_phys_offset; @@ -7684,10 +7737,10 @@ index 88693ce..ac6f9ab 100644 #include diff --git a/arch/powerpc/include/asm/pgalloc-64.h b/arch/powerpc/include/asm/pgalloc-64.h -index f65e27b..23ffb5b 100644 +index 4b0be20..c15a27d 100644 --- a/arch/powerpc/include/asm/pgalloc-64.h +++ b/arch/powerpc/include/asm/pgalloc-64.h -@@ -53,6 +53,7 @@ static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd) +@@ -54,6 +54,7 @@ static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd) #ifndef CONFIG_PPC_64K_PAGES #define pgd_populate(MM, PGD, PUD) pgd_set(PGD, PUD) @@ -7695,7 +7748,7 @@ index f65e27b..23ffb5b 100644 static inline pud_t *pud_alloc_one(struct mm_struct *mm, unsigned long addr) { -@@ -70,6 +71,11 @@ static inline void pud_populate(struct mm_struct *mm, pud_t *pud, pmd_t *pmd) +@@ -71,6 +72,11 @@ static inline void pud_populate(struct mm_struct *mm, pud_t *pud, pmd_t *pmd) pud_set(pud, (unsigned long)pmd); } @@ -7707,7 +7760,7 @@ index f65e27b..23ffb5b 100644 #define pmd_populate(mm, pmd, pte_page) \ pmd_populate_kernel(mm, pmd, page_address(pte_page)) #define pmd_populate_kernel(mm, pmd, pte) pmd_set(pmd, (unsigned long)(pte)) -@@ -171,6 +177,7 @@ extern void __tlb_remove_table(void *_table); +@@ -173,6 +179,7 @@ extern void __tlb_remove_table(void *_table); #endif #define pud_populate(mm, pud, pmd) pud_set(pud, (unsigned long)pmd) @@ -7740,10 +7793,10 @@ index 4aad413..85d86bf 100644 #define _PAGE_NO_CACHE 0x020 /* I: cache inhibit */ #define _PAGE_WRITETHRU 0x040 /* W: cache write-through */ diff --git a/arch/powerpc/include/asm/reg.h b/arch/powerpc/include/asm/reg.h -index 10d1ef0..8f83abc 100644 +index fa8388e..f985549 100644 --- a/arch/powerpc/include/asm/reg.h +++ b/arch/powerpc/include/asm/reg.h -@@ -234,6 +234,7 @@ +@@ -239,6 +239,7 @@ #define SPRN_DBCR 0x136 /* e300 Data Breakpoint Control Reg */ #define SPRN_DSISR 0x012 /* Data Storage Interrupt Status Register */ #define DSISR_NOHPTE 0x40000000 /* no translation found */ @@ -7752,10 +7805,10 @@ index 10d1ef0..8f83abc 100644 #define DSISR_ISSTORE 0x02000000 /* access was a store */ #define DSISR_DABRMATCH 0x00400000 /* hit data breakpoint */ diff --git a/arch/powerpc/include/asm/smp.h b/arch/powerpc/include/asm/smp.h -index 98da78e..dc68271 100644 +index 084e080..9415a3d 100644 --- a/arch/powerpc/include/asm/smp.h +++ b/arch/powerpc/include/asm/smp.h -@@ -50,7 +50,7 @@ struct smp_ops_t { +@@ -51,7 +51,7 @@ struct smp_ops_t { int (*cpu_disable)(void); void (*cpu_die)(unsigned int nr); int (*cpu_bootable)(unsigned int nr); @@ -7765,10 +7818,10 @@ index 98da78e..dc68271 100644 extern void smp_send_debugger_break(void); extern void start_secondary_resume(void); diff --git a/arch/powerpc/include/asm/thread_info.h b/arch/powerpc/include/asm/thread_info.h -index ba7b197..d292e26 100644 +index 9854c56..7517190 100644 --- a/arch/powerpc/include/asm/thread_info.h +++ b/arch/powerpc/include/asm/thread_info.h -@@ -93,7 +93,6 @@ static inline struct thread_info *current_thread_info(void) +@@ -91,7 +91,6 @@ static inline struct thread_info *current_thread_info(void) #define TIF_POLLING_NRFLAG 3 /* true if poll_idle() is polling TIF_NEED_RESCHED */ #define TIF_32BIT 4 /* 32 bit binary */ @@ -7776,17 +7829,17 @@ index ba7b197..d292e26 100644 #define TIF_PERFMON_CTXSW 6 /* perfmon needs ctxsw calls */ #define TIF_SYSCALL_AUDIT 7 /* syscall auditing active */ #define TIF_SINGLESTEP 8 /* singlestepping active */ -@@ -107,6 +106,9 @@ static inline struct thread_info *current_thread_info(void) - #define TIF_EMULATE_STACK_STORE 16 /* Is an instruction emulation - for stack store? */ - #define TIF_MEMDIE 17 /* is terminating due to OOM killer */ -+#define TIF_PERFMON_WORK 18 /* work for pfm_handle_work() */ +@@ -108,6 +107,9 @@ static inline struct thread_info *current_thread_info(void) + #if defined(CONFIG_PPC64) + #define TIF_ELF2ABI 18 /* function descriptors must die! */ + #endif ++#define TIF_PERFMON_WORK 19 /* work for pfm_handle_work() */ +/* mask must be expressable within 16 bits to satisfy 'andi' instruction reqs */ +#define TIF_GRSEC_SETXID 5 /* update credentials on syscall entry/exit */ /* as above, but as bit values */ #define _TIF_SYSCALL_TRACE (1<arch.core_plt_section = i; } if (!me->arch.core_plt_section || !me->arch.init_plt_section) { @@ -8021,7 +8074,7 @@ index 2e3200c..72095ce 100644 return -ENOEXEC; } -@@ -192,11 +192,16 @@ static uint32_t do_plt_call(void *location, +@@ -191,11 +191,16 @@ static uint32_t do_plt_call(void *location, DEBUGP("Doing plt for call to 0x%x at 0x%x\n", val, (unsigned int)location); /* Init, or core PLT? */ @@ -8041,11 +8094,20 @@ index 2e3200c..72095ce 100644 /* Find this entry, or if that fails, the next avail. entry */ while (entry->jump[0]) { +@@ -299,7 +304,7 @@ int apply_relocate_add(Elf32_Shdr *sechdrs, + } + #ifdef CONFIG_DYNAMIC_FTRACE + module->arch.tramp = +- do_plt_call(module->module_core, ++ do_plt_call(module->module_core_rx, + (unsigned long)ftrace_caller, + sechdrs, module); + #endif diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c -index 96d2fdf..f6d10c8 100644 +index 4a96556..dd95f6c 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c -@@ -886,8 +886,8 @@ void show_regs(struct pt_regs * regs) +@@ -888,8 +888,8 @@ void show_regs(struct pt_regs * regs) * Lookup NIP late so we have the best change of getting the * above info out without failing */ @@ -8054,9 +8116,9 @@ index 96d2fdf..f6d10c8 100644 + printk("NIP ["REG"] %pA\n", regs->nip, (void *)regs->nip); + printk("LR ["REG"] %pA\n", regs->link, (void *)regs->link); #endif - #ifdef CONFIG_PPC_TRANSACTIONAL_MEM - printk("PACATMSCRATCH [%llx]\n", get_paca()->tm_scratch); -@@ -1352,10 +1352,10 @@ void show_stack(struct task_struct *tsk, unsigned long *stack) + show_stack(current, (unsigned long *) regs->gpr[1]); + if (!user_mode(regs)) +@@ -1376,10 +1376,10 @@ void show_stack(struct task_struct *tsk, unsigned long *stack) newsp = stack[0]; ip = stack[STACK_FRAME_LR_SAVE]; if (!firstframe || ip != lr) { @@ -8069,7 +8131,7 @@ index 96d2fdf..f6d10c8 100644 (void *)current->ret_stack[curr_frame].ret); curr_frame--; } -@@ -1375,7 +1375,7 @@ void show_stack(struct task_struct *tsk, unsigned long *stack) +@@ -1399,7 +1399,7 @@ void show_stack(struct task_struct *tsk, unsigned long *stack) struct pt_regs *regs = (struct pt_regs *) (sp + STACK_FRAME_OVERHEAD); lr = regs->link; @@ -8078,7 +8140,7 @@ index 96d2fdf..f6d10c8 100644 regs->trap, (void *)regs->nip, (void *)lr); firstframe = 1; } -@@ -1411,58 +1411,3 @@ void notrace __ppc64_runlatch_off(void) +@@ -1435,58 +1435,3 @@ void notrace __ppc64_runlatch_off(void) mtspr(SPRN_CTRLT, ctrl); } #endif /* CONFIG_PPC64 */ @@ -8138,10 +8200,10 @@ index 96d2fdf..f6d10c8 100644 - return ret; -} diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c -index 9a0d24c..e7fbedf 100644 +index 2e3d2bf..35df241 100644 --- a/arch/powerpc/kernel/ptrace.c +++ b/arch/powerpc/kernel/ptrace.c -@@ -1761,6 +1761,10 @@ long arch_ptrace(struct task_struct *child, long request, +@@ -1762,6 +1762,10 @@ long arch_ptrace(struct task_struct *child, long request, return ret; } @@ -8152,7 +8214,7 @@ index 9a0d24c..e7fbedf 100644 /* * We must return the syscall number to actually look up in the table. * This can be -1L to skip running any syscall at all. -@@ -1773,6 +1777,11 @@ long do_syscall_trace_enter(struct pt_regs *regs) +@@ -1774,6 +1778,11 @@ long do_syscall_trace_enter(struct pt_regs *regs) secure_computing_strict(regs->gpr[0]); @@ -8164,7 +8226,7 @@ index 9a0d24c..e7fbedf 100644 if (test_thread_flag(TIF_SYSCALL_TRACE) && tracehook_report_syscall_entry(regs)) /* -@@ -1807,6 +1816,11 @@ void do_syscall_trace_leave(struct pt_regs *regs) +@@ -1808,6 +1817,11 @@ void do_syscall_trace_leave(struct pt_regs *regs) { int step; @@ -8177,10 +8239,10 @@ index 9a0d24c..e7fbedf 100644 if (unlikely(test_thread_flag(TIF_SYSCALL_TRACEPOINT))) diff --git a/arch/powerpc/kernel/signal_32.c b/arch/powerpc/kernel/signal_32.c -index fea2dba..a779f6b 100644 +index 68027bf..b26fd31 100644 --- a/arch/powerpc/kernel/signal_32.c +++ b/arch/powerpc/kernel/signal_32.c -@@ -1002,7 +1002,7 @@ int handle_rt_signal32(unsigned long sig, struct k_sigaction *ka, +@@ -1004,7 +1004,7 @@ int handle_rt_signal32(unsigned long sig, struct k_sigaction *ka, /* Save user registers on the stack */ frame = &rt_sf->uc.uc_mcontext; addr = frame; @@ -8190,10 +8252,10 @@ index fea2dba..a779f6b 100644 tramp = current->mm->context.vdso_base + vdso32_rt_sigtramp; } else { diff --git a/arch/powerpc/kernel/signal_64.c b/arch/powerpc/kernel/signal_64.c -index 1e7ba88..17afb1b 100644 +index 4299104..29e2c51 100644 --- a/arch/powerpc/kernel/signal_64.c +++ b/arch/powerpc/kernel/signal_64.c -@@ -763,7 +763,7 @@ int handle_rt_signal64(int signr, struct k_sigaction *ka, siginfo_t *info, +@@ -758,7 +758,7 @@ int handle_rt_signal64(int signr, struct k_sigaction *ka, siginfo_t *info, #endif /* Set up to return from userspace. */ @@ -8203,7 +8265,7 @@ index 1e7ba88..17afb1b 100644 } else { err |= setup_trampoline(__NR_rt_sigreturn, &frame->tramp[0]); diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c -index f783c93..619baf1 100644 +index 907a472..4ba206f 100644 --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c @@ -142,6 +142,8 @@ static unsigned __kprobes long oops_begin(struct pt_regs *regs) @@ -8226,18 +8288,18 @@ index f783c93..619baf1 100644 } diff --git a/arch/powerpc/kernel/vdso.c b/arch/powerpc/kernel/vdso.c -index 1d9c926..25f4741 100644 +index 094e45c..d82b848 100644 --- a/arch/powerpc/kernel/vdso.c +++ b/arch/powerpc/kernel/vdso.c -@@ -34,6 +34,7 @@ - #include +@@ -35,6 +35,7 @@ #include #include + #include +#include - #include "setup.h" + #undef DEBUG -@@ -222,7 +223,7 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp) +@@ -221,7 +222,7 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp) vdso_base = VDSO32_MBASE; #endif @@ -8246,7 +8308,7 @@ index 1d9c926..25f4741 100644 /* vDSO has a problem and was disabled, just don't "enable" it for the * process -@@ -242,7 +243,7 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp) +@@ -241,7 +242,7 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp) vdso_base = get_unmapped_area(NULL, vdso_base, (vdso_pages << PAGE_SHIFT) + ((VDSO_ALIGNMENT - 1) & PAGE_MASK), @@ -8482,10 +8544,10 @@ index 9098692..3d54cd1 100644 struct spu_context *ctx = vma->vm_file->private_data; unsigned long offset = address - vma->vm_start; diff --git a/arch/s390/include/asm/atomic.h b/arch/s390/include/asm/atomic.h -index c797832..ce575c8 100644 +index fa9aaf7..3f5d836 100644 --- a/arch/s390/include/asm/atomic.h +++ b/arch/s390/include/asm/atomic.h -@@ -326,6 +326,16 @@ static inline long long atomic64_dec_if_positive(atomic64_t *v) +@@ -398,6 +398,16 @@ static inline long long atomic64_dec_if_positive(atomic64_t *v) #define atomic64_dec_and_test(_v) (atomic64_sub_return(1, _v) == 0) #define atomic64_inc_not_zero(v) atomic64_add_unless((v), 1, 0) @@ -8562,10 +8624,10 @@ index c4a93d6..4d2a9b4 100644 #endif /* __ASM_EXEC_H */ diff --git a/arch/s390/include/asm/uaccess.h b/arch/s390/include/asm/uaccess.h -index 9c33ed4..e40cbef 100644 +index 79330af..a3a7b06 100644 --- a/arch/s390/include/asm/uaccess.h +++ b/arch/s390/include/asm/uaccess.h -@@ -252,6 +252,10 @@ static inline unsigned long __must_check +@@ -245,6 +245,10 @@ static inline unsigned long __must_check copy_to_user(void __user *to, const void *from, unsigned long n) { might_fault(); @@ -8576,17 +8638,17 @@ index 9c33ed4..e40cbef 100644 return __copy_to_user(to, from, n); } -@@ -275,6 +279,9 @@ copy_to_user(void __user *to, const void *from, unsigned long n) +@@ -268,6 +272,9 @@ copy_to_user(void __user *to, const void *from, unsigned long n) static inline unsigned long __must_check __copy_from_user(void *to, const void __user *from, unsigned long n) { + if ((long)n < 0) + return n; + - if (__builtin_constant_p(n) && (n <= 256)) - return uaccess.copy_from_user_small(n, from, to); - else -@@ -306,10 +313,14 @@ __compiletime_warning("copy_from_user() buffer size is not provably correct") + return uaccess.copy_from_user(n, from, to); + } + +@@ -296,10 +303,14 @@ __compiletime_warning("copy_from_user() buffer size is not provably correct") static inline unsigned long __must_check copy_from_user(void *to, const void __user *from, unsigned long n) { @@ -8604,7 +8666,7 @@ index 9c33ed4..e40cbef 100644 return n; } diff --git a/arch/s390/kernel/module.c b/arch/s390/kernel/module.c -index 7845e15..59c4353 100644 +index b89b591..fd9609d 100644 --- a/arch/s390/kernel/module.c +++ b/arch/s390/kernel/module.c @@ -169,11 +169,11 @@ int module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, @@ -8679,10 +8741,10 @@ index 7845e15..59c4353 100644 if (r_type == R_390_GOTPC) rc = apply_rela_bits(loc, val, 1, 32, 0); diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c -index c5dbb33..b41f4ee 100644 +index 7ed0d4e..1dfc145 100644 --- a/arch/s390/kernel/process.c +++ b/arch/s390/kernel/process.c -@@ -237,39 +237,3 @@ unsigned long get_wchan(struct task_struct *p) +@@ -242,39 +242,3 @@ unsigned long get_wchan(struct task_struct *p) } return 0; } @@ -8723,13 +8785,13 @@ index c5dbb33..b41f4ee 100644 - return ret; -} diff --git a/arch/s390/mm/mmap.c b/arch/s390/mm/mmap.c -index 4002329..99b67cb 100644 +index 9b436c2..54fbf0a 100644 --- a/arch/s390/mm/mmap.c +++ b/arch/s390/mm/mmap.c -@@ -90,9 +90,21 @@ void arch_pick_mmap_layout(struct mm_struct *mm) +@@ -95,9 +95,21 @@ void arch_pick_mmap_layout(struct mm_struct *mm) */ if (mmap_is_legacy()) { - mm->mmap_base = TASK_UNMAPPED_BASE; + mm->mmap_base = mmap_base_legacy(); + +#ifdef CONFIG_PAX_RANDMMAP + if (mm->pax_flags & MF_PAX_RANDMMAP) @@ -8748,10 +8810,10 @@ index 4002329..99b67cb 100644 mm->get_unmapped_area = arch_get_unmapped_area_topdown; } } -@@ -173,9 +185,21 @@ void arch_pick_mmap_layout(struct mm_struct *mm) +@@ -170,9 +182,21 @@ void arch_pick_mmap_layout(struct mm_struct *mm) */ if (mmap_is_legacy()) { - mm->mmap_base = TASK_UNMAPPED_BASE; + mm->mmap_base = mmap_base_legacy(); + +#ifdef CONFIG_PAX_RANDMMAP + if (mm->pax_flags & MF_PAX_RANDMMAP) @@ -9334,7 +9396,7 @@ index 9689176..63c18ea 100644 unsigned long mask, tmp1, tmp2, result; diff --git a/arch/sparc/include/asm/thread_info_32.h b/arch/sparc/include/asm/thread_info_32.h -index dd38075..e7cac83 100644 +index 96efa7a..16858bf 100644 --- a/arch/sparc/include/asm/thread_info_32.h +++ b/arch/sparc/include/asm/thread_info_32.h @@ -49,6 +49,8 @@ struct thread_info { @@ -9347,7 +9409,7 @@ index dd38075..e7cac83 100644 /* diff --git a/arch/sparc/include/asm/thread_info_64.h b/arch/sparc/include/asm/thread_info_64.h -index d5e5042..9bfee76 100644 +index a5f01ac..703b554 100644 --- a/arch/sparc/include/asm/thread_info_64.h +++ b/arch/sparc/include/asm/thread_info_64.h @@ -63,6 +63,8 @@ struct thread_info { @@ -9359,12 +9421,14 @@ index d5e5042..9bfee76 100644 unsigned long fpregs[0] __attribute__ ((aligned(64))); }; -@@ -192,10 +194,11 @@ register struct thread_info *current_thread_info_reg asm("g6"); +@@ -188,12 +190,13 @@ register struct thread_info *current_thread_info_reg asm("g6"); + #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ + /* flag bit 4 is available */ #define TIF_UNALIGNED 5 /* allowed to do unaligned accesses */ - /* flag bit 6 is available */ +-/* flag bit 6 is available */ ++#define TIF_GRSEC_SETXID 6 /* update credentials on syscall entry/exit */ #define TIF_32BIT 7 /* 32-bit binary */ --/* flag bit 8 is available */ -+#define TIF_GRSEC_SETXID 8 /* update credentials on syscall entry/exit */ + #define TIF_NOHZ 8 /* in adaptive nohz mode */ #define TIF_SECCOMP 9 /* secure computing */ #define TIF_SYSCALL_AUDIT 10 /* syscall auditing active */ #define TIF_SYSCALL_TRACEPOINT 11 /* syscall tracepoint instrumentation */ @@ -9372,7 +9436,7 @@ index d5e5042..9bfee76 100644 /* NOTE: Thread flags >= 12 should be ones we have no interest * in using in assembly, else we can't use the mask as * an immediate value in instructions such as andcc. -@@ -214,12 +217,18 @@ register struct thread_info *current_thread_info_reg asm("g6"); +@@ -213,12 +216,18 @@ register struct thread_info *current_thread_info_reg asm("g6"); #define _TIF_SYSCALL_AUDIT (1<ins[4], rwk->ins[5], rwk->ins[6], rwk->ins[7]); if (regs->tstate & TSTATE_PRIV) @@ -9559,7 +9623,7 @@ index baebab2..9cd13b1 100644 } void show_regs(struct pt_regs *regs) -@@ -167,7 +167,7 @@ void show_regs(struct pt_regs *regs) +@@ -168,7 +168,7 @@ void show_regs(struct pt_regs *regs) printk("TSTATE: %016lx TPC: %016lx TNPC: %016lx Y: %08x %s\n", regs->tstate, regs->tpc, regs->tnpc, regs->y, print_tainted()); @@ -9568,7 +9632,7 @@ index baebab2..9cd13b1 100644 printk("g0: %016lx g1: %016lx g2: %016lx g3: %016lx\n", regs->u_regs[0], regs->u_regs[1], regs->u_regs[2], regs->u_regs[3]); -@@ -180,7 +180,7 @@ void show_regs(struct pt_regs *regs) +@@ -181,7 +181,7 @@ void show_regs(struct pt_regs *regs) printk("o4: %016lx o5: %016lx sp: %016lx ret_pc: %016lx\n", regs->u_regs[12], regs->u_regs[13], regs->u_regs[14], regs->u_regs[15]); @@ -9577,7 +9641,7 @@ index baebab2..9cd13b1 100644 show_regwindow(regs); show_stack(current, (unsigned long *) regs->u_regs[UREG_FP]); } -@@ -269,7 +269,7 @@ void arch_trigger_all_cpu_backtrace(void) +@@ -270,7 +270,7 @@ void arch_trigger_all_cpu_backtrace(void) ((tp && tp->task) ? tp->task->pid : -1)); if (gp->tstate & TSTATE_PRIV) { @@ -9600,10 +9664,10 @@ index 79cc0d1..ec62734 100644 .getproplen = prom_getproplen, .getproperty = prom_getproperty, diff --git a/arch/sparc/kernel/ptrace_64.c b/arch/sparc/kernel/ptrace_64.c -index 773c1f2..a8bdd87 100644 +index c13c9f2..d572c34 100644 --- a/arch/sparc/kernel/ptrace_64.c +++ b/arch/sparc/kernel/ptrace_64.c -@@ -1059,6 +1059,10 @@ long arch_ptrace(struct task_struct *child, long request, +@@ -1060,6 +1060,10 @@ long arch_ptrace(struct task_struct *child, long request, return ret; } @@ -9614,9 +9678,9 @@ index 773c1f2..a8bdd87 100644 asmlinkage int syscall_trace_enter(struct pt_regs *regs) { int ret = 0; -@@ -1066,6 +1070,11 @@ asmlinkage int syscall_trace_enter(struct pt_regs *regs) - /* do the secure computing check first */ - secure_computing_strict(regs->u_regs[UREG_G1]); +@@ -1070,6 +1074,11 @@ asmlinkage int syscall_trace_enter(struct pt_regs *regs) + if (test_thread_flag(TIF_NOHZ)) + user_exit(); +#ifdef CONFIG_GRKERNSEC_SETXID + if (unlikely(test_and_clear_thread_flag(TIF_GRSEC_SETXID))) @@ -9626,10 +9690,10 @@ index 773c1f2..a8bdd87 100644 if (test_thread_flag(TIF_SYSCALL_TRACE)) ret = tracehook_report_syscall_entry(regs); -@@ -1086,6 +1095,11 @@ asmlinkage int syscall_trace_enter(struct pt_regs *regs) +@@ -1093,6 +1102,11 @@ asmlinkage void syscall_trace_leave(struct pt_regs *regs) + if (test_thread_flag(TIF_NOHZ)) + user_exit(); - asmlinkage void syscall_trace_leave(struct pt_regs *regs) - { +#ifdef CONFIG_GRKERNSEC_SETXID + if (unlikely(test_and_clear_thread_flag(TIF_GRSEC_SETXID))) + gr_delayed_cred_worker(); @@ -9639,10 +9703,10 @@ index 773c1f2..a8bdd87 100644 if (unlikely(test_thread_flag(TIF_SYSCALL_TRACEPOINT))) diff --git a/arch/sparc/kernel/smp_64.c b/arch/sparc/kernel/smp_64.c -index e142545..fd29654 100644 +index b085311..6f885f7 100644 --- a/arch/sparc/kernel/smp_64.c +++ b/arch/sparc/kernel/smp_64.c -@@ -869,8 +869,8 @@ extern unsigned long xcall_flush_dcache_page_cheetah; +@@ -870,8 +870,8 @@ extern unsigned long xcall_flush_dcache_page_cheetah; extern unsigned long xcall_flush_dcache_page_spitfire; #ifdef CONFIG_DEBUG_DCFLUSH @@ -9653,7 +9717,7 @@ index e142545..fd29654 100644 #endif static inline void __local_flush_dcache_page(struct page *page) -@@ -894,7 +894,7 @@ void smp_flush_dcache_page_impl(struct page *page, int cpu) +@@ -895,7 +895,7 @@ void smp_flush_dcache_page_impl(struct page *page, int cpu) return; #ifdef CONFIG_DEBUG_DCFLUSH @@ -9662,7 +9726,7 @@ index e142545..fd29654 100644 #endif this_cpu = get_cpu(); -@@ -918,7 +918,7 @@ void smp_flush_dcache_page_impl(struct page *page, int cpu) +@@ -919,7 +919,7 @@ void smp_flush_dcache_page_impl(struct page *page, int cpu) xcall_deliver(data0, __pa(pg_addr), (u64) pg_addr, cpumask_of(cpu)); #ifdef CONFIG_DEBUG_DCFLUSH @@ -9671,7 +9735,7 @@ index e142545..fd29654 100644 #endif } } -@@ -937,7 +937,7 @@ void flush_dcache_page_all(struct mm_struct *mm, struct page *page) +@@ -938,7 +938,7 @@ void flush_dcache_page_all(struct mm_struct *mm, struct page *page) preempt_disable(); #ifdef CONFIG_DEBUG_DCFLUSH @@ -9680,7 +9744,7 @@ index e142545..fd29654 100644 #endif data0 = 0; pg_addr = page_address(page); -@@ -954,7 +954,7 @@ void flush_dcache_page_all(struct mm_struct *mm, struct page *page) +@@ -955,7 +955,7 @@ void flush_dcache_page_all(struct mm_struct *mm, struct page *page) xcall_deliver(data0, __pa(pg_addr), (u64) pg_addr, cpu_online_mask); #ifdef CONFIG_DEBUG_DCFLUSH @@ -9703,10 +9767,10 @@ index 3a8d184..49498a8 100644 info.flags = 0; info.length = len; diff --git a/arch/sparc/kernel/sys_sparc_64.c b/arch/sparc/kernel/sys_sparc_64.c -index 51561b8..8256764 100644 +index beb0b5a..5a153f7 100644 --- a/arch/sparc/kernel/sys_sparc_64.c +++ b/arch/sparc/kernel/sys_sparc_64.c -@@ -90,13 +90,14 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsi +@@ -88,13 +88,14 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsi struct vm_area_struct * vma; unsigned long task_size = TASK_SIZE; int do_color_align; @@ -9722,7 +9786,7 @@ index 51561b8..8256764 100644 ((addr - (pgoff << PAGE_SHIFT)) & (SHMLBA - 1))) return -EINVAL; return addr; -@@ -111,6 +112,10 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsi +@@ -109,6 +110,10 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsi if (filp || (flags & MAP_SHARED)) do_color_align = 1; @@ -9733,7 +9797,7 @@ index 51561b8..8256764 100644 if (addr) { if (do_color_align) addr = COLOR_ALIGN(addr, pgoff); -@@ -118,22 +123,28 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsi +@@ -116,22 +121,28 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsi addr = PAGE_ALIGN(addr); vma = find_vma(mm, addr); @@ -9765,7 +9829,7 @@ index 51561b8..8256764 100644 info.high_limit = task_size; addr = vm_unmapped_area(&info); } -@@ -151,6 +162,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, +@@ -149,6 +160,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, unsigned long task_size = STACK_TOP32; unsigned long addr = addr0; int do_color_align; @@ -9773,7 +9837,7 @@ index 51561b8..8256764 100644 struct vm_unmapped_area_info info; /* This should only ever run for 32-bit processes. */ -@@ -160,7 +172,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, +@@ -158,7 +170,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, /* We do not accept a shared mapping if it would violate * cache aliasing constraints. */ @@ -9782,7 +9846,7 @@ index 51561b8..8256764 100644 ((addr - (pgoff << PAGE_SHIFT)) & (SHMLBA - 1))) return -EINVAL; return addr; -@@ -173,6 +185,10 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, +@@ -171,6 +183,10 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, if (filp || (flags & MAP_SHARED)) do_color_align = 1; @@ -9793,7 +9857,7 @@ index 51561b8..8256764 100644 /* requesting a specific address */ if (addr) { if (do_color_align) -@@ -181,8 +197,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, +@@ -179,8 +195,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, addr = PAGE_ALIGN(addr); vma = find_vma(mm, addr); @@ -9803,7 +9867,7 @@ index 51561b8..8256764 100644 return addr; } -@@ -192,6 +207,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, +@@ -190,6 +205,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, info.high_limit = mm->mmap_base; info.align_mask = do_color_align ? (PAGE_MASK & (SHMLBA - 1)) : 0; info.align_offset = pgoff << PAGE_SHIFT; @@ -9811,7 +9875,7 @@ index 51561b8..8256764 100644 addr = vm_unmapped_area(&info); /* -@@ -204,6 +220,12 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, +@@ -202,6 +218,12 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, VM_BUG_ON(addr != -ENOMEM); info.flags = 0; info.low_limit = TASK_UNMAPPED_BASE; @@ -9824,7 +9888,7 @@ index 51561b8..8256764 100644 info.high_limit = STACK_TOP32; addr = vm_unmapped_area(&info); } -@@ -260,10 +282,14 @@ unsigned long get_fb_unmapped_area(struct file *filp, unsigned long orig_addr, u +@@ -258,10 +280,14 @@ unsigned long get_fb_unmapped_area(struct file *filp, unsigned long orig_addr, u EXPORT_SYMBOL(get_fb_unmapped_area); /* Essentially the same as PowerPC. */ @@ -9840,7 +9904,7 @@ index 51561b8..8256764 100644 if (current->flags & PF_RANDOMIZE) { unsigned long val = get_random_int(); if (test_thread_flag(TIF_32BIT)) -@@ -276,7 +302,7 @@ static unsigned long mmap_rnd(void) +@@ -274,7 +300,7 @@ static unsigned long mmap_rnd(void) void arch_pick_mmap_layout(struct mm_struct *mm) { @@ -9849,7 +9913,7 @@ index 51561b8..8256764 100644 unsigned long gap; /* -@@ -289,6 +315,12 @@ void arch_pick_mmap_layout(struct mm_struct *mm) +@@ -287,6 +313,12 @@ void arch_pick_mmap_layout(struct mm_struct *mm) gap == RLIM_INFINITY || sysctl_legacy_va_layout) { mm->mmap_base = TASK_UNMAPPED_BASE + random_factor; @@ -9862,7 +9926,7 @@ index 51561b8..8256764 100644 mm->get_unmapped_area = arch_get_unmapped_area; } else { /* We know it's 32-bit */ -@@ -300,6 +332,12 @@ void arch_pick_mmap_layout(struct mm_struct *mm) +@@ -298,6 +330,12 @@ void arch_pick_mmap_layout(struct mm_struct *mm) gap = (task_size / 6 * 5); mm->mmap_base = PAGE_ALIGN(task_size - gap - random_factor); @@ -9876,14 +9940,14 @@ index 51561b8..8256764 100644 } } diff --git a/arch/sparc/kernel/syscalls.S b/arch/sparc/kernel/syscalls.S -index d950197..192f9d8 100644 +index 87729ff..192f9d8 100644 --- a/arch/sparc/kernel/syscalls.S +++ b/arch/sparc/kernel/syscalls.S @@ -52,7 +52,7 @@ sys32_rt_sigreturn: #endif .align 32 1: ldx [%g6 + TI_FLAGS], %l5 -- andcc %l5, (_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT|_TIF_SYSCALL_TRACEPOINT), %g0 +- andcc %l5, (_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT|_TIF_SYSCALL_TRACEPOINT|_TIF_NOHZ), %g0 + andcc %l5, _TIF_WORK_SYSCALL, %g0 be,pt %icc, rtrap nop @@ -9892,7 +9956,7 @@ index d950197..192f9d8 100644 srl %i3, 0, %o3 ! IEU0 srl %i2, 0, %o2 ! IEU0 Group -- andcc %l0, (_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT|_TIF_SYSCALL_TRACEPOINT), %g0 +- andcc %l0, (_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT|_TIF_SYSCALL_TRACEPOINT|_TIF_NOHZ), %g0 + andcc %l0, _TIF_WORK_SYSCALL, %g0 bne,pn %icc, linux_syscall_trace32 ! CTI mov %i0, %l5 ! IEU1 @@ -9901,7 +9965,7 @@ index d950197..192f9d8 100644 mov %i3, %o3 ! IEU1 mov %i4, %o4 ! IEU0 Group -- andcc %l0, (_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT|_TIF_SYSCALL_TRACEPOINT), %g0 +- andcc %l0, (_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT|_TIF_SYSCALL_TRACEPOINT|_TIF_NOHZ), %g0 + andcc %l0, _TIF_WORK_SYSCALL, %g0 bne,pn %icc, linux_syscall_trace ! CTI Group mov %i0, %l5 ! IEU0 @@ -9910,7 +9974,7 @@ index d950197..192f9d8 100644 cmp %o0, -ERESTART_RESTARTBLOCK bgeu,pn %xcc, 1f -- andcc %l0, (_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT|_TIF_SYSCALL_TRACEPOINT), %g0 +- andcc %l0, (_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT|_TIF_SYSCALL_TRACEPOINT|_TIF_NOHZ), %g0 + andcc %l0, _TIF_WORK_SYSCALL, %g0 ldx [%sp + PTREGS_OFF + PT_V9_TNPC], %l1 ! pc = npc @@ -9949,10 +10013,10 @@ index 6629829..036032d 100644 } diff --git a/arch/sparc/kernel/traps_64.c b/arch/sparc/kernel/traps_64.c -index b3f833a..f485f80 100644 +index 4ced92f..965eeed 100644 --- a/arch/sparc/kernel/traps_64.c +++ b/arch/sparc/kernel/traps_64.c -@@ -76,7 +76,7 @@ static void dump_tl1_traplog(struct tl1_traplog *p) +@@ -77,7 +77,7 @@ static void dump_tl1_traplog(struct tl1_traplog *p) i + 1, p->trapstack[i].tstate, p->trapstack[i].tpc, p->trapstack[i].tnpc, p->trapstack[i].tt); @@ -9961,7 +10025,7 @@ index b3f833a..f485f80 100644 } } -@@ -96,6 +96,12 @@ void bad_trap(struct pt_regs *regs, long lvl) +@@ -97,6 +97,12 @@ void bad_trap(struct pt_regs *regs, long lvl) lvl -= 0x100; if (regs->tstate & TSTATE_PRIV) { @@ -9974,7 +10038,7 @@ index b3f833a..f485f80 100644 sprintf(buffer, "Kernel bad sw trap %lx", lvl); die_if_kernel(buffer, regs); } -@@ -114,11 +120,16 @@ void bad_trap(struct pt_regs *regs, long lvl) +@@ -115,11 +121,16 @@ void bad_trap(struct pt_regs *regs, long lvl) void bad_trap_tl1(struct pt_regs *regs, long lvl) { char buffer[32]; @@ -9992,7 +10056,7 @@ index b3f833a..f485f80 100644 dump_tl1_traplog((struct tl1_traplog *)(regs + 1)); sprintf (buffer, "Bad trap %lx at tl>0", lvl); -@@ -1142,7 +1153,7 @@ static void cheetah_log_errors(struct pt_regs *regs, struct cheetah_err_info *in +@@ -1149,7 +1160,7 @@ static void cheetah_log_errors(struct pt_regs *regs, struct cheetah_err_info *in regs->tpc, regs->tnpc, regs->u_regs[UREG_I7], regs->tstate); printk("%s" "ERROR(%d): ", (recoverable ? KERN_WARNING : KERN_CRIT), smp_processor_id()); @@ -10001,7 +10065,7 @@ index b3f833a..f485f80 100644 printk("%s" "ERROR(%d): M_SYND(%lx), E_SYND(%lx)%s%s\n", (recoverable ? KERN_WARNING : KERN_CRIT), smp_processor_id(), (afsr & CHAFSR_M_SYNDROME) >> CHAFSR_M_SYNDROME_SHIFT, -@@ -1749,7 +1760,7 @@ void cheetah_plus_parity_error(int type, struct pt_regs *regs) +@@ -1756,7 +1767,7 @@ void cheetah_plus_parity_error(int type, struct pt_regs *regs) smp_processor_id(), (type & 0x1) ? 'I' : 'D', regs->tpc); @@ -10010,7 +10074,7 @@ index b3f833a..f485f80 100644 panic("Irrecoverable Cheetah+ parity error."); } -@@ -1757,7 +1768,7 @@ void cheetah_plus_parity_error(int type, struct pt_regs *regs) +@@ -1764,7 +1775,7 @@ void cheetah_plus_parity_error(int type, struct pt_regs *regs) smp_processor_id(), (type & 0x1) ? 'I' : 'D', regs->tpc); @@ -10019,7 +10083,7 @@ index b3f833a..f485f80 100644 } struct sun4v_error_entry { -@@ -1830,8 +1841,8 @@ struct sun4v_error_entry { +@@ -1837,8 +1848,8 @@ struct sun4v_error_entry { /*0x38*/u64 reserved_5; }; @@ -10030,7 +10094,7 @@ index b3f833a..f485f80 100644 static const char *sun4v_err_type_to_str(u8 type) { -@@ -1923,7 +1934,7 @@ static void sun4v_report_real_raddr(const char *pfx, struct pt_regs *regs) +@@ -1930,7 +1941,7 @@ static void sun4v_report_real_raddr(const char *pfx, struct pt_regs *regs) } static void sun4v_log_error(struct pt_regs *regs, struct sun4v_error_entry *ent, @@ -10039,7 +10103,7 @@ index b3f833a..f485f80 100644 { u64 *raw_ptr = (u64 *) ent; u32 attrs; -@@ -1981,8 +1992,8 @@ static void sun4v_log_error(struct pt_regs *regs, struct sun4v_error_entry *ent, +@@ -1988,8 +1999,8 @@ static void sun4v_log_error(struct pt_regs *regs, struct sun4v_error_entry *ent, show_regs(regs); @@ -10050,7 +10114,7 @@ index b3f833a..f485f80 100644 wmb(); printk("%s: Queue overflowed %d times.\n", pfx, cnt); -@@ -2036,7 +2047,7 @@ void sun4v_resum_error(struct pt_regs *regs, unsigned long offset) +@@ -2046,7 +2057,7 @@ out: */ void sun4v_resum_overflow(struct pt_regs *regs) { @@ -10059,7 +10123,7 @@ index b3f833a..f485f80 100644 } /* We run with %pil set to PIL_NORMAL_MAX and PSTATE_IE enabled in %pstate. -@@ -2089,7 +2100,7 @@ void sun4v_nonresum_overflow(struct pt_regs *regs) +@@ -2099,7 +2110,7 @@ void sun4v_nonresum_overflow(struct pt_regs *regs) /* XXX Actually even this can make not that much sense. Perhaps * XXX we should just pull the plug and panic directly from here? */ @@ -10068,7 +10132,7 @@ index b3f833a..f485f80 100644 } unsigned long sun4v_err_itlb_vaddr; -@@ -2104,9 +2115,9 @@ void sun4v_itlb_error_report(struct pt_regs *regs, int tl) +@@ -2114,9 +2125,9 @@ void sun4v_itlb_error_report(struct pt_regs *regs, int tl) printk(KERN_EMERG "SUN4V-ITLB: Error at TPC[%lx], tl %d\n", regs->tpc, tl); @@ -10080,7 +10144,7 @@ index b3f833a..f485f80 100644 (void *) regs->u_regs[UREG_I7]); printk(KERN_EMERG "SUN4V-ITLB: vaddr[%lx] ctx[%lx] " "pte[%lx] error[%lx]\n", -@@ -2128,9 +2139,9 @@ void sun4v_dtlb_error_report(struct pt_regs *regs, int tl) +@@ -2138,9 +2149,9 @@ void sun4v_dtlb_error_report(struct pt_regs *regs, int tl) printk(KERN_EMERG "SUN4V-DTLB: Error at TPC[%lx], tl %d\n", regs->tpc, tl); @@ -10092,7 +10156,7 @@ index b3f833a..f485f80 100644 (void *) regs->u_regs[UREG_I7]); printk(KERN_EMERG "SUN4V-DTLB: vaddr[%lx] ctx[%lx] " "pte[%lx] error[%lx]\n", -@@ -2336,13 +2347,13 @@ void show_stack(struct task_struct *tsk, unsigned long *_ksp) +@@ -2359,13 +2370,13 @@ void show_stack(struct task_struct *tsk, unsigned long *_ksp) fp = (unsigned long)sf->fp + STACK_BIAS; } @@ -10108,7 +10172,7 @@ index b3f833a..f485f80 100644 graph++; } } -@@ -2360,6 +2371,8 @@ static inline struct reg_window *kernel_stack_up(struct reg_window *rw) +@@ -2383,6 +2394,8 @@ static inline struct reg_window *kernel_stack_up(struct reg_window *rw) return (struct reg_window *) (fp + STACK_BIAS); } @@ -10117,7 +10181,7 @@ index b3f833a..f485f80 100644 void die_if_kernel(char *str, struct pt_regs *regs) { static int die_counter; -@@ -2388,7 +2401,7 @@ void die_if_kernel(char *str, struct pt_regs *regs) +@@ -2411,7 +2424,7 @@ void die_if_kernel(char *str, struct pt_regs *regs) while (rw && count++ < 30 && kstack_valid(tp, (unsigned long) rw)) { @@ -10126,7 +10190,7 @@ index b3f833a..f485f80 100644 (void *) rw->ins[7]); rw = kernel_stack_up(rw); -@@ -2401,8 +2414,10 @@ void die_if_kernel(char *str, struct pt_regs *regs) +@@ -2424,8 +2437,10 @@ void die_if_kernel(char *str, struct pt_regs *regs) } user_instruction_dump ((unsigned int __user *) regs->tpc); } @@ -10139,10 +10203,10 @@ index b3f833a..f485f80 100644 } EXPORT_SYMBOL(die_if_kernel); diff --git a/arch/sparc/kernel/unaligned_64.c b/arch/sparc/kernel/unaligned_64.c -index 8201c25e..072a2a7 100644 +index 3c1a7cb..73e1923 100644 --- a/arch/sparc/kernel/unaligned_64.c +++ b/arch/sparc/kernel/unaligned_64.c -@@ -286,7 +286,7 @@ static void log_unaligned(struct pt_regs *regs) +@@ -289,7 +289,7 @@ static void log_unaligned(struct pt_regs *regs) static DEFINE_RATELIMIT_STATE(ratelimit, 5 * HZ, 5); if (__ratelimit(&ratelimit)) { @@ -10732,20 +10796,20 @@ index 59dbd46..1dd7f5e 100644 if (!(vma->vm_flags & (VM_READ | VM_EXEC))) goto bad_area; diff --git a/arch/sparc/mm/fault_64.c b/arch/sparc/mm/fault_64.c -index 2ebec26..b212598 100644 +index 69bb818..6ca35c8 100644 --- a/arch/sparc/mm/fault_64.c +++ b/arch/sparc/mm/fault_64.c -@@ -21,6 +21,9 @@ - #include +@@ -22,6 +22,9 @@ #include #include + #include +#include +#include +#include #include #include -@@ -74,7 +77,7 @@ static void __kprobes bad_kernel_pc(struct pt_regs *regs, unsigned long vaddr) +@@ -75,7 +78,7 @@ static void __kprobes bad_kernel_pc(struct pt_regs *regs, unsigned long vaddr) printk(KERN_CRIT "OOPS: Bogus kernel PC [%016lx] in fault handler\n", regs->tpc); printk(KERN_CRIT "OOPS: RPC [%016lx]\n", regs->u_regs[15]); @@ -10754,7 +10818,7 @@ index 2ebec26..b212598 100644 printk(KERN_CRIT "OOPS: Fault was to vaddr[%lx]\n", vaddr); dump_stack(); unhandled_fault(regs->tpc, current, regs); -@@ -270,6 +273,466 @@ static void noinline __kprobes bogus_32bit_fault_address(struct pt_regs *regs, +@@ -271,6 +274,466 @@ static void noinline __kprobes bogus_32bit_fault_address(struct pt_regs *regs, show_regs(regs); } @@ -11220,8 +11284,8 @@ index 2ebec26..b212598 100644 + asmlinkage void __kprobes do_sparc64_fault(struct pt_regs *regs) { - struct mm_struct *mm = current->mm; -@@ -342,6 +805,29 @@ retry: + enum ctx_state prev_state = exception_enter(); +@@ -344,6 +807,29 @@ retry: if (!vma) goto bad_area; @@ -11252,10 +11316,10 @@ index 2ebec26..b212598 100644 * load/store/atomic was a write or not, it only says that there * was no match. So in such a case we (carefully) read the diff --git a/arch/sparc/mm/hugetlbpage.c b/arch/sparc/mm/hugetlbpage.c -index 9639964..806cd0c 100644 +index 3096317..a7b7654 100644 --- a/arch/sparc/mm/hugetlbpage.c +++ b/arch/sparc/mm/hugetlbpage.c -@@ -28,7 +28,8 @@ static unsigned long hugetlb_get_unmapped_area_bottomup(struct file *filp, +@@ -26,7 +26,8 @@ static unsigned long hugetlb_get_unmapped_area_bottomup(struct file *filp, unsigned long addr, unsigned long len, unsigned long pgoff, @@ -11265,7 +11329,7 @@ index 9639964..806cd0c 100644 { unsigned long task_size = TASK_SIZE; struct vm_unmapped_area_info info; -@@ -38,15 +39,22 @@ static unsigned long hugetlb_get_unmapped_area_bottomup(struct file *filp, +@@ -36,15 +37,22 @@ static unsigned long hugetlb_get_unmapped_area_bottomup(struct file *filp, info.flags = 0; info.length = len; @@ -11289,7 +11353,7 @@ index 9639964..806cd0c 100644 info.high_limit = task_size; addr = vm_unmapped_area(&info); } -@@ -58,7 +66,8 @@ static unsigned long +@@ -56,7 +64,8 @@ static unsigned long hugetlb_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, const unsigned long len, const unsigned long pgoff, @@ -11299,7 +11363,7 @@ index 9639964..806cd0c 100644 { struct mm_struct *mm = current->mm; unsigned long addr = addr0; -@@ -73,6 +82,7 @@ hugetlb_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, +@@ -71,6 +80,7 @@ hugetlb_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, info.high_limit = mm->mmap_base; info.align_mask = PAGE_MASK & ~HPAGE_MASK; info.align_offset = 0; @@ -11307,7 +11371,7 @@ index 9639964..806cd0c 100644 addr = vm_unmapped_area(&info); /* -@@ -85,6 +95,12 @@ hugetlb_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, +@@ -83,6 +93,12 @@ hugetlb_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, VM_BUG_ON(addr != -ENOMEM); info.flags = 0; info.low_limit = TASK_UNMAPPED_BASE; @@ -11320,7 +11384,7 @@ index 9639964..806cd0c 100644 info.high_limit = STACK_TOP32; addr = vm_unmapped_area(&info); } -@@ -99,6 +115,7 @@ hugetlb_get_unmapped_area(struct file *file, unsigned long addr, +@@ -97,6 +113,7 @@ hugetlb_get_unmapped_area(struct file *file, unsigned long addr, struct mm_struct *mm = current->mm; struct vm_area_struct *vma; unsigned long task_size = TASK_SIZE; @@ -11328,7 +11392,7 @@ index 9639964..806cd0c 100644 if (test_thread_flag(TIF_32BIT)) task_size = STACK_TOP32; -@@ -114,19 +131,22 @@ hugetlb_get_unmapped_area(struct file *file, unsigned long addr, +@@ -112,19 +129,22 @@ hugetlb_get_unmapped_area(struct file *file, unsigned long addr, return addr; } @@ -11356,7 +11420,7 @@ index 9639964..806cd0c 100644 pte_t *huge_pte_alloc(struct mm_struct *mm, diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c -index ed82eda..0d80e77 100644 +index 5322e53..f820c5e 100644 --- a/arch/sparc/mm/init_64.c +++ b/arch/sparc/mm/init_64.c @@ -188,9 +188,9 @@ unsigned long sparc64_kern_sec_context __read_mostly; @@ -11394,10 +11458,10 @@ index ed82eda..0d80e77 100644 #endif /* CONFIG_DEBUG_DCFLUSH */ } diff --git a/arch/tile/Kconfig b/arch/tile/Kconfig -index d45a2c4..3c05a78 100644 +index b3692ce..e4517c9 100644 --- a/arch/tile/Kconfig +++ b/arch/tile/Kconfig -@@ -185,6 +185,7 @@ source "kernel/Kconfig.hz" +@@ -184,6 +184,7 @@ source "kernel/Kconfig.hz" config KEXEC bool "kexec system call" @@ -11481,10 +11545,10 @@ index 0cb3bba..7338b2d 100644 /* diff --git a/arch/um/Makefile b/arch/um/Makefile -index 133f7de..1d6f2f1 100644 +index 36e658a..71a5c5a 100644 --- a/arch/um/Makefile +++ b/arch/um/Makefile -@@ -62,6 +62,10 @@ USER_CFLAGS = $(patsubst $(KERNEL_DEFINES),,$(patsubst -D__KERNEL__,,\ +@@ -72,6 +72,10 @@ USER_CFLAGS = $(patsubst $(KERNEL_DEFINES),,$(patsubst -D__KERNEL__,,\ $(patsubst -I%,,$(KBUILD_CFLAGS)))) $(ARCH_INCLUDE) $(MODE_INCLUDE) \ $(filter -I%,$(CFLAGS)) -D_FILE_OFFSET_BITS=64 -idirafter include @@ -11495,18 +11559,6 @@ index 133f7de..1d6f2f1 100644 #This will adjust *FLAGS accordingly to the platform. include $(srctree)/$(ARCH_DIR)/Makefile-os-$(OS) -diff --git a/arch/um/defconfig b/arch/um/defconfig -index 2665e6b..3e3822b 100644 ---- a/arch/um/defconfig -+++ b/arch/um/defconfig -@@ -51,7 +51,6 @@ CONFIG_X86_CMPXCHG=y - CONFIG_X86_L1_CACHE_SHIFT=5 - CONFIG_X86_XADD=y - CONFIG_X86_PPRO_FENCE=y --CONFIG_X86_WP_WORKS_OK=y - CONFIG_X86_INVLPG=y - CONFIG_X86_BSWAP=y - CONFIG_X86_POPAD_OK=y diff --git a/arch/um/include/asm/cache.h b/arch/um/include/asm/cache.h index 19e1bdd..3665b77 100644 --- a/arch/um/include/asm/cache.h @@ -11566,10 +11618,10 @@ index 0032f92..cd151e0 100644 #ifdef CONFIG_64BIT #define set_pud(pudptr, pudval) set_64bit((u64 *) (pudptr), pud_val(pudval)) diff --git a/arch/um/kernel/process.c b/arch/um/kernel/process.c -index bbcef52..6a2a483 100644 +index eecc414..48adb87 100644 --- a/arch/um/kernel/process.c +++ b/arch/um/kernel/process.c -@@ -367,22 +367,6 @@ int singlestepping(void * t) +@@ -356,22 +356,6 @@ int singlestepping(void * t) return 2; } @@ -11610,10 +11662,10 @@ index ad8f795..2c7eec6 100644 /* * Memory returned by kmalloc() may be used for DMA, so we must make diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig -index f67e839..bfd4748 100644 +index 0952ecd..75e0e8a 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig -@@ -247,7 +247,7 @@ config X86_HT +@@ -249,7 +249,7 @@ config X86_HT config X86_32_LAZY_GS def_bool y @@ -11622,7 +11674,7 @@ index f67e839..bfd4748 100644 config ARCH_HWEIGHT_CFLAGS string -@@ -1099,6 +1099,7 @@ config MICROCODE_EARLY +@@ -1104,6 +1104,7 @@ config MICROCODE_EARLY config X86_MSR tristate "/dev/cpu/*/msr - Model-specific register support" @@ -11630,7 +11682,7 @@ index f67e839..bfd4748 100644 ---help--- This device gives privileged processes access to the x86 Model-Specific Registers (MSRs). It is a character device with -@@ -1122,7 +1123,7 @@ choice +@@ -1127,7 +1128,7 @@ choice config NOHIGHMEM bool "off" @@ -11639,7 +11691,7 @@ index f67e839..bfd4748 100644 ---help--- Linux can use up to 64 Gigabytes of physical memory on x86 systems. However, the address space of 32-bit x86 processors is only 4 -@@ -1159,7 +1160,7 @@ config NOHIGHMEM +@@ -1164,7 +1165,7 @@ config NOHIGHMEM config HIGHMEM4G bool "4GB" @@ -11648,7 +11700,7 @@ index f67e839..bfd4748 100644 ---help--- Select this if you have a 32-bit processor and between 1 and 4 gigabytes of physical RAM. -@@ -1212,7 +1213,7 @@ config PAGE_OFFSET +@@ -1217,7 +1218,7 @@ config PAGE_OFFSET hex default 0xB0000000 if VMSPLIT_3G_OPT default 0x80000000 if VMSPLIT_2G @@ -11657,7 +11709,7 @@ index f67e839..bfd4748 100644 default 0x40000000 if VMSPLIT_1G default 0xC0000000 depends on X86_32 -@@ -1614,6 +1615,7 @@ config SECCOMP +@@ -1619,6 +1620,7 @@ config SECCOMP config CC_STACKPROTECTOR bool "Enable -fstack-protector buffer overflow detection" @@ -11665,7 +11717,7 @@ index f67e839..bfd4748 100644 ---help--- This option turns on the -fstack-protector GCC feature. This feature puts, at the beginning of functions, a canary value on -@@ -1632,6 +1634,7 @@ source kernel/Kconfig.hz +@@ -1637,6 +1639,7 @@ source kernel/Kconfig.hz config KEXEC bool "kexec system call" @@ -11673,7 +11725,7 @@ index f67e839..bfd4748 100644 ---help--- kexec is a system call that implements the ability to shutdown your current kernel, and to start another kernel. It is like a reboot -@@ -1733,6 +1736,8 @@ config X86_NEED_RELOCS +@@ -1738,6 +1741,8 @@ config X86_NEED_RELOCS config PHYSICAL_ALIGN hex "Alignment value to which kernel should be aligned" default "0x1000000" @@ -11682,7 +11734,7 @@ index f67e839..bfd4748 100644 range 0x2000 0x1000000 if X86_32 range 0x200000 0x1000000 if X86_64 ---help--- -@@ -1812,9 +1817,10 @@ config DEBUG_HOTPLUG_CPU0 +@@ -1817,9 +1822,10 @@ config DEBUG_HOTPLUG_CPU0 If unsure, say N. config COMPAT_VDSO @@ -11726,10 +11778,10 @@ index c026cca..14657ae 100644 config X86_MINIMUM_CPU_FAMILY int diff --git a/arch/x86/Kconfig.debug b/arch/x86/Kconfig.debug -index 78d91af..8ceb94b 100644 +index 0f3621e..282f24b 100644 --- a/arch/x86/Kconfig.debug +++ b/arch/x86/Kconfig.debug -@@ -74,7 +74,7 @@ config X86_PTDUMP +@@ -84,7 +84,7 @@ config X86_PTDUMP config DEBUG_RODATA bool "Write protect kernel read-only data structures" default y @@ -11738,7 +11790,7 @@ index 78d91af..8ceb94b 100644 ---help--- Mark the kernel read-only data as write-protected in the pagetables, in order to catch accidental (and incorrect) writes to such const -@@ -92,7 +92,7 @@ config DEBUG_RODATA_TEST +@@ -102,7 +102,7 @@ config DEBUG_RODATA_TEST config DEBUG_SET_MODULE_RONX bool "Set loadable kernel module data as NX and text as RO" @@ -11748,10 +11800,10 @@ index 78d91af..8ceb94b 100644 This option helps catch unintended modifications to loadable kernel module's text and read-only data. It also prevents execution diff --git a/arch/x86/Makefile b/arch/x86/Makefile -index 41250fb..863762e 100644 +index 57d0215..b4373fb 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile -@@ -46,14 +46,12 @@ ifeq ($(CONFIG_X86_32),y) +@@ -49,14 +49,12 @@ ifeq ($(CONFIG_X86_32),y) # CPU-specific tuning. Anything which can be shared with UML should go here. include $(srctree)/arch/x86/Makefile_32.cpu KBUILD_CFLAGS += $(cflags-y) @@ -11767,7 +11819,7 @@ index 41250fb..863762e 100644 KBUILD_AFLAGS += -m64 KBUILD_CFLAGS += -m64 -@@ -83,6 +81,9 @@ else +@@ -89,6 +87,9 @@ else KBUILD_CFLAGS += -maccumulate-outgoing-args endif @@ -11777,7 +11829,7 @@ index 41250fb..863762e 100644 ifdef CONFIG_CC_STACKPROTECTOR cc_has_sp := $(srctree)/scripts/gcc-x86_$(BITS)-has-stack-protector.sh ifeq ($(shell $(CONFIG_SHELL) $(cc_has_sp) $(CC) $(KBUILD_CPPFLAGS) $(biarch)),y) -@@ -241,3 +242,12 @@ define archhelp +@@ -247,3 +248,12 @@ define archhelp echo ' FDINITRD=file initrd for the booted kernel' echo ' kvmconfig - Enable additional options for guest kernel support' endef @@ -11791,13 +11843,13 @@ index 41250fb..863762e 100644 +archprepare: + $(if $(LDFLAGS_BUILD_ID),,$(error $(OLD_LD))) diff --git a/arch/x86/boot/Makefile b/arch/x86/boot/Makefile -index 379814b..add62ce 100644 +index d9c1195..a26ca0d 100644 --- a/arch/x86/boot/Makefile +++ b/arch/x86/boot/Makefile -@@ -65,6 +65,9 @@ KBUILD_CFLAGS := $(USERINCLUDE) -g -Os -D_SETUP -D__KERNEL__ \ +@@ -65,6 +65,9 @@ KBUILD_CFLAGS := $(USERINCLUDE) -m32 -g -Os -D_SETUP -D__KERNEL__ \ + $(call cc-option, -fno-unit-at-a-time)) \ $(call cc-option, -fno-stack-protector) \ $(call cc-option, -mpreferred-stack-boundary=2) - KBUILD_CFLAGS += $(call cc-option, -m32) +ifdef CONSTIFY_PLUGIN +KBUILD_CFLAGS += -fplugin-arg-constify_plugin-no-constify +endif @@ -11849,11 +11901,11 @@ index ef72bae..353a184 100644 return diff; } diff --git a/arch/x86/boot/compressed/Makefile b/arch/x86/boot/compressed/Makefile -index dcd90df..c830d7d 100644 +index c8a6792..2402765 100644 --- a/arch/x86/boot/compressed/Makefile +++ b/arch/x86/boot/compressed/Makefile -@@ -15,6 +15,9 @@ cflags-$(CONFIG_X86_64) := -mcmodel=small - KBUILD_CFLAGS += $(cflags-y) +@@ -16,6 +16,9 @@ KBUILD_CFLAGS += $(cflags-y) + KBUILD_CFLAGS += -mno-mmx -mno-sse KBUILD_CFLAGS += $(call cc-option,-ffreestanding) KBUILD_CFLAGS += $(call cc-option,-fno-stack-protector) +ifdef CONSTIFY_PLUGIN @@ -11862,26 +11914,6 @@ index dcd90df..c830d7d 100644 KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__ GCOV_PROFILE := n -diff --git a/arch/x86/boot/compressed/eboot.c b/arch/x86/boot/compressed/eboot.c -index b7388a4..03844ec 100644 ---- a/arch/x86/boot/compressed/eboot.c -+++ b/arch/x86/boot/compressed/eboot.c -@@ -150,7 +150,6 @@ again: - *addr = max_addr; - } - --free_pool: - efi_call_phys1(sys_table->boottime->free_pool, map); - - fail: -@@ -214,7 +213,6 @@ static efi_status_t low_alloc(unsigned long size, unsigned long align, - if (i == map_size / desc_size) - status = EFI_NOT_FOUND; - --free_pool: - efi_call_phys1(sys_table->boottime->free_pool, map); - fail: - return status; diff --git a/arch/x86/boot/compressed/efi_stub_32.S b/arch/x86/boot/compressed/efi_stub_32.S index a53440e..c3dbf1e 100644 --- a/arch/x86/boot/compressed/efi_stub_32.S @@ -12159,7 +12191,7 @@ index 43eda28..5ab5fdb 100644 unsigned int v; diff --git a/arch/x86/crypto/aes-x86_64-asm_64.S b/arch/x86/crypto/aes-x86_64-asm_64.S -index 9105655..5e37f27 100644 +index 9105655..41779c1 100644 --- a/arch/x86/crypto/aes-x86_64-asm_64.S +++ b/arch/x86/crypto/aes-x86_64-asm_64.S @@ -8,6 +8,8 @@ @@ -12175,13 +12207,13 @@ index 9105655..5e37f27 100644 je B192; \ leaq 32(r9),r9; -+#define ret pax_force_retaddr 0, 1; ret ++#define ret pax_force_retaddr; ret + #define epilogue(FUNC,r1,r2,r3,r4,r5,r6,r7,r8,r9) \ movq r1,r2; \ movq r3,r4; \ diff --git a/arch/x86/crypto/aesni-intel_asm.S b/arch/x86/crypto/aesni-intel_asm.S -index 477e9d7..3ab339f 100644 +index 477e9d7..c92c7d8 100644 --- a/arch/x86/crypto/aesni-intel_asm.S +++ b/arch/x86/crypto/aesni-intel_asm.S @@ -31,6 +31,7 @@ @@ -12192,19 +12224,240 @@ index 477e9d7..3ab339f 100644 #ifdef __x86_64__ .data -@@ -1441,6 +1442,7 @@ _return_T_done_decrypt: +@@ -205,7 +206,7 @@ enc: .octa 0x2 + * num_initial_blocks = b mod 4 + * encrypt the initial num_initial_blocks blocks and apply ghash on + * the ciphertext +-* %r10, %r11, %r12, %rax, %xmm5, %xmm6, %xmm7, %xmm8, %xmm9 registers ++* %r10, %r11, %r15, %rax, %xmm5, %xmm6, %xmm7, %xmm8, %xmm9 registers + * are clobbered + * arg1, %arg2, %arg3, %r14 are used as a pointer only, not modified + */ +@@ -214,8 +215,8 @@ enc: .octa 0x2 + .macro INITIAL_BLOCKS_DEC num_initial_blocks TMP1 TMP2 TMP3 TMP4 TMP5 XMM0 XMM1 \ + XMM2 XMM3 XMM4 XMMDst TMP6 TMP7 i i_seq operation + mov arg7, %r10 # %r10 = AAD +- mov arg8, %r12 # %r12 = aadLen +- mov %r12, %r11 ++ mov arg8, %r15 # %r15 = aadLen ++ mov %r15, %r11 + pxor %xmm\i, %xmm\i + _get_AAD_loop\num_initial_blocks\operation: + movd (%r10), \TMP1 +@@ -223,15 +224,15 @@ _get_AAD_loop\num_initial_blocks\operation: + psrldq $4, %xmm\i + pxor \TMP1, %xmm\i + add $4, %r10 +- sub $4, %r12 ++ sub $4, %r15 + jne _get_AAD_loop\num_initial_blocks\operation + cmp $16, %r11 + je _get_AAD_loop2_done\num_initial_blocks\operation +- mov $16, %r12 ++ mov $16, %r15 + _get_AAD_loop2\num_initial_blocks\operation: + psrldq $4, %xmm\i +- sub $4, %r12 +- cmp %r11, %r12 ++ sub $4, %r15 ++ cmp %r11, %r15 + jne _get_AAD_loop2\num_initial_blocks\operation + _get_AAD_loop2_done\num_initial_blocks\operation: + movdqa SHUF_MASK(%rip), %xmm14 +@@ -443,7 +444,7 @@ _initial_blocks_done\num_initial_blocks\operation: + * num_initial_blocks = b mod 4 + * encrypt the initial num_initial_blocks blocks and apply ghash on + * the ciphertext +-* %r10, %r11, %r12, %rax, %xmm5, %xmm6, %xmm7, %xmm8, %xmm9 registers ++* %r10, %r11, %r15, %rax, %xmm5, %xmm6, %xmm7, %xmm8, %xmm9 registers + * are clobbered + * arg1, %arg2, %arg3, %r14 are used as a pointer only, not modified + */ +@@ -452,8 +453,8 @@ _initial_blocks_done\num_initial_blocks\operation: + .macro INITIAL_BLOCKS_ENC num_initial_blocks TMP1 TMP2 TMP3 TMP4 TMP5 XMM0 XMM1 \ + XMM2 XMM3 XMM4 XMMDst TMP6 TMP7 i i_seq operation + mov arg7, %r10 # %r10 = AAD +- mov arg8, %r12 # %r12 = aadLen +- mov %r12, %r11 ++ mov arg8, %r15 # %r15 = aadLen ++ mov %r15, %r11 + pxor %xmm\i, %xmm\i + _get_AAD_loop\num_initial_blocks\operation: + movd (%r10), \TMP1 +@@ -461,15 +462,15 @@ _get_AAD_loop\num_initial_blocks\operation: + psrldq $4, %xmm\i + pxor \TMP1, %xmm\i + add $4, %r10 +- sub $4, %r12 ++ sub $4, %r15 + jne _get_AAD_loop\num_initial_blocks\operation + cmp $16, %r11 + je _get_AAD_loop2_done\num_initial_blocks\operation +- mov $16, %r12 ++ mov $16, %r15 + _get_AAD_loop2\num_initial_blocks\operation: + psrldq $4, %xmm\i +- sub $4, %r12 +- cmp %r11, %r12 ++ sub $4, %r15 ++ cmp %r11, %r15 + jne _get_AAD_loop2\num_initial_blocks\operation + _get_AAD_loop2_done\num_initial_blocks\operation: + movdqa SHUF_MASK(%rip), %xmm14 +@@ -1269,7 +1270,7 @@ TMP7 XMM1 XMM2 XMM3 XMM4 XMMDst + * + *****************************************************************************/ + ENTRY(aesni_gcm_dec) +- push %r12 ++ push %r15 + push %r13 + push %r14 + mov %rsp, %r14 +@@ -1279,8 +1280,8 @@ ENTRY(aesni_gcm_dec) + */ + sub $VARIABLE_OFFSET, %rsp + and $~63, %rsp # align rsp to 64 bytes +- mov %arg6, %r12 +- movdqu (%r12), %xmm13 # %xmm13 = HashKey ++ mov %arg6, %r15 ++ movdqu (%r15), %xmm13 # %xmm13 = HashKey + movdqa SHUF_MASK(%rip), %xmm2 + PSHUFB_XMM %xmm2, %xmm13 + +@@ -1308,10 +1309,10 @@ ENTRY(aesni_gcm_dec) + movdqa %xmm13, HashKey(%rsp) # store HashKey<<1 (mod poly) + mov %arg4, %r13 # save the number of bytes of plaintext/ciphertext + and $-16, %r13 # %r13 = %r13 - (%r13 mod 16) +- mov %r13, %r12 +- and $(3<<4), %r12 ++ mov %r13, %r15 ++ and $(3<<4), %r15 + jz _initial_num_blocks_is_0_decrypt +- cmp $(2<<4), %r12 ++ cmp $(2<<4), %r15 + jb _initial_num_blocks_is_1_decrypt + je _initial_num_blocks_is_2_decrypt + _initial_num_blocks_is_3_decrypt: +@@ -1361,16 +1362,16 @@ _zero_cipher_left_decrypt: + sub $16, %r11 + add %r13, %r11 + movdqu (%arg3,%r11,1), %xmm1 # receive the last <16 byte block +- lea SHIFT_MASK+16(%rip), %r12 +- sub %r13, %r12 ++ lea SHIFT_MASK+16(%rip), %r15 ++ sub %r13, %r15 + # adjust the shuffle mask pointer to be able to shift 16-%r13 bytes + # (%r13 is the number of bytes in plaintext mod 16) +- movdqu (%r12), %xmm2 # get the appropriate shuffle mask ++ movdqu (%r15), %xmm2 # get the appropriate shuffle mask + PSHUFB_XMM %xmm2, %xmm1 # right shift 16-%r13 butes + + movdqa %xmm1, %xmm2 + pxor %xmm1, %xmm0 # Ciphertext XOR E(K, Yn) +- movdqu ALL_F-SHIFT_MASK(%r12), %xmm1 ++ movdqu ALL_F-SHIFT_MASK(%r15), %xmm1 + # get the appropriate mask to mask out top 16-%r13 bytes of %xmm0 + pand %xmm1, %xmm0 # mask out top 16-%r13 bytes of %xmm0 + pand %xmm1, %xmm2 +@@ -1399,9 +1400,9 @@ _less_than_8_bytes_left_decrypt: + sub $1, %r13 + jne _less_than_8_bytes_left_decrypt + _multiple_of_16_bytes_decrypt: +- mov arg8, %r12 # %r13 = aadLen (number of bytes) +- shl $3, %r12 # convert into number of bits +- movd %r12d, %xmm15 # len(A) in %xmm15 ++ mov arg8, %r15 # %r13 = aadLen (number of bytes) ++ shl $3, %r15 # convert into number of bits ++ movd %r15d, %xmm15 # len(A) in %xmm15 + shl $3, %arg4 # len(C) in bits (*128) + MOVQ_R64_XMM %arg4, %xmm1 + pslldq $8, %xmm15 # %xmm15 = len(A)||0x0000000000000000 +@@ -1440,7 +1441,8 @@ _return_T_done_decrypt: + mov %r14, %rsp pop %r14 pop %r13 - pop %r12 -+ pax_force_retaddr 0, 1 +- pop %r12 ++ pop %r15 ++ pax_force_retaddr ret ENDPROC(aesni_gcm_dec) -@@ -1705,6 +1707,7 @@ _return_T_done_encrypt: +@@ -1529,7 +1531,7 @@ ENDPROC(aesni_gcm_dec) + * poly = x^128 + x^127 + x^126 + x^121 + 1 + ***************************************************************************/ + ENTRY(aesni_gcm_enc) +- push %r12 ++ push %r15 + push %r13 + push %r14 + mov %rsp, %r14 +@@ -1539,8 +1541,8 @@ ENTRY(aesni_gcm_enc) + # + sub $VARIABLE_OFFSET, %rsp + and $~63, %rsp +- mov %arg6, %r12 +- movdqu (%r12), %xmm13 ++ mov %arg6, %r15 ++ movdqu (%r15), %xmm13 + movdqa SHUF_MASK(%rip), %xmm2 + PSHUFB_XMM %xmm2, %xmm13 + +@@ -1564,13 +1566,13 @@ ENTRY(aesni_gcm_enc) + movdqa %xmm13, HashKey(%rsp) + mov %arg4, %r13 # %xmm13 holds HashKey<<1 (mod poly) + and $-16, %r13 +- mov %r13, %r12 ++ mov %r13, %r15 + + # Encrypt first few blocks + +- and $(3<<4), %r12 ++ and $(3<<4), %r15 + jz _initial_num_blocks_is_0_encrypt +- cmp $(2<<4), %r12 ++ cmp $(2<<4), %r15 + jb _initial_num_blocks_is_1_encrypt + je _initial_num_blocks_is_2_encrypt + _initial_num_blocks_is_3_encrypt: +@@ -1623,14 +1625,14 @@ _zero_cipher_left_encrypt: + sub $16, %r11 + add %r13, %r11 + movdqu (%arg3,%r11,1), %xmm1 # receive the last <16 byte blocks +- lea SHIFT_MASK+16(%rip), %r12 +- sub %r13, %r12 ++ lea SHIFT_MASK+16(%rip), %r15 ++ sub %r13, %r15 + # adjust the shuffle mask pointer to be able to shift 16-r13 bytes + # (%r13 is the number of bytes in plaintext mod 16) +- movdqu (%r12), %xmm2 # get the appropriate shuffle mask ++ movdqu (%r15), %xmm2 # get the appropriate shuffle mask + PSHUFB_XMM %xmm2, %xmm1 # shift right 16-r13 byte + pxor %xmm1, %xmm0 # Plaintext XOR Encrypt(K, Yn) +- movdqu ALL_F-SHIFT_MASK(%r12), %xmm1 ++ movdqu ALL_F-SHIFT_MASK(%r15), %xmm1 + # get the appropriate mask to mask out top 16-r13 bytes of xmm0 + pand %xmm1, %xmm0 # mask out top 16-r13 bytes of xmm0 + movdqa SHUF_MASK(%rip), %xmm10 +@@ -1663,9 +1665,9 @@ _less_than_8_bytes_left_encrypt: + sub $1, %r13 + jne _less_than_8_bytes_left_encrypt + _multiple_of_16_bytes_encrypt: +- mov arg8, %r12 # %r12 = addLen (number of bytes) +- shl $3, %r12 +- movd %r12d, %xmm15 # len(A) in %xmm15 ++ mov arg8, %r15 # %r15 = addLen (number of bytes) ++ shl $3, %r15 ++ movd %r15d, %xmm15 # len(A) in %xmm15 + shl $3, %arg4 # len(C) in bits (*128) + MOVQ_R64_XMM %arg4, %xmm1 + pslldq $8, %xmm15 # %xmm15 = len(A)||0x0000000000000000 +@@ -1704,7 +1706,8 @@ _return_T_done_encrypt: + mov %r14, %rsp pop %r14 pop %r13 - pop %r12 -+ pax_force_retaddr 0, 1 +- pop %r12 ++ pop %r15 ++ pax_force_retaddr ret ENDPROC(aesni_gcm_enc) @@ -12212,7 +12465,7 @@ index 477e9d7..3ab339f 100644 pxor %xmm1, %xmm0 movaps %xmm0, (TKEYP) add $0x10, TKEYP -+ pax_force_retaddr_bts ++ pax_force_retaddr ret ENDPROC(_key_expansion_128) ENDPROC(_key_expansion_256a) @@ -12220,7 +12473,7 @@ index 477e9d7..3ab339f 100644 shufps $0b01001110, %xmm2, %xmm1 movaps %xmm1, 0x10(TKEYP) add $0x20, TKEYP -+ pax_force_retaddr_bts ++ pax_force_retaddr ret ENDPROC(_key_expansion_192a) @@ -12228,7 +12481,7 @@ index 477e9d7..3ab339f 100644 movaps %xmm0, (TKEYP) add $0x10, TKEYP -+ pax_force_retaddr_bts ++ pax_force_retaddr ret ENDPROC(_key_expansion_192b) @@ -12236,7 +12489,7 @@ index 477e9d7..3ab339f 100644 pxor %xmm1, %xmm2 movaps %xmm2, (TKEYP) add $0x10, TKEYP -+ pax_force_retaddr_bts ++ pax_force_retaddr ret ENDPROC(_key_expansion_256b) @@ -12244,7 +12497,7 @@ index 477e9d7..3ab339f 100644 #ifndef __x86_64__ popl KEYP #endif -+ pax_force_retaddr 0, 1 ++ pax_force_retaddr ret ENDPROC(aesni_set_key) @@ -12252,7 +12505,7 @@ index 477e9d7..3ab339f 100644 popl KLEN popl KEYP #endif -+ pax_force_retaddr 0, 1 ++ pax_force_retaddr ret ENDPROC(aesni_enc) @@ -12260,7 +12513,7 @@ index 477e9d7..3ab339f 100644 AESENC KEY STATE movaps 0x70(TKEYP), KEY AESENCLAST KEY STATE -+ pax_force_retaddr_bts ++ pax_force_retaddr ret ENDPROC(_aesni_enc1) @@ -12268,7 +12521,7 @@ index 477e9d7..3ab339f 100644 AESENCLAST KEY STATE2 AESENCLAST KEY STATE3 AESENCLAST KEY STATE4 -+ pax_force_retaddr_bts ++ pax_force_retaddr ret ENDPROC(_aesni_enc4) @@ -12276,7 +12529,7 @@ index 477e9d7..3ab339f 100644 popl KLEN popl KEYP #endif -+ pax_force_retaddr 0, 1 ++ pax_force_retaddr ret ENDPROC(aesni_dec) @@ -12284,7 +12537,7 @@ index 477e9d7..3ab339f 100644 AESDEC KEY STATE movaps 0x70(TKEYP), KEY AESDECLAST KEY STATE -+ pax_force_retaddr_bts ++ pax_force_retaddr ret ENDPROC(_aesni_dec1) @@ -12292,7 +12545,7 @@ index 477e9d7..3ab339f 100644 AESDECLAST KEY STATE2 AESDECLAST KEY STATE3 AESDECLAST KEY STATE4 -+ pax_force_retaddr_bts ++ pax_force_retaddr ret ENDPROC(_aesni_dec4) @@ -12300,7 +12553,7 @@ index 477e9d7..3ab339f 100644 popl KEYP popl LEN #endif -+ pax_force_retaddr 0, 1 ++ pax_force_retaddr ret ENDPROC(aesni_ecb_enc) @@ -12308,7 +12561,7 @@ index 477e9d7..3ab339f 100644 popl KEYP popl LEN #endif -+ pax_force_retaddr 0, 1 ++ pax_force_retaddr ret ENDPROC(aesni_ecb_dec) @@ -12316,7 +12569,7 @@ index 477e9d7..3ab339f 100644 popl LEN popl IVP #endif -+ pax_force_retaddr 0, 1 ++ pax_force_retaddr ret ENDPROC(aesni_cbc_enc) @@ -12324,7 +12577,7 @@ index 477e9d7..3ab339f 100644 popl LEN popl IVP #endif -+ pax_force_retaddr 0, 1 ++ pax_force_retaddr ret ENDPROC(aesni_cbc_dec) @@ -12332,7 +12585,7 @@ index 477e9d7..3ab339f 100644 mov $1, TCTR_LOW MOVQ_R64_XMM TCTR_LOW INC MOVQ_R64_XMM CTR TCTR_LOW -+ pax_force_retaddr_bts ++ pax_force_retaddr ret ENDPROC(_aesni_inc_init) @@ -12340,7 +12593,7 @@ index 477e9d7..3ab339f 100644 .Linc_low: movaps CTR, IV PSHUFB_XMM BSWAP_MASK IV -+ pax_force_retaddr_bts ++ pax_force_retaddr ret ENDPROC(_aesni_inc) @@ -12348,7 +12601,7 @@ index 477e9d7..3ab339f 100644 .Lctr_enc_ret: movups IV, (IVP) .Lctr_enc_just_ret: -+ pax_force_retaddr 0, 1 ++ pax_force_retaddr ret ENDPROC(aesni_ctr_enc) @@ -12356,12 +12609,12 @@ index 477e9d7..3ab339f 100644 pxor INC, STATE4 movdqu STATE4, 0x70(OUTP) -+ pax_force_retaddr 0, 1 ++ pax_force_retaddr ret ENDPROC(aesni_xts_crypt8) diff --git a/arch/x86/crypto/blowfish-x86_64-asm_64.S b/arch/x86/crypto/blowfish-x86_64-asm_64.S -index 246c670..4d1ed00 100644 +index 246c670..466e2d6 100644 --- a/arch/x86/crypto/blowfish-x86_64-asm_64.S +++ b/arch/x86/crypto/blowfish-x86_64-asm_64.S @@ -21,6 +21,7 @@ @@ -12376,11 +12629,11 @@ index 246c670..4d1ed00 100644 jnz .L__enc_xor; write_block(); -+ pax_force_retaddr 0, 1 ++ pax_force_retaddr ret; .L__enc_xor: xor_block(); -+ pax_force_retaddr 0, 1 ++ pax_force_retaddr ret; ENDPROC(__blowfish_enc_blk) @@ -12388,7 +12641,7 @@ index 246c670..4d1ed00 100644 movq %r11, %rbp; -+ pax_force_retaddr 0, 1 ++ pax_force_retaddr ret; ENDPROC(blowfish_dec_blk) @@ -12396,7 +12649,7 @@ index 246c670..4d1ed00 100644 popq %rbx; popq %rbp; -+ pax_force_retaddr 0, 1 ++ pax_force_retaddr ret; .L__enc_xor4: @@ -12404,7 +12657,7 @@ index 246c670..4d1ed00 100644 popq %rbx; popq %rbp; -+ pax_force_retaddr 0, 1 ++ pax_force_retaddr ret; ENDPROC(__blowfish_enc_blk_4way) @@ -12412,11 +12665,11 @@ index 246c670..4d1ed00 100644 popq %rbx; popq %rbp; -+ pax_force_retaddr 0, 1 ++ pax_force_retaddr ret; ENDPROC(blowfish_dec_blk_4way) diff --git a/arch/x86/crypto/camellia-aesni-avx-asm_64.S b/arch/x86/crypto/camellia-aesni-avx-asm_64.S -index ce71f92..2dd5b1e 100644 +index ce71f92..1dce7ec 100644 --- a/arch/x86/crypto/camellia-aesni-avx-asm_64.S +++ b/arch/x86/crypto/camellia-aesni-avx-asm_64.S @@ -16,6 +16,7 @@ @@ -12431,7 +12684,7 @@ index ce71f92..2dd5b1e 100644 roundsm16(%xmm0, %xmm1, %xmm2, %xmm3, %xmm4, %xmm5, %xmm6, %xmm7, %xmm8, %xmm9, %xmm10, %xmm11, %xmm12, %xmm13, %xmm14, %xmm15, %rcx, (%r9)); -+ pax_force_retaddr_bts ++ pax_force_retaddr ret; ENDPROC(roundsm16_x0_x1_x2_x3_x4_x5_x6_x7_y0_y1_y2_y3_y4_y5_y6_y7_cd) @@ -12439,7 +12692,7 @@ index ce71f92..2dd5b1e 100644 roundsm16(%xmm4, %xmm5, %xmm6, %xmm7, %xmm0, %xmm1, %xmm2, %xmm3, %xmm12, %xmm13, %xmm14, %xmm15, %xmm8, %xmm9, %xmm10, %xmm11, %rax, (%r9)); -+ pax_force_retaddr_bts ++ pax_force_retaddr ret; ENDPROC(roundsm16_x4_x5_x6_x7_x0_x1_x2_x3_y4_y5_y6_y7_y0_y1_y2_y3_ab) @@ -12447,7 +12700,7 @@ index ce71f92..2dd5b1e 100644 %xmm8, %xmm9, %xmm10, %xmm11, %xmm12, %xmm13, %xmm14, %xmm15, (key_table)(CTX, %r8, 8), (%rax), 1 * 16(%rax)); -+ pax_force_retaddr_bts ++ pax_force_retaddr ret; .align 8 @@ -12455,7 +12708,7 @@ index ce71f92..2dd5b1e 100644 %xmm8, %xmm9, %xmm10, %xmm11, %xmm12, %xmm13, %xmm14, %xmm15, (key_table)(CTX), (%rax), 1 * 16(%rax)); -+ pax_force_retaddr_bts ++ pax_force_retaddr ret; .align 8 @@ -12463,7 +12716,7 @@ index ce71f92..2dd5b1e 100644 %xmm15, %xmm14, %xmm13, %xmm12, %xmm11, %xmm10, %xmm9, %xmm8, %rsi); -+ pax_force_retaddr 0, 1 ++ pax_force_retaddr ret; ENDPROC(camellia_ecb_enc_16way) @@ -12471,7 +12724,7 @@ index ce71f92..2dd5b1e 100644 %xmm15, %xmm14, %xmm13, %xmm12, %xmm11, %xmm10, %xmm9, %xmm8, %rsi); -+ pax_force_retaddr 0, 1 ++ pax_force_retaddr ret; ENDPROC(camellia_ecb_dec_16way) @@ -12479,7 +12732,7 @@ index ce71f92..2dd5b1e 100644 %xmm15, %xmm14, %xmm13, %xmm12, %xmm11, %xmm10, %xmm9, %xmm8, %rsi); -+ pax_force_retaddr 0, 1 ++ pax_force_retaddr ret; ENDPROC(camellia_cbc_dec_16way) @@ -12487,7 +12740,7 @@ index ce71f92..2dd5b1e 100644 %xmm15, %xmm14, %xmm13, %xmm12, %xmm11, %xmm10, %xmm9, %xmm8, %rsi); -+ pax_force_retaddr 0, 1 ++ pax_force_retaddr ret; ENDPROC(camellia_ctr_16way) @@ -12495,12 +12748,12 @@ index ce71f92..2dd5b1e 100644 %xmm15, %xmm14, %xmm13, %xmm12, %xmm11, %xmm10, %xmm9, %xmm8, %rsi); -+ pax_force_retaddr 0, 1 ++ pax_force_retaddr ret; ENDPROC(camellia_xts_crypt_16way) diff --git a/arch/x86/crypto/camellia-aesni-avx2-asm_64.S b/arch/x86/crypto/camellia-aesni-avx2-asm_64.S -index 0e0b886..8fc756a 100644 +index 0e0b886..5a3123c 100644 --- a/arch/x86/crypto/camellia-aesni-avx2-asm_64.S +++ b/arch/x86/crypto/camellia-aesni-avx2-asm_64.S @@ -11,6 +11,7 @@ @@ -12515,7 +12768,7 @@ index 0e0b886..8fc756a 100644 roundsm32(%ymm0, %ymm1, %ymm2, %ymm3, %ymm4, %ymm5, %ymm6, %ymm7, %ymm8, %ymm9, %ymm10, %ymm11, %ymm12, %ymm13, %ymm14, %ymm15, %rcx, (%r9)); -+ pax_force_retaddr_bts ++ pax_force_retaddr ret; ENDPROC(roundsm32_x0_x1_x2_x3_x4_x5_x6_x7_y0_y1_y2_y3_y4_y5_y6_y7_cd) @@ -12523,7 +12776,7 @@ index 0e0b886..8fc756a 100644 roundsm32(%ymm4, %ymm5, %ymm6, %ymm7, %ymm0, %ymm1, %ymm2, %ymm3, %ymm12, %ymm13, %ymm14, %ymm15, %ymm8, %ymm9, %ymm10, %ymm11, %rax, (%r9)); -+ pax_force_retaddr_bts ++ pax_force_retaddr ret; ENDPROC(roundsm32_x4_x5_x6_x7_x0_x1_x2_x3_y4_y5_y6_y7_y0_y1_y2_y3_ab) @@ -12531,7 +12784,7 @@ index 0e0b886..8fc756a 100644 %ymm8, %ymm9, %ymm10, %ymm11, %ymm12, %ymm13, %ymm14, %ymm15, (key_table)(CTX, %r8, 8), (%rax), 1 * 32(%rax)); -+ pax_force_retaddr_bts ++ pax_force_retaddr ret; .align 8 @@ -12539,7 +12792,7 @@ index 0e0b886..8fc756a 100644 %ymm8, %ymm9, %ymm10, %ymm11, %ymm12, %ymm13, %ymm14, %ymm15, (key_table)(CTX), (%rax), 1 * 32(%rax)); -+ pax_force_retaddr_bts ++ pax_force_retaddr ret; .align 8 @@ -12547,7 +12800,7 @@ index 0e0b886..8fc756a 100644 vzeroupper; -+ pax_force_retaddr 0, 1 ++ pax_force_retaddr ret; ENDPROC(camellia_ecb_enc_32way) @@ -12555,7 +12808,7 @@ index 0e0b886..8fc756a 100644 vzeroupper; -+ pax_force_retaddr 0, 1 ++ pax_force_retaddr ret; ENDPROC(camellia_ecb_dec_32way) @@ -12563,7 +12816,7 @@ index 0e0b886..8fc756a 100644 vzeroupper; -+ pax_force_retaddr 0, 1 ++ pax_force_retaddr ret; ENDPROC(camellia_cbc_dec_32way) @@ -12571,7 +12824,7 @@ index 0e0b886..8fc756a 100644 vzeroupper; -+ pax_force_retaddr 0, 1 ++ pax_force_retaddr ret; ENDPROC(camellia_ctr_32way) @@ -12579,12 +12832,12 @@ index 0e0b886..8fc756a 100644 vzeroupper; -+ pax_force_retaddr 0, 1 ++ pax_force_retaddr ret; ENDPROC(camellia_xts_crypt_32way) diff --git a/arch/x86/crypto/camellia-x86_64-asm_64.S b/arch/x86/crypto/camellia-x86_64-asm_64.S -index 310319c..ce174a4 100644 +index 310319c..db3d7b5 100644 --- a/arch/x86/crypto/camellia-x86_64-asm_64.S +++ b/arch/x86/crypto/camellia-x86_64-asm_64.S @@ -21,6 +21,7 @@ @@ -12599,14 +12852,14 @@ index 310319c..ce174a4 100644 enc_outunpack(mov, RT1); movq RRBP, %rbp; -+ pax_force_retaddr 0, 1 ++ pax_force_retaddr ret; .L__enc_xor: enc_outunpack(xor, RT1); movq RRBP, %rbp; -+ pax_force_retaddr 0, 1 ++ pax_force_retaddr ret; ENDPROC(__camellia_enc_blk) @@ -12614,7 +12867,7 @@ index 310319c..ce174a4 100644 dec_outunpack(); movq RRBP, %rbp; -+ pax_force_retaddr 0, 1 ++ pax_force_retaddr ret; ENDPROC(camellia_dec_blk) @@ -12622,7 +12875,7 @@ index 310319c..ce174a4 100644 movq RRBP, %rbp; popq %rbx; -+ pax_force_retaddr 0, 1 ++ pax_force_retaddr ret; .L__enc2_xor: @@ -12630,7 +12883,7 @@ index 310319c..ce174a4 100644 movq RRBP, %rbp; popq %rbx; -+ pax_force_retaddr 0, 1 ++ pax_force_retaddr ret; ENDPROC(__camellia_enc_blk_2way) @@ -12638,11 +12891,11 @@ index 310319c..ce174a4 100644 movq RRBP, %rbp; movq RXOR, %rbx; -+ pax_force_retaddr 0, 1 ++ pax_force_retaddr ret; ENDPROC(camellia_dec_blk_2way) diff --git a/arch/x86/crypto/cast5-avx-x86_64-asm_64.S b/arch/x86/crypto/cast5-avx-x86_64-asm_64.S -index c35fd5d..c1ee236 100644 +index c35fd5d..2d8c7db 100644 --- a/arch/x86/crypto/cast5-avx-x86_64-asm_64.S +++ b/arch/x86/crypto/cast5-avx-x86_64-asm_64.S @@ -24,6 +24,7 @@ @@ -12657,7 +12910,7 @@ index c35fd5d..c1ee236 100644 outunpack_blocks(RR3, RL3, RTMP, RX, RKM); outunpack_blocks(RR4, RL4, RTMP, RX, RKM); -+ pax_force_retaddr 0, 1 ++ pax_force_retaddr ret; ENDPROC(__cast5_enc_blk16) @@ -12665,7 +12918,7 @@ index c35fd5d..c1ee236 100644 outunpack_blocks(RR3, RL3, RTMP, RX, RKM); outunpack_blocks(RR4, RL4, RTMP, RX, RKM); -+ pax_force_retaddr 0, 1 ++ pax_force_retaddr ret; .L__skip_dec: @@ -12685,23 +12938,103 @@ index c35fd5d..c1ee236 100644 ret; ENDPROC(cast5_ecb_dec_16way) -@@ -469,6 +474,7 @@ ENTRY(cast5_cbc_dec_16way) +@@ -430,10 +435,10 @@ ENTRY(cast5_cbc_dec_16way) + * %rdx: src + */ - popq %r12; +- pushq %r12; ++ pushq %r14; + + movq %rsi, %r11; +- movq %rdx, %r12; ++ movq %rdx, %r14; + + vmovdqu (0*16)(%rdx), RL1; + vmovdqu (1*16)(%rdx), RR1; +@@ -447,16 +452,16 @@ ENTRY(cast5_cbc_dec_16way) + call __cast5_dec_blk16; + + /* xor with src */ +- vmovq (%r12), RX; ++ vmovq (%r14), RX; + vpshufd $0x4f, RX, RX; + vpxor RX, RR1, RR1; +- vpxor 0*16+8(%r12), RL1, RL1; +- vpxor 1*16+8(%r12), RR2, RR2; +- vpxor 2*16+8(%r12), RL2, RL2; +- vpxor 3*16+8(%r12), RR3, RR3; +- vpxor 4*16+8(%r12), RL3, RL3; +- vpxor 5*16+8(%r12), RR4, RR4; +- vpxor 6*16+8(%r12), RL4, RL4; ++ vpxor 0*16+8(%r14), RL1, RL1; ++ vpxor 1*16+8(%r14), RR2, RR2; ++ vpxor 2*16+8(%r14), RL2, RL2; ++ vpxor 3*16+8(%r14), RR3, RR3; ++ vpxor 4*16+8(%r14), RL3, RL3; ++ vpxor 5*16+8(%r14), RR4, RR4; ++ vpxor 6*16+8(%r14), RL4, RL4; + + vmovdqu RR1, (0*16)(%r11); + vmovdqu RL1, (1*16)(%r11); +@@ -467,8 +472,9 @@ ENTRY(cast5_cbc_dec_16way) + vmovdqu RR4, (6*16)(%r11); + vmovdqu RL4, (7*16)(%r11); + +- popq %r12; ++ popq %r14; + pax_force_retaddr ret; ENDPROC(cast5_cbc_dec_16way) -@@ -542,5 +548,6 @@ ENTRY(cast5_ctr_16way) +@@ -480,10 +486,10 @@ ENTRY(cast5_ctr_16way) + * %rcx: iv (big endian, 64bit) + */ - popq %r12; +- pushq %r12; ++ pushq %r14; + + movq %rsi, %r11; +- movq %rdx, %r12; ++ movq %rdx, %r14; + + vpcmpeqd RTMP, RTMP, RTMP; + vpsrldq $8, RTMP, RTMP; /* low: -1, high: 0 */ +@@ -523,14 +529,14 @@ ENTRY(cast5_ctr_16way) + call __cast5_enc_blk16; + + /* dst = src ^ iv */ +- vpxor (0*16)(%r12), RR1, RR1; +- vpxor (1*16)(%r12), RL1, RL1; +- vpxor (2*16)(%r12), RR2, RR2; +- vpxor (3*16)(%r12), RL2, RL2; +- vpxor (4*16)(%r12), RR3, RR3; +- vpxor (5*16)(%r12), RL3, RL3; +- vpxor (6*16)(%r12), RR4, RR4; +- vpxor (7*16)(%r12), RL4, RL4; ++ vpxor (0*16)(%r14), RR1, RR1; ++ vpxor (1*16)(%r14), RL1, RL1; ++ vpxor (2*16)(%r14), RR2, RR2; ++ vpxor (3*16)(%r14), RL2, RL2; ++ vpxor (4*16)(%r14), RR3, RR3; ++ vpxor (5*16)(%r14), RL3, RL3; ++ vpxor (6*16)(%r14), RR4, RR4; ++ vpxor (7*16)(%r14), RL4, RL4; + vmovdqu RR1, (0*16)(%r11); + vmovdqu RL1, (1*16)(%r11); + vmovdqu RR2, (2*16)(%r11); +@@ -540,7 +546,8 @@ ENTRY(cast5_ctr_16way) + vmovdqu RR4, (6*16)(%r11); + vmovdqu RL4, (7*16)(%r11); + +- popq %r12; ++ popq %r14; + pax_force_retaddr ret; ENDPROC(cast5_ctr_16way) diff --git a/arch/x86/crypto/cast6-avx-x86_64-asm_64.S b/arch/x86/crypto/cast6-avx-x86_64-asm_64.S -index e3531f8..18ded3a 100644 +index e3531f8..e123f35 100644 --- a/arch/x86/crypto/cast6-avx-x86_64-asm_64.S +++ b/arch/x86/crypto/cast6-avx-x86_64-asm_64.S @@ -24,6 +24,7 @@ @@ -12716,7 +13049,7 @@ index e3531f8..18ded3a 100644 outunpack_blocks(RA1, RB1, RC1, RD1, RTMP, RX, RKRF, RKM); outunpack_blocks(RA2, RB2, RC2, RD2, RTMP, RX, RKRF, RKM); -+ pax_force_retaddr 0, 1 ++ pax_force_retaddr ret; ENDPROC(__cast6_enc_blk8) @@ -12724,7 +13057,7 @@ index e3531f8..18ded3a 100644 outunpack_blocks(RA1, RB1, RC1, RD1, RTMP, RX, RKRF, RKM); outunpack_blocks(RA2, RB2, RC2, RD2, RTMP, RX, RKRF, RKM); -+ pax_force_retaddr 0, 1 ++ pax_force_retaddr ret; ENDPROC(__cast6_dec_blk8) @@ -12744,17 +13077,52 @@ index e3531f8..18ded3a 100644 ret; ENDPROC(cast6_ecb_dec_8way) -@@ -399,6 +404,7 @@ ENTRY(cast6_cbc_dec_8way) +@@ -386,19 +391,20 @@ ENTRY(cast6_cbc_dec_8way) + * %rdx: src + */ + +- pushq %r12; ++ pushq %r14; + + movq %rsi, %r11; +- movq %rdx, %r12; ++ movq %rdx, %r14; + + load_8way(%rdx, RA1, RB1, RC1, RD1, RA2, RB2, RC2, RD2); + + call __cast6_dec_blk8; + +- store_cbc_8way(%r12, %r11, RA1, RB1, RC1, RD1, RA2, RB2, RC2, RD2); ++ store_cbc_8way(%r14, %r11, RA1, RB1, RC1, RD1, RA2, RB2, RC2, RD2); - popq %r12; +- popq %r12; ++ popq %r14; + pax_force_retaddr ret; ENDPROC(cast6_cbc_dec_8way) -@@ -424,6 +430,7 @@ ENTRY(cast6_ctr_8way) +@@ -410,20 +416,21 @@ ENTRY(cast6_ctr_8way) + * %rcx: iv (little endian, 128bit) + */ + +- pushq %r12; ++ pushq %r14; + + movq %rsi, %r11; +- movq %rdx, %r12; ++ movq %rdx, %r14; + + load_ctr_8way(%rcx, .Lbswap128_mask, RA1, RB1, RC1, RD1, RA2, RB2, RC2, + RD2, RX, RKR, RKM); + + call __cast6_enc_blk8; - popq %r12; +- store_ctr_8way(%r12, %r11, RA1, RB1, RC1, RD1, RA2, RB2, RC2, RD2); ++ store_ctr_8way(%r14, %r11, RA1, RB1, RC1, RD1, RA2, RB2, RC2, RD2); + +- popq %r12; ++ popq %r14; + pax_force_retaddr ret; @@ -12776,7 +13144,7 @@ index e3531f8..18ded3a 100644 ret; ENDPROC(cast6_xts_dec_8way) diff --git a/arch/x86/crypto/crc32c-pcl-intel-asm_64.S b/arch/x86/crypto/crc32c-pcl-intel-asm_64.S -index dbc4339..3d868c5 100644 +index dbc4339..de6e120 100644 --- a/arch/x86/crypto/crc32c-pcl-intel-asm_64.S +++ b/arch/x86/crypto/crc32c-pcl-intel-asm_64.S @@ -45,6 +45,7 @@ @@ -12791,7 +13159,7 @@ index dbc4339..3d868c5 100644 popq %rsi popq %rdi popq %rbx -+ pax_force_retaddr 0, 1 ++ pax_force_retaddr ret ################################################################ @@ -12839,7 +13207,7 @@ index 586f41a..d02851e 100644 ret ENDPROC(clmul_ghash_setkey) diff --git a/arch/x86/crypto/salsa20-x86_64-asm_64.S b/arch/x86/crypto/salsa20-x86_64-asm_64.S -index 9279e0b..9270820 100644 +index 9279e0b..c4b3d2c 100644 --- a/arch/x86/crypto/salsa20-x86_64-asm_64.S +++ b/arch/x86/crypto/salsa20-x86_64-asm_64.S @@ -1,4 +1,5 @@ @@ -12852,7 +13220,7 @@ index 9279e0b..9270820 100644 add %r11,%rsp mov %rdi,%rax mov %rsi,%rdx -+ pax_force_retaddr 0, 1 ++ pax_force_retaddr ret # bytesatleast65: ._bytesatleast65: @@ -13056,7 +13424,7 @@ index acc066c..1559cc4 100644 ret; ENDPROC(serpent_dec_blk_8way) diff --git a/arch/x86/crypto/sha1_ssse3_asm.S b/arch/x86/crypto/sha1_ssse3_asm.S -index a410950..3356d42 100644 +index a410950..9dfe7ad 100644 --- a/arch/x86/crypto/sha1_ssse3_asm.S +++ b/arch/x86/crypto/sha1_ssse3_asm.S @@ -29,6 +29,7 @@ @@ -13067,16 +13435,35 @@ index a410950..3356d42 100644 #define CTX %rdi // arg1 #define BUF %rsi // arg2 -@@ -104,6 +105,7 @@ - pop %r12 +@@ -75,9 +76,9 @@ + + push %rbx + push %rbp +- push %r12 ++ push %r14 + +- mov %rsp, %r12 ++ mov %rsp, %r14 + sub $64, %rsp # allocate workspace + and $~15, %rsp # align stack + +@@ -99,11 +100,12 @@ + xor %rax, %rax + rep stosq + +- mov %r12, %rsp # deallocate workspace ++ mov %r14, %rsp # deallocate workspace + +- pop %r12 ++ pop %r14 pop %rbp pop %rbx -+ pax_force_retaddr 0, 1 ++ pax_force_retaddr ret ENDPROC(\name) diff --git a/arch/x86/crypto/sha256-avx-asm.S b/arch/x86/crypto/sha256-avx-asm.S -index 642f156..4ab07b9 100644 +index 642f156..51a513c 100644 --- a/arch/x86/crypto/sha256-avx-asm.S +++ b/arch/x86/crypto/sha256-avx-asm.S @@ -49,6 +49,7 @@ @@ -13091,12 +13478,12 @@ index 642f156..4ab07b9 100644 popq %r13 popq %rbp popq %rbx -+ pax_force_retaddr 0, 1 ++ pax_force_retaddr ret ENDPROC(sha256_transform_avx) diff --git a/arch/x86/crypto/sha256-avx2-asm.S b/arch/x86/crypto/sha256-avx2-asm.S -index 9e86944..2e7f95a 100644 +index 9e86944..3795e6a 100644 --- a/arch/x86/crypto/sha256-avx2-asm.S +++ b/arch/x86/crypto/sha256-avx2-asm.S @@ -50,6 +50,7 @@ @@ -13111,12 +13498,12 @@ index 9e86944..2e7f95a 100644 popq %r12 popq %rbp popq %rbx -+ pax_force_retaddr 0, 1 ++ pax_force_retaddr ret ENDPROC(sha256_transform_rorx) diff --git a/arch/x86/crypto/sha256-ssse3-asm.S b/arch/x86/crypto/sha256-ssse3-asm.S -index f833b74..c36ed14 100644 +index f833b74..8c62a9e 100644 --- a/arch/x86/crypto/sha256-ssse3-asm.S +++ b/arch/x86/crypto/sha256-ssse3-asm.S @@ -47,6 +47,7 @@ @@ -13131,12 +13518,12 @@ index f833b74..c36ed14 100644 popq %rbp popq %rbx -+ pax_force_retaddr 0, 1 ++ pax_force_retaddr ret ENDPROC(sha256_transform_ssse3) diff --git a/arch/x86/crypto/sha512-avx-asm.S b/arch/x86/crypto/sha512-avx-asm.S -index 974dde9..4533d34 100644 +index 974dde9..a823ff9 100644 --- a/arch/x86/crypto/sha512-avx-asm.S +++ b/arch/x86/crypto/sha512-avx-asm.S @@ -49,6 +49,7 @@ @@ -13151,12 +13538,12 @@ index 974dde9..4533d34 100644 mov frame_RSPSAVE(%rsp), %rsp nowork: -+ pax_force_retaddr 0, 1 ++ pax_force_retaddr ret ENDPROC(sha512_transform_avx) diff --git a/arch/x86/crypto/sha512-avx2-asm.S b/arch/x86/crypto/sha512-avx2-asm.S -index 568b961..061ef1d 100644 +index 568b961..ed20c37 100644 --- a/arch/x86/crypto/sha512-avx2-asm.S +++ b/arch/x86/crypto/sha512-avx2-asm.S @@ -51,6 +51,7 @@ @@ -13171,12 +13558,12 @@ index 568b961..061ef1d 100644 # Restore Stack Pointer mov frame_RSPSAVE(%rsp), %rsp -+ pax_force_retaddr 0, 1 ++ pax_force_retaddr ret ENDPROC(sha512_transform_rorx) diff --git a/arch/x86/crypto/sha512-ssse3-asm.S b/arch/x86/crypto/sha512-ssse3-asm.S -index fb56855..e23914f 100644 +index fb56855..6edd768 100644 --- a/arch/x86/crypto/sha512-ssse3-asm.S +++ b/arch/x86/crypto/sha512-ssse3-asm.S @@ -48,6 +48,7 @@ @@ -13191,12 +13578,12 @@ index fb56855..e23914f 100644 mov frame_RSPSAVE(%rsp), %rsp nowork: -+ pax_force_retaddr 0, 1 ++ pax_force_retaddr ret ENDPROC(sha512_transform_ssse3) diff --git a/arch/x86/crypto/twofish-avx-x86_64-asm_64.S b/arch/x86/crypto/twofish-avx-x86_64-asm_64.S -index 0505813..63b1d00 100644 +index 0505813..b067311 100644 --- a/arch/x86/crypto/twofish-avx-x86_64-asm_64.S +++ b/arch/x86/crypto/twofish-avx-x86_64-asm_64.S @@ -24,6 +24,7 @@ @@ -13211,7 +13598,7 @@ index 0505813..63b1d00 100644 outunpack_blocks(RC1, RD1, RA1, RB1, RK1, RX0, RY0, RK2); outunpack_blocks(RC2, RD2, RA2, RB2, RK1, RX0, RY0, RK2); -+ pax_force_retaddr 0, 1 ++ pax_force_retaddr ret; ENDPROC(__twofish_enc_blk8) @@ -13219,7 +13606,7 @@ index 0505813..63b1d00 100644 outunpack_blocks(RA1, RB1, RC1, RD1, RK1, RX0, RY0, RK2); outunpack_blocks(RA2, RB2, RC2, RD2, RK1, RX0, RY0, RK2); -+ pax_force_retaddr 0, 1 ++ pax_force_retaddr ret; ENDPROC(__twofish_dec_blk8) @@ -13227,7 +13614,7 @@ index 0505813..63b1d00 100644 store_8way(%r11, RC1, RD1, RA1, RB1, RC2, RD2, RA2, RB2); -+ pax_force_retaddr 0, 1 ++ pax_force_retaddr ret; ENDPROC(twofish_ecb_enc_8way) @@ -13235,23 +13622,58 @@ index 0505813..63b1d00 100644 store_8way(%r11, RA1, RB1, RC1, RD1, RA2, RB2, RC2, RD2); -+ pax_force_retaddr 0, 1 ++ pax_force_retaddr ret; ENDPROC(twofish_ecb_dec_8way) -@@ -383,6 +388,7 @@ ENTRY(twofish_cbc_dec_8way) +@@ -370,19 +375,20 @@ ENTRY(twofish_cbc_dec_8way) + * %rdx: src + */ + +- pushq %r12; ++ pushq %r14; - popq %r12; + movq %rsi, %r11; +- movq %rdx, %r12; ++ movq %rdx, %r14; -+ pax_force_retaddr 0, 1 + load_8way(%rdx, RC1, RD1, RA1, RB1, RC2, RD2, RA2, RB2); + + call __twofish_dec_blk8; + +- store_cbc_8way(%r12, %r11, RA1, RB1, RC1, RD1, RA2, RB2, RC2, RD2); ++ store_cbc_8way(%r14, %r11, RA1, RB1, RC1, RD1, RA2, RB2, RC2, RD2); + +- popq %r12; ++ popq %r14; + ++ pax_force_retaddr ret; ENDPROC(twofish_cbc_dec_8way) -@@ -408,6 +414,7 @@ ENTRY(twofish_ctr_8way) +@@ -394,20 +400,21 @@ ENTRY(twofish_ctr_8way) + * %rcx: iv (little endian, 128bit) + */ - popq %r12; +- pushq %r12; ++ pushq %r14; -+ pax_force_retaddr 0, 1 + movq %rsi, %r11; +- movq %rdx, %r12; ++ movq %rdx, %r14; + + load_ctr_8way(%rcx, .Lbswap128_mask, RA1, RB1, RC1, RD1, RA2, RB2, RC2, + RD2, RX0, RX1, RY0); + + call __twofish_enc_blk8; + +- store_ctr_8way(%r12, %r11, RC1, RD1, RA1, RB1, RC2, RD2, RA2, RB2); ++ store_ctr_8way(%r14, %r11, RC1, RD1, RA1, RB1, RC2, RD2, RA2, RB2); + +- popq %r12; ++ popq %r14; + ++ pax_force_retaddr ret; ENDPROC(twofish_ctr_8way) @@ -13259,7 +13681,7 @@ index 0505813..63b1d00 100644 /* dst <= regs xor IVs(in dst) */ store_xts_8way(%r11, RC1, RD1, RA1, RB1, RC2, RD2, RA2, RB2); -+ pax_force_retaddr 0, 1 ++ pax_force_retaddr ret; ENDPROC(twofish_xts_enc_8way) @@ -13267,11 +13689,11 @@ index 0505813..63b1d00 100644 /* dst <= regs xor IVs(in dst) */ store_xts_8way(%r11, RA1, RB1, RC1, RD1, RA2, RB2, RC2, RD2); -+ pax_force_retaddr 0, 1 ++ pax_force_retaddr ret; ENDPROC(twofish_xts_dec_8way) diff --git a/arch/x86/crypto/twofish-x86_64-asm_64-3way.S b/arch/x86/crypto/twofish-x86_64-asm_64-3way.S -index 1c3b7ce..b365c5e 100644 +index 1c3b7ce..02f578d 100644 --- a/arch/x86/crypto/twofish-x86_64-asm_64-3way.S +++ b/arch/x86/crypto/twofish-x86_64-asm_64-3way.S @@ -21,6 +21,7 @@ @@ -13286,7 +13708,7 @@ index 1c3b7ce..b365c5e 100644 popq %r13; popq %r14; popq %r15; -+ pax_force_retaddr 0, 1 ++ pax_force_retaddr ret; .L__enc_xor3: @@ -13294,7 +13716,7 @@ index 1c3b7ce..b365c5e 100644 popq %r13; popq %r14; popq %r15; -+ pax_force_retaddr 0, 1 ++ pax_force_retaddr ret; ENDPROC(__twofish_enc_blk_3way) @@ -13302,11 +13724,11 @@ index 1c3b7ce..b365c5e 100644 popq %r13; popq %r14; popq %r15; -+ pax_force_retaddr 0, 1 ++ pax_force_retaddr ret; ENDPROC(twofish_dec_blk_3way) diff --git a/arch/x86/crypto/twofish-x86_64-asm_64.S b/arch/x86/crypto/twofish-x86_64-asm_64.S -index a039d21..29e7615 100644 +index a039d21..524b8b2 100644 --- a/arch/x86/crypto/twofish-x86_64-asm_64.S +++ b/arch/x86/crypto/twofish-x86_64-asm_64.S @@ -22,6 +22,7 @@ @@ -13321,7 +13743,7 @@ index a039d21..29e7615 100644 popq R1 movq $1,%rax -+ pax_force_retaddr 0, 1 ++ pax_force_retaddr ret ENDPROC(twofish_enc_blk) @@ -13329,14 +13751,14 @@ index a039d21..29e7615 100644 popq R1 movq $1,%rax -+ pax_force_retaddr 0, 1 ++ pax_force_retaddr ret ENDPROC(twofish_dec_blk) diff --git a/arch/x86/ia32/ia32_aout.c b/arch/x86/ia32/ia32_aout.c -index bae3aba..c1788c1 100644 +index d21ff89..6da8e6e 100644 --- a/arch/x86/ia32/ia32_aout.c +++ b/arch/x86/ia32/ia32_aout.c -@@ -159,6 +159,8 @@ static int aout_core_dump(long signr, struct pt_regs *regs, struct file *file, +@@ -153,6 +153,8 @@ static int aout_core_dump(struct coredump_params *cprm) unsigned long dump_start, dump_size; struct user32 dump; @@ -13346,9 +13768,18 @@ index bae3aba..c1788c1 100644 set_fs(KERNEL_DS); has_dumped = 1; diff --git a/arch/x86/ia32/ia32_signal.c b/arch/x86/ia32/ia32_signal.c -index 665a730..8e7a67a 100644 +index 2206757..85cbcfa 100644 --- a/arch/x86/ia32/ia32_signal.c +++ b/arch/x86/ia32/ia32_signal.c +@@ -218,7 +218,7 @@ asmlinkage long sys32_sigreturn(void) + if (__get_user(set.sig[0], &frame->sc.oldmask) + || (_COMPAT_NSIG_WORDS > 1 + && __copy_from_user((((char *) &set.sig) + 4), +- &frame->extramask, ++ frame->extramask, + sizeof(frame->extramask)))) + goto badframe; + @@ -338,7 +338,7 @@ static void __user *get_sigframe(struct ksignal *ksig, struct pt_regs *regs, sp -= frame_size; /* Align the stack pointer according to the i386 ABI, @@ -13358,6 +13789,15 @@ index 665a730..8e7a67a 100644 return (void __user *) sp; } +@@ -386,7 +386,7 @@ int ia32_setup_frame(int sig, struct ksignal *ksig, + restorer = VDSO32_SYMBOL(current->mm->context.vdso, + sigreturn); + else +- restorer = &frame->retcode; ++ restorer = frame->retcode; + } + + put_user_try { @@ -396,7 +396,7 @@ int ia32_setup_frame(int sig, struct ksignal *ksig, * These are actually not used anymore, but left because some * gdb versions depend on them as a marker. @@ -13386,7 +13826,7 @@ index 665a730..8e7a67a 100644 else - restorer = VDSO32_SYMBOL(current->mm->context.vdso, - rt_sigreturn); -+ restorer = &frame->retcode; ++ restorer = frame->retcode; put_user_ex(ptr_to_compat(restorer), &frame->pretcode); /* @@ -13399,7 +13839,7 @@ index 665a730..8e7a67a 100644 err |= copy_siginfo_to_user32(&frame->info, &ksig->info); diff --git a/arch/x86/ia32/ia32entry.S b/arch/x86/ia32/ia32entry.S -index 4299eb0..904b82a 100644 +index 4299eb0..c0687a7 100644 --- a/arch/x86/ia32/ia32entry.S +++ b/arch/x86/ia32/ia32entry.S @@ -15,8 +15,10 @@ @@ -13413,6 +13853,24 @@ index 4299eb0..904b82a 100644 /* Avoid __ASSEMBLER__'ifying just for this. */ #include +@@ -62,12 +64,12 @@ + */ + .macro LOAD_ARGS32 offset, _r9=0 + .if \_r9 +- movl \offset+16(%rsp),%r9d ++ movl \offset+R9(%rsp),%r9d + .endif +- movl \offset+40(%rsp),%ecx +- movl \offset+48(%rsp),%edx +- movl \offset+56(%rsp),%esi +- movl \offset+64(%rsp),%edi ++ movl \offset+RCX(%rsp),%ecx ++ movl \offset+RDX(%rsp),%edx ++ movl \offset+RSI(%rsp),%esi ++ movl \offset+RDI(%rsp),%edi + movl %eax,%eax /* zero extension */ + .endm + @@ -96,6 +98,32 @@ ENTRY(native_irq_enable_sysexit) ENDPROC(native_irq_enable_sysexit) #endif @@ -13514,7 +13972,7 @@ index 4299eb0..904b82a 100644 CFI_REMEMBER_STATE jnz sysenter_tracesys cmpq $(IA32_NR_syscalls-1),%rax -@@ -162,12 +209,15 @@ sysenter_do_call: +@@ -162,15 +209,18 @@ sysenter_do_call: sysenter_dispatch: call *ia32_sys_call_table(,%rax,8) movq %rax,RAX-ARGOFFSET(%rsp) @@ -13530,8 +13988,13 @@ index 4299eb0..904b82a 100644 + pax_erase_kstack + andl $~TS_COMPAT,TI_status(%r11) /* clear IF, that popfq doesn't enable interrupts early */ - andl $~0x200,EFLAGS-R11(%rsp) - movl RIP-R11(%rsp),%edx /* User %eip */ +- andl $~0x200,EFLAGS-R11(%rsp) +- movl RIP-R11(%rsp),%edx /* User %eip */ ++ andl $~X86_EFLAGS_IF,EFLAGS(%rsp) ++ movl RIP(%rsp),%edx /* User %eip */ + CFI_REGISTER rip,rdx + RESTORE_ARGS 0,24,0,0,0,0 + xorq %r8,%r8 @@ -193,6 +243,9 @@ sysexit_from_sys_call: movl %eax,%esi /* 2nd arg: syscall number */ movl $AUDIT_ARCH_I386,%edi /* 1st arg: audit arch */ @@ -13640,7 +14103,7 @@ index 4299eb0..904b82a 100644 CFI_REMEMBER_STATE jnz cstar_tracesys cmpq $IA32_NR_syscalls-1,%rax -@@ -319,12 +395,15 @@ cstar_do_call: +@@ -319,13 +395,16 @@ cstar_do_call: cstar_dispatch: call *ia32_sys_call_table(,%rax,8) movq %rax,RAX-ARGOFFSET(%rsp) @@ -13652,12 +14115,14 @@ index 4299eb0..904b82a 100644 jnz sysretl_audit sysretl_from_sys_call: - andl $~TS_COMPAT,TI_status+THREAD_INFO(%rsp,RIP-ARGOFFSET) +- RESTORE_ARGS 0,-ARG_SKIP,0,0,0 + pax_exit_kernel_user + pax_erase_kstack + andl $~TS_COMPAT,TI_status(%r11) - RESTORE_ARGS 0,-ARG_SKIP,0,0,0 ++ RESTORE_ARGS 0,-ORIG_RAX,0,0,0 movl RIP-ARGOFFSET(%rsp),%ecx CFI_REGISTER rip,rcx + movl EFLAGS-ARGOFFSET(%rsp),%r11d @@ -352,7 +431,7 @@ sysretl_audit: cstar_tracesys: @@ -13747,7 +14212,7 @@ index 8e0ceec..af13504 100644 SET_GID(gid, from_kgid_munged(current_user_ns(), stat->gid)); if (!access_ok(VERIFY_WRITE, ubuf, sizeof(struct stat64)) || diff --git a/arch/x86/include/asm/alternative-asm.h b/arch/x86/include/asm/alternative-asm.h -index 372231c..a5aa1a1 100644 +index 372231c..51b537d 100644 --- a/arch/x86/include/asm/alternative-asm.h +++ b/arch/x86/include/asm/alternative-asm.h @@ -18,6 +18,45 @@ @@ -13773,13 +14238,13 @@ index 372231c..a5aa1a1 100644 + .if \reload + pax_set_fptr_mask + .endif -+ orq %r10,\rip(%rsp) ++ orq %r12,\rip(%rsp) + .endm + .macro pax_force_fptr ptr -+ orq %r10,\ptr ++ orq %r12,\ptr + .endm + .macro pax_set_fptr_mask -+ movabs $0x8000000000000000,%r10 ++ movabs $0x8000000000000000,%r12 + .endm +#endif +#else @@ -13854,10 +14319,10 @@ index 20370c6..a2eb9b0 100644 "popl %%ebp\n\t" "popl %%edi\n\t" diff --git a/arch/x86/include/asm/atomic.h b/arch/x86/include/asm/atomic.h -index 722aa3b..3a0bb27 100644 +index b17f4f4..9620151 100644 --- a/arch/x86/include/asm/atomic.h +++ b/arch/x86/include/asm/atomic.h -@@ -22,7 +22,18 @@ +@@ -23,7 +23,18 @@ */ static inline int atomic_read(const atomic_t *v) { @@ -13871,13 +14336,13 @@ index 722aa3b..3a0bb27 100644 + * + * Atomically reads the value of @v. + */ -+static inline int atomic_read_unchecked(const atomic_unchecked_t *v) ++static inline int __intentional_overflow(-1) atomic_read_unchecked(const atomic_unchecked_t *v) +{ + return (*(volatile const int *)&(v)->counter); } /** -@@ -38,6 +49,18 @@ static inline void atomic_set(atomic_t *v, int i) +@@ -39,6 +50,18 @@ static inline void atomic_set(atomic_t *v, int i) } /** @@ -13896,7 +14361,7 @@ index 722aa3b..3a0bb27 100644 * atomic_add - add integer to atomic variable * @i: integer value to add * @v: pointer of type atomic_t -@@ -46,7 +69,29 @@ static inline void atomic_set(atomic_t *v, int i) +@@ -47,7 +70,29 @@ static inline void atomic_set(atomic_t *v, int i) */ static inline void atomic_add(int i, atomic_t *v) { @@ -13927,7 +14392,7 @@ index 722aa3b..3a0bb27 100644 : "+m" (v->counter) : "ir" (i)); } -@@ -60,7 +105,29 @@ static inline void atomic_add(int i, atomic_t *v) +@@ -61,7 +106,29 @@ static inline void atomic_add(int i, atomic_t *v) */ static inline void atomic_sub(int i, atomic_t *v) { @@ -13958,25 +14423,16 @@ index 722aa3b..3a0bb27 100644 : "+m" (v->counter) : "ir" (i)); } -@@ -78,7 +145,16 @@ static inline int atomic_sub_and_test(int i, atomic_t *v) +@@ -77,7 +144,7 @@ static inline void atomic_sub(int i, atomic_t *v) + */ + static inline int atomic_sub_and_test(int i, atomic_t *v) { - unsigned char c; +- GEN_BINARY_RMWcc(LOCK_PREFIX "subl", v->counter, "er", i, "%0", "e"); ++ GEN_BINARY_RMWcc(LOCK_PREFIX "subl", LOCK_PREFIX "addl", v->counter, "er", i, "%0", "e"); + } -- asm volatile(LOCK_PREFIX "subl %2,%0; sete %1" -+ asm volatile(LOCK_PREFIX "subl %2,%0\n" -+ -+#ifdef CONFIG_PAX_REFCOUNT -+ "jno 0f\n" -+ LOCK_PREFIX "addl %2,%0\n" -+ "int $4\n0:\n" -+ _ASM_EXTABLE(0b, 0b) -+#endif -+ -+ "sete %1\n" - : "+m" (v->counter), "=qm" (c) - : "ir" (i) : "memory"); - return c; -@@ -92,7 +168,27 @@ static inline int atomic_sub_and_test(int i, atomic_t *v) + /** +@@ -88,7 +155,27 @@ static inline int atomic_sub_and_test(int i, atomic_t *v) */ static inline void atomic_inc(atomic_t *v) { @@ -14005,7 +14461,7 @@ index 722aa3b..3a0bb27 100644 : "+m" (v->counter)); } -@@ -104,7 +200,27 @@ static inline void atomic_inc(atomic_t *v) +@@ -100,7 +187,27 @@ static inline void atomic_inc(atomic_t *v) */ static inline void atomic_dec(atomic_t *v) { @@ -14034,42 +14490,21 @@ index 722aa3b..3a0bb27 100644 : "+m" (v->counter)); } -@@ -120,7 +236,16 @@ static inline int atomic_dec_and_test(atomic_t *v) +@@ -114,7 +221,7 @@ static inline void atomic_dec(atomic_t *v) + */ + static inline int atomic_dec_and_test(atomic_t *v) { - unsigned char c; +- GEN_UNARY_RMWcc(LOCK_PREFIX "decl", v->counter, "%0", "e"); ++ GEN_UNARY_RMWcc(LOCK_PREFIX "decl", LOCK_PREFIX "incl", v->counter, "%0", "e"); + } -- asm volatile(LOCK_PREFIX "decl %0; sete %1" -+ asm volatile(LOCK_PREFIX "decl %0\n" -+ -+#ifdef CONFIG_PAX_REFCOUNT -+ "jno 0f\n" -+ LOCK_PREFIX "incl %0\n" -+ "int $4\n0:\n" -+ _ASM_EXTABLE(0b, 0b) -+#endif -+ -+ "sete %1\n" - : "+m" (v->counter), "=qm" (c) - : : "memory"); - return c != 0; -@@ -138,7 +263,35 @@ static inline int atomic_inc_and_test(atomic_t *v) + /** +@@ -127,7 +234,20 @@ static inline int atomic_dec_and_test(atomic_t *v) + */ + static inline int atomic_inc_and_test(atomic_t *v) { - unsigned char c; - -- asm volatile(LOCK_PREFIX "incl %0; sete %1" -+ asm volatile(LOCK_PREFIX "incl %0\n" -+ -+#ifdef CONFIG_PAX_REFCOUNT -+ "jno 0f\n" -+ LOCK_PREFIX "decl %0\n" -+ "int $4\n0:\n" -+ _ASM_EXTABLE(0b, 0b) -+#endif -+ -+ "sete %1\n" -+ : "+m" (v->counter), "=qm" (c) -+ : : "memory"); -+ return c != 0; +- GEN_UNARY_RMWcc(LOCK_PREFIX "incl", v->counter, "%0", "e"); ++ GEN_UNARY_RMWcc(LOCK_PREFIX "incl", LOCK_PREFIX "decl", v->counter, "%0", "e"); +} + +/** @@ -14082,32 +14517,20 @@ index 722aa3b..3a0bb27 100644 + */ +static inline int atomic_inc_and_test_unchecked(atomic_unchecked_t *v) +{ -+ unsigned char c; -+ -+ asm volatile(LOCK_PREFIX "incl %0\n" -+ "sete %1\n" - : "+m" (v->counter), "=qm" (c) - : : "memory"); - return c != 0; -@@ -157,7 +310,16 @@ static inline int atomic_add_negative(int i, atomic_t *v) ++ GEN_UNARY_RMWcc_unchecked(LOCK_PREFIX "incl", v->counter, "%0", "e"); + } + + /** +@@ -141,7 +261,7 @@ static inline int atomic_inc_and_test(atomic_t *v) + */ + static inline int atomic_add_negative(int i, atomic_t *v) { - unsigned char c; +- GEN_BINARY_RMWcc(LOCK_PREFIX "addl", v->counter, "er", i, "%0", "s"); ++ GEN_BINARY_RMWcc(LOCK_PREFIX "addl", LOCK_PREFIX "subl", v->counter, "er", i, "%0", "s"); + } -- asm volatile(LOCK_PREFIX "addl %2,%0; sets %1" -+ asm volatile(LOCK_PREFIX "addl %2,%0\n" -+ -+#ifdef CONFIG_PAX_REFCOUNT -+ "jno 0f\n" -+ LOCK_PREFIX "subl %2,%0\n" -+ "int $4\n0:\n" -+ _ASM_EXTABLE(0b, 0b) -+#endif -+ -+ "sets %1\n" - : "+m" (v->counter), "=qm" (c) - : "ir" (i) : "memory"); - return c; -@@ -172,6 +334,18 @@ static inline int atomic_add_negative(int i, atomic_t *v) + /** +@@ -153,6 +273,18 @@ static inline int atomic_add_negative(int i, atomic_t *v) */ static inline int atomic_add_return(int i, atomic_t *v) { @@ -14126,7 +14549,7 @@ index 722aa3b..3a0bb27 100644 return i + xadd(&v->counter, i); } -@@ -188,6 +362,10 @@ static inline int atomic_sub_return(int i, atomic_t *v) +@@ -169,9 +301,18 @@ static inline int atomic_sub_return(int i, atomic_t *v) } #define atomic_inc_return(v) (atomic_add_return(1, v)) @@ -14136,18 +14559,17 @@ index 722aa3b..3a0bb27 100644 +} #define atomic_dec_return(v) (atomic_sub_return(1, v)) - static inline int atomic_cmpxchg(atomic_t *v, int old, int new) -@@ -195,11 +373,21 @@ static inline int atomic_cmpxchg(atomic_t *v, int old, int new) - return cmpxchg(&v->counter, old, new); - } - -+static inline int atomic_cmpxchg_unchecked(atomic_unchecked_t *v, int old, int new) +-static inline int atomic_cmpxchg(atomic_t *v, int old, int new) ++static inline int __intentional_overflow(-1) atomic_cmpxchg(atomic_t *v, int old, int new) +{ + return cmpxchg(&v->counter, old, new); +} + - static inline int atomic_xchg(atomic_t *v, int new) ++static inline int atomic_cmpxchg_unchecked(atomic_unchecked_t *v, int old, int new) { + return cmpxchg(&v->counter, old, new); + } +@@ -181,6 +322,11 @@ static inline int atomic_xchg(atomic_t *v, int new) return xchg(&v->counter, new); } @@ -14159,9 +14581,12 @@ index 722aa3b..3a0bb27 100644 /** * __atomic_add_unless - add unless the number is already a given value * @v: pointer of type atomic_t -@@ -211,12 +399,25 @@ static inline int atomic_xchg(atomic_t *v, int new) +@@ -190,14 +336,27 @@ static inline int atomic_xchg(atomic_t *v, int new) + * Atomically adds @a to @v, so long as @v was not already @u. + * Returns the old value of @v. */ - static inline int __atomic_add_unless(atomic_t *v, int a, int u) +-static inline int __atomic_add_unless(atomic_t *v, int a, int u) ++static inline int __intentional_overflow(-1) __atomic_add_unless(atomic_t *v, int a, int u) { - int c, old; + int c, old, new; @@ -14188,7 +14613,7 @@ index 722aa3b..3a0bb27 100644 if (likely(old == c)) break; c = old; -@@ -225,6 +426,49 @@ static inline int __atomic_add_unless(atomic_t *v, int a, int u) +@@ -206,6 +365,49 @@ static inline int __atomic_add_unless(atomic_t *v, int a, int u) } /** @@ -14238,7 +14663,7 @@ index 722aa3b..3a0bb27 100644 * atomic_inc_short - increment of a short integer * @v: pointer to type int * -@@ -253,14 +497,37 @@ static inline void atomic_or_long(unsigned long *v1, unsigned long v2) +@@ -234,14 +436,37 @@ static inline void atomic_or_long(unsigned long *v1, unsigned long v2) #endif /* These are x86-specific, used by some header files */ @@ -14284,7 +14709,7 @@ index 722aa3b..3a0bb27 100644 /* Atomic operations are already serializing on x86 */ #define smp_mb__before_atomic_dec() barrier() diff --git a/arch/x86/include/asm/atomic64_32.h b/arch/x86/include/asm/atomic64_32.h -index b154de7..aadebd8 100644 +index b154de7..bf18a5a 100644 --- a/arch/x86/include/asm/atomic64_32.h +++ b/arch/x86/include/asm/atomic64_32.h @@ -12,6 +12,14 @@ typedef struct { @@ -14388,7 +14813,7 @@ index b154de7..aadebd8 100644 + * + * Atomically reads the value of @v and returns it. + */ -+static inline long long atomic64_read_unchecked(atomic64_unchecked_t *v) ++static inline long long __intentional_overflow(-1) atomic64_read_unchecked(atomic64_unchecked_t *v) +{ + long long r; + alternative_atomic64(read, "=&A" (r), "c" (v) : "memory"); @@ -14459,7 +14884,7 @@ index b154de7..aadebd8 100644 * @i: integer value to subtract * @v: pointer to type atomic64_t diff --git a/arch/x86/include/asm/atomic64_64.h b/arch/x86/include/asm/atomic64_64.h -index 0e1cbfc..5623683 100644 +index 46e9052..ae45136 100644 --- a/arch/x86/include/asm/atomic64_64.h +++ b/arch/x86/include/asm/atomic64_64.h @@ -18,7 +18,19 @@ @@ -14477,7 +14902,7 @@ index 0e1cbfc..5623683 100644 + * Atomically reads the value of @v. + * Doesn't imply a read memory barrier. + */ -+static inline long atomic64_read_unchecked(const atomic64_unchecked_t *v) ++static inline long __intentional_overflow(-1) atomic64_read_unchecked(const atomic64_unchecked_t *v) +{ + return (*(volatile const long *)&(v)->counter); } @@ -14562,25 +14987,16 @@ index 0e1cbfc..5623683 100644 : "=m" (v->counter) : "er" (i), "m" (v->counter)); } -@@ -74,7 +142,16 @@ static inline int atomic64_sub_and_test(long i, atomic64_t *v) +@@ -72,7 +140,7 @@ static inline void atomic64_sub(long i, atomic64_t *v) + */ + static inline int atomic64_sub_and_test(long i, atomic64_t *v) { - unsigned char c; +- GEN_BINARY_RMWcc(LOCK_PREFIX "subq", v->counter, "er", i, "%0", "e"); ++ GEN_BINARY_RMWcc(LOCK_PREFIX "subq", LOCK_PREFIX "addq", v->counter, "er", i, "%0", "e"); + } -- asm volatile(LOCK_PREFIX "subq %2,%0; sete %1" -+ asm volatile(LOCK_PREFIX "subq %2,%0\n" -+ -+#ifdef CONFIG_PAX_REFCOUNT -+ "jno 0f\n" -+ LOCK_PREFIX "addq %2,%0\n" -+ "int $4\n0:\n" -+ _ASM_EXTABLE(0b, 0b) -+#endif -+ -+ "sete %1\n" - : "=m" (v->counter), "=qm" (c) - : "er" (i), "m" (v->counter) : "memory"); - return c; -@@ -88,6 +165,27 @@ static inline int atomic64_sub_and_test(long i, atomic64_t *v) + /** +@@ -83,6 +151,27 @@ static inline int atomic64_sub_and_test(long i, atomic64_t *v) */ static inline void atomic64_inc(atomic64_t *v) { @@ -14608,7 +15024,7 @@ index 0e1cbfc..5623683 100644 asm volatile(LOCK_PREFIX "incq %0" : "=m" (v->counter) : "m" (v->counter)); -@@ -101,7 +199,28 @@ static inline void atomic64_inc(atomic64_t *v) +@@ -96,7 +185,28 @@ static inline void atomic64_inc(atomic64_t *v) */ static inline void atomic64_dec(atomic64_t *v) { @@ -14638,61 +15054,34 @@ index 0e1cbfc..5623683 100644 : "=m" (v->counter) : "m" (v->counter)); } -@@ -118,7 +237,16 @@ static inline int atomic64_dec_and_test(atomic64_t *v) +@@ -111,7 +221,7 @@ static inline void atomic64_dec(atomic64_t *v) + */ + static inline int atomic64_dec_and_test(atomic64_t *v) { - unsigned char c; +- GEN_UNARY_RMWcc(LOCK_PREFIX "decq", v->counter, "%0", "e"); ++ GEN_UNARY_RMWcc(LOCK_PREFIX "decq", LOCK_PREFIX "incq", v->counter, "%0", "e"); + } -- asm volatile(LOCK_PREFIX "decq %0; sete %1" -+ asm volatile(LOCK_PREFIX "decq %0\n" -+ -+#ifdef CONFIG_PAX_REFCOUNT -+ "jno 0f\n" -+ LOCK_PREFIX "incq %0\n" -+ "int $4\n0:\n" -+ _ASM_EXTABLE(0b, 0b) -+#endif -+ -+ "sete %1\n" - : "=m" (v->counter), "=qm" (c) - : "m" (v->counter) : "memory"); - return c != 0; -@@ -136,7 +264,16 @@ static inline int atomic64_inc_and_test(atomic64_t *v) + /** +@@ -124,7 +234,7 @@ static inline int atomic64_dec_and_test(atomic64_t *v) + */ + static inline int atomic64_inc_and_test(atomic64_t *v) { - unsigned char c; +- GEN_UNARY_RMWcc(LOCK_PREFIX "incq", v->counter, "%0", "e"); ++ GEN_UNARY_RMWcc(LOCK_PREFIX "incq", LOCK_PREFIX "decq", v->counter, "%0", "e"); + } -- asm volatile(LOCK_PREFIX "incq %0; sete %1" -+ asm volatile(LOCK_PREFIX "incq %0\n" -+ -+#ifdef CONFIG_PAX_REFCOUNT -+ "jno 0f\n" -+ LOCK_PREFIX "decq %0\n" -+ "int $4\n0:\n" -+ _ASM_EXTABLE(0b, 0b) -+#endif -+ -+ "sete %1\n" - : "=m" (v->counter), "=qm" (c) - : "m" (v->counter) : "memory"); - return c != 0; -@@ -155,7 +292,16 @@ static inline int atomic64_add_negative(long i, atomic64_t *v) + /** +@@ -138,7 +248,7 @@ static inline int atomic64_inc_and_test(atomic64_t *v) + */ + static inline int atomic64_add_negative(long i, atomic64_t *v) { - unsigned char c; +- GEN_BINARY_RMWcc(LOCK_PREFIX "addq", v->counter, "er", i, "%0", "s"); ++ GEN_BINARY_RMWcc(LOCK_PREFIX "addq", LOCK_PREFIX "subq", v->counter, "er", i, "%0", "s"); + } -- asm volatile(LOCK_PREFIX "addq %2,%0; sets %1" -+ asm volatile(LOCK_PREFIX "addq %2,%0\n" -+ -+#ifdef CONFIG_PAX_REFCOUNT -+ "jno 0f\n" -+ LOCK_PREFIX "subq %2,%0\n" -+ "int $4\n0:\n" -+ _ASM_EXTABLE(0b, 0b) -+#endif -+ -+ "sets %1\n" - : "=m" (v->counter), "=qm" (c) - : "er" (i), "m" (v->counter) : "memory"); - return c; -@@ -170,6 +316,18 @@ static inline int atomic64_add_negative(long i, atomic64_t *v) + /** +@@ -150,6 +260,18 @@ static inline int atomic64_add_negative(long i, atomic64_t *v) */ static inline long atomic64_add_return(long i, atomic64_t *v) { @@ -14711,7 +15100,7 @@ index 0e1cbfc..5623683 100644 return i + xadd(&v->counter, i); } -@@ -179,6 +337,10 @@ static inline long atomic64_sub_return(long i, atomic64_t *v) +@@ -159,6 +281,10 @@ static inline long atomic64_sub_return(long i, atomic64_t *v) } #define atomic64_inc_return(v) (atomic64_add_return(1, (v))) @@ -14722,7 +15111,7 @@ index 0e1cbfc..5623683 100644 #define atomic64_dec_return(v) (atomic64_sub_return(1, (v))) static inline long atomic64_cmpxchg(atomic64_t *v, long old, long new) -@@ -186,6 +348,11 @@ static inline long atomic64_cmpxchg(atomic64_t *v, long old, long new) +@@ -166,6 +292,11 @@ static inline long atomic64_cmpxchg(atomic64_t *v, long old, long new) return cmpxchg(&v->counter, old, new); } @@ -14734,7 +15123,7 @@ index 0e1cbfc..5623683 100644 static inline long atomic64_xchg(atomic64_t *v, long new) { return xchg(&v->counter, new); -@@ -202,17 +369,30 @@ static inline long atomic64_xchg(atomic64_t *v, long new) +@@ -182,17 +313,30 @@ static inline long atomic64_xchg(atomic64_t *v, long new) */ static inline int atomic64_add_unless(atomic64_t *v, long a, long u) { @@ -14770,10 +15159,10 @@ index 0e1cbfc..5623683 100644 #define atomic64_inc_not_zero(v) atomic64_add_unless((v), 1, 0) diff --git a/arch/x86/include/asm/bitops.h b/arch/x86/include/asm/bitops.h -index 41639ce..ebce552 100644 +index 9fc1af7..fc71228 100644 --- a/arch/x86/include/asm/bitops.h +++ b/arch/x86/include/asm/bitops.h -@@ -48,7 +48,7 @@ +@@ -49,7 +49,7 @@ * a mask operation on a byte. */ #define IS_IMMEDIATE(nr) (__builtin_constant_p(nr)) @@ -14782,7 +15171,34 @@ index 41639ce..ebce552 100644 #define CONST_MASK(nr) (1 << ((nr) & 7)) /** -@@ -361,7 +361,7 @@ static int test_bit(int nr, const volatile unsigned long *addr); +@@ -205,7 +205,7 @@ static inline void change_bit(long nr, volatile unsigned long *addr) + */ + static inline int test_and_set_bit(long nr, volatile unsigned long *addr) + { +- GEN_BINARY_RMWcc(LOCK_PREFIX "bts", *addr, "Ir", nr, "%0", "c"); ++ GEN_BINARY_RMWcc_unchecked(LOCK_PREFIX "bts", *addr, "Ir", nr, "%0", "c"); + } + + /** +@@ -251,7 +251,7 @@ static inline int __test_and_set_bit(long nr, volatile unsigned long *addr) + */ + static inline int test_and_clear_bit(long nr, volatile unsigned long *addr) + { +- GEN_BINARY_RMWcc(LOCK_PREFIX "btr", *addr, "Ir", nr, "%0", "c"); ++ GEN_BINARY_RMWcc_unchecked(LOCK_PREFIX "btr", *addr, "Ir", nr, "%0", "c"); + } + + /** +@@ -304,7 +304,7 @@ static inline int __test_and_change_bit(long nr, volatile unsigned long *addr) + */ + static inline int test_and_change_bit(long nr, volatile unsigned long *addr) + { +- GEN_BINARY_RMWcc(LOCK_PREFIX "btc", *addr, "Ir", nr, "%0", "c"); ++ GEN_BINARY_RMWcc_unchecked(LOCK_PREFIX "btc", *addr, "Ir", nr, "%0", "c"); + } + + static __always_inline int constant_test_bit(long nr, const volatile unsigned long *addr) +@@ -345,7 +345,7 @@ static int test_bit(int nr, const volatile unsigned long *addr); * * Undefined if no bit exists, so code should check against 0 first. */ @@ -14791,7 +15207,7 @@ index 41639ce..ebce552 100644 { asm("rep; bsf %1,%0" : "=r" (word) -@@ -375,7 +375,7 @@ static inline unsigned long __ffs(unsigned long word) +@@ -359,7 +359,7 @@ static inline unsigned long __ffs(unsigned long word) * * Undefined if no zero exists, so code should check against ~0UL first. */ @@ -14800,7 +15216,7 @@ index 41639ce..ebce552 100644 { asm("rep; bsf %1,%0" : "=r" (word) -@@ -389,7 +389,7 @@ static inline unsigned long ffz(unsigned long word) +@@ -373,7 +373,7 @@ static inline unsigned long ffz(unsigned long word) * * Undefined if no set bit exists, so code should check against 0 first. */ @@ -14809,7 +15225,7 @@ index 41639ce..ebce552 100644 { asm("bsr %1,%0" : "=r" (word) -@@ -452,7 +452,7 @@ static inline int ffs(int x) +@@ -436,7 +436,7 @@ static inline int ffs(int x) * set bit if value is nonzero. The last (most significant) bit is * at position 32. */ @@ -14818,7 +15234,7 @@ index 41639ce..ebce552 100644 { int r; -@@ -494,7 +494,7 @@ static inline int fls(int x) +@@ -478,7 +478,7 @@ static inline int fls(int x) * at position 64. */ #ifdef CONFIG_X86_64 @@ -14881,6 +15297,178 @@ index 9863ee3..4a1f8e1 100644 else if (pg_flags == _PGMT_WC) return _PAGE_CACHE_WC; else if (pg_flags == _PGMT_UC_MINUS) +diff --git a/arch/x86/include/asm/calling.h b/arch/x86/include/asm/calling.h +index cb4c73b..c473c29 100644 +--- a/arch/x86/include/asm/calling.h ++++ b/arch/x86/include/asm/calling.h +@@ -82,103 +82,113 @@ For 32-bit we have the following conventions - kernel is built with + #define RSP 152 + #define SS 160 + +-#define ARGOFFSET R11 +-#define SWFRAME ORIG_RAX ++#define ARGOFFSET R15 + + .macro SAVE_ARGS addskip=0, save_rcx=1, save_r891011=1 +- subq $9*8+\addskip, %rsp +- CFI_ADJUST_CFA_OFFSET 9*8+\addskip +- movq_cfi rdi, 8*8 +- movq_cfi rsi, 7*8 +- movq_cfi rdx, 6*8 ++ subq $ORIG_RAX-ARGOFFSET+\addskip, %rsp ++ CFI_ADJUST_CFA_OFFSET ORIG_RAX-ARGOFFSET+\addskip ++ movq_cfi rdi, RDI ++ movq_cfi rsi, RSI ++ movq_cfi rdx, RDX + + .if \save_rcx +- movq_cfi rcx, 5*8 ++ movq_cfi rcx, RCX + .endif + +- movq_cfi rax, 4*8 ++ movq_cfi rax, RAX + + .if \save_r891011 +- movq_cfi r8, 3*8 +- movq_cfi r9, 2*8 +- movq_cfi r10, 1*8 +- movq_cfi r11, 0*8 ++ movq_cfi r8, R8 ++ movq_cfi r9, R9 ++ movq_cfi r10, R10 ++ movq_cfi r11, R11 + .endif + ++#ifdef CONFIG_PAX_KERNEXEC_PLUGIN_METHOD_OR ++ movq_cfi r12, R12 ++#endif ++ + .endm + +-#define ARG_SKIP (9*8) ++#define ARG_SKIP ORIG_RAX + + .macro RESTORE_ARGS rstor_rax=1, addskip=0, rstor_rcx=1, rstor_r11=1, \ + rstor_r8910=1, rstor_rdx=1 ++ ++#ifdef CONFIG_PAX_KERNEXEC_PLUGIN_METHOD_OR ++ movq_cfi_restore R12, r12 ++#endif ++ + .if \rstor_r11 +- movq_cfi_restore 0*8, r11 ++ movq_cfi_restore R11, r11 + .endif + + .if \rstor_r8910 +- movq_cfi_restore 1*8, r10 +- movq_cfi_restore 2*8, r9 +- movq_cfi_restore 3*8, r8 ++ movq_cfi_restore R10, r10 ++ movq_cfi_restore R9, r9 ++ movq_cfi_restore R8, r8 + .endif + + .if \rstor_rax +- movq_cfi_restore 4*8, rax ++ movq_cfi_restore RAX, rax + .endif + + .if \rstor_rcx +- movq_cfi_restore 5*8, rcx ++ movq_cfi_restore RCX, rcx + .endif + + .if \rstor_rdx +- movq_cfi_restore 6*8, rdx ++ movq_cfi_restore RDX, rdx + .endif + +- movq_cfi_restore 7*8, rsi +- movq_cfi_restore 8*8, rdi ++ movq_cfi_restore RSI, rsi ++ movq_cfi_restore RDI, rdi + +- .if ARG_SKIP+\addskip > 0 +- addq $ARG_SKIP+\addskip, %rsp +- CFI_ADJUST_CFA_OFFSET -(ARG_SKIP+\addskip) ++ .if ORIG_RAX+\addskip > 0 ++ addq $ORIG_RAX+\addskip, %rsp ++ CFI_ADJUST_CFA_OFFSET -(ORIG_RAX+\addskip) + .endif + .endm + +- .macro LOAD_ARGS offset, skiprax=0 +- movq \offset(%rsp), %r11 +- movq \offset+8(%rsp), %r10 +- movq \offset+16(%rsp), %r9 +- movq \offset+24(%rsp), %r8 +- movq \offset+40(%rsp), %rcx +- movq \offset+48(%rsp), %rdx +- movq \offset+56(%rsp), %rsi +- movq \offset+64(%rsp), %rdi ++ .macro LOAD_ARGS skiprax=0 ++ movq R11(%rsp), %r11 ++ movq R10(%rsp), %r10 ++ movq R9(%rsp), %r9 ++ movq R8(%rsp), %r8 ++ movq RCX(%rsp), %rcx ++ movq RDX(%rsp), %rdx ++ movq RSI(%rsp), %rsi ++ movq RDI(%rsp), %rdi + .if \skiprax + .else +- movq \offset+72(%rsp), %rax ++ movq RAX(%rsp), %rax + .endif + .endm + +-#define REST_SKIP (6*8) +- + .macro SAVE_REST +- subq $REST_SKIP, %rsp +- CFI_ADJUST_CFA_OFFSET REST_SKIP +- movq_cfi rbx, 5*8 +- movq_cfi rbp, 4*8 +- movq_cfi r12, 3*8 +- movq_cfi r13, 2*8 +- movq_cfi r14, 1*8 +- movq_cfi r15, 0*8 ++ movq_cfi rbx, RBX ++ movq_cfi rbp, RBP ++ ++#ifndef CONFIG_PAX_KERNEXEC_PLUGIN_METHOD_OR ++ movq_cfi r12, R12 ++#endif ++ ++ movq_cfi r13, R13 ++ movq_cfi r14, R14 ++ movq_cfi r15, R15 + .endm + + .macro RESTORE_REST +- movq_cfi_restore 0*8, r15 +- movq_cfi_restore 1*8, r14 +- movq_cfi_restore 2*8, r13 +- movq_cfi_restore 3*8, r12 +- movq_cfi_restore 4*8, rbp +- movq_cfi_restore 5*8, rbx +- addq $REST_SKIP, %rsp +- CFI_ADJUST_CFA_OFFSET -(REST_SKIP) ++ movq_cfi_restore R15, r15 ++ movq_cfi_restore R14, r14 ++ movq_cfi_restore R13, r13 ++ ++#ifndef CONFIG_PAX_KERNEXEC_PLUGIN_METHOD_OR ++ movq_cfi_restore R12, r12 ++#endif ++ ++ movq_cfi_restore RBP, rbp ++ movq_cfi_restore RBX, rbx + .endm + + .macro SAVE_ALL diff --git a/arch/x86/include/asm/checksum_32.h b/arch/x86/include/asm/checksum_32.h index f50de69..2b0a458 100644 --- a/arch/x86/include/asm/checksum_32.h @@ -15070,7 +15658,7 @@ index 89270b4..f0abf8e 100644 "6:\n" ".previous\n" diff --git a/arch/x86/include/asm/desc.h b/arch/x86/include/asm/desc.h -index b90e5df..b462c91 100644 +index 50d033a..37deb26 100644 --- a/arch/x86/include/asm/desc.h +++ b/arch/x86/include/asm/desc.h @@ -4,6 +4,7 @@ @@ -15197,7 +15785,7 @@ index b90e5df..b462c91 100644 { gate_desc s; -@@ -321,8 +334,8 @@ static inline void set_nmi_gate(int gate, void *addr) +@@ -321,14 +334,14 @@ static inline void set_nmi_gate(int gate, void *addr) #endif #ifdef CONFIG_TRACING @@ -15208,8 +15796,15 @@ index b90e5df..b462c91 100644 static inline void write_trace_idt_entry(int entry, const gate_desc *gate) { write_idt_entry(trace_idt_table, entry, gate); -@@ -333,7 +346,7 @@ static inline void write_trace_idt_entry(int entry, const gate_desc *gate) } + +-static inline void _trace_set_gate(int gate, unsigned type, void *addr, ++static inline void _trace_set_gate(int gate, unsigned type, const void *addr, + unsigned dpl, unsigned ist, unsigned seg) + { + gate_desc s; +@@ -348,7 +361,7 @@ static inline void write_trace_idt_entry(int entry, const gate_desc *gate) + #define _trace_set_gate(gate, type, addr, dpl, ist, seg) #endif -static inline void _set_gate(int gate, unsigned type, void *addr, @@ -15217,16 +15812,19 @@ index b90e5df..b462c91 100644 unsigned dpl, unsigned ist, unsigned seg) { gate_desc s; -@@ -353,7 +366,7 @@ static inline void _set_gate(int gate, unsigned type, void *addr, - * Pentium F0 0F bugfix can have resulted in the mapped - * IDT being write-protected. - */ --static inline void set_intr_gate(unsigned int n, void *addr) -+static inline void set_intr_gate(unsigned int n, const void *addr) - { - BUG_ON((unsigned)n > 0xFF); - _set_gate(n, GATE_INTERRUPT, addr, 0, 0, __KERNEL_CS); -@@ -410,19 +423,19 @@ static inline void __alloc_intr_gate(unsigned int n, void *addr) +@@ -371,9 +384,9 @@ static inline void _set_gate(int gate, unsigned type, void *addr, + #define set_intr_gate(n, addr) \ + do { \ + BUG_ON((unsigned)n > 0xFF); \ +- _set_gate(n, GATE_INTERRUPT, (void *)addr, 0, 0, \ ++ _set_gate(n, GATE_INTERRUPT, (const void *)addr, 0, 0, \ + __KERNEL_CS); \ +- _trace_set_gate(n, GATE_INTERRUPT, (void *)trace_##addr,\ ++ _trace_set_gate(n, GATE_INTERRUPT, (const void *)trace_##addr,\ + 0, 0, __KERNEL_CS); \ + } while (0) + +@@ -401,19 +414,19 @@ static inline void alloc_system_vector(int vector) /* * This routine sets up an interrupt gate at directory privilege level 3. */ @@ -15249,7 +15847,7 @@ index b90e5df..b462c91 100644 { BUG_ON((unsigned)n > 0xFF); _set_gate(n, GATE_TRAP, addr, 0, 0, __KERNEL_CS); -@@ -431,16 +444,16 @@ static inline void set_trap_gate(unsigned int n, void *addr) +@@ -422,16 +435,16 @@ static inline void set_trap_gate(unsigned int n, void *addr) static inline void set_task_gate(unsigned int n, unsigned int gdt_entry) { BUG_ON((unsigned)n > 0xFF); @@ -15269,7 +15867,7 @@ index b90e5df..b462c91 100644 { BUG_ON((unsigned)n > 0xFF); _set_gate(n, GATE_INTERRUPT, addr, 0x3, ist, __KERNEL_CS); -@@ -512,4 +525,17 @@ static inline void load_current_idt(void) +@@ -503,4 +516,17 @@ static inline void load_current_idt(void) else load_idt((const struct desc_ptr *)&idt_descr); } @@ -15397,8 +15995,41 @@ index 77a99ac..39ff7f5 100644 +extern void machine_emergency_restart(void) __noreturn; #endif /* _ASM_X86_EMERGENCY_RESTART_H */ +diff --git a/arch/x86/include/asm/floppy.h b/arch/x86/include/asm/floppy.h +index d3d7469..677ef72 100644 +--- a/arch/x86/include/asm/floppy.h ++++ b/arch/x86/include/asm/floppy.h +@@ -229,18 +229,18 @@ static struct fd_routine_l { + int (*_dma_setup)(char *addr, unsigned long size, int mode, int io); + } fd_routine[] = { + { +- request_dma, +- free_dma, +- get_dma_residue, +- dma_mem_alloc, +- hard_dma_setup ++ ._request_dma = request_dma, ++ ._free_dma = free_dma, ++ ._get_dma_residue = get_dma_residue, ++ ._dma_mem_alloc = dma_mem_alloc, ++ ._dma_setup = hard_dma_setup + }, + { +- vdma_request_dma, +- vdma_nop, +- vdma_get_dma_residue, +- vdma_mem_alloc, +- vdma_dma_setup ++ ._request_dma = vdma_request_dma, ++ ._free_dma = vdma_nop, ++ ._get_dma_residue = vdma_get_dma_residue, ++ ._dma_mem_alloc = vdma_mem_alloc, ++ ._dma_setup = vdma_dma_setup + } + }; + diff --git a/arch/x86/include/asm/fpu-internal.h b/arch/x86/include/asm/fpu-internal.h -index 4d0bda7..221da4d 100644 +index cea1c76..6c0d79b 100644 --- a/arch/x86/include/asm/fpu-internal.h +++ b/arch/x86/include/asm/fpu-internal.h @@ -124,8 +124,11 @@ static inline void sanitize_i387_state(struct task_struct *tsk) @@ -15423,14 +16054,14 @@ index 4d0bda7..221da4d 100644 }) @@ -298,7 +302,7 @@ static inline int restore_fpu_checking(struct task_struct *tsk) - "emms\n\t" /* clear stack tags */ - "fildl %P[addr]", /* set F?P to defined value */ - X86_FEATURE_FXSAVE_LEAK, -- [addr] "m" (tsk->thread.fpu.has_fpu)); -+ [addr] "m" (init_tss[raw_smp_processor_id()].x86_tss.sp0)); + "fnclex\n\t" + "emms\n\t" + "fildl %P[addr]" /* set F?P to defined value */ +- : : [addr] "m" (tsk->thread.fpu.has_fpu)); ++ : : [addr] "m" (init_tss[raw_smp_processor_id()].x86_tss.sp0)); + } return fpu_restore_checking(&tsk->thread.fpu); - } diff --git a/arch/x86/include/asm/futex.h b/arch/x86/include/asm/futex.h index be27ba1..04a8801 100644 --- a/arch/x86/include/asm/futex.h @@ -15519,7 +16150,7 @@ index be27ba1..04a8801 100644 *uval = oldval; return ret; diff --git a/arch/x86/include/asm/hw_irq.h b/arch/x86/include/asm/hw_irq.h -index 92b3bae..3866449 100644 +index cba45d9..86344ba 100644 --- a/arch/x86/include/asm/hw_irq.h +++ b/arch/x86/include/asm/hw_irq.h @@ -165,8 +165,8 @@ extern void setup_ioapic_dest(void); @@ -15631,7 +16262,7 @@ index 9454c16..e4100e3 100644 #define flush_insn_slot(p) do { } while (0) diff --git a/arch/x86/include/asm/local.h b/arch/x86/include/asm/local.h -index 2d89e39..baee879 100644 +index 4ad6560..75c7bdd 100644 --- a/arch/x86/include/asm/local.h +++ b/arch/x86/include/asm/local.h @@ -10,33 +10,97 @@ typedef struct { @@ -15736,79 +16367,43 @@ index 2d89e39..baee879 100644 : "+m" (l->a.counter) : "ir" (i)); } -@@ -54,7 +118,16 @@ static inline int local_sub_and_test(long i, local_t *l) +@@ -52,7 +116,7 @@ static inline void local_sub(long i, local_t *l) + */ + static inline int local_sub_and_test(long i, local_t *l) { - unsigned char c; +- GEN_BINARY_RMWcc(_ASM_SUB, l->a.counter, "er", i, "%0", "e"); ++ GEN_BINARY_RMWcc(_ASM_SUB, _ASM_ADD, l->a.counter, "er", i, "%0", "e"); + } -- asm volatile(_ASM_SUB "%2,%0; sete %1" -+ asm volatile(_ASM_SUB "%2,%0\n" -+ -+#ifdef CONFIG_PAX_REFCOUNT -+ "jno 0f\n" -+ _ASM_ADD "%2,%0\n" -+ "int $4\n0:\n" -+ _ASM_EXTABLE(0b, 0b) -+#endif -+ -+ "sete %1\n" - : "+m" (l->a.counter), "=qm" (c) - : "ir" (i) : "memory"); - return c; -@@ -72,7 +145,16 @@ static inline int local_dec_and_test(local_t *l) + /** +@@ -65,7 +129,7 @@ static inline int local_sub_and_test(long i, local_t *l) + */ + static inline int local_dec_and_test(local_t *l) { - unsigned char c; +- GEN_UNARY_RMWcc(_ASM_DEC, l->a.counter, "%0", "e"); ++ GEN_UNARY_RMWcc(_ASM_DEC, _ASM_INC, l->a.counter, "%0", "e"); + } -- asm volatile(_ASM_DEC "%0; sete %1" -+ asm volatile(_ASM_DEC "%0\n" -+ -+#ifdef CONFIG_PAX_REFCOUNT -+ "jno 0f\n" -+ _ASM_INC "%0\n" -+ "int $4\n0:\n" -+ _ASM_EXTABLE(0b, 0b) -+#endif -+ -+ "sete %1\n" - : "+m" (l->a.counter), "=qm" (c) - : : "memory"); - return c != 0; -@@ -90,7 +172,16 @@ static inline int local_inc_and_test(local_t *l) + /** +@@ -78,7 +142,7 @@ static inline int local_dec_and_test(local_t *l) + */ + static inline int local_inc_and_test(local_t *l) { - unsigned char c; +- GEN_UNARY_RMWcc(_ASM_INC, l->a.counter, "%0", "e"); ++ GEN_UNARY_RMWcc(_ASM_INC, _ASM_DEC, l->a.counter, "%0", "e"); + } -- asm volatile(_ASM_INC "%0; sete %1" -+ asm volatile(_ASM_INC "%0\n" -+ -+#ifdef CONFIG_PAX_REFCOUNT -+ "jno 0f\n" -+ _ASM_DEC "%0\n" -+ "int $4\n0:\n" -+ _ASM_EXTABLE(0b, 0b) -+#endif -+ -+ "sete %1\n" - : "+m" (l->a.counter), "=qm" (c) - : : "memory"); - return c != 0; -@@ -109,7 +200,16 @@ static inline int local_add_negative(long i, local_t *l) + /** +@@ -92,7 +156,7 @@ static inline int local_inc_and_test(local_t *l) + */ + static inline int local_add_negative(long i, local_t *l) { - unsigned char c; +- GEN_BINARY_RMWcc(_ASM_ADD, l->a.counter, "er", i, "%0", "s"); ++ GEN_BINARY_RMWcc(_ASM_ADD, _ASM_SUB, l->a.counter, "er", i, "%0", "s"); + } -- asm volatile(_ASM_ADD "%2,%0; sets %1" -+ asm volatile(_ASM_ADD "%2,%0\n" -+ -+#ifdef CONFIG_PAX_REFCOUNT -+ "jno 0f\n" -+ _ASM_SUB "%2,%0\n" -+ "int $4\n0:\n" -+ _ASM_EXTABLE(0b, 0b) -+#endif -+ -+ "sets %1\n" - : "+m" (l->a.counter), "=qm" (c) - : "ir" (i) : "memory"); - return c; -@@ -125,6 +225,30 @@ static inline int local_add_negative(long i, local_t *l) + /** +@@ -105,6 +169,30 @@ static inline int local_add_negative(long i, local_t *l) static inline long local_add_return(long i, local_t *l) { long __i = i; @@ -15839,7 +16434,7 @@ index 2d89e39..baee879 100644 asm volatile(_ASM_XADD "%0, %1;" : "+r" (i), "+m" (l->a.counter) : : "memory"); -@@ -141,6 +265,8 @@ static inline long local_sub_return(long i, local_t *l) +@@ -121,6 +209,8 @@ static inline long local_sub_return(long i, local_t *l) #define local_cmpxchg(l, o, n) \ (cmpxchg_local(&((l)->a.counter), (o), (n))) @@ -16263,7 +16858,7 @@ index 401f350..dee5d13 100644 #endif /* __ASSEMBLY__ */ diff --git a/arch/x86/include/asm/paravirt_types.h b/arch/x86/include/asm/paravirt_types.h -index aab8f67..2531748 100644 +index aab8f67..0fb0ee4 100644 --- a/arch/x86/include/asm/paravirt_types.h +++ b/arch/x86/include/asm/paravirt_types.h @@ -84,7 +84,7 @@ struct pv_init_ops { @@ -16271,16 +16866,23 @@ index aab8f67..2531748 100644 unsigned (*patch)(u8 type, u16 clobber, void *insnbuf, unsigned long addr, unsigned len); -}; -+} __no_const; ++} __no_const __no_randomize_layout; struct pv_lazy_ops { -@@ -98,7 +98,7 @@ struct pv_time_ops { +@@ -92,13 +92,13 @@ struct pv_lazy_ops { + void (*enter)(void); + void (*leave)(void); + void (*flush)(void); +-}; ++} __no_randomize_layout; + + struct pv_time_ops { unsigned long long (*sched_clock)(void); unsigned long long (*steal_clock)(int cpu); unsigned long (*get_tsc_khz)(void); -}; -+} __no_const; ++} __no_const __no_randomize_layout; struct pv_cpu_ops { /* hooks for various privileged instructions */ @@ -16289,16 +16891,25 @@ index aab8f67..2531748 100644 void (*start_context_switch)(struct task_struct *prev); void (*end_context_switch)(struct task_struct *next); -}; -+} __no_const; ++} __no_const __no_randomize_layout; struct pv_irq_ops { /* +@@ -215,7 +215,7 @@ struct pv_irq_ops { + #ifdef CONFIG_X86_64 + void (*adjust_exception_frame)(void); + #endif +-}; ++} __no_randomize_layout; + + struct pv_apic_ops { + #ifdef CONFIG_X86_LOCAL_APIC @@ -223,7 +223,7 @@ struct pv_apic_ops { unsigned long start_eip, unsigned long start_esp); #endif -}; -+} __no_const; ++} __no_const __no_randomize_layout; struct pv_mmu_ops { unsigned long (*read_cr2)(void); @@ -16310,21 +16921,49 @@ index aab8f67..2531748 100644 #endif /* PAGETABLE_LEVELS == 4 */ #endif /* PAGETABLE_LEVELS >= 3 */ -@@ -324,6 +325,12 @@ struct pv_mmu_ops { +@@ -324,7 +325,13 @@ struct pv_mmu_ops { an mfn. We can tell which is which from the index. */ void (*set_fixmap)(unsigned /* enum fixed_addresses */ idx, phys_addr_t phys, pgprot_t flags); +-}; + +#ifdef CONFIG_PAX_KERNEXEC + unsigned long (*pax_open_kernel)(void); + unsigned long (*pax_close_kernel)(void); +#endif + - }; ++} __no_randomize_layout; struct arch_spinlock; + #ifdef CONFIG_SMP +@@ -336,11 +343,14 @@ typedef u16 __ticket_t; + struct pv_lock_ops { + struct paravirt_callee_save lock_spinning; + void (*unlock_kick)(struct arch_spinlock *lock, __ticket_t ticket); +-}; ++} __no_randomize_layout; + + /* This contains all the paravirt structures: we get a convenient + * number for each function using the offset which we use to indicate +- * what to patch. */ ++ * what to patch. ++ * shouldn't be randomized due to the "NEAT TRICK" in paravirt.c ++ */ ++ + struct paravirt_patch_template { + struct pv_init_ops pv_init_ops; + struct pv_time_ops pv_time_ops; +@@ -349,7 +359,7 @@ struct paravirt_patch_template { + struct pv_apic_ops pv_apic_ops; + struct pv_mmu_ops pv_mmu_ops; + struct pv_lock_ops pv_lock_ops; +-}; ++} __no_randomize_layout; + + extern struct pv_info pv_info; + extern struct pv_init_ops pv_init_ops; diff --git a/arch/x86/include/asm/pgalloc.h b/arch/x86/include/asm/pgalloc.h -index b4389a4..7024269 100644 +index c4412e9..90e88c5 100644 --- a/arch/x86/include/asm/pgalloc.h +++ b/arch/x86/include/asm/pgalloc.h @@ -63,6 +63,13 @@ static inline void pmd_populate_kernel(struct mm_struct *mm, @@ -16341,7 +16980,7 @@ index b4389a4..7024269 100644 set_pmd(pmd, __pmd(__pa(pte) | _PAGE_TABLE)); } -@@ -99,12 +106,22 @@ static inline void __pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmd, +@@ -108,12 +115,22 @@ static inline void __pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmd, #ifdef CONFIG_X86_PAE extern void pud_populate(struct mm_struct *mm, pud_t *pudp, pmd_t *pmd); @@ -16364,7 +17003,7 @@ index b4389a4..7024269 100644 #endif /* CONFIG_X86_PAE */ #if PAGETABLE_LEVELS > 3 -@@ -114,6 +131,12 @@ static inline void pgd_populate(struct mm_struct *mm, pgd_t *pgd, pud_t *pud) +@@ -123,6 +140,12 @@ static inline void pgd_populate(struct mm_struct *mm, pgd_t *pgd, pud_t *pud) set_pgd(pgd, __pgd(_PAGE_TABLE | __pa(pud))); } @@ -16413,7 +17052,7 @@ index 81bb91b..9392125 100644 /* diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h -index 3d19994..732a48c 100644 +index bbc8b12..f228861 100644 --- a/arch/x86/include/asm/pgtable.h +++ b/arch/x86/include/asm/pgtable.h @@ -45,6 +45,7 @@ extern struct mm_struct *pgd_page_get_mm(struct page *page); @@ -16536,7 +17175,7 @@ index 3d19994..732a48c 100644 #include #include #include -@@ -563,7 +638,7 @@ static inline unsigned long pud_page_vaddr(pud_t pud) +@@ -570,7 +645,7 @@ static inline unsigned long pud_page_vaddr(pud_t pud) * Currently stuck as a macro due to indirect forward reference to * linux/mmzone.h's __section_mem_map_addr() definition: */ @@ -16545,7 +17184,7 @@ index 3d19994..732a48c 100644 /* Find an entry in the second-level page table.. */ static inline pmd_t *pmd_offset(pud_t *pud, unsigned long address) -@@ -603,7 +678,7 @@ static inline unsigned long pgd_page_vaddr(pgd_t pgd) +@@ -610,7 +685,7 @@ static inline unsigned long pgd_page_vaddr(pgd_t pgd) * Currently stuck as a macro due to indirect forward reference to * linux/mmzone.h's __section_mem_map_addr() definition: */ @@ -16554,7 +17193,7 @@ index 3d19994..732a48c 100644 /* to find an entry in a page-table-directory. */ static inline unsigned long pud_index(unsigned long address) -@@ -618,7 +693,7 @@ static inline pud_t *pud_offset(pgd_t *pgd, unsigned long address) +@@ -625,7 +700,7 @@ static inline pud_t *pud_offset(pgd_t *pgd, unsigned long address) static inline int pgd_bad(pgd_t pgd) { @@ -16563,7 +17202,7 @@ index 3d19994..732a48c 100644 } static inline int pgd_none(pgd_t pgd) -@@ -641,7 +716,12 @@ static inline int pgd_none(pgd_t pgd) +@@ -648,7 +723,12 @@ static inline int pgd_none(pgd_t pgd) * pgd_offset() returns a (pgd_t *) * pgd_index() is used get the offset into the pgd page's array of pgd_t's; */ @@ -16577,7 +17216,7 @@ index 3d19994..732a48c 100644 /* * a shortcut which implies the use of the kernel's pgd, instead * of a process's -@@ -652,6 +732,23 @@ static inline int pgd_none(pgd_t pgd) +@@ -659,6 +739,23 @@ static inline int pgd_none(pgd_t pgd) #define KERNEL_PGD_BOUNDARY pgd_index(PAGE_OFFSET) #define KERNEL_PGD_PTRS (PTRS_PER_PGD - KERNEL_PGD_BOUNDARY) @@ -16601,7 +17240,7 @@ index 3d19994..732a48c 100644 #ifndef __ASSEMBLY__ extern int direct_gbpages; -@@ -818,11 +915,24 @@ static inline void pmdp_set_wrprotect(struct mm_struct *mm, +@@ -825,11 +922,24 @@ static inline void pmdp_set_wrprotect(struct mm_struct *mm, * dst and src can be on the same page, but the range must not overlap, * and must not cross a page boundary. */ @@ -16778,7 +17417,7 @@ index 2d88344..4679fc3 100644 #define EARLY_DYNAMIC_PAGE_TABLES 64 diff --git a/arch/x86/include/asm/pgtable_types.h b/arch/x86/include/asm/pgtable_types.h -index 0ecac25..306c276 100644 +index 0ecac25..7a15e09 100644 --- a/arch/x86/include/asm/pgtable_types.h +++ b/arch/x86/include/asm/pgtable_types.h @@ -16,13 +16,12 @@ @@ -16811,7 +17450,7 @@ index 0ecac25..306c276 100644 #if defined(CONFIG_X86_64) || defined(CONFIG_X86_PAE) #define _PAGE_NX (_AT(pteval_t, 1) << _PAGE_BIT_NX) -#else -+#elif defined(CONFIG_KMEMCHECK) ++#elif defined(CONFIG_KMEMCHECK) || defined(CONFIG_MEM_SOFT_DIRTY) #define _PAGE_NX (_AT(pteval_t, 0)) +#else +#define _PAGE_NX (_AT(pteval_t, 1) << _PAGE_BIT_HIDDEN) @@ -16892,10 +17531,32 @@ index 0ecac25..306c276 100644 #define pgprot_writecombine pgprot_writecombine extern pgprot_t pgprot_writecombine(pgprot_t prot); +diff --git a/arch/x86/include/asm/preempt.h b/arch/x86/include/asm/preempt.h +index c8b0519..fd29e73 100644 +--- a/arch/x86/include/asm/preempt.h ++++ b/arch/x86/include/asm/preempt.h +@@ -87,7 +87,7 @@ static __always_inline void __preempt_count_sub(int val) + */ + static __always_inline bool __preempt_count_dec_and_test(void) + { +- GEN_UNARY_RMWcc("decl", __preempt_count, __percpu_arg(0), "e"); ++ GEN_UNARY_RMWcc("decl", "incl", __preempt_count, __percpu_arg(0), "e"); + } + + /* diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h -index 987c75e..2723054 100644 +index 7b034a4..4fe3e3f 100644 --- a/arch/x86/include/asm/processor.h +++ b/arch/x86/include/asm/processor.h +@@ -128,7 +128,7 @@ struct cpuinfo_x86 { + /* Index into per_cpu list: */ + u16 cpu_index; + u32 microcode; +-} __attribute__((__aligned__(SMP_CACHE_BYTES))); ++} __attribute__((__aligned__(SMP_CACHE_BYTES))) __randomize_layout; + + #define X86_VENDOR_INTEL 0 + #define X86_VENDOR_CYRIX 1 @@ -199,9 +199,21 @@ static inline void native_cpuid(unsigned int *eax, unsigned int *ebx, : "memory"); } @@ -16936,7 +17597,7 @@ index 987c75e..2723054 100644 #endif #ifdef CONFIG_X86_32 unsigned long ip; -@@ -553,29 +566,8 @@ static inline void load_sp0(struct tss_struct *tss, +@@ -562,29 +575,8 @@ static inline void load_sp0(struct tss_struct *tss, extern unsigned long mmu_cr4_features; extern u32 *trampoline_cr4_features; @@ -16968,7 +17629,7 @@ index 987c75e..2723054 100644 typedef struct { unsigned long seg; -@@ -824,11 +816,18 @@ static inline void spin_lock_prefetch(const void *x) +@@ -833,11 +825,18 @@ static inline void spin_lock_prefetch(const void *x) */ #define TASK_SIZE PAGE_OFFSET #define TASK_SIZE_MAX TASK_SIZE @@ -16989,7 +17650,7 @@ index 987c75e..2723054 100644 .vm86_info = NULL, \ .sysenter_cs = __KERNEL_CS, \ .io_bitmap_ptr = NULL, \ -@@ -842,7 +841,7 @@ static inline void spin_lock_prefetch(const void *x) +@@ -851,7 +850,7 @@ static inline void spin_lock_prefetch(const void *x) */ #define INIT_TSS { \ .x86_tss = { \ @@ -16998,7 +17659,7 @@ index 987c75e..2723054 100644 .ss0 = __KERNEL_DS, \ .ss1 = __KERNEL_CS, \ .io_bitmap_base = INVALID_IO_BITMAP_OFFSET, \ -@@ -853,11 +852,7 @@ static inline void spin_lock_prefetch(const void *x) +@@ -862,11 +861,7 @@ static inline void spin_lock_prefetch(const void *x) extern unsigned long thread_saved_pc(struct task_struct *tsk); #define THREAD_SIZE_LONGS (THREAD_SIZE/sizeof(unsigned long)) @@ -17011,7 +17672,7 @@ index 987c75e..2723054 100644 /* * The below -8 is to reserve 8 bytes on top of the ring0 stack. -@@ -872,7 +867,7 @@ extern unsigned long thread_saved_pc(struct task_struct *tsk); +@@ -881,7 +876,7 @@ extern unsigned long thread_saved_pc(struct task_struct *tsk); #define task_pt_regs(task) \ ({ \ struct pt_regs *__regs__; \ @@ -17020,7 +17681,7 @@ index 987c75e..2723054 100644 __regs__ - 1; \ }) -@@ -882,13 +877,13 @@ extern unsigned long thread_saved_pc(struct task_struct *tsk); +@@ -891,13 +886,13 @@ extern unsigned long thread_saved_pc(struct task_struct *tsk); /* * User space process size. 47bits minus one guard page. */ @@ -17036,7 +17697,7 @@ index 987c75e..2723054 100644 #define TASK_SIZE (test_thread_flag(TIF_ADDR32) ? \ IA32_PAGE_OFFSET : TASK_SIZE_MAX) -@@ -899,11 +894,11 @@ extern unsigned long thread_saved_pc(struct task_struct *tsk); +@@ -908,11 +903,11 @@ extern unsigned long thread_saved_pc(struct task_struct *tsk); #define STACK_TOP_MAX TASK_SIZE_MAX #define INIT_THREAD { \ @@ -17050,7 +17711,7 @@ index 987c75e..2723054 100644 } /* -@@ -931,6 +926,10 @@ extern void start_thread(struct pt_regs *regs, unsigned long new_ip, +@@ -940,6 +935,10 @@ extern void start_thread(struct pt_regs *regs, unsigned long new_ip, */ #define TASK_UNMAPPED_BASE (PAGE_ALIGN(TASK_SIZE / 3)) @@ -17061,7 +17722,7 @@ index 987c75e..2723054 100644 #define KSTK_EIP(task) (task_pt_regs(task)->ip) /* Get/set a process' ability to use the timestamp counter instruction */ -@@ -957,7 +956,7 @@ static inline uint32_t hypervisor_cpuid_base(const char *sig, uint32_t leaves) +@@ -966,7 +965,7 @@ static inline uint32_t hypervisor_cpuid_base(const char *sig, uint32_t leaves) return 0; } @@ -17070,7 +17731,7 @@ index 987c75e..2723054 100644 extern void free_init_pages(char *what, unsigned long begin, unsigned long end); void default_idle(void); -@@ -967,6 +966,6 @@ bool xen_set_default_idle(void); +@@ -976,6 +975,6 @@ bool xen_set_default_idle(void); #define xen_set_default_idle 0 #endif @@ -17197,6 +17858,120 @@ index a82c4f1..ac45053 100644 extern struct machine_ops machine_ops; +diff --git a/arch/x86/include/asm/rmwcc.h b/arch/x86/include/asm/rmwcc.h +index 8f7866a..e442f20 100644 +--- a/arch/x86/include/asm/rmwcc.h ++++ b/arch/x86/include/asm/rmwcc.h +@@ -3,7 +3,34 @@ + + #ifdef CC_HAVE_ASM_GOTO + +-#define __GEN_RMWcc(fullop, var, cc, ...) \ ++#ifdef CONFIG_PAX_REFCOUNT ++#define __GEN_RMWcc(fullop, fullantiop, var, cc, ...) \ ++do { \ ++ asm_volatile_goto (fullop \ ++ ";jno 0f\n" \ ++ fullantiop \ ++ ";int $4\n0:\n" \ ++ _ASM_EXTABLE(0b, 0b) \ ++ ";j" cc " %l[cc_label]" \ ++ : : "m" (var), ## __VA_ARGS__ \ ++ : "memory" : cc_label); \ ++ return 0; \ ++cc_label: \ ++ return 1; \ ++} while (0) ++#else ++#define __GEN_RMWcc(fullop, fullantiop, var, cc, ...) \ ++do { \ ++ asm_volatile_goto (fullop ";j" cc " %l[cc_label]" \ ++ : : "m" (var), ## __VA_ARGS__ \ ++ : "memory" : cc_label); \ ++ return 0; \ ++cc_label: \ ++ return 1; \ ++} while (0) ++#endif ++ ++#define __GEN_RMWcc_unchecked(fullop, var, cc, ...) \ + do { \ + asm_volatile_goto (fullop "; j" cc " %l[cc_label]" \ + : : "m" (var), ## __VA_ARGS__ \ +@@ -13,15 +40,46 @@ cc_label: \ + return 1; \ + } while (0) + +-#define GEN_UNARY_RMWcc(op, var, arg0, cc) \ +- __GEN_RMWcc(op " " arg0, var, cc) ++#define GEN_UNARY_RMWcc(op, antiop, var, arg0, cc) \ ++ __GEN_RMWcc(op " " arg0, antiop " " arg0, var, cc) + +-#define GEN_BINARY_RMWcc(op, var, vcon, val, arg0, cc) \ +- __GEN_RMWcc(op " %1, " arg0, var, cc, vcon (val)) ++#define GEN_UNARY_RMWcc_unchecked(op, var, arg0, cc) \ ++ __GEN_RMWcc_unchecked(op " " arg0, var, cc) ++ ++#define GEN_BINARY_RMWcc(op, antiop, var, vcon, val, arg0, cc) \ ++ __GEN_RMWcc(op " %1, " arg0, antiop " %1, " arg0, var, cc, vcon (val)) ++ ++#define GEN_BINARY_RMWcc_unchecked(op, var, vcon, val, arg0, cc) \ ++ __GEN_RMWcc_unchecked(op " %1, " arg0, var, cc, vcon (val)) + + #else /* !CC_HAVE_ASM_GOTO */ + +-#define __GEN_RMWcc(fullop, var, cc, ...) \ ++#ifdef CONFIG_PAX_REFCOUNT ++#define __GEN_RMWcc(fullop, fullantiop, var, cc, ...) \ ++do { \ ++ char c; \ ++ asm volatile (fullop \ ++ ";jno 0f\n" \ ++ fullantiop \ ++ ";int $4\n0:\n" \ ++ _ASM_EXTABLE(0b, 0b) \ ++ "; set" cc " %1" \ ++ : "+m" (var), "=qm" (c) \ ++ : __VA_ARGS__ : "memory"); \ ++ return c != 0; \ ++} while (0) ++#else ++#define __GEN_RMWcc(fullop, fullantiop, var, cc, ...) \ ++do { \ ++ char c; \ ++ asm volatile (fullop "; set" cc " %1" \ ++ : "+m" (var), "=qm" (c) \ ++ : __VA_ARGS__ : "memory"); \ ++ return c != 0; \ ++} while (0) ++#endif ++ ++#define __GEN_RMWcc_unchecked(fullop, var, cc, ...) \ + do { \ + char c; \ + asm volatile (fullop "; set" cc " %1" \ +@@ -30,11 +88,17 @@ do { \ + return c != 0; \ + } while (0) + +-#define GEN_UNARY_RMWcc(op, var, arg0, cc) \ +- __GEN_RMWcc(op " " arg0, var, cc) ++#define GEN_UNARY_RMWcc(op, antiop, var, arg0, cc) \ ++ __GEN_RMWcc(op " " arg0, antiop " " arg0, var, cc) ++ ++#define GEN_UNARY_RMWcc_unchecked(op, var, arg0, cc) \ ++ __GEN_RMWcc_unchecked(op " " arg0, var, cc) ++ ++#define GEN_BINARY_RMWcc(op, antiop, var, vcon, val, arg0, cc) \ ++ __GEN_RMWcc(op " %2, " arg0, antiop " %2, " arg0, var, cc, vcon (val)) + +-#define GEN_BINARY_RMWcc(op, var, vcon, val, arg0, cc) \ +- __GEN_RMWcc(op " %2, " arg0, var, cc, vcon (val)) ++#define GEN_BINARY_RMWcc_unchecked(op, var, vcon, val, arg0, cc) \ ++ __GEN_RMWcc_unchecked(op " %2, " arg0, var, cc, vcon (val)) + + #endif /* CC_HAVE_ASM_GOTO */ + diff --git a/arch/x86/include/asm/rwsem.h b/arch/x86/include/asm/rwsem.h index cad82c9..2e5c5c1 100644 --- a/arch/x86/include/asm/rwsem.h @@ -17318,7 +18093,7 @@ index cad82c9..2e5c5c1 100644 #endif /* __KERNEL__ */ diff --git a/arch/x86/include/asm/segment.h b/arch/x86/include/asm/segment.h -index c48a950..bc40804 100644 +index 6f1c3a8..7744f19 100644 --- a/arch/x86/include/asm/segment.h +++ b/arch/x86/include/asm/segment.h @@ -64,10 +64,15 @@ @@ -17404,7 +18179,7 @@ index c48a950..bc40804 100644 #define __USER_DS (GDT_ENTRY_DEFAULT_USER_DS*8+3) #define __USER_CS (GDT_ENTRY_DEFAULT_USER_CS*8+3) #ifndef CONFIG_PARAVIRT -@@ -265,7 +284,7 @@ static inline unsigned long get_limit(unsigned long segment) +@@ -268,7 +287,7 @@ static inline unsigned long get_limit(unsigned long segment) { unsigned long __limit; asm("lsll %1,%0" : "=r" (__limit) : "r" (segment)); @@ -17709,7 +18484,7 @@ index d7f3b3b..3cc39f1 100644 __switch_canary_iparam \ : "memory", "cc" __EXTRA_CLOBBER) diff --git a/arch/x86/include/asm/thread_info.h b/arch/x86/include/asm/thread_info.h -index 2781119..618b59b 100644 +index 3ba3de4..6c113b2 100644 --- a/arch/x86/include/asm/thread_info.h +++ b/arch/x86/include/asm/thread_info.h @@ -10,6 +10,7 @@ @@ -17728,7 +18503,7 @@ index 2781119..618b59b 100644 struct exec_domain *exec_domain; /* execution domain */ __u32 flags; /* low level flags */ __u32 status; /* thread synchronous flags */ -@@ -33,19 +33,13 @@ struct thread_info { +@@ -32,19 +32,13 @@ struct thread_info { mm_segment_t addr_limit; struct restart_block restart_block; void __user *sysenter_return; @@ -17750,7 +18525,7 @@ index 2781119..618b59b 100644 .exec_domain = &default_exec_domain, \ .flags = 0, \ .cpu = 0, \ -@@ -56,7 +50,7 @@ struct thread_info { +@@ -55,7 +49,7 @@ struct thread_info { }, \ } @@ -17759,7 +18534,7 @@ index 2781119..618b59b 100644 #define init_stack (init_thread_union.stack) #else /* !__ASSEMBLY__ */ -@@ -96,6 +90,7 @@ struct thread_info { +@@ -95,6 +89,7 @@ struct thread_info { #define TIF_SYSCALL_TRACEPOINT 28 /* syscall tracepoint instrumentation */ #define TIF_ADDR32 29 /* 32-bit address space on 64 bits */ #define TIF_X32 30 /* 32-bit native x86-64 binary */ @@ -17767,7 +18542,7 @@ index 2781119..618b59b 100644 #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) -@@ -119,17 +114,18 @@ struct thread_info { +@@ -118,17 +113,18 @@ struct thread_info { #define _TIF_SYSCALL_TRACEPOINT (1 << TIF_SYSCALL_TRACEPOINT) #define _TIF_ADDR32 (1 << TIF_ADDR32) #define _TIF_X32 (1 << TIF_X32) @@ -17788,7 +18563,7 @@ index 2781119..618b59b 100644 /* work to do on interrupt/exception return */ #define _TIF_WORK_MASK \ -@@ -140,7 +136,7 @@ struct thread_info { +@@ -139,7 +135,7 @@ struct thread_info { /* work to do on any return to user space */ #define _TIF_ALLWORK_MASK \ ((0x0000FFFF & ~_TIF_SECCOMP) | _TIF_SYSCALL_TRACEPOINT | \ @@ -17797,9 +18572,9 @@ index 2781119..618b59b 100644 /* Only used for 64 bit */ #define _TIF_DO_NOTIFY_MASK \ -@@ -156,45 +152,40 @@ struct thread_info { - - #define PREEMPT_ACTIVE 0x10000000 +@@ -153,45 +149,40 @@ struct thread_info { + #define _TIF_WORK_CTXSW_PREV (_TIF_WORK_CTXSW|_TIF_USER_RETURN_NOTIFY) + #define _TIF_WORK_CTXSW_NEXT (_TIF_WORK_CTXSW) -#ifdef CONFIG_X86_32 - @@ -17868,7 +18643,7 @@ index 2781119..618b59b 100644 /* * macros/functions for gaining access to the thread information structure * preempt_count needs to be 1 initially, until the scheduler is functional. -@@ -202,27 +193,8 @@ static inline struct thread_info *current_thread_info(void) +@@ -199,27 +190,8 @@ static inline struct thread_info *current_thread_info(void) #ifndef __ASSEMBLY__ DECLARE_PER_CPU(unsigned long, kernel_stack); @@ -17898,7 +18673,7 @@ index 2781119..618b59b 100644 #endif #endif /* !X86_32 */ -@@ -281,5 +253,12 @@ static inline bool is_ia32_task(void) +@@ -278,5 +250,12 @@ static inline bool is_ia32_task(void) extern void arch_task_cache_init(void); extern int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src); extern void arch_release_task_struct(struct task_struct *tsk); @@ -17912,7 +18687,7 @@ index 2781119..618b59b 100644 #endif #endif /* _ASM_X86_THREAD_INFO_H */ diff --git a/arch/x86/include/asm/tlbflush.h b/arch/x86/include/asm/tlbflush.h -index e6d90ba..0897f44 100644 +index e6d90ba..f81f114 100644 --- a/arch/x86/include/asm/tlbflush.h +++ b/arch/x86/include/asm/tlbflush.h @@ -17,18 +17,44 @@ @@ -17966,11 +18741,10 @@ index e6d90ba..0897f44 100644 } static inline void __native_flush_tlb_global(void) -@@ -49,6 +75,42 @@ static inline void __native_flush_tlb_global(void) +@@ -49,6 +75,41 @@ static inline void __native_flush_tlb_global(void) static inline void __native_flush_tlb_single(unsigned long addr) { -+ + if (static_cpu_has(X86_FEATURE_INVPCID)) { + u64 descriptor[2]; + @@ -18010,14 +18784,14 @@ index e6d90ba..0897f44 100644 } diff --git a/arch/x86/include/asm/uaccess.h b/arch/x86/include/asm/uaccess.h -index 5838fa9..f7ae572 100644 +index 8ec57c0..3ee58c9 100644 --- a/arch/x86/include/asm/uaccess.h +++ b/arch/x86/include/asm/uaccess.h @@ -7,6 +7,7 @@ #include #include #include -+#include ++#include #include #include #include @@ -18034,12 +18808,13 @@ index 5838fa9..f7ae572 100644 #define segment_eq(a, b) ((a).seg == (b).seg) -@@ -77,8 +83,33 @@ +@@ -77,8 +83,34 @@ * checks that the pointer is in the user space range - after calling * this function, memory access functions may still return -EFAULT. */ -#define access_ok(type, addr, size) \ - (likely(__range_not_ok(addr, size, user_addr_max()) == 0)) ++extern int _cond_resched(void); +#define __access_ok(type, addr, size) (likely(__range_not_ok(addr, size, user_addr_max()) == 0)) +#define access_ok(type, addr, size) \ +({ \ @@ -18053,7 +18828,7 @@ index 5838fa9..f7ae572 100644 + char __c_ao; \ + __addr_ao += PAGE_SIZE; \ + if (__size > PAGE_SIZE) \ -+ cond_resched(); \ ++ _cond_resched(); \ + if (__get_user(__c_ao, (char __user *)__addr)) \ + break; \ + if (type != VERIFY_WRITE) { \ @@ -18070,7 +18845,7 @@ index 5838fa9..f7ae572 100644 /* * The exception table consists of pairs of addresses relative to the -@@ -168,10 +199,12 @@ __typeof__(__builtin_choose_expr(sizeof(x) > sizeof(0UL), 0ULL, 0UL)) +@@ -168,10 +200,12 @@ __typeof__(__builtin_choose_expr(sizeof(x) > sizeof(0UL), 0ULL, 0UL)) register __inttype(*(ptr)) __val_gu asm("%"_ASM_DX); \ __chk_user_ptr(ptr); \ might_fault(); \ @@ -18083,7 +18858,7 @@ index 5838fa9..f7ae572 100644 __ret_gu; \ }) -@@ -179,13 +212,21 @@ __typeof__(__builtin_choose_expr(sizeof(x) > sizeof(0UL), 0ULL, 0UL)) +@@ -179,13 +213,21 @@ __typeof__(__builtin_choose_expr(sizeof(x) > sizeof(0UL), 0ULL, 0UL)) asm volatile("call __put_user_" #size : "=a" (__ret_pu) \ : "0" ((typeof(*(ptr)))(x)), "c" (ptr) : "ebx") @@ -18108,7 +18883,7 @@ index 5838fa9..f7ae572 100644 "3: " ASM_CLAC "\n" \ ".section .fixup,\"ax\"\n" \ "4: movl %3,%0\n" \ -@@ -198,8 +239,8 @@ __typeof__(__builtin_choose_expr(sizeof(x) > sizeof(0UL), 0ULL, 0UL)) +@@ -198,8 +240,8 @@ __typeof__(__builtin_choose_expr(sizeof(x) > sizeof(0UL), 0ULL, 0UL)) #define __put_user_asm_ex_u64(x, addr) \ asm volatile(ASM_STAC "\n" \ @@ -18119,7 +18894,7 @@ index 5838fa9..f7ae572 100644 "3: " ASM_CLAC "\n" \ _ASM_EXTABLE_EX(1b, 2b) \ _ASM_EXTABLE_EX(2b, 3b) \ -@@ -249,7 +290,8 @@ extern void __put_user_8(void); +@@ -249,7 +291,8 @@ extern void __put_user_8(void); __typeof__(*(ptr)) __pu_val; \ __chk_user_ptr(ptr); \ might_fault(); \ @@ -18129,7 +18904,7 @@ index 5838fa9..f7ae572 100644 switch (sizeof(*(ptr))) { \ case 1: \ __put_user_x(1, __pu_val, ptr, __ret_pu); \ -@@ -267,6 +309,7 @@ extern void __put_user_8(void); +@@ -267,6 +310,7 @@ extern void __put_user_8(void); __put_user_x(X, __pu_val, ptr, __ret_pu); \ break; \ } \ @@ -18137,7 +18912,7 @@ index 5838fa9..f7ae572 100644 __ret_pu; \ }) -@@ -347,8 +390,10 @@ do { \ +@@ -347,8 +391,10 @@ do { \ } while (0) #define __get_user_asm(x, addr, err, itype, rtype, ltype, errret) \ @@ -18149,7 +18924,7 @@ index 5838fa9..f7ae572 100644 "2: " ASM_CLAC "\n" \ ".section .fixup,\"ax\"\n" \ "3: mov %3,%0\n" \ -@@ -356,8 +401,10 @@ do { \ +@@ -356,8 +402,10 @@ do { \ " jmp 2b\n" \ ".previous\n" \ _ASM_EXTABLE(1b, 3b) \ @@ -18162,7 +18937,7 @@ index 5838fa9..f7ae572 100644 #define __get_user_size_ex(x, ptr, size) \ do { \ -@@ -381,7 +428,7 @@ do { \ +@@ -381,7 +429,7 @@ do { \ } while (0) #define __get_user_asm_ex(x, addr, itype, rtype, ltype) \ @@ -18171,7 +18946,7 @@ index 5838fa9..f7ae572 100644 "2:\n" \ _ASM_EXTABLE_EX(1b, 2b) \ : ltype(x) : "m" (__m(addr))) -@@ -398,13 +445,24 @@ do { \ +@@ -398,13 +446,24 @@ do { \ int __gu_err; \ unsigned long __gu_val; \ __get_user_size(__gu_val, (ptr), (size), __gu_err, -EFAULT); \ @@ -18198,7 +18973,7 @@ index 5838fa9..f7ae572 100644 /* * Tell gcc we read from memory instead of writing: this is because -@@ -412,8 +470,10 @@ struct __large_struct { unsigned long buf[100]; }; +@@ -412,8 +471,10 @@ struct __large_struct { unsigned long buf[100]; }; * aliasing issues. */ #define __put_user_asm(x, addr, err, itype, rtype, ltype, errret) \ @@ -18210,7 +18985,7 @@ index 5838fa9..f7ae572 100644 "2: " ASM_CLAC "\n" \ ".section .fixup,\"ax\"\n" \ "3: mov %3,%0\n" \ -@@ -421,10 +481,12 @@ struct __large_struct { unsigned long buf[100]; }; +@@ -421,10 +482,12 @@ struct __large_struct { unsigned long buf[100]; }; ".previous\n" \ _ASM_EXTABLE(1b, 3b) \ : "=r"(err) \ @@ -18225,7 +19000,7 @@ index 5838fa9..f7ae572 100644 "2:\n" \ _ASM_EXTABLE_EX(1b, 2b) \ : : ltype(x), "m" (__m(addr))) -@@ -434,11 +496,13 @@ struct __large_struct { unsigned long buf[100]; }; +@@ -434,11 +497,13 @@ struct __large_struct { unsigned long buf[100]; }; */ #define uaccess_try do { \ current_thread_info()->uaccess_err = 0; \ @@ -18239,7 +19014,7 @@ index 5838fa9..f7ae572 100644 (err) |= (current_thread_info()->uaccess_err ? -EFAULT : 0); \ } while (0) -@@ -463,8 +527,12 @@ struct __large_struct { unsigned long buf[100]; }; +@@ -463,8 +528,12 @@ struct __large_struct { unsigned long buf[100]; }; * On error, the variable @x is set to zero. */ @@ -18252,7 +19027,7 @@ index 5838fa9..f7ae572 100644 /** * __put_user: - Write a simple value into user space, with less checking. -@@ -486,8 +554,12 @@ struct __large_struct { unsigned long buf[100]; }; +@@ -486,8 +555,12 @@ struct __large_struct { unsigned long buf[100]; }; * Returns zero on success, or -EFAULT on error. */ @@ -18265,7 +19040,7 @@ index 5838fa9..f7ae572 100644 #define __get_user_unaligned __get_user #define __put_user_unaligned __put_user -@@ -505,7 +577,7 @@ struct __large_struct { unsigned long buf[100]; }; +@@ -505,7 +578,7 @@ struct __large_struct { unsigned long buf[100]; }; #define get_user_ex(x, ptr) do { \ unsigned long __gue_val; \ __get_user_size_ex((__gue_val), (ptr), (sizeof(*(ptr)))); \ @@ -18274,8 +19049,110 @@ index 5838fa9..f7ae572 100644 } while (0) #define put_user_try uaccess_try +@@ -536,17 +609,6 @@ extern struct movsl_mask { + + #define ARCH_HAS_NOCACHE_UACCESS 1 + +-#ifdef CONFIG_X86_32 +-# include +-#else +-# include +-#endif +- +-unsigned long __must_check _copy_from_user(void *to, const void __user *from, +- unsigned n); +-unsigned long __must_check _copy_to_user(void __user *to, const void *from, +- unsigned n); +- + #ifdef CONFIG_DEBUG_STRICT_USER_COPY_CHECKS + # define copy_user_diag __compiletime_error + #else +@@ -556,7 +618,7 @@ unsigned long __must_check _copy_to_user(void __user *to, const void *from, + extern void copy_user_diag("copy_from_user() buffer size is too small") + copy_from_user_overflow(void); + extern void copy_user_diag("copy_to_user() buffer size is too small") +-copy_to_user_overflow(void) __asm__("copy_from_user_overflow"); ++copy_to_user_overflow(void); + + #undef copy_user_diag + +@@ -569,7 +631,7 @@ __copy_from_user_overflow(void) __asm__("copy_from_user_overflow"); + + extern void + __compiletime_warning("copy_to_user() buffer size is not provably correct") +-__copy_to_user_overflow(void) __asm__("copy_from_user_overflow"); ++__copy_to_user_overflow(void) __asm__("copy_to_user_overflow"); + #define __copy_to_user_overflow(size, count) __copy_to_user_overflow() + + #else +@@ -584,10 +646,16 @@ __copy_from_user_overflow(int size, unsigned long count) + + #endif + ++#ifdef CONFIG_X86_32 ++# include ++#else ++# include ++#endif ++ + static inline unsigned long __must_check + copy_from_user(void *to, const void __user *from, unsigned long n) + { +- int sz = __compiletime_object_size(to); ++ size_t sz = __compiletime_object_size(to); + + might_fault(); + +@@ -609,12 +677,15 @@ copy_from_user(void *to, const void __user *from, unsigned long n) + * case, and do only runtime checking for non-constant sizes. + */ + +- if (likely(sz < 0 || sz >= n)) +- n = _copy_from_user(to, from, n); +- else if(__builtin_constant_p(n)) +- copy_from_user_overflow(); +- else +- __copy_from_user_overflow(sz, n); ++ if (likely(sz != (size_t)-1 && sz < n)) { ++ if(__builtin_constant_p(n)) ++ copy_from_user_overflow(); ++ else ++ __copy_from_user_overflow(sz, n); ++ } if (access_ok(VERIFY_READ, from, n)) ++ n = __copy_from_user(to, from, n); ++ else if ((long)n > 0) ++ memset(to, 0, n); + + return n; + } +@@ -622,17 +693,18 @@ copy_from_user(void *to, const void __user *from, unsigned long n) + static inline unsigned long __must_check + copy_to_user(void __user *to, const void *from, unsigned long n) + { +- int sz = __compiletime_object_size(from); ++ size_t sz = __compiletime_object_size(from); + + might_fault(); + + /* See the comment in copy_from_user() above. */ +- if (likely(sz < 0 || sz >= n)) +- n = _copy_to_user(to, from, n); +- else if(__builtin_constant_p(n)) +- copy_to_user_overflow(); +- else +- __copy_to_user_overflow(sz, n); ++ if (likely(sz != (size_t)-1 && sz < n)) { ++ if(__builtin_constant_p(n)) ++ copy_to_user_overflow(); ++ else ++ __copy_to_user_overflow(sz, n); ++ } else if (access_ok(VERIFY_WRITE, to, n)) ++ n = __copy_to_user(to, from, n); + + return n; + } diff --git a/arch/x86/include/asm/uaccess_32.h b/arch/x86/include/asm/uaccess_32.h -index 7f760a9..b596b9a 100644 +index 3c03a5d..1071638 100644 --- a/arch/x86/include/asm/uaccess_32.h +++ b/arch/x86/include/asm/uaccess_32.h @@ -43,6 +43,11 @@ unsigned long __must_check __copy_from_user_ll_nocache_nozero @@ -18331,7 +19208,7 @@ index 7f760a9..b596b9a 100644 if (__builtin_constant_p(n)) { unsigned long ret; -@@ -181,15 +200,19 @@ static __always_inline unsigned long +@@ -181,7 +200,10 @@ static __always_inline unsigned long __copy_from_user_inatomic_nocache(void *to, const void __user *from, unsigned long n) { @@ -18342,93 +19219,9 @@ index 7f760a9..b596b9a 100644 + return __copy_from_user_ll_nocache_nozero(to, from, n); } --unsigned long __must_check copy_to_user(void __user *to, -- const void *from, unsigned long n); --unsigned long __must_check _copy_from_user(void *to, -- const void __user *from, -- unsigned long n); -- -+extern void copy_to_user_overflow(void) -+#ifdef CONFIG_DEBUG_STRICT_USER_COPY_CHECKS -+ __compiletime_error("copy_to_user() buffer size is not provably correct") -+#else -+ __compiletime_warning("copy_to_user() buffer size is not provably correct") -+#endif -+; - - extern void copy_from_user_overflow(void) - #ifdef CONFIG_DEBUG_STRICT_USER_COPY_CHECKS -@@ -199,17 +222,60 @@ extern void copy_from_user_overflow(void) - #endif - ; - --static inline unsigned long __must_check copy_from_user(void *to, -- const void __user *from, -- unsigned long n) -+/** -+ * copy_to_user: - Copy a block of data into user space. -+ * @to: Destination address, in user space. -+ * @from: Source address, in kernel space. -+ * @n: Number of bytes to copy. -+ * -+ * Context: User context only. This function may sleep. -+ * -+ * Copy data from kernel space to user space. -+ * -+ * Returns number of bytes that could not be copied. -+ * On success, this will be zero. -+ */ -+static inline unsigned long __must_check -+copy_to_user(void __user *to, const void *from, unsigned long n) - { -- int sz = __compiletime_object_size(to); -+ size_t sz = __compiletime_object_size(from); - -- if (likely(sz == -1 || sz >= n)) -- n = _copy_from_user(to, from, n); -- else -+ if (unlikely(sz != (size_t)-1 && sz < n)) -+ copy_to_user_overflow(); -+ else if (access_ok(VERIFY_WRITE, to, n)) -+ n = __copy_to_user(to, from, n); -+ return n; -+} -+ -+/** -+ * copy_from_user: - Copy a block of data from user space. -+ * @to: Destination address, in kernel space. -+ * @from: Source address, in user space. -+ * @n: Number of bytes to copy. -+ * -+ * Context: User context only. This function may sleep. -+ * -+ * Copy data from user space to kernel space. -+ * -+ * Returns number of bytes that could not be copied. -+ * On success, this will be zero. -+ * -+ * If some data could not be copied, this function will pad the copied -+ * data to the requested size using zero bytes. -+ */ -+static inline unsigned long __must_check -+copy_from_user(void *to, const void __user *from, unsigned long n) -+{ -+ size_t sz = __compiletime_object_size(to); -+ -+ check_object_size(to, n, false); -+ -+ if (unlikely(sz != (size_t)-1 && sz < n)) - copy_from_user_overflow(); -- -+ else if (access_ok(VERIFY_READ, from, n)) -+ n = __copy_from_user(to, from, n); -+ else if ((long)n > 0) -+ memset(to, 0, n); - return n; - } - + #endif /* _ASM_X86_UACCESS_32_H */ diff --git a/arch/x86/include/asm/uaccess_64.h b/arch/x86/include/asm/uaccess_64.h -index 4f7923d..201b58d 100644 +index 190413d..8a80c2a 100644 --- a/arch/x86/include/asm/uaccess_64.h +++ b/arch/x86/include/asm/uaccess_64.h @@ -10,6 +10,9 @@ @@ -18454,89 +19247,26 @@ index 4f7923d..201b58d 100644 -copy_user_generic_unrolled(void *to, const void *from, unsigned len); +copy_user_generic_unrolled(void *to, const void *from, unsigned len) __size_overflow(3); --static __always_inline __must_check unsigned long + static __always_inline __must_check unsigned long -copy_user_generic(void *to, const void *from, unsigned len) -+static __always_inline __must_check unsigned long +copy_user_generic(void *to, const void *from, unsigned long len) { unsigned ret; -@@ -45,138 +48,200 @@ copy_user_generic(void *to, const void *from, unsigned len) - return ret; +@@ -46,121 +49,170 @@ copy_user_generic(void *to, const void *from, unsigned len) } -+static __always_inline __must_check unsigned long -+__copy_to_user(void __user *to, const void *from, unsigned long len); -+static __always_inline __must_check unsigned long -+__copy_from_user(void *to, const void __user *from, unsigned long len); __must_check unsigned long --_copy_to_user(void __user *to, const void *from, unsigned len); --__must_check unsigned long --_copy_from_user(void *to, const void __user *from, unsigned len); --__must_check unsigned long -copy_in_user(void __user *to, const void __user *from, unsigned len); +copy_in_user(void __user *to, const void __user *from, unsigned long len); -+ -+extern void copy_to_user_overflow(void) -+#ifdef CONFIG_DEBUG_STRICT_USER_COPY_CHECKS -+ __compiletime_error("copy_to_user() buffer size is not provably correct") -+#else -+ __compiletime_warning("copy_to_user() buffer size is not provably correct") -+#endif -+; -+ -+extern void copy_from_user_overflow(void) -+#ifdef CONFIG_DEBUG_STRICT_USER_COPY_CHECKS -+ __compiletime_error("copy_from_user() buffer size is not provably correct") -+#else -+ __compiletime_warning("copy_from_user() buffer size is not provably correct") -+#endif -+; - - static inline unsigned long __must_check copy_from_user(void *to, - const void __user *from, - unsigned long n) - { -- int sz = __compiletime_object_size(to); -- - might_fault(); -- if (likely(sz == -1 || sz >= n)) -- n = _copy_from_user(to, from, n); --#ifdef CONFIG_DEBUG_VM -- else -- WARN(1, "Buffer overflow detected!\n"); --#endif -+ -+ check_object_size(to, n, false); -+ -+ if (access_ok(VERIFY_READ, from, n)) -+ n = __copy_from_user(to, from, n); -+ else if (n < INT_MAX) -+ memset(to, 0, n); - return n; - } static __always_inline __must_check --int copy_to_user(void __user *dst, const void *src, unsigned size) -+int copy_to_user(void __user *dst, const void *src, unsigned long size) - { - might_fault(); - -- return _copy_to_user(dst, src, size); -+ if (access_ok(VERIFY_WRITE, dst, size)) -+ size = __copy_to_user(dst, src, size); -+ return size; - } - - static __always_inline __must_check --int __copy_from_user(void *dst, const void __user *src, unsigned size) -+unsigned long __copy_from_user(void *dst, const void __user *src, unsigned long size) +-int __copy_from_user_nocheck(void *dst, const void __user *src, unsigned size) ++unsigned long __copy_from_user_nocheck(void *dst, const void __user *src, unsigned long size) { - int ret = 0; + size_t sz = __compiletime_object_size(dst); + unsigned ret = 0; - - might_fault(); + + if (size > INT_MAX) + return size; @@ -18549,10 +19279,13 @@ index 4f7923d..201b58d 100644 +#endif + + if (unlikely(sz != (size_t)-1 && sz < size)) { -+ copy_from_user_overflow(); ++ if(__builtin_constant_p(size)) ++ copy_from_user_overflow(); ++ else ++ __copy_from_user_overflow(sz, size); + return size; + } -+ + if (!__builtin_constant_p(size)) - return copy_user_generic(dst, (__force void *)src, size); + return copy_user_generic(dst, (__force_kernel const void *)____m(src), size); @@ -18602,14 +19335,20 @@ index 4f7923d..201b58d 100644 } static __always_inline __must_check --int __copy_to_user(void __user *dst, const void *src, unsigned size) -+unsigned long __copy_to_user(void __user *dst, const void *src, unsigned long size) +-int __copy_from_user(void *dst, const void __user *src, unsigned size) ++unsigned long __copy_from_user(void *dst, const void __user *src, unsigned long size) + { + might_fault(); + return __copy_from_user_nocheck(dst, src, size); + } + + static __always_inline __must_check +-int __copy_to_user_nocheck(void __user *dst, const void *src, unsigned size) ++unsigned long __copy_to_user_nocheck(void __user *dst, const void *src, unsigned long size) { - int ret = 0; + size_t sz = __compiletime_object_size(src); + unsigned ret = 0; - - might_fault(); + + if (size > INT_MAX) + return size; @@ -18622,10 +19361,13 @@ index 4f7923d..201b58d 100644 +#endif + + if (unlikely(sz != (size_t)-1 && sz < size)) { -+ copy_to_user_overflow(); ++ if(__builtin_constant_p(size)) ++ copy_to_user_overflow(); ++ else ++ __copy_to_user_overflow(sz, size); + return size; + } -+ + if (!__builtin_constant_p(size)) - return copy_user_generic((__force void *)dst, src, size); + return copy_user_generic((__force_kernel void *)____m(dst), src, size); @@ -18674,9 +19416,17 @@ index 4f7923d..201b58d 100644 } } + static __always_inline __must_check +-int __copy_to_user(void __user *dst, const void *src, unsigned size) ++unsigned long __copy_to_user(void __user *dst, const void *src, unsigned long size) + { + might_fault(); + return __copy_to_user_nocheck(dst, src, size); + } + static __always_inline __must_check -int __copy_in_user(void __user *dst, const void __user *src, unsigned size) -+unsigned long __copy_in_user(void __user *dst, const void __user *src, unsigned long size) ++unsigned long __copy_in_user(void __user *dst, const void __user *src, unsigned size) { - int ret = 0; + unsigned ret = 0; @@ -18706,7 +19456,7 @@ index 4f7923d..201b58d 100644 ret, "b", "b", "=q", 1); if (likely(!ret)) __put_user_asm(tmp, (u8 __user *)dst, -@@ -185,7 +250,7 @@ int __copy_in_user(void __user *dst, const void __user *src, unsigned size) +@@ -169,7 +221,7 @@ int __copy_in_user(void __user *dst, const void __user *src, unsigned size) } case 2: { u16 tmp; @@ -18715,7 +19465,7 @@ index 4f7923d..201b58d 100644 ret, "w", "w", "=r", 2); if (likely(!ret)) __put_user_asm(tmp, (u16 __user *)dst, -@@ -195,7 +260,7 @@ int __copy_in_user(void __user *dst, const void __user *src, unsigned size) +@@ -179,7 +231,7 @@ int __copy_in_user(void __user *dst, const void __user *src, unsigned size) case 4: { u32 tmp; @@ -18724,7 +19474,7 @@ index 4f7923d..201b58d 100644 ret, "l", "k", "=r", 4); if (likely(!ret)) __put_user_asm(tmp, (u32 __user *)dst, -@@ -204,7 +269,7 @@ int __copy_in_user(void __user *dst, const void __user *src, unsigned size) +@@ -188,7 +240,7 @@ int __copy_in_user(void __user *dst, const void __user *src, unsigned size) } case 8: { u64 tmp; @@ -18733,7 +19483,7 @@ index 4f7923d..201b58d 100644 ret, "q", "", "=r", 8); if (likely(!ret)) __put_user_asm(tmp, (u64 __user *)dst, -@@ -212,41 +277,74 @@ int __copy_in_user(void __user *dst, const void __user *src, unsigned size) +@@ -196,41 +248,58 @@ int __copy_in_user(void __user *dst, const void __user *src, unsigned size) return ret; } default: @@ -18749,16 +19499,8 @@ index 4f7923d..201b58d 100644 +static __must_check __always_inline unsigned long +__copy_from_user_inatomic(void *dst, const void __user *src, unsigned long size) { -- return copy_user_generic(dst, (__force const void *)src, size); -+ if (size > INT_MAX) -+ return size; -+ -+#ifdef CONFIG_PAX_MEMORY_UDEREF -+ if (!__access_ok(VERIFY_READ, src, size)) -+ return size; -+#endif -+ -+ return copy_user_generic(dst, (__force_kernel const void *)____m(src), size); +- return __copy_from_user_nocheck(dst, (__force const void *)src, size); ++ return __copy_from_user_nocheck(dst, src, size); } -static __must_check __always_inline int @@ -18766,16 +19508,8 @@ index 4f7923d..201b58d 100644 +static __must_check __always_inline unsigned long +__copy_to_user_inatomic(void __user *dst, const void *src, unsigned long size) { -- return copy_user_generic((__force void *)dst, src, size); -+ if (size > INT_MAX) -+ return size; -+ -+#ifdef CONFIG_PAX_MEMORY_UDEREF -+ if (!__access_ok(VERIFY_WRITE, dst, size)) -+ return size; -+#endif -+ -+ return copy_user_generic((__force_kernel void *)____m(dst), src, size); +- return __copy_to_user_nocheck((__force void *)dst, src, size); ++ return __copy_to_user_nocheck(dst, src, size); } -extern long __copy_user_nocache(void *dst, const void __user *src, @@ -18837,7 +19571,7 @@ index 5b238981..77fdd78 100644 #define WORD_AT_A_TIME_CONSTANTS { REPEAT_BYTE(0x01), REPEAT_BYTE(0x80) } diff --git a/arch/x86/include/asm/x86_init.h b/arch/x86/include/asm/x86_init.h -index 828a156..650e625 100644 +index 0f1be11..f7542bf 100644 --- a/arch/x86/include/asm/x86_init.h +++ b/arch/x86/include/asm/x86_init.h @@ -129,7 +129,7 @@ struct x86_init_ops { @@ -18867,16 +19601,16 @@ index 828a156..650e625 100644 struct pci_dev; struct msi_msg; -@@ -182,7 +182,7 @@ struct x86_msi_ops { - void (*teardown_msi_irqs)(struct pci_dev *dev); - void (*restore_msi_irqs)(struct pci_dev *dev, int irq); +@@ -185,7 +185,7 @@ struct x86_msi_ops { int (*setup_hpet_msi)(unsigned int irq, unsigned int id); + u32 (*msi_mask_irq)(struct msi_desc *desc, u32 mask, u32 flag); + u32 (*msix_mask_irq)(struct msi_desc *desc, u32 flag); -}; +} __no_const; struct IO_APIC_route_entry; struct io_apic_irq_attr; -@@ -203,7 +203,7 @@ struct x86_io_apic_ops { +@@ -206,7 +206,7 @@ struct x86_io_apic_ops { unsigned int destination, int vector, struct io_apic_irq_attr *attr); void (*eoi_ioapic_pin)(int apic, int pin, int vector); @@ -18961,8 +19695,20 @@ index bbae024..e1528f9 100644 #define BIOS_END 0x00100000 #define BIOS_ROM_BASE 0xffe00000 +diff --git a/arch/x86/include/uapi/asm/ptrace-abi.h b/arch/x86/include/uapi/asm/ptrace-abi.h +index 7b0a55a..ad115bf 100644 +--- a/arch/x86/include/uapi/asm/ptrace-abi.h ++++ b/arch/x86/include/uapi/asm/ptrace-abi.h +@@ -49,7 +49,6 @@ + #define EFLAGS 144 + #define RSP 152 + #define SS 160 +-#define ARGOFFSET R11 + #endif /* __ASSEMBLY__ */ + + /* top of stack page */ diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile -index a5408b9..5133813 100644 +index 9b0a34e..fc7e553 100644 --- a/arch/x86/kernel/Makefile +++ b/arch/x86/kernel/Makefile @@ -24,7 +24,7 @@ obj-y += time.o ioport.o ldt.o dumpstack.o nmi.o @@ -18975,10 +19721,10 @@ index a5408b9..5133813 100644 obj-y += syscall_$(BITS).o obj-$(CONFIG_X86_64) += vsyscall_64.o diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c -index 40c7660..f709f4b 100644 +index 6c0b43b..e67bb31 100644 --- a/arch/x86/kernel/acpi/boot.c +++ b/arch/x86/kernel/acpi/boot.c -@@ -1365,7 +1365,7 @@ static int __init dmi_ignore_irq0_timer_override(const struct dmi_system_id *d) +@@ -1315,7 +1315,7 @@ static int __init dmi_ignore_irq0_timer_override(const struct dmi_system_id *d) * If your system is blacklisted here, but you find that acpi=force * works for you, please contact linux-acpi@vger.kernel.org */ @@ -18987,7 +19733,7 @@ index 40c7660..f709f4b 100644 /* * Boxes that need ACPI disabled */ -@@ -1440,7 +1440,7 @@ static struct dmi_system_id __initdata acpi_dmi_table[] = { +@@ -1390,7 +1390,7 @@ static struct dmi_system_id __initdata acpi_dmi_table[] = { }; /* second table for DMI checks that should run after early-quirks */ @@ -18997,10 +19743,10 @@ index 40c7660..f709f4b 100644 * HP laptops which use a DSDT reporting as HP/SB400/10000, * which includes some code which overrides all temperature diff --git a/arch/x86/kernel/acpi/sleep.c b/arch/x86/kernel/acpi/sleep.c -index 3312010..a65ca7b 100644 +index 3a2ae4c..9db31d6 100644 --- a/arch/x86/kernel/acpi/sleep.c +++ b/arch/x86/kernel/acpi/sleep.c -@@ -88,8 +88,12 @@ int x86_acpi_suspend_lowlevel(void) +@@ -99,8 +99,12 @@ int x86_acpi_suspend_lowlevel(void) #else /* CONFIG_64BIT */ #ifdef CONFIG_SMP stack_start = (unsigned long)temp_stack + sizeof(temp_stack); @@ -19014,7 +19760,7 @@ index 3312010..a65ca7b 100644 #endif initial_code = (unsigned long)wakeup_long64; diff --git a/arch/x86/kernel/acpi/wakeup_32.S b/arch/x86/kernel/acpi/wakeup_32.S -index d1daa66..59fecba 100644 +index 665c6b7..eae4d56 100644 --- a/arch/x86/kernel/acpi/wakeup_32.S +++ b/arch/x86/kernel/acpi/wakeup_32.S @@ -29,13 +29,11 @@ wakeup_pmode_return: @@ -19034,7 +19780,7 @@ index d1daa66..59fecba 100644 bogus_magic: jmp bogus_magic diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c -index 15e8563..323cbe1 100644 +index df94598..f3b29bf 100644 --- a/arch/x86/kernel/alternative.c +++ b/arch/x86/kernel/alternative.c @@ -269,6 +269,13 @@ void __init_or_module apply_alternatives(struct alt_instr *start, @@ -19087,7 +19833,7 @@ index 15e8563..323cbe1 100644 text_poke(ptr, ((unsigned char []){0x3E}), 1); } mutex_unlock(&text_mutex); -@@ -469,7 +488,7 @@ void __init_or_module apply_paravirt(struct paravirt_patch_site *start, +@@ -458,7 +477,7 @@ void __init_or_module apply_paravirt(struct paravirt_patch_site *start, BUG_ON(p->len > MAX_PATCH_LEN); /* prep the buffer with the original instructions */ @@ -19096,7 +19842,7 @@ index 15e8563..323cbe1 100644 used = pv_init_ops.patch(p->instrtype, p->clobbers, insnbuf, (unsigned long)p->instr, p->len); -@@ -516,7 +535,7 @@ void __init alternative_instructions(void) +@@ -505,7 +524,7 @@ void __init alternative_instructions(void) if (!uniproc_patched || num_possible_cpus() == 1) free_init_pages("SMP alternatives", (unsigned long)__smp_locks, @@ -19105,7 +19851,7 @@ index 15e8563..323cbe1 100644 #endif apply_paravirt(__parainstructions, __parainstructions_end); -@@ -536,13 +555,17 @@ void __init alternative_instructions(void) +@@ -525,13 +544,17 @@ void __init alternative_instructions(void) * instructions. And on the local CPU you need to be protected again NMI or MCE * handlers seeing an inconsistent instruction while you patch. */ @@ -19125,7 +19871,7 @@ index 15e8563..323cbe1 100644 local_irq_restore(flags); /* Could also do a CLFLUSH here to speed up CPU recovery; but that causes hangs on some VIA CPUs. */ -@@ -564,36 +587,22 @@ void *__init_or_module text_poke_early(void *addr, const void *opcode, +@@ -553,36 +576,22 @@ void *__init_or_module text_poke_early(void *addr, const void *opcode, */ void *__kprobes text_poke(void *addr, const void *opcode, size_t len) { @@ -19170,7 +19916,7 @@ index 15e8563..323cbe1 100644 return addr; } -@@ -613,7 +622,7 @@ int poke_int3_handler(struct pt_regs *regs) +@@ -602,7 +611,7 @@ int poke_int3_handler(struct pt_regs *regs) if (likely(!bp_patching_in_progress)) return 0; @@ -19179,7 +19925,7 @@ index 15e8563..323cbe1 100644 return 0; /* set up the specified breakpoint handler */ -@@ -647,7 +656,7 @@ int poke_int3_handler(struct pt_regs *regs) +@@ -636,7 +645,7 @@ int poke_int3_handler(struct pt_regs *regs) */ void *text_poke_bp(void *addr, const void *opcode, size_t len, void *handler) { @@ -19189,10 +19935,10 @@ index 15e8563..323cbe1 100644 bp_int3_handler = handler; bp_int3_addr = (u8 *)addr + sizeof(int3); diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c -index a7eb82d..f6e52d4 100644 +index d278736..0b4af9a8 100644 --- a/arch/x86/kernel/apic/apic.c +++ b/arch/x86/kernel/apic/apic.c -@@ -190,7 +190,7 @@ int first_system_vector = 0xfe; +@@ -191,7 +191,7 @@ int first_system_vector = 0xfe; /* * Debug level, exported for io_apic.c */ @@ -19201,7 +19947,7 @@ index a7eb82d..f6e52d4 100644 int pic_mode; -@@ -1985,7 +1985,7 @@ static inline void __smp_error_interrupt(struct pt_regs *regs) +@@ -1986,7 +1986,7 @@ static inline void __smp_error_interrupt(struct pt_regs *regs) apic_write(APIC_ESR, 0); v1 = apic_read(APIC_ESR); ack_APIC_irq(); @@ -19397,10 +20143,10 @@ index 562a76d..a003c0f 100644 .name = "physical x2apic", .probe = x2apic_phys_probe, diff --git a/arch/x86/kernel/apic/x2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c -index a419814..1dd34a0 100644 +index ad0dc04..0d9cc56 100644 --- a/arch/x86/kernel/apic/x2apic_uv_x.c +++ b/arch/x86/kernel/apic/x2apic_uv_x.c -@@ -357,7 +357,7 @@ static int uv_probe(void) +@@ -350,7 +350,7 @@ static int uv_probe(void) return apic == &apic_x2apic_uv_x; } @@ -19485,19 +20231,19 @@ index 3ab0343..814c4787 100644 proc_create("apm", 0, NULL, &apm_file_ops); diff --git a/arch/x86/kernel/asm-offsets.c b/arch/x86/kernel/asm-offsets.c -index 2861082..6d4718e 100644 +index 9f6b934..cf5ffb3 100644 --- a/arch/x86/kernel/asm-offsets.c +++ b/arch/x86/kernel/asm-offsets.c -@@ -33,6 +33,8 @@ void common(void) { +@@ -32,6 +32,8 @@ void common(void) { + OFFSET(TI_flags, thread_info, flags); OFFSET(TI_status, thread_info, status); OFFSET(TI_addr_limit, thread_info, addr_limit); - OFFSET(TI_preempt_count, thread_info, preempt_count); + OFFSET(TI_lowest_stack, thread_info, lowest_stack); + DEFINE(TI_task_thread_sp0, offsetof(struct task_struct, thread.sp0) - offsetof(struct task_struct, tinfo)); BLANK(); OFFSET(crypto_tfm_ctx_offset, crypto_tfm, __crt_ctx); -@@ -53,8 +55,26 @@ void common(void) { +@@ -52,8 +54,26 @@ void common(void) { OFFSET(PV_CPU_irq_enable_sysexit, pv_cpu_ops, irq_enable_sysexit); OFFSET(PV_CPU_read_cr0, pv_cpu_ops, read_cr0); OFFSET(PV_MMU_read_cr2, pv_mmu_ops, read_cr2); @@ -19552,10 +20298,10 @@ index 47b56a7..efc2bc6 100644 obj-y += proc.o capflags.o powerflags.o common.o obj-y += rdrand.o diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c -index 903a264..fc955f3 100644 +index 59bfebc..d8f27bd 100644 --- a/arch/x86/kernel/cpu/amd.c +++ b/arch/x86/kernel/cpu/amd.c -@@ -743,7 +743,7 @@ static void init_amd(struct cpuinfo_x86 *c) +@@ -753,7 +753,7 @@ static void init_amd(struct cpuinfo_x86 *c) static unsigned int amd_size_cache(struct cpuinfo_x86 *c, unsigned int size) { /* AMD errata T13 (order #21922) */ @@ -19565,7 +20311,7 @@ index 903a264..fc955f3 100644 if (c->x86_model == 3 && c->x86_mask == 0) size = 64; diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c -index 2793d1f..b4f313a 100644 +index 6abc172..3b0df94 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c @@ -88,60 +88,6 @@ static const struct cpu_dev default_cpu = { @@ -19689,7 +20435,7 @@ index 2793d1f..b4f313a 100644 /* * Some CPU features depend on higher CPUID levels, which may not always * be available due to CPUID level capping or broken virtualization -@@ -386,7 +385,7 @@ void switch_to_new_gdt(int cpu) +@@ -388,7 +387,7 @@ void switch_to_new_gdt(int cpu) { struct desc_ptr gdt_descr; @@ -19698,7 +20444,7 @@ index 2793d1f..b4f313a 100644 gdt_descr.size = GDT_SIZE - 1; load_gdt(&gdt_descr); /* Reload the per-cpu base */ -@@ -875,6 +874,10 @@ static void identify_cpu(struct cpuinfo_x86 *c) +@@ -877,6 +876,10 @@ static void identify_cpu(struct cpuinfo_x86 *c) setup_smep(c); setup_smap(c); @@ -19709,7 +20455,7 @@ index 2793d1f..b4f313a 100644 /* * The vendor-specific functions might have changed features. * Now we do "generic changes." -@@ -883,6 +886,10 @@ static void identify_cpu(struct cpuinfo_x86 *c) +@@ -885,6 +888,10 @@ static void identify_cpu(struct cpuinfo_x86 *c) /* Filter out anything that depends on CPUID levels we don't have */ filter_cpuid_features(c, true); @@ -19720,7 +20466,7 @@ index 2793d1f..b4f313a 100644 /* If the model name is still unset, do table lookup. */ if (!c->x86_model_id[0]) { const char *p; -@@ -1070,10 +1077,12 @@ static __init int setup_disablecpuid(char *arg) +@@ -1072,10 +1079,12 @@ static __init int setup_disablecpuid(char *arg) } __setup("clearcpuid=", setup_disablecpuid); @@ -19736,7 +20482,7 @@ index 2793d1f..b4f313a 100644 DEFINE_PER_CPU_FIRST(union irq_stack_union, irq_stack_union) __aligned(PAGE_SIZE) __visible; -@@ -1087,7 +1096,7 @@ DEFINE_PER_CPU(struct task_struct *, current_task) ____cacheline_aligned = +@@ -1089,7 +1098,7 @@ DEFINE_PER_CPU(struct task_struct *, current_task) ____cacheline_aligned = EXPORT_PER_CPU_SYMBOL(current_task); DEFINE_PER_CPU(unsigned long, kernel_stack) = @@ -19745,7 +20491,7 @@ index 2793d1f..b4f313a 100644 EXPORT_PER_CPU_SYMBOL(kernel_stack); DEFINE_PER_CPU(char *, irq_stack_ptr) = -@@ -1232,7 +1241,7 @@ void cpu_init(void) +@@ -1239,7 +1248,7 @@ void cpu_init(void) load_ucode_ap(); cpu = stack_smp_processor_id(); @@ -19754,7 +20500,7 @@ index 2793d1f..b4f313a 100644 oist = &per_cpu(orig_ist, cpu); #ifdef CONFIG_NUMA -@@ -1267,7 +1276,6 @@ void cpu_init(void) +@@ -1274,7 +1283,6 @@ void cpu_init(void) wrmsrl(MSR_KERNEL_GS_BASE, 0); barrier(); @@ -19762,7 +20508,7 @@ index 2793d1f..b4f313a 100644 enable_x2apic(); /* -@@ -1319,7 +1327,7 @@ void cpu_init(void) +@@ -1326,7 +1334,7 @@ void cpu_init(void) { int cpu = smp_processor_id(); struct task_struct *curr = current; @@ -19772,7 +20518,7 @@ index 2793d1f..b4f313a 100644 show_ucode_info_early(); diff --git a/arch/x86/kernel/cpu/intel_cacheinfo.c b/arch/x86/kernel/cpu/intel_cacheinfo.c -index 1414c90..1159406 100644 +index 0641113..06f5ba4 100644 --- a/arch/x86/kernel/cpu/intel_cacheinfo.c +++ b/arch/x86/kernel/cpu/intel_cacheinfo.c @@ -1014,6 +1014,22 @@ static struct attribute *default_attrs[] = { @@ -20076,7 +20822,7 @@ index df5e41f..816c719 100644 extern int generic_get_free_region(unsigned long base, unsigned long size, int replace_reg); diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c -index 8a87a32..682a22a 100644 +index 8e13293..9bfd68c 100644 --- a/arch/x86/kernel/cpu/perf_event.c +++ b/arch/x86/kernel/cpu/perf_event.c @@ -1348,7 +1348,7 @@ static void __init pmu_check_apic(void) @@ -20129,10 +20875,10 @@ index 639d128..e92d7e5 100644 while (amd_iommu_v2_event_descs[i].attr.attr.name) diff --git a/arch/x86/kernel/cpu/perf_event_intel.c b/arch/x86/kernel/cpu/perf_event_intel.c -index f31a165..7b46cd8 100644 +index 0fa4f24..17990ed 100644 --- a/arch/x86/kernel/cpu/perf_event_intel.c +++ b/arch/x86/kernel/cpu/perf_event_intel.c -@@ -2247,10 +2247,10 @@ __init int intel_pmu_init(void) +@@ -2314,10 +2314,10 @@ __init int intel_pmu_init(void) * v2 and above have a perf capabilities MSR */ if (version > 1) { @@ -20147,10 +20893,10 @@ index f31a165..7b46cd8 100644 intel_ds_init(); diff --git a/arch/x86/kernel/cpu/perf_event_intel_uncore.c b/arch/x86/kernel/cpu/perf_event_intel_uncore.c -index 4118f9f..f91d0ab 100644 +index 29c2487..a5606fa 100644 --- a/arch/x86/kernel/cpu/perf_event_intel_uncore.c +++ b/arch/x86/kernel/cpu/perf_event_intel_uncore.c -@@ -3204,7 +3204,7 @@ static void __init uncore_types_exit(struct intel_uncore_type **types) +@@ -3318,7 +3318,7 @@ static void __init uncore_types_exit(struct intel_uncore_type **types) static int __init uncore_type_init(struct intel_uncore_type *type) { struct intel_uncore_pmu *pmus; @@ -20250,7 +20996,7 @@ index 5d3fe8d..02e1429 100644 .__cr3 = __pa_nodebug(swapper_pg_dir), diff --git a/arch/x86/kernel/dumpstack.c b/arch/x86/kernel/dumpstack.c -index deb6421..76bbc12 100644 +index d9c12d3..7858b62 100644 --- a/arch/x86/kernel/dumpstack.c +++ b/arch/x86/kernel/dumpstack.c @@ -2,6 +2,9 @@ @@ -20263,7 +21009,7 @@ index deb6421..76bbc12 100644 #include #include #include -@@ -35,16 +38,14 @@ void printk_address(unsigned long address, int reliable) +@@ -40,16 +43,14 @@ void printk_address(unsigned long address) static void print_ftrace_graph_addr(unsigned long addr, void *data, const struct stacktrace_ops *ops, @@ -20281,7 +21027,7 @@ index deb6421..76bbc12 100644 index = task->curr_ret_stack; if (!task->ret_stack || index < *graph) -@@ -61,7 +62,7 @@ print_ftrace_graph_addr(unsigned long addr, void *data, +@@ -66,7 +67,7 @@ print_ftrace_graph_addr(unsigned long addr, void *data, static inline void print_ftrace_graph_addr(unsigned long addr, void *data, const struct stacktrace_ops *ops, @@ -20290,7 +21036,7 @@ index deb6421..76bbc12 100644 { } #endif -@@ -72,10 +73,8 @@ print_ftrace_graph_addr(unsigned long addr, void *data, +@@ -77,10 +78,8 @@ print_ftrace_graph_addr(unsigned long addr, void *data, * severe exception (double fault, nmi, stack fault, debug, mce) hardware stack */ @@ -20302,7 +21048,7 @@ index deb6421..76bbc12 100644 if (end) { if (p < end && p >= (end-THREAD_SIZE)) return 1; -@@ -86,14 +85,14 @@ static inline int valid_stack_ptr(struct thread_info *tinfo, +@@ -91,14 +90,14 @@ static inline int valid_stack_ptr(struct thread_info *tinfo, } unsigned long @@ -20319,7 +21065,7 @@ index deb6421..76bbc12 100644 unsigned long addr; addr = *stack; -@@ -105,7 +104,7 @@ print_context_stack(struct thread_info *tinfo, +@@ -110,7 +109,7 @@ print_context_stack(struct thread_info *tinfo, } else { ops->address(data, addr, 0); } @@ -20328,7 +21074,7 @@ index deb6421..76bbc12 100644 } stack++; } -@@ -114,7 +113,7 @@ print_context_stack(struct thread_info *tinfo, +@@ -119,7 +118,7 @@ print_context_stack(struct thread_info *tinfo, EXPORT_SYMBOL_GPL(print_context_stack); unsigned long @@ -20337,7 +21083,7 @@ index deb6421..76bbc12 100644 unsigned long *stack, unsigned long bp, const struct stacktrace_ops *ops, void *data, unsigned long *end, int *graph) -@@ -122,7 +121,7 @@ print_context_stack_bp(struct thread_info *tinfo, +@@ -127,7 +126,7 @@ print_context_stack_bp(struct thread_info *tinfo, struct stack_frame *frame = (struct stack_frame *)bp; unsigned long *ret_addr = &frame->return_address; @@ -20346,7 +21092,7 @@ index deb6421..76bbc12 100644 unsigned long addr = *ret_addr; if (!__kernel_text_address(addr)) -@@ -131,7 +130,7 @@ print_context_stack_bp(struct thread_info *tinfo, +@@ -136,7 +135,7 @@ print_context_stack_bp(struct thread_info *tinfo, ops->address(data, addr, 1); frame = frame->next_frame; ret_addr = &frame->return_address; @@ -20355,16 +21101,16 @@ index deb6421..76bbc12 100644 } return (unsigned long)frame; -@@ -150,7 +149,7 @@ static int print_trace_stack(void *data, char *name) +@@ -155,7 +154,7 @@ static int print_trace_stack(void *data, char *name) static void print_trace_address(void *data, unsigned long addr, int reliable) { touch_nmi_watchdog(); - printk(data); + printk("%s", (char *)data); - printk_address(addr, reliable); + printk_stack_address(addr, reliable); } -@@ -219,6 +218,8 @@ unsigned __kprobes long oops_begin(void) +@@ -224,6 +223,8 @@ unsigned __kprobes long oops_begin(void) } EXPORT_SYMBOL_GPL(oops_begin); @@ -20373,7 +21119,7 @@ index deb6421..76bbc12 100644 void __kprobes oops_end(unsigned long flags, struct pt_regs *regs, int signr) { if (regs && kexec_should_crash(current)) -@@ -240,7 +241,10 @@ void __kprobes oops_end(unsigned long flags, struct pt_regs *regs, int signr) +@@ -245,7 +246,10 @@ void __kprobes oops_end(unsigned long flags, struct pt_regs *regs, int signr) panic("Fatal exception in interrupt"); if (panic_on_oops) panic("Fatal exception"); @@ -20385,7 +21131,7 @@ index deb6421..76bbc12 100644 } int __kprobes __die(const char *str, struct pt_regs *regs, long err) -@@ -268,7 +272,7 @@ int __kprobes __die(const char *str, struct pt_regs *regs, long err) +@@ -273,7 +277,7 @@ int __kprobes __die(const char *str, struct pt_regs *regs, long err) print_modules(); show_regs(regs); #ifdef CONFIG_X86_32 @@ -20394,7 +21140,7 @@ index deb6421..76bbc12 100644 sp = regs->sp; ss = regs->ss & 0xffff; } else { -@@ -296,7 +300,7 @@ void die(const char *str, struct pt_regs *regs, long err) +@@ -301,7 +305,7 @@ void die(const char *str, struct pt_regs *regs, long err) unsigned long flags = oops_begin(); int sig = SIGSEGV; @@ -20625,7 +21371,7 @@ index 174da5f..5e55606 100644 static int userdef __initdata; diff --git a/arch/x86/kernel/early_printk.c b/arch/x86/kernel/early_printk.c -index d15f575..d692043 100644 +index 01d1c18..8073693 100644 --- a/arch/x86/kernel/early_printk.c +++ b/arch/x86/kernel/early_printk.c @@ -7,6 +7,7 @@ @@ -20637,7 +21383,7 @@ index d15f575..d692043 100644 #include #include diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S -index f0dcb0c..9f39b80 100644 +index a2a4f46..6cab058 100644 --- a/arch/x86/kernel/entry_32.S +++ b/arch/x86/kernel/entry_32.S @@ -177,13 +177,153 @@ @@ -20856,7 +21602,7 @@ index f0dcb0c..9f39b80 100644 #ifdef CONFIG_PREEMPT ENTRY(resume_kernel) -@@ -372,7 +529,7 @@ need_resched: +@@ -369,7 +526,7 @@ need_resched: jz restore_all call preempt_schedule_irq jmp need_resched @@ -20865,7 +21611,7 @@ index f0dcb0c..9f39b80 100644 #endif CFI_ENDPROC /* -@@ -406,30 +563,45 @@ sysenter_past_esp: +@@ -403,30 +560,45 @@ sysenter_past_esp: /*CFI_REL_OFFSET cs, 0*/ /* * Push current_thread_info()->sysenter_return to the stack. @@ -20914,7 +21660,7 @@ index f0dcb0c..9f39b80 100644 testl $_TIF_WORK_SYSCALL_ENTRY,TI_flags(%ebp) jnz sysenter_audit sysenter_do_call: -@@ -444,12 +616,24 @@ sysenter_do_call: +@@ -441,12 +613,24 @@ sysenter_do_call: testl $_TIF_ALLWORK_MASK, %ecx jne sysexit_audit sysenter_exit: @@ -20939,7 +21685,7 @@ index f0dcb0c..9f39b80 100644 PTGS_TO_GS ENABLE_INTERRUPTS_SYSEXIT -@@ -466,6 +650,9 @@ sysenter_audit: +@@ -463,6 +647,9 @@ sysenter_audit: movl %eax,%edx /* 2nd arg: syscall number */ movl $AUDIT_ARCH_I386,%eax /* 1st arg: audit arch */ call __audit_syscall_entry @@ -20949,7 +21695,7 @@ index f0dcb0c..9f39b80 100644 pushl_cfi %ebx movl PT_EAX(%esp),%eax /* reload syscall number */ jmp sysenter_do_call -@@ -491,10 +678,16 @@ sysexit_audit: +@@ -488,10 +675,16 @@ sysexit_audit: CFI_ENDPROC .pushsection .fixup,"ax" @@ -20968,7 +21714,7 @@ index f0dcb0c..9f39b80 100644 PTGS_TO_GS_EX ENDPROC(ia32_sysenter_target) -@@ -509,6 +702,11 @@ ENTRY(system_call) +@@ -506,6 +699,11 @@ ENTRY(system_call) pushl_cfi %eax # save orig_eax SAVE_ALL GET_THREAD_INFO(%ebp) @@ -20980,7 +21726,7 @@ index f0dcb0c..9f39b80 100644 # system call tracing in operation / emulation testl $_TIF_WORK_SYSCALL_ENTRY,TI_flags(%ebp) jnz syscall_trace_entry -@@ -527,6 +725,15 @@ syscall_exit: +@@ -524,6 +722,15 @@ syscall_exit: testl $_TIF_ALLWORK_MASK, %ecx # current->work jne syscall_exit_work @@ -20996,7 +21742,7 @@ index f0dcb0c..9f39b80 100644 restore_all: TRACE_IRQS_IRET restore_all_notrace: -@@ -583,14 +790,34 @@ ldt_ss: +@@ -580,14 +787,34 @@ ldt_ss: * compensating for the offset by changing to the ESPFIX segment with * a base address that matches for the difference. */ @@ -21034,7 +21780,7 @@ index f0dcb0c..9f39b80 100644 pushl_cfi $__ESPFIX_SS pushl_cfi %eax /* new kernel esp */ /* Disable interrupts, but do not irqtrace this section: we -@@ -619,20 +846,18 @@ work_resched: +@@ -616,20 +843,18 @@ work_resched: movl TI_flags(%ebp), %ecx andl $_TIF_WORK_MASK, %ecx # is there any work to be done other # than syscall tracing? @@ -21057,7 +21803,7 @@ index f0dcb0c..9f39b80 100644 #endif TRACE_IRQS_ON ENABLE_INTERRUPTS(CLBR_NONE) -@@ -653,7 +878,7 @@ work_notifysig_v86: +@@ -650,7 +875,7 @@ work_notifysig_v86: movl %eax, %esp jmp 1b #endif @@ -21066,7 +21812,7 @@ index f0dcb0c..9f39b80 100644 # perform syscall exit tracing ALIGN -@@ -661,11 +886,14 @@ syscall_trace_entry: +@@ -658,11 +883,14 @@ syscall_trace_entry: movl $-ENOSYS,PT_EAX(%esp) movl %esp, %eax call syscall_trace_enter @@ -21082,7 +21828,7 @@ index f0dcb0c..9f39b80 100644 # perform syscall exit tracing ALIGN -@@ -678,21 +906,25 @@ syscall_exit_work: +@@ -675,21 +903,25 @@ syscall_exit_work: movl %esp, %eax call syscall_trace_leave jmp resume_userspace @@ -21111,7 +21857,7 @@ index f0dcb0c..9f39b80 100644 CFI_ENDPROC /* * End of kprobes section -@@ -708,8 +940,15 @@ END(syscall_badsys) +@@ -705,8 +937,15 @@ END(syscall_badsys) * normal stack and adjusts ESP with the matching offset. */ /* fixup the stack */ @@ -21129,7 +21875,7 @@ index f0dcb0c..9f39b80 100644 shl $16, %eax addl %esp, %eax /* the adjusted stack pointer */ pushl_cfi $__KERNEL_DS -@@ -762,7 +1001,7 @@ vector=vector+1 +@@ -759,7 +998,7 @@ vector=vector+1 .endr 2: jmp common_interrupt .endr @@ -21138,7 +21884,7 @@ index f0dcb0c..9f39b80 100644 .previous END(interrupt) -@@ -823,7 +1062,7 @@ ENTRY(coprocessor_error) +@@ -820,7 +1059,7 @@ ENTRY(coprocessor_error) pushl_cfi $do_coprocessor_error jmp error_code CFI_ENDPROC @@ -21147,7 +21893,7 @@ index f0dcb0c..9f39b80 100644 ENTRY(simd_coprocessor_error) RING0_INT_FRAME -@@ -836,7 +1075,7 @@ ENTRY(simd_coprocessor_error) +@@ -833,7 +1072,7 @@ ENTRY(simd_coprocessor_error) .section .altinstructions,"a" altinstruction_entry 661b, 663f, X86_FEATURE_XMM, 662b-661b, 664f-663f .previous @@ -21156,7 +21902,7 @@ index f0dcb0c..9f39b80 100644 663: pushl $do_simd_coprocessor_error 664: .previous -@@ -845,7 +1084,7 @@ ENTRY(simd_coprocessor_error) +@@ -842,7 +1081,7 @@ ENTRY(simd_coprocessor_error) #endif jmp error_code CFI_ENDPROC @@ -21165,7 +21911,7 @@ index f0dcb0c..9f39b80 100644 ENTRY(device_not_available) RING0_INT_FRAME -@@ -854,18 +1093,18 @@ ENTRY(device_not_available) +@@ -851,18 +1090,18 @@ ENTRY(device_not_available) pushl_cfi $do_device_not_available jmp error_code CFI_ENDPROC @@ -21187,7 +21933,7 @@ index f0dcb0c..9f39b80 100644 #endif ENTRY(overflow) -@@ -875,7 +1114,7 @@ ENTRY(overflow) +@@ -872,7 +1111,7 @@ ENTRY(overflow) pushl_cfi $do_overflow jmp error_code CFI_ENDPROC @@ -21196,7 +21942,7 @@ index f0dcb0c..9f39b80 100644 ENTRY(bounds) RING0_INT_FRAME -@@ -884,7 +1123,7 @@ ENTRY(bounds) +@@ -881,7 +1120,7 @@ ENTRY(bounds) pushl_cfi $do_bounds jmp error_code CFI_ENDPROC @@ -21205,7 +21951,7 @@ index f0dcb0c..9f39b80 100644 ENTRY(invalid_op) RING0_INT_FRAME -@@ -893,7 +1132,7 @@ ENTRY(invalid_op) +@@ -890,7 +1129,7 @@ ENTRY(invalid_op) pushl_cfi $do_invalid_op jmp error_code CFI_ENDPROC @@ -21214,7 +21960,7 @@ index f0dcb0c..9f39b80 100644 ENTRY(coprocessor_segment_overrun) RING0_INT_FRAME -@@ -902,7 +1141,7 @@ ENTRY(coprocessor_segment_overrun) +@@ -899,7 +1138,7 @@ ENTRY(coprocessor_segment_overrun) pushl_cfi $do_coprocessor_segment_overrun jmp error_code CFI_ENDPROC @@ -21223,7 +21969,7 @@ index f0dcb0c..9f39b80 100644 ENTRY(invalid_TSS) RING0_EC_FRAME -@@ -910,7 +1149,7 @@ ENTRY(invalid_TSS) +@@ -907,7 +1146,7 @@ ENTRY(invalid_TSS) pushl_cfi $do_invalid_TSS jmp error_code CFI_ENDPROC @@ -21232,7 +21978,7 @@ index f0dcb0c..9f39b80 100644 ENTRY(segment_not_present) RING0_EC_FRAME -@@ -918,7 +1157,7 @@ ENTRY(segment_not_present) +@@ -915,7 +1154,7 @@ ENTRY(segment_not_present) pushl_cfi $do_segment_not_present jmp error_code CFI_ENDPROC @@ -21241,7 +21987,7 @@ index f0dcb0c..9f39b80 100644 ENTRY(stack_segment) RING0_EC_FRAME -@@ -926,7 +1165,7 @@ ENTRY(stack_segment) +@@ -923,7 +1162,7 @@ ENTRY(stack_segment) pushl_cfi $do_stack_segment jmp error_code CFI_ENDPROC @@ -21250,7 +21996,7 @@ index f0dcb0c..9f39b80 100644 ENTRY(alignment_check) RING0_EC_FRAME -@@ -934,7 +1173,7 @@ ENTRY(alignment_check) +@@ -931,7 +1170,7 @@ ENTRY(alignment_check) pushl_cfi $do_alignment_check jmp error_code CFI_ENDPROC @@ -21259,7 +22005,7 @@ index f0dcb0c..9f39b80 100644 ENTRY(divide_error) RING0_INT_FRAME -@@ -943,7 +1182,7 @@ ENTRY(divide_error) +@@ -940,7 +1179,7 @@ ENTRY(divide_error) pushl_cfi $do_divide_error jmp error_code CFI_ENDPROC @@ -21268,7 +22014,7 @@ index f0dcb0c..9f39b80 100644 #ifdef CONFIG_X86_MCE ENTRY(machine_check) -@@ -953,7 +1192,7 @@ ENTRY(machine_check) +@@ -950,7 +1189,7 @@ ENTRY(machine_check) pushl_cfi machine_check_vector jmp error_code CFI_ENDPROC @@ -21277,7 +22023,7 @@ index f0dcb0c..9f39b80 100644 #endif ENTRY(spurious_interrupt_bug) -@@ -963,7 +1202,7 @@ ENTRY(spurious_interrupt_bug) +@@ -960,7 +1199,7 @@ ENTRY(spurious_interrupt_bug) pushl_cfi $do_spurious_interrupt_bug jmp error_code CFI_ENDPROC @@ -21286,7 +22032,7 @@ index f0dcb0c..9f39b80 100644 /* * End of kprobes section */ -@@ -1073,7 +1312,7 @@ BUILD_INTERRUPT3(hyperv_callback_vector, HYPERVISOR_CALLBACK_VECTOR, +@@ -1070,7 +1309,7 @@ BUILD_INTERRUPT3(hyperv_callback_vector, HYPERVISOR_CALLBACK_VECTOR, ENTRY(mcount) ret @@ -21295,7 +22041,7 @@ index f0dcb0c..9f39b80 100644 ENTRY(ftrace_caller) cmpl $0, function_trace_stop -@@ -1106,7 +1345,7 @@ ftrace_graph_call: +@@ -1103,7 +1342,7 @@ ftrace_graph_call: .globl ftrace_stub ftrace_stub: ret @@ -21304,7 +22050,7 @@ index f0dcb0c..9f39b80 100644 ENTRY(ftrace_regs_caller) pushf /* push flags before compare (in cs location) */ -@@ -1210,7 +1449,7 @@ trace: +@@ -1207,7 +1446,7 @@ trace: popl %ecx popl %eax jmp ftrace_stub @@ -21313,7 +22059,7 @@ index f0dcb0c..9f39b80 100644 #endif /* CONFIG_DYNAMIC_FTRACE */ #endif /* CONFIG_FUNCTION_TRACER */ -@@ -1228,7 +1467,7 @@ ENTRY(ftrace_graph_caller) +@@ -1225,7 +1464,7 @@ ENTRY(ftrace_graph_caller) popl %ecx popl %eax ret @@ -21322,7 +22068,7 @@ index f0dcb0c..9f39b80 100644 .globl return_to_handler return_to_handler: -@@ -1284,15 +1523,18 @@ error_code: +@@ -1291,15 +1530,18 @@ error_code: movl $-1, PT_ORIG_EAX(%esp) # no syscall to restart REG_TO_PTGS %ecx SET_KERNEL_GS %ecx @@ -21343,7 +22089,7 @@ index f0dcb0c..9f39b80 100644 /* * Debug traps and NMI can happen at the one SYSENTER instruction -@@ -1335,7 +1577,7 @@ debug_stack_correct: +@@ -1342,7 +1584,7 @@ debug_stack_correct: call do_debug jmp ret_from_exception CFI_ENDPROC @@ -21352,7 +22098,7 @@ index f0dcb0c..9f39b80 100644 /* * NMI is doubly nasty. It can happen _while_ we're handling -@@ -1373,6 +1615,9 @@ nmi_stack_correct: +@@ -1380,6 +1622,9 @@ nmi_stack_correct: xorl %edx,%edx # zero error code movl %esp,%eax # pt_regs pointer call do_nmi @@ -21362,7 +22108,7 @@ index f0dcb0c..9f39b80 100644 jmp restore_all_notrace CFI_ENDPROC -@@ -1409,12 +1654,15 @@ nmi_espfix_stack: +@@ -1416,12 +1661,15 @@ nmi_espfix_stack: FIXUP_ESPFIX_STACK # %eax == %esp xorl %edx,%edx # zero error code call do_nmi @@ -21379,7 +22125,7 @@ index f0dcb0c..9f39b80 100644 ENTRY(int3) RING0_INT_FRAME -@@ -1427,14 +1675,14 @@ ENTRY(int3) +@@ -1434,14 +1682,14 @@ ENTRY(int3) call do_int3 jmp ret_from_exception CFI_ENDPROC @@ -21396,7 +22142,7 @@ index f0dcb0c..9f39b80 100644 #ifdef CONFIG_KVM_GUEST ENTRY(async_page_fault) -@@ -1443,7 +1691,7 @@ ENTRY(async_page_fault) +@@ -1450,7 +1698,7 @@ ENTRY(async_page_fault) pushl_cfi $do_async_page_fault jmp error_code CFI_ENDPROC @@ -21406,7 +22152,7 @@ index f0dcb0c..9f39b80 100644 /* diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S -index b077f4c..feb26c1 100644 +index 1e96c36..3ff710a 100644 --- a/arch/x86/kernel/entry_64.S +++ b/arch/x86/kernel/entry_64.S @@ -59,6 +59,8 @@ @@ -21924,40 +22670,158 @@ index b077f4c..feb26c1 100644 .macro TRACE_IRQS_IRETQ offset=ARGOFFSET #ifdef CONFIG_TRACE_IRQFLAGS -@@ -375,8 +808,8 @@ ENDPROC(native_usergs_sysret64) +@@ -320,7 +753,7 @@ ENDPROC(native_usergs_sysret64) + .endm + + .macro TRACE_IRQS_IRETQ_DEBUG offset=ARGOFFSET +- bt $9,EFLAGS-\offset(%rsp) /* interrupts off? */ ++ bt $X86_EFLAGS_IF_BIT,EFLAGS-\offset(%rsp) /* interrupts off? */ + jnc 1f + TRACE_IRQS_ON_DEBUG + 1: +@@ -358,27 +791,6 @@ ENDPROC(native_usergs_sysret64) + movq \tmp,R11+\offset(%rsp) .endm - .macro UNFAKE_STACK_FRAME +- .macro FAKE_STACK_FRAME child_rip +- /* push in order ss, rsp, eflags, cs, rip */ +- xorl %eax, %eax +- pushq_cfi $__KERNEL_DS /* ss */ +- /*CFI_REL_OFFSET ss,0*/ +- pushq_cfi %rax /* rsp */ +- CFI_REL_OFFSET rsp,0 +- pushq_cfi $(X86_EFLAGS_IF|X86_EFLAGS_FIXED) /* eflags - interrupts on */ +- /*CFI_REL_OFFSET rflags,0*/ +- pushq_cfi $__KERNEL_CS /* cs */ +- /*CFI_REL_OFFSET cs,0*/ +- pushq_cfi \child_rip /* rip */ +- CFI_REL_OFFSET rip,0 +- pushq_cfi %rax /* orig rax */ +- .endm +- +- .macro UNFAKE_STACK_FRAME - addq $8*6, %rsp - CFI_ADJUST_CFA_OFFSET -(6*8) -+ addq $8*6 + ARG_SKIP, %rsp -+ CFI_ADJUST_CFA_OFFSET -(6*8 + ARG_SKIP) - .endm - +- .endm +- /* -@@ -463,7 +896,7 @@ ENDPROC(native_usergs_sysret64) + * initial frame state for interrupts (and exceptions without error code) + */ +@@ -445,25 +857,26 @@ ENDPROC(native_usergs_sysret64) + /* save partial stack frame */ + .macro SAVE_ARGS_IRQ + cld +- /* start from rbp in pt_regs and jump over */ +- movq_cfi rdi, (RDI-RBP) +- movq_cfi rsi, (RSI-RBP) +- movq_cfi rdx, (RDX-RBP) +- movq_cfi rcx, (RCX-RBP) +- movq_cfi rax, (RAX-RBP) +- movq_cfi r8, (R8-RBP) +- movq_cfi r9, (R9-RBP) +- movq_cfi r10, (R10-RBP) +- movq_cfi r11, (R11-RBP) ++ /* start from r15 in pt_regs and jump over */ ++ movq_cfi rdi, RDI ++ movq_cfi rsi, RSI ++ movq_cfi rdx, RDX ++ movq_cfi rcx, RCX ++ movq_cfi rax, RAX ++ movq_cfi r8, R8 ++ movq_cfi r9, R9 ++ movq_cfi r10, R10 ++ movq_cfi r11, R11 ++ movq_cfi r12, R12 + + /* Save rbp so that we can unwind from get_irq_regs() */ +- movq_cfi rbp, 0 ++ movq_cfi rbp, RBP + + /* Save previous stack value */ movq %rsp, %rsi - leaq -RBP(%rsp),%rdi /* arg1 for handler */ +- leaq -RBP(%rsp),%rdi /* arg1 for handler */ - testl $3, CS-RBP(%rsi) -+ testb $3, CS-RBP(%rsi) ++ movq %rsp,%rdi /* arg1 for handler */ ++ testb $3, CS(%rsi) je 1f SWAPGS /* -@@ -514,9 +947,10 @@ ENTRY(save_paranoid) +@@ -483,6 +896,18 @@ ENDPROC(native_usergs_sysret64) + 0x06 /* DW_OP_deref */, \ + 0x08 /* DW_OP_const1u */, SS+8-RBP, \ + 0x22 /* DW_OP_plus */ ++ ++#ifdef CONFIG_PAX_MEMORY_UDEREF ++ testb $3, CS(%rdi) ++ jnz 1f ++ pax_enter_kernel ++ jmp 2f ++1: pax_enter_kernel_user ++2: ++#else ++ pax_enter_kernel ++#endif ++ + /* We entered an interrupt context - irqs are off: */ + TRACE_IRQS_OFF + .endm +@@ -514,9 +939,52 @@ ENTRY(save_paranoid) js 1f /* negative -> in kernel */ SWAPGS xorl %ebx,%ebx -1: ret -+1: pax_force_retaddr_bts ++1: ++#ifdef CONFIG_PAX_MEMORY_UDEREF ++ testb $3, CS+8(%rsp) ++ jnz 1f ++ pax_enter_kernel ++ jmp 2f ++1: pax_enter_kernel_user ++2: ++#else ++ pax_enter_kernel ++#endif ++ pax_force_retaddr + ret CFI_ENDPROC -END(save_paranoid) +ENDPROC(save_paranoid) ++ ++ENTRY(save_paranoid_nmi) ++ XCPT_FRAME 1 RDI+8 ++ cld ++ movq_cfi rdi, RDI+8 ++ movq_cfi rsi, RSI+8 ++ movq_cfi rdx, RDX+8 ++ movq_cfi rcx, RCX+8 ++ movq_cfi rax, RAX+8 ++ movq_cfi r8, R8+8 ++ movq_cfi r9, R9+8 ++ movq_cfi r10, R10+8 ++ movq_cfi r11, R11+8 ++ movq_cfi rbx, RBX+8 ++ movq_cfi rbp, RBP+8 ++ movq_cfi r12, R12+8 ++ movq_cfi r13, R13+8 ++ movq_cfi r14, R14+8 ++ movq_cfi r15, R15+8 ++ movl $1,%ebx ++ movl $MSR_GS_BASE,%ecx ++ rdmsr ++ testl %edx,%edx ++ js 1f /* negative -> in kernel */ ++ SWAPGS ++ xorl %ebx,%ebx ++1: pax_enter_kernel_nmi ++ pax_force_retaddr ++ ret ++ CFI_ENDPROC ++ENDPROC(save_paranoid_nmi) .popsection /* -@@ -538,7 +972,7 @@ ENTRY(ret_from_fork) +@@ -538,7 +1006,7 @@ ENTRY(ret_from_fork) RESTORE_REST @@ -21966,7 +22830,15 @@ index b077f4c..feb26c1 100644 jz 1f testl $_TIF_IA32, TI_flags(%rcx) # 32-bit compat task needs IRET -@@ -556,7 +990,7 @@ ENTRY(ret_from_fork) +@@ -548,15 +1016,13 @@ ENTRY(ret_from_fork) + jmp ret_from_sys_call # go to the SYSRET fastpath + + 1: +- subq $REST_SKIP, %rsp # leave space for volatiles +- CFI_ADJUST_CFA_OFFSET REST_SKIP + movq %rbp, %rdi + call *%rbx + movl $0, RAX(%rsp) RESTORE_REST jmp int_ret_from_sys_call CFI_ENDPROC @@ -21975,7 +22847,7 @@ index b077f4c..feb26c1 100644 /* * System call entry. Up to 6 arguments in registers are supported. -@@ -593,7 +1027,7 @@ END(ret_from_fork) +@@ -593,7 +1059,7 @@ END(ret_from_fork) ENTRY(system_call) CFI_STARTPROC simple CFI_SIGNAL_FRAME @@ -21984,7 +22856,7 @@ index b077f4c..feb26c1 100644 CFI_REGISTER rip,rcx /*CFI_REGISTER rflags,r11*/ SWAPGS_UNSAFE_STACK -@@ -606,16 +1040,23 @@ GLOBAL(system_call_after_swapgs) +@@ -606,16 +1072,23 @@ GLOBAL(system_call_after_swapgs) movq %rsp,PER_CPU_VAR(old_rsp) movq PER_CPU_VAR(kernel_stack),%rsp @@ -22010,16 +22882,7 @@ index b077f4c..feb26c1 100644 jnz tracesys system_call_fastpath: #if __SYSCALL_MASK == ~0 -@@ -625,7 +1066,7 @@ system_call_fastpath: - cmpl $__NR_syscall_max,%eax - #endif - ja badsys -- movq %r10,%rcx -+ movq R10-ARGOFFSET(%rsp),%rcx - call *sys_call_table(,%rax,8) # XXX: rip relative - movq %rax,RAX-ARGOFFSET(%rsp) - /* -@@ -639,10 +1080,13 @@ sysret_check: +@@ -639,10 +1112,13 @@ sysret_check: LOCKDEP_SYS_EXIT DISABLE_INTERRUPTS(CLBR_NONE) TRACE_IRQS_OFF @@ -22034,15 +22897,7 @@ index b077f4c..feb26c1 100644 /* * sysretq will re-enable interrupts: */ -@@ -694,14 +1138,18 @@ badsys: - * jump back to the normal fast path. - */ - auditsys: -- movq %r10,%r9 /* 6th arg: 4th syscall arg */ -+ movq R10-ARGOFFSET(%rsp),%r9 /* 6th arg: 4th syscall arg */ - movq %rdx,%r8 /* 5th arg: 3rd syscall arg */ - movq %rsi,%rcx /* 4th arg: 2nd syscall arg */ - movq %rdi,%rdx /* 3rd arg: 1st syscall arg */ +@@ -701,6 +1177,9 @@ auditsys: movq %rax,%rsi /* 2nd arg: syscall number */ movl $AUDIT_ARCH_X86_64,%edi /* 1st arg: audit arch */ call __audit_syscall_entry @@ -22050,11 +22905,9 @@ index b077f4c..feb26c1 100644 + pax_erase_kstack + LOAD_ARGS 0 /* reload call-clobbered registers */ -+ pax_set_fptr_mask jmp system_call_fastpath - /* -@@ -722,7 +1170,7 @@ sysret_audit: +@@ -722,7 +1201,7 @@ sysret_audit: /* Do syscall tracing */ tracesys: #ifdef CONFIG_AUDITSYSCALL @@ -22063,7 +22916,7 @@ index b077f4c..feb26c1 100644 jz auditsys #endif SAVE_REST -@@ -730,12 +1178,16 @@ tracesys: +@@ -730,12 +1209,15 @@ tracesys: FIXUP_TOP_OF_STACK %rdi movq %rsp,%rdi call syscall_trace_enter @@ -22075,21 +22928,12 @@ index b077f4c..feb26c1 100644 * We don't reload %rax because syscall_trace_enter() returned * the value it wants us to use in the table lookup. */ - LOAD_ARGS ARGOFFSET, 1 -+ pax_set_fptr_mask +- LOAD_ARGS ARGOFFSET, 1 ++ LOAD_ARGS 1 RESTORE_REST #if __SYSCALL_MASK == ~0 cmpq $__NR_syscall_max,%rax -@@ -744,7 +1196,7 @@ tracesys: - cmpl $__NR_syscall_max,%eax - #endif - ja int_ret_from_sys_call /* RAX(%rsp) set to -ENOSYS above */ -- movq %r10,%rcx /* fixup for C */ -+ movq R10-ARGOFFSET(%rsp),%rcx /* fixup for C */ - call *sys_call_table(,%rax,8) - movq %rax,RAX-ARGOFFSET(%rsp) - /* Use IRET because user could have changed frame */ -@@ -765,7 +1217,9 @@ GLOBAL(int_with_check) +@@ -765,7 +1247,9 @@ GLOBAL(int_with_check) andl %edi,%edx jnz int_careful andl $~TS_COMPAT,TI_status(%rcx) @@ -22100,7 +22944,7 @@ index b077f4c..feb26c1 100644 /* Either reschedule or signal or syscall exit tracking needed. */ /* First do a reschedule test. */ -@@ -811,7 +1265,7 @@ int_restore_rest: +@@ -811,7 +1295,7 @@ int_restore_rest: TRACE_IRQS_OFF jmp int_with_check CFI_ENDPROC @@ -22109,19 +22953,20 @@ index b077f4c..feb26c1 100644 .macro FORK_LIKE func ENTRY(stub_\func) -@@ -824,9 +1278,10 @@ ENTRY(stub_\func) +@@ -824,9 +1308,10 @@ ENTRY(stub_\func) DEFAULT_FRAME 0 8 /* offset 8: return address */ call sys_\func RESTORE_TOP_OF_STACK %r11, 8 +- ret $REST_SKIP /* pop extended registers */ + pax_force_retaddr - ret $REST_SKIP /* pop extended registers */ ++ ret CFI_ENDPROC -END(stub_\func) +ENDPROC(stub_\func) .endm .macro FIXED_FRAME label,func -@@ -836,9 +1291,10 @@ ENTRY(\label) +@@ -836,9 +1321,10 @@ ENTRY(\label) FIXUP_TOP_OF_STACK %r11, 8-ARGOFFSET call \func RESTORE_TOP_OF_STACK %r11, 8-ARGOFFSET @@ -22133,19 +22978,27 @@ index b077f4c..feb26c1 100644 .endm FORK_LIKE clone -@@ -855,9 +1311,10 @@ ENTRY(ptregscall_common) - movq_cfi_restore R12+8, r12 - movq_cfi_restore RBP+8, rbp - movq_cfi_restore RBX+8, rbx -+ pax_force_retaddr - ret $REST_SKIP /* pop extended registers */ - CFI_ENDPROC +@@ -846,19 +1332,6 @@ END(\label) + FORK_LIKE vfork + FIXED_FRAME stub_iopl, sys_iopl + +-ENTRY(ptregscall_common) +- DEFAULT_FRAME 1 8 /* offset 8: return address */ +- RESTORE_TOP_OF_STACK %r11, 8 +- movq_cfi_restore R15+8, r15 +- movq_cfi_restore R14+8, r14 +- movq_cfi_restore R13+8, r13 +- movq_cfi_restore R12+8, r12 +- movq_cfi_restore RBP+8, rbp +- movq_cfi_restore RBX+8, rbx +- ret $REST_SKIP /* pop extended registers */ +- CFI_ENDPROC -END(ptregscall_common) -+ENDPROC(ptregscall_common) - +- ENTRY(stub_execve) CFI_STARTPROC -@@ -870,7 +1327,7 @@ ENTRY(stub_execve) + addq $8, %rsp +@@ -870,7 +1343,7 @@ ENTRY(stub_execve) RESTORE_REST jmp int_ret_from_sys_call CFI_ENDPROC @@ -22154,7 +23007,7 @@ index b077f4c..feb26c1 100644 /* * sigreturn is special because it needs to restore all registers on return. -@@ -887,7 +1344,7 @@ ENTRY(stub_rt_sigreturn) +@@ -887,7 +1360,7 @@ ENTRY(stub_rt_sigreturn) RESTORE_REST jmp int_ret_from_sys_call CFI_ENDPROC @@ -22163,7 +23016,7 @@ index b077f4c..feb26c1 100644 #ifdef CONFIG_X86_X32_ABI ENTRY(stub_x32_rt_sigreturn) -@@ -901,7 +1358,7 @@ ENTRY(stub_x32_rt_sigreturn) +@@ -901,7 +1374,7 @@ ENTRY(stub_x32_rt_sigreturn) RESTORE_REST jmp int_ret_from_sys_call CFI_ENDPROC @@ -22172,7 +23025,7 @@ index b077f4c..feb26c1 100644 ENTRY(stub_x32_execve) CFI_STARTPROC -@@ -915,7 +1372,7 @@ ENTRY(stub_x32_execve) +@@ -915,7 +1388,7 @@ ENTRY(stub_x32_execve) RESTORE_REST jmp int_ret_from_sys_call CFI_ENDPROC @@ -22181,7 +23034,7 @@ index b077f4c..feb26c1 100644 #endif -@@ -952,7 +1409,7 @@ vector=vector+1 +@@ -952,7 +1425,7 @@ vector=vector+1 2: jmp common_interrupt .endr CFI_ENDPROC @@ -22190,24 +23043,28 @@ index b077f4c..feb26c1 100644 .previous END(interrupt) -@@ -972,6 +1429,16 @@ END(interrupt) - subq $ORIG_RAX-RBP, %rsp - CFI_ADJUST_CFA_OFFSET ORIG_RAX-RBP +@@ -969,8 +1442,8 @@ END(interrupt) + /* 0(%rsp): ~(interrupt number) */ + .macro interrupt func + /* reserve pt_regs for scratch regs and rbp */ +- subq $ORIG_RAX-RBP, %rsp +- CFI_ADJUST_CFA_OFFSET ORIG_RAX-RBP ++ subq $ORIG_RAX, %rsp ++ CFI_ADJUST_CFA_OFFSET ORIG_RAX SAVE_ARGS_IRQ -+#ifdef CONFIG_PAX_MEMORY_UDEREF -+ testb $3, CS(%rdi) -+ jnz 1f -+ pax_enter_kernel -+ jmp 2f -+1: pax_enter_kernel_user -+2: -+#else -+ pax_enter_kernel -+#endif call \func .endm - -@@ -1004,7 +1471,7 @@ ret_from_intr: +@@ -997,14 +1470,14 @@ ret_from_intr: + + /* Restore saved previous stack */ + popq %rsi +- CFI_DEF_CFA rsi,SS+8-RBP /* reg/off reset after def_cfa_expr */ +- leaq ARGOFFSET-RBP(%rsi), %rsp ++ CFI_DEF_CFA rsi,SS+8 /* reg/off reset after def_cfa_expr */ ++ movq %rsi, %rsp + CFI_DEF_CFA_REGISTER rsp +- CFI_ADJUST_CFA_OFFSET RBP-ARGOFFSET ++ CFI_ADJUST_CFA_OFFSET -ARGOFFSET exit_intr: GET_THREAD_INFO(%rcx) @@ -22216,7 +23073,7 @@ index b077f4c..feb26c1 100644 je retint_kernel /* Interrupt came from user space */ -@@ -1026,12 +1493,16 @@ retint_swapgs: /* return to user-space */ +@@ -1026,12 +1499,16 @@ retint_swapgs: /* return to user-space */ * The iretq could re-enable interrupts: */ DISABLE_INTERRUPTS(CLBR_ANY) @@ -22233,7 +23090,7 @@ index b077f4c..feb26c1 100644 /* * The iretq could re-enable interrupts: */ -@@ -1114,7 +1585,7 @@ ENTRY(retint_kernel) +@@ -1112,7 +1589,7 @@ ENTRY(retint_kernel) #endif CFI_ENDPROC @@ -22242,7 +23099,7 @@ index b077f4c..feb26c1 100644 /* * End of kprobes section */ -@@ -1132,7 +1603,7 @@ ENTRY(\sym) +@@ -1130,7 +1607,7 @@ ENTRY(\sym) interrupt \do_sym jmp ret_from_intr CFI_ENDPROC @@ -22251,22 +23108,7 @@ index b077f4c..feb26c1 100644 .endm #ifdef CONFIG_TRACING -@@ -1215,12 +1686,22 @@ ENTRY(\sym) - CFI_ADJUST_CFA_OFFSET ORIG_RAX-R15 - call error_entry - DEFAULT_FRAME 0 -+#ifdef CONFIG_PAX_MEMORY_UDEREF -+ testb $3, CS(%rsp) -+ jnz 1f -+ pax_enter_kernel -+ jmp 2f -+1: pax_enter_kernel_user -+2: -+#else -+ pax_enter_kernel -+#endif - movq %rsp,%rdi /* pt_regs pointer */ - xorl %esi,%esi /* no error code */ +@@ -1218,7 +1695,7 @@ ENTRY(\sym) call \do_sym jmp error_exit /* %ebx: no swapgs flag */ CFI_ENDPROC @@ -22275,22 +23117,7 @@ index b077f4c..feb26c1 100644 .endm .macro paranoidzeroentry sym do_sym -@@ -1233,15 +1714,25 @@ ENTRY(\sym) - CFI_ADJUST_CFA_OFFSET ORIG_RAX-R15 - call save_paranoid - TRACE_IRQS_OFF -+#ifdef CONFIG_PAX_MEMORY_UDEREF -+ testb $3, CS(%rsp) -+ jnz 1f -+ pax_enter_kernel -+ jmp 2f -+1: pax_enter_kernel_user -+2: -+#else -+ pax_enter_kernel -+#endif - movq %rsp,%rdi /* pt_regs pointer */ - xorl %esi,%esi /* no error code */ +@@ -1236,10 +1713,10 @@ ENTRY(\sym) call \do_sym jmp paranoid_exit /* %ebx: no swapgs flag */ CFI_ENDPROC @@ -22299,31 +23126,19 @@ index b077f4c..feb26c1 100644 .endm -#define INIT_TSS_IST(x) PER_CPU_VAR(init_tss) + (TSS_ist + ((x) - 1) * 8) -+#define INIT_TSS_IST(x) (TSS_ist + ((x) - 1) * 8)(%r12) ++#define INIT_TSS_IST(x) (TSS_ist + ((x) - 1) * 8)(%r13) .macro paranoidzeroentry_ist sym do_sym ist ENTRY(\sym) INTR_FRAME -@@ -1252,14 +1743,30 @@ ENTRY(\sym) - CFI_ADJUST_CFA_OFFSET ORIG_RAX-R15 - call save_paranoid +@@ -1252,12 +1729,18 @@ ENTRY(\sym) TRACE_IRQS_OFF_DEBUG -+#ifdef CONFIG_PAX_MEMORY_UDEREF -+ testb $3, CS(%rsp) -+ jnz 1f -+ pax_enter_kernel -+ jmp 2f -+1: pax_enter_kernel_user -+2: -+#else -+ pax_enter_kernel -+#endif movq %rsp,%rdi /* pt_regs pointer */ xorl %esi,%esi /* no error code */ +#ifdef CONFIG_SMP -+ imul $TSS_size, PER_CPU_VAR(cpu_number), %r12d -+ lea init_tss(%r12), %r12 ++ imul $TSS_size, PER_CPU_VAR(cpu_number), %r13d ++ lea init_tss(%r13), %r13 +#else -+ lea init_tss(%rip), %r12 ++ lea init_tss(%rip), %r13 +#endif subq $EXCEPTION_STKSZ, INIT_TSS_IST(\ist) call \do_sym @@ -22335,23 +23150,7 @@ index b077f4c..feb26c1 100644 .endm .macro errorentry sym do_sym -@@ -1271,13 +1778,23 @@ ENTRY(\sym) - CFI_ADJUST_CFA_OFFSET ORIG_RAX-R15 - call error_entry - DEFAULT_FRAME 0 -+#ifdef CONFIG_PAX_MEMORY_UDEREF -+ testb $3, CS(%rsp) -+ jnz 1f -+ pax_enter_kernel -+ jmp 2f -+1: pax_enter_kernel_user -+2: -+#else -+ pax_enter_kernel -+#endif - movq %rsp,%rdi /* pt_regs pointer */ - movq ORIG_RAX(%rsp),%rsi /* get error code */ - movq $-1,ORIG_RAX(%rsp) /* no syscall to restart */ +@@ -1275,7 +1758,7 @@ ENTRY(\sym) call \do_sym jmp error_exit /* %ebx: no swapgs flag */ CFI_ENDPROC @@ -22359,24 +23158,8 @@ index b077f4c..feb26c1 100644 +ENDPROC(\sym) .endm - /* error code is on the stack already */ -@@ -1291,13 +1808,23 @@ ENTRY(\sym) - call save_paranoid - DEFAULT_FRAME 0 - TRACE_IRQS_OFF -+#ifdef CONFIG_PAX_MEMORY_UDEREF -+ testb $3, CS(%rsp) -+ jnz 1f -+ pax_enter_kernel -+ jmp 2f -+1: pax_enter_kernel_user -+2: -+#else -+ pax_enter_kernel -+#endif - movq %rsp,%rdi /* pt_regs pointer */ - movq ORIG_RAX(%rsp),%rsi /* get error code */ - movq $-1,ORIG_RAX(%rsp) /* no syscall to restart */ + #ifdef CONFIG_TRACING +@@ -1306,7 +1789,7 @@ ENTRY(\sym) call \do_sym jmp paranoid_exit /* %ebx: no swapgs flag */ CFI_ENDPROC @@ -22385,7 +23168,7 @@ index b077f4c..feb26c1 100644 .endm zeroentry divide_error do_divide_error -@@ -1327,9 +1854,10 @@ gs_change: +@@ -1336,9 +1819,10 @@ gs_change: 2: mfence /* workaround */ SWAPGS popfq_cfi @@ -22397,19 +23180,19 @@ index b077f4c..feb26c1 100644 _ASM_EXTABLE(gs_change,bad_gs) .section .fixup,"ax" -@@ -1357,9 +1885,10 @@ ENTRY(call_softirq) +@@ -1366,9 +1850,10 @@ ENTRY(do_softirq_own_stack) CFI_DEF_CFA_REGISTER rsp CFI_ADJUST_CFA_OFFSET -8 decl PER_CPU_VAR(irq_count) + pax_force_retaddr ret CFI_ENDPROC --END(call_softirq) -+ENDPROC(call_softirq) +-END(do_softirq_own_stack) ++ENDPROC(do_softirq_own_stack) #ifdef CONFIG_XEN zeroentry xen_hypervisor_callback xen_do_hypervisor_callback -@@ -1397,7 +1926,7 @@ ENTRY(xen_do_hypervisor_callback) # do_hypervisor_callback(struct *pt_regs) +@@ -1406,7 +1891,7 @@ ENTRY(xen_do_hypervisor_callback) # do_hypervisor_callback(struct *pt_regs) decl PER_CPU_VAR(irq_count) jmp error_exit CFI_ENDPROC @@ -22418,7 +23201,7 @@ index b077f4c..feb26c1 100644 /* * Hypervisor uses this for application faults while it executes. -@@ -1456,7 +1985,7 @@ ENTRY(xen_failsafe_callback) +@@ -1465,7 +1950,7 @@ ENTRY(xen_failsafe_callback) SAVE_ALL jmp error_exit CFI_ENDPROC @@ -22427,7 +23210,7 @@ index b077f4c..feb26c1 100644 apicinterrupt3 HYPERVISOR_CALLBACK_VECTOR \ xen_hvm_callback_vector xen_evtchn_do_upcall -@@ -1508,18 +2037,33 @@ ENTRY(paranoid_exit) +@@ -1517,18 +2002,33 @@ ENTRY(paranoid_exit) DEFAULT_FRAME DISABLE_INTERRUPTS(CLBR_NONE) TRACE_IRQS_OFF_DEBUG @@ -22463,7 +23246,7 @@ index b077f4c..feb26c1 100644 jmp irq_return paranoid_userspace: GET_THREAD_INFO(%rcx) -@@ -1548,7 +2092,7 @@ paranoid_schedule: +@@ -1557,7 +2057,7 @@ paranoid_schedule: TRACE_IRQS_OFF jmp paranoid_userspace CFI_ENDPROC @@ -22472,7 +23255,7 @@ index b077f4c..feb26c1 100644 /* * Exception entry point. This expects an error code/orig_rax on the stack. -@@ -1575,12 +2119,13 @@ ENTRY(error_entry) +@@ -1584,12 +2084,23 @@ ENTRY(error_entry) movq_cfi r14, R14+8 movq_cfi r15, R15+8 xorl %ebx,%ebx @@ -22482,12 +23265,22 @@ index b077f4c..feb26c1 100644 error_swapgs: SWAPGS error_sti: ++#ifdef CONFIG_PAX_MEMORY_UDEREF ++ testb $3, CS+8(%rsp) ++ jnz 1f ++ pax_enter_kernel ++ jmp 2f ++1: pax_enter_kernel_user ++2: ++#else ++ pax_enter_kernel ++#endif TRACE_IRQS_OFF -+ pax_force_retaddr_bts ++ pax_force_retaddr ret /* -@@ -1607,7 +2152,7 @@ bstep_iret: +@@ -1616,7 +2127,7 @@ bstep_iret: movq %rcx,RIP+8(%rsp) jmp error_swapgs CFI_ENDPROC @@ -22496,7 +23289,7 @@ index b077f4c..feb26c1 100644 /* ebx: no swapgs flag (1: don't need swapgs, 0: need it) */ -@@ -1618,7 +2163,7 @@ ENTRY(error_exit) +@@ -1627,7 +2138,7 @@ ENTRY(error_exit) DISABLE_INTERRUPTS(CLBR_NONE) TRACE_IRQS_OFF GET_THREAD_INFO(%rcx) @@ -22505,7 +23298,7 @@ index b077f4c..feb26c1 100644 jne retint_kernel LOCKDEP_SYS_EXIT_IRQ movl TI_flags(%rcx),%edx -@@ -1627,7 +2172,7 @@ ENTRY(error_exit) +@@ -1636,7 +2147,7 @@ ENTRY(error_exit) jnz retint_careful jmp retint_swapgs CFI_ENDPROC @@ -22514,7 +23307,7 @@ index b077f4c..feb26c1 100644 /* * Test if a given stack is an NMI stack or not. -@@ -1685,9 +2230,11 @@ ENTRY(nmi) +@@ -1694,9 +2205,11 @@ ENTRY(nmi) * If %cs was not the kernel segment, then the NMI triggered in user * space, which means it is definitely not nested. */ @@ -22527,7 +23320,7 @@ index b077f4c..feb26c1 100644 /* * Check the special variable on the stack to see if NMIs are * executing. -@@ -1721,8 +2268,7 @@ nested_nmi: +@@ -1730,8 +2243,7 @@ nested_nmi: 1: /* Set up the interrupted NMIs stack to jump to repeat_nmi */ @@ -22537,7 +23330,7 @@ index b077f4c..feb26c1 100644 CFI_ADJUST_CFA_OFFSET 1*8 leaq -10*8(%rsp), %rdx pushq_cfi $__KERNEL_DS -@@ -1740,6 +2286,7 @@ nested_nmi_out: +@@ -1749,6 +2261,7 @@ nested_nmi_out: CFI_RESTORE rdx /* No need to check faults here */ @@ -22545,17 +23338,43 @@ index b077f4c..feb26c1 100644 INTERRUPT_RETURN CFI_RESTORE_STATE -@@ -1856,6 +2403,8 @@ end_repeat_nmi: +@@ -1845,13 +2358,13 @@ end_repeat_nmi: + subq $ORIG_RAX-R15, %rsp + CFI_ADJUST_CFA_OFFSET ORIG_RAX-R15 + /* +- * Use save_paranoid to handle SWAPGS, but no need to use paranoid_exit ++ * Use save_paranoid_nmi to handle SWAPGS, but no need to use paranoid_exit + * as we should not be calling schedule in NMI context. + * Even with normal interrupts enabled. An NMI should not be + * setting NEED_RESCHED or anything that normal interrupts and + * exceptions might do. */ - movq %cr2, %r12 +- call save_paranoid ++ call save_paranoid_nmi + DEFAULT_FRAME 0 + + /* +@@ -1861,9 +2374,9 @@ end_repeat_nmi: + * NMI itself takes a page fault, the page fault that was preempted + * will read the information from the NMI page fault and not the + * origin fault. Save it off and restore it if it changes. +- * Use the r12 callee-saved register. ++ * Use the r13 callee-saved register. + */ +- movq %cr2, %r12 ++ movq %cr2, %r13 -+ pax_enter_kernel_nmi -+ /* paranoidentry do_nmi, 0; without TRACE_IRQS_OFF */ movq %rsp,%rdi - movq $-1,%rsi -@@ -1868,26 +2417,31 @@ end_repeat_nmi: - movq %r12, %cr2 +@@ -1872,31 +2385,36 @@ end_repeat_nmi: + + /* Did the NMI take a page fault? Restore cr2 if it did */ + movq %cr2, %rcx +- cmpq %rcx, %r12 ++ cmpq %rcx, %r13 + je 1f +- movq %r12, %cr2 ++ movq %r13, %cr2 1: - testl %ebx,%ebx /* swapgs needed? */ @@ -22657,7 +23476,7 @@ index d4bdd25..912664c 100644 return -EFAULT; diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c -index 1be8e43..d9b9ef6 100644 +index 85126cc..1bbce17 100644 --- a/arch/x86/kernel/head64.c +++ b/arch/x86/kernel/head64.c @@ -67,12 +67,12 @@ again: @@ -23386,7 +24205,7 @@ index e1aabdb..fee4fee 100644 NEXT_PAGE(empty_zero_page) .skip PAGE_SIZE diff --git a/arch/x86/kernel/i386_ksyms_32.c b/arch/x86/kernel/i386_ksyms_32.c -index 0fa6912..b37438b 100644 +index 05fd74f..c3548b1 100644 --- a/arch/x86/kernel/i386_ksyms_32.c +++ b/arch/x86/kernel/i386_ksyms_32.c @@ -20,8 +20,12 @@ extern void cmpxchg8b_emu(void); @@ -23402,10 +24221,10 @@ index 0fa6912..b37438b 100644 EXPORT_SYMBOL(__get_user_1); EXPORT_SYMBOL(__get_user_2); -@@ -37,3 +41,11 @@ EXPORT_SYMBOL(strstr); - - EXPORT_SYMBOL(csum_partial); - EXPORT_SYMBOL(empty_zero_page); +@@ -44,3 +48,11 @@ EXPORT_SYMBOL(___preempt_schedule); + EXPORT_SYMBOL(___preempt_schedule_context); + #endif + #endif + +#ifdef CONFIG_PAX_KERNEXEC +EXPORT_SYMBOL(__LOAD_PHYSICAL_ADDR); @@ -23415,7 +24234,7 @@ index 0fa6912..b37438b 100644 +EXPORT_SYMBOL(cpu_pgd); +#endif diff --git a/arch/x86/kernel/i387.c b/arch/x86/kernel/i387.c -index 5d576ab..1403a03 100644 +index e8368c6..9c1a712 100644 --- a/arch/x86/kernel/i387.c +++ b/arch/x86/kernel/i387.c @@ -51,7 +51,7 @@ static inline bool interrupted_kernel_fpu_idle(void) @@ -23428,7 +24247,7 @@ index 5d576ab..1403a03 100644 /* diff --git a/arch/x86/kernel/i8259.c b/arch/x86/kernel/i8259.c -index 9a5c460..84868423 100644 +index 2e977b5..5f2c273 100644 --- a/arch/x86/kernel/i8259.c +++ b/arch/x86/kernel/i8259.c @@ -110,7 +110,7 @@ static int i8259A_irq_pending(unsigned int irq) @@ -23449,7 +24268,7 @@ index 9a5c460..84868423 100644 /* * Theoretically we do not have to handle this IRQ, * but in Linux this does not cause problems and is -@@ -333,14 +333,16 @@ static void init_8259A(int auto_eoi) +@@ -332,14 +332,16 @@ static void init_8259A(int auto_eoi) /* (slave's support for AEOI in flat mode is to be investigated) */ outb_pic(SLAVE_ICW4_DEFAULT, PIC_SLAVE_IMR); @@ -23563,7 +24382,7 @@ index 22d0687..e07b2a5 100644 } diff --git a/arch/x86/kernel/irq_32.c b/arch/x86/kernel/irq_32.c -index 4186755..784efa0 100644 +index d7fcbed..1f747f7 100644 --- a/arch/x86/kernel/irq_32.c +++ b/arch/x86/kernel/irq_32.c @@ -39,7 +39,7 @@ static int check_stack_overflow(void) @@ -23598,7 +24417,7 @@ index 4186755..784efa0 100644 irqctx = __this_cpu_read(hardirq_ctx); /* -@@ -92,16 +91,16 @@ execute_on_irq_stack(int overflow, struct irq_desc *desc, int irq) +@@ -92,13 +91,16 @@ execute_on_irq_stack(int overflow, struct irq_desc *desc, int irq) * handler) we can't do that and just have to keep using the * current stack (which is the irq stack already after all) */ @@ -23612,16 +24431,14 @@ index 4186755..784efa0 100644 - irqctx->tinfo.previous_esp = current_stack_pointer; + isp = (u32 *) ((char *)irqctx + sizeof(*irqctx) - 8); + irqctx->previous_esp = current_stack_pointer; - -- /* Copy the preempt_count so that the [soft]irq checks work. */ -- irqctx->tinfo.preempt_count = curctx->tinfo.preempt_count; ++ +#ifdef CONFIG_PAX_MEMORY_UDEREF + __set_fs(MAKE_MM_SEG(0)); +#endif if (unlikely(overflow)) call_on_stack(print_stack_overflow, isp); -@@ -113,6 +112,11 @@ execute_on_irq_stack(int overflow, struct irq_desc *desc, int irq) +@@ -110,6 +112,11 @@ execute_on_irq_stack(int overflow, struct irq_desc *desc, int irq) : "0" (irq), "1" (desc), "2" (isp), "D" (desc->handle_irq) : "memory", "cc", "ecx"); @@ -23633,7 +24450,7 @@ index 4186755..784efa0 100644 return 1; } -@@ -121,29 +125,14 @@ execute_on_irq_stack(int overflow, struct irq_desc *desc, int irq) +@@ -118,48 +125,34 @@ execute_on_irq_stack(int overflow, struct irq_desc *desc, int irq) */ void irq_ctx_init(int cpu) { @@ -23647,11 +24464,8 @@ index 4186755..784efa0 100644 - THREAD_SIZE_ORDER)); - memset(&irqctx->tinfo, 0, sizeof(struct thread_info)); - irqctx->tinfo.cpu = cpu; -- irqctx->tinfo.preempt_count = HARDIRQ_OFFSET; - irqctx->tinfo.addr_limit = MAKE_MM_SEG(0); -+ per_cpu(hardirq_ctx, cpu) = page_address(alloc_pages_node(cpu_to_node(cpu), THREADINFO_GFP, THREAD_SIZE_ORDER)); -+ per_cpu(softirq_ctx, cpu) = page_address(alloc_pages_node(cpu_to_node(cpu), THREADINFO_GFP, THREAD_SIZE_ORDER)); - +- - per_cpu(hardirq_ctx, cpu) = irqctx; - - irqctx = page_address(alloc_pages_node(cpu_to_node(cpu), @@ -23662,47 +24476,43 @@ index 4186755..784efa0 100644 - irqctx->tinfo.addr_limit = MAKE_MM_SEG(0); - - per_cpu(softirq_ctx, cpu) = irqctx; -+ printk(KERN_DEBUG "CPU %u irqstacks, hard=%p soft=%p\n", -+ cpu, per_cpu(hardirq_ctx, cpu), per_cpu(softirq_ctx, cpu)); +- +- printk(KERN_DEBUG "CPU %u irqstacks, hard=%p soft=%p\n", +- cpu, per_cpu(hardirq_ctx, cpu), per_cpu(softirq_ctx, cpu)); ++ per_cpu(hardirq_ctx, cpu) = page_address(alloc_pages_node(cpu_to_node(cpu), THREADINFO_GFP, THREAD_SIZE_ORDER)); ++ per_cpu(softirq_ctx, cpu) = page_address(alloc_pages_node(cpu_to_node(cpu), THREADINFO_GFP, THREAD_SIZE_ORDER)); + } - printk(KERN_DEBUG "CPU %u irqstacks, hard=%p soft=%p\n", - cpu, per_cpu(hardirq_ctx, cpu), per_cpu(softirq_ctx, cpu)); -@@ -152,7 +141,6 @@ void irq_ctx_init(int cpu) - asmlinkage void do_softirq(void) + void do_softirq_own_stack(void) { - unsigned long flags; - struct thread_info *curctx; union irq_ctx *irqctx; u32 *isp; -@@ -162,15 +150,22 @@ asmlinkage void do_softirq(void) - local_irq_save(flags); - - if (local_softirq_pending()) { -- curctx = current_thread_info(); - irqctx = __this_cpu_read(softirq_ctx); -- irqctx->tinfo.task = curctx->task; -- irqctx->tinfo.previous_esp = current_stack_pointer; -+ irqctx->previous_esp = current_stack_pointer; +- curctx = current_thread_info(); + irqctx = __this_cpu_read(softirq_ctx); +- irqctx->tinfo.task = curctx->task; +- irqctx->tinfo.previous_esp = current_stack_pointer; ++ irqctx->previous_esp = current_stack_pointer; - /* build the stack frame on the softirq stack */ -- isp = (u32 *) ((char *)irqctx + sizeof(*irqctx)); -+ isp = (u32 *) ((char *)irqctx + sizeof(*irqctx) - 8); + /* build the stack frame on the softirq stack */ +- isp = (u32 *) ((char *)irqctx + sizeof(*irqctx)); ++ isp = (u32 *) ((char *)irqctx + sizeof(*irqctx) - 8); + +#ifdef CONFIG_PAX_MEMORY_UDEREF -+ __set_fs(MAKE_MM_SEG(0)); ++ __set_fs(MAKE_MM_SEG(0)); +#endif - call_on_stack(__do_softirq, isp); + call_on_stack(__do_softirq, isp); + +#ifdef CONFIG_PAX_MEMORY_UDEREF -+ __set_fs(current_thread_info()->addr_limit); ++ __set_fs(current_thread_info()->addr_limit); +#endif + - /* - * Shouldn't happen, we returned above if in_interrupt(): - */ -@@ -191,7 +186,7 @@ bool handle_irq(unsigned irq, struct pt_regs *regs) + } + + bool handle_irq(unsigned irq, struct pt_regs *regs) +@@ -173,7 +166,7 @@ bool handle_irq(unsigned irq, struct pt_regs *regs) if (unlikely(!desc)) return false; @@ -23712,7 +24522,7 @@ index 4186755..784efa0 100644 print_stack_overflow(); desc->handle_irq(irq, desc); diff --git a/arch/x86/kernel/irq_64.c b/arch/x86/kernel/irq_64.c -index d04d3ec..ea4b374 100644 +index 4d1c746..232961d 100644 --- a/arch/x86/kernel/irq_64.c +++ b/arch/x86/kernel/irq_64.c @@ -44,7 +44,7 @@ static inline void stack_overflow_check(struct pt_regs *regs) @@ -23725,22 +24535,31 @@ index d04d3ec..ea4b374 100644 if (regs->sp >= curbase + sizeof(struct thread_info) + diff --git a/arch/x86/kernel/jump_label.c b/arch/x86/kernel/jump_label.c -index ee11b7d..4df4d0c 100644 +index 26d5a55..a01160a 100644 --- a/arch/x86/kernel/jump_label.c +++ b/arch/x86/kernel/jump_label.c -@@ -49,7 +49,7 @@ static void __jump_label_transform(struct jump_entry *entry, - * We are enabling this jump label. If it is not a nop - * then something must have gone wrong. - */ -- if (unlikely(memcmp((void *)entry->code, ideal_nop, 5) != 0)) -+ if (unlikely(memcmp((void *)ktla_ktva(entry->code), ideal_nop, 5) != 0)) - bug_at((void *)entry->code, __LINE__); - - code.jump = 0xe9; -@@ -64,13 +64,13 @@ static void __jump_label_transform(struct jump_entry *entry, +@@ -51,7 +51,7 @@ static void __jump_label_transform(struct jump_entry *entry, + * Jump label is enabled for the first time. + * So we expect a default_nop... + */ +- if (unlikely(memcmp((void *)entry->code, default_nop, 5) ++ if (unlikely(memcmp((void *)ktla_ktva(entry->code), default_nop, 5) + != 0)) + bug_at((void *)entry->code, __LINE__); + } else { +@@ -59,7 +59,7 @@ static void __jump_label_transform(struct jump_entry *entry, + * ...otherwise expect an ideal_nop. Otherwise + * something went horribly wrong. + */ +- if (unlikely(memcmp((void *)entry->code, ideal_nop, 5) ++ if (unlikely(memcmp((void *)ktla_ktva(entry->code), ideal_nop, 5) + != 0)) + bug_at((void *)entry->code, __LINE__); + } +@@ -75,13 +75,13 @@ static void __jump_label_transform(struct jump_entry *entry, + * are converting the default nop to the ideal nop. */ if (init) { - const unsigned char default_nop[] = { STATIC_KEY_INIT_NOP }; - if (unlikely(memcmp((void *)entry->code, default_nop, 5) != 0)) + if (unlikely(memcmp((void *)ktla_ktva(entry->code), default_nop, 5) != 0)) bug_at((void *)entry->code, __LINE__); @@ -24165,7 +24984,7 @@ index 5fb2ceb..3ae90bb 100644 static void microcode_fini_cpu(int cpu) diff --git a/arch/x86/kernel/module.c b/arch/x86/kernel/module.c -index 216a4d7..228255a 100644 +index 18be189..4a9fe40 100644 --- a/arch/x86/kernel/module.c +++ b/arch/x86/kernel/module.c @@ -43,15 +43,60 @@ do { \ @@ -24181,7 +25000,7 @@ index 216a4d7..228255a 100644 return __vmalloc_node_range(size, 1, MODULES_VADDR, MODULES_END, - GFP_KERNEL | __GFP_HIGHMEM, PAGE_KERNEL_EXEC, + GFP_KERNEL | __GFP_HIGHMEM | __GFP_ZERO, prot, - -1, __builtin_return_address(0)); + NUMA_NO_NODE, __builtin_return_address(0)); } +void *module_alloc(unsigned long size) @@ -24302,7 +25121,7 @@ index 216a4d7..228255a 100644 if ((s64)val != *(s32 *)loc) goto overflow; diff --git a/arch/x86/kernel/msr.c b/arch/x86/kernel/msr.c -index 88458fa..349f7a4 100644 +index 05266b5..1577fde 100644 --- a/arch/x86/kernel/msr.c +++ b/arch/x86/kernel/msr.c @@ -233,7 +233,7 @@ static int msr_class_cpu_callback(struct notifier_block *nfb, @@ -24575,6 +25394,33 @@ index 6c483ba..d10ce2f 100644 } static struct dma_map_ops swiotlb_dma_ops = { +diff --git a/arch/x86/kernel/preempt.S b/arch/x86/kernel/preempt.S +index ca7f0d5..8996469 100644 +--- a/arch/x86/kernel/preempt.S ++++ b/arch/x86/kernel/preempt.S +@@ -3,12 +3,14 @@ + #include + #include + #include ++#include + + ENTRY(___preempt_schedule) + CFI_STARTPROC + SAVE_ALL + call preempt_schedule + RESTORE_ALL ++ pax_force_retaddr + ret + CFI_ENDPROC + +@@ -19,6 +21,7 @@ ENTRY(___preempt_schedule_context) + SAVE_ALL + call preempt_schedule_context + RESTORE_ALL ++ pax_force_retaddr + ret + CFI_ENDPROC + diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c index 3fb8d95..254dc51 100644 --- a/arch/x86/kernel/process.c @@ -24684,7 +25530,7 @@ index 3fb8d95..254dc51 100644 +} +#endif diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c -index 884f98f..ec23e04 100644 +index 6f1236c..fd448d4 100644 --- a/arch/x86/kernel/process_32.c +++ b/arch/x86/kernel/process_32.c @@ -65,6 +65,7 @@ asmlinkage void ret_from_kernel_thread(void) __asm__("ret_from_kernel_thread"); @@ -24764,7 +25610,7 @@ index 884f98f..ec23e04 100644 /* * Load the per-thread Thread-Local Storage descriptor. */ -@@ -307,6 +312,9 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p) +@@ -315,6 +320,9 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p) */ arch_end_context_switch(next_p); @@ -24774,7 +25620,7 @@ index 884f98f..ec23e04 100644 /* * Restore %gs if needed (which is common) */ -@@ -315,8 +323,6 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p) +@@ -323,8 +331,6 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p) switch_fpu_finish(next_p, fpu); @@ -24783,13 +25629,13 @@ index 884f98f..ec23e04 100644 return prev_p; } -@@ -346,4 +352,3 @@ unsigned long get_wchan(struct task_struct *p) +@@ -354,4 +360,3 @@ unsigned long get_wchan(struct task_struct *p) } while (count++ < 16); return 0; } - diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c -index bb1dc51..08dda7f 100644 +index 9c0280f..5bbb1c0 100644 --- a/arch/x86/kernel/process_64.c +++ b/arch/x86/kernel/process_64.c @@ -158,10 +158,11 @@ int copy_thread(unsigned long clone_flags, unsigned long sp, @@ -24803,7 +25649,7 @@ index bb1dc51..08dda7f 100644 p->thread.usersp = me->thread.usersp; + p->tinfo.lowest_stack = (unsigned long)task_stack_page(p); set_tsk_thread_flag(p, TIF_FORK); - p->fpu_counter = 0; + p->thread.fpu_counter = 0; p->thread.io_bitmap_ptr = NULL; @@ -172,6 +173,8 @@ int copy_thread(unsigned long clone_flags, unsigned long sp, p->thread.fs = p->thread.fsindex ? 0 : me->thread.fs; @@ -24833,12 +25679,18 @@ index bb1dc51..08dda7f 100644 /* We must save %fs and %gs before load_TLS() because * %fs and %gs may be cleared by load_TLS(). -@@ -362,10 +368,9 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p) +@@ -362,6 +368,7 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p) prev->usersp = this_cpu_read(old_rsp); this_cpu_write(old_rsp, next->usersp); this_cpu_write(current_task, next_p); + this_cpu_write(current_tinfo, &next_p->tinfo); + /* + * If it were not for PREEMPT_ACTIVE we could guarantee that the +@@ -371,9 +378,7 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p) + task_thread_info(prev_p)->saved_preempt_count = this_cpu_read(__preempt_count); + this_cpu_write(__preempt_count, task_thread_info(next_p)->saved_preempt_count); + - this_cpu_write(kernel_stack, - (unsigned long)task_stack_page(next_p) + - THREAD_SIZE - KERNEL_STACK_OFFSET); @@ -24846,7 +25698,7 @@ index bb1dc51..08dda7f 100644 /* * Now maybe reload the debug registers and handle I/O bitmaps -@@ -434,12 +439,11 @@ unsigned long get_wchan(struct task_struct *p) +@@ -442,12 +447,11 @@ unsigned long get_wchan(struct task_struct *p) if (!p || p == current || p->state == TASK_RUNNING) return 0; stack = (unsigned long)task_stack_page(p); @@ -24991,11 +25843,11 @@ index 7461f50..1334029 100644 if (unlikely(test_thread_flag(TIF_SYSCALL_TRACEPOINT))) diff --git a/arch/x86/kernel/pvclock.c b/arch/x86/kernel/pvclock.c -index a16bae3..1f65f25 100644 +index 2f355d2..e75ed0a 100644 --- a/arch/x86/kernel/pvclock.c +++ b/arch/x86/kernel/pvclock.c -@@ -43,11 +43,11 @@ unsigned long pvclock_tsc_khz(struct pvclock_vcpu_time_info *src) - return pv_tsc_khz; +@@ -51,11 +51,11 @@ void pvclock_touch_watchdogs(void) + reset_hung_task_detector(); } -static atomic64_t last_value = ATOMIC64_INIT(0); @@ -25008,7 +25860,7 @@ index a16bae3..1f65f25 100644 } u8 pvclock_read_flags(struct pvclock_vcpu_time_info *src) -@@ -92,11 +92,11 @@ cycle_t pvclock_clocksource_read(struct pvclock_vcpu_time_info *src) +@@ -105,11 +105,11 @@ cycle_t pvclock_clocksource_read(struct pvclock_vcpu_time_info *src) * updating at the same time, and one of them could be slightly behind, * making the assumption that last_value always go forward fail to hold. */ @@ -25023,7 +25875,7 @@ index a16bae3..1f65f25 100644 return ret; diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c -index 618ce26..ec7e21c 100644 +index c752cb4..866c432 100644 --- a/arch/x86/kernel/reboot.c +++ b/arch/x86/kernel/reboot.c @@ -68,6 +68,11 @@ static int __init set_bios_reboot(const struct dmi_system_id *d) @@ -25069,7 +25921,7 @@ index 618ce26..ec7e21c 100644 "rm" (real_mode_header->machine_real_restart_asm), "a" (type)); #else -@@ -466,7 +493,7 @@ void __attribute__((weak)) mach_reboot_fixups(void) +@@ -470,7 +497,7 @@ void __attribute__((weak)) mach_reboot_fixups(void) * try to force a triple fault and then cycle between hitting the keyboard * controller and doing that */ @@ -25078,7 +25930,7 @@ index 618ce26..ec7e21c 100644 { int i; int attempt = 0; -@@ -575,13 +602,13 @@ void native_machine_shutdown(void) +@@ -593,13 +620,13 @@ void native_machine_shutdown(void) #endif } @@ -25094,7 +25946,7 @@ index 618ce26..ec7e21c 100644 { pr_notice("machine restart\n"); -@@ -590,7 +617,7 @@ static void native_machine_restart(char *__unused) +@@ -608,7 +635,7 @@ static void native_machine_restart(char *__unused) __machine_emergency_restart(0); } @@ -25103,7 +25955,7 @@ index 618ce26..ec7e21c 100644 { /* Stop other cpus and apics */ machine_shutdown(); -@@ -600,7 +627,7 @@ static void native_machine_halt(void) +@@ -618,7 +645,7 @@ static void native_machine_halt(void) stop_this_cpu(NULL); } @@ -25112,7 +25964,7 @@ index 618ce26..ec7e21c 100644 { if (pm_power_off) { if (!reboot_force) -@@ -609,9 +636,10 @@ static void native_machine_power_off(void) +@@ -627,9 +654,10 @@ static void native_machine_power_off(void) } /* A fallback in case there is no PM info available */ tboot_shutdown(TB_SHUTDOWN_HALT); @@ -25168,7 +26020,7 @@ index 3fd2c69..16ef367 100644 1: diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c -index f0de629..a4978a8f 100644 +index cb233bc..23b4879 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c @@ -110,6 +110,7 @@ @@ -25452,10 +26304,10 @@ index 7c3a5a6..f0a8961 100644 .smp_prepare_cpus = native_smp_prepare_cpus, .smp_cpus_done = native_smp_cpus_done, diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c -index 6cacab6..750636a 100644 +index 85dc05a..1241266 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c -@@ -251,14 +251,18 @@ static void notrace start_secondary(void *unused) +@@ -229,14 +229,18 @@ static void notrace start_secondary(void *unused) enable_start_cpu0 = 0; @@ -25480,7 +26332,7 @@ index 6cacab6..750636a 100644 /* * Check TSC synchronization with the BP: */ -@@ -749,6 +753,7 @@ static int do_boot_cpu(int apicid, int cpu, struct task_struct *idle) +@@ -751,6 +755,7 @@ static int do_boot_cpu(int apicid, int cpu, struct task_struct *idle) idle->thread.sp = (unsigned long) (((struct pt_regs *) (THREAD_SIZE + task_stack_page(idle))) - 1); per_cpu(current_task, cpu) = idle; @@ -25488,7 +26340,7 @@ index 6cacab6..750636a 100644 #ifdef CONFIG_X86_32 /* Stack for startup_32 can be just as for start_secondary onwards */ -@@ -756,11 +761,13 @@ static int do_boot_cpu(int apicid, int cpu, struct task_struct *idle) +@@ -758,11 +763,13 @@ static int do_boot_cpu(int apicid, int cpu, struct task_struct *idle) #else clear_tsk_thread_flag(idle, TIF_FORK); initial_gs = per_cpu_offset(cpu); @@ -25505,7 +26357,7 @@ index 6cacab6..750636a 100644 initial_code = (unsigned long)start_secondary; stack_start = idle->thread.sp; -@@ -909,6 +916,15 @@ int native_cpu_up(unsigned int cpu, struct task_struct *tidle) +@@ -911,6 +918,15 @@ int native_cpu_up(unsigned int cpu, struct task_struct *tidle) /* the FPU context is blank, nobody can own it */ __cpu_disable_lazy_restore(cpu); @@ -25848,7 +26700,7 @@ index 30277e2..5664a29 100644 if (!(addr & ~PAGE_MASK)) return addr; diff --git a/arch/x86/kernel/tboot.c b/arch/x86/kernel/tboot.c -index 91a4496..1730bff 100644 +index 91a4496..bb87552 100644 --- a/arch/x86/kernel/tboot.c +++ b/arch/x86/kernel/tboot.c @@ -221,7 +221,7 @@ static int tboot_setup_sleep(void) @@ -25865,7 +26717,7 @@ index 91a4496..1730bff 100644 switch_to_tboot_pt(); - shutdown = (void(*)(void))(unsigned long)tboot->shutdown_entry; -+ shutdown = (void *)tboot->shutdown_entry; ++ shutdown = (void *)(unsigned long)tboot->shutdown_entry; shutdown(); /* should not reach here */ @@ -25977,7 +26829,7 @@ index 1c113db..287b42e 100644 static int trace_irq_vector_refcount; static DEFINE_MUTEX(irq_vector_mutex); diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c -index 8c8093b..c93f581 100644 +index b857ed8..51ae4cb 100644 --- a/arch/x86/kernel/traps.c +++ b/arch/x86/kernel/traps.c @@ -66,7 +66,7 @@ @@ -26240,7 +27092,7 @@ index e8edcf5..27f9344 100644 goto cannot_handle; if ((segoffs >> 16) == BIOSSEG) diff --git a/arch/x86/kernel/vmlinux.lds.S b/arch/x86/kernel/vmlinux.lds.S -index 10c4f30..65408b9 100644 +index da6b35a..977e9cf 100644 --- a/arch/x86/kernel/vmlinux.lds.S +++ b/arch/x86/kernel/vmlinux.lds.S @@ -26,6 +26,13 @@ @@ -26441,7 +27293,7 @@ index 10c4f30..65408b9 100644 .x86_cpu_dev.init : AT(ADDR(.x86_cpu_dev.init) - LOAD_OFFSET) { __x86_cpu_dev_start = .; -@@ -253,19 +333,12 @@ SECTIONS +@@ -262,19 +342,12 @@ SECTIONS } . = ALIGN(8); @@ -26462,7 +27314,7 @@ index 10c4f30..65408b9 100644 PERCPU_SECTION(INTERNODE_CACHE_BYTES) #endif -@@ -284,16 +357,10 @@ SECTIONS +@@ -293,16 +366,10 @@ SECTIONS .smp_locks : AT(ADDR(.smp_locks) - LOAD_OFFSET) { __smp_locks = .; *(.smp_locks) @@ -26480,7 +27332,7 @@ index 10c4f30..65408b9 100644 /* BSS */ . = ALIGN(PAGE_SIZE); .bss : AT(ADDR(.bss) - LOAD_OFFSET) { -@@ -309,6 +376,7 @@ SECTIONS +@@ -318,6 +385,7 @@ SECTIONS __brk_base = .; . += 64 * 1024; /* 64k alignment slop space */ *(.brk_reservation) /* areas brk users have reserved */ @@ -26488,7 +27340,7 @@ index 10c4f30..65408b9 100644 __brk_limit = .; } -@@ -335,13 +403,12 @@ SECTIONS +@@ -344,13 +412,12 @@ SECTIONS * for the boot processor. */ #define INIT_PER_CPU(x) init_per_cpu__##x = x + __per_cpu_load @@ -26547,7 +27399,7 @@ index 1f96f93..d5c8f7a 100644 (unsigned long)VSYSCALL_START); diff --git a/arch/x86/kernel/x8664_ksyms_64.c b/arch/x86/kernel/x8664_ksyms_64.c -index b014d94..e775258 100644 +index 04068192..4d75aa6 100644 --- a/arch/x86/kernel/x8664_ksyms_64.c +++ b/arch/x86/kernel/x8664_ksyms_64.c @@ -34,8 +34,6 @@ EXPORT_SYMBOL(copy_user_generic_string); @@ -26559,16 +27411,16 @@ index b014d94..e775258 100644 EXPORT_SYMBOL(copy_page); EXPORT_SYMBOL(clear_page); -@@ -66,3 +64,7 @@ EXPORT_SYMBOL(empty_zero_page); - #ifndef CONFIG_PARAVIRT - EXPORT_SYMBOL(native_load_gs_index); +@@ -73,3 +71,7 @@ EXPORT_SYMBOL(___preempt_schedule); + EXPORT_SYMBOL(___preempt_schedule_context); + #endif #endif + +#ifdef CONFIG_PAX_PER_CPU_PGD +EXPORT_SYMBOL(cpu_pgd); +#endif diff --git a/arch/x86/kernel/x86_init.c b/arch/x86/kernel/x86_init.c -index 8ce0072..431a0e7 100644 +index 021783b..6511282 100644 --- a/arch/x86/kernel/x86_init.c +++ b/arch/x86/kernel/x86_init.c @@ -93,7 +93,7 @@ struct x86_cpuinit_ops x86_cpuinit = { @@ -26589,7 +27441,7 @@ index 8ce0072..431a0e7 100644 .setup_msi_irqs = native_setup_msi_irqs, .compose_msi_msg = native_compose_msi_msg, .teardown_msi_irq = native_teardown_msi_irq, -@@ -140,7 +140,7 @@ void arch_restore_msi_irqs(struct pci_dev *dev, int irq) +@@ -150,7 +150,7 @@ u32 arch_msix_mask_irq(struct msi_desc *desc, u32 flag) } #endif @@ -26599,9 +27451,40 @@ index 8ce0072..431a0e7 100644 .read = native_io_apic_read, .write = native_io_apic_write, diff --git a/arch/x86/kernel/xsave.c b/arch/x86/kernel/xsave.c -index 422fd82..c3687ca 100644 +index 422fd82..b2d262e 100644 --- a/arch/x86/kernel/xsave.c +++ b/arch/x86/kernel/xsave.c +@@ -164,18 +164,18 @@ static inline int save_xstate_epilog(void __user *buf, int ia32_frame) + + /* Setup the bytes not touched by the [f]xsave and reserved for SW. */ + sw_bytes = ia32_frame ? &fx_sw_reserved_ia32 : &fx_sw_reserved; +- err = __copy_to_user(&x->i387.sw_reserved, sw_bytes, sizeof(*sw_bytes)); ++ err = __copy_to_user(x->i387.sw_reserved, sw_bytes, sizeof(*sw_bytes)); + + if (!use_xsave()) + return err; + +- err |= __put_user(FP_XSTATE_MAGIC2, (__u32 *)(buf + xstate_size)); ++ err |= __put_user(FP_XSTATE_MAGIC2, (__u32 __user *)(buf + xstate_size)); + + /* + * Read the xstate_bv which we copied (directly from the cpu or + * from the state in task struct) to the user buffers. + */ +- err |= __get_user(xstate_bv, (__u32 *)&x->xsave_hdr.xstate_bv); ++ err |= __get_user(xstate_bv, (__u32 __user *)&x->xsave_hdr.xstate_bv); + + /* + * For legacy compatible, we always set FP/SSE bits in the bit +@@ -190,7 +190,7 @@ static inline int save_xstate_epilog(void __user *buf, int ia32_frame) + */ + xstate_bv |= XSTATE_FPSSE; + +- err |= __put_user(xstate_bv, (__u32 *)&x->xsave_hdr.xstate_bv); ++ err |= __put_user(xstate_bv, (__u32 __user *)&x->xsave_hdr.xstate_bv); + + return err; + } @@ -199,6 +199,7 @@ static inline int save_user_xstate(struct xsave_struct __user *buf) { int err; @@ -26619,10 +27502,10 @@ index 422fd82..c3687ca 100644 if ((unsigned long)buf % 64 || fx_only) { u64 init_bv = pcntxt_mask & ~XSTATE_FPSSE; diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c -index b110fe6..d9c19f2 100644 +index c697625..a032162 100644 --- a/arch/x86/kvm/cpuid.c +++ b/arch/x86/kvm/cpuid.c -@@ -124,15 +124,20 @@ int kvm_vcpu_ioctl_set_cpuid2(struct kvm_vcpu *vcpu, +@@ -156,15 +156,20 @@ int kvm_vcpu_ioctl_set_cpuid2(struct kvm_vcpu *vcpu, struct kvm_cpuid2 *cpuid, struct kvm_cpuid_entry2 __user *entries) { @@ -26646,7 +27529,7 @@ index b110fe6..d9c19f2 100644 vcpu->arch.cpuid_nent = cpuid->nent; kvm_apic_set_version(vcpu); kvm_x86_ops->cpuid_update(vcpu); -@@ -147,15 +152,19 @@ int kvm_vcpu_ioctl_get_cpuid2(struct kvm_vcpu *vcpu, +@@ -179,15 +184,19 @@ int kvm_vcpu_ioctl_get_cpuid2(struct kvm_vcpu *vcpu, struct kvm_cpuid2 *cpuid, struct kvm_cpuid_entry2 __user *entries) { @@ -26670,7 +27553,7 @@ index b110fe6..d9c19f2 100644 out: diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c -index 5439117..d08f3d4 100644 +index d86ff15..e77b023 100644 --- a/arch/x86/kvm/lapic.c +++ b/arch/x86/kvm/lapic.c @@ -55,7 +55,7 @@ @@ -26696,10 +27579,10 @@ index ad75d77..a679d32 100644 goto error; walker->ptep_user[walker->level - 1] = ptep_user; diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c -index c0bc803..6837a50 100644 +index c7168a5..09070fc 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c -@@ -3501,7 +3501,11 @@ static void reload_tss(struct kvm_vcpu *vcpu) +@@ -3497,7 +3497,11 @@ static void reload_tss(struct kvm_vcpu *vcpu) int cpu = raw_smp_processor_id(); struct svm_cpu_data *sd = per_cpu(svm_data, cpu); @@ -26711,7 +27594,7 @@ index c0bc803..6837a50 100644 load_TR_desc(); } -@@ -3902,6 +3906,10 @@ static void svm_vcpu_run(struct kvm_vcpu *vcpu) +@@ -3898,6 +3902,10 @@ static void svm_vcpu_run(struct kvm_vcpu *vcpu) #endif #endif @@ -26723,7 +27606,7 @@ index c0bc803..6837a50 100644 local_irq_disable(); diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c -index 2b2fce1..da76be4 100644 +index da7837e..86c6ebf 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -1316,12 +1316,12 @@ static void vmcs_write64(unsigned long field, u64 value) @@ -26764,7 +27647,7 @@ index 2b2fce1..da76be4 100644 rdmsrl(MSR_IA32_SYSENTER_ESP, sysenter_esp); vmcs_writel(HOST_IA32_SYSENTER_ESP, sysenter_esp); /* 22.2.3 */ vmx->loaded_vmcs->cpu = cpu; -@@ -2037,7 +2045,7 @@ static void setup_msrs(struct vcpu_vmx *vmx) +@@ -2033,7 +2041,7 @@ static void setup_msrs(struct vcpu_vmx *vmx) * reads and returns guest's timestamp counter "register" * guest_tsc = host_tsc + tsc_offset -- 21.3 */ @@ -26773,7 +27656,7 @@ index 2b2fce1..da76be4 100644 { u64 host_tsc, tsc_offset; -@@ -2982,8 +2990,11 @@ static __init int hardware_setup(void) +@@ -2987,8 +2995,11 @@ static __init int hardware_setup(void) if (!cpu_has_vmx_flexpriority()) flexpriority_enabled = 0; @@ -26787,7 +27670,7 @@ index 2b2fce1..da76be4 100644 if (enable_ept && !cpu_has_vmx_ept_2m_page()) kvm_disable_largepages(); -@@ -2994,13 +3005,15 @@ static __init int hardware_setup(void) +@@ -2999,13 +3010,15 @@ static __init int hardware_setup(void) if (!cpu_has_vmx_apicv()) enable_apicv = 0; @@ -26807,7 +27690,7 @@ index 2b2fce1..da76be4 100644 if (nested) nested_vmx_setup_ctls_msrs(); -@@ -4127,7 +4140,10 @@ static void vmx_set_constant_host_state(struct vcpu_vmx *vmx) +@@ -4134,7 +4147,10 @@ static void vmx_set_constant_host_state(struct vcpu_vmx *vmx) vmcs_writel(HOST_CR0, read_cr0() & ~X86_CR0_TS); /* 22.2.3 */ vmcs_writel(HOST_CR4, read_cr4()); /* 22.2.3, 22.2.5 */ @@ -26818,7 +27701,7 @@ index 2b2fce1..da76be4 100644 vmcs_write16(HOST_CS_SELECTOR, __KERNEL_CS); /* 22.2.4 */ #ifdef CONFIG_X86_64 -@@ -4149,7 +4165,7 @@ static void vmx_set_constant_host_state(struct vcpu_vmx *vmx) +@@ -4156,7 +4172,7 @@ static void vmx_set_constant_host_state(struct vcpu_vmx *vmx) vmcs_writel(HOST_IDTR_BASE, dt.address); /* 22.2.4 */ vmx->host_idt_base = dt.address; @@ -26827,7 +27710,7 @@ index 2b2fce1..da76be4 100644 rdmsr(MSR_IA32_SYSENTER_CS, low32, high32); vmcs_write32(HOST_IA32_SYSENTER_CS, low32); -@@ -7191,6 +7207,12 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu) +@@ -7219,6 +7235,12 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu) "jmp 2f \n\t" "1: " __ex(ASM_VMX_VMRESUME) "\n\t" "2: " @@ -26840,7 +27723,7 @@ index 2b2fce1..da76be4 100644 /* Save guest registers, load host registers, keep flags */ "mov %0, %c[wordsize](%%" _ASM_SP ") \n\t" "pop %0 \n\t" -@@ -7243,6 +7265,11 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu) +@@ -7271,6 +7293,11 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu) #endif [cr2]"i"(offsetof(struct vcpu_vmx, vcpu.arch.cr2)), [wordsize]"i"(sizeof(ulong)) @@ -26852,7 +27735,7 @@ index 2b2fce1..da76be4 100644 : "cc", "memory" #ifdef CONFIG_X86_64 , "rax", "rbx", "rdi", "rsi" -@@ -7256,7 +7283,7 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu) +@@ -7284,7 +7311,7 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu) if (debugctlmsr) update_debugctlmsr(debugctlmsr); @@ -26861,7 +27744,7 @@ index 2b2fce1..da76be4 100644 /* * The sysexit path does not restore ds/es, so we must set them to * a reasonable value ourselves. -@@ -7265,8 +7292,18 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu) +@@ -7293,8 +7320,18 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu) * may be executed in interrupt context, which saves and restore segments * around it, nullifying its effect. */ @@ -26883,10 +27766,10 @@ index 2b2fce1..da76be4 100644 vcpu->arch.regs_avail = ~((1 << VCPU_REGS_RIP) | (1 << VCPU_REGS_RSP) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c -index e5ca72a..83d5177 100644 +index d89d51b..f3c612a 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c -@@ -1779,8 +1779,8 @@ static int xen_hvm_config(struct kvm_vcpu *vcpu, u64 data) +@@ -1791,8 +1791,8 @@ static int xen_hvm_config(struct kvm_vcpu *vcpu, u64 data) { struct kvm *kvm = vcpu->kvm; int lm = is_long_mode(vcpu); @@ -26897,7 +27780,7 @@ index e5ca72a..83d5177 100644 u8 blob_size = lm ? kvm->arch.xen_hvm_config.blob_size_64 : kvm->arch.xen_hvm_config.blob_size_32; u32 page_num = data & ~PAGE_MASK; -@@ -2663,6 +2663,8 @@ long kvm_arch_dev_ioctl(struct file *filp, +@@ -2676,6 +2676,8 @@ long kvm_arch_dev_ioctl(struct file *filp, if (n < msr_list.nmsrs) goto out; r = -EFAULT; @@ -26906,7 +27789,7 @@ index e5ca72a..83d5177 100644 if (copy_to_user(user_msr_list->indices, &msrs_to_save, num_msrs_to_save * sizeof(u32))) goto out; -@@ -5462,7 +5464,7 @@ static struct notifier_block pvclock_gtod_notifier = { +@@ -5485,7 +5487,7 @@ static struct notifier_block pvclock_gtod_notifier = { }; #endif @@ -27719,7 +28602,7 @@ index 1e572c5..2a162cd 100644 CFI_ENDPROC diff --git a/arch/x86/lib/copy_page_64.S b/arch/x86/lib/copy_page_64.S -index 176cca6..1166c50 100644 +index 176cca6..e0d658e 100644 --- a/arch/x86/lib/copy_page_64.S +++ b/arch/x86/lib/copy_page_64.S @@ -9,6 +9,7 @@ copy_page_rep: @@ -27730,74 +28613,68 @@ index 176cca6..1166c50 100644 ret CFI_ENDPROC ENDPROC(copy_page_rep) -@@ -20,12 +21,14 @@ ENDPROC(copy_page_rep) - - ENTRY(copy_page) - CFI_STARTPROC -- subq $2*8, %rsp -- CFI_ADJUST_CFA_OFFSET 2*8 -+ subq $3*8, %rsp -+ CFI_ADJUST_CFA_OFFSET 3*8 +@@ -24,8 +25,8 @@ ENTRY(copy_page) + CFI_ADJUST_CFA_OFFSET 2*8 movq %rbx, (%rsp) CFI_REL_OFFSET rbx, 0 - movq %r12, 1*8(%rsp) - CFI_REL_OFFSET r12, 1*8 -+ movq %r13, 2*8(%rsp) -+ CFI_REL_OFFSET r13, 2*8 +- movq %r12, 1*8(%rsp) +- CFI_REL_OFFSET r12, 1*8 ++ movq %r13, 1*8(%rsp) ++ CFI_REL_OFFSET r13, 1*8 movl $(4096/64)-5, %ecx .p2align 4 -@@ -36,7 +39,7 @@ ENTRY(copy_page) - movq 0x8*2(%rsi), %rdx - movq 0x8*3(%rsi), %r8 +@@ -38,7 +39,7 @@ ENTRY(copy_page) movq 0x8*4(%rsi), %r9 -- movq 0x8*5(%rsi), %r10 -+ movq 0x8*5(%rsi), %r13 + movq 0x8*5(%rsi), %r10 movq 0x8*6(%rsi), %r11 - movq 0x8*7(%rsi), %r12 +- movq 0x8*7(%rsi), %r12 ++ movq 0x8*7(%rsi), %r13 -@@ -47,7 +50,7 @@ ENTRY(copy_page) - movq %rdx, 0x8*2(%rdi) - movq %r8, 0x8*3(%rdi) + prefetcht0 5*64(%rsi) + +@@ -49,7 +50,7 @@ ENTRY(copy_page) movq %r9, 0x8*4(%rdi) -- movq %r10, 0x8*5(%rdi) -+ movq %r13, 0x8*5(%rdi) + movq %r10, 0x8*5(%rdi) movq %r11, 0x8*6(%rdi) - movq %r12, 0x8*7(%rdi) +- movq %r12, 0x8*7(%rdi) ++ movq %r13, 0x8*7(%rdi) -@@ -66,7 +69,7 @@ ENTRY(copy_page) - movq 0x8*2(%rsi), %rdx - movq 0x8*3(%rsi), %r8 + leaq 64 (%rsi), %rsi + leaq 64 (%rdi), %rdi +@@ -68,7 +69,7 @@ ENTRY(copy_page) movq 0x8*4(%rsi), %r9 -- movq 0x8*5(%rsi), %r10 -+ movq 0x8*5(%rsi), %r13 + movq 0x8*5(%rsi), %r10 movq 0x8*6(%rsi), %r11 - movq 0x8*7(%rsi), %r12 +- movq 0x8*7(%rsi), %r12 ++ movq 0x8*7(%rsi), %r13 -@@ -75,7 +78,7 @@ ENTRY(copy_page) - movq %rdx, 0x8*2(%rdi) - movq %r8, 0x8*3(%rdi) + movq %rax, 0x8*0(%rdi) + movq %rbx, 0x8*1(%rdi) +@@ -77,7 +78,7 @@ ENTRY(copy_page) movq %r9, 0x8*4(%rdi) -- movq %r10, 0x8*5(%rdi) -+ movq %r13, 0x8*5(%rdi) + movq %r10, 0x8*5(%rdi) movq %r11, 0x8*6(%rdi) - movq %r12, 0x8*7(%rdi) +- movq %r12, 0x8*7(%rdi) ++ movq %r13, 0x8*7(%rdi) + + leaq 64(%rdi), %rdi + leaq 64(%rsi), %rsi +@@ -85,10 +86,11 @@ ENTRY(copy_page) -@@ -87,8 +90,11 @@ ENTRY(copy_page) + movq (%rsp), %rbx CFI_RESTORE rbx - movq 1*8(%rsp), %r12 - CFI_RESTORE r12 -- addq $2*8, %rsp -- CFI_ADJUST_CFA_OFFSET -2*8 -+ movq 2*8(%rsp), %r13 +- movq 1*8(%rsp), %r12 +- CFI_RESTORE r12 ++ movq 1*8(%rsp), %r13 + CFI_RESTORE r13 -+ addq $3*8, %rsp -+ CFI_ADJUST_CFA_OFFSET -3*8 + addq $2*8, %rsp + CFI_ADJUST_CFA_OFFSET -2*8 + pax_force_retaddr ret .Lcopy_page_end: CFI_ENDPROC -@@ -99,7 +105,7 @@ ENDPROC(copy_page) +@@ -99,7 +101,7 @@ ENDPROC(copy_page) #include @@ -27807,7 +28684,7 @@ index 176cca6..1166c50 100644 .byte (copy_page_rep - copy_page) - (2f - 1b) /* offset */ 2: diff --git a/arch/x86/lib/copy_user_64.S b/arch/x86/lib/copy_user_64.S -index a30ca15..6b3f4e1 100644 +index a30ca15..407412b 100644 --- a/arch/x86/lib/copy_user_64.S +++ b/arch/x86/lib/copy_user_64.S @@ -18,31 +18,7 @@ @@ -27904,30 +28781,6 @@ index a30ca15..6b3f4e1 100644 ASM_STAC cmpl $8,%edx jb 20f /* less then 8 bytes, go to byte copy loop */ -@@ -141,19 +72,19 @@ ENTRY(copy_user_generic_unrolled) - jz 17f - 1: movq (%rsi),%r8 - 2: movq 1*8(%rsi),%r9 --3: movq 2*8(%rsi),%r10 -+3: movq 2*8(%rsi),%rax - 4: movq 3*8(%rsi),%r11 - 5: movq %r8,(%rdi) - 6: movq %r9,1*8(%rdi) --7: movq %r10,2*8(%rdi) -+7: movq %rax,2*8(%rdi) - 8: movq %r11,3*8(%rdi) - 9: movq 4*8(%rsi),%r8 - 10: movq 5*8(%rsi),%r9 --11: movq 6*8(%rsi),%r10 -+11: movq 6*8(%rsi),%rax - 12: movq 7*8(%rsi),%r11 - 13: movq %r8,4*8(%rdi) - 14: movq %r9,5*8(%rdi) --15: movq %r10,6*8(%rdi) -+15: movq %rax,6*8(%rdi) - 16: movq %r11,7*8(%rdi) - leaq 64(%rsi),%rsi - leaq 64(%rdi),%rdi @@ -180,6 +111,8 @@ ENTRY(copy_user_generic_unrolled) jnz 21b 23: xor %eax,%eax @@ -27972,7 +28825,7 @@ index a30ca15..6b3f4e1 100644 .section .fixup,"ax" diff --git a/arch/x86/lib/copy_user_nocache_64.S b/arch/x86/lib/copy_user_nocache_64.S -index 6a4f43c..55d26f2 100644 +index 6a4f43c..c70fb52 100644 --- a/arch/x86/lib/copy_user_nocache_64.S +++ b/arch/x86/lib/copy_user_nocache_64.S @@ -8,6 +8,7 @@ @@ -28008,30 +28861,6 @@ index 6a4f43c..55d26f2 100644 ASM_STAC cmpl $8,%edx jb 20f /* less then 8 bytes, go to byte copy loop */ -@@ -59,19 +71,19 @@ ENTRY(__copy_user_nocache) - jz 17f - 1: movq (%rsi),%r8 - 2: movq 1*8(%rsi),%r9 --3: movq 2*8(%rsi),%r10 -+3: movq 2*8(%rsi),%rax - 4: movq 3*8(%rsi),%r11 - 5: movnti %r8,(%rdi) - 6: movnti %r9,1*8(%rdi) --7: movnti %r10,2*8(%rdi) -+7: movnti %rax,2*8(%rdi) - 8: movnti %r11,3*8(%rdi) - 9: movq 4*8(%rsi),%r8 - 10: movq 5*8(%rsi),%r9 --11: movq 6*8(%rsi),%r10 -+11: movq 6*8(%rsi),%rax - 12: movq 7*8(%rsi),%r11 - 13: movnti %r8,4*8(%rdi) - 14: movnti %r9,5*8(%rdi) --15: movnti %r10,6*8(%rdi) -+15: movnti %rax,6*8(%rdi) - 16: movnti %r11,7*8(%rdi) - leaq 64(%rsi),%rsi - leaq 64(%rdi),%rdi @@ -98,7 +110,9 @@ ENTRY(__copy_user_nocache) jnz 21b 23: xorl %eax,%eax @@ -28043,7 +28872,7 @@ index 6a4f43c..55d26f2 100644 .section .fixup,"ax" diff --git a/arch/x86/lib/csum-copy_64.S b/arch/x86/lib/csum-copy_64.S -index 2419d5f..953ee51 100644 +index 2419d5f..fe52d0e 100644 --- a/arch/x86/lib/csum-copy_64.S +++ b/arch/x86/lib/csum-copy_64.S @@ -9,6 +9,7 @@ @@ -28054,11 +28883,62 @@ index 2419d5f..953ee51 100644 /* * Checksum copy with exception handling. +@@ -56,8 +57,8 @@ ENTRY(csum_partial_copy_generic) + CFI_ADJUST_CFA_OFFSET 7*8 + movq %rbx, 2*8(%rsp) + CFI_REL_OFFSET rbx, 2*8 +- movq %r12, 3*8(%rsp) +- CFI_REL_OFFSET r12, 3*8 ++ movq %r15, 3*8(%rsp) ++ CFI_REL_OFFSET r15, 3*8 + movq %r14, 4*8(%rsp) + CFI_REL_OFFSET r14, 4*8 + movq %r13, 5*8(%rsp) +@@ -72,16 +73,16 @@ ENTRY(csum_partial_copy_generic) + movl %edx, %ecx + + xorl %r9d, %r9d +- movq %rcx, %r12 ++ movq %rcx, %r15 + +- shrq $6, %r12 ++ shrq $6, %r15 + jz .Lhandle_tail /* < 64 */ + + clc + + /* main loop. clear in 64 byte blocks */ + /* r9: zero, r8: temp2, rbx: temp1, rax: sum, rcx: saved length */ +- /* r11: temp3, rdx: temp4, r12 loopcnt */ ++ /* r11: temp3, rdx: temp4, r15 loopcnt */ + /* r10: temp5, rbp: temp6, r14 temp7, r13 temp8 */ + .p2align 4 + .Lloop: +@@ -115,7 +116,7 @@ ENTRY(csum_partial_copy_generic) + adcq %r14, %rax + adcq %r13, %rax + +- decl %r12d ++ decl %r15d + + dest + movq %rbx, (%rsi) +@@ -210,8 +211,8 @@ ENTRY(csum_partial_copy_generic) + .Lende: + movq 2*8(%rsp), %rbx + CFI_RESTORE rbx +- movq 3*8(%rsp), %r12 +- CFI_RESTORE r12 ++ movq 3*8(%rsp), %r15 ++ CFI_RESTORE r15 + movq 4*8(%rsp), %r14 + CFI_RESTORE r14 + movq 5*8(%rsp), %r13 @@ -220,6 +221,7 @@ ENTRY(csum_partial_copy_generic) CFI_RESTORE rbp addq $7*8, %rsp CFI_ADJUST_CFA_OFFSET -7*8 -+ pax_force_retaddr 0, 1 ++ pax_force_retaddr ret CFI_RESTORE_STATE @@ -28298,7 +29178,7 @@ index 05a95e7..326f2fa 100644 CFI_ENDPROC ENDPROC(__iowrite32_copy) diff --git a/arch/x86/lib/memcpy_64.S b/arch/x86/lib/memcpy_64.S -index 56313a3..9b59269 100644 +index 56313a3..0db417e 100644 --- a/arch/x86/lib/memcpy_64.S +++ b/arch/x86/lib/memcpy_64.S @@ -24,7 +24,7 @@ @@ -28332,48 +29212,9 @@ index 56313a3..9b59269 100644 ret .Lmemcpy_e_e: .previous -@@ -76,13 +78,13 @@ ENTRY(memcpy) - */ - movq 0*8(%rsi), %r8 - movq 1*8(%rsi), %r9 -- movq 2*8(%rsi), %r10 -+ movq 2*8(%rsi), %rcx - movq 3*8(%rsi), %r11 - leaq 4*8(%rsi), %rsi - - movq %r8, 0*8(%rdi) - movq %r9, 1*8(%rdi) -- movq %r10, 2*8(%rdi) -+ movq %rcx, 2*8(%rdi) - movq %r11, 3*8(%rdi) - leaq 4*8(%rdi), %rdi - jae .Lcopy_forward_loop -@@ -105,12 +107,12 @@ ENTRY(memcpy) - subq $0x20, %rdx - movq -1*8(%rsi), %r8 - movq -2*8(%rsi), %r9 -- movq -3*8(%rsi), %r10 -+ movq -3*8(%rsi), %rcx - movq -4*8(%rsi), %r11 - leaq -4*8(%rsi), %rsi - movq %r8, -1*8(%rdi) - movq %r9, -2*8(%rdi) -- movq %r10, -3*8(%rdi) -+ movq %rcx, -3*8(%rdi) - movq %r11, -4*8(%rdi) - leaq -4*8(%rdi), %rdi - jae .Lcopy_backward_loop -@@ -130,12 +132,13 @@ ENTRY(memcpy) - */ - movq 0*8(%rsi), %r8 - movq 1*8(%rsi), %r9 -- movq -2*8(%rsi, %rdx), %r10 -+ movq -2*8(%rsi, %rdx), %rcx - movq -1*8(%rsi, %rdx), %r11 - movq %r8, 0*8(%rdi) +@@ -136,6 +138,7 @@ ENTRY(memcpy) movq %r9, 1*8(%rdi) -- movq %r10, -2*8(%rdi, %rdx) -+ movq %rcx, -2*8(%rdi, %rdx) + movq %r10, -2*8(%rdi, %rdx) movq %r11, -1*8(%rdi, %rdx) + pax_force_retaddr retq @@ -28404,121 +29245,9 @@ index 56313a3..9b59269 100644 CFI_ENDPROC ENDPROC(memcpy) diff --git a/arch/x86/lib/memmove_64.S b/arch/x86/lib/memmove_64.S -index 65268a6..5aa7815 100644 +index 65268a6..dd1de11 100644 --- a/arch/x86/lib/memmove_64.S +++ b/arch/x86/lib/memmove_64.S -@@ -61,13 +61,13 @@ ENTRY(memmove) - 5: - sub $0x20, %rdx - movq 0*8(%rsi), %r11 -- movq 1*8(%rsi), %r10 -+ movq 1*8(%rsi), %rcx - movq 2*8(%rsi), %r9 - movq 3*8(%rsi), %r8 - leaq 4*8(%rsi), %rsi - - movq %r11, 0*8(%rdi) -- movq %r10, 1*8(%rdi) -+ movq %rcx, 1*8(%rdi) - movq %r9, 2*8(%rdi) - movq %r8, 3*8(%rdi) - leaq 4*8(%rdi), %rdi -@@ -81,10 +81,10 @@ ENTRY(memmove) - 4: - movq %rdx, %rcx - movq -8(%rsi, %rdx), %r11 -- lea -8(%rdi, %rdx), %r10 -+ lea -8(%rdi, %rdx), %r9 - shrq $3, %rcx - rep movsq -- movq %r11, (%r10) -+ movq %r11, (%r9) - jmp 13f - .Lmemmove_end_forward: - -@@ -95,14 +95,14 @@ ENTRY(memmove) - 7: - movq %rdx, %rcx - movq (%rsi), %r11 -- movq %rdi, %r10 -+ movq %rdi, %r9 - leaq -8(%rsi, %rdx), %rsi - leaq -8(%rdi, %rdx), %rdi - shrq $3, %rcx - std - rep movsq - cld -- movq %r11, (%r10) -+ movq %r11, (%r9) - jmp 13f - - /* -@@ -127,13 +127,13 @@ ENTRY(memmove) - 8: - subq $0x20, %rdx - movq -1*8(%rsi), %r11 -- movq -2*8(%rsi), %r10 -+ movq -2*8(%rsi), %rcx - movq -3*8(%rsi), %r9 - movq -4*8(%rsi), %r8 - leaq -4*8(%rsi), %rsi - - movq %r11, -1*8(%rdi) -- movq %r10, -2*8(%rdi) -+ movq %rcx, -2*8(%rdi) - movq %r9, -3*8(%rdi) - movq %r8, -4*8(%rdi) - leaq -4*8(%rdi), %rdi -@@ -151,11 +151,11 @@ ENTRY(memmove) - * Move data from 16 bytes to 31 bytes. - */ - movq 0*8(%rsi), %r11 -- movq 1*8(%rsi), %r10 -+ movq 1*8(%rsi), %rcx - movq -2*8(%rsi, %rdx), %r9 - movq -1*8(%rsi, %rdx), %r8 - movq %r11, 0*8(%rdi) -- movq %r10, 1*8(%rdi) -+ movq %rcx, 1*8(%rdi) - movq %r9, -2*8(%rdi, %rdx) - movq %r8, -1*8(%rdi, %rdx) - jmp 13f -@@ -167,9 +167,9 @@ ENTRY(memmove) - * Move data from 8 bytes to 15 bytes. - */ - movq 0*8(%rsi), %r11 -- movq -1*8(%rsi, %rdx), %r10 -+ movq -1*8(%rsi, %rdx), %r9 - movq %r11, 0*8(%rdi) -- movq %r10, -1*8(%rdi, %rdx) -+ movq %r9, -1*8(%rdi, %rdx) - jmp 13f - 10: - cmpq $4, %rdx -@@ -178,9 +178,9 @@ ENTRY(memmove) - * Move data from 4 bytes to 7 bytes. - */ - movl (%rsi), %r11d -- movl -4(%rsi, %rdx), %r10d -+ movl -4(%rsi, %rdx), %r9d - movl %r11d, (%rdi) -- movl %r10d, -4(%rdi, %rdx) -+ movl %r9d, -4(%rdi, %rdx) - jmp 13f - 11: - cmp $2, %rdx -@@ -189,9 +189,9 @@ ENTRY(memmove) - * Move data from 2 bytes to 3 bytes. - */ - movw (%rsi), %r11w -- movw -2(%rsi, %rdx), %r10w -+ movw -2(%rsi, %rdx), %r9w - movw %r11w, (%rdi) -- movw %r10w, -2(%rdi, %rdx) -+ movw %r9w, -2(%rdi, %rdx) - jmp 13f - 12: - cmp $1, %rdx @@ -202,14 +202,16 @@ ENTRY(memmove) movb (%rsi), %r11b movb %r11b, (%rdi) @@ -28538,7 +29267,7 @@ index 65268a6..5aa7815 100644 .Lmemmove_end_forward_efs: .previous diff --git a/arch/x86/lib/memset_64.S b/arch/x86/lib/memset_64.S -index 2dcb380..50a78bc 100644 +index 2dcb380..2eb79fe 100644 --- a/arch/x86/lib/memset_64.S +++ b/arch/x86/lib/memset_64.S @@ -16,7 +16,7 @@ @@ -28574,21 +29303,10 @@ index 2dcb380..50a78bc 100644 ret .Lmemset_e_e: .previous -@@ -59,7 +61,7 @@ - ENTRY(memset) - ENTRY(__memset) - CFI_STARTPROC -- movq %rdi,%r10 -+ movq %rdi,%r11 - - /* expand byte value */ - movzbl %sil,%ecx -@@ -117,7 +119,8 @@ ENTRY(__memset) - jnz .Lloop_1 +@@ -118,6 +120,7 @@ ENTRY(__memset) .Lende: -- movq %r10,%rax -+ movq %r11,%rax + movq %r10,%rax + pax_force_retaddr ret @@ -28913,7 +29631,7 @@ index c9f2d9b..e7fd2c0 100644 from += 64; to += 64; diff --git a/arch/x86/lib/msr-reg.S b/arch/x86/lib/msr-reg.S -index f6d13ee..aca5f0b 100644 +index f6d13ee..d789440 100644 --- a/arch/x86/lib/msr-reg.S +++ b/arch/x86/lib/msr-reg.S @@ -3,6 +3,7 @@ @@ -28924,34 +29642,8 @@ index f6d13ee..aca5f0b 100644 #ifdef CONFIG_X86_64 /* -@@ -16,7 +17,7 @@ ENTRY(\op\()_safe_regs) - CFI_STARTPROC - pushq_cfi %rbx - pushq_cfi %rbp -- movq %rdi, %r10 /* Save pointer */ -+ movq %rdi, %r9 /* Save pointer */ - xorl %r11d, %r11d /* Return value */ - movl (%rdi), %eax - movl 4(%rdi), %ecx -@@ -27,16 +28,17 @@ ENTRY(\op\()_safe_regs) - movl 28(%rdi), %edi - CFI_REMEMBER_STATE - 1: \op --2: movl %eax, (%r10) -+2: movl %eax, (%r9) - movl %r11d, %eax /* Return value */ -- movl %ecx, 4(%r10) -- movl %edx, 8(%r10) -- movl %ebx, 12(%r10) -- movl %ebp, 20(%r10) -- movl %esi, 24(%r10) -- movl %edi, 28(%r10) -+ movl %ecx, 4(%r9) -+ movl %edx, 8(%r9) -+ movl %ebx, 12(%r9) -+ movl %ebp, 20(%r9) -+ movl %esi, 24(%r9) -+ movl %edi, 28(%r9) +@@ -37,6 +38,7 @@ ENTRY(\op\()_safe_regs) + movl %edi, 28(%r10) popq_cfi %rbp popq_cfi %rbx + pax_force_retaddr @@ -29221,7 +29913,7 @@ index 5dff5f0..cadebf4 100644 CFI_ENDPROC ENDPROC(call_rwsem_downgrade_wake) diff --git a/arch/x86/lib/thunk_64.S b/arch/x86/lib/thunk_64.S -index a63efd6..ccecad8 100644 +index a63efd6..8149fbe 100644 --- a/arch/x86/lib/thunk_64.S +++ b/arch/x86/lib/thunk_64.S @@ -8,6 +8,7 @@ @@ -29232,15 +29924,35 @@ index a63efd6..ccecad8 100644 /* rdi: arg1 ... normal C conventions. rax is saved/restored. */ .macro THUNK name, func, put_ret_addr_in_rdi=0 -@@ -41,5 +42,6 @@ - SAVE_ARGS +@@ -15,11 +16,11 @@ + \name: + CFI_STARTPROC + +- /* this one pushes 9 elems, the next one would be %rIP */ +- SAVE_ARGS ++ /* this one pushes 15+1 elems, the next one would be %rIP */ ++ SAVE_ARGS 8 + + .if \put_ret_addr_in_rdi +- movq_cfi_restore 9*8, rdi ++ movq_cfi_restore RIP, rdi + .endif + + call \func +@@ -38,8 +39,9 @@ + + /* SAVE_ARGS below is used only for the .cfi directives it contains. */ + CFI_STARTPROC +- SAVE_ARGS ++ SAVE_ARGS 8 restore: - RESTORE_ARGS +- RESTORE_ARGS ++ RESTORE_ARGS 1,8 + pax_force_retaddr ret CFI_ENDPROC diff --git a/arch/x86/lib/usercopy_32.c b/arch/x86/lib/usercopy_32.c -index 3eb18ac..4b22130 100644 +index e2f5e21..4b22130 100644 --- a/arch/x86/lib/usercopy_32.c +++ b/arch/x86/lib/usercopy_32.c @@ -42,11 +42,13 @@ do { \ @@ -29737,7 +30449,7 @@ index 3eb18ac..4b22130 100644 clac(); return n; } -@@ -632,60 +743,38 @@ unsigned long __copy_from_user_ll_nocache_nozero(void *to, const void __user *fr +@@ -632,58 +743,38 @@ unsigned long __copy_from_user_ll_nocache_nozero(void *to, const void __user *fr if (n > 64 && cpu_has_xmm2) n = __copy_user_intel_nocache(to, from, n); else @@ -29765,8 +30477,7 @@ index 3eb18ac..4b22130 100644 - * Returns number of bytes that could not be copied. - * On success, this will be zero. - */ --unsigned long --copy_to_user(void __user *to, const void *from, unsigned long n) +-unsigned long _copy_to_user(void __user *to, const void *from, unsigned n) +#ifdef CONFIG_PAX_MEMORY_UDEREF +void __set_fs(mm_segment_t x) { @@ -29787,7 +30498,7 @@ index 3eb18ac..4b22130 100644 + BUG(); + } } --EXPORT_SYMBOL(copy_to_user); +-EXPORT_SYMBOL(_copy_to_user); +EXPORT_SYMBOL(__set_fs); -/** @@ -29806,8 +30517,7 @@ index 3eb18ac..4b22130 100644 - * If some data could not be copied, this function will pad the copied - * data to the requested size using zero bytes. - */ --unsigned long --_copy_from_user(void *to, const void __user *from, unsigned long n) +-unsigned long _copy_from_user(void *to, const void __user *from, unsigned n) +void set_fs(mm_segment_t x) { - if (access_ok(VERIFY_READ, from, n)) @@ -29885,10 +30595,10 @@ index c905e89..01ab928 100644 return len; } diff --git a/arch/x86/mm/Makefile b/arch/x86/mm/Makefile -index 23d8e5f..9ccc13a 100644 +index 6a19ad9..1c48f9a 100644 --- a/arch/x86/mm/Makefile +++ b/arch/x86/mm/Makefile -@@ -28,3 +28,7 @@ obj-$(CONFIG_ACPI_NUMA) += srat.o +@@ -30,3 +30,7 @@ obj-$(CONFIG_ACPI_NUMA) += srat.o obj-$(CONFIG_NUMA_EMU) += numa_emulation.o obj-$(CONFIG_MEMTEST) += memtest.o @@ -29951,7 +30661,7 @@ index 903ec1e..c4166b2 100644 } diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c -index 3aaeffc..42ea9fb 100644 +index 9d591c8..2e61790 100644 --- a/arch/x86/mm/fault.c +++ b/arch/x86/mm/fault.c @@ -14,11 +14,18 @@ @@ -29971,9 +30681,9 @@ index 3aaeffc..42ea9fb 100644 +#include +#endif - /* - * Page fault error code bits: -@@ -56,7 +63,7 @@ static inline int __kprobes notify_page_fault(struct pt_regs *regs) + #define CREATE_TRACE_POINTS + #include +@@ -59,7 +66,7 @@ static inline int __kprobes kprobes_fault(struct pt_regs *regs) int ret = 0; /* kprobe_running() needs smp_processor_id() */ @@ -29982,7 +30692,7 @@ index 3aaeffc..42ea9fb 100644 preempt_disable(); if (kprobe_running() && kprobe_fault_handler(regs, 14)) ret = 1; -@@ -117,7 +124,10 @@ check_prefetch_opcode(struct pt_regs *regs, unsigned char *instr, +@@ -120,7 +127,10 @@ check_prefetch_opcode(struct pt_regs *regs, unsigned char *instr, return !instr_lo || (instr_lo>>1) == 1; case 0x00: /* Prefetch instruction is 0x0F0D or 0x0F18 */ @@ -29994,7 +30704,7 @@ index 3aaeffc..42ea9fb 100644 return 0; *prefetch = (instr_lo == 0xF) && -@@ -151,7 +161,10 @@ is_prefetch(struct pt_regs *regs, unsigned long error_code, unsigned long addr) +@@ -154,7 +164,10 @@ is_prefetch(struct pt_regs *regs, unsigned long error_code, unsigned long addr) while (instr < max_instr) { unsigned char opcode; @@ -30006,7 +30716,7 @@ index 3aaeffc..42ea9fb 100644 break; instr++; -@@ -182,6 +195,34 @@ force_sig_info_fault(int si_signo, int si_code, unsigned long address, +@@ -185,6 +198,34 @@ force_sig_info_fault(int si_signo, int si_code, unsigned long address, force_sig_info(si_signo, &info, tsk); } @@ -30041,7 +30751,7 @@ index 3aaeffc..42ea9fb 100644 DEFINE_SPINLOCK(pgd_lock); LIST_HEAD(pgd_list); -@@ -232,10 +273,27 @@ void vmalloc_sync_all(void) +@@ -235,10 +276,27 @@ void vmalloc_sync_all(void) for (address = VMALLOC_START & PMD_MASK; address >= TASK_SIZE && address < FIXADDR_TOP; address += PMD_SIZE) { @@ -30069,7 +30779,7 @@ index 3aaeffc..42ea9fb 100644 spinlock_t *pgt_lock; pmd_t *ret; -@@ -243,8 +301,14 @@ void vmalloc_sync_all(void) +@@ -246,8 +304,14 @@ void vmalloc_sync_all(void) pgt_lock = &pgd_page_get_mm(page)->page_table_lock; spin_lock(pgt_lock); @@ -30085,7 +30795,7 @@ index 3aaeffc..42ea9fb 100644 if (!ret) break; -@@ -278,6 +342,12 @@ static noinline __kprobes int vmalloc_fault(unsigned long address) +@@ -281,6 +345,12 @@ static noinline __kprobes int vmalloc_fault(unsigned long address) * an interrupt in the middle of a task switch.. */ pgd_paddr = read_cr3(); @@ -30098,7 +30808,7 @@ index 3aaeffc..42ea9fb 100644 pmd_k = vmalloc_sync_one(__va(pgd_paddr), address); if (!pmd_k) return -1; -@@ -373,11 +443,25 @@ static noinline __kprobes int vmalloc_fault(unsigned long address) +@@ -376,11 +446,25 @@ static noinline __kprobes int vmalloc_fault(unsigned long address) * happen within a race in page table update. In the later * case just flush: */ @@ -30125,7 +30835,7 @@ index 3aaeffc..42ea9fb 100644 if (pgd_none(*pgd)) { set_pgd(pgd, *pgd_ref); arch_flush_lazy_mmu_mode(); -@@ -543,7 +627,7 @@ static int is_errata93(struct pt_regs *regs, unsigned long address) +@@ -546,7 +630,7 @@ static int is_errata93(struct pt_regs *regs, unsigned long address) static int is_errata100(struct pt_regs *regs, unsigned long address) { #ifdef CONFIG_X86_64 @@ -30134,7 +30844,7 @@ index 3aaeffc..42ea9fb 100644 return 1; #endif return 0; -@@ -570,7 +654,7 @@ static int is_f00f_bug(struct pt_regs *regs, unsigned long address) +@@ -573,7 +657,7 @@ static int is_f00f_bug(struct pt_regs *regs, unsigned long address) } static const char nx_warning[] = KERN_CRIT @@ -30143,7 +30853,7 @@ index 3aaeffc..42ea9fb 100644 static void show_fault_oops(struct pt_regs *regs, unsigned long error_code, -@@ -579,15 +663,27 @@ show_fault_oops(struct pt_regs *regs, unsigned long error_code, +@@ -582,15 +666,27 @@ show_fault_oops(struct pt_regs *regs, unsigned long error_code, if (!oops_may_print()) return; @@ -30173,7 +30883,7 @@ index 3aaeffc..42ea9fb 100644 printk(KERN_ALERT "BUG: unable to handle kernel "); if (address < PAGE_SIZE) printk(KERN_CONT "NULL pointer dereference"); -@@ -750,6 +846,22 @@ __bad_area_nosemaphore(struct pt_regs *regs, unsigned long error_code, +@@ -771,6 +867,22 @@ __bad_area_nosemaphore(struct pt_regs *regs, unsigned long error_code, return; } #endif @@ -30196,7 +30906,7 @@ index 3aaeffc..42ea9fb 100644 /* Kernel addresses are always protection faults: */ if (address >= TASK_SIZE) error_code |= PF_PROT; -@@ -835,7 +947,7 @@ do_sigbus(struct pt_regs *regs, unsigned long error_code, unsigned long address, +@@ -856,7 +968,7 @@ do_sigbus(struct pt_regs *regs, unsigned long error_code, unsigned long address, if (fault & (VM_FAULT_HWPOISON|VM_FAULT_HWPOISON_LARGE)) { printk(KERN_ERR "MCE: Killing %s:%d due to hardware memory corruption fault at %lx\n", @@ -30205,7 +30915,7 @@ index 3aaeffc..42ea9fb 100644 code = BUS_MCEERR_AR; } #endif -@@ -889,6 +1001,99 @@ static int spurious_fault_check(unsigned long error_code, pte_t *pte) +@@ -910,6 +1022,99 @@ static int spurious_fault_check(unsigned long error_code, pte_t *pte) return 1; } @@ -30305,7 +31015,7 @@ index 3aaeffc..42ea9fb 100644 /* * Handle a spurious fault caused by a stale TLB entry. * -@@ -955,6 +1160,9 @@ int show_unhandled_signals = 1; +@@ -976,6 +1181,9 @@ int show_unhandled_signals = 1; static inline int access_error(unsigned long error_code, struct vm_area_struct *vma) { @@ -30315,7 +31025,7 @@ index 3aaeffc..42ea9fb 100644 if (error_code & PF_WRITE) { /* write, present and write, not present: */ if (unlikely(!(vma->vm_flags & VM_WRITE))) -@@ -983,7 +1191,7 @@ static inline bool smap_violation(int error_code, struct pt_regs *regs) +@@ -1004,7 +1212,7 @@ static inline bool smap_violation(int error_code, struct pt_regs *regs) if (error_code & PF_USER) return false; @@ -30324,7 +31034,7 @@ index 3aaeffc..42ea9fb 100644 return false; return true; -@@ -1010,6 +1218,22 @@ __do_page_fault(struct pt_regs *regs, unsigned long error_code) +@@ -1031,6 +1239,22 @@ __do_page_fault(struct pt_regs *regs, unsigned long error_code) /* Get the faulting address: */ address = read_cr2(); @@ -30347,7 +31057,7 @@ index 3aaeffc..42ea9fb 100644 /* * Detect and handle instructions that would cause a page fault for * both a tracked kernel page and a userspace page. -@@ -1069,7 +1293,7 @@ __do_page_fault(struct pt_regs *regs, unsigned long error_code) +@@ -1110,7 +1334,7 @@ __do_page_fault(struct pt_regs *regs, unsigned long error_code) * User-mode registers count as a user access even for any * potential system fault or CPU buglet: */ @@ -30356,7 +31066,7 @@ index 3aaeffc..42ea9fb 100644 local_irq_enable(); error_code |= PF_USER; flags |= FAULT_FLAG_USER; -@@ -1135,6 +1359,11 @@ retry: +@@ -1157,6 +1381,11 @@ retry: might_sleep(); } @@ -30368,7 +31078,7 @@ index 3aaeffc..42ea9fb 100644 vma = find_vma(mm, address); if (unlikely(!vma)) { bad_area(regs, error_code, address); -@@ -1146,18 +1375,24 @@ retry: +@@ -1168,18 +1397,24 @@ retry: bad_area(regs, error_code, address); return; } @@ -30404,7 +31114,7 @@ index 3aaeffc..42ea9fb 100644 if (unlikely(expand_stack(vma, address))) { bad_area(regs, error_code, address); return; -@@ -1231,3 +1466,292 @@ do_page_fault(struct pt_regs *regs, unsigned long error_code) +@@ -1273,3 +1508,292 @@ trace_do_page_fault(struct pt_regs *regs, unsigned long error_code) __do_page_fault(regs, error_code); exception_exit(prev_state); } @@ -30698,10 +31408,10 @@ index 3aaeffc..42ea9fb 100644 + return ret ? -EFAULT : 0; +} diff --git a/arch/x86/mm/gup.c b/arch/x86/mm/gup.c -index dd74e46..7d26398 100644 +index 0596e8e..9de0b1c 100644 --- a/arch/x86/mm/gup.c +++ b/arch/x86/mm/gup.c -@@ -255,7 +255,7 @@ int __get_user_pages_fast(unsigned long start, int nr_pages, int write, +@@ -268,7 +268,7 @@ int __get_user_pages_fast(unsigned long start, int nr_pages, int write, addr = start; len = (unsigned long) nr_pages << PAGE_SHIFT; end = start + len; @@ -30710,6 +31420,17 @@ index dd74e46..7d26398 100644 (void __user *)start, len))) return 0; +@@ -344,6 +344,10 @@ int get_user_pages_fast(unsigned long start, int nr_pages, int write, + goto slow_irqon; + #endif + ++ if (unlikely(!__access_ok(write ? VERIFY_WRITE : VERIFY_READ, ++ (void __user *)start, len))) ++ return 0; ++ + /* + * XXX: batch / limit 'nr', to avoid large irq off latency + * needs some instrumenting to determine the common sizes used by diff --git a/arch/x86/mm/highmem_32.c b/arch/x86/mm/highmem_32.c index 4500142..53a363c 100644 --- a/arch/x86/mm/highmem_32.c @@ -30835,7 +31556,7 @@ index 9d980d8..6bbfacb 100644 #endif /*HAVE_ARCH_HUGETLB_UNMAPPED_AREA*/ diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c -index 04664cd..dae6e5d 100644 +index f971306..e83e0f6 100644 --- a/arch/x86/mm/init.c +++ b/arch/x86/mm/init.c @@ -4,6 +4,7 @@ @@ -30855,7 +31576,7 @@ index 04664cd..dae6e5d 100644 #include "mm_internal.h" -@@ -465,7 +468,18 @@ void __init init_mem_mapping(void) +@@ -563,7 +566,18 @@ void __init init_mem_mapping(void) early_ioremap_page_table_range_init(); #endif @@ -30874,7 +31595,7 @@ index 04664cd..dae6e5d 100644 __flush_tlb_all(); early_memtest(0, max_pfn_mapped << PAGE_SHIFT); -@@ -481,10 +495,40 @@ void __init init_mem_mapping(void) +@@ -579,10 +593,40 @@ void __init init_mem_mapping(void) * Access has to be given to non-kernel-ram areas as well, these contain the PCI * mmio resources as well as potential bios/acpi data regions. */ @@ -30916,7 +31637,7 @@ index 04664cd..dae6e5d 100644 if (iomem_is_exclusive(pagenr << PAGE_SHIFT)) return 0; if (!page_is_ram(pagenr)) -@@ -530,8 +574,117 @@ void free_init_pages(char *what, unsigned long begin, unsigned long end) +@@ -628,8 +672,117 @@ void free_init_pages(char *what, unsigned long begin, unsigned long end) #endif } @@ -31652,7 +32373,7 @@ index 0057a7a..95c7edd 100644 might_sleep(); if (is_enabled()) /* recheck and proper locking in *_core() */ diff --git a/arch/x86/mm/numa.c b/arch/x86/mm/numa.c -index 8bf93ba..dbcd670 100644 +index 24aec58..c39fe8b 100644 --- a/arch/x86/mm/numa.c +++ b/arch/x86/mm/numa.c @@ -474,7 +474,7 @@ static bool __init numa_meminfo_cover_memory(const struct numa_meminfo *mi) @@ -31879,10 +32600,10 @@ index 9f0614d..92ae64a 100644 p += get_opcode(p, &opcode); for (i = 0; i < ARRAY_SIZE(imm_wop); i++) diff --git a/arch/x86/mm/pgtable.c b/arch/x86/mm/pgtable.c -index dfa537a..fd45c64 100644 +index c96314a..433b127 100644 --- a/arch/x86/mm/pgtable.c +++ b/arch/x86/mm/pgtable.c -@@ -91,10 +91,67 @@ static inline void pgd_list_del(pgd_t *pgd) +@@ -97,10 +97,71 @@ static inline void pgd_list_del(pgd_t *pgd) list_del(&page->lru); } @@ -31931,6 +32652,8 @@ index dfa537a..fd45c64 100644 +#define pxd_t pud_t +#define pyd_t pgd_t +#define paravirt_release_pxd(pfn) paravirt_release_pud(pfn) ++#define pgtable_pxd_page_ctor(page) true ++#define pgtable_pxd_page_dtor(page) +#define pxd_free(mm, pud) pud_free((mm), (pud)) +#define pyd_populate(mm, pgd, pud) pgd_populate((mm), (pgd), (pud)) +#define pyd_offset(mm, address) pgd_offset((mm), (address)) @@ -31939,6 +32662,8 @@ index dfa537a..fd45c64 100644 +#define pxd_t pmd_t +#define pyd_t pud_t +#define paravirt_release_pxd(pfn) paravirt_release_pmd(pfn) ++#define pgtable_pxd_page_ctor(page) pgtable_pmd_page_ctor(page) ++#define pgtable_pxd_page_dtor(page) pgtable_pmd_page_dtor(page) +#define pxd_free(mm, pud) pmd_free((mm), (pud)) +#define pyd_populate(mm, pgd, pud) pud_populate((mm), (pgd), (pud)) +#define pyd_offset(mm, address) pud_offset((mm), (address)) @@ -31952,7 +32677,7 @@ index dfa537a..fd45c64 100644 static void pgd_set_mm(pgd_t *pgd, struct mm_struct *mm) { BUILD_BUG_ON(sizeof(virt_to_page(pgd)->index) < sizeof(mm)); -@@ -135,6 +192,7 @@ static void pgd_dtor(pgd_t *pgd) +@@ -141,6 +202,7 @@ static void pgd_dtor(pgd_t *pgd) pgd_list_del(pgd); spin_unlock(&pgd_lock); } @@ -31960,7 +32685,7 @@ index dfa537a..fd45c64 100644 /* * List of all pgd's needed for non-PAE so it can invalidate entries -@@ -147,7 +205,7 @@ static void pgd_dtor(pgd_t *pgd) +@@ -153,7 +215,7 @@ static void pgd_dtor(pgd_t *pgd) * -- nyc */ @@ -31969,7 +32694,7 @@ index dfa537a..fd45c64 100644 /* * In PAE mode, we need to do a cr3 reload (=tlb flush) when * updating the top-level pagetable entries to guarantee the -@@ -159,7 +217,7 @@ static void pgd_dtor(pgd_t *pgd) +@@ -165,7 +227,7 @@ static void pgd_dtor(pgd_t *pgd) * not shared between pagetables (!SHARED_KERNEL_PMDS), we allocate * and initialize the kernel pmds here. */ @@ -31978,7 +32703,7 @@ index dfa537a..fd45c64 100644 void pud_populate(struct mm_struct *mm, pud_t *pudp, pmd_t *pmd) { -@@ -177,36 +235,38 @@ void pud_populate(struct mm_struct *mm, pud_t *pudp, pmd_t *pmd) +@@ -183,43 +245,45 @@ void pud_populate(struct mm_struct *mm, pud_t *pudp, pmd_t *pmd) */ flush_tlb_mm(mm); } @@ -31998,11 +32723,14 @@ index dfa537a..fd45c64 100644 int i; - for(i = 0; i < PREALLOCATED_PMDS; i++) -- if (pmds[i]) +- if (pmds[i]) { +- pgtable_pmd_page_dtor(virt_to_page(pmds[i])); - free_page((unsigned long)pmds[i]); + for(i = 0; i < PREALLOCATED_PXDS; i++) -+ if (pxds[i]) ++ if (pxds[i]) { ++ pgtable_pxd_page_dtor(virt_to_page(pxds[i])); + free_page((unsigned long)pxds[i]); + } } -static int preallocate_pmds(pmd_t *pmds[]) @@ -32013,11 +32741,19 @@ index dfa537a..fd45c64 100644 - for(i = 0; i < PREALLOCATED_PMDS; i++) { - pmd_t *pmd = (pmd_t *)__get_free_page(PGALLOC_GFP); -- if (pmd == NULL) +- if (!pmd) + for(i = 0; i < PREALLOCATED_PXDS; i++) { + pxd_t *pxd = (pxd_t *)__get_free_page(PGALLOC_GFP); -+ if (pxd == NULL) ++ if (!pxd) + failed = true; +- if (pmd && !pgtable_pmd_page_ctor(virt_to_page(pmd))) { +- free_page((unsigned long)pmd); +- pmd = NULL; ++ if (pxd && !pgtable_pxd_page_ctor(virt_to_page(pxd))) { ++ free_page((unsigned long)pxd); ++ pxd = NULL; failed = true; + } - pmds[i] = pmd; + pxds[i] = pxd; } @@ -32028,7 +32764,7 @@ index dfa537a..fd45c64 100644 return -ENOMEM; } -@@ -219,49 +279,52 @@ static int preallocate_pmds(pmd_t *pmds[]) +@@ -232,49 +296,52 @@ static int preallocate_pmds(pmd_t *pmds[]) * preallocate which never got a corresponding vma will need to be * freed manually. */ @@ -32098,7 +32834,7 @@ index dfa537a..fd45c64 100644 pgd = (pgd_t *)__get_free_page(PGALLOC_GFP); -@@ -270,11 +333,11 @@ pgd_t *pgd_alloc(struct mm_struct *mm) +@@ -283,11 +350,11 @@ pgd_t *pgd_alloc(struct mm_struct *mm) mm->pgd = pgd; @@ -32112,7 +32848,7 @@ index dfa537a..fd45c64 100644 /* * Make sure that pre-populating the pmds is atomic with -@@ -284,14 +347,14 @@ pgd_t *pgd_alloc(struct mm_struct *mm) +@@ -297,14 +364,14 @@ pgd_t *pgd_alloc(struct mm_struct *mm) spin_lock(&pgd_lock); pgd_ctor(mm, pgd); @@ -32130,7 +32866,7 @@ index dfa537a..fd45c64 100644 out_free_pgd: free_page((unsigned long)pgd); out: -@@ -300,7 +363,7 @@ out: +@@ -313,7 +380,7 @@ out: void pgd_free(struct mm_struct *mm, pgd_t *pgd) { @@ -32385,7 +33121,7 @@ index 877b9a1..a8ecf42 100644 + pax_force_retaddr ret diff --git a/arch/x86/net/bpf_jit_comp.c b/arch/x86/net/bpf_jit_comp.c -index 26328e8..5f96c25 100644 +index 4ed75dd..8dfe0d5 100644 --- a/arch/x86/net/bpf_jit_comp.c +++ b/arch/x86/net/bpf_jit_comp.c @@ -50,13 +50,90 @@ static inline u8 *emit_code(u8 *ptr, u32 bytes, unsigned int len) @@ -32615,9 +33351,9 @@ index 26328e8..5f96c25 100644 break; case BPF_S_ALU_DIV_X: /* A /= X; */ seen |= SEEN_XREG; -@@ -360,13 +457,23 @@ void bpf_jit_compile(struct sk_filter *fp) - break; - case BPF_S_ALU_MOD_K: /* A %= K; */ +@@ -364,7 +461,11 @@ void bpf_jit_compile(struct sk_filter *fp) + break; + } EMIT2(0x31, 0xd2); /* xor %edx,%edx */ +#ifdef CONFIG_GRKERNSEC_JIT_HARDEN + DILUTE_CONST_SEQUENCE(K, randkey); @@ -32627,19 +33363,19 @@ index 26328e8..5f96c25 100644 EMIT2(0xf7, 0xf1); /* div %ecx */ EMIT2(0x89, 0xd0); /* mov %edx,%eax */ break; - case BPF_S_ALU_DIV_K: /* A = reciprocal_divide(A, K); */ +@@ -372,7 +473,11 @@ void bpf_jit_compile(struct sk_filter *fp) + if (K == 1) + break; + EMIT2(0x31, 0xd2); /* xor %edx,%edx */ +#ifdef CONFIG_GRKERNSEC_JIT_HARDEN + DILUTE_CONST_SEQUENCE(K, randkey); -+ // imul rax, rcx -+ EMIT4(0x48, 0x0f, 0xaf, 0xc1); +#else - EMIT3(0x48, 0x69, 0xc0); /* imul imm32,%rax,%rax */ - EMIT(K, 4); + EMIT1(0xb9);EMIT(K, 4); /* mov imm32,%ecx */ +#endif - EMIT4(0x48, 0xc1, 0xe8, 0x20); /* shr $0x20,%rax */ + EMIT2(0xf7, 0xf1); /* div %ecx */ break; case BPF_S_ALU_AND_X: -@@ -637,8 +744,7 @@ common_load_ind: seen |= SEEN_DATAREF | SEEN_XREG; +@@ -643,8 +748,7 @@ common_load_ind: seen |= SEEN_DATAREF | SEEN_XREG; if (is_imm8(K)) { EMIT3(0x8d, 0x73, K); /* lea imm8(%rbx), %esi */ } else { @@ -32649,7 +33385,7 @@ index 26328e8..5f96c25 100644 } } else { EMIT2(0x89,0xde); /* mov %ebx,%esi */ -@@ -728,10 +834,12 @@ cond_branch: f_offset = addrs[i + filter[i].jf] - addrs[i]; +@@ -734,10 +838,12 @@ cond_branch: f_offset = addrs[i + filter[i].jf] - addrs[i]; if (unlikely(proglen + ilen > oldproglen)) { pr_err("bpb_jit_compile fatal error\n"); kfree(addrs); @@ -32663,7 +33399,7 @@ index 26328e8..5f96c25 100644 } proglen += ilen; addrs[i] = proglen; -@@ -764,7 +872,6 @@ cond_branch: f_offset = addrs[i + filter[i].jf] - addrs[i]; +@@ -770,7 +876,6 @@ cond_branch: f_offset = addrs[i + filter[i].jf] - addrs[i]; if (image) { bpf_flush_icache(header, image + proglen); @@ -32671,7 +33407,7 @@ index 26328e8..5f96c25 100644 fp->bpf_func = (void *)image; } out: -@@ -776,10 +883,9 @@ static void bpf_jit_free_deferred(struct work_struct *work) +@@ -782,10 +887,9 @@ static void bpf_jit_free_deferred(struct work_struct *work) { struct sk_filter *fp = container_of(work, struct sk_filter, work); unsigned long addr = (unsigned long)fp->bpf_func & PAGE_MASK; @@ -32685,7 +33421,7 @@ index 26328e8..5f96c25 100644 } diff --git a/arch/x86/oprofile/backtrace.c b/arch/x86/oprofile/backtrace.c -index d6aa6e8..266395a 100644 +index 5d04be5..2beeaa2 100644 --- a/arch/x86/oprofile/backtrace.c +++ b/arch/x86/oprofile/backtrace.c @@ -46,11 +46,11 @@ dump_user_backtrace_32(struct stack_frame_ia32 *head) @@ -32694,7 +33430,7 @@ index d6aa6e8..266395a 100644 - bytes = copy_from_user_nmi(bufhead, head, sizeof(bufhead)); + bytes = copy_from_user_nmi(bufhead, (const char __force_user *)head, sizeof(bufhead)); - if (bytes != sizeof(bufhead)) + if (bytes != 0) return NULL; - fp = (struct stack_frame_ia32 *) compat_ptr(bufhead[0].next_frame); @@ -32708,7 +33444,7 @@ index d6aa6e8..266395a 100644 - bytes = copy_from_user_nmi(bufhead, head, sizeof(bufhead)); + bytes = copy_from_user_nmi(bufhead, (const char __force_user *)head, sizeof(bufhead)); - if (bytes != sizeof(bufhead)) + if (bytes != 0) return NULL; @@ -111,7 +111,7 @@ x86_backtrace(struct pt_regs * const regs, unsigned int depth) @@ -32803,6 +33539,19 @@ index 71e8a67..6a313bb 100644 struct op_counter_config; +diff --git a/arch/x86/pci/intel_mid_pci.c b/arch/x86/pci/intel_mid_pci.c +index 51384ca..a25f51e 100644 +--- a/arch/x86/pci/intel_mid_pci.c ++++ b/arch/x86/pci/intel_mid_pci.c +@@ -241,7 +241,7 @@ int __init intel_mid_pci_init(void) + pr_info("Intel MID platform detected, using MID PCI ops\n"); + pci_mmcfg_late_init(); + pcibios_enable_irq = intel_mid_pci_irq_enable; +- pci_root_ops = intel_mid_pci_ops; ++ memcpy((void *)&pci_root_ops, &intel_mid_pci_ops, sizeof pci_root_ops); + pci_soc_mode = 1; + /* Continue with standard init */ + return 1; diff --git a/arch/x86/pci/irq.c b/arch/x86/pci/irq.c index 372e9b8..e775a6c 100644 --- a/arch/x86/pci/irq.c @@ -32843,21 +33592,6 @@ index 372e9b8..e775a6c 100644 { .callback = fix_broken_hp_bios_irq9, .ident = "HP Pavilion N5400 Series Laptop", -diff --git a/arch/x86/pci/mrst.c b/arch/x86/pci/mrst.c -index 903fded..94b0d88 100644 ---- a/arch/x86/pci/mrst.c -+++ b/arch/x86/pci/mrst.c -@@ -241,7 +241,9 @@ int __init pci_mrst_init(void) - pr_info("Intel MID platform detected, using MID PCI ops\n"); - pci_mmcfg_late_init(); - pcibios_enable_irq = mrst_pci_irq_enable; -- pci_root_ops = pci_mrst_ops; -+ pax_open_kernel(); -+ memcpy((void *)&pci_root_ops, &pci_mrst_ops, sizeof(pci_mrst_ops)); -+ pax_close_kernel(); - pci_soc_mode = 1; - /* Continue with standard init */ - return 1; diff --git a/arch/x86/pci/pcbios.c b/arch/x86/pci/pcbios.c index c77b24a..c979855 100644 --- a/arch/x86/pci/pcbios.c @@ -33436,28 +34170,22 @@ index 4c07cca..2c8427d 100644 + pax_force_retaddr 0, 1 ret ENDPROC(efi_call6) -diff --git a/arch/x86/platform/mrst/mrst.c b/arch/x86/platform/mrst/mrst.c -index 3ca5957..7909c18 100644 ---- a/arch/x86/platform/mrst/mrst.c -+++ b/arch/x86/platform/mrst/mrst.c -@@ -78,13 +78,15 @@ struct sfi_rtc_table_entry sfi_mrtc_array[SFI_MRTC_MAX]; - EXPORT_SYMBOL_GPL(sfi_mrtc_array); - int sfi_mrtc_num; - --static void mrst_power_off(void) -+static __noreturn void mrst_power_off(void) +diff --git a/arch/x86/platform/intel-mid/intel-mid.c b/arch/x86/platform/intel-mid/intel-mid.c +index f90e290..435f0dd 100644 +--- a/arch/x86/platform/intel-mid/intel-mid.c ++++ b/arch/x86/platform/intel-mid/intel-mid.c +@@ -65,9 +65,10 @@ static void intel_mid_power_off(void) { -+ BUG(); } --static void mrst_reboot(void) -+static __noreturn void mrst_reboot(void) +-static void intel_mid_reboot(void) ++static void __noreturn intel_mid_reboot(void) { intel_scu_ipc_simple_command(IPCMSG_COLD_BOOT, 0); + BUG(); } - /* parse all the mtimer info to a static mtimer array */ + static unsigned long __init intel_mid_calibrate_tsc(void) diff --git a/arch/x86/platform/olpc/olpc_dt.c b/arch/x86/platform/olpc/olpc_dt.c index d6ee929..3637cb5 100644 --- a/arch/x86/platform/olpc/olpc_dt.c @@ -33529,11 +34257,11 @@ index a44f457..9140171 100644 #endif } diff --git a/arch/x86/realmode/rm/Makefile b/arch/x86/realmode/rm/Makefile -index 8869287..d577672 100644 +index 9cac825..4890b25 100644 --- a/arch/x86/realmode/rm/Makefile +++ b/arch/x86/realmode/rm/Makefile -@@ -78,5 +78,8 @@ KBUILD_CFLAGS := $(LINUXINCLUDE) -m32 -g -Os -D_SETUP -D__KERNEL__ -D_WAKEUP \ - $(call cc-option, -fno-unit-at-a-time)) \ +@@ -79,5 +79,8 @@ KBUILD_CFLAGS := $(LINUXINCLUDE) -m32 -g -Os -D_SETUP -D__KERNEL__ -D_WAKEUP \ + $(call cc-option, -fno-unit-at-a-time)) \ $(call cc-option, -fno-stack-protector) \ $(call cc-option, -mpreferred-stack-boundary=2) +ifdef CONSTIFY_PLUGIN @@ -34157,7 +34885,7 @@ index fa6ade7..73da73a5 100644 #ifdef CONFIG_ACPI_NUMA diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c -index fdc3ba2..23cae00 100644 +index ce563be..7327d91 100644 --- a/arch/x86/xen/mmu.c +++ b/arch/x86/xen/mmu.c @@ -379,7 +379,7 @@ static pteval_t pte_mfn_to_pfn(pteval_t val) @@ -34209,7 +34937,7 @@ index fdc3ba2..23cae00 100644 .alloc_pud = xen_alloc_pmd_init, .release_pud = xen_release_pmd_init, diff --git a/arch/x86/xen/smp.c b/arch/x86/xen/smp.c -index 31d0475..51af671 100644 +index c36b325..b0f1518 100644 --- a/arch/x86/xen/smp.c +++ b/arch/x86/xen/smp.c @@ -274,17 +274,13 @@ static void __init xen_smp_prepare_boot_cpu(void) @@ -34421,7 +35149,7 @@ index 4e491d9..c8e18e4 100644 spin_lock_init(&blkcg->lock); INIT_RADIX_TREE(&blkcg->blkg_tree, GFP_ATOMIC); diff --git a/block/blk-iopoll.c b/block/blk-iopoll.c -index 4b8d9b54..a7178c0 100644 +index 1855bf5..af12b06 100644 --- a/block/blk-iopoll.c +++ b/block/blk-iopoll.c @@ -77,7 +77,7 @@ void blk_iopoll_complete(struct blk_iopoll *iopoll) @@ -34431,7 +35159,7 @@ index 4b8d9b54..a7178c0 100644 -static void blk_iopoll_softirq(struct softirq_action *h) +static __latent_entropy void blk_iopoll_softirq(void) { - struct list_head *list = &__get_cpu_var(blk_cpu_iopoll); + struct list_head *list = this_cpu_ptr(&blk_cpu_iopoll); int rearm = 0, budget = blk_iopoll_budget; diff --git a/block/blk-map.c b/block/blk-map.c index 623e1cd..ca1e109 100644 @@ -34447,7 +35175,7 @@ index 623e1cd..ca1e109 100644 bio = bio_copy_kern(q, kbuf, len, gfp_mask, reading); else diff --git a/block/blk-softirq.c b/block/blk-softirq.c -index ec9e606..3f38839 100644 +index 57790c1..5e988dd 100644 --- a/block/blk-softirq.c +++ b/block/blk-softirq.c @@ -18,7 +18,7 @@ static DEFINE_PER_CPU(struct list_head, blk_cpu_done); @@ -34491,9 +35219,18 @@ index 420a5a9..23834aa 100644 if (blk_verify_command(rq->cmd, has_write_perm)) return -EPERM; diff --git a/block/compat_ioctl.c b/block/compat_ioctl.c -index fbd5a67..5d631b5 100644 +index fbd5a67..f24fd95 100644 --- a/block/compat_ioctl.c +++ b/block/compat_ioctl.c +@@ -156,7 +156,7 @@ static int compat_cdrom_generic_command(struct block_device *bdev, fmode_t mode, + cgc = compat_alloc_user_space(sizeof(*cgc)); + cgc32 = compat_ptr(arg); + +- if (copy_in_user(&cgc->cmd, &cgc32->cmd, sizeof(cgc->cmd)) || ++ if (copy_in_user(cgc->cmd, cgc32->cmd, sizeof(cgc->cmd)) || + get_user(data, &cgc32->buffer) || + put_user(compat_ptr(data), &cgc->buffer) || + copy_in_user(&cgc->buflen, &cgc32->buflen, @@ -341,7 +341,7 @@ static int compat_fd_ioctl(struct block_device *bdev, fmode_t mode, err |= __get_user(f->spec1, &uf->spec1); err |= __get_user(f->fmt_gap, &uf->fmt_gap); @@ -34536,10 +35273,10 @@ index 791f419..89f21c4 100644 EXPORT_SYMBOL(blk_unregister_region); diff --git a/block/partitions/efi.c b/block/partitions/efi.c -index a8287b4..241a48e 100644 +index dc51f46..d5446a8 100644 --- a/block/partitions/efi.c +++ b/block/partitions/efi.c -@@ -292,14 +292,14 @@ static gpt_entry *alloc_read_gpt_entries(struct parsed_partitions *state, +@@ -293,14 +293,14 @@ static gpt_entry *alloc_read_gpt_entries(struct parsed_partitions *state, if (!gpt) return NULL; @@ -34561,7 +35298,7 @@ index a8287b4..241a48e 100644 (u8 *) pte, count) < count) { kfree(pte); diff --git a/block/scsi_ioctl.c b/block/scsi_ioctl.c -index a5ffcc9..e057498 100644 +index 625e3e4..b5339f9 100644 --- a/block/scsi_ioctl.c +++ b/block/scsi_ioctl.c @@ -67,7 +67,7 @@ static int scsi_get_bus(struct request_queue *q, int __user *p) @@ -34595,7 +35332,7 @@ index a5ffcc9..e057498 100644 if (blk_verify_command(rq->cmd, mode & FMODE_WRITE)) return -EPERM; -@@ -434,6 +446,8 @@ int sg_scsi_ioctl(struct request_queue *q, struct gendisk *disk, fmode_t mode, +@@ -415,6 +427,8 @@ int sg_scsi_ioctl(struct request_queue *q, struct gendisk *disk, fmode_t mode, int err; unsigned int in_len, out_len, bytes, opcode, cmdlen; char *buffer = NULL, sense[SCSI_SENSE_BUFFERSIZE]; @@ -34604,7 +35341,7 @@ index a5ffcc9..e057498 100644 if (!sic) return -EINVAL; -@@ -467,9 +481,18 @@ int sg_scsi_ioctl(struct request_queue *q, struct gendisk *disk, fmode_t mode, +@@ -448,9 +462,18 @@ int sg_scsi_ioctl(struct request_queue *q, struct gendisk *disk, fmode_t mode, */ err = -EFAULT; rq->cmd_len = cmdlen; @@ -34659,8 +35396,30 @@ index f8c920c..ab2cb5a 100644 if (!ret) kobject_uevent(&pinst->kobj, KOBJ_ADD); +diff --git a/drivers/acpi/acpica/hwxfsleep.c b/drivers/acpi/acpica/hwxfsleep.c +index 15dddc1..b61cf0c 100644 +--- a/drivers/acpi/acpica/hwxfsleep.c ++++ b/drivers/acpi/acpica/hwxfsleep.c +@@ -63,11 +63,12 @@ static acpi_status acpi_hw_sleep_dispatch(u8 sleep_state, u32 function_id); + /* Legacy functions are optional, based upon ACPI_REDUCED_HARDWARE */ + + static struct acpi_sleep_functions acpi_sleep_dispatch[] = { +- {ACPI_HW_OPTIONAL_FUNCTION(acpi_hw_legacy_sleep), +- acpi_hw_extended_sleep}, +- {ACPI_HW_OPTIONAL_FUNCTION(acpi_hw_legacy_wake_prep), +- acpi_hw_extended_wake_prep}, +- {ACPI_HW_OPTIONAL_FUNCTION(acpi_hw_legacy_wake), acpi_hw_extended_wake} ++ {.legacy_function = ACPI_HW_OPTIONAL_FUNCTION(acpi_hw_legacy_sleep), ++ .extended_function = acpi_hw_extended_sleep}, ++ {.legacy_function = ACPI_HW_OPTIONAL_FUNCTION(acpi_hw_legacy_wake_prep), ++ .extended_function = acpi_hw_extended_wake_prep}, ++ {.legacy_function = ACPI_HW_OPTIONAL_FUNCTION(acpi_hw_legacy_wake), ++ .extended_function = acpi_hw_extended_wake} + }; + + /* diff --git a/drivers/acpi/apei/apei-internal.h b/drivers/acpi/apei/apei-internal.h -index f220d64..d359ad6 100644 +index 21ba34a..cb05966 100644 --- a/drivers/acpi/apei/apei-internal.h +++ b/drivers/acpi/apei/apei-internal.h @@ -20,7 +20,7 @@ typedef int (*apei_exec_ins_func_t)(struct apei_exec_context *ctx, @@ -34672,34 +35431,13 @@ index f220d64..d359ad6 100644 struct apei_exec_context { u32 ip; -diff --git a/drivers/acpi/apei/cper.c b/drivers/acpi/apei/cper.c -index 33dc6a0..4b24b47 100644 ---- a/drivers/acpi/apei/cper.c -+++ b/drivers/acpi/apei/cper.c -@@ -39,12 +39,12 @@ - */ - u64 cper_next_record_id(void) - { -- static atomic64_t seq; -+ static atomic64_unchecked_t seq; - -- if (!atomic64_read(&seq)) -- atomic64_set(&seq, ((u64)get_seconds()) << 32); -+ if (!atomic64_read_unchecked(&seq)) -+ atomic64_set_unchecked(&seq, ((u64)get_seconds()) << 32); - -- return atomic64_inc_return(&seq); -+ return atomic64_inc_return_unchecked(&seq); - } - EXPORT_SYMBOL_GPL(cper_next_record_id); - diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c -index 8ec37bb..b0716e5 100644 +index a30bc31..b91c4d5 100644 --- a/drivers/acpi/apei/ghes.c +++ b/drivers/acpi/apei/ghes.c @@ -498,7 +498,7 @@ static void __ghes_print_estatus(const char *pfx, const struct acpi_hest_generic *generic, - const struct acpi_hest_generic_status *estatus) + const struct acpi_generic_status *estatus) { - static atomic_t seqno; + static atomic_unchecked_t seqno; @@ -34733,7 +35471,7 @@ index a83e3c6..c3d617f 100644 bgrt_kobj = kobject_create_and_add("bgrt", acpi_kobj); if (!bgrt_kobj) diff --git a/drivers/acpi/blacklist.c b/drivers/acpi/blacklist.c -index 9515f18..4b149c9 100644 +index 078c4f7..410e272 100644 --- a/drivers/acpi/blacklist.c +++ b/drivers/acpi/blacklist.c @@ -52,7 +52,7 @@ struct acpi_blacklist_item { @@ -34745,7 +35483,7 @@ index 9515f18..4b149c9 100644 /* * POLICY: If *anything* doesn't work, put it on the blacklist. -@@ -199,7 +199,7 @@ static int __init dmi_disable_osi_win8(const struct dmi_system_id *d) +@@ -164,7 +164,7 @@ static int __init dmi_disable_osi_win8(const struct dmi_system_id *d) return 0; } @@ -34754,11 +35492,26 @@ index 9515f18..4b149c9 100644 { .callback = dmi_disable_osi_vista, .ident = "Fujitsu Siemens", +diff --git a/drivers/acpi/custom_method.c b/drivers/acpi/custom_method.c +index 12b62f2..dc2aac8 100644 +--- a/drivers/acpi/custom_method.c ++++ b/drivers/acpi/custom_method.c +@@ -29,6 +29,10 @@ static ssize_t cm_write(struct file *file, const char __user * user_buf, + struct acpi_table_header table; + acpi_status status; + ++#ifdef CONFIG_GRKERNSEC_KMEM ++ return -EPERM; ++#endif ++ + if (!(*ppos)) { + /* parse the table header to get the table length */ + if (count <= sizeof(struct acpi_table_header)) diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c -index c7414a5..d5afd71 100644 +index 644516d..643937e 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c -@@ -966,7 +966,7 @@ static int acpi_processor_setup_cpuidle_states(struct acpi_processor *pr) +@@ -963,7 +963,7 @@ static int acpi_processor_setup_cpuidle_states(struct acpi_processor *pr) { int i, count = CPUIDLE_DRIVER_STATE_START; struct acpi_processor_cx *cx; @@ -34768,10 +35521,10 @@ index c7414a5..d5afd71 100644 if (!pr->flags.power_setup_done) diff --git a/drivers/acpi/sysfs.c b/drivers/acpi/sysfs.c -index 05306a5..733d1f0 100644 +index 6dbc3ca..b8b59a0 100644 --- a/drivers/acpi/sysfs.c +++ b/drivers/acpi/sysfs.c -@@ -423,11 +423,11 @@ static u32 num_counters; +@@ -425,11 +425,11 @@ static u32 num_counters; static struct attribute **all_attrs; static u32 acpi_gpe_count; @@ -34786,7 +35539,7 @@ index 05306a5..733d1f0 100644 static void delete_gpe_attr_array(void) { diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c -index cfb7447..98f2149 100644 +index c482f8c..c832240 100644 --- a/drivers/ata/libahci.c +++ b/drivers/ata/libahci.c @@ -1239,7 +1239,7 @@ int ahci_kick_engine(struct ata_port *ap) @@ -34799,7 +35552,7 @@ index cfb7447..98f2149 100644 unsigned long timeout_msec) { diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c -index 81a94a3..b711c74 100644 +index 1a3dbd1..dfc6e5c 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -98,7 +98,7 @@ static unsigned int ata_dev_set_xfermode(struct ata_device *dev); @@ -34811,7 +35564,7 @@ index 81a94a3..b711c74 100644 struct ata_force_param { const char *name; -@@ -4809,7 +4809,7 @@ void ata_qc_free(struct ata_queued_cmd *qc) +@@ -4850,7 +4850,7 @@ void ata_qc_free(struct ata_queued_cmd *qc) struct ata_port *ap; unsigned int tag; @@ -34820,7 +35573,7 @@ index 81a94a3..b711c74 100644 ap = qc->ap; qc->flags = 0; -@@ -4825,7 +4825,7 @@ void __ata_qc_complete(struct ata_queued_cmd *qc) +@@ -4866,7 +4866,7 @@ void __ata_qc_complete(struct ata_queued_cmd *qc) struct ata_port *ap; struct ata_link *link; @@ -34829,7 +35582,7 @@ index 81a94a3..b711c74 100644 WARN_ON_ONCE(!(qc->flags & ATA_QCFLAG_ACTIVE)); ap = qc->ap; link = qc->dev->link; -@@ -5944,6 +5944,7 @@ static void ata_finalize_port_ops(struct ata_port_operations *ops) +@@ -5985,6 +5985,7 @@ static void ata_finalize_port_ops(struct ata_port_operations *ops) return; spin_lock(&lock); @@ -34837,7 +35590,7 @@ index 81a94a3..b711c74 100644 for (cur = ops->inherits; cur; cur = cur->inherits) { void **inherit = (void **)cur; -@@ -5957,8 +5958,9 @@ static void ata_finalize_port_ops(struct ata_port_operations *ops) +@@ -5998,8 +5999,9 @@ static void ata_finalize_port_ops(struct ata_port_operations *ops) if (IS_ERR(*pp)) *pp = NULL; @@ -34848,7 +35601,7 @@ index 81a94a3..b711c74 100644 spin_unlock(&lock); } -@@ -6151,7 +6153,7 @@ int ata_host_register(struct ata_host *host, struct scsi_host_template *sht) +@@ -6192,7 +6194,7 @@ int ata_host_register(struct ata_host *host, struct scsi_host_template *sht) /* give ports names and add SCSI hosts */ for (i = 0; i < host->n_ports; i++) { @@ -34858,10 +35611,10 @@ index 81a94a3..b711c74 100644 } diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c -index db6dfcf..770d1f0 100644 +index ef8567d..8bdbd03 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c -@@ -4113,7 +4113,7 @@ int ata_sas_port_init(struct ata_port *ap) +@@ -4147,7 +4147,7 @@ int ata_sas_port_init(struct ata_port *ap) if (rc) return rc; @@ -34884,7 +35637,7 @@ index 45b5ab3..98446b8 100644 extern int libata_fua; extern int libata_noacpi; diff --git a/drivers/ata/pata_arasan_cf.c b/drivers/ata/pata_arasan_cf.c -index 853f610..97d24da 100644 +index 73492dd..ca2bff5 100644 --- a/drivers/ata/pata_arasan_cf.c +++ b/drivers/ata/pata_arasan_cf.c @@ -865,7 +865,9 @@ static int arasan_cf_probe(struct platform_device *pdev) @@ -35895,10 +36648,10 @@ index 969c3c2..9b72956 100644 } diff --git a/drivers/base/bus.c b/drivers/base/bus.c -index 4c289ab..de1c333 100644 +index 73f6c29..b0c0e13 100644 --- a/drivers/base/bus.c +++ b/drivers/base/bus.c -@@ -1193,7 +1193,7 @@ int subsys_interface_register(struct subsys_interface *sif) +@@ -1115,7 +1115,7 @@ int subsys_interface_register(struct subsys_interface *sif) return -EINVAL; mutex_lock(&subsys->p->mutex); @@ -35907,7 +36660,7 @@ index 4c289ab..de1c333 100644 if (sif->add_dev) { subsys_dev_iter_init(&iter, subsys, NULL, NULL); while ((dev = subsys_dev_iter_next(&iter))) -@@ -1218,7 +1218,7 @@ void subsys_interface_unregister(struct subsys_interface *sif) +@@ -1140,7 +1140,7 @@ void subsys_interface_unregister(struct subsys_interface *sif) subsys = sif->subsys; mutex_lock(&subsys->p->mutex); @@ -35917,7 +36670,7 @@ index 4c289ab..de1c333 100644 subsys_dev_iter_init(&iter, subsys, NULL, NULL); while ((dev = subsys_dev_iter_next(&iter))) diff --git a/drivers/base/devtmpfs.c b/drivers/base/devtmpfs.c -index 7413d06..79155fa 100644 +index 0f38201..6c2b444 100644 --- a/drivers/base/devtmpfs.c +++ b/drivers/base/devtmpfs.c @@ -354,7 +354,7 @@ int devtmpfs_mount(const char *mntdir) @@ -36054,7 +36807,7 @@ index e8d11b6..7b1b36f 100644 } EXPORT_SYMBOL_GPL(unregister_syscore_ops); diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c -index edfa251..1734d4d 100644 +index b35fc4f..c902870 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c @@ -3011,7 +3011,7 @@ static void start_io(ctlr_info_t *h) @@ -36172,7 +36925,7 @@ index edfa251..1734d4d 100644 } diff --git a/drivers/block/cciss.h b/drivers/block/cciss.h -index 7fda30e..eb5dfe0 100644 +index 7fda30e..2f27946 100644 --- a/drivers/block/cciss.h +++ b/drivers/block/cciss.h @@ -101,7 +101,7 @@ struct ctlr_info @@ -36184,6 +36937,49 @@ index 7fda30e..eb5dfe0 100644 /* queue and queue Info */ struct list_head reqQ; +@@ -402,27 +402,27 @@ static bool SA5_performant_intr_pending(ctlr_info_t *h) + } + + static struct access_method SA5_access = { +- SA5_submit_command, +- SA5_intr_mask, +- SA5_fifo_full, +- SA5_intr_pending, +- SA5_completed, ++ .submit_command = SA5_submit_command, ++ .set_intr_mask = SA5_intr_mask, ++ .fifo_full = SA5_fifo_full, ++ .intr_pending = SA5_intr_pending, ++ .command_completed = SA5_completed, + }; + + static struct access_method SA5B_access = { +- SA5_submit_command, +- SA5B_intr_mask, +- SA5_fifo_full, +- SA5B_intr_pending, +- SA5_completed, ++ .submit_command = SA5_submit_command, ++ .set_intr_mask = SA5B_intr_mask, ++ .fifo_full = SA5_fifo_full, ++ .intr_pending = SA5B_intr_pending, ++ .command_completed = SA5_completed, + }; + + static struct access_method SA5_performant_access = { +- SA5_submit_command, +- SA5_performant_intr_mask, +- SA5_fifo_full, +- SA5_performant_intr_pending, +- SA5_performant_completed, ++ .submit_command = SA5_submit_command, ++ .set_intr_mask = SA5_performant_intr_mask, ++ .fifo_full = SA5_fifo_full, ++ .intr_pending = SA5_performant_intr_pending, ++ .command_completed = SA5_performant_completed, + }; + + struct board_type { diff --git a/drivers/block/cpqarray.c b/drivers/block/cpqarray.c index 2b94403..fd6ad1f 100644 --- a/drivers/block/cpqarray.c @@ -36318,7 +37114,7 @@ index be73e9d..7fbf140 100644 cmdlist_t *reqQ; cmdlist_t *cmpQ; diff --git a/drivers/block/drbd/drbd_int.h b/drivers/block/drbd/drbd_int.h -index 2d7f608..11245fe 100644 +index 0e06f0c..c47b81d 100644 --- a/drivers/block/drbd/drbd_int.h +++ b/drivers/block/drbd/drbd_int.h @@ -582,7 +582,7 @@ struct drbd_epoch { @@ -36339,7 +37135,7 @@ index 2d7f608..11245fe 100644 unsigned int peer_seq; spinlock_t peer_seq_lock; unsigned int minor; -@@ -1572,7 +1572,7 @@ static inline int drbd_setsockopt(struct socket *sock, int level, int optname, +@@ -1573,7 +1573,7 @@ static inline int drbd_setsockopt(struct socket *sock, int level, int optname, char __user *uoptval; int err; @@ -36348,8 +37144,25 @@ index 2d7f608..11245fe 100644 set_fs(KERNEL_DS); if (level == SOL_SOCKET) +diff --git a/drivers/block/drbd/drbd_interval.c b/drivers/block/drbd/drbd_interval.c +index 89c497c..9c736ae 100644 +--- a/drivers/block/drbd/drbd_interval.c ++++ b/drivers/block/drbd/drbd_interval.c +@@ -67,9 +67,9 @@ static void augment_rotate(struct rb_node *rb_old, struct rb_node *rb_new) + } + + static const struct rb_augment_callbacks augment_callbacks = { +- augment_propagate, +- augment_copy, +- augment_rotate, ++ .propagate = augment_propagate, ++ .copy = augment_copy, ++ .rotate = augment_rotate, + }; + + /** diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c -index 55635ed..40e837c 100644 +index 9e3818b..7b64c92 100644 --- a/drivers/block/drbd/drbd_main.c +++ b/drivers/block/drbd/drbd_main.c @@ -1317,7 +1317,7 @@ static int _drbd_send_ack(struct drbd_conf *mdev, enum drbd_packet cmd, @@ -36382,7 +37195,7 @@ index 55635ed..40e837c 100644 idr_destroy(&tconn->volumes); diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c -index 8cc1e64..ba7ffa9 100644 +index c706d50..5e1b472 100644 --- a/drivers/block/drbd/drbd_nl.c +++ b/drivers/block/drbd/drbd_nl.c @@ -3440,7 +3440,7 @@ out: @@ -36404,7 +37217,7 @@ index 8cc1e64..ba7ffa9 100644 if (!msg) goto failed; diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c -index cc29cd3..d4b058b 100644 +index 6fa6673..b7f97e9 100644 --- a/drivers/block/drbd/drbd_receiver.c +++ b/drivers/block/drbd/drbd_receiver.c @@ -834,7 +834,7 @@ int drbd_connected(struct drbd_conf *mdev) @@ -36457,7 +37270,7 @@ index cc29cd3..d4b058b 100644 list_add(&epoch->list, &tconn->current_epoch->list); tconn->current_epoch = epoch; tconn->epochs++; -@@ -2172,7 +2172,7 @@ static int receive_Data(struct drbd_tconn *tconn, struct packet_info *pi) +@@ -2163,7 +2163,7 @@ static int receive_Data(struct drbd_tconn *tconn, struct packet_info *pi) err = wait_for_and_update_peer_seq(mdev, peer_seq); drbd_send_ack_dp(mdev, P_NEG_ACK, p, pi->size); @@ -36466,7 +37279,7 @@ index cc29cd3..d4b058b 100644 err2 = drbd_drain_block(mdev, pi->size); if (!err) err = err2; -@@ -2206,7 +2206,7 @@ static int receive_Data(struct drbd_tconn *tconn, struct packet_info *pi) +@@ -2197,7 +2197,7 @@ static int receive_Data(struct drbd_tconn *tconn, struct packet_info *pi) spin_lock(&tconn->epoch_lock); peer_req->epoch = tconn->current_epoch; @@ -36475,7 +37288,7 @@ index cc29cd3..d4b058b 100644 atomic_inc(&peer_req->epoch->active); spin_unlock(&tconn->epoch_lock); -@@ -4347,7 +4347,7 @@ struct data_cmd { +@@ -4344,7 +4344,7 @@ struct data_cmd { int expect_payload; size_t pkt_size; int (*fn)(struct drbd_tconn *, struct packet_info *); @@ -36484,7 +37297,7 @@ index cc29cd3..d4b058b 100644 static struct data_cmd drbd_cmd_handler[] = { [P_DATA] = { 1, sizeof(struct p_data), receive_Data }, -@@ -4467,7 +4467,7 @@ static void conn_disconnect(struct drbd_tconn *tconn) +@@ -4464,7 +4464,7 @@ static void conn_disconnect(struct drbd_tconn *tconn) if (!list_empty(&tconn->current_epoch->list)) conn_err(tconn, "ASSERTION FAILED: tconn->current_epoch->list not empty\n"); /* ok, no more ee's on the fly, it is safe to reset the epoch_size */ @@ -36493,7 +37306,7 @@ index cc29cd3..d4b058b 100644 tconn->send.seen_any_write_yet = false; conn_info(tconn, "Connection closed\n"); -@@ -5223,7 +5223,7 @@ static int tconn_finish_peer_reqs(struct drbd_tconn *tconn) +@@ -5220,7 +5220,7 @@ static int tconn_finish_peer_reqs(struct drbd_tconn *tconn) struct asender_cmd { size_t pkt_size; int (*fn)(struct drbd_tconn *tconn, struct packet_info *); @@ -36515,8 +37328,57 @@ index c8dac73..1800093 100644 set_fs(old_fs); file_end_write(file); if (likely(bw == len)) +diff --git a/drivers/block/null_blk.c b/drivers/block/null_blk.c +index 83a598e..2de5ce3 100644 +--- a/drivers/block/null_blk.c ++++ b/drivers/block/null_blk.c +@@ -407,14 +407,24 @@ static int null_init_hctx(struct blk_mq_hw_ctx *hctx, void *data, + return 0; + } + +-static struct blk_mq_ops null_mq_ops = { +- .queue_rq = null_queue_rq, +- .map_queue = blk_mq_map_queue, ++static struct blk_mq_ops null_mq_single_ops = { ++ .queue_rq = null_queue_rq, ++ .map_queue = blk_mq_map_queue, + .init_hctx = null_init_hctx, ++ .alloc_hctx = blk_mq_alloc_single_hw_queue, ++ .free_hctx = blk_mq_free_single_hw_queue, ++}; ++ ++static struct blk_mq_ops null_mq_per_node_ops = { ++ .queue_rq = null_queue_rq, ++ .map_queue = blk_mq_map_queue, ++ .init_hctx = null_init_hctx, ++ .alloc_hctx = null_alloc_hctx, ++ .free_hctx = null_free_hctx, + }; + + static struct blk_mq_reg null_mq_reg = { +- .ops = &null_mq_ops, ++ .ops = &null_mq_single_ops, + .queue_depth = 64, + .cmd_size = sizeof(struct nullb_cmd), + .flags = BLK_MQ_F_SHOULD_MERGE, +@@ -545,13 +555,8 @@ static int null_add_dev(void) + null_mq_reg.queue_depth = hw_queue_depth; + null_mq_reg.nr_hw_queues = submit_queues; + +- if (use_per_node_hctx) { +- null_mq_reg.ops->alloc_hctx = null_alloc_hctx; +- null_mq_reg.ops->free_hctx = null_free_hctx; +- } else { +- null_mq_reg.ops->alloc_hctx = blk_mq_alloc_single_hw_queue; +- null_mq_reg.ops->free_hctx = blk_mq_free_single_hw_queue; +- } ++ if (use_per_node_hctx) ++ null_mq_reg.ops = &null_mq_per_node_ops; + + nullb->q = blk_mq_init_queue(&null_mq_reg, nullb); + } else if (queue_mode == NULL_Q_BIO) { diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c -index 5618847..5a46f3b 100644 +index ff8668c..f62167a 100644 --- a/drivers/block/pktcdvd.c +++ b/drivers/block/pktcdvd.c @@ -108,7 +108,7 @@ static int pkt_seq_show(struct seq_file *m, void *p); @@ -36528,7 +37390,7 @@ index 5618847..5a46f3b 100644 } /* -@@ -1897,7 +1897,7 @@ static noinline_for_stack int pkt_probe_settings(struct pktcdvd_device *pd) +@@ -1883,7 +1883,7 @@ static noinline_for_stack int pkt_probe_settings(struct pktcdvd_device *pd) return -EROFS; } pd->settings.fp = ti.fp; @@ -36537,11 +37399,81 @@ index 5618847..5a46f3b 100644 if (ti.nwa_v) { pd->nwa = be32_to_cpu(ti.next_writable); +diff --git a/drivers/block/smart1,2.h b/drivers/block/smart1,2.h +index e5565fb..71be10b4 100644 +--- a/drivers/block/smart1,2.h ++++ b/drivers/block/smart1,2.h +@@ -108,11 +108,11 @@ static unsigned long smart4_intr_pending(ctlr_info_t *h) + } + + static struct access_method smart4_access = { +- smart4_submit_command, +- smart4_intr_mask, +- smart4_fifo_full, +- smart4_intr_pending, +- smart4_completed, ++ .submit_command = smart4_submit_command, ++ .set_intr_mask = smart4_intr_mask, ++ .fifo_full = smart4_fifo_full, ++ .intr_pending = smart4_intr_pending, ++ .command_completed = smart4_completed, + }; + + /* +@@ -144,11 +144,11 @@ static unsigned long smart2_intr_pending(ctlr_info_t *h) + } + + static struct access_method smart2_access = { +- smart2_submit_command, +- smart2_intr_mask, +- smart2_fifo_full, +- smart2_intr_pending, +- smart2_completed, ++ .submit_command = smart2_submit_command, ++ .set_intr_mask = smart2_intr_mask, ++ .fifo_full = smart2_fifo_full, ++ .intr_pending = smart2_intr_pending, ++ .command_completed = smart2_completed, + }; + + /* +@@ -180,11 +180,11 @@ static unsigned long smart2e_intr_pending(ctlr_info_t *h) + } + + static struct access_method smart2e_access = { +- smart2e_submit_command, +- smart2e_intr_mask, +- smart2e_fifo_full, +- smart2e_intr_pending, +- smart2e_completed, ++ .submit_command = smart2e_submit_command, ++ .set_intr_mask = smart2e_intr_mask, ++ .fifo_full = smart2e_fifo_full, ++ .intr_pending = smart2e_intr_pending, ++ .command_completed = smart2e_completed, + }; + + /* +@@ -270,9 +270,9 @@ static unsigned long smart1_intr_pending(ctlr_info_t *h) + } + + static struct access_method smart1_access = { +- smart1_submit_command, +- smart1_intr_mask, +- smart1_fifo_full, +- smart1_intr_pending, +- smart1_completed, ++ .submit_command = smart1_submit_command, ++ .set_intr_mask = smart1_intr_mask, ++ .fifo_full = smart1_fifo_full, ++ .intr_pending = smart1_intr_pending, ++ .command_completed = smart1_completed, + }; diff --git a/drivers/bluetooth/btwilink.c b/drivers/bluetooth/btwilink.c -index 60abf59..80789e1 100644 +index f038dba..bb74c08 100644 --- a/drivers/bluetooth/btwilink.c +++ b/drivers/bluetooth/btwilink.c -@@ -293,7 +293,7 @@ static int ti_st_send_frame(struct sk_buff *skb) +@@ -288,7 +288,7 @@ static int ti_st_send_frame(struct hci_dev *hdev, struct sk_buff *skb) static int bt_ti_probe(struct platform_device *pdev) { @@ -36551,10 +37483,10 @@ index 60abf59..80789e1 100644 int err; diff --git a/drivers/bus/arm-cci.c b/drivers/bus/arm-cci.c -index 2009266..7be9ca2 100644 +index b6739cb..962fd35 100644 --- a/drivers/bus/arm-cci.c +++ b/drivers/bus/arm-cci.c -@@ -405,7 +405,7 @@ static int __init cci_probe(void) +@@ -979,7 +979,7 @@ static int cci_probe(void) nb_cci_ports = cci_config->nb_ace + cci_config->nb_ace_lite; @@ -36628,7 +37560,7 @@ index 5980cb9..6d7bd7e 100644 static int gdrom_bdops_open(struct block_device *bdev, fmode_t mode) diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig -index 1421997..33f5d6d 100644 +index fa3243d..8c98297 100644 --- a/drivers/char/Kconfig +++ b/drivers/char/Kconfig @@ -8,7 +8,8 @@ source "drivers/tty/Kconfig" @@ -36641,7 +37573,7 @@ index 1421997..33f5d6d 100644 help Say Y here if you want to support the /dev/kmem device. The /dev/kmem device is rarely used, but can be used for certain -@@ -570,6 +571,7 @@ config DEVPORT +@@ -576,6 +577,7 @@ config DEVPORT bool depends on !M68K depends on ISA || PCI @@ -36697,10 +37629,10 @@ index 4f94375..413694e 100644 return -EINVAL; else diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c -index 448ce5e..3a76625 100644 +index 5d9c31d..c94ccb5 100644 --- a/drivers/char/hpet.c +++ b/drivers/char/hpet.c -@@ -559,7 +559,7 @@ static inline unsigned long hpet_time_div(struct hpets *hpets, +@@ -578,7 +578,7 @@ static inline unsigned long hpet_time_div(struct hpets *hpets, } static int @@ -37024,43 +37956,49 @@ index d39cca6..8c1e269 100644 if (cmd != SIOCWANDEV) diff --git a/drivers/char/random.c b/drivers/char/random.c -index 7a744d3..35a177ee 100644 +index 429b75b..03d60db 100644 --- a/drivers/char/random.c +++ b/drivers/char/random.c -@@ -269,8 +269,13 @@ +@@ -270,10 +270,17 @@ /* * Configuration information */ +#ifdef CONFIG_GRKERNSEC_RANDNET -+#define INPUT_POOL_WORDS 512 -+#define OUTPUT_POOL_WORDS 128 ++#define INPUT_POOL_SHIFT 14 ++#define INPUT_POOL_WORDS (1 << (INPUT_POOL_SHIFT-5)) ++#define OUTPUT_POOL_SHIFT 12 ++#define OUTPUT_POOL_WORDS (1 << (OUTPUT_POOL_SHIFT-5)) +#else - #define INPUT_POOL_WORDS 128 - #define OUTPUT_POOL_WORDS 32 + #define INPUT_POOL_SHIFT 12 + #define INPUT_POOL_WORDS (1 << (INPUT_POOL_SHIFT-5)) + #define OUTPUT_POOL_SHIFT 10 + #define OUTPUT_POOL_WORDS (1 << (OUTPUT_POOL_SHIFT-5)) +#endif - #define SEC_XFER_SIZE 512 - #define EXTRACT_SIZE 10 + #define SEC_XFER_SIZE 512 + #define EXTRACT_SIZE 10 -@@ -310,10 +315,17 @@ static struct poolinfo { - int poolwords; +@@ -361,12 +368,19 @@ static struct poolinfo { + #define S(x) ilog2(x)+5, (x), (x)*4, (x)*32, (x) << (ENTROPY_SHIFT+5) int tap1, tap2, tap3, tap4, tap5; } poolinfo_table[] = { +#ifdef CONFIG_GRKERNSEC_RANDNET + /* x^512 + x^411 + x^308 + x^208 +x^104 + x + 1 -- 225 */ -+ { 512, 411, 308, 208, 104, 1 }, -+ /* x^128 + x^103 + x^76 + x^51 + x^25 + x + 1 -- 105 */ -+ { 128, 103, 76, 51, 25, 1 }, ++ { S(512), 411, 308, 208, 104, 1 }, ++ /* x^128 + x^104 + x^76 + x^51 + x^25 + x + 1 -- 105 */ ++ { S(128), 104, 76, 51, 25, 1 }, +#else - /* x^128 + x^103 + x^76 + x^51 +x^25 + x + 1 -- 105 */ - { 128, 103, 76, 51, 25, 1 }, - /* x^32 + x^26 + x^20 + x^14 + x^7 + x + 1 -- 15 */ - { 32, 26, 20, 14, 7, 1 }, + /* was: x^128 + x^103 + x^76 + x^51 +x^25 + x + 1 */ + /* x^128 + x^104 + x^76 + x^51 +x^25 + x + 1 */ + { S(128), 104, 76, 51, 25, 1 }, + /* was: x^32 + x^26 + x^20 + x^14 + x^7 + x + 1 */ + /* x^32 + x^26 + x^19 + x^14 + x^7 + x + 1 */ + { S(32), 26, 19, 14, 7, 1 }, +#endif #if 0 /* x^2048 + x^1638 + x^1231 + x^819 + x^411 + x + 1 -- 115 */ - { 2048, 1638, 1231, 819, 411, 1 }, -@@ -521,8 +533,8 @@ static void _mix_pool_bytes(struct entropy_store *r, const void *in, - input_rotate += i ? 7 : 14; + { S(2048), 1638, 1231, 819, 411, 1 }, +@@ -524,8 +538,8 @@ static void _mix_pool_bytes(struct entropy_store *r, const void *in, + input_rotate = (input_rotate + (i ? 7 : 14)) & 31; } - ACCESS_ONCE(r->input_rotate) = input_rotate; @@ -37070,7 +38008,7 @@ index 7a744d3..35a177ee 100644 smp_wmb(); if (out) -@@ -1029,7 +1041,7 @@ static ssize_t extract_entropy_user(struct entropy_store *r, void __user *buf, +@@ -1151,7 +1165,7 @@ static ssize_t extract_entropy_user(struct entropy_store *r, void __user *buf, extract_buf(r, tmp); i = min_t(int, nbytes, EXTRACT_SIZE); @@ -37079,7 +38017,7 @@ index 7a744d3..35a177ee 100644 ret = -EFAULT; break; } -@@ -1365,7 +1377,7 @@ EXPORT_SYMBOL(generate_random_uuid); +@@ -1507,7 +1521,7 @@ EXPORT_SYMBOL(generate_random_uuid); #include static int min_read_thresh = 8, min_write_thresh; @@ -37088,7 +38026,7 @@ index 7a744d3..35a177ee 100644 static int max_write_thresh = INPUT_POOL_WORDS * 32; static char sysctl_bootid[16]; -@@ -1381,7 +1393,7 @@ static char sysctl_bootid[16]; +@@ -1523,7 +1537,7 @@ static char sysctl_bootid[16]; static int proc_do_uuid(struct ctl_table *table, int write, void __user *buffer, size_t *lenp, loff_t *ppos) { @@ -37097,6 +38035,15 @@ index 7a744d3..35a177ee 100644 unsigned char buf[64], tmp_uuid[16], *uuid; uuid = table->data; +@@ -1553,7 +1567,7 @@ static int proc_do_uuid(struct ctl_table *table, int write, + static int proc_do_entropy(ctl_table *table, int write, + void __user *buffer, size_t *lenp, loff_t *ppos) + { +- ctl_table fake_table; ++ ctl_table_no_const fake_table; + int entropy_count; + + entropy_count = *(int *)table->data >> ENTROPY_SHIFT; diff --git a/drivers/char/sonypi.c b/drivers/char/sonypi.c index 7cc1fe22..b602d6b 100644 --- a/drivers/char/sonypi.c @@ -37158,7 +38105,7 @@ index 64420b3..5c40b56 100644 acpi_os_unmap_memory(virt, len); return 0; diff --git a/drivers/char/tpm/tpm_eventlog.c b/drivers/char/tpm/tpm_eventlog.c -index 84ddc55..1d32f1e 100644 +index 59f7cb2..bac8b6d 100644 --- a/drivers/char/tpm/tpm_eventlog.c +++ b/drivers/char/tpm/tpm_eventlog.c @@ -95,7 +95,7 @@ static void *tpm_bios_measurements_start(struct seq_file *m, loff_t *pos) @@ -37190,10 +38137,10 @@ index 84ddc55..1d32f1e 100644 return 0; } diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c -index b79cf3e..de172d64f 100644 +index feea87c..18aefff 100644 --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c -@@ -682,7 +682,7 @@ static ssize_t fill_readbuf(struct port *port, char *out_buf, size_t out_count, +@@ -684,7 +684,7 @@ static ssize_t fill_readbuf(struct port *port, char *out_buf, size_t out_count, if (to_user) { ssize_t ret; @@ -37202,7 +38149,7 @@ index b79cf3e..de172d64f 100644 if (ret) return -EFAULT; } else { -@@ -785,7 +785,7 @@ static ssize_t port_fops_read(struct file *filp, char __user *ubuf, +@@ -787,7 +787,7 @@ static ssize_t port_fops_read(struct file *filp, char __user *ubuf, if (!port_has_data(port) && !port->host_connected) return 0; @@ -37259,7 +38206,7 @@ index 81dd31a..ef5c542 100644 .get_parent = socfpga_clk_get_parent, .set_parent = socfpga_clk_set_parent, diff --git a/drivers/cpufreq/acpi-cpufreq.c b/drivers/cpufreq/acpi-cpufreq.c -index 506fd23..01a593f 100644 +index caf41eb..223d27a 100644 --- a/drivers/cpufreq/acpi-cpufreq.c +++ b/drivers/cpufreq/acpi-cpufreq.c @@ -172,7 +172,7 @@ static ssize_t show_global_boost(struct kobject *kobj, @@ -37271,7 +38218,7 @@ index 506fd23..01a593f 100644 show_global_boost, store_global_boost); -@@ -721,8 +721,11 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy) +@@ -693,8 +693,11 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy) data->acpi_data = per_cpu_ptr(acpi_perf_data, cpu); per_cpu(acfreq_data, cpu) = data; @@ -37285,7 +38232,7 @@ index 506fd23..01a593f 100644 result = acpi_processor_register_performance(data->acpi_data, cpu); if (result) -@@ -850,7 +853,9 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy) +@@ -827,7 +830,9 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy) policy->cur = acpi_cpufreq_guess_freq(data, policy->cpu); break; case ACPI_ADR_SPACE_FIXED_HARDWARE: @@ -37293,14 +38240,23 @@ index 506fd23..01a593f 100644 + pax_open_kernel(); + *(void **)&acpi_cpufreq_driver.get = get_cur_freq_on_cpu; + pax_close_kernel(); - policy->cur = get_cur_freq_on_cpu(cpu); break; default: + break; diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c -index 04548f7..457a342 100644 +index 8d19f7c..6bc2daa 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c -@@ -2069,7 +2069,7 @@ static int cpufreq_cpu_callback(struct notifier_block *nfb, +@@ -1885,7 +1885,7 @@ void cpufreq_unregister_governor(struct cpufreq_governor *governor) + #endif + + mutex_lock(&cpufreq_governor_mutex); +- list_del(&governor->governor_list); ++ pax_list_del(&governor->governor_list); + mutex_unlock(&cpufreq_governor_mutex); + return; + } +@@ -2115,7 +2115,7 @@ static int cpufreq_cpu_callback(struct notifier_block *nfb, return NOTIFY_OK; } @@ -37309,7 +38265,7 @@ index 04548f7..457a342 100644 .notifier_call = cpufreq_cpu_callback, }; -@@ -2101,8 +2101,11 @@ int cpufreq_register_driver(struct cpufreq_driver *driver_data) +@@ -2148,8 +2148,11 @@ int cpufreq_register_driver(struct cpufreq_driver *driver_data) pr_debug("trying to register driver %s\n", driver_data->name); @@ -37324,7 +38280,7 @@ index 04548f7..457a342 100644 write_lock_irqsave(&cpufreq_driver_lock, flags); if (cpufreq_driver) { diff --git a/drivers/cpufreq/cpufreq_governor.c b/drivers/cpufreq/cpufreq_governor.c -index 0806c31..6a73276 100644 +index e6be635..f8a90dc 100644 --- a/drivers/cpufreq/cpufreq_governor.c +++ b/drivers/cpufreq/cpufreq_governor.c @@ -187,7 +187,7 @@ int cpufreq_governor_dbs(struct cpufreq_policy *policy, @@ -37355,10 +38311,10 @@ index 0806c31..6a73276 100644 cpufreq_unregister_notifier(cs_ops->notifier_block, CPUFREQ_TRANSITION_NOTIFIER); diff --git a/drivers/cpufreq/cpufreq_governor.h b/drivers/cpufreq/cpufreq_governor.h -index 88cd39f..87f0393 100644 +index b5f2b86..daa801b 100644 --- a/drivers/cpufreq/cpufreq_governor.h +++ b/drivers/cpufreq/cpufreq_governor.h -@@ -202,7 +202,7 @@ struct common_dbs_data { +@@ -205,7 +205,7 @@ struct common_dbs_data { void (*exit)(struct dbs_data *dbs_data); /* Governor specific ops, see below */ @@ -37367,7 +38323,7 @@ index 88cd39f..87f0393 100644 }; /* Governor Per policy data */ -@@ -222,7 +222,7 @@ struct od_ops { +@@ -225,7 +225,7 @@ struct od_ops { unsigned int (*powersave_bias_target)(struct cpufreq_policy *policy, unsigned int freq_next, unsigned int relation); void (*freq_increase)(struct cpufreq_policy *policy, unsigned int freq); @@ -37377,10 +38333,10 @@ index 88cd39f..87f0393 100644 struct cs_ops { struct notifier_block *notifier_block; diff --git a/drivers/cpufreq/cpufreq_ondemand.c b/drivers/cpufreq/cpufreq_ondemand.c -index 32f26f6..feb657b 100644 +index 18d4091..434be15 100644 --- a/drivers/cpufreq/cpufreq_ondemand.c +++ b/drivers/cpufreq/cpufreq_ondemand.c -@@ -522,7 +522,7 @@ static void od_exit(struct dbs_data *dbs_data) +@@ -521,7 +521,7 @@ static void od_exit(struct dbs_data *dbs_data) define_get_cpu_dbs_routines(od_cpu_dbs_info); @@ -37389,7 +38345,7 @@ index 32f26f6..feb657b 100644 .powersave_bias_init_cpu = ondemand_powersave_bias_init_cpu, .powersave_bias_target = generic_powersave_bias_target, .freq_increase = dbs_freq_increase, -@@ -577,14 +577,18 @@ void od_register_powersave_bias_handler(unsigned int (*f) +@@ -576,14 +576,18 @@ void od_register_powersave_bias_handler(unsigned int (*f) (struct cpufreq_policy *, unsigned int, unsigned int), unsigned int powersave_bias) { @@ -37423,11 +38379,84 @@ index 4cf0d28..5830372 100644 .notifier_call = cpufreq_stat_cpu_callback, .priority = 1, }; +diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c +index d51f17ed..9f43b15 100644 +--- a/drivers/cpufreq/intel_pstate.c ++++ b/drivers/cpufreq/intel_pstate.c +@@ -112,10 +112,10 @@ struct pstate_funcs { + struct cpu_defaults { + struct pstate_adjust_policy pid_policy; + struct pstate_funcs funcs; +-}; ++} __do_const; + + static struct pstate_adjust_policy pid_params; +-static struct pstate_funcs pstate_funcs; ++static struct pstate_funcs *pstate_funcs; + + struct perf_limits { + int no_turbo; +@@ -462,7 +462,7 @@ static void intel_pstate_set_pstate(struct cpudata *cpu, int pstate) + + cpu->pstate.current_pstate = pstate; + +- pstate_funcs.set(pstate); ++ pstate_funcs->set(pstate); + } + + static inline void intel_pstate_pstate_increase(struct cpudata *cpu, int steps) +@@ -484,9 +484,9 @@ static void intel_pstate_get_cpu_pstates(struct cpudata *cpu) + { + sprintf(cpu->name, "Intel 2nd generation core"); + +- cpu->pstate.min_pstate = pstate_funcs.get_min(); +- cpu->pstate.max_pstate = pstate_funcs.get_max(); +- cpu->pstate.turbo_pstate = pstate_funcs.get_turbo(); ++ cpu->pstate.min_pstate = pstate_funcs->get_min(); ++ cpu->pstate.max_pstate = pstate_funcs->get_max(); ++ cpu->pstate.turbo_pstate = pstate_funcs->get_turbo(); + + /* + * goto max pstate so we don't slow up boot if we are built-in if we are +@@ -750,9 +750,9 @@ static int intel_pstate_msrs_not_valid(void) + rdmsrl(MSR_IA32_APERF, aperf); + rdmsrl(MSR_IA32_MPERF, mperf); + +- if (!pstate_funcs.get_max() || +- !pstate_funcs.get_min() || +- !pstate_funcs.get_turbo()) ++ if (!pstate_funcs->get_max() || ++ !pstate_funcs->get_min() || ++ !pstate_funcs->get_turbo()) + return -ENODEV; + + rdmsrl(MSR_IA32_APERF, tmp); +@@ -766,7 +766,7 @@ static int intel_pstate_msrs_not_valid(void) + return 0; + } + +-static void copy_pid_params(struct pstate_adjust_policy *policy) ++static void copy_pid_params(const struct pstate_adjust_policy *policy) + { + pid_params.sample_rate_ms = policy->sample_rate_ms; + pid_params.p_gain_pct = policy->p_gain_pct; +@@ -778,10 +778,7 @@ static void copy_pid_params(struct pstate_adjust_policy *policy) + + static void copy_cpu_funcs(struct pstate_funcs *funcs) + { +- pstate_funcs.get_max = funcs->get_max; +- pstate_funcs.get_min = funcs->get_min; +- pstate_funcs.get_turbo = funcs->get_turbo; +- pstate_funcs.set = funcs->set; ++ pstate_funcs = funcs; + } + + #if IS_ENABLED(CONFIG_ACPI) diff --git a/drivers/cpufreq/p4-clockmod.c b/drivers/cpufreq/p4-clockmod.c -index 2f0a2a6..93d728e 100644 +index 3d1cba9..0ab21d2 100644 --- a/drivers/cpufreq/p4-clockmod.c +++ b/drivers/cpufreq/p4-clockmod.c -@@ -160,10 +160,14 @@ static unsigned int cpufreq_p4_get_frequency(struct cpuinfo_x86 *c) +@@ -134,10 +134,14 @@ static unsigned int cpufreq_p4_get_frequency(struct cpuinfo_x86 *c) case 0x0F: /* Core Duo */ case 0x16: /* Celeron Core */ case 0x1C: /* Atom */ @@ -37444,7 +38473,7 @@ index 2f0a2a6..93d728e 100644 /* fall through */ case 0x09: /* Pentium M (Banias) */ return speedstep_get_frequency(SPEEDSTEP_CPU_PM); -@@ -175,7 +179,9 @@ static unsigned int cpufreq_p4_get_frequency(struct cpuinfo_x86 *c) +@@ -149,7 +153,9 @@ static unsigned int cpufreq_p4_get_frequency(struct cpuinfo_x86 *c) /* on P-4s, the TSC runs with constant frequency independent whether * throttling is active or not. */ @@ -37456,7 +38485,7 @@ index 2f0a2a6..93d728e 100644 if (speedstep_detect_processor() == SPEEDSTEP_CPU_P4M) { printk(KERN_WARNING PFX "Warning: Pentium 4-M detected. " diff --git a/drivers/cpufreq/sparc-us3-cpufreq.c b/drivers/cpufreq/sparc-us3-cpufreq.c -index ac76b48..2445bc6 100644 +index 724ffbd..ad83692 100644 --- a/drivers/cpufreq/sparc-us3-cpufreq.c +++ b/drivers/cpufreq/sparc-us3-cpufreq.c @@ -18,14 +18,12 @@ @@ -37475,13 +38504,16 @@ index ac76b48..2445bc6 100644 /* UltraSPARC-III has three dividers: 1, 2, and 32. These are controlled * in the Safari config register. -@@ -186,12 +184,25 @@ static int __init us3_freq_cpu_init(struct cpufreq_policy *policy) +@@ -156,14 +154,26 @@ static int __init us3_freq_cpu_init(struct cpufreq_policy *policy) static int us3_freq_cpu_exit(struct cpufreq_policy *policy) { -- if (cpufreq_us3_driver) -- us3_set_cpu_divider_index(policy, 0); -+ us3_set_cpu_divider_index(policy->cpu, 0); +- if (cpufreq_us3_driver) { +- cpufreq_frequency_table_put_attr(policy->cpu); +- us3_freq_target(policy, 0); +- } ++ cpufreq_frequency_table_put_attr(policy->cpu); ++ us3_freq_target(policy, 0); return 0; } @@ -37490,20 +38522,20 @@ index ac76b48..2445bc6 100644 +static void __exit us3_freq_exit(void); + +static struct cpufreq_driver cpufreq_us3_driver = { -+ .init = us3_freq_cpu_init, -+ .verify = us3_freq_verify, -+ .target = us3_freq_target, -+ .get = us3_freq_get, -+ .exit = us3_freq_cpu_exit, -+ .owner = THIS_MODULE, -+ .name = "UltraSPARC-III", ++ .init = us3_freq_cpu_init, ++ .verify = cpufreq_generic_frequency_table_verify, ++ .target_index = us3_freq_target, ++ .get = us3_freq_get, ++ .exit = us3_freq_cpu_exit, ++ .owner = THIS_MODULE, ++ .name = "UltraSPARC-III", + +}; + static int __init us3_freq_init(void) { unsigned long manuf, impl, ver; -@@ -208,55 +219,15 @@ static int __init us3_freq_init(void) +@@ -180,55 +190,15 @@ static int __init us3_freq_init(void) (impl == CHEETAH_IMPL || impl == CHEETAH_PLUS_IMPL || impl == JAGUAR_IMPL || @@ -37521,8 +38553,8 @@ index ac76b48..2445bc6 100644 - goto err_out; - - driver->init = us3_freq_cpu_init; -- driver->verify = us3_freq_verify; -- driver->target = us3_freq_target; +- driver->verify = cpufreq_generic_frequency_table_verify; +- driver->target_index = us3_freq_target; - driver->get = us3_freq_get; - driver->exit = us3_freq_cpu_exit; - strcpy(driver->name, "UltraSPARC-III"); @@ -37563,10 +38595,10 @@ index ac76b48..2445bc6 100644 MODULE_AUTHOR("David S. Miller "); diff --git a/drivers/cpufreq/speedstep-centrino.c b/drivers/cpufreq/speedstep-centrino.c -index f897d51..15da295 100644 +index 4e1daca..e707b61 100644 --- a/drivers/cpufreq/speedstep-centrino.c +++ b/drivers/cpufreq/speedstep-centrino.c -@@ -353,8 +353,11 @@ static int centrino_cpu_init(struct cpufreq_policy *policy) +@@ -351,8 +351,11 @@ static int centrino_cpu_init(struct cpufreq_policy *policy) !cpu_has(cpu, X86_FEATURE_EST)) return -ENODEV; @@ -37580,11 +38612,11 @@ index f897d51..15da295 100644 if (policy->cpu != 0) return -ENODEV; -diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c -index d75040d..4738ca5 100644 ---- a/drivers/cpuidle/cpuidle.c -+++ b/drivers/cpuidle/cpuidle.c -@@ -252,7 +252,7 @@ static int poll_idle(struct cpuidle_device *dev, +diff --git a/drivers/cpuidle/driver.c b/drivers/cpuidle/driver.c +index 06dbe7c..c2c8671 100644 +--- a/drivers/cpuidle/driver.c ++++ b/drivers/cpuidle/driver.c +@@ -202,7 +202,7 @@ static int poll_idle(struct cpuidle_device *dev, static void poll_idle_init(struct cpuidle_driver *drv) { @@ -37594,7 +38626,7 @@ index d75040d..4738ca5 100644 snprintf(state->name, CPUIDLE_NAME_LEN, "POLL"); snprintf(state->desc, CPUIDLE_DESC_LEN, "CPUIDLE CORE POLL IDLE"); diff --git a/drivers/cpuidle/governor.c b/drivers/cpuidle/governor.c -index ea2f8e7..70ac501 100644 +index ca89412..a7b9c49 100644 --- a/drivers/cpuidle/governor.c +++ b/drivers/cpuidle/governor.c @@ -87,7 +87,7 @@ int cpuidle_register_governor(struct cpuidle_governor *gov) @@ -37606,20 +38638,11 @@ index ea2f8e7..70ac501 100644 if (!cpuidle_curr_governor || cpuidle_curr_governor->rating < gov->rating) cpuidle_switch_governor(gov); -@@ -135,7 +135,7 @@ void cpuidle_unregister_governor(struct cpuidle_governor *gov) - new_gov = cpuidle_replace_governor(gov->rating); - cpuidle_switch_governor(new_gov); - } -- list_del(&gov->governor_list); -+ pax_list_del((struct list_head *)&gov->governor_list); - mutex_unlock(&cpuidle_lock); - } - diff --git a/drivers/cpuidle/sysfs.c b/drivers/cpuidle/sysfs.c -index 8739cc0..dc859d0 100644 +index e918b6d..f87ea80 100644 --- a/drivers/cpuidle/sysfs.c +++ b/drivers/cpuidle/sysfs.c -@@ -134,7 +134,7 @@ static struct attribute *cpuidle_switch_attrs[] = { +@@ -135,7 +135,7 @@ static struct attribute *cpuidle_switch_attrs[] = { NULL }; @@ -37651,7 +38674,7 @@ index 12fea3e..1e28f47 100644 err = pci_request_regions(pdev, name); if (err) diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c -index c99c00d..990a4b2 100644 +index a0b2f7e..1b6f028 100644 --- a/drivers/devfreq/devfreq.c +++ b/drivers/devfreq/devfreq.c @@ -607,7 +607,7 @@ int devfreq_add_governor(struct devfreq_governor *governor) @@ -37673,7 +38696,7 @@ index c99c00d..990a4b2 100644 mutex_unlock(&devfreq_list_lock); diff --git a/drivers/dma/sh/shdmac.c b/drivers/dma/sh/shdmac.c -index 1069e88..dfcd642 100644 +index 0d765c0..60b7480 100644 --- a/drivers/dma/sh/shdmac.c +++ b/drivers/dma/sh/shdmac.c @@ -511,7 +511,7 @@ static int sh_dmae_nmi_handler(struct notifier_block *self, @@ -37686,7 +38709,7 @@ index 1069e88..dfcd642 100644 /* Run before NMI debug handler and KGDB */ diff --git a/drivers/edac/edac_device.c b/drivers/edac/edac_device.c -index 211021d..201d47f 100644 +index 1026743..80b081c 100644 --- a/drivers/edac/edac_device.c +++ b/drivers/edac/edac_device.c @@ -474,9 +474,9 @@ void edac_device_reset_delay_period(struct edac_device_ctl_info *edac_dev, @@ -37736,7 +38759,7 @@ index 9f7e0e60..348c875 100644 &dev_attr_sdram_scrub_rate); if (err) { diff --git a/drivers/edac/edac_pci.c b/drivers/edac/edac_pci.c -index dd370f9..0281629 100644 +index 2cf44b4d..6dd2dc7 100644 --- a/drivers/edac/edac_pci.c +++ b/drivers/edac/edac_pci.c @@ -29,7 +29,7 @@ @@ -37905,7 +38928,7 @@ index de4aa40..49ab1f2 100644 static ssize_t show_immediate(struct device *dev, struct device_attribute *dattr, char *buf) diff --git a/drivers/firewire/core-transaction.c b/drivers/firewire/core-transaction.c -index e5af0e3..d318058 100644 +index 0e79951..b180217 100644 --- a/drivers/firewire/core-transaction.c +++ b/drivers/firewire/core-transaction.c @@ -38,6 +38,7 @@ @@ -37942,10 +38965,10 @@ index 94a58a0..f5eba42 100644 container_of(_dev_attr, struct dmi_device_attribute, dev_attr) diff --git a/drivers/firmware/dmi_scan.c b/drivers/firmware/dmi_scan.c -index fa0affb..aa448eb 100644 +index c7e81ff..94a7401 100644 --- a/drivers/firmware/dmi_scan.c +++ b/drivers/firmware/dmi_scan.c -@@ -791,7 +791,7 @@ int dmi_walk(void (*decode)(const struct dmi_header *, void *), +@@ -835,7 +835,7 @@ int dmi_walk(void (*decode)(const struct dmi_header *, void *), if (buf == NULL) return -1; @@ -37954,11 +38977,32 @@ index fa0affb..aa448eb 100644 iounmap(buf); return 0; +diff --git a/drivers/firmware/efi/cper.c b/drivers/firmware/efi/cper.c +index 1491dd4..aa910db 100644 +--- a/drivers/firmware/efi/cper.c ++++ b/drivers/firmware/efi/cper.c +@@ -41,12 +41,12 @@ + */ + u64 cper_next_record_id(void) + { +- static atomic64_t seq; ++ static atomic64_unchecked_t seq; + +- if (!atomic64_read(&seq)) +- atomic64_set(&seq, ((u64)get_seconds()) << 32); ++ if (!atomic64_read_unchecked(&seq)) ++ atomic64_set_unchecked(&seq, ((u64)get_seconds()) << 32); + +- return atomic64_inc_return(&seq); ++ return atomic64_inc_return_unchecked(&seq); + } + EXPORT_SYMBOL_GPL(cper_next_record_id); + diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c -index 5145fa3..0d3babd 100644 +index 2e2fbde..7676c8b 100644 --- a/drivers/firmware/efi/efi.c +++ b/drivers/firmware/efi/efi.c -@@ -65,14 +65,16 @@ static struct attribute_group efi_subsys_attr_group = { +@@ -81,14 +81,16 @@ static struct attribute_group efi_subsys_attr_group = { }; static struct efivars generic_efivars; @@ -37981,10 +39025,10 @@ index 5145fa3..0d3babd 100644 return efivars_register(&generic_efivars, &generic_ops, efi_kobj); } diff --git a/drivers/firmware/efi/efivars.c b/drivers/firmware/efi/efivars.c -index 8a7432a..28fb839 100644 +index 3dc2482..7bd2f61 100644 --- a/drivers/firmware/efi/efivars.c +++ b/drivers/firmware/efi/efivars.c -@@ -452,7 +452,7 @@ efivar_create_sysfs_entry(struct efivar_entry *new_var) +@@ -456,7 +456,7 @@ efivar_create_sysfs_entry(struct efivar_entry *new_var) static int create_efivars_bin_attributes(void) { @@ -38034,11 +39078,45 @@ index 9902732..64b62dd 100644 return -EINVAL; } +diff --git a/drivers/gpu/drm/armada/armada_drv.c b/drivers/gpu/drm/armada/armada_drv.c +index 62d0ff3..073dbf3 100644 +--- a/drivers/gpu/drm/armada/armada_drv.c ++++ b/drivers/gpu/drm/armada/armada_drv.c +@@ -68,15 +68,7 @@ void __armada_drm_queue_unref_work(struct drm_device *dev, + { + struct armada_private *priv = dev->dev_private; + +- /* +- * Yes, we really must jump through these hoops just to store a +- * _pointer_ to something into the kfifo. This is utterly insane +- * and idiotic, because it kfifo requires the _data_ pointed to by +- * the pointer const, not the pointer itself. Not only that, but +- * you have to pass a pointer _to_ the pointer you want stored. +- */ +- const struct drm_framebuffer *silly_api_alert = fb; +- WARN_ON(!kfifo_put(&priv->fb_unref, &silly_api_alert)); ++ WARN_ON(!kfifo_put(&priv->fb_unref, fb)); + schedule_work(&priv->fb_unref_work); + } + +diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c +index d6cf77c..2842146 100644 +--- a/drivers/gpu/drm/drm_crtc.c ++++ b/drivers/gpu/drm/drm_crtc.c +@@ -3102,7 +3102,7 @@ int drm_mode_getproperty_ioctl(struct drm_device *dev, + goto done; + } + +- if (copy_to_user(&enum_ptr[copied].name, ++ if (copy_to_user(enum_ptr[copied].name, + &prop_enum->name, DRM_PROP_NAME_LEN)) { + ret = -EFAULT; + goto done; diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c -index c722c3b..2ec6040 100644 +index 01361ab..891e821 100644 --- a/drivers/gpu/drm/drm_crtc_helper.c +++ b/drivers/gpu/drm/drm_crtc_helper.c -@@ -328,7 +328,7 @@ static bool drm_encoder_crtc_ok(struct drm_encoder *encoder, +@@ -338,7 +338,7 @@ static bool drm_encoder_crtc_ok(struct drm_encoder *encoder, struct drm_crtc *tmp; int crtc_mask = 1; @@ -38048,19 +39126,10 @@ index c722c3b..2ec6040 100644 dev = crtc->dev; diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c -index fe58d08..07bc38e 100644 +index d9137e4..69b73a0 100644 --- a/drivers/gpu/drm/drm_drv.c +++ b/drivers/gpu/drm/drm_drv.c -@@ -186,7 +186,7 @@ static void drm_legacy_dev_reinit(struct drm_device *dev) - atomic_set(&dev->vma_count, 0); - - for (i = 0; i < ARRAY_SIZE(dev->counts); i++) -- atomic_set(&dev->counts[i], 0); -+ atomic_set_unchecked(&dev->counts[i], 0); - - dev->sigdata.lock = NULL; - -@@ -302,7 +302,7 @@ module_exit(drm_core_exit); +@@ -233,7 +233,7 @@ module_exit(drm_core_exit); /** * Copy and IOCTL return string to user space */ @@ -38069,7 +39138,7 @@ index fe58d08..07bc38e 100644 { int len; -@@ -372,7 +372,7 @@ long drm_ioctl(struct file *filp, +@@ -303,7 +303,7 @@ long drm_ioctl(struct file *filp, struct drm_file *file_priv = filp->private_data; struct drm_device *dev; const struct drm_ioctl_desc *ioctl = NULL; @@ -38078,17 +39147,8 @@ index fe58d08..07bc38e 100644 unsigned int nr = DRM_IOCTL_NR(cmd); int retcode = -EINVAL; char stack_kdata[128]; -@@ -385,7 +385,7 @@ long drm_ioctl(struct file *filp, - return -ENODEV; - - atomic_inc(&dev->ioctl_count); -- atomic_inc(&dev->counts[_DRM_STAT_IOCTLS]); -+ atomic_inc_unchecked(&dev->counts[_DRM_STAT_IOCTLS]); - ++file_priv->ioctl_count; - - if ((nr >= DRM_CORE_IOCTL_COUNT) && diff --git a/drivers/gpu/drm/drm_fops.c b/drivers/gpu/drm/drm_fops.c -index 3f84277..c627c54 100644 +index c5b929c..8a3b8be 100644 --- a/drivers/gpu/drm/drm_fops.c +++ b/drivers/gpu/drm/drm_fops.c @@ -97,7 +97,7 @@ int drm_open(struct inode *inode, struct file *filp) @@ -38100,16 +39160,7 @@ index 3f84277..c627c54 100644 need_setup = 1; mutex_lock(&dev->struct_mutex); old_imapping = inode->i_mapping; -@@ -113,7 +113,7 @@ int drm_open(struct inode *inode, struct file *filp) - retcode = drm_open_helper(inode, filp, dev); - if (retcode) - goto err_undo; -- atomic_inc(&dev->counts[_DRM_STAT_OPENS]); -+ atomic_inc_unchecked(&dev->counts[_DRM_STAT_OPENS]); - if (need_setup) { - retcode = drm_setup(dev); - if (retcode) -@@ -128,7 +128,7 @@ err_undo: +@@ -127,7 +127,7 @@ err_undo: iput(container_of(dev->dev_mapping, struct inode, i_data)); dev->dev_mapping = old_mapping; mutex_unlock(&dev->struct_mutex); @@ -38118,7 +39169,7 @@ index 3f84277..c627c54 100644 return retcode; } EXPORT_SYMBOL(drm_open); -@@ -405,7 +405,7 @@ int drm_release(struct inode *inode, struct file *filp) +@@ -467,7 +467,7 @@ int drm_release(struct inode *inode, struct file *filp) mutex_lock(&drm_global_mutex); @@ -38127,7 +39178,7 @@ index 3f84277..c627c54 100644 if (dev->driver->preclose) dev->driver->preclose(dev, file_priv); -@@ -414,10 +414,10 @@ int drm_release(struct inode *inode, struct file *filp) +@@ -476,10 +476,10 @@ int drm_release(struct inode *inode, struct file *filp) * Begin inline drm_release */ @@ -38140,19 +39191,17 @@ index 3f84277..c627c54 100644 /* Release any auth tokens that might point to this file_priv, (do that under the drm_global_mutex) */ -@@ -516,8 +516,8 @@ int drm_release(struct inode *inode, struct file *filp) +@@ -577,7 +577,7 @@ int drm_release(struct inode *inode, struct file *filp) * End inline drm_release */ -- atomic_inc(&dev->counts[_DRM_STAT_CLOSES]); - if (!--dev->open_count) { -+ atomic_inc_unchecked(&dev->counts[_DRM_STAT_CLOSES]); + if (local_dec_and_test(&dev->open_count)) { if (atomic_read(&dev->ioctl_count)) { DRM_ERROR("Device busy: %d\n", atomic_read(&dev->ioctl_count)); diff --git a/drivers/gpu/drm/drm_global.c b/drivers/gpu/drm/drm_global.c -index f731116..629842c 100644 +index 3d2e91c..d31c4c9 100644 --- a/drivers/gpu/drm/drm_global.c +++ b/drivers/gpu/drm/drm_global.c @@ -36,7 +36,7 @@ @@ -38182,8 +39231,8 @@ index f731116..629842c 100644 } } -@@ -70,7 +70,7 @@ int drm_global_item_ref(struct drm_global_reference *ref) - void *object; +@@ -69,7 +69,7 @@ int drm_global_item_ref(struct drm_global_reference *ref) + struct drm_global_item *item = &glob[ref->global_type]; mutex_lock(&item->mutex); - if (item->refcount == 0) { @@ -38191,16 +39240,16 @@ index f731116..629842c 100644 item->object = kzalloc(ref->size, GFP_KERNEL); if (unlikely(item->object == NULL)) { ret = -ENOMEM; -@@ -83,7 +83,7 @@ int drm_global_item_ref(struct drm_global_reference *ref) +@@ -82,7 +82,7 @@ int drm_global_item_ref(struct drm_global_reference *ref) goto out_err; } - ++item->refcount; + atomic_inc(&item->refcount); ref->object = item->object; - object = item->object; mutex_unlock(&item->mutex); -@@ -100,9 +100,9 @@ void drm_global_item_unref(struct drm_global_reference *ref) + return 0; +@@ -98,9 +98,9 @@ void drm_global_item_unref(struct drm_global_reference *ref) struct drm_global_item *item = &glob[ref->global_type]; mutex_lock(&item->mutex); @@ -38213,7 +39262,7 @@ index f731116..629842c 100644 item->object = NULL; } diff --git a/drivers/gpu/drm/drm_info.c b/drivers/gpu/drm/drm_info.c -index 5329832..b503f49 100644 +index 7d5a152..d7186da 100644 --- a/drivers/gpu/drm/drm_info.c +++ b/drivers/gpu/drm/drm_info.c @@ -75,10 +75,14 @@ int drm_vm_info(struct seq_file *m, void *data) @@ -38308,33 +39357,11 @@ index 2f4c434..dd12cd2 100644 else ret = drm_ioctl(filp, cmd, arg); -diff --git a/drivers/gpu/drm/drm_lock.c b/drivers/gpu/drm/drm_lock.c -index d752c96..fe08455 100644 ---- a/drivers/gpu/drm/drm_lock.c -+++ b/drivers/gpu/drm/drm_lock.c -@@ -86,7 +86,7 @@ int drm_lock(struct drm_device *dev, void *data, struct drm_file *file_priv) - if (drm_lock_take(&master->lock, lock->context)) { - master->lock.file_priv = file_priv; - master->lock.lock_time = jiffies; -- atomic_inc(&dev->counts[_DRM_STAT_LOCKS]); -+ atomic_inc_unchecked(&dev->counts[_DRM_STAT_LOCKS]); - break; /* Got lock */ - } - -@@ -157,7 +157,7 @@ int drm_unlock(struct drm_device *dev, void *data, struct drm_file *file_priv) - return -EINVAL; - } - -- atomic_inc(&dev->counts[_DRM_STAT_UNLOCKS]); -+ atomic_inc_unchecked(&dev->counts[_DRM_STAT_UNLOCKS]); - - if (drm_lock_free(&master->lock, lock->context)) { - /* FIXME: Should really bail out here. */ diff --git a/drivers/gpu/drm/drm_stub.c b/drivers/gpu/drm/drm_stub.c -index 39d8645..59e06fa 100644 +index 66dd3a0..3bed6c4 100644 --- a/drivers/gpu/drm/drm_stub.c +++ b/drivers/gpu/drm/drm_stub.c -@@ -484,7 +484,7 @@ void drm_unplug_dev(struct drm_device *dev) +@@ -403,7 +403,7 @@ void drm_unplug_dev(struct drm_device *dev) drm_device_set_unplugged(dev); @@ -38344,44 +39371,18 @@ index 39d8645..59e06fa 100644 } mutex_unlock(&drm_global_mutex); diff --git a/drivers/gpu/drm/drm_sysfs.c b/drivers/gpu/drm/drm_sysfs.c -index 2290b3b..22056a1 100644 +index c22c309..ae758c3 100644 --- a/drivers/gpu/drm/drm_sysfs.c +++ b/drivers/gpu/drm/drm_sysfs.c -@@ -524,7 +524,7 @@ EXPORT_SYMBOL(drm_sysfs_hotplug_event); +@@ -505,7 +505,7 @@ static void drm_sysfs_release(struct device *dev) + */ int drm_sysfs_device_add(struct drm_minor *minor) { - int err; - char *minor_str; + const char *minor_str; + int r; - minor->kdev.parent = minor->dev->dev; - -diff --git a/drivers/gpu/drm/i810/i810_dma.c b/drivers/gpu/drm/i810/i810_dma.c -index ab1892eb..d7009ca 100644 ---- a/drivers/gpu/drm/i810/i810_dma.c -+++ b/drivers/gpu/drm/i810/i810_dma.c -@@ -944,8 +944,8 @@ static int i810_dma_vertex(struct drm_device *dev, void *data, - dma->buflist[vertex->idx], - vertex->discard, vertex->used); - -- atomic_add(vertex->used, &dev->counts[_DRM_STAT_SECONDARY]); -- atomic_inc(&dev->counts[_DRM_STAT_DMA]); -+ atomic_add_unchecked(vertex->used, &dev->counts[_DRM_STAT_SECONDARY]); -+ atomic_inc_unchecked(&dev->counts[_DRM_STAT_DMA]); - sarea_priv->last_enqueue = dev_priv->counter - 1; - sarea_priv->last_dispatch = (int)hw_status[5]; - -@@ -1105,8 +1105,8 @@ static int i810_dma_mc(struct drm_device *dev, void *data, - i810_dma_dispatch_mc(dev, dma->buflist[mc->idx], mc->used, - mc->last_render); - -- atomic_add(mc->used, &dev->counts[_DRM_STAT_SECONDARY]); -- atomic_inc(&dev->counts[_DRM_STAT_DMA]); -+ atomic_add_unchecked(mc->used, &dev->counts[_DRM_STAT_SECONDARY]); -+ atomic_inc_unchecked(&dev->counts[_DRM_STAT_DMA]); - sarea_priv->last_enqueue = dev_priv->counter - 1; - sarea_priv->last_dispatch = (int)hw_status[5]; - + if (minor->type == DRM_MINOR_CONTROL) diff --git a/drivers/gpu/drm/i810/i810_drv.h b/drivers/gpu/drm/i810/i810_drv.h index d4d16ed..8fb0b51 100644 --- a/drivers/gpu/drm/i810/i810_drv.h @@ -38398,23 +39399,23 @@ index d4d16ed..8fb0b51 100644 int front_offset; } drm_i810_private_t; diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c -index a6f4cb5..6b2beb2 100644 +index 6ed45a9..eb6dc41 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c -@@ -624,7 +624,7 @@ static int i915_interrupt_info(struct seq_file *m, void *data) +@@ -702,7 +702,7 @@ static int i915_interrupt_info(struct seq_file *m, void *data) I915_READ(GTIMR)); } seq_printf(m, "Interrupts received: %d\n", - atomic_read(&dev_priv->irq_received)); + atomic_read_unchecked(&dev_priv->irq_received)); for_each_ring(ring, dev_priv, i) { - if (IS_GEN6(dev) || IS_GEN7(dev)) { + if (INTEL_INFO(dev)->gen >= 6) { seq_printf(m, diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c -index d5c784d..06e5c36 100644 +index 5c64842..f14bdf8 100644 --- a/drivers/gpu/drm/i915/i915_dma.c +++ b/drivers/gpu/drm/i915/i915_dma.c -@@ -1263,7 +1263,7 @@ static bool i915_switcheroo_can_switch(struct pci_dev *pdev) +@@ -1271,7 +1271,7 @@ static bool i915_switcheroo_can_switch(struct pci_dev *pdev) bool can_switch; spin_lock(&dev->count_lock); @@ -38424,10 +39425,10 @@ index d5c784d..06e5c36 100644 return can_switch; } diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h -index ab0f2c0..53c1bda 100644 +index 90fcccb..b8aabc9 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h -@@ -1181,7 +1181,7 @@ typedef struct drm_i915_private { +@@ -1325,7 +1325,7 @@ typedef struct drm_i915_private { drm_dma_handle_t *status_page_dmah; struct resource mch_res; @@ -38437,10 +39438,10 @@ index ab0f2c0..53c1bda 100644 /* protects the irq masks */ spinlock_t irq_lock; diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c -index bf34577..3fd2ffa 100644 +index a3ba9a8..ee52ddd 100644 --- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c +++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c -@@ -768,9 +768,9 @@ i915_gem_check_execbuffer(struct drm_i915_gem_execbuffer2 *exec) +@@ -861,9 +861,9 @@ i915_gem_check_execbuffer(struct drm_i915_gem_execbuffer2 *exec) static int validate_exec_list(struct drm_i915_gem_exec_object2 *exec, @@ -38449,8 +39450,8 @@ index bf34577..3fd2ffa 100644 { - int i; + unsigned int i; - int relocs_total = 0; - int relocs_max = INT_MAX / sizeof(struct drm_i915_gem_relocation_entry); + unsigned relocs_total = 0; + unsigned relocs_max = UINT_MAX / sizeof(struct drm_i915_gem_relocation_entry); diff --git a/drivers/gpu/drm/i915/i915_ioc32.c b/drivers/gpu/drm/i915/i915_ioc32.c index 3c59584..500f2e9 100644 @@ -38488,10 +39489,10 @@ index 3c59584..500f2e9 100644 return ret; diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c -index 4b91228..590c643 100644 +index f13d5ed..8e6f36d 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c -@@ -1085,7 +1085,7 @@ static irqreturn_t valleyview_irq_handler(int irq, void *arg) +@@ -1420,7 +1420,7 @@ static irqreturn_t valleyview_irq_handler(int irq, void *arg) int pipe; u32 pipe_stats[I915_MAX_PIPES]; @@ -38500,16 +39501,25 @@ index 4b91228..590c643 100644 while (true) { iir = I915_READ(VLV_IIR); -@@ -1390,7 +1390,7 @@ static irqreturn_t ironlake_irq_handler(int irq, void *arg) +@@ -1730,7 +1730,7 @@ static irqreturn_t ironlake_irq_handler(int irq, void *arg) + u32 de_iir, gt_iir, de_ier, sde_ier = 0; irqreturn_t ret = IRQ_NONE; - bool err_int_reenable = false; - atomic_inc(&dev_priv->irq_received); + atomic_inc_unchecked(&dev_priv->irq_received); /* We get interrupts on unclaimed registers, so check for this before we * do any I915_{READ,WRITE}. */ -@@ -2146,7 +2146,7 @@ static void ironlake_irq_preinstall(struct drm_device *dev) +@@ -1800,7 +1800,7 @@ static irqreturn_t gen8_irq_handler(int irq, void *arg) + uint32_t tmp = 0; + enum pipe pipe; + +- atomic_inc(&dev_priv->irq_received); ++ atomic_inc_unchecked(&dev_priv->irq_received); + + master_ctl = I915_READ(GEN8_MASTER_IRQ); + master_ctl &= ~GEN8_MASTER_IRQ_CONTROL; +@@ -2624,7 +2624,7 @@ static void ironlake_irq_preinstall(struct drm_device *dev) { drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; @@ -38518,7 +39528,7 @@ index 4b91228..590c643 100644 I915_WRITE(HWSTAM, 0xeffe); -@@ -2164,7 +2164,7 @@ static void valleyview_irq_preinstall(struct drm_device *dev) +@@ -2642,7 +2642,7 @@ static void valleyview_irq_preinstall(struct drm_device *dev) drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; int pipe; @@ -38527,7 +39537,25 @@ index 4b91228..590c643 100644 /* VLV magic */ I915_WRITE(VLV_IMR, 0); -@@ -2452,7 +2452,7 @@ static void i8xx_irq_preinstall(struct drm_device * dev) +@@ -2673,7 +2673,7 @@ static void gen8_irq_preinstall(struct drm_device *dev) + struct drm_i915_private *dev_priv = dev->dev_private; + int pipe; + +- atomic_set(&dev_priv->irq_received, 0); ++ atomic_set_unchecked(&dev_priv->irq_received, 0); + + I915_WRITE(GEN8_MASTER_IRQ, 0); + POSTING_READ(GEN8_MASTER_IRQ); +@@ -2999,7 +2999,7 @@ static void gen8_irq_uninstall(struct drm_device *dev) + if (!dev_priv) + return; + +- atomic_set(&dev_priv->irq_received, 0); ++ atomic_set_unchecked(&dev_priv->irq_received, 0); + + I915_WRITE(GEN8_MASTER_IRQ, 0); + +@@ -3093,7 +3093,7 @@ static void i8xx_irq_preinstall(struct drm_device * dev) drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; int pipe; @@ -38536,7 +39564,7 @@ index 4b91228..590c643 100644 for_each_pipe(pipe) I915_WRITE(PIPESTAT(pipe), 0); -@@ -2530,7 +2530,7 @@ static irqreturn_t i8xx_irq_handler(int irq, void *arg) +@@ -3179,7 +3179,7 @@ static irqreturn_t i8xx_irq_handler(int irq, void *arg) I915_DISPLAY_PLANE_A_FLIP_PENDING_INTERRUPT | I915_DISPLAY_PLANE_B_FLIP_PENDING_INTERRUPT; @@ -38545,7 +39573,7 @@ index 4b91228..590c643 100644 iir = I915_READ16(IIR); if (iir == 0) -@@ -2604,7 +2604,7 @@ static void i915_irq_preinstall(struct drm_device * dev) +@@ -3254,7 +3254,7 @@ static void i915_irq_preinstall(struct drm_device * dev) drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; int pipe; @@ -38554,7 +39582,7 @@ index 4b91228..590c643 100644 if (I915_HAS_HOTPLUG(dev)) { I915_WRITE(PORT_HOTPLUG_EN, 0); -@@ -2703,7 +2703,7 @@ static irqreturn_t i915_irq_handler(int irq, void *arg) +@@ -3361,7 +3361,7 @@ static irqreturn_t i915_irq_handler(int irq, void *arg) I915_DISPLAY_PLANE_B_FLIP_PENDING_INTERRUPT; int pipe, ret = IRQ_NONE; @@ -38563,7 +39591,7 @@ index 4b91228..590c643 100644 iir = I915_READ(IIR); do { -@@ -2827,7 +2827,7 @@ static void i965_irq_preinstall(struct drm_device * dev) +@@ -3488,7 +3488,7 @@ static void i965_irq_preinstall(struct drm_device * dev) drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; int pipe; @@ -38572,7 +39600,7 @@ index 4b91228..590c643 100644 I915_WRITE(PORT_HOTPLUG_EN, 0); I915_WRITE(PORT_HOTPLUG_STAT, I915_READ(PORT_HOTPLUG_STAT)); -@@ -2941,7 +2941,7 @@ static irqreturn_t i965_irq_handler(int irq, void *arg) +@@ -3604,7 +3604,7 @@ static irqreturn_t i965_irq_handler(int irq, void *arg) I915_DISPLAY_PLANE_A_FLIP_PENDING_INTERRUPT | I915_DISPLAY_PLANE_B_FLIP_PENDING_INTERRUPT; @@ -38582,10 +39610,10 @@ index 4b91228..590c643 100644 iir = I915_READ(IIR); diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c -index 333aa1b..0183e38 100644 +index 2bde35d..529646c 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c -@@ -9976,13 +9976,13 @@ struct intel_quirk { +@@ -10492,13 +10492,13 @@ struct intel_quirk { int subsystem_vendor; int subsystem_device; void (*hook)(struct drm_device *dev); @@ -38601,7 +39629,7 @@ index 333aa1b..0183e38 100644 static int intel_dmi_reverse_brightness(const struct dmi_system_id *id) { -@@ -9990,18 +9990,20 @@ static int intel_dmi_reverse_brightness(const struct dmi_system_id *id) +@@ -10506,18 +10506,20 @@ static int intel_dmi_reverse_brightness(const struct dmi_system_id *id) return 1; } @@ -38684,7 +39712,7 @@ index 709e90d..89a1c0d 100644 return ret; diff --git a/drivers/gpu/drm/mga/mga_irq.c b/drivers/gpu/drm/mga/mga_irq.c -index 598c281..60d590e 100644 +index 2b0ceb8..517e99e 100644 --- a/drivers/gpu/drm/mga/mga_irq.c +++ b/drivers/gpu/drm/mga/mga_irq.c @@ -43,7 +43,7 @@ u32 mga_get_vblank_counter(struct drm_device *dev, int crtc) @@ -38724,7 +39752,7 @@ index 598c281..60d590e 100644 *sequence = cur_fence; diff --git a/drivers/gpu/drm/nouveau/nouveau_bios.c b/drivers/gpu/drm/nouveau/nouveau_bios.c -index 3e72876..d1c15ad 100644 +index 4c3feaa..26391ce 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bios.c +++ b/drivers/gpu/drm/nouveau/nouveau_bios.c @@ -965,7 +965,7 @@ static int parse_bit_tmds_tbl_entry(struct drm_device *dev, struct nvbios *bios, @@ -38737,10 +39765,10 @@ index 3e72876..d1c15ad 100644 #define BIT_TABLE(id, funcid) ((struct bit_table){ id, parse_bit_##funcid##_tbl_entry }) diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.h b/drivers/gpu/drm/nouveau/nouveau_drm.h -index 994fd6e..6e12565 100644 +index 4b0fb6c..67667a9 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drm.h +++ b/drivers/gpu/drm/nouveau/nouveau_drm.h -@@ -94,7 +94,6 @@ struct nouveau_drm { +@@ -96,7 +96,6 @@ struct nouveau_drm { struct drm_global_reference mem_global_ref; struct ttm_bo_global_ref bo_global_ref; struct ttm_bo_device bdev; @@ -38761,6 +39789,61 @@ index c1a7e5a..38b8539 100644 int ret; if (nr < DRM_COMMAND_BASE) +diff --git a/drivers/gpu/drm/nouveau/nouveau_ttm.c b/drivers/gpu/drm/nouveau/nouveau_ttm.c +index 19e3757..ad16478 100644 +--- a/drivers/gpu/drm/nouveau/nouveau_ttm.c ++++ b/drivers/gpu/drm/nouveau/nouveau_ttm.c +@@ -130,11 +130,11 @@ nouveau_vram_manager_debug(struct ttm_mem_type_manager *man, const char *prefix) + } + + const struct ttm_mem_type_manager_func nouveau_vram_manager = { +- nouveau_vram_manager_init, +- nouveau_vram_manager_fini, +- nouveau_vram_manager_new, +- nouveau_vram_manager_del, +- nouveau_vram_manager_debug ++ .init = nouveau_vram_manager_init, ++ .takedown = nouveau_vram_manager_fini, ++ .get_node = nouveau_vram_manager_new, ++ .put_node = nouveau_vram_manager_del, ++ .debug = nouveau_vram_manager_debug + }; + + static int +@@ -198,11 +198,11 @@ nouveau_gart_manager_debug(struct ttm_mem_type_manager *man, const char *prefix) + } + + const struct ttm_mem_type_manager_func nouveau_gart_manager = { +- nouveau_gart_manager_init, +- nouveau_gart_manager_fini, +- nouveau_gart_manager_new, +- nouveau_gart_manager_del, +- nouveau_gart_manager_debug ++ .init = nouveau_gart_manager_init, ++ .takedown = nouveau_gart_manager_fini, ++ .get_node = nouveau_gart_manager_new, ++ .put_node = nouveau_gart_manager_del, ++ .debug = nouveau_gart_manager_debug + }; + + #include +@@ -270,11 +270,11 @@ nv04_gart_manager_debug(struct ttm_mem_type_manager *man, const char *prefix) + } + + const struct ttm_mem_type_manager_func nv04_gart_manager = { +- nv04_gart_manager_init, +- nv04_gart_manager_fini, +- nv04_gart_manager_new, +- nv04_gart_manager_del, +- nv04_gart_manager_debug ++ .init = nv04_gart_manager_init, ++ .takedown = nv04_gart_manager_fini, ++ .get_node = nv04_gart_manager_new, ++ .put_node = nv04_gart_manager_del, ++ .debug = nv04_gart_manager_debug + }; + + int diff --git a/drivers/gpu/drm/nouveau/nouveau_vga.c b/drivers/gpu/drm/nouveau/nouveau_vga.c index 81638d7..2e45854 100644 --- a/drivers/gpu/drm/nouveau/nouveau_vga.c @@ -38832,7 +39915,7 @@ index c3c2bbd..bc3c0fb 100644 return 0; } diff --git a/drivers/gpu/drm/qxl/qxl_drv.h b/drivers/gpu/drm/qxl/qxl_drv.h -index f7c9add..fb971d2 100644 +index 7bda32f..dd98fc5 100644 --- a/drivers/gpu/drm/qxl/qxl_drv.h +++ b/drivers/gpu/drm/qxl/qxl_drv.h @@ -290,10 +290,10 @@ struct qxl_device { @@ -38850,6 +39933,37 @@ index f7c9add..fb971d2 100644 unsigned irq_received_error; wait_queue_head_t display_event; wait_queue_head_t cursor_event; +diff --git a/drivers/gpu/drm/qxl/qxl_ioctl.c b/drivers/gpu/drm/qxl/qxl_ioctl.c +index 7b95c75..9cffb4f 100644 +--- a/drivers/gpu/drm/qxl/qxl_ioctl.c ++++ b/drivers/gpu/drm/qxl/qxl_ioctl.c +@@ -181,7 +181,7 @@ static int qxl_process_single_command(struct qxl_device *qdev, + + /* TODO copy slow path code from i915 */ + fb_cmd = qxl_bo_kmap_atomic_page(qdev, cmd_bo, (release->release_offset & PAGE_SIZE)); +- unwritten = __copy_from_user_inatomic_nocache(fb_cmd + sizeof(union qxl_release_info) + (release->release_offset & ~PAGE_SIZE), (void *)(unsigned long)cmd->command, cmd->command_size); ++ unwritten = __copy_from_user_inatomic_nocache(fb_cmd + sizeof(union qxl_release_info) + (release->release_offset & ~PAGE_SIZE), (void __force_user *)(unsigned long)cmd->command, cmd->command_size); + + { + struct qxl_drawable *draw = fb_cmd; +@@ -201,7 +201,7 @@ static int qxl_process_single_command(struct qxl_device *qdev, + struct drm_qxl_reloc reloc; + + if (DRM_COPY_FROM_USER(&reloc, +- &((struct drm_qxl_reloc *)(uintptr_t)cmd->relocs)[i], ++ &((struct drm_qxl_reloc __force_user *)(uintptr_t)cmd->relocs)[i], + sizeof(reloc))) { + ret = -EFAULT; + goto out_free_bos; +@@ -297,7 +297,7 @@ static int qxl_execbuffer_ioctl(struct drm_device *dev, void *data, + struct drm_qxl_command *commands = + (struct drm_qxl_command *)(uintptr_t)execbuffer->commands; + +- if (DRM_COPY_FROM_USER(&user_cmd, &commands[cmd_num], ++ if (DRM_COPY_FROM_USER(&user_cmd, (struct drm_qxl_command __force_user *)&commands[cmd_num], + sizeof(user_cmd))) + return -EFAULT; + diff --git a/drivers/gpu/drm/qxl/qxl_irq.c b/drivers/gpu/drm/qxl/qxl_irq.c index 21393dc..329f3a9 100644 --- a/drivers/gpu/drm/qxl/qxl_irq.c @@ -38894,7 +40008,7 @@ index 21393dc..329f3a9 100644 ret = drm_irq_install(qdev->ddev); qdev->ram_header->int_mask = QXL_INTERRUPT_MASK; diff --git a/drivers/gpu/drm/qxl/qxl_ttm.c b/drivers/gpu/drm/qxl/qxl_ttm.c -index 037786d..2a95e33 100644 +index c7e7e65..7dddd4d 100644 --- a/drivers/gpu/drm/qxl/qxl_ttm.c +++ b/drivers/gpu/drm/qxl/qxl_ttm.c @@ -103,7 +103,7 @@ static void qxl_ttm_global_fini(struct qxl_device *qdev) @@ -38917,7 +40031,7 @@ index 037786d..2a95e33 100644 } vma->vm_ops = &qxl_ttm_vm_ops; return 0; -@@ -558,25 +560,23 @@ static int qxl_mm_dump_table(struct seq_file *m, void *data) +@@ -560,25 +562,23 @@ static int qxl_mm_dump_table(struct seq_file *m, void *data) static int qxl_ttm_debugfs_init(struct qxl_device *qdev) { #if defined(CONFIG_DEBUG_FS) @@ -39088,10 +40202,10 @@ index af85299..ed9ac8d 100644 if (regcomp (&mask_rex, "(0x[0-9a-fA-F]*) *([_a-zA-Z0-9]*)", REG_EXTENDED)) { diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c -index 841d0e0..9eaa268 100644 +index 39b033b..6efc056 100644 --- a/drivers/gpu/drm/radeon/radeon_device.c +++ b/drivers/gpu/drm/radeon/radeon_device.c -@@ -1117,7 +1117,7 @@ static bool radeon_switcheroo_can_switch(struct pci_dev *pdev) +@@ -1120,7 +1120,7 @@ static bool radeon_switcheroo_can_switch(struct pci_dev *pdev) bool can_switch; spin_lock(&dev->count_lock); @@ -39101,10 +40215,10 @@ index 841d0e0..9eaa268 100644 return can_switch; } diff --git a/drivers/gpu/drm/radeon/radeon_drv.h b/drivers/gpu/drm/radeon/radeon_drv.h -index b369d42..8dd04eb 100644 +index 00e0d44..08381a4 100644 --- a/drivers/gpu/drm/radeon/radeon_drv.h +++ b/drivers/gpu/drm/radeon/radeon_drv.h -@@ -258,7 +258,7 @@ typedef struct drm_radeon_private { +@@ -262,7 +262,7 @@ typedef struct drm_radeon_private { /* SW interrupt */ wait_queue_head_t swi_queue; @@ -39114,7 +40228,7 @@ index b369d42..8dd04eb 100644 uint32_t irq_enable_reg; uint32_t r500_disp_irq_reg; diff --git a/drivers/gpu/drm/radeon/radeon_ioc32.c b/drivers/gpu/drm/radeon/radeon_ioc32.c -index c180df8..5fd8186 100644 +index bdb0f93..5ff558f 100644 --- a/drivers/gpu/drm/radeon/radeon_ioc32.c +++ b/drivers/gpu/drm/radeon/radeon_ioc32.c @@ -358,7 +358,7 @@ static int compat_radeon_cp_setparam(struct file *file, unsigned int cmd, @@ -39291,23 +40405,52 @@ index 71245d6..94c556d 100644 #endif return radeon_debugfs_add_files(rdev, radeon_mem_types_list, i); -diff --git a/drivers/gpu/drm/radeon/rs690.c b/drivers/gpu/drm/radeon/rs690.c -index 1447d79..40b2a5b 100644 ---- a/drivers/gpu/drm/radeon/rs690.c -+++ b/drivers/gpu/drm/radeon/rs690.c -@@ -345,9 +345,11 @@ static void rs690_crtc_bandwidth_compute(struct radeon_device *rdev, - if (max_bandwidth.full > rdev->pm.sideport_bandwidth.full && - rdev->pm.sideport_bandwidth.full) - max_bandwidth = rdev->pm.sideport_bandwidth; -- read_delay_latency.full = dfixed_const(370 * 800 * 1000); -+ read_delay_latency.full = dfixed_const(800 * 1000); - read_delay_latency.full = dfixed_div(read_delay_latency, - rdev->pm.igp_sideport_mclk); -+ a.full = dfixed_const(370); -+ read_delay_latency.full = dfixed_mul(read_delay_latency, a); - } else { - if (max_bandwidth.full > rdev->pm.k8_bandwidth.full && - rdev->pm.k8_bandwidth.full) +diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c +index ae1cb31..5b5b6b7c 100644 +--- a/drivers/gpu/drm/tegra/dc.c ++++ b/drivers/gpu/drm/tegra/dc.c +@@ -1064,7 +1064,7 @@ static int tegra_dc_debugfs_init(struct tegra_dc *dc, struct drm_minor *minor) + } + + for (i = 0; i < ARRAY_SIZE(debugfs_files); i++) +- dc->debugfs_files[i].data = dc; ++ *(void **)&dc->debugfs_files[i].data = dc; + + err = drm_debugfs_create_files(dc->debugfs_files, + ARRAY_SIZE(debugfs_files), +diff --git a/drivers/gpu/drm/tegra/hdmi.c b/drivers/gpu/drm/tegra/hdmi.c +index 0cd9bc2..9759be4 100644 +--- a/drivers/gpu/drm/tegra/hdmi.c ++++ b/drivers/gpu/drm/tegra/hdmi.c +@@ -57,7 +57,7 @@ struct tegra_hdmi { + bool stereo; + bool dvi; + +- struct drm_info_list *debugfs_files; ++ drm_info_list_no_const *debugfs_files; + struct drm_minor *minor; + struct dentry *debugfs; + }; +diff --git a/drivers/gpu/drm/ttm/ttm_bo_manager.c b/drivers/gpu/drm/ttm/ttm_bo_manager.c +index c58eba33..83c2728 100644 +--- a/drivers/gpu/drm/ttm/ttm_bo_manager.c ++++ b/drivers/gpu/drm/ttm/ttm_bo_manager.c +@@ -141,10 +141,10 @@ static void ttm_bo_man_debug(struct ttm_mem_type_manager *man, + } + + const struct ttm_mem_type_manager_func ttm_bo_manager_func = { +- ttm_bo_man_init, +- ttm_bo_man_takedown, +- ttm_bo_man_get_node, +- ttm_bo_man_put_node, +- ttm_bo_man_debug ++ .init = ttm_bo_man_init, ++ .takedown = ttm_bo_man_takedown, ++ .get_node = ttm_bo_man_get_node, ++ .put_node = ttm_bo_man_put_node, ++ .debug = ttm_bo_man_debug + }; + EXPORT_SYMBOL(ttm_bo_manager_func); diff --git a/drivers/gpu/drm/ttm/ttm_memory.c b/drivers/gpu/drm/ttm/ttm_memory.c index dbc2def..0a9f710 100644 --- a/drivers/gpu/drm/ttm/ttm_memory.c @@ -39455,10 +40598,10 @@ index ac98964..5dbf512 100644 case VIA_IRQ_ABSOLUTE: break; diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h -index 150ec64..f5165f2 100644 +index 20890ad..699e4f2 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h -@@ -290,7 +290,7 @@ struct vmw_private { +@@ -342,7 +342,7 @@ struct vmw_private { * Fencing and IRQs. */ @@ -39507,11 +40650,30 @@ index 3eb1486..0a47ee9 100644 } while (*seqno == 0); if (!(fifo_state->capabilities & SVGA_FIFO_CAP_FENCE)) { +diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_gmrid_manager.c b/drivers/gpu/drm/vmwgfx/vmwgfx_gmrid_manager.c +index c5c054a..46f0548 100644 +--- a/drivers/gpu/drm/vmwgfx/vmwgfx_gmrid_manager.c ++++ b/drivers/gpu/drm/vmwgfx/vmwgfx_gmrid_manager.c +@@ -153,9 +153,9 @@ static void vmw_gmrid_man_debug(struct ttm_mem_type_manager *man, + } + + const struct ttm_mem_type_manager_func vmw_gmrid_manager_func = { +- vmw_gmrid_man_init, +- vmw_gmrid_man_takedown, +- vmw_gmrid_man_get_node, +- vmw_gmrid_man_put_node, +- vmw_gmrid_man_debug ++ .init = vmw_gmrid_man_init, ++ .takedown = vmw_gmrid_man_takedown, ++ .get_node = vmw_gmrid_man_get_node, ++ .put_node = vmw_gmrid_man_put_node, ++ .debug = vmw_gmrid_man_debug + }; diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c b/drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c -index c509d40..3b640c3 100644 +index 45d5b5a..f3f5e4e 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c -@@ -138,7 +138,7 @@ int vmw_present_ioctl(struct drm_device *dev, void *data, +@@ -141,7 +141,7 @@ int vmw_present_ioctl(struct drm_device *dev, void *data, int ret; num_clips = arg->num_clips; @@ -39520,7 +40682,7 @@ index c509d40..3b640c3 100644 if (unlikely(num_clips == 0)) return 0; -@@ -222,7 +222,7 @@ int vmw_present_readback_ioctl(struct drm_device *dev, void *data, +@@ -225,7 +225,7 @@ int vmw_present_readback_ioctl(struct drm_device *dev, void *data, int ret; num_clips = arg->num_clips; @@ -39564,19 +40726,6 @@ index 8a8725c2..afed796 100644 else { marker = list_first_entry(&queue->head, struct vmw_marker, head); -diff --git a/drivers/gpu/host1x/drm/dc.c b/drivers/gpu/host1x/drm/dc.c -index b1a05ad..1c9d899 100644 ---- a/drivers/gpu/host1x/drm/dc.c -+++ b/drivers/gpu/host1x/drm/dc.c -@@ -1004,7 +1004,7 @@ static int tegra_dc_debugfs_init(struct tegra_dc *dc, struct drm_minor *minor) - } - - for (i = 0; i < ARRAY_SIZE(debugfs_files); i++) -- dc->debugfs_files[i].data = dc; -+ *(void **)&dc->debugfs_files[i].data = dc; - - err = drm_debugfs_create_files(dc->debugfs_files, - ARRAY_SIZE(debugfs_files), diff --git a/drivers/gpu/vga/vga_switcheroo.c b/drivers/gpu/vga/vga_switcheroo.c index ec0ae2d..dc0780b 100644 --- a/drivers/gpu/vga/vga_switcheroo.c @@ -39600,10 +40749,10 @@ index ec0ae2d..dc0780b 100644 /* copy over all the bus versions */ if (dev->bus && dev->bus->pm) { diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c -index c08b5c1..6c3d50b 100644 +index 253fe23..0dfec5f 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c -@@ -2415,7 +2415,7 @@ EXPORT_SYMBOL_GPL(hid_ignore); +@@ -2416,7 +2416,7 @@ EXPORT_SYMBOL_GPL(hid_ignore); int hid_add_device(struct hid_device *hdev) { @@ -39612,7 +40761,7 @@ index c08b5c1..6c3d50b 100644 int ret; if (WARN_ON(hdev->status & HID_STAT_ADDED)) -@@ -2449,7 +2449,7 @@ int hid_add_device(struct hid_device *hdev) +@@ -2450,7 +2450,7 @@ int hid_add_device(struct hid_device *hdev) /* XXX hack, any other cleaner solution after the driver core * is converted to allow more than 20 bytes as the device name? */ dev_set_name(&hdev->dev, "%04X:%04X:%04X.%04X", hdev->bus, @@ -39666,10 +40815,10 @@ index cedc6da..2c3da2a 100644 if (atomic_read(&uhid->report_done)) goto unlock; diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c -index 6de6c98..18319e9 100644 +index cea623c..73011b0 100644 --- a/drivers/hv/channel.c +++ b/drivers/hv/channel.c -@@ -406,8 +406,8 @@ int vmbus_establish_gpadl(struct vmbus_channel *channel, void *kbuffer, +@@ -362,8 +362,8 @@ int vmbus_establish_gpadl(struct vmbus_channel *channel, void *kbuffer, int ret = 0; int t; @@ -39681,7 +40830,7 @@ index 6de6c98..18319e9 100644 ret = create_gpadl_header(kbuffer, size, &msginfo, &msgcount); if (ret) diff --git a/drivers/hv/hv.c b/drivers/hv/hv.c -index 88f4096..e50452e 100644 +index f0c5e07..399256e 100644 --- a/drivers/hv/hv.c +++ b/drivers/hv/hv.c @@ -112,7 +112,7 @@ static u64 do_hypercall(u64 control, void *input, void *output) @@ -39779,10 +40928,10 @@ index 7e17a54..a50a33d 100644 cap_msg.caps.cap_bits.balloon = 1; cap_msg.caps.cap_bits.hot_add = 1; diff --git a/drivers/hv/hyperv_vmbus.h b/drivers/hv/hyperv_vmbus.h -index d84918f..7f38f9f 100644 +index e055176..c22ff1f 100644 --- a/drivers/hv/hyperv_vmbus.h +++ b/drivers/hv/hyperv_vmbus.h -@@ -595,7 +595,7 @@ enum vmbus_connect_state { +@@ -602,7 +602,7 @@ enum vmbus_connect_state { struct vmbus_connection { enum vmbus_connect_state conn_state; @@ -39792,10 +40941,10 @@ index d84918f..7f38f9f 100644 /* * Represents channel interrupts. Each bit position represents a diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c -index f9fe46f..356b119 100644 +index 48aad4f..c768fb2 100644 --- a/drivers/hv/vmbus_drv.c +++ b/drivers/hv/vmbus_drv.c -@@ -672,10 +672,10 @@ int vmbus_device_register(struct hv_device *child_device_obj) +@@ -846,10 +846,10 @@ int vmbus_device_register(struct hv_device *child_device_obj) { int ret = 0; @@ -39809,7 +40958,7 @@ index f9fe46f..356b119 100644 child_device_obj->device.bus = &hv_bus; child_device_obj->device.parent = &hv_acpi_dev->dev; diff --git a/drivers/hwmon/acpi_power_meter.c b/drivers/hwmon/acpi_power_meter.c -index a9e3d01..9dd246e 100644 +index 6a34f7f..aa4c3a6 100644 --- a/drivers/hwmon/acpi_power_meter.c +++ b/drivers/hwmon/acpi_power_meter.c @@ -117,7 +117,7 @@ struct sensor_template { @@ -39821,7 +40970,7 @@ index a9e3d01..9dd246e 100644 /* Averaging interval */ static int update_avg_interval(struct acpi_power_meter_resource *resource) -@@ -629,7 +629,7 @@ static int register_attrs(struct acpi_power_meter_resource *resource, +@@ -632,7 +632,7 @@ static int register_attrs(struct acpi_power_meter_resource *resource, struct sensor_template *attrs) { struct device *dev = &resource->acpi_dev->dev; @@ -39844,10 +40993,10 @@ index 3288f13..71cfb4e 100644 for (grp = groups; grp->format; grp++) { diff --git a/drivers/hwmon/asus_atk0110.c b/drivers/hwmon/asus_atk0110.c -index b25c643..a13460d 100644 +index dafc63c..4abb96c 100644 --- a/drivers/hwmon/asus_atk0110.c +++ b/drivers/hwmon/asus_atk0110.c -@@ -152,10 +152,10 @@ MODULE_DEVICE_TABLE(acpi, atk_ids); +@@ -151,10 +151,10 @@ MODULE_DEVICE_TABLE(acpi, atk_ids); struct atk_sensor_data { struct list_head list; struct atk_data *data; @@ -39862,7 +41011,7 @@ index b25c643..a13460d 100644 char label_attr_name[ATTR_NAME_SIZE]; char input_attr_name[ATTR_NAME_SIZE]; char limit1_attr_name[ATTR_NAME_SIZE]; -@@ -275,7 +275,7 @@ static ssize_t atk_name_show(struct device *dev, +@@ -274,7 +274,7 @@ static ssize_t atk_name_show(struct device *dev, static struct device_attribute atk_name_attr = __ATTR(name, 0444, atk_name_show, NULL); @@ -39872,7 +41021,7 @@ index b25c643..a13460d 100644 { sysfs_attr_init(&attr->attr); diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c -index 78be661..4dd032f 100644 +index 9425098..7646cc5 100644 --- a/drivers/hwmon/coretemp.c +++ b/drivers/hwmon/coretemp.c @@ -797,7 +797,7 @@ static int coretemp_cpu_callback(struct notifier_block *nfb, @@ -39911,10 +41060,10 @@ index 708081b..fe2d4ab 100644 int in_i = 1, temp_i = 1, curr_i = 1; enum iio_chan_type type; diff --git a/drivers/hwmon/nct6775.c b/drivers/hwmon/nct6775.c -index 6eb03ce..bea7e3e 100644 +index cf811c1..4c17110 100644 --- a/drivers/hwmon/nct6775.c +++ b/drivers/hwmon/nct6775.c -@@ -936,10 +936,10 @@ static struct attribute_group * +@@ -944,10 +944,10 @@ static struct attribute_group * nct6775_create_attr_group(struct device *dev, struct sensor_template_group *tg, int repeat) { @@ -39927,12 +41076,12 @@ index 6eb03ce..bea7e3e 100644 + sensor_device_attribute_2_no_const *a2; struct attribute **attrs; struct sensor_device_template **t; - int err, i, j, count; + int i, count; diff --git a/drivers/hwmon/pmbus/pmbus_core.c b/drivers/hwmon/pmbus/pmbus_core.c -index 9319fcf..189ff45 100644 +index 3cbf66e..8c5cc2a 100644 --- a/drivers/hwmon/pmbus/pmbus_core.c +++ b/drivers/hwmon/pmbus/pmbus_core.c -@@ -781,7 +781,7 @@ static int pmbus_add_attribute(struct pmbus_data *data, struct attribute *attr) +@@ -782,7 +782,7 @@ static int pmbus_add_attribute(struct pmbus_data *data, struct attribute *attr) return 0; } @@ -39941,7 +41090,7 @@ index 9319fcf..189ff45 100644 const char *name, umode_t mode, ssize_t (*show)(struct device *dev, -@@ -798,7 +798,7 @@ static void pmbus_dev_attr_init(struct device_attribute *dev_attr, +@@ -799,7 +799,7 @@ static void pmbus_dev_attr_init(struct device_attribute *dev_attr, dev_attr->store = store; } @@ -39950,7 +41099,7 @@ index 9319fcf..189ff45 100644 const char *name, umode_t mode, ssize_t (*show)(struct device *dev, -@@ -820,7 +820,7 @@ static int pmbus_add_boolean(struct pmbus_data *data, +@@ -821,7 +821,7 @@ static int pmbus_add_boolean(struct pmbus_data *data, u16 reg, u8 mask) { struct pmbus_boolean *boolean; @@ -39959,7 +41108,7 @@ index 9319fcf..189ff45 100644 boolean = devm_kzalloc(data->dev, sizeof(*boolean), GFP_KERNEL); if (!boolean) -@@ -845,7 +845,7 @@ static struct pmbus_sensor *pmbus_add_sensor(struct pmbus_data *data, +@@ -846,7 +846,7 @@ static struct pmbus_sensor *pmbus_add_sensor(struct pmbus_data *data, bool update, bool readonly) { struct pmbus_sensor *sensor; @@ -39968,7 +41117,7 @@ index 9319fcf..189ff45 100644 sensor = devm_kzalloc(data->dev, sizeof(*sensor), GFP_KERNEL); if (!sensor) -@@ -876,7 +876,7 @@ static int pmbus_add_label(struct pmbus_data *data, +@@ -877,7 +877,7 @@ static int pmbus_add_label(struct pmbus_data *data, const char *lstring, int index) { struct pmbus_label *label; @@ -40056,10 +41205,10 @@ index 07f01ac..d79ad3d 100644 /* Wrapper access functions for multiplexed SMBus */ static DEFINE_MUTEX(amd756_lock); diff --git a/drivers/i2c/busses/i2c-diolan-u2c.c b/drivers/i2c/busses/i2c-diolan-u2c.c -index dae3ddf..26e21d1 100644 +index 721f7eb..0fd2a09 100644 --- a/drivers/i2c/busses/i2c-diolan-u2c.c +++ b/drivers/i2c/busses/i2c-diolan-u2c.c -@@ -99,7 +99,7 @@ MODULE_PARM_DESC(frequency, "I2C clock frequency in hertz"); +@@ -98,7 +98,7 @@ MODULE_PARM_DESC(frequency, "I2C clock frequency in hertz"); /* usb layer */ /* Send command to device, and get response. */ @@ -40082,10 +41231,10 @@ index 2ca268d..c6acbdf 100644 /* Wrapper access functions for multiplexed SMBus */ static DEFINE_MUTEX(nforce2_lock); diff --git a/drivers/i2c/i2c-dev.c b/drivers/i2c/i2c-dev.c -index c3ccdea..5b3dc1a 100644 +index 80b47e8..1a6040d9 100644 --- a/drivers/i2c/i2c-dev.c +++ b/drivers/i2c/i2c-dev.c -@@ -271,7 +271,7 @@ static noinline int i2cdev_ioctl_rdrw(struct i2c_client *client, +@@ -277,7 +277,7 @@ static noinline int i2cdev_ioctl_rdrw(struct i2c_client *client, break; } @@ -40108,10 +41257,10 @@ index 0b510ba..4fbb5085 100644 } } diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c -index f95c697..0a1b05c 100644 +index 18f72e3..3722327 100644 --- a/drivers/iio/industrialio-core.c +++ b/drivers/iio/industrialio-core.c -@@ -506,7 +506,7 @@ static ssize_t iio_write_channel_info(struct device *dev, +@@ -521,7 +521,7 @@ static ssize_t iio_write_channel_info(struct device *dev, } static @@ -40121,7 +41270,7 @@ index f95c697..0a1b05c 100644 struct iio_chan_spec const *chan, ssize_t (*readfunc)(struct device *dev, diff --git a/drivers/infiniband/core/cm.c b/drivers/infiniband/core/cm.c -index 784b97c..c9ceadf 100644 +index f2ef7ef..743d02f 100644 --- a/drivers/infiniband/core/cm.c +++ b/drivers/infiniband/core/cm.c @@ -114,7 +114,7 @@ static char const counter_group_names[CM_COUNTER_GROUPS] @@ -40133,7 +41282,7 @@ index 784b97c..c9ceadf 100644 }; struct cm_counter_attribute { -@@ -1395,7 +1395,7 @@ static void cm_dup_req_handler(struct cm_work *work, +@@ -1392,7 +1392,7 @@ static void cm_dup_req_handler(struct cm_work *work, struct ib_mad_send_buf *msg = NULL; int ret; @@ -40142,7 +41291,7 @@ index 784b97c..c9ceadf 100644 counter[CM_REQ_COUNTER]); /* Quick state check to discard duplicate REQs. */ -@@ -1779,7 +1779,7 @@ static void cm_dup_rep_handler(struct cm_work *work) +@@ -1776,7 +1776,7 @@ static void cm_dup_rep_handler(struct cm_work *work) if (!cm_id_priv) return; @@ -40151,7 +41300,7 @@ index 784b97c..c9ceadf 100644 counter[CM_REP_COUNTER]); ret = cm_alloc_response_msg(work->port, work->mad_recv_wc, &msg); if (ret) -@@ -1946,7 +1946,7 @@ static int cm_rtu_handler(struct cm_work *work) +@@ -1943,7 +1943,7 @@ static int cm_rtu_handler(struct cm_work *work) if (cm_id_priv->id.state != IB_CM_REP_SENT && cm_id_priv->id.state != IB_CM_MRA_REP_RCVD) { spin_unlock_irq(&cm_id_priv->lock); @@ -40160,7 +41309,7 @@ index 784b97c..c9ceadf 100644 counter[CM_RTU_COUNTER]); goto out; } -@@ -2129,7 +2129,7 @@ static int cm_dreq_handler(struct cm_work *work) +@@ -2126,7 +2126,7 @@ static int cm_dreq_handler(struct cm_work *work) cm_id_priv = cm_acquire_id(dreq_msg->remote_comm_id, dreq_msg->local_comm_id); if (!cm_id_priv) { @@ -40169,7 +41318,7 @@ index 784b97c..c9ceadf 100644 counter[CM_DREQ_COUNTER]); cm_issue_drep(work->port, work->mad_recv_wc); return -EINVAL; -@@ -2154,7 +2154,7 @@ static int cm_dreq_handler(struct cm_work *work) +@@ -2151,7 +2151,7 @@ static int cm_dreq_handler(struct cm_work *work) case IB_CM_MRA_REP_RCVD: break; case IB_CM_TIMEWAIT: @@ -40178,7 +41327,7 @@ index 784b97c..c9ceadf 100644 counter[CM_DREQ_COUNTER]); if (cm_alloc_response_msg(work->port, work->mad_recv_wc, &msg)) goto unlock; -@@ -2168,7 +2168,7 @@ static int cm_dreq_handler(struct cm_work *work) +@@ -2165,7 +2165,7 @@ static int cm_dreq_handler(struct cm_work *work) cm_free_msg(msg); goto deref; case IB_CM_DREQ_RCVD: @@ -40187,7 +41336,7 @@ index 784b97c..c9ceadf 100644 counter[CM_DREQ_COUNTER]); goto unlock; default: -@@ -2535,7 +2535,7 @@ static int cm_mra_handler(struct cm_work *work) +@@ -2532,7 +2532,7 @@ static int cm_mra_handler(struct cm_work *work) ib_modify_mad(cm_id_priv->av.port->mad_agent, cm_id_priv->msg, timeout)) { if (cm_id_priv->id.lap_state == IB_CM_MRA_LAP_RCVD) @@ -40196,7 +41345,7 @@ index 784b97c..c9ceadf 100644 counter_group[CM_RECV_DUPLICATES]. counter[CM_MRA_COUNTER]); goto out; -@@ -2544,7 +2544,7 @@ static int cm_mra_handler(struct cm_work *work) +@@ -2541,7 +2541,7 @@ static int cm_mra_handler(struct cm_work *work) break; case IB_CM_MRA_REQ_RCVD: case IB_CM_MRA_REP_RCVD: @@ -40205,7 +41354,7 @@ index 784b97c..c9ceadf 100644 counter[CM_MRA_COUNTER]); /* fall through */ default: -@@ -2706,7 +2706,7 @@ static int cm_lap_handler(struct cm_work *work) +@@ -2703,7 +2703,7 @@ static int cm_lap_handler(struct cm_work *work) case IB_CM_LAP_IDLE: break; case IB_CM_MRA_LAP_SENT: @@ -40214,7 +41363,7 @@ index 784b97c..c9ceadf 100644 counter[CM_LAP_COUNTER]); if (cm_alloc_response_msg(work->port, work->mad_recv_wc, &msg)) goto unlock; -@@ -2722,7 +2722,7 @@ static int cm_lap_handler(struct cm_work *work) +@@ -2719,7 +2719,7 @@ static int cm_lap_handler(struct cm_work *work) cm_free_msg(msg); goto deref; case IB_CM_LAP_RCVD: @@ -40223,7 +41372,7 @@ index 784b97c..c9ceadf 100644 counter[CM_LAP_COUNTER]); goto unlock; default: -@@ -3006,7 +3006,7 @@ static int cm_sidr_req_handler(struct cm_work *work) +@@ -3003,7 +3003,7 @@ static int cm_sidr_req_handler(struct cm_work *work) cur_cm_id_priv = cm_insert_remote_sidr(cm_id_priv); if (cur_cm_id_priv) { spin_unlock_irq(&cm.lock); @@ -40232,7 +41381,7 @@ index 784b97c..c9ceadf 100644 counter[CM_SIDR_REQ_COUNTER]); goto out; /* Duplicate message. */ } -@@ -3218,10 +3218,10 @@ static void cm_send_handler(struct ib_mad_agent *mad_agent, +@@ -3215,10 +3215,10 @@ static void cm_send_handler(struct ib_mad_agent *mad_agent, if (!msg->context[0] && (attr_index != CM_REJ_COUNTER)) msg->retries = 1; @@ -40245,7 +41394,7 @@ index 784b97c..c9ceadf 100644 &port->counter_group[CM_XMIT_RETRIES]. counter[attr_index]); -@@ -3431,7 +3431,7 @@ static void cm_recv_handler(struct ib_mad_agent *mad_agent, +@@ -3428,7 +3428,7 @@ static void cm_recv_handler(struct ib_mad_agent *mad_agent, } attr_id = be16_to_cpu(mad_recv_wc->recv_buf.mad->mad_hdr.attr_id); @@ -40254,7 +41403,7 @@ index 784b97c..c9ceadf 100644 counter[attr_id - CM_ATTR_ID_OFFSET]); work = kmalloc(sizeof *work + sizeof(struct ib_sa_path_rec) * paths, -@@ -3636,7 +3636,7 @@ static ssize_t cm_show_counter(struct kobject *obj, struct attribute *attr, +@@ -3633,7 +3633,7 @@ static ssize_t cm_show_counter(struct kobject *obj, struct attribute *attr, cm_attr = container_of(attr, struct cm_counter_attribute, attr); return sprintf(buf, "%ld\n", @@ -40335,7 +41484,7 @@ index 9f5ad7c..588cd84 100644 } } diff --git a/drivers/infiniband/hw/cxgb4/mem.c b/drivers/infiniband/hw/cxgb4/mem.c -index 4cb8eb2..146bf60 100644 +index 84e4500..2c9beeb 100644 --- a/drivers/infiniband/hw/cxgb4/mem.c +++ b/drivers/infiniband/hw/cxgb4/mem.c @@ -249,7 +249,7 @@ static int write_tpt_entry(struct c4iw_rdev *rdev, u32 reset_tpt_entry, @@ -40356,6 +41505,41 @@ index 4cb8eb2..146bf60 100644 } PDBG("%s stag_state 0x%0x type 0x%0x pdid 0x%0x, stag_idx 0x%x\n", __func__, stag_state, type, pdid, stag_idx); +diff --git a/drivers/infiniband/hw/ipath/ipath_dma.c b/drivers/infiniband/hw/ipath/ipath_dma.c +index 644c2c7..ecf0879 100644 +--- a/drivers/infiniband/hw/ipath/ipath_dma.c ++++ b/drivers/infiniband/hw/ipath/ipath_dma.c +@@ -176,17 +176,17 @@ static void ipath_dma_free_coherent(struct ib_device *dev, size_t size, + } + + struct ib_dma_mapping_ops ipath_dma_mapping_ops = { +- ipath_mapping_error, +- ipath_dma_map_single, +- ipath_dma_unmap_single, +- ipath_dma_map_page, +- ipath_dma_unmap_page, +- ipath_map_sg, +- ipath_unmap_sg, +- ipath_sg_dma_address, +- ipath_sg_dma_len, +- ipath_sync_single_for_cpu, +- ipath_sync_single_for_device, +- ipath_dma_alloc_coherent, +- ipath_dma_free_coherent ++ .mapping_error = ipath_mapping_error, ++ .map_single = ipath_dma_map_single, ++ .unmap_single = ipath_dma_unmap_single, ++ .map_page = ipath_dma_map_page, ++ .unmap_page = ipath_dma_unmap_page, ++ .map_sg = ipath_map_sg, ++ .unmap_sg = ipath_unmap_sg, ++ .dma_address = ipath_sg_dma_address, ++ .dma_len = ipath_sg_dma_len, ++ .sync_single_for_cpu = ipath_sync_single_for_cpu, ++ .sync_single_for_device = ipath_sync_single_for_device, ++ .alloc_coherent = ipath_dma_alloc_coherent, ++ .free_coherent = ipath_dma_free_coherent + }; diff --git a/drivers/infiniband/hw/ipath/ipath_rc.c b/drivers/infiniband/hw/ipath/ipath_rc.c index 79b3dbc..96e5fcc 100644 --- a/drivers/infiniband/hw/ipath/ipath_rc.c @@ -40628,7 +41812,7 @@ index 33cc589..3bd6538 100644 extern u32 int_mod_timer_init; extern u32 int_mod_cq_depth_256; diff --git a/drivers/infiniband/hw/nes/nes_cm.c b/drivers/infiniband/hw/nes/nes_cm.c -index 6b29249..57081dd 100644 +index 6b29249..461d143 100644 --- a/drivers/infiniband/hw/nes/nes_cm.c +++ b/drivers/infiniband/hw/nes/nes_cm.c @@ -68,14 +68,14 @@ u32 cm_packets_dropped; @@ -40653,7 +41837,33 @@ index 6b29249..57081dd 100644 static inline int mini_cm_accelerated(struct nes_cm_core *, struct nes_cm_node *); static struct nes_cm_listener *mini_cm_listen(struct nes_cm_core *, struct nes_vnic *, struct nes_cm_info *); -@@ -148,13 +148,13 @@ static struct nes_cm_ops nes_cm_api = { +@@ -133,28 +133,28 @@ static void print_core(struct nes_cm_core *core); + /* instance of function pointers for client API */ + /* set address of this instance to cm_core->cm_ops at cm_core alloc */ + static struct nes_cm_ops nes_cm_api = { +- mini_cm_accelerated, +- mini_cm_listen, +- mini_cm_del_listen, +- mini_cm_connect, +- mini_cm_close, +- mini_cm_accept, +- mini_cm_reject, +- mini_cm_recv_pkt, +- mini_cm_dealloc_core, +- mini_cm_get, +- mini_cm_set ++ .accelerated = mini_cm_accelerated, ++ .listen = mini_cm_listen, ++ .stop_listener = mini_cm_del_listen, ++ .connect = mini_cm_connect, ++ .close = mini_cm_close, ++ .accept = mini_cm_accept, ++ .reject = mini_cm_reject, ++ .recv_pkt = mini_cm_recv_pkt, ++ .destroy_cm_core = mini_cm_dealloc_core, ++ .get = mini_cm_get, ++ .set = mini_cm_set + }; static struct nes_cm_core *g_cm_core; @@ -40925,7 +42135,7 @@ index 49eb511..a774366 100644 /** diff --git a/drivers/infiniband/hw/nes/nes_verbs.c b/drivers/infiniband/hw/nes/nes_verbs.c -index 5b53ca5..443da3c 100644 +index 8308e36..ae0d3b5 100644 --- a/drivers/infiniband/hw/nes/nes_verbs.c +++ b/drivers/infiniband/hw/nes/nes_verbs.c @@ -46,9 +46,9 @@ @@ -40972,10 +42182,10 @@ index 1946101..09766d2 100644 #include "qib_common.h" #include "qib_verbs.h" diff --git a/drivers/input/gameport/gameport.c b/drivers/input/gameport/gameport.c -index 922a7fe..bb035db 100644 +index 24c41ba..102d71f 100644 --- a/drivers/input/gameport/gameport.c +++ b/drivers/input/gameport/gameport.c -@@ -487,14 +487,14 @@ EXPORT_SYMBOL(gameport_set_phys); +@@ -490,14 +490,14 @@ EXPORT_SYMBOL(gameport_set_phys); */ static void gameport_init_port(struct gameport *gameport) { @@ -40993,7 +42203,7 @@ index 922a7fe..bb035db 100644 gameport->dev.release = gameport_release_port; if (gameport->parent) diff --git a/drivers/input/input.c b/drivers/input/input.c -index e75d015..57d1c28 100644 +index d2965e4..f52b7d7 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c @@ -1734,7 +1734,7 @@ EXPORT_SYMBOL_GPL(input_class); @@ -41097,10 +42307,10 @@ index 4c842c3..590b0bf 100644 return count; diff --git a/drivers/input/serio/serio.c b/drivers/input/serio/serio.c -index 2b56855..5a55837 100644 +index 8f4c4ab..5fc8a45 100644 --- a/drivers/input/serio/serio.c +++ b/drivers/input/serio/serio.c -@@ -496,7 +496,7 @@ static void serio_release_port(struct device *dev) +@@ -505,7 +505,7 @@ static void serio_release_port(struct device *dev) */ static void serio_init_port(struct serio *serio) { @@ -41109,7 +42319,7 @@ index 2b56855..5a55837 100644 __module_get(THIS_MODULE); -@@ -507,7 +507,7 @@ static void serio_init_port(struct serio *serio) +@@ -516,7 +516,7 @@ static void serio_init_port(struct serio *serio) mutex_init(&serio->drv_mutex); device_initialize(&serio->dev); dev_set_name(&serio->dev, "serio%ld", @@ -41141,10 +42351,10 @@ index 59df2e7..8f1cafb 100644 INIT_LIST_HEAD(&serio_raw->client_list); init_waitqueue_head(&serio_raw->wait); diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c -index fbe9ca7..dbee61d 100644 +index e5555fc..937986d 100644 --- a/drivers/iommu/iommu.c +++ b/drivers/iommu/iommu.c -@@ -583,7 +583,7 @@ static struct notifier_block iommu_bus_nb = { +@@ -588,7 +588,7 @@ static struct notifier_block iommu_bus_nb = { static void iommu_bus_init(struct bus_type *bus, struct iommu_ops *ops) { bus_register_notifier(bus, &iommu_bus_nb); @@ -41184,7 +42394,7 @@ index 39f81ae..2660096 100644 bool setup_remapped_irq(int irq, struct irq_cfg *cfg, struct irq_chip *chip) diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c -index d0e9480..d2b6340 100644 +index 341c601..e5f407e 100644 --- a/drivers/irqchip/irq-gic.c +++ b/drivers/irqchip/irq-gic.c @@ -84,7 +84,7 @@ static u8 gic_cpu_map[NR_GIC_CPU_IF] __read_mostly; @@ -41196,7 +42406,7 @@ index d0e9480..d2b6340 100644 .irq_eoi = NULL, .irq_mask = NULL, .irq_unmask = NULL, -@@ -333,7 +333,7 @@ static void gic_handle_cascade_irq(unsigned int irq, struct irq_desc *desc) +@@ -332,7 +332,7 @@ static void gic_handle_cascade_irq(unsigned int irq, struct irq_desc *desc) chained_irq_exit(chip, desc); } @@ -41246,6 +42456,49 @@ index ac6f72b..81150f2 100644 capimsg_setu32(skb->data, 8, mp->ncci); /* NCCI */ capimsg_setu32(skb->data, 12, (u32)(long)skb->data);/* Data32 */ capimsg_setu16(skb->data, 16, len); /* Data length */ +diff --git a/drivers/isdn/gigaset/bas-gigaset.c b/drivers/isdn/gigaset/bas-gigaset.c +index c44950d..10ac276 100644 +--- a/drivers/isdn/gigaset/bas-gigaset.c ++++ b/drivers/isdn/gigaset/bas-gigaset.c +@@ -2564,22 +2564,22 @@ static int gigaset_post_reset(struct usb_interface *intf) + + + static const struct gigaset_ops gigops = { +- gigaset_write_cmd, +- gigaset_write_room, +- gigaset_chars_in_buffer, +- gigaset_brkchars, +- gigaset_init_bchannel, +- gigaset_close_bchannel, +- gigaset_initbcshw, +- gigaset_freebcshw, +- gigaset_reinitbcshw, +- gigaset_initcshw, +- gigaset_freecshw, +- gigaset_set_modem_ctrl, +- gigaset_baud_rate, +- gigaset_set_line_ctrl, +- gigaset_isoc_send_skb, +- gigaset_isoc_input, ++ .write_cmd = gigaset_write_cmd, ++ .write_room = gigaset_write_room, ++ .chars_in_buffer = gigaset_chars_in_buffer, ++ .brkchars = gigaset_brkchars, ++ .init_bchannel = gigaset_init_bchannel, ++ .close_bchannel = gigaset_close_bchannel, ++ .initbcshw = gigaset_initbcshw, ++ .freebcshw = gigaset_freebcshw, ++ .reinitbcshw = gigaset_reinitbcshw, ++ .initcshw = gigaset_initcshw, ++ .freecshw = gigaset_freecshw, ++ .set_modem_ctrl = gigaset_set_modem_ctrl, ++ .baud_rate = gigaset_baud_rate, ++ .set_line_ctrl = gigaset_set_line_ctrl, ++ .send_skb = gigaset_isoc_send_skb, ++ .handle_input = gigaset_isoc_input, + }; + + /* bas_gigaset_init diff --git a/drivers/isdn/gigaset/interface.c b/drivers/isdn/gigaset/interface.c index 600c79b..3752bab 100644 --- a/drivers/isdn/gigaset/interface.c @@ -41274,8 +42527,51 @@ index 600c79b..3752bab 100644 tty_port_tty_set(&cs->port, NULL); mutex_unlock(&cs->mutex); +diff --git a/drivers/isdn/gigaset/ser-gigaset.c b/drivers/isdn/gigaset/ser-gigaset.c +index 8c91fd5..14f13ce 100644 +--- a/drivers/isdn/gigaset/ser-gigaset.c ++++ b/drivers/isdn/gigaset/ser-gigaset.c +@@ -453,22 +453,22 @@ static int gigaset_set_line_ctrl(struct cardstate *cs, unsigned cflag) + } + + static const struct gigaset_ops ops = { +- gigaset_write_cmd, +- gigaset_write_room, +- gigaset_chars_in_buffer, +- gigaset_brkchars, +- gigaset_init_bchannel, +- gigaset_close_bchannel, +- gigaset_initbcshw, +- gigaset_freebcshw, +- gigaset_reinitbcshw, +- gigaset_initcshw, +- gigaset_freecshw, +- gigaset_set_modem_ctrl, +- gigaset_baud_rate, +- gigaset_set_line_ctrl, +- gigaset_m10x_send_skb, /* asyncdata.c */ +- gigaset_m10x_input, /* asyncdata.c */ ++ .write_cmd = gigaset_write_cmd, ++ .write_room = gigaset_write_room, ++ .chars_in_buffer = gigaset_chars_in_buffer, ++ .brkchars = gigaset_brkchars, ++ .init_bchannel = gigaset_init_bchannel, ++ .close_bchannel = gigaset_close_bchannel, ++ .initbcshw = gigaset_initbcshw, ++ .freebcshw = gigaset_freebcshw, ++ .reinitbcshw = gigaset_reinitbcshw, ++ .initcshw = gigaset_initcshw, ++ .freecshw = gigaset_freecshw, ++ .set_modem_ctrl = gigaset_set_modem_ctrl, ++ .baud_rate = gigaset_baud_rate, ++ .set_line_ctrl = gigaset_set_line_ctrl, ++ .send_skb = gigaset_m10x_send_skb, /* asyncdata.c */ ++ .handle_input = gigaset_m10x_input, /* asyncdata.c */ + }; + + diff --git a/drivers/isdn/gigaset/usb-gigaset.c b/drivers/isdn/gigaset/usb-gigaset.c -index d0a41cb..f0cdb8c 100644 +index d0a41cb..b953e50 100644 --- a/drivers/isdn/gigaset/usb-gigaset.c +++ b/drivers/isdn/gigaset/usb-gigaset.c @@ -547,7 +547,7 @@ static int gigaset_brkchars(struct cardstate *cs, const unsigned char buf[6]) @@ -41287,6 +42583,45 @@ index d0a41cb..f0cdb8c 100644 } static void gigaset_freebcshw(struct bc_state *bcs) +@@ -869,22 +869,22 @@ static int gigaset_pre_reset(struct usb_interface *intf) + } + + static const struct gigaset_ops ops = { +- gigaset_write_cmd, +- gigaset_write_room, +- gigaset_chars_in_buffer, +- gigaset_brkchars, +- gigaset_init_bchannel, +- gigaset_close_bchannel, +- gigaset_initbcshw, +- gigaset_freebcshw, +- gigaset_reinitbcshw, +- gigaset_initcshw, +- gigaset_freecshw, +- gigaset_set_modem_ctrl, +- gigaset_baud_rate, +- gigaset_set_line_ctrl, +- gigaset_m10x_send_skb, +- gigaset_m10x_input, ++ .write_cmd = gigaset_write_cmd, ++ .write_room = gigaset_write_room, ++ .chars_in_buffer = gigaset_chars_in_buffer, ++ .brkchars = gigaset_brkchars, ++ .init_bchannel = gigaset_init_bchannel, ++ .close_bchannel = gigaset_close_bchannel, ++ .initbcshw = gigaset_initbcshw, ++ .freebcshw = gigaset_freebcshw, ++ .reinitbcshw = gigaset_reinitbcshw, ++ .initcshw = gigaset_initcshw, ++ .freecshw = gigaset_freecshw, ++ .set_modem_ctrl = gigaset_set_modem_ctrl, ++ .baud_rate = gigaset_baud_rate, ++ .set_line_ctrl = gigaset_set_line_ctrl, ++ .send_skb = gigaset_m10x_send_skb, ++ .handle_input = gigaset_m10x_input, + }; + + /* diff --git a/drivers/isdn/hardware/avm/b1.c b/drivers/isdn/hardware/avm/b1.c index 4d9b195..455075c 100644 --- a/drivers/isdn/hardware/avm/b1.c @@ -41322,6 +42657,23 @@ index 9bb12ba..d4262f7 100644 if (arg) { if (copy_to_user(argp, &dev, sizeof(ulong))) return -EFAULT; +diff --git a/drivers/isdn/i4l/isdn_concap.c b/drivers/isdn/i4l/isdn_concap.c +index 91d5730..336523e 100644 +--- a/drivers/isdn/i4l/isdn_concap.c ++++ b/drivers/isdn/i4l/isdn_concap.c +@@ -80,9 +80,9 @@ static int isdn_concap_dl_disconn_req(struct concap_proto *concap) + } + + struct concap_device_ops isdn_concap_reliable_dl_dops = { +- &isdn_concap_dl_data_req, +- &isdn_concap_dl_connect_req, +- &isdn_concap_dl_disconn_req ++ .data_req = &isdn_concap_dl_data_req, ++ .connect_req = &isdn_concap_dl_connect_req, ++ .disconn_req = &isdn_concap_dl_disconn_req + }; + + /* The following should better go into a dedicated source file such that diff --git a/drivers/isdn/i4l/isdn_tty.c b/drivers/isdn/i4l/isdn_tty.c index 3c5f249..5fac4d0 100644 --- a/drivers/isdn/i4l/isdn_tty.c @@ -41387,8 +42739,35 @@ index 3c5f249..5fac4d0 100644 continue; if ((info->emu.mdmreg[REG_SI1] & si2bit[si1]) && /* SI1 is matching */ (info->emu.mdmreg[REG_SI2] == si2)) { /* SI2 is matching */ +diff --git a/drivers/isdn/i4l/isdn_x25iface.c b/drivers/isdn/i4l/isdn_x25iface.c +index e2d4e58..40cd045 100644 +--- a/drivers/isdn/i4l/isdn_x25iface.c ++++ b/drivers/isdn/i4l/isdn_x25iface.c +@@ -53,14 +53,14 @@ static int isdn_x25iface_disconn_ind(struct concap_proto *); + + + static struct concap_proto_ops ix25_pops = { +- &isdn_x25iface_proto_new, +- &isdn_x25iface_proto_del, +- &isdn_x25iface_proto_restart, +- &isdn_x25iface_proto_close, +- &isdn_x25iface_xmit, +- &isdn_x25iface_receive, +- &isdn_x25iface_connect_ind, +- &isdn_x25iface_disconn_ind ++ .proto_new = &isdn_x25iface_proto_new, ++ .proto_del = &isdn_x25iface_proto_del, ++ .restart = &isdn_x25iface_proto_restart, ++ .close = &isdn_x25iface_proto_close, ++ .encap_and_xmit = &isdn_x25iface_xmit, ++ .data_ind = &isdn_x25iface_receive, ++ .connect_ind = &isdn_x25iface_connect_ind, ++ .disconn_ind = &isdn_x25iface_disconn_ind + }; + + /* error message helper function */ diff --git a/drivers/isdn/icn/icn.c b/drivers/isdn/icn/icn.c -index e74df7c..03a03ba 100644 +index 53d487f..f020f41 100644 --- a/drivers/isdn/icn/icn.c +++ b/drivers/isdn/icn/icn.c @@ -1045,7 +1045,7 @@ icn_writecmd(const u_char *buf, int len, int user, icn_card *card) @@ -41484,7 +42863,7 @@ index bfb39bb..08a603b 100644 /* If the entry's not present, there's nothing to release. */ if (pmd_flags(*spmd) & _PAGE_PRESENT) { diff --git a/drivers/lguest/x86/core.c b/drivers/lguest/x86/core.c -index 5169239..47cb4db 100644 +index 922a1ac..9dd0c2a 100644 --- a/drivers/lguest/x86/core.c +++ b/drivers/lguest/x86/core.c @@ -59,7 +59,7 @@ static struct { @@ -41510,7 +42889,7 @@ index 5169239..47cb4db 100644 /* * Set up the Guest's page tables to see this CPU's pages (and no * other CPU's pages). -@@ -475,7 +481,7 @@ void __init lguest_arch_host_init(void) +@@ -477,7 +483,7 @@ void __init lguest_arch_host_init(void) * compiled-in switcher code and the high-mapped copy we just made. */ for (i = 0; i < IDT_ENTRIES; i++) @@ -41519,7 +42898,7 @@ index 5169239..47cb4db 100644 /* * Set up the Switcher's per-cpu areas. -@@ -558,7 +564,7 @@ void __init lguest_arch_host_init(void) +@@ -560,7 +566,7 @@ void __init lguest_arch_host_init(void) * it will be undisturbed when we switch. To change %cs and jump we * need this structure to feed to Intel's "lcall" instruction. */ @@ -41591,10 +42970,10 @@ index 40634b0..4f5855e 100644 // Every interrupt can come to us here // But we must truly tell each apart. diff --git a/drivers/md/bcache/closure.h b/drivers/md/bcache/closure.h -index 0003992..854bbce 100644 +index 9762f1b..3e79734 100644 --- a/drivers/md/bcache/closure.h +++ b/drivers/md/bcache/closure.h -@@ -622,7 +622,7 @@ static inline void closure_wake_up(struct closure_waitlist *list) +@@ -483,7 +483,7 @@ static inline void closure_queue(struct closure *cl) static inline void set_closure_fn(struct closure *cl, closure_fn *fn, struct workqueue_struct *wq) { @@ -41603,21 +42982,8 @@ index 0003992..854bbce 100644 closure_set_ip(cl); cl->fn = fn; cl->wq = wq; -diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c -index 547c4c5..5be1de4 100644 ---- a/drivers/md/bcache/super.c -+++ b/drivers/md/bcache/super.c -@@ -1644,7 +1644,7 @@ err_unlock_gc: - err: - closure_sync(&op.cl); - /* XXX: test this, it's broken */ -- bch_cache_set_error(c, err); -+ bch_cache_set_error(c, "%s", err); - } - - static bool can_attach_cache(struct cache *ca, struct cache_set *c) diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c -index a7fd821..9dcf6c3 100644 +index 12dc29b..1596277 100644 --- a/drivers/md/bitmap.c +++ b/drivers/md/bitmap.c @@ -1779,7 +1779,7 @@ void bitmap_status(struct seq_file *seq, struct bitmap *bitmap) @@ -41630,10 +42996,10 @@ index a7fd821..9dcf6c3 100644 seq_printf(seq, "\n"); diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c -index afe0814..8cf3794 100644 +index 5152142..623d141 100644 --- a/drivers/md/dm-ioctl.c +++ b/drivers/md/dm-ioctl.c -@@ -1745,7 +1745,7 @@ static int validate_params(uint cmd, struct dm_ioctl *param) +@@ -1769,7 +1769,7 @@ static int validate_params(uint cmd, struct dm_ioctl *param) cmd == DM_LIST_VERSIONS_CMD) return 0; @@ -41719,7 +43085,7 @@ index 9584443..9fc9ac9 100644 return (test_bit(DM_RAID1_FLUSH_ERROR, &(m->error_type))) ? 'F' : diff --git a/drivers/md/dm-stats.c b/drivers/md/dm-stats.c -index 3d404c1..b62af0e 100644 +index 28a9012..9c0f6a5 100644 --- a/drivers/md/dm-stats.c +++ b/drivers/md/dm-stats.c @@ -382,7 +382,7 @@ do_sync_free: @@ -41785,10 +43151,10 @@ index 73c1712..7347292 100644 schedule_work(&sc->trigger_event); } diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c -index 41d907b..34b87ee 100644 +index 3ba6a38..b0fa9b0 100644 --- a/drivers/md/dm-table.c +++ b/drivers/md/dm-table.c -@@ -286,7 +286,7 @@ static struct dm_dev_internal *find_device(struct list_head *l, dev_t dev) +@@ -291,7 +291,7 @@ static struct dm_dev_internal *find_device(struct list_head *l, dev_t dev) static int open_dev(struct dm_dev_internal *d, dev_t dev, struct mapped_device *md) { @@ -41797,7 +43163,7 @@ index 41d907b..34b87ee 100644 struct block_device *bdev; int r; -@@ -354,7 +354,7 @@ static int device_area_is_invalid(struct dm_target *ti, struct dm_dev *dev, +@@ -359,7 +359,7 @@ static int device_area_is_invalid(struct dm_target *ti, struct dm_dev *dev, if (!dev_size) return 0; @@ -41807,7 +43173,7 @@ index 41d907b..34b87ee 100644 "start=%llu, len=%llu, dev_size=%llu", dm_device_name(ti->table->md), bdevname(bdev, b), diff --git a/drivers/md/dm-thin-metadata.c b/drivers/md/dm-thin-metadata.c -index 60bce43..9b997d0 100644 +index 8a30ad5..72792d3 100644 --- a/drivers/md/dm-thin-metadata.c +++ b/drivers/md/dm-thin-metadata.c @@ -397,7 +397,7 @@ static void __setup_btree_details(struct dm_pool_metadata *pmd) @@ -41829,10 +43195,10 @@ index 60bce43..9b997d0 100644 pmd->bl_info.value_type.inc = data_block_inc; pmd->bl_info.value_type.dec = data_block_dec; diff --git a/drivers/md/dm.c b/drivers/md/dm.c -index b3e26c7..1efca94 100644 +index 0704c52..0a33d61 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c -@@ -179,9 +179,9 @@ struct mapped_device { +@@ -185,9 +185,9 @@ struct mapped_device { /* * Event handling. */ @@ -41844,7 +43210,7 @@ index b3e26c7..1efca94 100644 struct list_head uevent_list; spinlock_t uevent_lock; /* Protect access to uevent_list */ -@@ -1985,8 +1985,8 @@ static struct mapped_device *alloc_dev(int minor) +@@ -2021,8 +2021,8 @@ static struct mapped_device *alloc_dev(int minor) spin_lock_init(&md->deferred_lock); atomic_set(&md->holders, 1); atomic_set(&md->open_count, 0); @@ -41855,7 +43221,7 @@ index b3e26c7..1efca94 100644 INIT_LIST_HEAD(&md->uevent_list); spin_lock_init(&md->uevent_lock); -@@ -2139,7 +2139,7 @@ static void event_callback(void *context) +@@ -2175,7 +2175,7 @@ static void event_callback(void *context) dm_send_uevents(&uevents, &disk_to_dev(md->disk)->kobj); @@ -41864,7 +43230,7 @@ index b3e26c7..1efca94 100644 wake_up(&md->eventq); } -@@ -2832,18 +2832,18 @@ int dm_kobject_uevent(struct mapped_device *md, enum kobject_action action, +@@ -2868,18 +2868,18 @@ int dm_kobject_uevent(struct mapped_device *md, enum kobject_action action, uint32_t dm_next_uevent_seq(struct mapped_device *md) { @@ -41887,10 +43253,10 @@ index b3e26c7..1efca94 100644 void dm_uevent_add(struct mapped_device *md, struct list_head *elist) diff --git a/drivers/md/md.c b/drivers/md/md.c -index ba46d97..f8f5019 100644 +index 369d919..ba7049c 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c -@@ -234,10 +234,10 @@ EXPORT_SYMBOL_GPL(md_trim_bio); +@@ -194,10 +194,10 @@ EXPORT_SYMBOL_GPL(bio_clone_mddev); * start build, activate spare */ static DECLARE_WAIT_QUEUE_HEAD(md_event_waiters); @@ -41903,7 +43269,7 @@ index ba46d97..f8f5019 100644 wake_up(&md_event_waiters); } EXPORT_SYMBOL_GPL(md_new_event); -@@ -247,7 +247,7 @@ EXPORT_SYMBOL_GPL(md_new_event); +@@ -207,7 +207,7 @@ EXPORT_SYMBOL_GPL(md_new_event); */ static void md_new_event_inintr(struct mddev *mddev) { @@ -41912,7 +43278,7 @@ index ba46d97..f8f5019 100644 wake_up(&md_event_waiters); } -@@ -1502,7 +1502,7 @@ static int super_1_load(struct md_rdev *rdev, struct md_rdev *refdev, int minor_ +@@ -1463,7 +1463,7 @@ static int super_1_load(struct md_rdev *rdev, struct md_rdev *refdev, int minor_ if ((le32_to_cpu(sb->feature_map) & MD_FEATURE_RESHAPE_ACTIVE) && (le32_to_cpu(sb->feature_map) & MD_FEATURE_NEW_OFFSET)) rdev->new_data_offset += (s32)le32_to_cpu(sb->new_offset); @@ -41921,7 +43287,7 @@ index ba46d97..f8f5019 100644 rdev->sb_size = le32_to_cpu(sb->max_dev) * 2 + 256; bmask = queue_logical_block_size(rdev->bdev->bd_disk->queue)-1; -@@ -1746,7 +1746,7 @@ static void super_1_sync(struct mddev *mddev, struct md_rdev *rdev) +@@ -1710,7 +1710,7 @@ static void super_1_sync(struct mddev *mddev, struct md_rdev *rdev) else sb->resync_offset = cpu_to_le64(0); @@ -41930,7 +43296,7 @@ index ba46d97..f8f5019 100644 sb->raid_disks = cpu_to_le32(mddev->raid_disks); sb->size = cpu_to_le64(mddev->dev_sectors); -@@ -2751,7 +2751,7 @@ __ATTR(state, S_IRUGO|S_IWUSR, state_show, state_store); +@@ -2715,7 +2715,7 @@ __ATTR(state, S_IRUGO|S_IWUSR, state_show, state_store); static ssize_t errors_show(struct md_rdev *rdev, char *page) { @@ -41939,7 +43305,7 @@ index ba46d97..f8f5019 100644 } static ssize_t -@@ -2760,7 +2760,7 @@ errors_store(struct md_rdev *rdev, const char *buf, size_t len) +@@ -2724,7 +2724,7 @@ errors_store(struct md_rdev *rdev, const char *buf, size_t len) char *e; unsigned long n = simple_strtoul(buf, &e, 10); if (*buf && (*e == 0 || *e == '\n')) { @@ -41948,7 +43314,7 @@ index ba46d97..f8f5019 100644 return len; } return -EINVAL; -@@ -3208,8 +3208,8 @@ int md_rdev_init(struct md_rdev *rdev) +@@ -3173,8 +3173,8 @@ int md_rdev_init(struct md_rdev *rdev) rdev->sb_loaded = 0; rdev->bb_page = NULL; atomic_set(&rdev->nr_pending, 0); @@ -41959,7 +43325,7 @@ index ba46d97..f8f5019 100644 INIT_LIST_HEAD(&rdev->same_set); init_waitqueue_head(&rdev->blocked_wait); -@@ -7043,7 +7043,7 @@ static int md_seq_show(struct seq_file *seq, void *v) +@@ -7038,7 +7038,7 @@ static int md_seq_show(struct seq_file *seq, void *v) spin_unlock(&pers_lock); seq_printf(seq, "\n"); @@ -41968,7 +43334,7 @@ index ba46d97..f8f5019 100644 return 0; } if (v == (void*)2) { -@@ -7146,7 +7146,7 @@ static int md_seq_open(struct inode *inode, struct file *file) +@@ -7141,7 +7141,7 @@ static int md_seq_open(struct inode *inode, struct file *file) return error; seq = file->private_data; @@ -41977,7 +43343,7 @@ index ba46d97..f8f5019 100644 return error; } -@@ -7160,7 +7160,7 @@ static unsigned int mdstat_poll(struct file *filp, poll_table *wait) +@@ -7155,7 +7155,7 @@ static unsigned int mdstat_poll(struct file *filp, poll_table *wait) /* always allow read */ mask = POLLIN | POLLRDNORM; @@ -41986,7 +43352,7 @@ index ba46d97..f8f5019 100644 mask |= POLLERR | POLLPRI; return mask; } -@@ -7204,7 +7204,7 @@ static int is_mddev_idle(struct mddev *mddev, int init) +@@ -7199,7 +7199,7 @@ static int is_mddev_idle(struct mddev *mddev, int init) struct gendisk *disk = rdev->bdev->bd_contains->bd_disk; curr_events = (int)part_stat_read(&disk->part0, sectors[0]) + (int)part_stat_read(&disk->part0, sectors[1]) - @@ -41996,7 +43362,7 @@ index ba46d97..f8f5019 100644 * as sync_io is counted when a request starts, and * disk_stats is counted when it completes. diff --git a/drivers/md/md.h b/drivers/md/md.h -index 608050c..6e77db5d 100644 +index 0095ec8..c89277a 100644 --- a/drivers/md/md.h +++ b/drivers/md/md.h @@ -94,13 +94,13 @@ struct md_rdev { @@ -42015,7 +43381,7 @@ index 608050c..6e77db5d 100644 * for reporting to userspace and storing * in superblock. */ -@@ -446,7 +446,7 @@ static inline void rdev_dec_pending(struct md_rdev *rdev, struct mddev *mddev) +@@ -449,7 +449,7 @@ static inline void rdev_dec_pending(struct md_rdev *rdev, struct mddev *mddev) static inline void md_sync_acct(struct block_device *bdev, unsigned long nr_sectors) { @@ -42037,10 +43403,10 @@ index 3e6d115..ffecdeb 100644 /*----------------------------------------------------------------*/ diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c -index aacf6bf..67d63f2 100644 +index a49cfcc..20b9a65 100644 --- a/drivers/md/raid1.c +++ b/drivers/md/raid1.c -@@ -1824,7 +1824,7 @@ static int fix_sync_read_error(struct r1bio *r1_bio) +@@ -1921,7 +1921,7 @@ static int fix_sync_read_error(struct r1bio *r1_bio) if (r1_sync_page_io(rdev, sect, s, bio->bi_io_vec[idx].bv_page, READ) != 0) @@ -42049,7 +43415,7 @@ index aacf6bf..67d63f2 100644 } sectors -= s; sect += s; -@@ -2051,7 +2051,7 @@ static void fix_read_error(struct r1conf *conf, int read_disk, +@@ -2148,7 +2148,7 @@ static void fix_read_error(struct r1conf *conf, int read_disk, test_bit(In_sync, &rdev->flags)) { if (r1_sync_page_io(rdev, sect, s, conf->tmppage, READ)) { @@ -42059,7 +43425,7 @@ index aacf6bf..67d63f2 100644 "md/raid1:%s: read error corrected " "(%d sectors at %llu on %s)\n", diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c -index 73dc8a3..bdd515a 100644 +index 06eeb99..770613e 100644 --- a/drivers/md/raid10.c +++ b/drivers/md/raid10.c @@ -1963,7 +1963,7 @@ static void end_sync_read(struct bio *bio, int error) @@ -42122,10 +43488,10 @@ index 73dc8a3..bdd515a 100644 rdev_dec_pending(rdev, mddev); diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c -index 8a0665d..984c46d 100644 +index 03f82ab..374bb38 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c -@@ -1887,21 +1887,21 @@ static void raid5_end_read_request(struct bio * bi, int error) +@@ -1991,21 +1991,21 @@ static void raid5_end_read_request(struct bio * bi, int error) mdname(conf->mddev), STRIPE_SECTORS, (unsigned long long)s, bdevname(rdev->bdev, b)); @@ -42151,7 +43517,7 @@ index 8a0665d..984c46d 100644 if (test_bit(R5_ReadRepl, &sh->dev[i].flags)) printk_ratelimited( KERN_WARNING -@@ -1929,7 +1929,7 @@ static void raid5_end_read_request(struct bio * bi, int error) +@@ -2033,7 +2033,7 @@ static void raid5_end_read_request(struct bio * bi, int error) mdname(conf->mddev), (unsigned long long)s, bdn); @@ -42161,10 +43527,10 @@ index 8a0665d..984c46d 100644 printk(KERN_WARNING "md/raid:%s: Too many read errors, failing device %s.\n", diff --git a/drivers/media/dvb-core/dvbdev.c b/drivers/media/dvb-core/dvbdev.c -index 401ef64..836e563 100644 +index 983db75..ef9248c 100644 --- a/drivers/media/dvb-core/dvbdev.c +++ b/drivers/media/dvb-core/dvbdev.c -@@ -192,7 +192,7 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev, +@@ -185,7 +185,7 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev, const struct dvb_device *template, void *priv, int type) { struct dvb_device *dvbdev; @@ -42187,7 +43553,7 @@ index 9b6c3bb..baeb5c7 100644 #if IS_ENABLED(CONFIG_DVB_DIB3000MB) extern struct dvb_frontend* dib3000mb_attach(const struct dib3000_config* config, diff --git a/drivers/media/pci/cx88/cx88-video.c b/drivers/media/pci/cx88/cx88-video.c -index ecf21d9..b992428d 100644 +index ed8cb90..5ef7f79 100644 --- a/drivers/media/pci/cx88/cx88-video.c +++ b/drivers/media/pci/cx88/cx88-video.c @@ -50,9 +50,9 @@ MODULE_VERSION(CX88_VERSION); @@ -42204,7 +43570,7 @@ index ecf21d9..b992428d 100644 module_param_array(video_nr, int, NULL, 0444); module_param_array(vbi_nr, int, NULL, 0444); diff --git a/drivers/media/pci/ivtv/ivtv-driver.c b/drivers/media/pci/ivtv/ivtv-driver.c -index c08ae3e..eb59af1 100644 +index 802642d..5534900 100644 --- a/drivers/media/pci/ivtv/ivtv-driver.c +++ b/drivers/media/pci/ivtv/ivtv-driver.c @@ -83,7 +83,7 @@ static struct pci_device_id ivtv_pci_tbl[] = { @@ -42253,7 +43619,7 @@ index dfd0a21..6bbb465 100644 videobuf_queue_dma_contig_init(q, &video_vbq_ops, q->dev, diff --git a/drivers/media/platform/s5p-tv/mixer.h b/drivers/media/platform/s5p-tv/mixer.h -index 04e6490..2df65bf 100644 +index fb2acc5..a2fcbdc4 100644 --- a/drivers/media/platform/s5p-tv/mixer.h +++ b/drivers/media/platform/s5p-tv/mixer.h @@ -156,7 +156,7 @@ struct mxr_layer { @@ -42266,7 +43632,7 @@ index 04e6490..2df65bf 100644 const struct mxr_format **fmt_array; /** size of format array */ diff --git a/drivers/media/platform/s5p-tv/mixer_grp_layer.c b/drivers/media/platform/s5p-tv/mixer_grp_layer.c -index b93a21f..2535195 100644 +index 74344c7..a39e70e 100644 --- a/drivers/media/platform/s5p-tv/mixer_grp_layer.c +++ b/drivers/media/platform/s5p-tv/mixer_grp_layer.c @@ -235,7 +235,7 @@ struct mxr_layer *mxr_graph_layer_create(struct mxr_device *mdev, int idx) @@ -42292,7 +43658,7 @@ index b713403..53cb5ad 100644 if (done && done != layer->shadow_buf) vb2_buffer_done(&done->vb, VB2_BUF_STATE_DONE); diff --git a/drivers/media/platform/s5p-tv/mixer_video.c b/drivers/media/platform/s5p-tv/mixer_video.c -index 641b1f0..49cff30 100644 +index 81b97db..b089ccd 100644 --- a/drivers/media/platform/s5p-tv/mixer_video.c +++ b/drivers/media/platform/s5p-tv/mixer_video.c @@ -210,7 +210,7 @@ static void mxr_layer_default_geo(struct mxr_layer *layer) @@ -42392,7 +43758,7 @@ index 641b1f0..49cff30 100644 spin_lock_init(&layer->enq_slock); INIT_LIST_HEAD(&layer->enq_list); diff --git a/drivers/media/platform/s5p-tv/mixer_vp_layer.c b/drivers/media/platform/s5p-tv/mixer_vp_layer.c -index 3d13a63..da31bf1 100644 +index c9388c4..ce71ece 100644 --- a/drivers/media/platform/s5p-tv/mixer_vp_layer.c +++ b/drivers/media/platform/s5p-tv/mixer_vp_layer.c @@ -206,7 +206,7 @@ struct mxr_layer *mxr_vp_layer_create(struct mxr_device *mdev, int idx) @@ -42404,6 +43770,21 @@ index 3d13a63..da31bf1 100644 .release = mxr_vp_layer_release, .buffer_set = mxr_vp_buffer_set, .stream_set = mxr_vp_stream_set, +diff --git a/drivers/media/platform/vivi.c b/drivers/media/platform/vivi.c +index 2d4e73b..8b4d5b6 100644 +--- a/drivers/media/platform/vivi.c ++++ b/drivers/media/platform/vivi.c +@@ -58,8 +58,8 @@ MODULE_AUTHOR("Mauro Carvalho Chehab, Ted Walther and John Sokol"); + MODULE_LICENSE("Dual BSD/GPL"); + MODULE_VERSION(VIVI_VERSION); + +-static unsigned video_nr = -1; +-module_param(video_nr, uint, 0644); ++static int video_nr = -1; ++module_param(video_nr, int, 0644); + MODULE_PARM_DESC(video_nr, "videoX start number, -1 is autodetect"); + + static unsigned n_devs = 1; diff --git a/drivers/media/radio/radio-cadet.c b/drivers/media/radio/radio-cadet.c index 545c04c..a14bded 100644 --- a/drivers/media/radio/radio-cadet.c @@ -42440,7 +43821,7 @@ index 5236035..c622c74 100644 #define PCI_VENDOR_ID_GUILLEMOT 0x5046 #define PCI_DEVICE_ID_GUILLEMOT_MAXIRADIO 0x1001 diff --git a/drivers/media/radio/radio-shark.c b/drivers/media/radio/radio-shark.c -index b914772..7ddbf9b 100644 +index 050b3bb..79f62b9 100644 --- a/drivers/media/radio/radio-shark.c +++ b/drivers/media/radio/radio-shark.c @@ -79,7 +79,7 @@ struct shark_device { @@ -42453,7 +43834,7 @@ index b914772..7ddbf9b 100644 static void shark_write_val(struct snd_tea575x *tea, u32 val) { diff --git a/drivers/media/radio/radio-shark2.c b/drivers/media/radio/radio-shark2.c -index 9fb6697..f167415 100644 +index 8654e0d..0608a64 100644 --- a/drivers/media/radio/radio-shark2.c +++ b/drivers/media/radio/radio-shark2.c @@ -74,7 +74,7 @@ struct shark_device { @@ -42466,7 +43847,7 @@ index 9fb6697..f167415 100644 static int shark_write_reg(struct radio_tea5777 *tea, u64 reg) { diff --git a/drivers/media/radio/radio-si476x.c b/drivers/media/radio/radio-si476x.c -index 9c9084c..a9e8dfb 100644 +index 2fd9009..278cc1e 100644 --- a/drivers/media/radio/radio-si476x.c +++ b/drivers/media/radio/radio-si476x.c @@ -1445,7 +1445,7 @@ static int si476x_radio_probe(struct platform_device *pdev) @@ -42514,7 +43895,7 @@ index 20e345d..da56fe4 100644 static int dib7070_set_param_override(struct dvb_frontend *fe) { diff --git a/drivers/media/usb/dvb-usb/dw2102.c b/drivers/media/usb/dvb-usb/dw2102.c -index 71b22f5..a63b33f 100644 +index c1a63b2..dbcbfb6 100644 --- a/drivers/media/usb/dvb-usb/dw2102.c +++ b/drivers/media/usb/dvb-usb/dw2102.c @@ -121,7 +121,7 @@ struct su3000_state { @@ -42527,7 +43908,7 @@ index 71b22f5..a63b33f 100644 /* debug */ static int dvb_usb_dw2102_debug; diff --git a/drivers/media/v4l2-core/v4l2-compat-ioctl32.c b/drivers/media/v4l2-core/v4l2-compat-ioctl32.c -index 8f7a6a4..59502dd 100644 +index 8f7a6a4..eb0e1d4 100644 --- a/drivers/media/v4l2-core/v4l2-compat-ioctl32.c +++ b/drivers/media/v4l2-core/v4l2-compat-ioctl32.c @@ -326,7 +326,7 @@ struct v4l2_buffer32 { @@ -42548,6 +43929,51 @@ index 8f7a6a4..59502dd 100644 enum v4l2_memory memory) { if (copy_in_user(up32, up, 2 * sizeof(__u32)) || +@@ -425,7 +425,7 @@ static int get_v4l2_buffer32(struct v4l2_buffer *kp, struct v4l2_buffer32 __user + * by passing a very big num_planes value */ + uplane = compat_alloc_user_space(num_planes * + sizeof(struct v4l2_plane)); +- kp->m.planes = uplane; ++ kp->m.planes = (struct v4l2_plane __force_kernel *)uplane; + + while (--num_planes >= 0) { + ret = get_v4l2_plane32(uplane, uplane32, kp->memory); +@@ -496,7 +496,7 @@ static int put_v4l2_buffer32(struct v4l2_buffer *kp, struct v4l2_buffer32 __user + if (num_planes == 0) + return 0; + +- uplane = kp->m.planes; ++ uplane = (struct v4l2_plane __force_user *)kp->m.planes; + if (get_user(p, &up->m.planes)) + return -EFAULT; + uplane32 = compat_ptr(p); +@@ -550,7 +550,7 @@ static int get_v4l2_framebuffer32(struct v4l2_framebuffer *kp, struct v4l2_frame + get_user(kp->capability, &up->capability) || + get_user(kp->flags, &up->flags)) + return -EFAULT; +- kp->base = compat_ptr(tmp); ++ kp->base = (void __force_kernel *)compat_ptr(tmp); + get_v4l2_pix_format(&kp->fmt, &up->fmt); + return 0; + } +@@ -656,7 +656,7 @@ static int get_v4l2_ext_controls32(struct v4l2_ext_controls *kp, struct v4l2_ext + n * sizeof(struct v4l2_ext_control32))) + return -EFAULT; + kcontrols = compat_alloc_user_space(n * sizeof(struct v4l2_ext_control)); +- kp->controls = kcontrols; ++ kp->controls = (struct v4l2_ext_control __force_kernel *)kcontrols; + while (--n >= 0) { + if (copy_in_user(kcontrols, ucontrols, sizeof(*ucontrols))) + return -EFAULT; +@@ -678,7 +678,7 @@ static int get_v4l2_ext_controls32(struct v4l2_ext_controls *kp, struct v4l2_ext + static int put_v4l2_ext_controls32(struct v4l2_ext_controls *kp, struct v4l2_ext_controls32 __user *up) + { + struct v4l2_ext_control32 __user *ucontrols; +- struct v4l2_ext_control __user *kcontrols = kp->controls; ++ struct v4l2_ext_control __user *kcontrols = (struct v4l2_ext_control __force_user *)kp->controls; + int n = kp->count; + compat_caddr_t p; + @@ -772,7 +772,7 @@ static int put_v4l2_subdev_edid32(struct v4l2_subdev_edid *kp, struct v4l2_subde put_user(kp->start_block, &up->start_block) || put_user(kp->blocks, &up->blocks) || @@ -42557,6 +43983,21 @@ index 8f7a6a4..59502dd 100644 return -EFAULT; return 0; } +diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c +index fb46790..ae1f8fa 100644 +--- a/drivers/media/v4l2-core/v4l2-ctrls.c ++++ b/drivers/media/v4l2-core/v4l2-ctrls.c +@@ -1396,8 +1396,8 @@ static int validate_new(const struct v4l2_ctrl *ctrl, + return 0; + + case V4L2_CTRL_TYPE_STRING: +- len = strlen(c->string); +- if (len < ctrl->minimum) ++ len = strlen_user(c->string); ++ if (!len || len < ctrl->minimum) + return -ERANGE; + if ((len - ctrl->minimum) % ctrl->step) + return -ERANGE; diff --git a/drivers/media/v4l2-core/v4l2-device.c b/drivers/media/v4l2-core/v4l2-device.c index 02d1b63..5fd6b16 100644 --- a/drivers/media/v4l2-core/v4l2-device.c @@ -42574,7 +44015,7 @@ index 02d1b63..5fd6b16 100644 if (basename[len - 1] >= '0' && basename[len - 1] <= '9') diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c -index 68e6b5e..d8b923e 100644 +index 68e6b5e..8eb2aec 100644 --- a/drivers/media/v4l2-core/v4l2-ioctl.c +++ b/drivers/media/v4l2-core/v4l2-ioctl.c @@ -1939,7 +1939,8 @@ struct v4l2_ioctl_info { @@ -42623,6 +44064,15 @@ index 68e6b5e..d8b923e 100644 *kernel_ptr = (void *)&ctrls->controls; *array_size = sizeof(struct v4l2_ext_control) * ctrls->count; +@@ -2340,7 +2341,7 @@ video_usercopy(struct file *file, unsigned int cmd, unsigned long arg, + err = -ENOTTY; + + if (has_array_args) { +- *kernel_ptr = user_ptr; ++ *kernel_ptr = (void __force_kernel *)user_ptr; + if (copy_to_user(user_ptr, mbuf, array_size)) + err = -EFAULT; + goto out_array_args; diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c index 767ff4d..c69d259 100644 --- a/drivers/message/fusion/mptbase.c @@ -42938,7 +44388,7 @@ index fcbb2e9..2635e11 100644 #include #include diff --git a/drivers/mfd/max8925-i2c.c b/drivers/mfd/max8925-i2c.c -index de7fb80..7c1b931 100644 +index 176aa26..27811b2 100644 --- a/drivers/mfd/max8925-i2c.c +++ b/drivers/mfd/max8925-i2c.c @@ -152,7 +152,7 @@ static int max8925_probe(struct i2c_client *client, @@ -42951,10 +44401,10 @@ index de7fb80..7c1b931 100644 if (node && !pdata) { diff --git a/drivers/mfd/tps65910.c b/drivers/mfd/tps65910.c -index d792772..cd73ba3 100644 +index c0f608e..286f8ec 100644 --- a/drivers/mfd/tps65910.c +++ b/drivers/mfd/tps65910.c -@@ -229,7 +229,7 @@ static int tps65910_irq_init(struct tps65910 *tps65910, int irq, +@@ -230,7 +230,7 @@ static int tps65910_irq_init(struct tps65910 *tps65910, int irq, struct tps65910_platform_data *pdata) { int ret = 0; @@ -43006,6 +44456,21 @@ index 464419b..64bae8d 100644 c2dev->dev = device_create(c2port_class, NULL, 0, c2dev, "c2port%d", c2dev->id); +diff --git a/drivers/misc/eeprom/sunxi_sid.c b/drivers/misc/eeprom/sunxi_sid.c +index 9c34e57..b981cda 100644 +--- a/drivers/misc/eeprom/sunxi_sid.c ++++ b/drivers/misc/eeprom/sunxi_sid.c +@@ -127,7 +127,9 @@ static int sunxi_sid_probe(struct platform_device *pdev) + + platform_set_drvdata(pdev, sid_data); + +- sid_bin_attr.size = sid_data->keysize; ++ pax_open_kernel(); ++ *(size_t *)&sid_bin_attr.size = sid_data->keysize; ++ pax_close_kernel(); + if (device_create_bin_file(&pdev->dev, &sid_bin_attr)) + return -ENODEV; + diff --git a/drivers/misc/kgdbts.c b/drivers/misc/kgdbts.c index 36f5d52..32311c3 100644 --- a/drivers/misc/kgdbts.c @@ -43317,6 +44782,30 @@ index c862cd4..0d176fe 100644 extern struct xpc_interface xpc_interface; +diff --git a/drivers/misc/sgi-xp/xp_main.c b/drivers/misc/sgi-xp/xp_main.c +index 01be66d..e3a0c7e 100644 +--- a/drivers/misc/sgi-xp/xp_main.c ++++ b/drivers/misc/sgi-xp/xp_main.c +@@ -78,13 +78,13 @@ xpc_notloaded(void) + } + + struct xpc_interface xpc_interface = { +- (void (*)(int))xpc_notloaded, +- (void (*)(int))xpc_notloaded, +- (enum xp_retval(*)(short, int, u32, void *, u16))xpc_notloaded, +- (enum xp_retval(*)(short, int, u32, void *, u16, xpc_notify_func, ++ .connect = (void (*)(int))xpc_notloaded, ++ .disconnect = (void (*)(int))xpc_notloaded, ++ .send = (enum xp_retval(*)(short, int, u32, void *, u16))xpc_notloaded, ++ .send_notify = (enum xp_retval(*)(short, int, u32, void *, u16, xpc_notify_func, + void *))xpc_notloaded, +- (void (*)(short, int, void *))xpc_notloaded, +- (enum xp_retval(*)(short, void *))xpc_notloaded ++ .received = (void (*)(short, int, void *))xpc_notloaded, ++ .partid_to_nasids = (enum xp_retval(*)(short, void *))xpc_notloaded + }; + EXPORT_SYMBOL_GPL(xpc_interface); + diff --git a/drivers/misc/sgi-xp/xpc.h b/drivers/misc/sgi-xp/xpc.h index b94d5f7..7f494c5 100644 --- a/drivers/misc/sgi-xp/xpc.h @@ -43360,11 +44849,24 @@ index 82dc574..8539ab2 100644 xpc_die_deactivate(); break; +diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c +index 29d5d98..fea356f 100644 +--- a/drivers/mmc/card/block.c ++++ b/drivers/mmc/card/block.c +@@ -575,7 +575,7 @@ static int mmc_blk_ioctl_cmd(struct block_device *bdev, + if (idata->ic.postsleep_min_us) + usleep_range(idata->ic.postsleep_min_us, idata->ic.postsleep_max_us); + +- if (copy_to_user(&(ic_ptr->response), cmd.resp, sizeof(cmd.resp))) { ++ if (copy_to_user(ic_ptr->response, cmd.resp, sizeof(cmd.resp))) { + err = -EFAULT; + goto cmd_rel_host; + } diff --git a/drivers/mmc/core/mmc_ops.c b/drivers/mmc/core/mmc_ops.c -index ef18348..1b53cf0 100644 +index e5b5eeb..7bf2212 100644 --- a/drivers/mmc/core/mmc_ops.c +++ b/drivers/mmc/core/mmc_ops.c -@@ -213,7 +213,7 @@ mmc_send_cxd_data(struct mmc_card *card, struct mmc_host *host, +@@ -247,7 +247,7 @@ mmc_send_cxd_data(struct mmc_card *card, struct mmc_host *host, void *data_buf; int is_on_stack; @@ -43374,21 +44876,21 @@ index ef18348..1b53cf0 100644 /* * dma onto stack is unsafe/nonportable, but callers to this diff --git a/drivers/mmc/host/dw_mmc.h b/drivers/mmc/host/dw_mmc.h -index 81b2994..dce857e 100644 +index 6bf24ab..13d0293b 100644 --- a/drivers/mmc/host/dw_mmc.h +++ b/drivers/mmc/host/dw_mmc.h -@@ -203,5 +203,5 @@ struct dw_mci_drv_data { - void (*prepare_command)(struct dw_mci *host, u32 *cmdr); - void (*set_ios)(struct dw_mci *host, struct mmc_ios *ios); +@@ -258,5 +258,5 @@ struct dw_mci_drv_data { int (*parse_dt)(struct dw_mci *host); + int (*execute_tuning)(struct dw_mci_slot *slot, u32 opcode, + struct dw_mci_tuning_data *tuning_data); -}; +} __do_const; #endif /* _DW_MMC_H_ */ diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c -index c3785ed..1984c44 100644 +index f320579..7b7ebac 100644 --- a/drivers/mmc/host/mmci.c +++ b/drivers/mmc/host/mmci.c -@@ -1482,7 +1482,9 @@ static int mmci_probe(struct amba_device *dev, +@@ -1504,7 +1504,9 @@ static int mmci_probe(struct amba_device *dev, } if (variant->busy_detect) { @@ -43399,6 +44901,25 @@ index c3785ed..1984c44 100644 mmci_write_datactrlreg(host, MCI_ST_DPSM_BUSYMODE); } +diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c +index 1dcaf8a..025af25 100644 +--- a/drivers/mmc/host/sdhci-esdhc-imx.c ++++ b/drivers/mmc/host/sdhci-esdhc-imx.c +@@ -1009,9 +1009,12 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev) + host->quirks2 |= SDHCI_QUIRK2_PRESET_VALUE_BROKEN; + } + +- if (imx_data->socdata->flags & ESDHC_FLAG_MAN_TUNING) +- sdhci_esdhc_ops.platform_execute_tuning = ++ if (imx_data->socdata->flags & ESDHC_FLAG_MAN_TUNING) { ++ pax_open_kernel(); ++ *(void **)&sdhci_esdhc_ops.platform_execute_tuning = + esdhc_executing_tuning; ++ pax_close_kernel(); ++ } + boarddata = &imx_data->boarddata; + if (sdhci_esdhc_imx_probe_dt(pdev, boarddata) < 0) { + if (!host->mmc->parent->platform_data) { diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c index 6debda9..2ba7427 100644 --- a/drivers/mmc/host/sdhci-s3c.c @@ -43432,7 +44953,7 @@ index 096993f..f02c23b 100644 if (!ECCBUF_SIZE) { /* We should fall back to a general writev implementation. diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/denali.c -index 2ed2bb3..2d0b82e 100644 +index 370b9dd..1a1176b 100644 --- a/drivers/mtd/nand/denali.c +++ b/drivers/mtd/nand/denali.c @@ -24,6 +24,7 @@ @@ -43469,30 +44990,32 @@ index 4b8e895..6b3c498 100644 struct sm_sysfs_attribute *vendor_attribute; diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c -index dd8057d..22aaf36 100644 +index 4b8c58b..a200546 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c -@@ -4511,7 +4511,7 @@ static unsigned int bond_get_num_tx_queues(void) - return tx_queues; - } +@@ -4527,6 +4527,7 @@ static void __exit bonding_exit(void) --static struct rtnl_link_ops bond_link_ops __read_mostly = { -+static struct rtnl_link_ops bond_link_ops = { - .kind = "bond", - .priv_size = sizeof(struct bonding), - .setup = bond_setup, -@@ -4636,8 +4636,8 @@ static void __exit bonding_exit(void) - - bond_destroy_debugfs(); - -- rtnl_link_unregister(&bond_link_ops); + bond_netlink_fini(); unregister_pernet_subsys(&bond_net_ops); + rtnl_link_unregister(&bond_link_ops); #ifdef CONFIG_NET_POLL_CONTROLLER /* +diff --git a/drivers/net/bonding/bond_netlink.c b/drivers/net/bonding/bond_netlink.c +index 40e7b1c..6a70fff 100644 +--- a/drivers/net/bonding/bond_netlink.c ++++ b/drivers/net/bonding/bond_netlink.c +@@ -102,7 +102,7 @@ nla_put_failure: + return -EMSGSIZE; + } + +-struct rtnl_link_ops bond_link_ops __read_mostly = { ++struct rtnl_link_ops bond_link_ops = { + .kind = "bond", + .priv_size = sizeof(struct bonding), + .setup = bond_setup, diff --git a/drivers/net/ethernet/8390/ax88796.c b/drivers/net/ethernet/8390/ax88796.c -index f92f001..0b2f9bf 100644 +index 36fa577..a158806 100644 --- a/drivers/net/ethernet/8390/ax88796.c +++ b/drivers/net/ethernet/8390/ax88796.c @@ -872,9 +872,11 @@ static int ax_probe(struct platform_device *pdev) @@ -43509,10 +45032,10 @@ index f92f001..0b2f9bf 100644 if (!request_mem_region(mem->start, mem_size, pdev->name)) { diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h -index da8fcaa..f4b5d3b 100644 +index 41f3ca5a..1ee5364 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h -@@ -1138,7 +1138,7 @@ static inline u8 bnx2x_get_path_func_num(struct bnx2x *bp) +@@ -1139,7 +1139,7 @@ static inline u8 bnx2x_get_path_func_num(struct bnx2x *bp) static inline void bnx2x_init_bp_objs(struct bnx2x *bp) { /* RX_MODE controlling object */ @@ -43522,10 +45045,10 @@ index da8fcaa..f4b5d3b 100644 /* multicast configuration controlling object */ bnx2x_init_mcast_obj(bp, &bp->mcast_obj, bp->fp->cl_id, bp->fp->cid, diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c -index 9fbeee5..5e3e37a 100644 +index 18438a5..c923b8e 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c -@@ -2590,15 +2590,14 @@ int bnx2x_config_rx_mode(struct bnx2x *bp, +@@ -2591,15 +2591,14 @@ int bnx2x_config_rx_mode(struct bnx2x *bp, return rc; } @@ -43547,10 +45070,10 @@ index 9fbeee5..5e3e37a 100644 } diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h -index 658f4e3..15074a6 100644 +index 6a53c15..6e7d1e7 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h -@@ -1325,8 +1325,7 @@ int bnx2x_vlan_mac_move(struct bnx2x *bp, +@@ -1332,8 +1332,7 @@ int bnx2x_vlan_mac_move(struct bnx2x *bp, /********************* RX MODE ****************/ @@ -43561,10 +45084,10 @@ index 658f4e3..15074a6 100644 /** * bnx2x_config_rx_mode - Send and RX_MODE ramrod according to the provided parameters. diff --git a/drivers/net/ethernet/broadcom/tg3.h b/drivers/net/ethernet/broadcom/tg3.h -index 7025780..e55a71c 100644 +index 5c3835a..d18b952 100644 --- a/drivers/net/ethernet/broadcom/tg3.h +++ b/drivers/net/ethernet/broadcom/tg3.h -@@ -147,6 +147,7 @@ +@@ -150,6 +150,7 @@ #define CHIPREV_ID_5750_A0 0x4000 #define CHIPREV_ID_5750_A1 0x4001 #define CHIPREV_ID_5750_A3 0x4003 @@ -43572,6 +45095,25 @@ index 7025780..e55a71c 100644 #define CHIPREV_ID_5750_C2 0x4202 #define CHIPREV_ID_5752_A0_HW 0x5000 #define CHIPREV_ID_5752_A0 0x6000 +diff --git a/drivers/net/ethernet/brocade/bna/bna_enet.c b/drivers/net/ethernet/brocade/bna/bna_enet.c +index 3ca77fa..fcc015f 100644 +--- a/drivers/net/ethernet/brocade/bna/bna_enet.c ++++ b/drivers/net/ethernet/brocade/bna/bna_enet.c +@@ -1690,10 +1690,10 @@ bna_cb_ioceth_reset(void *arg) + } + + static struct bfa_ioc_cbfn bna_ioceth_cbfn = { +- bna_cb_ioceth_enable, +- bna_cb_ioceth_disable, +- bna_cb_ioceth_hbfail, +- bna_cb_ioceth_reset ++ .enable_cbfn = bna_cb_ioceth_enable, ++ .disable_cbfn = bna_cb_ioceth_disable, ++ .hbfail_cbfn = bna_cb_ioceth_hbfail, ++ .reset_cbfn = bna_cb_ioceth_reset + }; + + static void bna_attr_init(struct bna_ioceth *ioceth) diff --git a/drivers/net/ethernet/chelsio/cxgb3/l2t.h b/drivers/net/ethernet/chelsio/cxgb3/l2t.h index 8cffcdf..aadf043 100644 --- a/drivers/net/ethernet/chelsio/cxgb3/l2t.h @@ -43586,10 +45128,10 @@ index 8cffcdf..aadf043 100644 #define L2T_SKB_CB(skb) ((struct l2t_skb_cb *)(skb)->cb) diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c -index c73cabd..cd278b1 100644 +index fff02ed..d421412 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c -@@ -2186,7 +2186,7 @@ static void get_regs(struct net_device *dev, struct ethtool_regs *regs, +@@ -2120,7 +2120,7 @@ static void get_regs(struct net_device *dev, struct ethtool_regs *regs, int i; struct adapter *ap = netdev2adap(dev); @@ -43597,9 +45139,9 @@ index c73cabd..cd278b1 100644 + const unsigned int *reg_ranges; int arr_size = 0, buf_size = 0; - if (is_t4(ap->chip)) { + if (is_t4(ap->params.chip)) { diff --git a/drivers/net/ethernet/dec/tulip/de4x5.c b/drivers/net/ethernet/dec/tulip/de4x5.c -index 263b92c..f05134b 100644 +index c05b66d..ed69872 100644 --- a/drivers/net/ethernet/dec/tulip/de4x5.c +++ b/drivers/net/ethernet/dec/tulip/de4x5.c @@ -5388,7 +5388,7 @@ de4x5_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) @@ -43621,10 +45163,10 @@ index 263b92c..f05134b 100644 break; } diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c -index 2c38cc4..0323f6e 100644 +index a37039d..a51d7e8 100644 --- a/drivers/net/ethernet/emulex/benet/be_main.c +++ b/drivers/net/ethernet/emulex/benet/be_main.c -@@ -470,7 +470,7 @@ static void accumulate_16bit_val(u32 *acc, u16 val) +@@ -533,7 +533,7 @@ static void accumulate_16bit_val(u32 *acc, u16 val) if (wrapped) newacc += 65536; @@ -43698,25 +45240,25 @@ index fbe5363..266b4e3 100644 __vxge_hw_mempool_create(vpath->hldev, fifo->config->memblock_size, diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c -index f09e787..f3916a8 100644 +index 918e18d..4ca3650 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c -@@ -2055,7 +2055,9 @@ int qlcnic_83xx_configure_opmode(struct qlcnic_adapter *adapter) - +@@ -2086,7 +2086,9 @@ int qlcnic_83xx_configure_opmode(struct qlcnic_adapter *adapter) + adapter->max_tx_rings = QLCNIC_MAX_VNIC_TX_RINGS; } else if (ret == QLC_83XX_DEFAULT_OPMODE) { - ahw->nic_mode = QLC_83XX_DEFAULT_MODE; + ahw->nic_mode = QLCNIC_DEFAULT_MODE; - adapter->nic_ops->init_driver = qlcnic_83xx_init_default_driver; + pax_open_kernel(); + *(void **)&adapter->nic_ops->init_driver = qlcnic_83xx_init_default_driver; + pax_close_kernel(); ahw->idc.state_entry = qlcnic_83xx_idc_ready_state_entry; - } else { - return -EIO; + adapter->max_sds_rings = QLCNIC_MAX_SDS_RINGS; + adapter->max_tx_rings = QLCNIC_MAX_TX_RINGS; diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_vnic.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_vnic.c -index 0248a4c..9648d96 100644 +index 734d286..b017bf5 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_vnic.c +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_vnic.c -@@ -191,17 +191,23 @@ int qlcnic_83xx_config_vnic_opmode(struct qlcnic_adapter *adapter) +@@ -207,17 +207,23 @@ int qlcnic_83xx_config_vnic_opmode(struct qlcnic_adapter *adapter) case QLCNIC_NON_PRIV_FUNC: ahw->op_mode = QLCNIC_NON_PRIV_FUNC; ahw->idc.state_entry = qlcnic_83xx_idc_ready_state_entry; @@ -43744,7 +45286,7 @@ index 0248a4c..9648d96 100644 default: dev_err(&adapter->pdev->dev, "Invalid Virtual NIC opmode\n"); diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_minidump.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_minidump.c -index 1551360..ed6510f 100644 +index 7763962..c3499a7 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_minidump.c +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_minidump.c @@ -1108,7 +1108,7 @@ int qlcnic_dump_fw(struct qlcnic_adapter *adapter) @@ -43757,7 +45299,7 @@ index 1551360..ed6510f 100644 struct qlcnic_hardware_context *ahw; void *temp_buffer; diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c -index fb3f8dc..9d2ff38 100644 +index c737f0e..32b8682 100644 --- a/drivers/net/ethernet/realtek/r8169.c +++ b/drivers/net/ethernet/realtek/r8169.c @@ -759,22 +759,22 @@ struct rtl8169_private { @@ -43788,10 +45330,10 @@ index fb3f8dc..9d2ff38 100644 int (*set_speed)(struct net_device *, u8 aneg, u16 sp, u8 dpx, u32 adv); int (*get_settings)(struct net_device *, struct ethtool_cmd *); diff --git a/drivers/net/ethernet/sfc/ptp.c b/drivers/net/ethernet/sfc/ptp.c -index 03acf57..e1251ff 100644 +index 3dd39dc..85efa46 100644 --- a/drivers/net/ethernet/sfc/ptp.c +++ b/drivers/net/ethernet/sfc/ptp.c -@@ -539,7 +539,7 @@ static int efx_ptp_synchronize(struct efx_nic *efx, unsigned int num_readings) +@@ -541,7 +541,7 @@ static int efx_ptp_synchronize(struct efx_nic *efx, unsigned int num_readings) ptp->start.dma_addr); /* Clear flag that signals MC ready */ @@ -43864,10 +45406,10 @@ index bf0d55e..82bcfbd1 100644 priv = netdev_priv(dev); priv->phy = phy; diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c -index 9bf46bd..bfdaa84 100644 +index bc8faae..e51e25d 100644 --- a/drivers/net/macvlan.c +++ b/drivers/net/macvlan.c -@@ -939,13 +939,15 @@ static const struct nla_policy macvlan_policy[IFLA_MACVLAN_MAX + 1] = { +@@ -990,13 +990,15 @@ static const struct nla_policy macvlan_policy[IFLA_MACVLAN_MAX + 1] = { int macvlan_link_register(struct rtnl_link_ops *ops) { /* common fields */ @@ -43890,7 +45432,7 @@ index 9bf46bd..bfdaa84 100644 return rtnl_link_register(ops); }; -@@ -1001,7 +1003,7 @@ static int macvlan_device_event(struct notifier_block *unused, +@@ -1051,7 +1053,7 @@ static int macvlan_device_event(struct notifier_block *unused, return NOTIFY_DONE; } @@ -43900,10 +45442,19 @@ index 9bf46bd..bfdaa84 100644 }; diff --git a/drivers/net/macvtap.c b/drivers/net/macvtap.c -index dc76670..e18f39c 100644 +index 2a89da0..c17fe1d 100644 --- a/drivers/net/macvtap.c +++ b/drivers/net/macvtap.c -@@ -1189,7 +1189,7 @@ static int macvtap_device_event(struct notifier_block *unused, +@@ -1012,7 +1012,7 @@ static long macvtap_ioctl(struct file *file, unsigned int cmd, + } + + ret = 0; +- if (copy_to_user(&ifr->ifr_name, vlan->dev->name, IFNAMSIZ) || ++ if (copy_to_user(ifr->ifr_name, vlan->dev->name, IFNAMSIZ) || + put_user(q->flags, &ifr->ifr_flags)) + ret = -EFAULT; + macvtap_put_vlan(vlan); +@@ -1182,7 +1182,7 @@ static int macvtap_device_event(struct notifier_block *unused, return NOTIFY_DONE; } @@ -43960,10 +45511,10 @@ index 1252d9c..80e660b 100644 /* We've got a compressed packet; read the change byte */ diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c -index 6327df2..e6e1ebe 100644 +index b75ae5b..953c157 100644 --- a/drivers/net/team/team.c +++ b/drivers/net/team/team.c -@@ -2873,7 +2873,7 @@ static int team_device_event(struct notifier_block *unused, +@@ -2865,7 +2865,7 @@ static int team_device_event(struct notifier_block *unused, return NOTIFY_DONE; } @@ -43973,10 +45524,10 @@ index 6327df2..e6e1ebe 100644 }; diff --git a/drivers/net/tun.c b/drivers/net/tun.c -index 782e38b..d076fdc 100644 +index ecec802..614f08f 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c -@@ -1834,7 +1834,7 @@ unlock: +@@ -1839,7 +1839,7 @@ unlock: } static long __tun_chr_ioctl(struct file *file, unsigned int cmd, @@ -43985,7 +45536,7 @@ index 782e38b..d076fdc 100644 { struct tun_file *tfile = file->private_data; struct tun_struct *tun; -@@ -1847,6 +1847,9 @@ static long __tun_chr_ioctl(struct file *file, unsigned int cmd, +@@ -1852,6 +1852,9 @@ static long __tun_chr_ioctl(struct file *file, unsigned int cmd, unsigned int ifindex; int ret; @@ -43996,7 +45547,7 @@ index 782e38b..d076fdc 100644 if (copy_from_user(&ifr, argp, ifreq_len)) return -EFAULT; diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c -index 86292e6..8d34433 100644 +index 1a48234..a555339 100644 --- a/drivers/net/usb/hso.c +++ b/drivers/net/usb/hso.c @@ -71,7 +71,7 @@ @@ -44008,7 +45559,7 @@ index 86292e6..8d34433 100644 #define MOD_AUTHOR "Option Wireless" #define MOD_DESCRIPTION "USB High Speed Option driver" -@@ -1180,7 +1180,7 @@ static void put_rxbuf_data_and_resubmit_ctrl_urb(struct hso_serial *serial) +@@ -1179,7 +1179,7 @@ static void put_rxbuf_data_and_resubmit_ctrl_urb(struct hso_serial *serial) struct urb *urb; urb = serial->rx_urb[0]; @@ -44017,7 +45568,7 @@ index 86292e6..8d34433 100644 count = put_rxbuf_data(urb, serial); if (count == -1) return; -@@ -1216,7 +1216,7 @@ static void hso_std_serial_read_bulk_callback(struct urb *urb) +@@ -1215,7 +1215,7 @@ static void hso_std_serial_read_bulk_callback(struct urb *urb) DUMP1(urb->transfer_buffer, urb->actual_length); /* Anyone listening? */ @@ -44026,7 +45577,7 @@ index 86292e6..8d34433 100644 return; if (status == 0) { -@@ -1298,8 +1298,7 @@ static int hso_serial_open(struct tty_struct *tty, struct file *filp) +@@ -1297,8 +1297,7 @@ static int hso_serial_open(struct tty_struct *tty, struct file *filp) tty_port_tty_set(&serial->port, tty); /* check for port already opened, if not set the termios */ @@ -44036,7 +45587,7 @@ index 86292e6..8d34433 100644 serial->rx_state = RX_IDLE; /* Force default termio settings */ _hso_serial_set_termios(tty, NULL); -@@ -1311,7 +1310,7 @@ static int hso_serial_open(struct tty_struct *tty, struct file *filp) +@@ -1310,7 +1309,7 @@ static int hso_serial_open(struct tty_struct *tty, struct file *filp) result = hso_start_serial_device(serial->parent, GFP_KERNEL); if (result) { hso_stop_serial_device(serial->parent); @@ -44045,7 +45596,7 @@ index 86292e6..8d34433 100644 kref_put(&serial->parent->ref, hso_serial_ref_free); } } else { -@@ -1348,10 +1347,10 @@ static void hso_serial_close(struct tty_struct *tty, struct file *filp) +@@ -1347,10 +1346,10 @@ static void hso_serial_close(struct tty_struct *tty, struct file *filp) /* reset the rts and dtr */ /* do the actual close */ @@ -44059,7 +45610,7 @@ index 86292e6..8d34433 100644 tty_port_tty_set(&serial->port, NULL); if (!usb_gone) hso_stop_serial_device(serial->parent); -@@ -1427,7 +1426,7 @@ static void hso_serial_set_termios(struct tty_struct *tty, struct ktermios *old) +@@ -1426,7 +1425,7 @@ static void hso_serial_set_termios(struct tty_struct *tty, struct ktermios *old) /* the actual setup */ spin_lock_irqsave(&serial->serial_lock, flags); @@ -44068,7 +45619,7 @@ index 86292e6..8d34433 100644 _hso_serial_set_termios(tty, old); else tty->termios = *old; -@@ -1886,7 +1885,7 @@ static void intr_callback(struct urb *urb) +@@ -1895,7 +1894,7 @@ static void intr_callback(struct urb *urb) D1("Pending read interrupt on port %d\n", i); spin_lock(&serial->serial_lock); if (serial->rx_state == RX_IDLE && @@ -44077,7 +45628,7 @@ index 86292e6..8d34433 100644 /* Setup and send a ctrl req read on * port i */ if (!serial->rx_urb_filled[0]) { -@@ -3062,7 +3061,7 @@ static int hso_resume(struct usb_interface *iface) +@@ -3071,7 +3070,7 @@ static int hso_resume(struct usb_interface *iface) /* Start all serial ports */ for (i = 0; i < HSO_SERIAL_TTY_MINORS; i++) { if (serial_table[i] && (serial_table[i]->interface == iface)) { @@ -44109,7 +45660,7 @@ index a79e9d3..78cd4fa 100644 /* we will have to manufacture ethernet headers, prepare template */ diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c -index 2ef5b62..6fa0ec3 100644 +index 0247973..088193a 100644 --- a/drivers/net/vxlan.c +++ b/drivers/net/vxlan.c @@ -2615,7 +2615,7 @@ nla_put_failure: @@ -44121,6 +45672,174 @@ index 2ef5b62..6fa0ec3 100644 .kind = "vxlan", .maxtype = IFLA_VXLAN_MAX, .policy = vxlan_policy, +diff --git a/drivers/net/wan/lmc/lmc_media.c b/drivers/net/wan/lmc/lmc_media.c +index 5920c99..ff2e4a5 100644 +--- a/drivers/net/wan/lmc/lmc_media.c ++++ b/drivers/net/wan/lmc/lmc_media.c +@@ -95,62 +95,63 @@ static inline void write_av9110_bit (lmc_softc_t *, int); + static void write_av9110(lmc_softc_t *, u32, u32, u32, u32, u32); + + lmc_media_t lmc_ds3_media = { +- lmc_ds3_init, /* special media init stuff */ +- lmc_ds3_default, /* reset to default state */ +- lmc_ds3_set_status, /* reset status to state provided */ +- lmc_dummy_set_1, /* set clock source */ +- lmc_dummy_set2_1, /* set line speed */ +- lmc_ds3_set_100ft, /* set cable length */ +- lmc_ds3_set_scram, /* set scrambler */ +- lmc_ds3_get_link_status, /* get link status */ +- lmc_dummy_set_1, /* set link status */ +- lmc_ds3_set_crc_length, /* set CRC length */ +- lmc_dummy_set_1, /* set T1 or E1 circuit type */ +- lmc_ds3_watchdog ++ .init = lmc_ds3_init, /* special media init stuff */ ++ .defaults = lmc_ds3_default, /* reset to default state */ ++ .set_status = lmc_ds3_set_status, /* reset status to state provided */ ++ .set_clock_source = lmc_dummy_set_1, /* set clock source */ ++ .set_speed = lmc_dummy_set2_1, /* set line speed */ ++ .set_cable_length = lmc_ds3_set_100ft, /* set cable length */ ++ .set_scrambler = lmc_ds3_set_scram, /* set scrambler */ ++ .get_link_status = lmc_ds3_get_link_status, /* get link status */ ++ .set_link_status = lmc_dummy_set_1, /* set link status */ ++ .set_crc_length = lmc_ds3_set_crc_length, /* set CRC length */ ++ .set_circuit_type = lmc_dummy_set_1, /* set T1 or E1 circuit type */ ++ .watchdog = lmc_ds3_watchdog + }; + + lmc_media_t lmc_hssi_media = { +- lmc_hssi_init, /* special media init stuff */ +- lmc_hssi_default, /* reset to default state */ +- lmc_hssi_set_status, /* reset status to state provided */ +- lmc_hssi_set_clock, /* set clock source */ +- lmc_dummy_set2_1, /* set line speed */ +- lmc_dummy_set_1, /* set cable length */ +- lmc_dummy_set_1, /* set scrambler */ +- lmc_hssi_get_link_status, /* get link status */ +- lmc_hssi_set_link_status, /* set link status */ +- lmc_hssi_set_crc_length, /* set CRC length */ +- lmc_dummy_set_1, /* set T1 or E1 circuit type */ +- lmc_hssi_watchdog ++ .init = lmc_hssi_init, /* special media init stuff */ ++ .defaults = lmc_hssi_default, /* reset to default state */ ++ .set_status = lmc_hssi_set_status, /* reset status to state provided */ ++ .set_clock_source = lmc_hssi_set_clock, /* set clock source */ ++ .set_speed = lmc_dummy_set2_1, /* set line speed */ ++ .set_cable_length = lmc_dummy_set_1, /* set cable length */ ++ .set_scrambler = lmc_dummy_set_1, /* set scrambler */ ++ .get_link_status = lmc_hssi_get_link_status, /* get link status */ ++ .set_link_status = lmc_hssi_set_link_status, /* set link status */ ++ .set_crc_length = lmc_hssi_set_crc_length, /* set CRC length */ ++ .set_circuit_type = lmc_dummy_set_1, /* set T1 or E1 circuit type */ ++ .watchdog = lmc_hssi_watchdog + }; + +-lmc_media_t lmc_ssi_media = { lmc_ssi_init, /* special media init stuff */ +- lmc_ssi_default, /* reset to default state */ +- lmc_ssi_set_status, /* reset status to state provided */ +- lmc_ssi_set_clock, /* set clock source */ +- lmc_ssi_set_speed, /* set line speed */ +- lmc_dummy_set_1, /* set cable length */ +- lmc_dummy_set_1, /* set scrambler */ +- lmc_ssi_get_link_status, /* get link status */ +- lmc_ssi_set_link_status, /* set link status */ +- lmc_ssi_set_crc_length, /* set CRC length */ +- lmc_dummy_set_1, /* set T1 or E1 circuit type */ +- lmc_ssi_watchdog ++lmc_media_t lmc_ssi_media = { ++ .init = lmc_ssi_init, /* special media init stuff */ ++ .defaults = lmc_ssi_default, /* reset to default state */ ++ .set_status = lmc_ssi_set_status, /* reset status to state provided */ ++ .set_clock_source = lmc_ssi_set_clock, /* set clock source */ ++ .set_speed = lmc_ssi_set_speed, /* set line speed */ ++ .set_cable_length = lmc_dummy_set_1, /* set cable length */ ++ .set_scrambler = lmc_dummy_set_1, /* set scrambler */ ++ .get_link_status = lmc_ssi_get_link_status, /* get link status */ ++ .set_link_status = lmc_ssi_set_link_status, /* set link status */ ++ .set_crc_length = lmc_ssi_set_crc_length, /* set CRC length */ ++ .set_circuit_type = lmc_dummy_set_1, /* set T1 or E1 circuit type */ ++ .watchdog = lmc_ssi_watchdog + }; + + lmc_media_t lmc_t1_media = { +- lmc_t1_init, /* special media init stuff */ +- lmc_t1_default, /* reset to default state */ +- lmc_t1_set_status, /* reset status to state provided */ +- lmc_t1_set_clock, /* set clock source */ +- lmc_dummy_set2_1, /* set line speed */ +- lmc_dummy_set_1, /* set cable length */ +- lmc_dummy_set_1, /* set scrambler */ +- lmc_t1_get_link_status, /* get link status */ +- lmc_dummy_set_1, /* set link status */ +- lmc_t1_set_crc_length, /* set CRC length */ +- lmc_t1_set_circuit_type, /* set T1 or E1 circuit type */ +- lmc_t1_watchdog ++ .init = lmc_t1_init, /* special media init stuff */ ++ .defaults = lmc_t1_default, /* reset to default state */ ++ .set_status = lmc_t1_set_status, /* reset status to state provided */ ++ .set_clock_source = lmc_t1_set_clock, /* set clock source */ ++ .set_speed = lmc_dummy_set2_1, /* set line speed */ ++ .set_cable_length = lmc_dummy_set_1, /* set cable length */ ++ .set_scrambler = lmc_dummy_set_1, /* set scrambler */ ++ .get_link_status = lmc_t1_get_link_status, /* get link status */ ++ .set_link_status = lmc_dummy_set_1, /* set link status */ ++ .set_crc_length = lmc_t1_set_crc_length, /* set CRC length */ ++ .set_circuit_type = lmc_t1_set_circuit_type, /* set T1 or E1 circuit type */ ++ .watchdog = lmc_t1_watchdog + }; + + static void +diff --git a/drivers/net/wan/z85230.c b/drivers/net/wan/z85230.c +index feacc3b..5bac0de 100644 +--- a/drivers/net/wan/z85230.c ++++ b/drivers/net/wan/z85230.c +@@ -485,9 +485,9 @@ static void z8530_status(struct z8530_channel *chan) + + struct z8530_irqhandler z8530_sync = + { +- z8530_rx, +- z8530_tx, +- z8530_status ++ .rx = z8530_rx, ++ .tx = z8530_tx, ++ .status = z8530_status + }; + + EXPORT_SYMBOL(z8530_sync); +@@ -605,15 +605,15 @@ static void z8530_dma_status(struct z8530_channel *chan) + } + + static struct z8530_irqhandler z8530_dma_sync = { +- z8530_dma_rx, +- z8530_dma_tx, +- z8530_dma_status ++ .rx = z8530_dma_rx, ++ .tx = z8530_dma_tx, ++ .status = z8530_dma_status + }; + + static struct z8530_irqhandler z8530_txdma_sync = { +- z8530_rx, +- z8530_dma_tx, +- z8530_dma_status ++ .rx = z8530_rx, ++ .tx = z8530_dma_tx, ++ .status = z8530_dma_status + }; + + /** +@@ -680,9 +680,9 @@ static void z8530_status_clear(struct z8530_channel *chan) + + struct z8530_irqhandler z8530_nop= + { +- z8530_rx_clear, +- z8530_tx_clear, +- z8530_status_clear ++ .rx = z8530_rx_clear, ++ .tx = z8530_tx_clear, ++ .status = z8530_status_clear + }; + + diff --git a/drivers/net/wimax/i2400m/rx.c b/drivers/net/wimax/i2400m/rx.c index 0b60295..b8bfa5b 100644 --- a/drivers/net/wimax/i2400m/rx.c @@ -44135,10 +45854,10 @@ index 0b60295..b8bfa5b 100644 if (rd == NULL) { result = -ENOMEM; diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c -index 7fe1964..7016de0 100644 +index edf4b57..68b51c0 100644 --- a/drivers/net/wireless/airo.c +++ b/drivers/net/wireless/airo.c -@@ -7844,7 +7844,7 @@ static int writerids(struct net_device *dev, aironet_ioctl *comp) { +@@ -7843,7 +7843,7 @@ static int writerids(struct net_device *dev, aironet_ioctl *comp) { struct airo_info *ai = dev->ml_priv; int ridcode; int enabled; @@ -44161,10 +45880,10 @@ index 34c8a33..3261fdc 100644 return msecs_to_jiffies((s->poll_timeout[2] << 16) | (s->poll_timeout[1] << 8) diff --git a/drivers/net/wireless/ath/ath10k/htc.c b/drivers/net/wireless/ath/ath10k/htc.c -index ef3329e..c28ff5d 100644 +index edae50b..b24278c 100644 --- a/drivers/net/wireless/ath/ath10k/htc.c +++ b/drivers/net/wireless/ath/ath10k/htc.c -@@ -963,7 +963,10 @@ void ath10k_htc_stop(struct ath10k_htc *htc) +@@ -842,7 +842,10 @@ void ath10k_htc_stop(struct ath10k_htc *htc) /* registered target arrival callback from the HIF layer */ int ath10k_htc_init(struct ath10k *ar) { @@ -44176,7 +45895,7 @@ index ef3329e..c28ff5d 100644 struct ath10k_htc_ep *ep = NULL; struct ath10k_htc *htc = &ar->htc; -@@ -973,8 +976,6 @@ int ath10k_htc_init(struct ath10k *ar) +@@ -852,8 +855,6 @@ int ath10k_htc_init(struct ath10k *ar) ath10k_htc_reset_endpoint_states(htc); /* setup HIF layer callbacks */ @@ -44186,10 +45905,10 @@ index ef3329e..c28ff5d 100644 /* Get HIF default pipe for HTC message exchange */ diff --git a/drivers/net/wireless/ath/ath10k/htc.h b/drivers/net/wireless/ath/ath10k/htc.h -index e1dd8c7..9f91b3f 100644 +index 4716d33..a688310 100644 --- a/drivers/net/wireless/ath/ath10k/htc.h +++ b/drivers/net/wireless/ath/ath10k/htc.h -@@ -271,12 +271,12 @@ enum ath10k_htc_ep_id { +@@ -271,13 +271,13 @@ enum ath10k_htc_ep_id { struct ath10k_htc_ops { void (*target_send_suspend_complete)(struct ath10k *ar); @@ -44199,16 +45918,17 @@ index e1dd8c7..9f91b3f 100644 struct ath10k_htc_ep_ops { void (*ep_tx_complete)(struct ath10k *, struct sk_buff *); void (*ep_rx_complete)(struct ath10k *, struct sk_buff *); + void (*ep_tx_credits)(struct ath10k *); -}; +} __no_const; /* service connection information */ struct ath10k_htc_svc_conn_req { diff --git a/drivers/net/wireless/ath/ath9k/ar9002_mac.c b/drivers/net/wireless/ath/ath9k/ar9002_mac.c -index 8d78253..bebbb68 100644 +index a366d6b..b6f28f8 100644 --- a/drivers/net/wireless/ath/ath9k/ar9002_mac.c +++ b/drivers/net/wireless/ath/ath9k/ar9002_mac.c -@@ -184,8 +184,8 @@ ar9002_set_txdesc(struct ath_hw *ah, void *ds, struct ath_tx_info *i) +@@ -218,8 +218,8 @@ ar9002_set_txdesc(struct ath_hw *ah, void *ds, struct ath_tx_info *i) ads->ds_txstatus6 = ads->ds_txstatus7 = 0; ads->ds_txstatus8 = ads->ds_txstatus9 = 0; @@ -44219,7 +45939,7 @@ index 8d78253..bebbb68 100644 ctl1 = i->buf_len[0] | (i->is_last ? 0 : AR_TxMore); ctl6 = SM(i->keytype, AR_EncrType); -@@ -199,26 +199,26 @@ ar9002_set_txdesc(struct ath_hw *ah, void *ds, struct ath_tx_info *i) +@@ -233,26 +233,26 @@ ar9002_set_txdesc(struct ath_hw *ah, void *ds, struct ath_tx_info *i) if ((i->is_first || i->is_last) && i->aggr != AGGR_BUF_MIDDLE && i->aggr != AGGR_BUF_LAST) { @@ -44253,7 +45973,7 @@ index 8d78253..bebbb68 100644 return; } -@@ -243,7 +243,7 @@ ar9002_set_txdesc(struct ath_hw *ah, void *ds, struct ath_tx_info *i) +@@ -277,7 +277,7 @@ ar9002_set_txdesc(struct ath_hw *ah, void *ds, struct ath_tx_info *i) break; } @@ -44262,7 +45982,7 @@ index 8d78253..bebbb68 100644 | (i->flags & ATH9K_TXDESC_VMF ? AR_VirtMoreFrag : 0) | SM(i->txpower, AR_XmitPower) | (i->flags & ATH9K_TXDESC_VEOL ? AR_VEOL : 0) -@@ -253,19 +253,19 @@ ar9002_set_txdesc(struct ath_hw *ah, void *ds, struct ath_tx_info *i) +@@ -287,19 +287,19 @@ ar9002_set_txdesc(struct ath_hw *ah, void *ds, struct ath_tx_info *i) | (i->flags & ATH9K_TXDESC_RTSENA ? AR_RTSEnable : (i->flags & ATH9K_TXDESC_CTSENA ? AR_CTSEnable : 0)); @@ -44410,10 +46130,10 @@ index f6c5c1b..6058354 100644 static u16 ar9003_calc_ptr_chksum(struct ar9003_txc *ads) diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h -index 69a907b..91e071c 100644 +index a2c9a5d..b52273e 100644 --- a/drivers/net/wireless/ath/ath9k/hw.h +++ b/drivers/net/wireless/ath/ath9k/hw.h -@@ -657,7 +657,7 @@ struct ath_hw_private_ops { +@@ -635,7 +635,7 @@ struct ath_hw_private_ops { /* ANI */ void (*ani_cache_ini_regs)(struct ath_hw *ah); @@ -44422,7 +46142,7 @@ index 69a907b..91e071c 100644 /** * struct ath_spec_scan - parameters for Atheros spectral scan -@@ -729,7 +729,7 @@ struct ath_hw_ops { +@@ -711,7 +711,7 @@ struct ath_hw_ops { #ifdef CONFIG_ATH9K_BTCOEX_SUPPORT void (*set_bt_ant_diversity)(struct ath_hw *hw, bool enable); #endif @@ -44445,7 +46165,7 @@ index 92190da..f3a4c4c 100644 u32 freqref, vco_freq, val1, val2, val3, timeout, timeoutref, count; u16 old_comm15, scale; diff --git a/drivers/net/wireless/iwlegacy/3945-mac.c b/drivers/net/wireless/iwlegacy/3945-mac.c -index 9581d07..84f6a76 100644 +index dea3b50..543db99 100644 --- a/drivers/net/wireless/iwlegacy/3945-mac.c +++ b/drivers/net/wireless/iwlegacy/3945-mac.c @@ -3639,7 +3639,9 @@ il3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) @@ -44617,10 +46337,10 @@ index 7aad766..06addb4 100644 data->sku_cap_band_24GHz_enable ? "" : "NOT", "enabled", data->sku_cap_band_52GHz_enable ? "" : "NOT", "enabled", diff --git a/drivers/net/wireless/iwlwifi/pcie/trans.c b/drivers/net/wireless/iwlwifi/pcie/trans.c -index c3f904d..4cadf83 100644 +index f53ef83..5e34bcb 100644 --- a/drivers/net/wireless/iwlwifi/pcie/trans.c +++ b/drivers/net/wireless/iwlwifi/pcie/trans.c -@@ -1252,7 +1252,7 @@ static ssize_t iwl_dbgfs_interrupt_write(struct file *file, +@@ -1390,7 +1390,7 @@ static ssize_t iwl_dbgfs_interrupt_write(struct file *file, struct isr_statistics *isr_stats = &trans_pcie->isr_stats; char buf[8]; @@ -44629,7 +46349,7 @@ index c3f904d..4cadf83 100644 u32 reset_flag; memset(buf, 0, sizeof(buf)); -@@ -1273,7 +1273,7 @@ static ssize_t iwl_dbgfs_csr_write(struct file *file, +@@ -1411,7 +1411,7 @@ static ssize_t iwl_dbgfs_csr_write(struct file *file, { struct iwl_trans *trans = file->private_data; char buf[8]; @@ -44639,10 +46359,10 @@ index c3f904d..4cadf83 100644 memset(buf, 0, sizeof(buf)); diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c -index 2cd3f54..e936f90 100644 +index a1b32ee..94b3c3d 100644 --- a/drivers/net/wireless/mac80211_hwsim.c +++ b/drivers/net/wireless/mac80211_hwsim.c -@@ -2196,25 +2196,19 @@ static int __init init_mac80211_hwsim(void) +@@ -2224,25 +2224,19 @@ static int __init init_mac80211_hwsim(void) if (channels > 1) { hwsim_if_comb.num_different_channels = channels; @@ -44695,10 +46415,10 @@ index 8169a85..7fa3b47 100644 tmp = cpu_to_le32(rts_threshold); diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h -index fe4c572..99dedfa 100644 +index e4ba2ce..63d7417 100644 --- a/drivers/net/wireless/rt2x00/rt2x00.h +++ b/drivers/net/wireless/rt2x00/rt2x00.h -@@ -387,7 +387,7 @@ struct rt2x00_intf { +@@ -377,7 +377,7 @@ struct rt2x00_intf { * for hardware which doesn't support hardware * sequence counting. */ @@ -44708,7 +46428,7 @@ index fe4c572..99dedfa 100644 static inline struct rt2x00_intf* vif_to_intf(struct ieee80211_vif *vif) diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c -index 66a2db8..70cad04 100644 +index a5d38e8..d3c24ea 100644 --- a/drivers/net/wireless/rt2x00/rt2x00queue.c +++ b/drivers/net/wireless/rt2x00/rt2x00queue.c @@ -252,9 +252,9 @@ static void rt2x00queue_create_tx_descriptor_seq(struct rt2x00_dev *rt2x00dev, @@ -44750,7 +46470,7 @@ index e2b3d9c..67a5184 100644 wl1251_info("using SDIO interrupt"); } diff --git a/drivers/net/wireless/ti/wl12xx/main.c b/drivers/net/wireless/ti/wl12xx/main.c -index 1c627da..69f7d17 100644 +index be7129b..4161356 100644 --- a/drivers/net/wireless/ti/wl12xx/main.c +++ b/drivers/net/wireless/ti/wl12xx/main.c @@ -656,7 +656,9 @@ static int wl12xx_identify_chip(struct wl1271 *wl) @@ -44776,10 +46496,10 @@ index 1c627da..69f7d17 100644 wlcore_set_min_fw_ver(wl, WL127X_CHIP_VER, WL127X_IFTYPE_SR_VER, WL127X_MAJOR_SR_VER, diff --git a/drivers/net/wireless/ti/wl18xx/main.c b/drivers/net/wireless/ti/wl18xx/main.c -index 7aa0eb8..5a9ef38 100644 +index ec37b16..7e34d66 100644 --- a/drivers/net/wireless/ti/wl18xx/main.c +++ b/drivers/net/wireless/ti/wl18xx/main.c -@@ -1730,8 +1730,10 @@ static int wl18xx_setup(struct wl1271 *wl) +@@ -1823,8 +1823,10 @@ static int wl18xx_setup(struct wl1271 *wl) } if (!checksum_param) { @@ -44793,7 +46513,7 @@ index 7aa0eb8..5a9ef38 100644 /* Enable 11a Band only if we have 5G antennas */ diff --git a/drivers/net/wireless/zd1211rw/zd_usb.c b/drivers/net/wireless/zd1211rw/zd_usb.c -index 7ef0b4a..ff65c28 100644 +index 84d94f5..bd6c61c 100644 --- a/drivers/net/wireless/zd1211rw/zd_usb.c +++ b/drivers/net/wireless/zd1211rw/zd_usb.c @@ -386,7 +386,7 @@ static inline void handle_regs_int(struct urb *urb) @@ -44806,10 +46526,10 @@ index 7ef0b4a..ff65c28 100644 ZD_ASSERT(in_interrupt()); diff --git a/drivers/nfc/nfcwilink.c b/drivers/nfc/nfcwilink.c -index 59f95d8..53e0e7f 100644 +index 7130864..00e64de 100644 --- a/drivers/nfc/nfcwilink.c +++ b/drivers/nfc/nfcwilink.c -@@ -513,7 +513,7 @@ static struct nci_ops nfcwilink_ops = { +@@ -498,7 +498,7 @@ static struct nci_ops nfcwilink_ops = { static int nfcwilink_probe(struct platform_device *pdev) { @@ -44998,10 +46718,10 @@ index 92ed045..62d39bd7 100644 #endif /* IEEE1284.3 support. */ diff --git a/drivers/pci/hotplug/acpiphp_ibm.c b/drivers/pci/hotplug/acpiphp_ibm.c -index 2f5786c..61ab4d1 100644 +index ecfac7e..41be7028 100644 --- a/drivers/pci/hotplug/acpiphp_ibm.c +++ b/drivers/pci/hotplug/acpiphp_ibm.c -@@ -463,7 +463,9 @@ static int __init ibm_acpiphp_init(void) +@@ -453,7 +453,9 @@ static int __init ibm_acpiphp_init(void) goto init_cleanup; } @@ -45013,7 +46733,7 @@ index 2f5786c..61ab4d1 100644 return retval; diff --git a/drivers/pci/hotplug/cpcihp_generic.c b/drivers/pci/hotplug/cpcihp_generic.c -index a6a71c4..c91097b 100644 +index 7536eef..52dc8fa 100644 --- a/drivers/pci/hotplug/cpcihp_generic.c +++ b/drivers/pci/hotplug/cpcihp_generic.c @@ -73,7 +73,6 @@ static u16 port; @@ -45044,7 +46764,7 @@ index a6a71c4..c91097b 100644 status = cpci_hp_register_controller(&generic_hpc); diff --git a/drivers/pci/hotplug/cpcihp_zt5550.c b/drivers/pci/hotplug/cpcihp_zt5550.c -index 449b4bb..257e2e8 100644 +index e8c4a7c..7046f5c 100644 --- a/drivers/pci/hotplug/cpcihp_zt5550.c +++ b/drivers/pci/hotplug/cpcihp_zt5550.c @@ -59,7 +59,6 @@ @@ -45107,7 +46827,7 @@ index 76ba8a1..20ca857 100644 /* initialize our int15 lock */ diff --git a/drivers/pci/hotplug/pci_hotplug_core.c b/drivers/pci/hotplug/pci_hotplug_core.c -index ec20f74..c1d961e 100644 +index cfa92a9..29539c5 100644 --- a/drivers/pci/hotplug/pci_hotplug_core.c +++ b/drivers/pci/hotplug/pci_hotplug_core.c @@ -441,8 +441,10 @@ int __pci_hp_register(struct hotplug_slot *slot, struct pci_bus *bus, @@ -45124,7 +46844,7 @@ index ec20f74..c1d961e 100644 mutex_lock(&pci_hp_mutex); /* diff --git a/drivers/pci/hotplug/pciehp_core.c b/drivers/pci/hotplug/pciehp_core.c -index f4a18f5..ff2463c 100644 +index bbd48bb..6907ef4 100644 --- a/drivers/pci/hotplug/pciehp_core.c +++ b/drivers/pci/hotplug/pciehp_core.c @@ -92,7 +92,7 @@ static int init_slot(struct controller *ctrl) @@ -45137,10 +46857,10 @@ index f4a18f5..ff2463c 100644 int retval = -ENOMEM; diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c -index 7128cfd..a0640d6 100644 +index c91e6c1..5c723ef 100644 --- a/drivers/pci/pci-sysfs.c +++ b/drivers/pci/pci-sysfs.c -@@ -1083,7 +1083,7 @@ static int pci_create_attr(struct pci_dev *pdev, int num, int write_combine) +@@ -1117,7 +1117,7 @@ static int pci_create_attr(struct pci_dev *pdev, int num, int write_combine) { /* allocate attribute structure, piggyback attribute name */ int name_len = write_combine ? 13 : 10; @@ -45149,7 +46869,7 @@ index 7128cfd..a0640d6 100644 int retval; res_attr = kzalloc(sizeof(*res_attr) + name_len, GFP_ATOMIC); -@@ -1268,7 +1268,7 @@ static struct device_attribute reset_attr = __ATTR(reset, 0200, NULL, reset_stor +@@ -1302,7 +1302,7 @@ static struct device_attribute reset_attr = __ATTR(reset, 0200, NULL, reset_stor static int pci_create_capabilities_sysfs(struct pci_dev *dev) { int retval; @@ -45158,7 +46878,7 @@ index 7128cfd..a0640d6 100644 /* If the device has VPD, try to expose it in sysfs. */ if (dev->vpd) { -@@ -1315,7 +1315,7 @@ int __must_check pci_create_sysfs_dev_files (struct pci_dev *pdev) +@@ -1349,7 +1349,7 @@ int __must_check pci_create_sysfs_dev_files (struct pci_dev *pdev) { int retval; int rom_size = 0; @@ -45168,7 +46888,7 @@ index 7128cfd..a0640d6 100644 if (!sysfs_initialized) return -EACCES; diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h -index 8a00c06..18a9715 100644 +index 9c91ecc..bda4796 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -95,7 +95,7 @@ struct pci_vpd_ops { @@ -45181,7 +46901,7 @@ index 8a00c06..18a9715 100644 int pci_vpd_pci22_init(struct pci_dev *dev); diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c -index 403a443..034e050 100644 +index f1272dc..e92a1ac 100644 --- a/drivers/pci/pcie/aspm.c +++ b/drivers/pci/pcie/aspm.c @@ -27,9 +27,9 @@ @@ -45198,7 +46918,7 @@ index 403a443..034e050 100644 #define ASPM_STATE_ALL (ASPM_STATE_L0S | ASPM_STATE_L1) diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c -index 7ef0f86..17b710f 100644 +index 38e403d..a2ce55a 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -175,7 +175,7 @@ int __pci_read_base(struct pci_dev *dev, enum pci_bar_type type, @@ -45211,7 +46931,7 @@ index 7ef0f86..17b710f 100644 /* No printks while decoding is disabled! */ if (!dev->mmio_always_on) { diff --git a/drivers/pci/proc.c b/drivers/pci/proc.c -index cdc7836..528635c 100644 +index 46d1378..30e452b 100644 --- a/drivers/pci/proc.c +++ b/drivers/pci/proc.c @@ -434,7 +434,16 @@ static const struct file_operations proc_bus_pci_dev_operations = { @@ -45231,10 +46951,10 @@ index cdc7836..528635c 100644 proc_create("devices", 0, proc_bus_pci_dir, &proc_bus_pci_dev_operations); proc_initialized = 1; -diff --git a/drivers/platform/x86/chromeos_laptop.c b/drivers/platform/x86/chromeos_laptop.c +diff --git a/drivers/platform/chrome/chromeos_laptop.c b/drivers/platform/chrome/chromeos_laptop.c index 3e5b4497..dcdfb70 100644 ---- a/drivers/platform/x86/chromeos_laptop.c -+++ b/drivers/platform/x86/chromeos_laptop.c +--- a/drivers/platform/chrome/chromeos_laptop.c ++++ b/drivers/platform/chrome/chromeos_laptop.c @@ -301,7 +301,7 @@ static int __init setup_tsl2563_als(const struct dmi_system_id *id) return 0; } @@ -45244,6 +46964,43 @@ index 3e5b4497..dcdfb70 100644 { .ident = "Samsung Series 5 550 - Touchpad", .matches = { +diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c +index 19c313b..ed28b38 100644 +--- a/drivers/platform/x86/asus-wmi.c ++++ b/drivers/platform/x86/asus-wmi.c +@@ -1618,6 +1618,10 @@ static int show_dsts(struct seq_file *m, void *data) + int err; + u32 retval = -1; + ++#ifdef CONFIG_GRKERNSEC_KMEM ++ return -EPERM; ++#endif ++ + err = asus_wmi_get_devstate(asus, asus->debug.dev_id, &retval); + + if (err < 0) +@@ -1634,6 +1638,10 @@ static int show_devs(struct seq_file *m, void *data) + int err; + u32 retval = -1; + ++#ifdef CONFIG_GRKERNSEC_KMEM ++ return -EPERM; ++#endif ++ + err = asus_wmi_set_devstate(asus->debug.dev_id, asus->debug.ctrl_param, + &retval); + +@@ -1658,6 +1666,10 @@ static int show_call(struct seq_file *m, void *data) + union acpi_object *obj; + acpi_status status; + ++#ifdef CONFIG_GRKERNSEC_KMEM ++ return -EPERM; ++#endif ++ + status = wmi_evaluate_method(ASUS_WMI_MGMT_GUID, + 1, asus->debug.method_id, + &input, &output); diff --git a/drivers/platform/x86/msi-laptop.c b/drivers/platform/x86/msi-laptop.c index 62f8030..c7f2a45 100644 --- a/drivers/platform/x86/msi-laptop.c @@ -45283,10 +47040,10 @@ index 70222f2..8c8ce66 100644 acpi_status status; diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c -index 3484dd2..13ee730 100644 +index fb233ae..23a325c 100644 --- a/drivers/platform/x86/sony-laptop.c +++ b/drivers/platform/x86/sony-laptop.c -@@ -2448,7 +2448,7 @@ static void sony_nc_gfx_switch_cleanup(struct platform_device *pd) +@@ -2453,7 +2453,7 @@ static void sony_nc_gfx_switch_cleanup(struct platform_device *pd) } /* High speed charging function */ @@ -45296,10 +47053,10 @@ index 3484dd2..13ee730 100644 static ssize_t sony_nc_highspeed_charging_store(struct device *dev, struct device_attribute *attr, diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c -index 4e86e97..04d50d1 100644 +index 58b0274..6704626 100644 --- a/drivers/platform/x86/thinkpad_acpi.c +++ b/drivers/platform/x86/thinkpad_acpi.c -@@ -2091,7 +2091,7 @@ static int hotkey_mask_get(void) +@@ -2100,7 +2100,7 @@ static int hotkey_mask_get(void) return 0; } @@ -45308,7 +47065,7 @@ index 4e86e97..04d50d1 100644 { /* log only what the user can fix... */ const u32 wantedmask = hotkey_driver_mask & -@@ -2318,11 +2318,6 @@ static void hotkey_read_nvram(struct tp_nvram_state *n, const u32 m) +@@ -2327,11 +2327,6 @@ static void hotkey_read_nvram(struct tp_nvram_state *n, const u32 m) } } @@ -45320,7 +47077,7 @@ index 4e86e97..04d50d1 100644 #define TPACPI_COMPARE_KEY(__scancode, __member) \ do { \ if ((event_mask & (1 << __scancode)) && \ -@@ -2336,36 +2331,42 @@ static void hotkey_compare_and_issue_event(struct tp_nvram_state *oldn, +@@ -2345,36 +2340,42 @@ static void hotkey_compare_and_issue_event(struct tp_nvram_state *oldn, tpacpi_hotkey_send_key(__scancode); \ } while (0) @@ -45387,7 +47144,7 @@ index 4e86e97..04d50d1 100644 TPACPI_COMPARE_KEY(TP_ACPI_HOTKEYSCAN_THINKPAD, thinkpad_toggle); TPACPI_COMPARE_KEY(TP_ACPI_HOTKEYSCAN_FNSPACE, zoom_toggle); TPACPI_COMPARE_KEY(TP_ACPI_HOTKEYSCAN_FNF7, display_toggle); -@@ -2399,7 +2400,7 @@ static void hotkey_compare_and_issue_event(struct tp_nvram_state *oldn, +@@ -2408,7 +2409,7 @@ static void hotkey_compare_and_issue_event(struct tp_nvram_state *oldn, oldn->volume_level != newn->volume_level) { /* recently muted, or repeated mute keypress, or * multiple presses ending in mute */ @@ -45396,7 +47153,7 @@ index 4e86e97..04d50d1 100644 TPACPI_MAY_SEND_KEY(TP_ACPI_HOTKEYSCAN_MUTE); } } else { -@@ -2409,7 +2410,7 @@ static void hotkey_compare_and_issue_event(struct tp_nvram_state *oldn, +@@ -2418,7 +2419,7 @@ static void hotkey_compare_and_issue_event(struct tp_nvram_state *oldn, TPACPI_MAY_SEND_KEY(TP_ACPI_HOTKEYSCAN_VOLUMEUP); } if (oldn->volume_level != newn->volume_level) { @@ -45405,7 +47162,7 @@ index 4e86e97..04d50d1 100644 } else if (oldn->volume_toggle != newn->volume_toggle) { /* repeated vol up/down keypress at end of scale ? */ if (newn->volume_level == 0) -@@ -2422,7 +2423,8 @@ static void hotkey_compare_and_issue_event(struct tp_nvram_state *oldn, +@@ -2431,7 +2432,8 @@ static void hotkey_compare_and_issue_event(struct tp_nvram_state *oldn, /* handle brightness */ if (oldn->brightness_level != newn->brightness_level) { issue_brightnesschange(oldn->brightness_level, @@ -45415,7 +47172,7 @@ index 4e86e97..04d50d1 100644 } else if (oldn->brightness_toggle != newn->brightness_toggle) { /* repeated key presses that didn't change state */ if (newn->brightness_level == 0) -@@ -2431,10 +2433,10 @@ static void hotkey_compare_and_issue_event(struct tp_nvram_state *oldn, +@@ -2440,10 +2442,10 @@ static void hotkey_compare_and_issue_event(struct tp_nvram_state *oldn, && !tp_features.bright_unkfw) TPACPI_MAY_SEND_KEY(TP_ACPI_HOTKEYSCAN_FNHOME); } @@ -45554,7 +47311,7 @@ index cc439fd..8fa30df 100644 #endif /* CONFIG_SYSFS */ diff --git a/drivers/power/power_supply_core.c b/drivers/power/power_supply_core.c -index 00e6672..2642c08 100644 +index 557af94..84dc1fe 100644 --- a/drivers/power/power_supply_core.c +++ b/drivers/power/power_supply_core.c @@ -24,7 +24,10 @@ @@ -45602,11 +47359,200 @@ index 44420d1..967126e 100644 for (i = 0; i < ARRAY_SIZE(power_supply_attrs); i++) __power_supply_attrs[i] = &power_supply_attrs[i].attr; } +diff --git a/drivers/powercap/powercap_sys.c b/drivers/powercap/powercap_sys.c +index 84419af..268ede8 100644 +--- a/drivers/powercap/powercap_sys.c ++++ b/drivers/powercap/powercap_sys.c +@@ -154,8 +154,77 @@ struct powercap_constraint_attr { + struct device_attribute name_attr; + }; + ++static ssize_t show_constraint_name(struct device *dev, ++ struct device_attribute *dev_attr, ++ char *buf); ++ + static struct powercap_constraint_attr +- constraint_attrs[MAX_CONSTRAINTS_PER_ZONE]; ++ constraint_attrs[MAX_CONSTRAINTS_PER_ZONE] = { ++ [0 ... MAX_CONSTRAINTS_PER_ZONE - 1] = { ++ .power_limit_attr = { ++ .attr = { ++ .name = NULL, ++ .mode = S_IWUSR | S_IRUGO ++ }, ++ .show = show_constraint_power_limit_uw, ++ .store = store_constraint_power_limit_uw ++ }, ++ ++ .time_window_attr = { ++ .attr = { ++ .name = NULL, ++ .mode = S_IWUSR | S_IRUGO ++ }, ++ .show = show_constraint_time_window_us, ++ .store = store_constraint_time_window_us ++ }, ++ ++ .max_power_attr = { ++ .attr = { ++ .name = NULL, ++ .mode = S_IRUGO ++ }, ++ .show = show_constraint_max_power_uw, ++ .store = NULL ++ }, ++ ++ .min_power_attr = { ++ .attr = { ++ .name = NULL, ++ .mode = S_IRUGO ++ }, ++ .show = show_constraint_min_power_uw, ++ .store = NULL ++ }, ++ ++ .max_time_window_attr = { ++ .attr = { ++ .name = NULL, ++ .mode = S_IRUGO ++ }, ++ .show = show_constraint_max_time_window_us, ++ .store = NULL ++ }, ++ ++ .min_time_window_attr = { ++ .attr = { ++ .name = NULL, ++ .mode = S_IRUGO ++ }, ++ .show = show_constraint_min_time_window_us, ++ .store = NULL ++ }, ++ ++ .name_attr = { ++ .attr = { ++ .name = NULL, ++ .mode = S_IRUGO ++ }, ++ .show = show_constraint_name, ++ .store = NULL ++ } ++ } ++}; + + /* A list of powercap control_types */ + static LIST_HEAD(powercap_cntrl_list); +@@ -193,23 +262,16 @@ static ssize_t show_constraint_name(struct device *dev, + } + + static int create_constraint_attribute(int id, const char *name, +- int mode, +- struct device_attribute *dev_attr, +- ssize_t (*show)(struct device *, +- struct device_attribute *, char *), +- ssize_t (*store)(struct device *, +- struct device_attribute *, +- const char *, size_t) +- ) ++ struct device_attribute *dev_attr) + { ++ name = kasprintf(GFP_KERNEL, "constraint_%d_%s", id, name); + +- dev_attr->attr.name = kasprintf(GFP_KERNEL, "constraint_%d_%s", +- id, name); +- if (!dev_attr->attr.name) ++ if (!name) + return -ENOMEM; +- dev_attr->attr.mode = mode; +- dev_attr->show = show; +- dev_attr->store = store; ++ ++ pax_open_kernel(); ++ *(const char **)&dev_attr->attr.name = name; ++ pax_close_kernel(); + + return 0; + } +@@ -236,49 +298,31 @@ static int seed_constraint_attributes(void) + + for (i = 0; i < MAX_CONSTRAINTS_PER_ZONE; ++i) { + ret = create_constraint_attribute(i, "power_limit_uw", +- S_IWUSR | S_IRUGO, +- &constraint_attrs[i].power_limit_attr, +- show_constraint_power_limit_uw, +- store_constraint_power_limit_uw); ++ &constraint_attrs[i].power_limit_attr); + if (ret) + goto err_alloc; + ret = create_constraint_attribute(i, "time_window_us", +- S_IWUSR | S_IRUGO, +- &constraint_attrs[i].time_window_attr, +- show_constraint_time_window_us, +- store_constraint_time_window_us); ++ &constraint_attrs[i].time_window_attr); + if (ret) + goto err_alloc; +- ret = create_constraint_attribute(i, "name", S_IRUGO, +- &constraint_attrs[i].name_attr, +- show_constraint_name, +- NULL); ++ ret = create_constraint_attribute(i, "name", ++ &constraint_attrs[i].name_attr); + if (ret) + goto err_alloc; +- ret = create_constraint_attribute(i, "max_power_uw", S_IRUGO, +- &constraint_attrs[i].max_power_attr, +- show_constraint_max_power_uw, +- NULL); ++ ret = create_constraint_attribute(i, "max_power_uw", ++ &constraint_attrs[i].max_power_attr); + if (ret) + goto err_alloc; +- ret = create_constraint_attribute(i, "min_power_uw", S_IRUGO, +- &constraint_attrs[i].min_power_attr, +- show_constraint_min_power_uw, +- NULL); ++ ret = create_constraint_attribute(i, "min_power_uw", ++ &constraint_attrs[i].min_power_attr); + if (ret) + goto err_alloc; + ret = create_constraint_attribute(i, "max_time_window_us", +- S_IRUGO, +- &constraint_attrs[i].max_time_window_attr, +- show_constraint_max_time_window_us, +- NULL); ++ &constraint_attrs[i].max_time_window_attr); + if (ret) + goto err_alloc; + ret = create_constraint_attribute(i, "min_time_window_us", +- S_IRUGO, +- &constraint_attrs[i].min_time_window_attr, +- show_constraint_min_time_window_us, +- NULL); ++ &constraint_attrs[i].min_time_window_attr); + if (ret) + goto err_alloc; + +@@ -378,10 +422,12 @@ static void create_power_zone_common_attributes( + power_zone->zone_dev_attrs[count++] = + &dev_attr_max_energy_range_uj.attr; + if (power_zone->ops->get_energy_uj) { ++ pax_open_kernel(); + if (power_zone->ops->reset_energy_uj) +- dev_attr_energy_uj.attr.mode = S_IWUSR | S_IRUGO; ++ *(umode_t *)&dev_attr_energy_uj.attr.mode = S_IWUSR | S_IRUGO; + else +- dev_attr_energy_uj.attr.mode = S_IRUGO; ++ *(umode_t *)&dev_attr_energy_uj.attr.mode = S_IRUGO; ++ pax_close_kernel(); + power_zone->zone_dev_attrs[count++] = + &dev_attr_energy_uj.attr; + } diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c -index a01b8b3..37c2afe 100644 +index d85f313..ae857d0 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c -@@ -3307,7 +3307,7 @@ regulator_register(const struct regulator_desc *regulator_desc, +@@ -3362,7 +3362,7 @@ regulator_register(const struct regulator_desc *regulator_desc, { const struct regulation_constraints *constraints = NULL; const struct regulator_init_data *init_data; @@ -45615,7 +47561,7 @@ index a01b8b3..37c2afe 100644 struct regulator_dev *rdev; struct device *dev; int ret, i; -@@ -3377,7 +3377,7 @@ regulator_register(const struct regulator_desc *regulator_desc, +@@ -3432,7 +3432,7 @@ regulator_register(const struct regulator_desc *regulator_desc, rdev->dev.of_node = config->of_node; rdev->dev.parent = dev; dev_set_name(&rdev->dev, "regulator.%d", @@ -45625,7 +47571,7 @@ index a01b8b3..37c2afe 100644 if (ret != 0) { put_device(&rdev->dev); diff --git a/drivers/regulator/max8660.c b/drivers/regulator/max8660.c -index 144bcac..d20e7db 100644 +index 8d94d3d..653b623 100644 --- a/drivers/regulator/max8660.c +++ b/drivers/regulator/max8660.c @@ -420,8 +420,10 @@ static int max8660_probe(struct i2c_client *client, @@ -45642,7 +47588,7 @@ index 144bcac..d20e7db 100644 /* diff --git a/drivers/regulator/max8973-regulator.c b/drivers/regulator/max8973-regulator.c -index 5b77ab7..a62f061 100644 +index 892aa1e..ebd1b9c 100644 --- a/drivers/regulator/max8973-regulator.c +++ b/drivers/regulator/max8973-regulator.c @@ -406,9 +406,11 @@ static int max8973_probe(struct i2c_client *client, @@ -45661,7 +47607,7 @@ index 5b77ab7..a62f061 100644 if (pdata) { diff --git a/drivers/regulator/mc13892-regulator.c b/drivers/regulator/mc13892-regulator.c -index 1037e07..e64dea1 100644 +index 96c9f80..90974ca 100644 --- a/drivers/regulator/mc13892-regulator.c +++ b/drivers/regulator/mc13892-regulator.c @@ -582,10 +582,12 @@ static int mc13892_regulator_probe(struct platform_device *pdev) @@ -45680,7 +47626,7 @@ index 1037e07..e64dea1 100644 mc13xxx_data = mc13xxx_parse_regulators_dt(pdev, mc13892_regulators, ARRAY_SIZE(mc13892_regulators)); diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c -index 24e733c..bfbaa3e 100644 +index f148762..5a6d1e5 100644 --- a/drivers/rtc/rtc-cmos.c +++ b/drivers/rtc/rtc-cmos.c @@ -731,7 +731,9 @@ cmos_do_probe(struct device *dev, struct resource *ports, int rtc_irq) @@ -45716,7 +47662,7 @@ index d049393..bb20be0 100644 case RTC_PIE_ON: diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c -index ca18fd1..055e42d 100644 +index 4e75345..09f8663 100644 --- a/drivers/rtc/rtc-ds1307.c +++ b/drivers/rtc/rtc-ds1307.c @@ -107,7 +107,7 @@ struct ds1307 { @@ -45729,7 +47675,7 @@ index ca18fd1..055e42d 100644 unsigned long flags; #define HAS_NVRAM 0 /* bit 0 == sysfs file active */ diff --git a/drivers/rtc/rtc-m48t59.c b/drivers/rtc/rtc-m48t59.c -index fcb0329..d77b7f2 100644 +index 11880c1..b823aa4 100644 --- a/drivers/rtc/rtc-m48t59.c +++ b/drivers/rtc/rtc-m48t59.c @@ -483,7 +483,9 @@ static int m48t59_rtc_probe(struct platform_device *pdev) @@ -45797,6 +47743,76 @@ index e693af6..2e525b6 100644 void bfa_itn_create(struct bfa_s *bfa, struct bfa_rport_s *rport, void (*isr)(struct bfa_s *bfa, struct bfi_msg_s *m)); +diff --git a/drivers/scsi/bfa/bfa_fcs.c b/drivers/scsi/bfa/bfa_fcs.c +index a3ab5cc..8143622 100644 +--- a/drivers/scsi/bfa/bfa_fcs.c ++++ b/drivers/scsi/bfa/bfa_fcs.c +@@ -38,10 +38,21 @@ struct bfa_fcs_mod_s { + #define BFA_FCS_MODULE(_mod) { _mod ## _modinit, _mod ## _modexit } + + static struct bfa_fcs_mod_s fcs_modules[] = { +- { bfa_fcs_port_attach, NULL, NULL }, +- { bfa_fcs_uf_attach, NULL, NULL }, +- { bfa_fcs_fabric_attach, bfa_fcs_fabric_modinit, +- bfa_fcs_fabric_modexit }, ++ { ++ .attach = bfa_fcs_port_attach, ++ .modinit = NULL, ++ .modexit = NULL ++ }, ++ { ++ .attach = bfa_fcs_uf_attach, ++ .modinit = NULL, ++ .modexit = NULL ++ }, ++ { ++ .attach = bfa_fcs_fabric_attach, ++ .modinit = bfa_fcs_fabric_modinit, ++ .modexit = bfa_fcs_fabric_modexit ++ }, + }; + + /* +diff --git a/drivers/scsi/bfa/bfa_fcs_lport.c b/drivers/scsi/bfa/bfa_fcs_lport.c +index f5e4e61..a0acaf6 100644 +--- a/drivers/scsi/bfa/bfa_fcs_lport.c ++++ b/drivers/scsi/bfa/bfa_fcs_lport.c +@@ -89,15 +89,26 @@ static struct { + void (*offline) (struct bfa_fcs_lport_s *port); + } __port_action[] = { + { +- bfa_fcs_lport_unknown_init, bfa_fcs_lport_unknown_online, +- bfa_fcs_lport_unknown_offline}, { +- bfa_fcs_lport_fab_init, bfa_fcs_lport_fab_online, +- bfa_fcs_lport_fab_offline}, { +- bfa_fcs_lport_n2n_init, bfa_fcs_lport_n2n_online, +- bfa_fcs_lport_n2n_offline}, { +- bfa_fcs_lport_loop_init, bfa_fcs_lport_loop_online, +- bfa_fcs_lport_loop_offline}, +- }; ++ .init = bfa_fcs_lport_unknown_init, ++ .online = bfa_fcs_lport_unknown_online, ++ .offline = bfa_fcs_lport_unknown_offline ++ }, ++ { ++ .init = bfa_fcs_lport_fab_init, ++ .online = bfa_fcs_lport_fab_online, ++ .offline = bfa_fcs_lport_fab_offline ++ }, ++ { ++ .init = bfa_fcs_lport_n2n_init, ++ .online = bfa_fcs_lport_n2n_online, ++ .offline = bfa_fcs_lport_n2n_offline ++ }, ++ { ++ .init = bfa_fcs_lport_loop_init, ++ .online = bfa_fcs_lport_loop_online, ++ .offline = bfa_fcs_lport_loop_offline ++ }, ++}; + + /* + * fcs_port_sm FCS logical port state machine diff --git a/drivers/scsi/bfa/bfa_ioc.h b/drivers/scsi/bfa/bfa_ioc.h index 90814fe..4384138 100644 --- a/drivers/scsi/bfa/bfa_ioc.h @@ -45819,8 +47835,31 @@ index 90814fe..4384138 100644 /* * Queue element to wait for room in request queue. FIFO order is +diff --git a/drivers/scsi/bfa/bfa_modules.h b/drivers/scsi/bfa/bfa_modules.h +index a14c784..6de6790 100644 +--- a/drivers/scsi/bfa/bfa_modules.h ++++ b/drivers/scsi/bfa/bfa_modules.h +@@ -78,12 +78,12 @@ enum { + \ + extern struct bfa_module_s hal_mod_ ## __mod; \ + struct bfa_module_s hal_mod_ ## __mod = { \ +- bfa_ ## __mod ## _meminfo, \ +- bfa_ ## __mod ## _attach, \ +- bfa_ ## __mod ## _detach, \ +- bfa_ ## __mod ## _start, \ +- bfa_ ## __mod ## _stop, \ +- bfa_ ## __mod ## _iocdisable, \ ++ .meminfo = bfa_ ## __mod ## _meminfo, \ ++ .attach = bfa_ ## __mod ## _attach, \ ++ .detach = bfa_ ## __mod ## _detach, \ ++ .start = bfa_ ## __mod ## _start, \ ++ .stop = bfa_ ## __mod ## _stop, \ ++ .iocdisable = bfa_ ## __mod ## _iocdisable, \ + } + + #define BFA_CACHELINE_SZ (256) diff --git a/drivers/scsi/fcoe/fcoe_sysfs.c b/drivers/scsi/fcoe/fcoe_sysfs.c -index c9382d6..6619864 100644 +index 045c4e1..13de803 100644 --- a/drivers/scsi/fcoe/fcoe_sysfs.c +++ b/drivers/scsi/fcoe/fcoe_sysfs.c @@ -33,8 +33,8 @@ @@ -45834,7 +47873,7 @@ index c9382d6..6619864 100644 /* * fcoe_fcf_dev_loss_tmo: the default number of seconds that fcoe sysfs -@@ -681,7 +681,7 @@ struct fcoe_ctlr_device *fcoe_ctlr_device_add(struct device *parent, +@@ -685,7 +685,7 @@ struct fcoe_ctlr_device *fcoe_ctlr_device_add(struct device *parent, if (!ctlr) goto out; @@ -45843,7 +47882,7 @@ index c9382d6..6619864 100644 ctlr->f = f; ctlr->mode = FIP_CONN_TYPE_FABRIC; INIT_LIST_HEAD(&ctlr->fcfs); -@@ -898,7 +898,7 @@ struct fcoe_fcf_device *fcoe_fcf_device_add(struct fcoe_ctlr_device *ctlr, +@@ -902,7 +902,7 @@ struct fcoe_fcf_device *fcoe_fcf_device_add(struct fcoe_ctlr_device *ctlr, fcf->dev.parent = &ctlr->dev; fcf->dev.bus = &fcoe_bus_type; fcf->dev.type = &fcoe_fcf_device_type; @@ -45852,7 +47891,7 @@ index c9382d6..6619864 100644 fcf->state = FCOE_FCF_STATE_UNKNOWN; fcf->dev_loss_tmo = ctlr->fcf_dev_loss_tmo; -@@ -934,8 +934,8 @@ int __init fcoe_sysfs_setup(void) +@@ -938,8 +938,8 @@ int __init fcoe_sysfs_setup(void) { int error; @@ -45864,7 +47903,7 @@ index c9382d6..6619864 100644 error = bus_register(&fcoe_bus_type); if (error) diff --git a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c -index df0c3c7..b00e1d0 100644 +index f2c5005..db36c02 100644 --- a/drivers/scsi/hosts.c +++ b/drivers/scsi/hosts.c @@ -42,7 +42,7 @@ @@ -45876,7 +47915,7 @@ index df0c3c7..b00e1d0 100644 static void scsi_host_cls_release(struct device *dev) -@@ -361,7 +361,7 @@ struct Scsi_Host *scsi_host_alloc(struct scsi_host_template *sht, int privsize) +@@ -367,7 +367,7 @@ struct Scsi_Host *scsi_host_alloc(struct scsi_host_template *sht, int privsize) * subtract one because we increment first then return, but we need to * know what the next host number was before increment */ @@ -45886,7 +47925,7 @@ index df0c3c7..b00e1d0 100644 /* These three are default values which can be overridden */ diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c -index 891c86b..dd1224a0 100644 +index 20a5e6e..8b23cea 100644 --- a/drivers/scsi/hpsa.c +++ b/drivers/scsi/hpsa.c @@ -578,7 +578,7 @@ static inline u32 next_command(struct ctlr_info *h, u8 q) @@ -46003,7 +48042,7 @@ index 891c86b..dd1224a0 100644 hpsa_free_irqs_and_disable_msix(h); } -@@ -5144,7 +5144,7 @@ static void hpsa_enter_performant_mode(struct ctlr_info *h, u32 use_short_tags) +@@ -5143,7 +5143,7 @@ static void hpsa_enter_performant_mode(struct ctlr_info *h, u32 use_short_tags) return; } /* Change the access methods to the performant access methods */ @@ -46013,7 +48052,7 @@ index 891c86b..dd1224a0 100644 } diff --git a/drivers/scsi/hpsa.h b/drivers/scsi/hpsa.h -index bc85e72..ae04a39 100644 +index bc85e72..d463049 100644 --- a/drivers/scsi/hpsa.h +++ b/drivers/scsi/hpsa.h @@ -79,7 +79,7 @@ struct ctlr_info { @@ -46025,11 +48064,41 @@ index bc85e72..ae04a39 100644 /* queue and queue Info */ struct list_head reqQ; +@@ -381,19 +381,19 @@ static bool SA5_performant_intr_pending(struct ctlr_info *h) + } + + static struct access_method SA5_access = { +- SA5_submit_command, +- SA5_intr_mask, +- SA5_fifo_full, +- SA5_intr_pending, +- SA5_completed, ++ .submit_command = SA5_submit_command, ++ .set_intr_mask = SA5_intr_mask, ++ .fifo_full = SA5_fifo_full, ++ .intr_pending = SA5_intr_pending, ++ .command_completed = SA5_completed, + }; + + static struct access_method SA5_performant_access = { +- SA5_submit_command, +- SA5_performant_intr_mask, +- SA5_fifo_full, +- SA5_performant_intr_pending, +- SA5_performant_completed, ++ .submit_command = SA5_submit_command, ++ .set_intr_mask = SA5_performant_intr_mask, ++ .fifo_full = SA5_fifo_full, ++ .intr_pending = SA5_performant_intr_pending, ++ .command_completed = SA5_performant_completed, + }; + + struct board_type { diff --git a/drivers/scsi/libfc/fc_exch.c b/drivers/scsi/libfc/fc_exch.c -index 5879929..32b241d 100644 +index 1b3a094..068e683 100644 --- a/drivers/scsi/libfc/fc_exch.c +++ b/drivers/scsi/libfc/fc_exch.c -@@ -100,12 +100,12 @@ struct fc_exch_mgr { +@@ -101,12 +101,12 @@ struct fc_exch_mgr { u16 pool_max_index; struct { @@ -46048,7 +48117,7 @@ index 5879929..32b241d 100644 } stats; }; -@@ -736,7 +736,7 @@ static struct fc_exch *fc_exch_em_alloc(struct fc_lport *lport, +@@ -811,7 +811,7 @@ static struct fc_exch *fc_exch_em_alloc(struct fc_lport *lport, /* allocate memory for exchange */ ep = mempool_alloc(mp->ep_pool, GFP_ATOMIC); if (!ep) { @@ -46057,7 +48126,7 @@ index 5879929..32b241d 100644 goto out; } memset(ep, 0, sizeof(*ep)); -@@ -797,7 +797,7 @@ out: +@@ -874,7 +874,7 @@ out: return ep; err: spin_unlock_bh(&pool->lock); @@ -46066,7 +48135,7 @@ index 5879929..32b241d 100644 mempool_free(ep, mp->ep_pool); return NULL; } -@@ -940,7 +940,7 @@ static enum fc_pf_rjt_reason fc_seq_lookup_recip(struct fc_lport *lport, +@@ -1023,7 +1023,7 @@ static enum fc_pf_rjt_reason fc_seq_lookup_recip(struct fc_lport *lport, xid = ntohs(fh->fh_ox_id); /* we originated exch */ ep = fc_exch_find(mp, xid); if (!ep) { @@ -46075,7 +48144,7 @@ index 5879929..32b241d 100644 reject = FC_RJT_OX_ID; goto out; } -@@ -970,7 +970,7 @@ static enum fc_pf_rjt_reason fc_seq_lookup_recip(struct fc_lport *lport, +@@ -1053,7 +1053,7 @@ static enum fc_pf_rjt_reason fc_seq_lookup_recip(struct fc_lport *lport, ep = fc_exch_find(mp, xid); if ((f_ctl & FC_FC_FIRST_SEQ) && fc_sof_is_init(fr_sof(fp))) { if (ep) { @@ -46084,7 +48153,7 @@ index 5879929..32b241d 100644 reject = FC_RJT_RX_ID; goto rel; } -@@ -981,7 +981,7 @@ static enum fc_pf_rjt_reason fc_seq_lookup_recip(struct fc_lport *lport, +@@ -1064,7 +1064,7 @@ static enum fc_pf_rjt_reason fc_seq_lookup_recip(struct fc_lport *lport, } xid = ep->xid; /* get our XID */ } else if (!ep) { @@ -46093,7 +48162,7 @@ index 5879929..32b241d 100644 reject = FC_RJT_RX_ID; /* XID not found */ goto out; } -@@ -998,7 +998,7 @@ static enum fc_pf_rjt_reason fc_seq_lookup_recip(struct fc_lport *lport, +@@ -1082,7 +1082,7 @@ static enum fc_pf_rjt_reason fc_seq_lookup_recip(struct fc_lport *lport, } else { sp = &ep->seq; if (sp->id != fh->fh_seq_id) { @@ -46102,7 +48171,7 @@ index 5879929..32b241d 100644 if (f_ctl & FC_FC_END_SEQ) { /* * Update sequence_id based on incoming last -@@ -1448,22 +1448,22 @@ static void fc_exch_recv_seq_resp(struct fc_exch_mgr *mp, struct fc_frame *fp) +@@ -1533,22 +1533,22 @@ static void fc_exch_recv_seq_resp(struct fc_exch_mgr *mp, struct fc_frame *fp) ep = fc_exch_find(mp, ntohs(fh->fh_ox_id)); if (!ep) { @@ -46129,7 +48198,7 @@ index 5879929..32b241d 100644 goto rel; } sof = fr_sof(fp); -@@ -1472,7 +1472,7 @@ static void fc_exch_recv_seq_resp(struct fc_exch_mgr *mp, struct fc_frame *fp) +@@ -1557,7 +1557,7 @@ static void fc_exch_recv_seq_resp(struct fc_exch_mgr *mp, struct fc_frame *fp) sp->ssb_stat |= SSB_ST_RESP; sp->id = fh->fh_seq_id; } else if (sp->id != fh->fh_seq_id) { @@ -46138,7 +48207,7 @@ index 5879929..32b241d 100644 goto rel; } -@@ -1536,9 +1536,9 @@ static void fc_exch_recv_resp(struct fc_exch_mgr *mp, struct fc_frame *fp) +@@ -1619,9 +1619,9 @@ static void fc_exch_recv_resp(struct fc_exch_mgr *mp, struct fc_frame *fp) sp = fc_seq_lookup_orig(mp, fp); /* doesn't hold sequence */ if (!sp) @@ -46150,7 +48219,7 @@ index 5879929..32b241d 100644 fc_frame_free(fp); } -@@ -2185,13 +2185,13 @@ void fc_exch_update_stats(struct fc_lport *lport) +@@ -2261,13 +2261,13 @@ void fc_exch_update_stats(struct fc_lport *lport) list_for_each_entry(ema, &lport->ema_list, ema_list) { mp = ema->mp; @@ -46171,7 +48240,7 @@ index 5879929..32b241d 100644 } EXPORT_SYMBOL(fc_exch_update_stats); diff --git a/drivers/scsi/libsas/sas_ata.c b/drivers/scsi/libsas/sas_ata.c -index 161c98e..6d563b3 100644 +index d289583..b745eec 100644 --- a/drivers/scsi/libsas/sas_ata.c +++ b/drivers/scsi/libsas/sas_ata.c @@ -554,7 +554,7 @@ static struct ata_port_operations sas_sata_ops = { @@ -46300,10 +48369,10 @@ index 60084e6..0e2e700 100644 snprintf(name, sizeof(name), "discovery_trace"); vport->debug_disc_trc = diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c -index 647f5bf..d0068b9 100644 +index 68c94cc..8c27be5 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c -@@ -10952,8 +10952,10 @@ lpfc_init(void) +@@ -10949,8 +10949,10 @@ lpfc_init(void) "misc_register returned with status %d", error); if (lpfc_enable_npiv) { @@ -46317,7 +48386,7 @@ index 647f5bf..d0068b9 100644 lpfc_transport_template = fc_attach_transport(&lpfc_transport_functions); diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c -index c913e8c..d34a119 100644 +index b2ede05..aaf482ca 100644 --- a/drivers/scsi/lpfc/lpfc_scsi.c +++ b/drivers/scsi/lpfc/lpfc_scsi.c @@ -353,7 +353,7 @@ lpfc_rampdown_queue_depth(struct lpfc_hba *phba) @@ -46412,7 +48481,7 @@ index 7f0af4f..193ac3e 100644 unsigned long flags; diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c -index 1eb7b028..b2a6080 100644 +index be8ce54..94ed33a 100644 --- a/drivers/scsi/pmcraid.c +++ b/drivers/scsi/pmcraid.c @@ -200,8 +200,8 @@ static int pmcraid_slave_alloc(struct scsi_device *scsi_dev) @@ -46426,7 +48495,7 @@ index 1eb7b028..b2a6080 100644 rc = 0; } spin_unlock_irqrestore(&pinstance->resource_lock, lock_flags); -@@ -2676,9 +2676,9 @@ static int pmcraid_error_handler(struct pmcraid_cmd *cmd) +@@ -2687,9 +2687,9 @@ static int pmcraid_error_handler(struct pmcraid_cmd *cmd) /* If this was a SCSI read/write command keep count of errors */ if (SCSI_CMD_TYPE(scsi_cmd->cmnd[0]) == SCSI_READ_CMD) @@ -46438,7 +48507,7 @@ index 1eb7b028..b2a6080 100644 if (!RES_IS_GSCSI(res->cfg_entry) && masked_ioasc != PMCRAID_IOASC_HW_DEVICE_BUS_STATUS_ERROR) { -@@ -3534,7 +3534,7 @@ static int pmcraid_queuecommand_lck( +@@ -3545,7 +3545,7 @@ static int pmcraid_queuecommand_lck( * block of scsi_cmd which is re-used (e.g. cancel/abort), which uses * hrrq_id assigned here in queuecommand */ @@ -46447,7 +48516,7 @@ index 1eb7b028..b2a6080 100644 pinstance->num_hrrq; cmd->cmd_done = pmcraid_io_done; -@@ -3846,7 +3846,7 @@ static long pmcraid_ioctl_passthrough( +@@ -3857,7 +3857,7 @@ static long pmcraid_ioctl_passthrough( * block of scsi_cmd which is re-used (e.g. cancel/abort), which uses * hrrq_id assigned here in queuecommand */ @@ -46456,7 +48525,7 @@ index 1eb7b028..b2a6080 100644 pinstance->num_hrrq; if (request_size) { -@@ -4483,7 +4483,7 @@ static void pmcraid_worker_function(struct work_struct *workp) +@@ -4495,7 +4495,7 @@ static void pmcraid_worker_function(struct work_struct *workp) pinstance = container_of(workp, struct pmcraid_instance, worker_q); /* add resources only after host is added into system */ @@ -46465,7 +48534,7 @@ index 1eb7b028..b2a6080 100644 return; fw_version = be16_to_cpu(pinstance->inq_data->fw_version); -@@ -5310,8 +5310,8 @@ static int pmcraid_init_instance(struct pci_dev *pdev, struct Scsi_Host *host, +@@ -5322,8 +5322,8 @@ static int pmcraid_init_instance(struct pci_dev *pdev, struct Scsi_Host *host, init_waitqueue_head(&pinstance->reset_wait_q); atomic_set(&pinstance->outstanding_cmds, 0); @@ -46476,7 +48545,7 @@ index 1eb7b028..b2a6080 100644 INIT_LIST_HEAD(&pinstance->free_res_q); INIT_LIST_HEAD(&pinstance->used_res_q); -@@ -6024,7 +6024,7 @@ static int pmcraid_probe(struct pci_dev *pdev, +@@ -6036,7 +6036,7 @@ static int pmcraid_probe(struct pci_dev *pdev, /* Schedule worker thread to handle CCN and take care of adding and * removing devices to OS */ @@ -46556,10 +48625,10 @@ index 4446bf5..9a3574d 100644 extern void qla2x00_free_sysfs_attr(scsi_qla_host_t *); extern void qla2x00_init_host_attr(scsi_qla_host_t *); diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c -index 9f01bbb..5e1dcee 100644 +index 52be35e..b933907 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c -@@ -1572,8 +1572,10 @@ qla2x00_config_dma_addressing(struct qla_hw_data *ha) +@@ -1568,8 +1568,10 @@ qla2x00_config_dma_addressing(struct qla_hw_data *ha) !pci_set_consistent_dma_mask(ha->pdev, DMA_BIT_MASK(64))) { /* Ok, a 64bit DMA mask is applicable. */ ha->flags.enable_64bit_addressing = 1; @@ -46573,7 +48642,7 @@ index 9f01bbb..5e1dcee 100644 } } diff --git a/drivers/scsi/qla4xxx/ql4_def.h b/drivers/scsi/qla4xxx/ql4_def.h -index 41327d4..feb03d479 100644 +index 084d1fd..9f939eb 100644 --- a/drivers/scsi/qla4xxx/ql4_def.h +++ b/drivers/scsi/qla4xxx/ql4_def.h @@ -296,7 +296,7 @@ struct ddb_entry { @@ -46586,10 +48655,10 @@ index 41327d4..feb03d479 100644 uint32_t default_time2wait; /* Default Min time between * relogins (+aens) */ diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c -index f8a0a26..ec03cee 100644 +index cf174a4..128a420 100644 --- a/drivers/scsi/qla4xxx/ql4_os.c +++ b/drivers/scsi/qla4xxx/ql4_os.c -@@ -3066,12 +3066,12 @@ static void qla4xxx_check_relogin_flash_ddb(struct iscsi_cls_session *cls_sess) +@@ -3311,12 +3311,12 @@ static void qla4xxx_check_relogin_flash_ddb(struct iscsi_cls_session *cls_sess) */ if (!iscsi_is_session_online(cls_sess)) { /* Reset retry relogin timer */ @@ -46604,7 +48673,7 @@ index f8a0a26..ec03cee 100644 ddb_entry->default_time2wait + 4)); set_bit(DPC_RELOGIN_DEVICE, &ha->dpc_flags); atomic_set(&ddb_entry->retry_relogin_timer, -@@ -5209,7 +5209,7 @@ static void qla4xxx_setup_flash_ddb_entry(struct scsi_qla_host *ha, +@@ -5458,7 +5458,7 @@ static void qla4xxx_setup_flash_ddb_entry(struct scsi_qla_host *ha, atomic_set(&ddb_entry->retry_relogin_timer, INVALID_ENTRY); atomic_set(&ddb_entry->relogin_timer, 0); @@ -46614,11 +48683,11 @@ index f8a0a26..ec03cee 100644 ddb_entry->default_relogin_timeout = (def_timeout > LOGIN_TOV) && (def_timeout < LOGIN_TOV * 10) ? diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c -index eaa808e..95f8841 100644 +index fe0bcb1..c9255be 100644 --- a/drivers/scsi/scsi.c +++ b/drivers/scsi/scsi.c -@@ -661,7 +661,7 @@ int scsi_dispatch_cmd(struct scsi_cmnd *cmd) - unsigned long timeout; +@@ -655,7 +655,7 @@ int scsi_dispatch_cmd(struct scsi_cmnd *cmd) + struct Scsi_Host *host = cmd->device->host; int rtn = 0; - atomic_inc(&cmd->device->iorequest_cnt); @@ -46627,7 +48696,7 @@ index eaa808e..95f8841 100644 /* check if the device is still usable */ if (unlikely(cmd->device->sdev_state == SDEV_DEL)) { diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c -index d1549b7..2f60767 100644 +index 7bd7f0d..44147bf 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -1474,7 +1474,7 @@ static void scsi_kill_request(struct request *req, struct request_queue *q) @@ -46652,10 +48721,10 @@ index d1549b7..2f60767 100644 disposition = scsi_decide_disposition(cmd); if (disposition != SUCCESS && diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c -index 40c6394..62356c2 100644 +index 8ff62c2..693b6f7 100644 --- a/drivers/scsi/scsi_sysfs.c +++ b/drivers/scsi/scsi_sysfs.c -@@ -687,7 +687,7 @@ show_iostat_##field(struct device *dev, struct device_attribute *attr, \ +@@ -725,7 +725,7 @@ show_iostat_##field(struct device *dev, struct device_attribute *attr, \ char *buf) \ { \ struct scsi_device *sdev = to_scsi_device(dev); \ @@ -46718,7 +48787,7 @@ index 4628fd5..a94a1c2 100644 /* * Check for overflow; dev_loss_tmo is u32 diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c -index e4a989f..293090c 100644 +index 63a6ca4..5d5cadd 100644 --- a/drivers/scsi/scsi_transport_iscsi.c +++ b/drivers/scsi/scsi_transport_iscsi.c @@ -79,7 +79,7 @@ struct iscsi_internal { @@ -46739,7 +48808,7 @@ index e4a989f..293090c 100644 if (target_id == ISCSI_MAX_TARGET) { id = ida_simple_get(&iscsi_sess_ida, 0, 0, GFP_KERNEL); -@@ -4077,7 +4077,7 @@ static __init int iscsi_transport_init(void) +@@ -4103,7 +4103,7 @@ static __init int iscsi_transport_init(void) printk(KERN_INFO "Loading iSCSI transport class v%s.\n", ISCSI_TRANSPORT_VERSION); @@ -46749,10 +48818,10 @@ index e4a989f..293090c 100644 err = class_register(&iscsi_transport_class); if (err) diff --git a/drivers/scsi/scsi_transport_srp.c b/drivers/scsi/scsi_transport_srp.c -index f379c7f..e8fc69c 100644 +index 2700a5a..752ec38 100644 --- a/drivers/scsi/scsi_transport_srp.c +++ b/drivers/scsi/scsi_transport_srp.c -@@ -33,7 +33,7 @@ +@@ -36,7 +36,7 @@ #include "scsi_transport_srp_internal.h" struct srp_host_attrs { @@ -46761,7 +48830,7 @@ index f379c7f..e8fc69c 100644 }; #define to_srp_host_attrs(host) ((struct srp_host_attrs *)(host)->shost_data) -@@ -61,7 +61,7 @@ static int srp_host_setup(struct transport_container *tc, struct device *dev, +@@ -94,7 +94,7 @@ static int srp_host_setup(struct transport_container *tc, struct device *dev, struct Scsi_Host *shost = dev_to_shost(dev); struct srp_host_attrs *srp_host = to_srp_host_attrs(shost); @@ -46770,9 +48839,9 @@ index f379c7f..e8fc69c 100644 return 0; } -@@ -210,7 +210,7 @@ struct srp_rport *srp_rport_add(struct Scsi_Host *shost, - memcpy(rport->port_id, ids->port_id, sizeof(rport->port_id)); - rport->roles = ids->roles; +@@ -730,7 +730,7 @@ struct srp_rport *srp_rport_add(struct Scsi_Host *shost, + rport_fast_io_fail_timedout); + INIT_DELAYED_WORK(&rport->dev_loss_work, rport_dev_loss_timedout); - id = atomic_inc_return(&to_srp_host_attrs(shost)->next_port_id); + id = atomic_inc_return_unchecked(&to_srp_host_attrs(shost)->next_port_id); @@ -46780,10 +48849,10 @@ index f379c7f..e8fc69c 100644 transport_setup_device(&rport->dev); diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c -index 5693f6d7..b0bf05a 100644 +index 69725f7..03aaee1 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c -@@ -2934,7 +2934,7 @@ static int sd_probe(struct device *dev) +@@ -2964,7 +2964,7 @@ static int sd_probe(struct device *dev) sdkp->disk = gd; sdkp->index = index; atomic_set(&sdkp->openers, 0); @@ -46806,15 +48875,15 @@ index df5e961..df6b97f 100644 return blk_trace_startstop(sdp->device->request_queue, 1); case BLKTRACESTOP: diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c -index 9e039c6..ae9e800 100644 +index 349ebba..ff2a249 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c -@@ -1762,7 +1762,7 @@ int spi_bus_unlock(struct spi_master *master) +@@ -1945,7 +1945,7 @@ int spi_bus_unlock(struct spi_master *master) EXPORT_SYMBOL_GPL(spi_bus_unlock); /* portable code must never pass more than 32 bytes */ --#define SPI_BUFSIZ max(32,SMP_CACHE_BYTES) -+#define SPI_BUFSIZ max(32UL,SMP_CACHE_BYTES) +-#define SPI_BUFSIZ max(32, SMP_CACHE_BYTES) ++#define SPI_BUFSIZ max(32UL, SMP_CACHE_BYTES) static u8 *buf; @@ -46850,7 +48919,7 @@ index 2c61783..4d49e4e 100644 MKDEV(0, tdev->index), NULL, "%s", tdev->name); if (IS_ERR(tdev->dev)) diff --git a/drivers/staging/gdm724x/gdm_tty.c b/drivers/staging/gdm724x/gdm_tty.c -index 0247a20..cb9595c 100644 +index c0f7cd7..5424212 100644 --- a/drivers/staging/gdm724x/gdm_tty.c +++ b/drivers/staging/gdm724x/gdm_tty.c @@ -45,7 +45,7 @@ @@ -46863,10 +48932,10 @@ index 0247a20..cb9595c 100644 static struct tty_driver *gdm_driver[TTY_MAX_COUNT]; static struct gdm *gdm_table[TTY_MAX_COUNT][GDM_TTY_MINOR]; diff --git a/drivers/staging/lustre/lnet/selftest/brw_test.c b/drivers/staging/lustre/lnet/selftest/brw_test.c -index ef5064e..fce01db 100644 +index b7613c8..c302392 100644 --- a/drivers/staging/lustre/lnet/selftest/brw_test.c +++ b/drivers/staging/lustre/lnet/selftest/brw_test.c -@@ -478,13 +478,11 @@ brw_server_handle(struct srpc_server_rpc *rpc) +@@ -487,13 +487,11 @@ brw_server_handle(struct srpc_server_rpc *rpc) return 0; } @@ -46941,7 +49010,7 @@ index f0f9194..b589047 100644 srpc_service_t ping_test_service; void ping_init_test_service(void) diff --git a/drivers/staging/lustre/lustre/include/lustre_dlm.h b/drivers/staging/lustre/lustre/include/lustre_dlm.h -index 7020d9c..0d3b580 100644 +index bc2b82f..67fd598 100644 --- a/drivers/staging/lustre/lustre/include/lustre_dlm.h +++ b/drivers/staging/lustre/lustre/include/lustre_dlm.h @@ -1141,7 +1141,7 @@ struct ldlm_callback_suite { @@ -46954,7 +49023,7 @@ index 7020d9c..0d3b580 100644 /* ldlm_lockd.c */ int ldlm_del_waiting_lock(struct ldlm_lock *lock); diff --git a/drivers/staging/lustre/lustre/include/obd.h b/drivers/staging/lustre/lustre/include/obd.h -index a612255..9a9e2dd 100644 +index d0aea15..7af68e1 100644 --- a/drivers/staging/lustre/lustre/include/obd.h +++ b/drivers/staging/lustre/lustre/include/obd.h @@ -1417,7 +1417,7 @@ struct md_ops { @@ -46966,6 +49035,19 @@ index a612255..9a9e2dd 100644 struct lsm_operations { void (*lsm_free)(struct lov_stripe_md *); +diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c b/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c +index 39fcdac..222780f 100644 +--- a/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c ++++ b/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c +@@ -249,7 +249,7 @@ ldlm_process_flock_lock(struct ldlm_lock *req, __u64 *flags, int first_enq, + int added = (mode == LCK_NL); + int overlaps = 0; + int splitted = 0; +- const struct ldlm_callback_suite null_cbs = { NULL }; ++ const struct ldlm_callback_suite null_cbs = { }; + int rc; + + CDEBUG(D_DLMTRACE, "flags %#llx owner "LPU64" pid %u mode %u start " diff --git a/drivers/staging/lustre/lustre/libcfs/linux/linux-proc.c b/drivers/staging/lustre/lustre/libcfs/linux/linux-proc.c index fc6c977..df1f956 100644 --- a/drivers/staging/lustre/lustre/libcfs/linux/linux-proc.c @@ -46997,6 +49079,27 @@ index fc6c977..df1f956 100644 dummy.data = &backoff; dummy.proc_handler = &proc_dointvec; +diff --git a/drivers/staging/lustre/lustre/libcfs/module.c b/drivers/staging/lustre/lustre/libcfs/module.c +index f3108c7..cd4f9da 100644 +--- a/drivers/staging/lustre/lustre/libcfs/module.c ++++ b/drivers/staging/lustre/lustre/libcfs/module.c +@@ -348,11 +348,11 @@ out: + + + struct cfs_psdev_ops libcfs_psdev_ops = { +- libcfs_psdev_open, +- libcfs_psdev_release, +- NULL, +- NULL, +- libcfs_ioctl ++ .p_open = libcfs_psdev_open, ++ .p_close = libcfs_psdev_release, ++ .p_read = NULL, ++ .p_write = NULL, ++ .p_ioctl = libcfs_ioctl + }; + + extern int insert_proc(void); diff --git a/drivers/staging/media/solo6x10/solo6x10-core.c b/drivers/staging/media/solo6x10/solo6x10-core.c index 3675020..e80d92c 100644 --- a/drivers/staging/media/solo6x10/solo6x10-core.c @@ -47010,8 +49113,21 @@ index 3675020..e80d92c 100644 struct device *dev = &solo_dev->dev; const char *driver; int i; +diff --git a/drivers/staging/media/solo6x10/solo6x10-g723.c b/drivers/staging/media/solo6x10/solo6x10-g723.c +index 1db18c7..35e6afc 100644 +--- a/drivers/staging/media/solo6x10/solo6x10-g723.c ++++ b/drivers/staging/media/solo6x10/solo6x10-g723.c +@@ -355,7 +355,7 @@ static int solo_snd_pcm_init(struct solo_dev *solo_dev) + + int solo_g723_init(struct solo_dev *solo_dev) + { +- static struct snd_device_ops ops = { NULL }; ++ static struct snd_device_ops ops = { }; + struct snd_card *card; + struct snd_kcontrol_new kctl; + char name[32]; diff --git a/drivers/staging/media/solo6x10/solo6x10-p2m.c b/drivers/staging/media/solo6x10/solo6x10-p2m.c -index 3335941..2b26186 100644 +index 7f2f247..d999137 100644 --- a/drivers/staging/media/solo6x10/solo6x10-p2m.c +++ b/drivers/staging/media/solo6x10/solo6x10-p2m.c @@ -77,7 +77,7 @@ int solo_p2m_dma_desc(struct solo_dev *solo_dev, @@ -47024,10 +49140,10 @@ index 3335941..2b26186 100644 p2m_id = -p2m_id; } diff --git a/drivers/staging/media/solo6x10/solo6x10.h b/drivers/staging/media/solo6x10/solo6x10.h -index 6f91d2e..3f011d2 100644 +index f1bbb8c..a73eaba 100644 --- a/drivers/staging/media/solo6x10/solo6x10.h +++ b/drivers/staging/media/solo6x10/solo6x10.h -@@ -238,7 +238,7 @@ struct solo_dev { +@@ -237,7 +237,7 @@ struct solo_dev { /* P2M DMA Engine */ struct solo_p2m_dev p2m_dev[SOLO_NR_P2M]; @@ -47037,10 +49153,10 @@ index 6f91d2e..3f011d2 100644 unsigned int p2m_timeouts; diff --git a/drivers/staging/octeon/ethernet-rx.c b/drivers/staging/octeon/ethernet-rx.c -index e14a1bb..9cb9bbe 100644 +index 0315f60..2ecae10 100644 --- a/drivers/staging/octeon/ethernet-rx.c +++ b/drivers/staging/octeon/ethernet-rx.c -@@ -419,11 +419,11 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, int budget) +@@ -418,11 +418,11 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, int budget) /* Increment RX stats for virtual ports */ if (work->ipprt >= CVMX_PIP_NUM_INPUT_PORTS) { #ifdef CONFIG_64BIT @@ -47056,7 +49172,7 @@ index e14a1bb..9cb9bbe 100644 #endif } netif_receive_skb(skb); -@@ -434,9 +434,9 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, int budget) +@@ -433,9 +433,9 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, int budget) dev->name); */ #ifdef CONFIG_64BIT @@ -47069,10 +49185,10 @@ index e14a1bb..9cb9bbe 100644 dev_kfree_skb_irq(skb); } diff --git a/drivers/staging/octeon/ethernet.c b/drivers/staging/octeon/ethernet.c -index c3a90e7..023619a 100644 +index bd6ca71..8f0961e 100644 --- a/drivers/staging/octeon/ethernet.c +++ b/drivers/staging/octeon/ethernet.c -@@ -252,11 +252,11 @@ static struct net_device_stats *cvm_oct_common_get_stats(struct net_device *dev) +@@ -254,11 +254,11 @@ static struct net_device_stats *cvm_oct_common_get_stats(struct net_device *dev) * since the RX tasklet also increments it. */ #ifdef CONFIG_64BIT @@ -47154,7 +49270,7 @@ index a863a98..d272795 100644 /* * NOTE: diff --git a/drivers/staging/usbip/vhci_hcd.c b/drivers/staging/usbip/vhci_hcd.c -index d7974cb..d78076b 100644 +index e810ad5..931336f 100644 --- a/drivers/staging/usbip/vhci_hcd.c +++ b/drivers/staging/usbip/vhci_hcd.c @@ -441,7 +441,7 @@ static void vhci_tx_urb(struct urb *urb) @@ -47198,7 +49314,7 @@ index d07fcb5..358e1e1 100644 return; } diff --git a/drivers/staging/vt6655/hostap.c b/drivers/staging/vt6655/hostap.c -index 8acff44..bdb2fca 100644 +index ab8b2ba..99184aa 100644 --- a/drivers/staging/vt6655/hostap.c +++ b/drivers/staging/vt6655/hostap.c @@ -69,14 +69,13 @@ static int msglevel = MSG_LEVEL_INFO; @@ -47228,7 +49344,7 @@ index 8acff44..bdb2fca 100644 pDevice->apdev->type = ARPHRD_IEEE80211; diff --git a/drivers/staging/vt6656/hostap.c b/drivers/staging/vt6656/hostap.c -index c699a30..b90a5fd 100644 +index 67ba48b..24e602f 100644 --- a/drivers/staging/vt6656/hostap.c +++ b/drivers/staging/vt6656/hostap.c @@ -60,14 +60,13 @@ static int msglevel =MSG_LEVEL_INFO; @@ -47258,7 +49374,7 @@ index c699a30..b90a5fd 100644 pDevice->apdev->type = ARPHRD_IEEE80211; diff --git a/drivers/target/sbp/sbp_target.c b/drivers/target/sbp/sbp_target.c -index e51b09a..5ebac31 100644 +index 24884ca..26c8220 100644 --- a/drivers/target/sbp/sbp_target.c +++ b/drivers/target/sbp/sbp_target.c @@ -62,7 +62,7 @@ static const u32 sbp_unit_directory_template[] = { @@ -47280,10 +49396,10 @@ index e51b09a..5ebac31 100644 login->tgt_agt = sbp_target_agent_register(login); if (IS_ERR(login->tgt_agt)) { diff --git a/drivers/target/target_core_device.c b/drivers/target/target_core_device.c -index d90dbb0..6cbe585 100644 +index d06de84..fd38c9b 100644 --- a/drivers/target/target_core_device.c +++ b/drivers/target/target_core_device.c -@@ -1431,7 +1431,7 @@ struct se_device *target_alloc_device(struct se_hba *hba, const char *name) +@@ -1435,7 +1435,7 @@ struct se_device *target_alloc_device(struct se_hba *hba, const char *name) spin_lock_init(&dev->se_tmr_lock); spin_lock_init(&dev->qf_cmd_lock); sema_init(&dev->caw_sem, 1); @@ -47293,10 +49409,10 @@ index d90dbb0..6cbe585 100644 spin_lock_init(&dev->t10_wwn.t10_vpd_lock); INIT_LIST_HEAD(&dev->t10_pr.registration_list); diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c -index 0b0009b..215e88e 100644 +index 91953da..a842b90 100644 --- a/drivers/target/target_core_transport.c +++ b/drivers/target/target_core_transport.c -@@ -1137,7 +1137,7 @@ transport_check_alloc_task_attr(struct se_cmd *cmd) +@@ -1112,7 +1112,7 @@ transport_check_alloc_task_attr(struct se_cmd *cmd) * Used to determine when ORDERED commands should go from * Dormant to Active status. */ @@ -47545,15 +49661,15 @@ index 4190199..48f2920 100644 packet.verb = VSV_CLOSE_PROTOCOL; diff --git a/drivers/tty/hvc/hvsi_lib.c b/drivers/tty/hvc/hvsi_lib.c -index ac27671..0f627ee 100644 +index 347050e..14f8fbf 100644 --- a/drivers/tty/hvc/hvsi_lib.c +++ b/drivers/tty/hvc/hvsi_lib.c @@ -9,7 +9,7 @@ static int hvsi_send_packet(struct hvsi_priv *pv, struct hvsi_header *packet) { -- packet->seqno = atomic_inc_return(&pv->seqno); -+ packet->seqno = atomic_inc_return_unchecked(&pv->seqno); +- packet->seqno = cpu_to_be16(atomic_inc_return(&pv->seqno)); ++ packet->seqno = cpu_to_be16(atomic_inc_return_unchecked(&pv->seqno)); /* Assumes that always succeeds, works in practice */ return pv->put_chars(pv->termno, (char *)packet, packet->len); @@ -47566,15 +49682,6 @@ index ac27671..0f627ee 100644 pr_devel("HVSI@%x: Handshaking started\n", pv->termno); -@@ -265,7 +265,7 @@ int hvsilib_read_mctrl(struct hvsi_priv *pv) - pv->mctrl_update = 0; - q.hdr.type = VS_QUERY_PACKET_HEADER; - q.hdr.len = sizeof(struct hvsi_query); -- q.hdr.seqno = atomic_inc_return(&pv->seqno); -+ q.hdr.seqno = atomic_inc_return_unchecked(&pv->seqno); - q.verb = VSV_SEND_MODEM_CTL_STATUS; - rc = hvsi_send_packet(pv, &q.hdr); - if (rc <= 0) { diff --git a/drivers/tty/ipwireless/tty.c b/drivers/tty/ipwireless/tty.c index 8fd72ff..34a0bed 100644 --- a/drivers/tty/ipwireless/tty.c @@ -47728,9 +49835,18 @@ index c0f76da..d974c32 100644 dlci_get(dlci->gsm->dlci[0]); mux_get(dlci->gsm); diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c -index ff58293..71c87bc 100644 +index 34aacaa..dad073b 100644 --- a/drivers/tty/n_tty.c +++ b/drivers/tty/n_tty.c +@@ -114,7 +114,7 @@ struct n_tty_data { + int minimum_to_wake; + + /* consumer-published */ +- size_t read_tail; ++ size_t read_tail __intentional_overflow(-1); + size_t line_start; + + /* protected by output lock */ @@ -2502,6 +2502,7 @@ void n_tty_inherit_ops(struct tty_ldisc_ops *ops) { *ops = tty_ldisc_N_TTY; @@ -47947,10 +50063,10 @@ index b5d779c..3622cfe 100644 if (unlikely(pdev->id < 0 || pdev->id >= UART_NR)) return -ENXIO; diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c -index f3dfa19..342f2ff 100644 +index c1af04d..0815c8a 100644 --- a/drivers/tty/serial/samsung.c +++ b/drivers/tty/serial/samsung.c -@@ -456,11 +456,16 @@ static void s3c24xx_serial_shutdown(struct uart_port *port) +@@ -463,11 +463,16 @@ static void s3c24xx_serial_shutdown(struct uart_port *port) } } @@ -47967,7 +50083,7 @@ index f3dfa19..342f2ff 100644 dbg("s3c24xx_serial_startup: port=%p (%08lx,%p)\n", port->mapbase, port->membase); -@@ -1127,10 +1132,6 @@ static int s3c24xx_serial_init_port(struct s3c24xx_uart_port *ourport, +@@ -1141,10 +1146,6 @@ static int s3c24xx_serial_init_port(struct s3c24xx_uart_port *ourport, /* setup info for port */ port->dev = &platdev->dev; @@ -48408,7 +50524,7 @@ index dc6e969..5dc8786 100644 if (!retval) port->flags |= ASYNC_NORMAL_ACTIVE; diff --git a/drivers/tty/sysrq.c b/drivers/tty/sysrq.c -index 40a9fe9..a3f10cc 100644 +index ce396ec..04a37be 100644 --- a/drivers/tty/sysrq.c +++ b/drivers/tty/sysrq.c @@ -1075,7 +1075,7 @@ EXPORT_SYMBOL(unregister_sysrq_key); @@ -48474,10 +50590,10 @@ index 6458e11..6cfc218 100644 raw_spin_unlock_irqrestore(&tty_ldiscs_lock, flags); } diff --git a/drivers/tty/tty_port.c b/drivers/tty/tty_port.c -index f597e88..b7f68ed 100644 +index c94d234..8210f2d 100644 --- a/drivers/tty/tty_port.c +++ b/drivers/tty/tty_port.c -@@ -232,7 +232,7 @@ void tty_port_hangup(struct tty_port *port) +@@ -236,7 +236,7 @@ void tty_port_hangup(struct tty_port *port) unsigned long flags; spin_lock_irqsave(&port->lock, flags); @@ -48486,7 +50602,7 @@ index f597e88..b7f68ed 100644 port->flags &= ~ASYNC_NORMAL_ACTIVE; tty = port->tty; if (tty) -@@ -390,7 +390,7 @@ int tty_port_block_til_ready(struct tty_port *port, +@@ -394,7 +394,7 @@ int tty_port_block_til_ready(struct tty_port *port, /* The port lock protects the port counts */ spin_lock_irqsave(&port->lock, flags); if (!tty_hung_up_p(filp)) @@ -48495,7 +50611,7 @@ index f597e88..b7f68ed 100644 port->blocked_open++; spin_unlock_irqrestore(&port->lock, flags); -@@ -432,7 +432,7 @@ int tty_port_block_til_ready(struct tty_port *port, +@@ -436,7 +436,7 @@ int tty_port_block_til_ready(struct tty_port *port, we must not mess that up further */ spin_lock_irqsave(&port->lock, flags); if (!tty_hung_up_p(filp)) @@ -48504,7 +50620,7 @@ index f597e88..b7f68ed 100644 port->blocked_open--; if (retval == 0) port->flags |= ASYNC_NORMAL_ACTIVE; -@@ -466,19 +466,19 @@ int tty_port_close_start(struct tty_port *port, +@@ -470,19 +470,19 @@ int tty_port_close_start(struct tty_port *port, return 0; } @@ -48529,8 +50645,8 @@ index f597e88..b7f68ed 100644 - if (port->count) { + if (atomic_read(&port->count)) { spin_unlock_irqrestore(&port->lock, flags); - if (port->ops->drop) - port->ops->drop(port); + return 0; + } @@ -564,7 +564,7 @@ int tty_port_open(struct tty_port *port, struct tty_struct *tty, { spin_lock_irq(&port->lock); @@ -48602,7 +50718,7 @@ index d0e3a44..5f8b754 100644 ret = -EPERM; goto reterr; diff --git a/drivers/uio/uio.c b/drivers/uio/uio.c -index 0e808cf..d7d274b 100644 +index a673e5b..36e5d32 100644 --- a/drivers/uio/uio.c +++ b/drivers/uio/uio.c @@ -25,6 +25,7 @@ @@ -48631,7 +50747,7 @@ index 0e808cf..d7d274b 100644 } static DEVICE_ATTR_RO(event); -@@ -401,7 +402,7 @@ void uio_event_notify(struct uio_info *info) +@@ -405,7 +406,7 @@ void uio_event_notify(struct uio_info *info) { struct uio_device *idev = info->uio_dev; @@ -48640,7 +50756,7 @@ index 0e808cf..d7d274b 100644 wake_up_interruptible(&idev->wait); kill_fasync(&idev->async_queue, SIGIO, POLL_IN); } -@@ -454,7 +455,7 @@ static int uio_open(struct inode *inode, struct file *filep) +@@ -458,7 +459,7 @@ static int uio_open(struct inode *inode, struct file *filep) } listener->dev = idev; @@ -48649,7 +50765,7 @@ index 0e808cf..d7d274b 100644 filep->private_data = listener; if (idev->info->open) { -@@ -505,7 +506,7 @@ static unsigned int uio_poll(struct file *filep, poll_table *wait) +@@ -509,7 +510,7 @@ static unsigned int uio_poll(struct file *filep, poll_table *wait) return -EIO; poll_wait(filep, &idev->wait, wait); @@ -48658,7 +50774,7 @@ index 0e808cf..d7d274b 100644 return POLLIN | POLLRDNORM; return 0; } -@@ -530,7 +531,7 @@ static ssize_t uio_read(struct file *filep, char __user *buf, +@@ -534,7 +535,7 @@ static ssize_t uio_read(struct file *filep, char __user *buf, do { set_current_state(TASK_INTERRUPTIBLE); @@ -48667,7 +50783,7 @@ index 0e808cf..d7d274b 100644 if (event_count != listener->event_count) { if (copy_to_user(buf, &event_count, count)) retval = -EFAULT; -@@ -587,9 +588,13 @@ static ssize_t uio_write(struct file *filep, const char __user *buf, +@@ -591,9 +592,13 @@ static ssize_t uio_write(struct file *filep, const char __user *buf, static int uio_find_mem_index(struct vm_area_struct *vma) { struct uio_device *idev = vma->vm_private_data; @@ -48682,16 +50798,7 @@ index 0e808cf..d7d274b 100644 return -1; return (int)vma->vm_pgoff; } -@@ -647,6 +652,8 @@ static int uio_mmap_physical(struct vm_area_struct *vma) - return -EINVAL; - mem = idev->info->mem + mi; - -+ if (mem->addr & ~PAGE_MASK) -+ return -ENODEV; - if (vma->vm_end - vma->vm_start > mem->size) - return -EINVAL; - -@@ -818,7 +825,7 @@ int __uio_register_device(struct module *owner, +@@ -825,7 +830,7 @@ int __uio_register_device(struct module *owner, idev->owner = owner; idev->info = info; init_waitqueue_head(&idev->wait); @@ -48828,7 +50935,7 @@ index 2a3bbdf..91d72cf 100644 file->f_version = event_count; return POLLIN | POLLRDNORM; diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c -index 71dc5d7..6135ff2 100644 +index 967152a..16fa2e5 100644 --- a/drivers/usb/core/devio.c +++ b/drivers/usb/core/devio.c @@ -187,7 +187,7 @@ static ssize_t usbdev_read(struct file *file, char __user *buf, size_t nbytes, @@ -48840,7 +50947,7 @@ index 71dc5d7..6135ff2 100644 loff_t pos; int i; -@@ -229,13 +229,13 @@ static ssize_t usbdev_read(struct file *file, char __user *buf, size_t nbytes, +@@ -229,22 +229,22 @@ static ssize_t usbdev_read(struct file *file, char __user *buf, size_t nbytes, for (i = 0; nbytes && i < dev->descriptor.bNumConfigurations; i++) { struct usb_config_descriptor *config = (struct usb_config_descriptor *)dev->rawdescriptors[i]; @@ -48855,12 +50962,23 @@ index 71dc5d7..6135ff2 100644 + size_t alloclen = le16_to_cpu(dev->config[i].desc.wTotalLength); - len = length - (*ppos - pos); +- len = length - (*ppos - pos); ++ len = length + pos - *ppos; + if (len > nbytes) + len = nbytes; + + /* Simply don't write (skip over) unallocated parts */ + if (alloclen > (*ppos - pos)) { +- alloclen -= (*ppos - pos); ++ alloclen = alloclen + pos - *ppos; + if (copy_to_user(buf, + dev->rawdescriptors[i] + (*ppos - pos), + min(len, alloclen))) { diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c -index f20a044..d1059aa 100644 +index 6bffb8c..b404e8b 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c -@@ -1552,7 +1552,7 @@ int usb_hcd_submit_urb (struct urb *urb, gfp_t mem_flags) +@@ -1550,7 +1550,7 @@ int usb_hcd_submit_urb (struct urb *urb, gfp_t mem_flags) */ usb_get_urb(urb); atomic_inc(&urb->use_count); @@ -48869,7 +50987,7 @@ index f20a044..d1059aa 100644 usbmon_urb_submit(&hcd->self, urb); /* NOTE requirements on root-hub callers (usbfs and the hub -@@ -1579,7 +1579,7 @@ int usb_hcd_submit_urb (struct urb *urb, gfp_t mem_flags) +@@ -1577,7 +1577,7 @@ int usb_hcd_submit_urb (struct urb *urb, gfp_t mem_flags) urb->hcpriv = NULL; INIT_LIST_HEAD(&urb->urb_list); atomic_dec(&urb->use_count); @@ -48879,7 +50997,7 @@ index f20a044..d1059aa 100644 wake_up(&usb_kill_urb_queue); usb_put_urb(urb); diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c -index 243c672..8b66fbb 100644 +index 07e6654..6420edf 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c @@ -27,6 +27,7 @@ @@ -48890,8 +51008,8 @@ index 243c672..8b66fbb 100644 #include #include -@@ -4467,6 +4468,10 @@ static void hub_port_connect_change(struct usb_hub *hub, int port1, - goto done; +@@ -4442,6 +4443,10 @@ static void hub_port_connect_change(struct usb_hub *hub, int port1, + goto done; return; } + @@ -48902,7 +51020,7 @@ index 243c672..8b66fbb 100644 unit_load = 150; else diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c -index 82927e1..4993dbf 100644 +index bb31597..6c5ef8b 100644 --- a/drivers/usb/core/message.c +++ b/drivers/usb/core/message.c @@ -129,7 +129,7 @@ static int usb_internal_control_msg(struct usb_device *usb_dev, @@ -48933,10 +51051,10 @@ index 82927e1..4993dbf 100644 { struct urb *urb; diff --git a/drivers/usb/core/sysfs.c b/drivers/usb/core/sysfs.c -index ca516ac..6c36ee4 100644 +index 52a97ad..e73330f 100644 --- a/drivers/usb/core/sysfs.c +++ b/drivers/usb/core/sysfs.c -@@ -236,7 +236,7 @@ static ssize_t urbnum_show(struct device *dev, struct device_attribute *attr, +@@ -244,7 +244,7 @@ static ssize_t urbnum_show(struct device *dev, struct device_attribute *attr, struct usb_device *udev; udev = to_usb_device(dev); @@ -48946,7 +51064,7 @@ index ca516ac..6c36ee4 100644 static DEVICE_ATTR_RO(urbnum); diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c -index 0a6ee2e..6f8d7e8 100644 +index 4d11449..f4ccabf 100644 --- a/drivers/usb/core/usb.c +++ b/drivers/usb/core/usb.c @@ -433,7 +433,7 @@ struct usb_device *usb_alloc_dev(struct usb_device *parent, @@ -48959,7 +51077,7 @@ index 0a6ee2e..6f8d7e8 100644 INIT_LIST_HEAD(&dev->ep0.urb_list); dev->ep0.desc.bLength = USB_DT_ENDPOINT_SIZE; diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c -index 5452c0f..34c9145 100644 +index 02e44fc..3c4fe64 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -532,8 +532,6 @@ static int __dwc3_gadget_ep_enable(struct dwc3_ep *dep, @@ -48972,7 +51090,7 @@ index 5452c0f..34c9145 100644 trb_st_hw = &dep->trb_pool[0]; diff --git a/drivers/usb/early/ehci-dbgp.c b/drivers/usb/early/ehci-dbgp.c -index 5e29dde..eca992f 100644 +index 8cfc319..4868255 100644 --- a/drivers/usb/early/ehci-dbgp.c +++ b/drivers/usb/early/ehci-dbgp.c @@ -98,7 +98,8 @@ static inline u32 dbgp_len_update(u32 x, u32 len) @@ -48985,7 +51103,7 @@ index 5e29dde..eca992f 100644 #else #define dbgp_kgdb_mode (0) #endif -@@ -1047,6 +1048,13 @@ static struct kgdb_io kgdbdbgp_io_ops = { +@@ -1043,6 +1044,13 @@ static struct kgdb_io kgdbdbgp_io_ops = { .write_char = kgdbdbgp_write_char, }; @@ -48999,7 +51117,7 @@ index 5e29dde..eca992f 100644 static int kgdbdbgp_wait_time; static int __init kgdbdbgp_parse_config(char *str) -@@ -1062,8 +1070,10 @@ static int __init kgdbdbgp_parse_config(char *str) +@@ -1058,8 +1066,10 @@ static int __init kgdbdbgp_parse_config(char *str) ptr++; kgdbdbgp_wait_time = simple_strtoul(ptr, &ptr, 10); } @@ -49195,32 +51313,32 @@ index 75f70f0..d467e1a 100644 /* Dynamic bitflag definitions (us->dflags): used in set_bit() etc. */ diff --git a/drivers/usb/wusbcore/wa-hc.h b/drivers/usb/wusbcore/wa-hc.h -index cf250c2..ad9d904 100644 +index e614f02..3fd60e2 100644 --- a/drivers/usb/wusbcore/wa-hc.h +++ b/drivers/usb/wusbcore/wa-hc.h -@@ -199,7 +199,7 @@ struct wahc { +@@ -225,7 +225,7 @@ struct wahc { spinlock_t xfer_list_lock; struct work_struct xfer_enqueue_work; struct work_struct xfer_error_work; - atomic_t xfer_id_count; + atomic_unchecked_t xfer_id_count; - }; - -@@ -255,7 +255,7 @@ static inline void wa_init(struct wahc *wa) - spin_lock_init(&wa->xfer_list_lock); + kernel_ulong_t quirks; + }; +@@ -287,7 +287,7 @@ static inline void wa_init(struct wahc *wa) INIT_WORK(&wa->xfer_enqueue_work, wa_urb_enqueue_run); INIT_WORK(&wa->xfer_error_work, wa_process_errored_transfers_run); + wa->dto_in_use = 0; - atomic_set(&wa->xfer_id_count, 1); + atomic_set_unchecked(&wa->xfer_id_count, 1); } /** diff --git a/drivers/usb/wusbcore/wa-xfer.c b/drivers/usb/wusbcore/wa-xfer.c -index 3dcf66f..8faaf6e 100644 +index ed5abe8..7036400 100644 --- a/drivers/usb/wusbcore/wa-xfer.c +++ b/drivers/usb/wusbcore/wa-xfer.c -@@ -300,7 +300,7 @@ out: +@@ -312,7 +312,7 @@ static void wa_xfer_completion(struct wa_xfer *xfer) */ static void wa_xfer_id_init(struct wa_xfer *xfer) { @@ -49228,7 +51346,7 @@ index 3dcf66f..8faaf6e 100644 + xfer->id = atomic_add_return_unchecked(1, &xfer->wa->xfer_id_count); } - /* + /* Return the xfer's ID. */ diff --git a/drivers/vfio/vfio.c b/drivers/vfio/vfio.c index 1eab4ac..e21efc9 100644 --- a/drivers/vfio/vfio.c @@ -49243,9 +51361,66 @@ index 1eab4ac..e21efc9 100644 return 0; diff --git a/drivers/vhost/vringh.c b/drivers/vhost/vringh.c -index 5174eba..86e764a 100644 +index 5174eba..451e6bc 100644 --- a/drivers/vhost/vringh.c +++ b/drivers/vhost/vringh.c +@@ -530,17 +530,17 @@ static inline void __vringh_notify_disable(struct vringh *vrh, + /* Userspace access helpers: in this case, addresses are really userspace. */ + static inline int getu16_user(u16 *val, const u16 *p) + { +- return get_user(*val, (__force u16 __user *)p); ++ return get_user(*val, (u16 __force_user *)p); + } + + static inline int putu16_user(u16 *p, u16 val) + { +- return put_user(val, (__force u16 __user *)p); ++ return put_user(val, (u16 __force_user *)p); + } + + static inline int copydesc_user(void *dst, const void *src, size_t len) + { +- return copy_from_user(dst, (__force void __user *)src, len) ? ++ return copy_from_user(dst, (void __force_user *)src, len) ? + -EFAULT : 0; + } + +@@ -548,19 +548,19 @@ static inline int putused_user(struct vring_used_elem *dst, + const struct vring_used_elem *src, + unsigned int num) + { +- return copy_to_user((__force void __user *)dst, src, ++ return copy_to_user((void __force_user *)dst, src, + sizeof(*dst) * num) ? -EFAULT : 0; + } + + static inline int xfer_from_user(void *src, void *dst, size_t len) + { +- return copy_from_user(dst, (__force void __user *)src, len) ? ++ return copy_from_user(dst, (void __force_user *)src, len) ? + -EFAULT : 0; + } + + static inline int xfer_to_user(void *dst, void *src, size_t len) + { +- return copy_to_user((__force void __user *)dst, src, len) ? ++ return copy_to_user((void __force_user *)dst, src, len) ? + -EFAULT : 0; + } + +@@ -596,9 +596,9 @@ int vringh_init_user(struct vringh *vrh, u32 features, + vrh->last_used_idx = 0; + vrh->vring.num = num; + /* vring expects kernel addresses, but only used via accessors. */ +- vrh->vring.desc = (__force struct vring_desc *)desc; +- vrh->vring.avail = (__force struct vring_avail *)avail; +- vrh->vring.used = (__force struct vring_used *)used; ++ vrh->vring.desc = (__force_kernel struct vring_desc *)desc; ++ vrh->vring.avail = (__force_kernel struct vring_avail *)avail; ++ vrh->vring.used = (__force_kernel struct vring_used *)used; + return 0; + } + EXPORT_SYMBOL(vringh_init_user); @@ -800,7 +800,7 @@ static inline int getu16_kern(u16 *val, const u16 *p) static inline int putu16_kern(u16 *p, u16 val) @@ -49256,7 +51431,7 @@ index 5174eba..86e764a 100644 } diff --git a/drivers/video/arcfb.c b/drivers/video/arcfb.c -index e43401a..dd49b3f 100644 +index 1b0b233..6f34c2c 100644 --- a/drivers/video/arcfb.c +++ b/drivers/video/arcfb.c @@ -458,7 +458,7 @@ static ssize_t arcfb_write(struct fb_info *info, const char __user *buf, @@ -49269,7 +51444,7 @@ index e43401a..dd49b3f 100644 err = -ENOSPC; } diff --git a/drivers/video/aty/aty128fb.c b/drivers/video/aty/aty128fb.c -index a4dfe8c..297ddd9 100644 +index 12ca031..84a8a74 100644 --- a/drivers/video/aty/aty128fb.c +++ b/drivers/video/aty/aty128fb.c @@ -149,7 +149,7 @@ enum { @@ -49282,7 +51457,7 @@ index a4dfe8c..297ddd9 100644 "PCI", "PRO AGP", diff --git a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c -index 9b0f12c..024673d 100644 +index 28fafbf..ae91651 100644 --- a/drivers/video/aty/atyfb_base.c +++ b/drivers/video/aty/atyfb_base.c @@ -1326,10 +1326,14 @@ static int atyfb_set_par(struct fb_info *info) @@ -49326,7 +51501,7 @@ index 95ec042..e6affdd 100644 return 0; } diff --git a/drivers/video/backlight/kb3886_bl.c b/drivers/video/backlight/kb3886_bl.c -index bca6ccc..252107e 100644 +index 7592cc2..92feb56 100644 --- a/drivers/video/backlight/kb3886_bl.c +++ b/drivers/video/backlight/kb3886_bl.c @@ -78,7 +78,7 @@ static struct kb3886bl_machinfo *bl_machinfo; @@ -49363,7 +51538,7 @@ index 900aa4e..6d49418 100644 } EXPORT_SYMBOL_GPL(fb_deferred_io_cleanup); diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c -index dacaf74..8478a46 100644 +index 010d191..7b8235a 100644 --- a/drivers/video/fbmem.c +++ b/drivers/video/fbmem.c @@ -433,7 +433,7 @@ static void fb_do_show_logo(struct fb_info *info, struct fb_image *image, @@ -49384,7 +51559,7 @@ index dacaf74..8478a46 100644 info->fbops->fb_imageblit(info, image); image->dy -= image->height + 8; } -@@ -1175,7 +1175,7 @@ static long do_fb_ioctl(struct fb_info *info, unsigned int cmd, +@@ -1179,7 +1179,7 @@ static long do_fb_ioctl(struct fb_info *info, unsigned int cmd, return -EFAULT; if (con2fb.console < 1 || con2fb.console > MAX_NR_CONSOLES) return -EINVAL; @@ -49393,8 +51568,17 @@ index dacaf74..8478a46 100644 return -EINVAL; if (!registered_fb[con2fb.framebuffer]) request_module("fb%d", con2fb.framebuffer); +@@ -1300,7 +1300,7 @@ static int do_fscreeninfo_to_user(struct fb_fix_screeninfo *fix, + __u32 data; + int err; + +- err = copy_to_user(&fix32->id, &fix->id, sizeof(fix32->id)); ++ err = copy_to_user(fix32->id, &fix->id, sizeof(fix32->id)); + + data = (__u32) (unsigned long) fix->smem_start; + err |= put_user(data, &fix32->smem_start); diff --git a/drivers/video/hyperv_fb.c b/drivers/video/hyperv_fb.c -index 8d456dc..b4fa44b 100644 +index 130708f..cdac1a9 100644 --- a/drivers/video/hyperv_fb.c +++ b/drivers/video/hyperv_fb.c @@ -233,7 +233,7 @@ static uint screen_fb_size; @@ -52155,6 +54339,49 @@ index 3c14e43..2630570 100644 +4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 +4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 +4 4 4 4 4 4 +diff --git a/drivers/video/matrox/matroxfb_DAC1064.c b/drivers/video/matrox/matroxfb_DAC1064.c +index a01147f..5d896f8 100644 +--- a/drivers/video/matrox/matroxfb_DAC1064.c ++++ b/drivers/video/matrox/matroxfb_DAC1064.c +@@ -1088,14 +1088,20 @@ static void MGAG100_restore(struct matrox_fb_info *minfo) + + #ifdef CONFIG_FB_MATROX_MYSTIQUE + struct matrox_switch matrox_mystique = { +- MGA1064_preinit, MGA1064_reset, MGA1064_init, MGA1064_restore, ++ .preinit = MGA1064_preinit, ++ .reset = MGA1064_reset, ++ .init = MGA1064_init, ++ .restore = MGA1064_restore, + }; + EXPORT_SYMBOL(matrox_mystique); + #endif + + #ifdef CONFIG_FB_MATROX_G + struct matrox_switch matrox_G100 = { +- MGAG100_preinit, MGAG100_reset, MGAG100_init, MGAG100_restore, ++ .preinit = MGAG100_preinit, ++ .reset = MGAG100_reset, ++ .init = MGAG100_init, ++ .restore = MGAG100_restore, + }; + EXPORT_SYMBOL(matrox_G100); + #endif +diff --git a/drivers/video/matrox/matroxfb_Ti3026.c b/drivers/video/matrox/matroxfb_Ti3026.c +index 195ad7c..09743fc 100644 +--- a/drivers/video/matrox/matroxfb_Ti3026.c ++++ b/drivers/video/matrox/matroxfb_Ti3026.c +@@ -738,7 +738,10 @@ static int Ti3026_preinit(struct matrox_fb_info *minfo) + } + + struct matrox_switch matrox_millennium = { +- Ti3026_preinit, Ti3026_reset, Ti3026_init, Ti3026_restore ++ .preinit = Ti3026_preinit, ++ .reset = Ti3026_reset, ++ .init = Ti3026_init, ++ .restore = Ti3026_restore + }; + EXPORT_SYMBOL(matrox_millennium); + #endif diff --git a/drivers/video/mb862xx/mb862xxfb_accel.c b/drivers/video/mb862xx/mb862xxfb_accel.c index fe92eed..106e085 100644 --- a/drivers/video/mb862xx/mb862xxfb_accel.c @@ -52235,7 +54462,7 @@ index ff22871..b129bed 100644 info->var.accel_flags = (!noaccel); diff --git a/drivers/video/omap2/dss/display.c b/drivers/video/omap2/dss/display.c -index fafe7c9..93197b9 100644 +index 669a81f..e216d76 100644 --- a/drivers/video/omap2/dss/display.c +++ b/drivers/video/omap2/dss/display.c @@ -137,12 +137,14 @@ int omapdss_register_display(struct omap_dss_device *dssdev) @@ -52257,7 +54484,7 @@ index fafe7c9..93197b9 100644 mutex_lock(&panel_list_mutex); list_add_tail(&dssdev->panel_list, &panel_list); diff --git a/drivers/video/s1d13xxxfb.c b/drivers/video/s1d13xxxfb.c -index 05c2dc3..ea1f391 100644 +index 83433cb..71e9b98 100644 --- a/drivers/video/s1d13xxxfb.c +++ b/drivers/video/s1d13xxxfb.c @@ -881,8 +881,10 @@ static int s1d13xxxfb_probe(struct platform_device *pdev) @@ -52274,7 +54501,7 @@ index 05c2dc3..ea1f391 100644 FBINFO_HWACCEL_FILLRECT | FBINFO_HWACCEL_COPYAREA; break; diff --git a/drivers/video/smscufx.c b/drivers/video/smscufx.c -index e188ada..aac63c8 100644 +index d513ed6..90b0de9 100644 --- a/drivers/video/smscufx.c +++ b/drivers/video/smscufx.c @@ -1175,7 +1175,9 @@ static int ufx_ops_release(struct fb_info *info, int user) @@ -52289,7 +54516,7 @@ index e188ada..aac63c8 100644 pr_debug("released /dev/fb%d user=%d count=%d", diff --git a/drivers/video/udlfb.c b/drivers/video/udlfb.c -index d2e5bc3..4cb05d1 100644 +index 025f14e..20eb4db 100644 --- a/drivers/video/udlfb.c +++ b/drivers/video/udlfb.c @@ -623,11 +623,11 @@ static int dlfb_handle_damage(struct dlfb_data *dev, int x, int y, @@ -52387,7 +54614,7 @@ index d2e5bc3..4cb05d1 100644 return count; } diff --git a/drivers/video/uvesafb.c b/drivers/video/uvesafb.c -index 7aec6f3..e3b2d55 100644 +index 256fba7..6e75516 100644 --- a/drivers/video/uvesafb.c +++ b/drivers/video/uvesafb.c @@ -19,6 +19,7 @@ @@ -52398,7 +54625,7 @@ index 7aec6f3..e3b2d55 100644 #include