]> git.ipfire.org Git - ipfire-3.x.git/commitdiff
Merge branch 'kernel-3.9'
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 23 May 2013 22:01:21 +0000 (22:01 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 23 May 2013 22:01:21 +0000 (22:01 +0000)
12 files changed:
kernel/config-arm-generic
kernel/config-armv5tel-kirkwood
kernel/config-armv7hl-default [moved from kernel/config-armv7hl-omap with 68% similarity]
kernel/config-armv7hl-exynos
kernel/config-generic
kernel/config-i686-default
kernel/config-i686-legacy
kernel/config-x86-generic
kernel/config-x86_64-default
kernel/kernel.nm
kernel/patches/grsecurity-2.9.1-3.9.3-201305201732.patch [moved from kernel/patches/grsecurity-2.9.1-3.8.6-201304091939.patch with 93% similarity]
kernel/scripts/configure

index 7527060fef766dc3655d3d2508d01e05096278ee..506dd53cbb5a590b4b39a8c21e613ec9f7d8a884 100644 (file)
@@ -14,6 +14,7 @@ CONFIG_BROKEN_ON_SMP=y
 # IRQ subsystem
 #
 CONFIG_HARDIRQS_SW_RESEND=y
+# CONFIG_ALWAYS_USE_PERSISTENT_CLOCK is not set
 CONFIG_KTIME_SCALAR=y
 
 #
@@ -25,6 +26,7 @@ CONFIG_TICK_CPU_ACCOUNTING=y
 # RCU Subsystem
 #
 CONFIG_TINY_RCU=y
+# CONFIG_RCU_STALL_COMMON is not set
 CONFIG_PERF_USE_VMALLOC=y
 
 #
@@ -33,6 +35,7 @@ CONFIG_PERF_USE_VMALLOC=y
 CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
 CONFIG_MODULES_USE_ELF_REL=y
 CONFIG_CLONE_BACKWARDS=y
+CONFIG_OLD_SIGACTION=y
 
 #
 # GCOV-based kernel profiling
@@ -88,8 +91,7 @@ CONFIG_ARCH_VERSATILE=y
 # CONFIG_ARCH_NOMADIK is not set
 # CONFIG_PLAT_SPEAR is not set
 # CONFIG_ARCH_DAVINCI is not set
-# CONFIG_ARCH_OMAP is not set
-# CONFIG_ARCH_VT8500_SINGLE is not set
+# CONFIG_ARCH_OMAP1 is not set
 
 #
 # Versatile platform type
@@ -101,7 +103,6 @@ CONFIG_PLAT_VERSATILE_CLOCK=y
 CONFIG_PLAT_VERSATILE_CLCD=y
 CONFIG_PLAT_VERSATILE_LEDS=y
 CONFIG_PLAT_VERSATILE_SCHED_CLOCK=y
-# CONFIG_ARCH_VT8500 is not set
 CONFIG_PLAT_VERSATILE=y
 CONFIG_ARM_TIMER_SP804=y
 
@@ -132,8 +133,6 @@ CONFIG_ARM_THUMB=y
 CONFIG_ARM_L1_CACHE_SHIFT=5
 CONFIG_ARM_NR_BANKS=8
 CONFIG_MULTI_IRQ_HANDLER=y
-CONFIG_ARM_VIC=y
-CONFIG_ARM_VIC_NR=2
 CONFIG_ICST=y
 
 #
@@ -160,7 +159,6 @@ CONFIG_AEABI=y
 CONFIG_HIGHMEM=y
 # CONFIG_HIGHPTE is not set
 CONFIG_HW_PERF_EVENTS=y
-CONFIG_FLATMEM_MANUAL=y
 CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 CONFIG_SPLIT_PTLOCK_CPUS=999999
@@ -204,7 +202,6 @@ CONFIG_VFP=y
 # Power management options
 #
 CONFIG_APM_EMULATION=y
-CONFIG_PM_CLK=y
 CONFIG_CPU_PM=y
 CONFIG_ARM_CPU_SUSPEND=y
 
@@ -252,7 +249,6 @@ CONFIG_OF_PCI_IRQ=y
 # Misc devices
 #
 # CONFIG_SENSORS_LIS3LV02D is not set
-# CONFIG_ATMEL_PWM is not set
 # CONFIG_SGI_IOC4 is not set
 # CONFIG_ARM_CHARLCD is not set
 
@@ -260,7 +256,6 @@ CONFIG_OF_PCI_IRQ=y
 # SCSI Transports
 #
 # CONFIG_SCSI_ACARD is not set
-# CONFIG_SCSI_ADVANSYS is not set
 # CONFIG_SCSI_NSP32 is not set
 
 #
@@ -304,7 +299,6 @@ CONFIG_MDIO_BUS_MUX_MMIOREG=m
 #
 # Input Device Drivers
 #
-# CONFIG_KEYBOARD_SAMSUNG is not set
 CONFIG_INPUT_PWM_BEEPER=m
 
 #
@@ -326,8 +320,6 @@ CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
 CONFIG_SERIAL_OF_PLATFORM=y
 # CONFIG_SERIAL_XILINX_PS_UART is not set
 # CONFIG_HVC_DCC is not set
-CONFIG_HW_RANDOM_ATMEL=m
-CONFIG_HW_RANDOM_EXYNOS=m
 
 #
 # PC SMBus host controller drivers
@@ -367,6 +359,7 @@ CONFIG_GPIO_ADNP=m
 #
 # CONFIG_APM_POWER is not set
 CONFIG_POWER_RESET_GPIO=y
+CONFIG_POWER_RESET_RESTART=y
 
 #
 # Watchdog Device Drivers
@@ -392,17 +385,18 @@ CONFIG_VIDEO_CAFE_CCIC=m
 # CONFIG_VIDEO_SH_MOBILE_CSI2 is not set
 # CONFIG_VIDEO_SH_MOBILE_CEU is not set
 
-#
-# Graphics support
-#
-# CONFIG_DRM_RADEON is not set
-# CONFIG_DRM_NOUVEAU is not set
-
 #
 # I2C encoder or helper chips
 #
 CONFIG_DRM_I2C_CH7006=m
 CONFIG_DRM_I2C_SIL164=m
+# CONFIG_DRM_RADEON is not set
+# CONFIG_DRM_NOUVEAU is not set
+# CONFIG_DRM_TILCDC is not set
+CONFIG_DISPLAY_TIMING=y
+CONFIG_VIDEOMODE=y
+CONFIG_OF_DISPLAY_TIMING=y
+CONFIG_OF_VIDEOMODE=y
 # CONFIG_FB_BOOT_VESA_SUPPORT is not set
 CONFIG_FB_CFB_FILLRECT=m
 CONFIG_FB_CFB_COPYAREA=m
@@ -429,6 +423,7 @@ CONFIG_SND_COMPRESS_OFFLOAD=m
 CONFIG_SND_ARM=y
 CONFIG_SND_ARMAACI=m
 CONFIG_SND_SOC=m
+CONFIG_SND_ATMEL_SOC=m
 CONFIG_SND_DESIGNWARE_I2S=m
 CONFIG_SND_SOC_I2C_AND_SPI=m
 # CONFIG_SND_SOC_ALL_CODECS is not set
@@ -443,8 +438,6 @@ CONFIG_SND_SIMPLE_CARD=m
 # MMC/SD/SDIO Host Controller Drivers
 #
 CONFIG_MMC_ARMMMCI=m
-CONFIG_MMC_SDHCI_PXAV3=m
-CONFIG_MMC_SDHCI_PXAV2=m
 CONFIG_MMC_DW=m
 # CONFIG_MMC_DW_IDMAC is not set
 CONFIG_MMC_DW_PLTFM=m
@@ -454,12 +447,15 @@ CONFIG_MMC_DW_PCI=m
 #
 # LED drivers
 #
-# CONFIG_LEDS_RENESAS_TPU is not set
+CONFIG_LEDS_PWM=m
 
 #
 # iptables trigger is under Netfilter config (LED target)
 #
 # CONFIG_EDAC is not set
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_SYSTOHC=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
 
 #
 # on-CPU RTC drivers
@@ -474,22 +470,22 @@ CONFIG_RTC_DRV_SNVS=m
 # CONFIG_AMBA_PL08X is not set
 # CONFIG_DW_DMAC is not set
 CONFIG_PL330_DMA=y
-
-#
-# Android
-#
-CONFIG_CLKDEV_LOOKUP=y
+CONFIG_DMA_OF=y
 
 #
 # Hardware Spinlock drivers
 #
 CONFIG_CLKSRC_MMIO=y
+CONFIG_PL320_MBOX=y
 CONFIG_OF_IOMMU=y
 
 #
-# Rpmsg drivers (EXPERIMENTAL)
+# Magnetometer sensors
 #
 CONFIG_PWM=y
+CONFIG_IRQCHIP=y
+CONFIG_ARM_VIC=y
+CONFIG_ARM_VIC_NR=2
 CONFIG_VERSATILE_FPGA_IRQ=y
 CONFIG_VERSATILE_FPGA_IRQ_NR=4
 
@@ -497,6 +493,10 @@ CONFIG_VERSATILE_FPGA_IRQ_NR=4
 # Kernel hacking
 #
 # CONFIG_DEBUG_HIGHMEM is not set
+
+#
+# RCU Debugging
+#
 # CONFIG_FTRACE_SYSCALLS is not set
 CONFIG_ARM_UNWIND=y
 CONFIG_OLD_MCOUNT=y
@@ -557,3 +557,4 @@ CONFIG_CRYPTO_DEV_HIFN_795X_RNG=y
 #
 CONFIG_AUDIT_GENERIC=y
 CONFIG_GENERIC_ATOMIC64=y
+# CONFIG_VIRTUALIZATION is not set
index b8ca93c04e659d302d2e18baae7d93274e1daff2..eb407a1bccfe88a7ce086807cc5aec8ad097edd4 100644 (file)
@@ -21,6 +21,7 @@ CONFIG_MACH_SHEEVAPLUG=y
 CONFIG_MACH_ESATA_SHEEVAPLUG=y
 CONFIG_MACH_GURUPLUG=y
 CONFIG_ARCH_KIRKWOOD_DT=y
+CONFIG_MACH_GURUPLUG_DT=y
 CONFIG_MACH_DREAMPLUG_DT=y
 CONFIG_MACH_ICONNECT_DT=y
 CONFIG_MACH_DLINK_KIRKWOOD_DT=y
@@ -134,6 +135,12 @@ CONFIG_GPIO_MCP23S08=m
 # 1-wire Slaves
 #
 # CONFIG_CHARGER_MANAGER is not set
+CONFIG_POWER_RESET_QNAP=y
+
+#
+# Native drivers
+#
+CONFIG_KIRKWOOD_THERMAL=m
 
 #
 # Watchdog Device Drivers
@@ -160,11 +167,26 @@ CONFIG_REGULATOR_FIXED_VOLTAGE=y
 # CONFIG_REGULATOR_MAX8973 is not set
 # CONFIG_REGULATOR_LP3971 is not set
 # CONFIG_REGULATOR_LP3972 is not set
+CONFIG_REGULATOR_LP8755=m
 # CONFIG_REGULATOR_TPS51632 is not set
 # CONFIG_REGULATOR_TPS62360 is not set
 # CONFIG_REGULATOR_TPS65023 is not set
 # CONFIG_REGULATOR_TPS6507X is not set
 
+#
+# Graphics support
+#
+CONFIG_DRM_GEM_CMA_HELPER=y
+CONFIG_DRM_KMS_CMA_HELPER=y
+
+#
+# I2C encoder or helper chips
+#
+# CONFIG_DRM_TILCDC is not set
+CONFIG_FB_SYS_FILLRECT=y
+CONFIG_FB_SYS_COPYAREA=y
+CONFIG_FB_SYS_IMAGEBLIT=y
+
 #
 # Frame buffer hardware drivers
 #
similarity index 68%
rename from kernel/config-armv7hl-omap
rename to kernel/config-armv7hl-default
index 0fc10e0cc7043b033cae345472553b1bc956ed4f..01998265f69e53933e46e9bbe3a231e75b5c541c 100644 (file)
@@ -1,16 +1,20 @@
+CONFIG_NO_IOPORT=y
 CONFIG_ARCH_HAS_CPUFREQ=y
+CONFIG_FIQ=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
@@ -31,14 +35,106 @@ CONFIG_MUTEX_SPIN_ON_OWNER=y
 #
 # System Type
 #
+CONFIG_ARCH_MULTIPLATFORM=y
 # CONFIG_ARCH_VERSATILE is not set
-CONFIG_ARCH_OMAP=y
 
 #
-# TI OMAP Common Features
-#
-# CONFIG_ARCH_OMAP1 is not set
-CONFIG_ARCH_OMAP2PLUS=y
+# 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
+
+#
+# Marvell SOC with device tree
+#
+CONFIG_MACH_ARMADA_370_XP=y
+CONFIG_MACH_ARMADA_370=y
+CONFIG_MACH_ARMADA_XP=y
+CONFIG_ARCH_BCM=y
+CONFIG_ARCH_HIGHBANK=y
+CONFIG_ARCH_MXC=y
+
+#
+# Freescale i.MX support
+#
+CONFIG_MXC_IRQ_PRIOR=y
+CONFIG_MXC_TZIC=y
+CONFIG_MXC_AVIC=y
+CONFIG_MXC_DEBUG_BOARD=y
+CONFIG_MXC_USE_EPIT=y
+CONFIG_ARCH_HAS_RNGA=y
+CONFIG_IRAM_ALLOC=y
+CONFIG_ARCH_MXC_IOMUX_V3=y
+CONFIG_ARCH_MX5=y
+CONFIG_ARCH_MX51=y
+CONFIG_ARCH_MX53=y
+CONFIG_SOC_IMX31=y
+CONFIG_SOC_IMX35=y
+CONFIG_SOC_IMX5=y
+CONFIG_SOC_IMX51=y
+
+#
+# MX31 platforms:
+#
+CONFIG_MACH_MX31ADS=y
+CONFIG_MACH_MX31LILLY=y
+CONFIG_MACH_MX31LITE=y
+CONFIG_MACH_PCM037=y
+CONFIG_MACH_PCM037_EET=y
+CONFIG_MACH_MX31_3DS=y
+# CONFIG_MACH_MX31_3DS_MXC_NAND_USE_BBT is not set
+CONFIG_MACH_MX31MOBOARD=y
+CONFIG_MACH_QONG=y
+CONFIG_MACH_ARMADILLO5X0=y
+CONFIG_MACH_KZM_ARM11_01=y
+CONFIG_MACH_BUG=y
+CONFIG_MACH_IMX31_DT=y
+
+#
+# MX35 platforms:
+#
+CONFIG_MACH_PCM043=y
+CONFIG_MACH_MX35_3DS=y
+CONFIG_MACH_EUKREA_CPUIMX35SD=y
+CONFIG_MACH_EUKREA_MBIMXSD35_BASEBOARD=y
+CONFIG_MACH_VPR200=y
+
+#
+# i.MX51 machines:
+#
+CONFIG_MACH_IMX51_DT=y
+CONFIG_MACH_MX51_BABBAGE=y
+CONFIG_MACH_EUKREA_CPUIMX51SD=y
+CONFIG_MACH_EUKREA_MBIMXSD51_BASEBOARD=y
+
+#
+# Device tree only
+#
+CONFIG_SOC_IMX53=y
+CONFIG_SOC_IMX6Q=y
+CONFIG_IMX_HAVE_PLATFORM_FEC=y
+CONFIG_IMX_HAVE_PLATFORM_FLEXCAN=y
+CONFIG_IMX_HAVE_PLATFORM_FSL_USB2_UDC=y
+CONFIG_IMX_HAVE_PLATFORM_GPIO_KEYS=y
+CONFIG_IMX_HAVE_PLATFORM_IMX2_WDT=y
+CONFIG_IMX_HAVE_PLATFORM_IMX_FB=y
+CONFIG_IMX_HAVE_PLATFORM_IMX_I2C=y
+CONFIG_IMX_HAVE_PLATFORM_IMX_KEYPAD=y
+CONFIG_IMX_HAVE_PLATFORM_IMX_SSI=y
+CONFIG_IMX_HAVE_PLATFORM_IMX_UART=y
+CONFIG_IMX_HAVE_PLATFORM_IPU_CORE=y
+CONFIG_IMX_HAVE_PLATFORM_MXC_EHCI=y
+CONFIG_IMX_HAVE_PLATFORM_MXC_MMC=y
+CONFIG_IMX_HAVE_PLATFORM_MXC_NAND=y
+CONFIG_IMX_HAVE_PLATFORM_MXC_RNGA=y
+CONFIG_IMX_HAVE_PLATFORM_MXC_RTC=y
+CONFIG_IMX_HAVE_PLATFORM_MXC_W1=y
+CONFIG_IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX=y
+CONFIG_IMX_HAVE_PLATFORM_SPI_IMX=y
+CONFIG_IMX_HAVE_PLATFORM_AHCI=y
 
 #
 # OMAP Feature Selections
@@ -49,14 +145,13 @@ CONFIG_OMAP_RESET_CLOCKS=y
 CONFIG_OMAP_MUX=y
 # CONFIG_OMAP_MUX_DEBUG is not set
 CONFIG_OMAP_MUX_WARNINGS=y
-CONFIG_OMAP_MBOX_FWK=m
-CONFIG_OMAP_MBOX_KFIFO_SIZE=256
 CONFIG_OMAP_32K_TIMER=y
 # CONFIG_OMAP3_L2_AUX_SECURE_SAVE_RESTORE is not set
-CONFIG_OMAP_32K_TIMER_HZ=128
 CONFIG_OMAP_DM_TIMER=y
 CONFIG_OMAP_PM_NOOP=y
 CONFIG_MACH_OMAP_GENERIC=y
+CONFIG_ARCH_OMAP=y
+CONFIG_ARCH_OMAP2PLUS=y
 
 #
 # TI OMAP2/3/4 Specific Features
@@ -109,56 +204,72 @@ CONFIG_MACH_OMAP_4430SDP=y
 CONFIG_MACH_OMAP4_PANDA=y
 CONFIG_OMAP3_EMU=y
 # CONFIG_OMAP3_SDRC_AC_TIMING is not set
-CONFIG_OMAP4_ERRATA_I688=y
+CONFIG_ARCH_PICOXCELL=y
+CONFIG_ARCH_SOCFPGA=y
+CONFIG_ARCH_SUNXI=y
+CONFIG_ARCH_VEXPRESS=y
+
+#
+# Versatile Express platform type
+#
+CONFIG_ARCH_VEXPRESS_CORTEX_A5_A9_ERRATA=y
+CONFIG_ARCH_VEXPRESS_CA9X4=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
 
 #
 # Processor Type
 #
+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_LPAE is not set
 # CONFIG_ARM_THUMBEE is not set
 CONFIG_ARM_VIRT_EXT=y
 CONFIG_SWP_EMULATE=y
 # CONFIG_CPU_BPREDICT_DISABLE is not set
+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_CACHE_PL310=y
 CONFIG_ARM_L1_CACHE_SHIFT_6=y
 CONFIG_ARM_L1_CACHE_SHIFT=6
 CONFIG_ARM_DMA_MEM_BUFFERABLE=y
-CONFIG_ARCH_HAS_BARRIERS=y
+CONFIG_ARM_ERRATA_326103=y
+CONFIG_ARM_ERRATA_411920=y
 CONFIG_ARM_ERRATA_430973=y
-# CONFIG_ARM_ERRATA_458693 is not set
-# CONFIG_ARM_ERRATA_460075 is not set
-# CONFIG_ARM_ERRATA_742230 is not set
-# CONFIG_ARM_ERRATA_742231 is not set
 CONFIG_PL310_ERRATA_588369=y
 CONFIG_ARM_ERRATA_720789=y
 CONFIG_PL310_ERRATA_727915=y
-# CONFIG_ARM_ERRATA_743622 is not set
-# CONFIG_ARM_ERRATA_751472 is not set
-# CONFIG_PL310_ERRATA_753970 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_754322=y
+CONFIG_ARM_ERRATA_754327=y
+CONFIG_ARM_ERRATA_764369=y
 CONFIG_PL310_ERRATA_769419=y
 CONFIG_ARM_ERRATA_775420=y
 CONFIG_ARM_ERRATA_798181=y
-CONFIG_ARM_GIC=y
 
 #
 # Bus support
@@ -174,19 +285,14 @@ CONFIG_SMP_ON_UP=y
 CONFIG_ARM_CPU_TOPOLOGY=y
 CONFIG_SCHED_MC=y
 CONFIG_SCHED_SMT=y
-CONFIG_ARM_ARCH_TIMER=y
 CONFIG_NR_CPUS=8
 CONFIG_HOTPLUG_CPU=y
+# CONFIG_ARM_PSCI is not set
 CONFIG_LOCAL_TIMERS=y
 CONFIG_ARCH_NR_GPIO=512
-CONFIG_HZ=128
-# CONFIG_THUMB2_KERNEL is not set
 CONFIG_ARCH_HAS_HOLES_MEMORYMODEL=y
 CONFIG_SPLIT_PTLOCK_CPUS=4
-CONFIG_MMU_NOTIFIER=y
 CONFIG_FORCE_MAX_ZONEORDER=12
-CONFIG_XEN_DOM0=y
-CONFIG_XEN=y
 
 #
 # CPU Frequency scaling
@@ -222,8 +328,8 @@ CONFIG_XPS=y
 #
 # Generic Driver Options
 #
-CONFIG_SYS_HYPERVISOR=y
 CONFIG_REGMAP_I2C=y
+CONFIG_REGMAP_MMIO=y
 
 #
 # Bus devices
@@ -309,6 +415,8 @@ CONFIG_MTD_NAND_IDS=y
 # CONFIG_MTD_NAND_NANDSIM is not set
 CONFIG_MTD_NAND_PLATFORM=y
 # CONFIG_MTD_ALAUDA is not set
+CONFIG_MTD_NAND_ORION=m
+CONFIG_MTD_NAND_MXC=m
 CONFIG_MTD_ONENAND=y
 # CONFIG_MTD_ONENAND_VERIFY_WRITE is not set
 # CONFIG_MTD_ONENAND_GENERIC is not set
@@ -332,8 +440,6 @@ CONFIG_OF_MTD=y
 CONFIG_BLK_DEV_RAM_SIZE=65536
 CONFIG_MG_DISK=m
 CONFIG_MG_DISK_RES=0
-CONFIG_XEN_BLKDEV_FRONTEND=m
-CONFIG_XEN_BLKDEV_BACKEND=m
 
 #
 # Altera FPGA firmware download module
@@ -341,24 +447,28 @@ CONFIG_XEN_BLKDEV_BACKEND=m
 # CONFIG_ALTERA_STAPL is not set
 
 #
-# Generic fallback / legacy drivers
+# PATA SFF controllers with BMDMA
+#
+CONFIG_PATA_IMX=m
+
+#
+# PIO-only SFF controllers
 #
-# CONFIG_MULTICORE_RAID456 is not set
+CONFIG_PATA_PLATFORM=m
+CONFIG_PATA_OF_PLATFORM=m
 
 #
 # Distributed Switch Architecture drivers
 #
+CONFIG_NET_VENDOR_FREESCALE=y
+CONFIG_FEC=m
+CONFIG_MV643XX_ETH=m
+CONFIG_MVNETA=m
 # CONFIG_TI_DAVINCI_EMAC is not set
 CONFIG_TI_DAVINCI_MDIO=m
 CONFIG_TI_DAVINCI_CPDMA=m
 # CONFIG_TI_CPSW is not set
 
-#
-# Enable WiMAX (Networking options) to see the WiMAX drivers
-#
-CONFIG_XEN_NETDEV_FRONTEND=m
-CONFIG_XEN_NETDEV_BACKEND=m
-
 #
 # Input device support
 #
@@ -367,13 +477,13 @@ CONFIG_INPUT_FF_MEMLESS=y
 #
 # Input Device Drivers
 #
+CONFIG_KEYBOARD_IMX=m
 # CONFIG_KEYBOARD_OMAP4 is not set
 CONFIG_KEYBOARD_TWL4030=m
 CONFIG_MOUSE_GPIO=m
 CONFIG_INPUT_TWL4030_PWRBUTTON=y
 CONFIG_INPUT_TWL4030_VIBRA=y
 CONFIG_INPUT_TWL6040_VIBRA=y
-CONFIG_INPUT_XEN_KBDDEV_FRONTEND=m
 
 #
 # Serial drivers
@@ -384,16 +494,20 @@ CONFIG_SERIAL_8250_DETECT_IRQ=y
 # Non-8250 serial port support
 #
 # CONFIG_SERIAL_AMBA_PL010 is not set
+CONFIG_SERIAL_IMX=y
+CONFIG_SERIAL_IMX_CONSOLE=y
+CONFIG_SERIAL_VT8500=y
+CONFIG_SERIAL_VT8500_CONSOLE=y
 CONFIG_SERIAL_OMAP=y
 CONFIG_SERIAL_OMAP_CONSOLE=y
-CONFIG_HVC_IRQ=y
-CONFIG_HVC_XEN=y
-CONFIG_HVC_XEN_FRONTEND=y
+CONFIG_HW_RANDOM_MXC_RNGA=m
 CONFIG_I2C=y
 
 #
 # I2C system bus drivers (mostly embedded / system-on-chip)
 #
+CONFIG_I2C_IMX=m
+CONFIG_I2C_MV64XXX=m
 # CONFIG_I2C_NOMADIK is not set
 CONFIG_I2C_OMAP=y
 
@@ -407,16 +521,36 @@ CONFIG_PINCTRL=y
 #
 CONFIG_PINMUX=y
 CONFIG_PINCONF=y
+CONFIG_GENERIC_PINCONF=y
 # CONFIG_DEBUG_PINCTRL is not set
+CONFIG_PINCTRL_IMX=y
+CONFIG_PINCTRL_IMX35=y
+CONFIG_PINCTRL_IMX51=y
+CONFIG_PINCTRL_IMX53=y
+CONFIG_PINCTRL_IMX6Q=y
 # CONFIG_PINCTRL_SINGLE is not set
+CONFIG_PINCTRL_SUNXI=y
 CONFIG_PINCTRL_SAMSUNG=y
 CONFIG_PINCTRL_EXYNOS=y
 CONFIG_PINCTRL_EXYNOS5440=y
+CONFIG_PINCTRL_MVEBU=y
+CONFIG_PINCTRL_ARMADA_370=y
+CONFIG_PINCTRL_ARMADA_XP=y
 CONFIG_ARCH_REQUIRE_GPIOLIB=y
+CONFIG_GPIO_GENERIC=y
+
+#
+# Memory mapped GPIO drivers:
+#
+CONFIG_GPIO_MVEBU=y
+CONFIG_GPIO_MXC=y
+CONFIG_GPIO_PL061=y
+CONFIG_GPIO_VT8500=y
 
 #
 # I2C GPIO expanders:
 #
+CONFIG_GPIO_MC9S08DZ60=y
 # CONFIG_GPIO_SX150X is not set
 CONFIG_GPIO_TWL4030=y
 CONFIG_GPIO_TWL6040=m
@@ -424,6 +558,7 @@ CONFIG_GPIO_TWL6040=m
 #
 # 1-wire Bus Masters
 #
+CONFIG_W1_MASTER_MXC=m
 # CONFIG_HDQ_MASTER_OMAP is not set
 
 #
@@ -431,6 +566,12 @@ CONFIG_GPIO_TWL6040=m
 #
 # CONFIG_CHARGER_TWL4030 is not set
 # CONFIG_CHARGER_MANAGER is not set
+CONFIG_POWER_RESET_QNAP=y
+
+#
+# Native drivers
+#
+CONFIG_SENSORS_VEXPRESS=m
 
 #
 # Watchdog Device Drivers
@@ -438,7 +579,7 @@ CONFIG_GPIO_TWL6040=m
 # CONFIG_MPCORE_WATCHDOG is not set
 CONFIG_OMAP_WATCHDOG=y
 # CONFIG_TWL4030_WATCHDOG is not set
-CONFIG_XEN_WDT=m
+CONFIG_IMX2_WDT=m
 
 #
 # Multifunction device drivers
@@ -480,8 +621,10 @@ CONFIG_MFD_OMAP_USB_HOST=y
 CONFIG_MFD_TPS65090=y
 # CONFIG_MFD_AAT2870_CORE is not set
 # CONFIG_MFD_RC5T583 is not set
+CONFIG_MFD_SYSCON=y
 # CONFIG_MFD_PALMAS is not set
 # CONFIG_MFD_AS3711 is not set
+CONFIG_VEXPRESS_CONFIG=y
 CONFIG_REGULATOR=y
 # CONFIG_REGULATOR_DEBUG is not set
 # CONFIG_REGULATOR_DUMMY is not set
@@ -491,6 +634,7 @@ CONFIG_REGULATOR_FIXED_VOLTAGE=y
 CONFIG_REGULATOR_GPIO=y
 # CONFIG_REGULATOR_AD5398 is not set
 # CONFIG_REGULATOR_FAN53555 is not set
+CONFIG_REGULATOR_ANATOP=m
 # CONFIG_REGULATOR_ISL6271A is not set
 # CONFIG_REGULATOR_MAX1586 is not set
 # CONFIG_REGULATOR_MAX8649 is not set
@@ -500,22 +644,20 @@ CONFIG_REGULATOR_GPIO=y
 # CONFIG_REGULATOR_LP3971 is not set
 # CONFIG_REGULATOR_LP3972 is not set
 CONFIG_REGULATOR_LP872X=y
+CONFIG_REGULATOR_LP8755=m
 # CONFIG_REGULATOR_TPS51632 is not set
 CONFIG_REGULATOR_TPS62360=m
 # CONFIG_REGULATOR_TPS65023 is not set
 # CONFIG_REGULATOR_TPS6507X is not set
 CONFIG_REGULATOR_TPS65090=m
 CONFIG_REGULATOR_TWL4030=y
+CONFIG_REGULATOR_VEXPRESS=m
 
 #
 # Multimedia core support
 #
 CONFIG_VIDEO_V4L2=y
-
-#
-# Media drivers
-#
-# CONFIG_IR_RX51 is not set
+# CONFIG_TTPCI_EEPROM is not set
 
 #
 # Webcam, TV (analog/digital) USB devices
@@ -523,6 +665,9 @@ CONFIG_VIDEO_V4L2=y
 # CONFIG_VIDEO_VPFE_CAPTURE is not set
 CONFIG_VIDEO_OMAP2_VOUT_VRFB=y
 CONFIG_VIDEO_OMAP2_VOUT=m
+CONFIG_MX3_VIDEO=y
+CONFIG_VIDEO_MX3=m
+CONFIG_VIDEO_CODA=m
 
 #
 # Media ancillary drivers (tuners, sensors, i2c, frontends)
@@ -532,15 +677,24 @@ CONFIG_VIDEO_IR_I2C=y
 #
 # I2C encoder or helper chips
 #
+# CONFIG_DRM_EXYNOS is not set
+CONFIG_DRM_OMAP=m
+CONFIG_DRM_OMAP_NUM_CRTCS=1
 # CONFIG_VGASTATE is not set
 # CONFIG_FB_DDC is not set
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
 # CONFIG_FB_SVGALIB is not set
 # CONFIG_FB_BACKLIGHT is not set
 
 #
 # Frame buffer hardware drivers
 #
-CONFIG_XEN_FBDEV_FRONTEND=m
+CONFIG_FB_IMX=m
+# CONFIG_FB_VT8500 is not set
+# CONFIG_FB_WM8505 is not set
+CONFIG_FB_MX3=y
 CONFIG_OMAP2_VRFB=y
 CONFIG_OMAP2_DSS=y
 # CONFIG_OMAP2_DSS_DEBUG is not set
@@ -573,7 +727,23 @@ CONFIG_PANEL_SHARP_LS037V7DW01=y
 # CONFIG_FB_SSD1307 is not set
 # CONFIG_SND_OPL3_LIB_SEQ is not set
 # CONFIG_SND_EMU10K1_SEQ is not set
+CONFIG_SND_SOC_AC97_BUS=y
+CONFIG_SND_SOC_DMAENGINE_PCM=y
+CONFIG_SND_SOC_FSL_SSI=m
+CONFIG_SND_SOC_FSL_UTILS=m
+CONFIG_SND_IMX_SOC=m
+CONFIG_SND_SOC_IMX_SSI=m
+CONFIG_SND_SOC_IMX_PCM=m
+CONFIG_SND_SOC_IMX_PCM_FIQ=y
+CONFIG_SND_SOC_IMX_PCM_DMA=y
+CONFIG_SND_SOC_IMX_AUDMUX=m
+CONFIG_SND_SOC_PHYCORE_AC97=m
+CONFIG_SND_SOC_EUKREA_TLV320=m
+CONFIG_SND_SOC_IMX_SGTL5000=m
 # CONFIG_SND_OMAP_SOC is not set
+CONFIG_SND_SOC_SGTL5000=m
+CONFIG_SND_SOC_TLV320AIC23=m
+CONFIG_SND_SOC_WM9712=m
 
 #
 # I2C HID support
@@ -583,8 +753,12 @@ CONFIG_PANEL_SHARP_LS037V7DW01=y
 #
 # USB Host Controller Drivers
 #
+CONFIG_USB_EHCI_MXC=m
 CONFIG_USB_EHCI_HCD_OMAP=y
 CONFIG_USB_OHCI_HCD_OMAP3=y
+CONFIG_USB_UHCI_SUPPORT_NON_PCI_HC=y
+CONFIG_USB_UHCI_PLATFORM=y
+CONFIG_USB_IMX21_HCD=m
 
 #
 # USB Physical Layer drivers
@@ -595,6 +769,7 @@ CONFIG_OMAP_USB2=m
 # OTG and related infrastructure
 #
 CONFIG_USB_GPIO_VBUS=y
+CONFIG_USB_MXS_PHY=m
 CONFIG_MMC=y
 
 #
@@ -606,8 +781,18 @@ CONFIG_MMC_BLOCK=y
 # MMC/SD/SDIO Host Controller Drivers
 #
 CONFIG_MMC_SDHCI=y
+CONFIG_MMC_SDHCI_IO_ACCESSORS=y
+CONFIG_MMC_SDHCI_ESDHC_IMX=m
 CONFIG_MMC_OMAP=y
 CONFIG_MMC_OMAP_HS=y
+CONFIG_MMC_MXC=m
+CONFIG_MMC_MVSDIO=m
+CONFIG_MMC_WMT=m
+
+#
+# MemoryStick Host Controller Drivers
+#
+CONFIG_LEDS_GPIO_REGISTER=y
 
 #
 # LED drivers
@@ -628,58 +813,66 @@ CONFIG_LEDS_TRIGGER_HEARTBEAT=y
 #
 # on-CPU RTC drivers
 #
+CONFIG_RTC_DRV_IMXDI=m
 # CONFIG_RTC_DRV_OMAP is not set
+CONFIG_RTC_DRV_VT8500=m
+CONFIG_RTC_DRV_MV=m
+CONFIG_RTC_DRV_MXC=m
 
 #
 # DMA Devices
 #
+CONFIG_ASYNC_TX_ENABLE_CHANNEL_SWITCH=y
+CONFIG_MV_XOR=y
+CONFIG_MX3_IPU=y
+CONFIG_MX3_IPU_IRQS=4
+CONFIG_IMX_SDMA=m
+CONFIG_IMX_DMA=m
+# CONFIG_MXS_DMA is not set
 CONFIG_DMA_OMAP=y
 CONFIG_DMA_VIRTUAL_CHANNELS=y
 
-#
-# Xen driver support
-#
-CONFIG_XEN_DEV_EVTCHN=m
-CONFIG_XEN_BACKEND=y
-CONFIG_XENFS=m
-CONFIG_XEN_COMPAT_XENFS=y
-CONFIG_XEN_SYS_HYPERVISOR=y
-CONFIG_XEN_XENBUS_FRONTEND=y
-CONFIG_XEN_GNTDEV=m
-CONFIG_XEN_GRANT_DEV_ALLOC=m
-CONFIG_XEN_PRIVCMD=m
-# CONFIG_TIDSPBRIDGE is not set
-
-#
-# Speakup console speech
-#
-CONFIG_DRM_OMAP=m
-CONFIG_DRM_OMAP_NUM_CRTCS=1
-
 #
 # Android
 #
 # CONFIG_OMAP_BANDGAP is not set
+# CONFIG_DRM_IMX is not set
 CONFIG_COMMON_CLK=y
 
 #
 # Common Clock Framework
 #
 # CONFIG_COMMON_CLK_DEBUG is not set
+CONFIG_COMMON_CLK_VERSATILE=y
 # CONFIG_CLK_TWL6040 is not set
+CONFIG_MVEBU_CLK_CORE=y
+CONFIG_MVEBU_CLK_CPU=y
+CONFIG_MVEBU_CLK_GATING=y
 CONFIG_HWSPINLOCK=m
 
 #
 # Hardware Spinlock drivers
 #
 CONFIG_HWSPINLOCK_OMAP=m
+CONFIG_CLKSRC_OF=y
+CONFIG_DW_APB_TIMER=y
+CONFIG_DW_APB_TIMER_OF=y
+CONFIG_ARMADA_370_XP_TIMER=y
+CONFIG_SUNXI_TIMER=y
+CONFIG_VT8500_TIMER=y
+CONFIG_ARM_ARCH_TIMER=y
 # CONFIG_OMAP_IOMMU is not set
 
 #
-# Rpmsg drivers (EXPERIMENTAL)
+# Rpmsg drivers
 #
 CONFIG_TI_EMIF=m
+
+#
+# Magnetometer sensors
+#
 # CONFIG_PWM is not set
+CONFIG_ARM_GIC=y
 
 #
 # File systems
@@ -692,11 +885,12 @@ CONFIG_DCACHE_WORD_ACCESS=y
 # CONFIG_JFFS2_FS is not set
 
 #
-# Kernel hacking
+# RCU Debugging
 #
 CONFIG_RCU_CPU_STALL_TIMEOUT=60
 # CONFIG_RCU_CPU_STALL_INFO is not set
 # CONFIG_DEBUG_PER_CPU_MAPS is not set
+CONFIG_DEBUG_IMX_UART_PORT=1
 CONFIG_OC_ETM=y
 # CONFIG_PID_IN_CONTEXTIDR is not set
 
@@ -708,11 +902,14 @@ CONFIG_PAX_PAGEEXEC=y
 CONFIG_PAX_MPROTECT=y
 # CONFIG_PAX_MPROTECT_COMPAT is not set
 CONFIG_PAX_ELFRELOCS=y
+CONFIG_PAX_KERNEXEC=y
 
 #
 # Miscellaneous hardening features
 #
+CONFIG_PAX_MEMORY_UDEREF=y
 CONFIG_PAX_REFCOUNT=y
+CONFIG_PAX_CONSTIFY_PLUGIN=y
 
 #
 # Kernel Auditing
@@ -728,11 +925,16 @@ CONFIG_CRYPTO_PCRYPT=m
 #
 # Random Number Generation
 #
+CONFIG_CRYPTO_DEV_MV_CESA=m
 CONFIG_CRYPTO_DEV_OMAP_SHAM=m
 CONFIG_CRYPTO_DEV_OMAP_AES=m
+CONFIG_CRYPTO_DEV_PICOXCELL=m
 
 #
 # Library routines
 #
+CONFIG_RATIONAL=y
+CONFIG_STMP_DEVICE=y
+CONFIG_GENERIC_ALLOCATOR=y
 CONFIG_CPU_RMAP=y
 CONFIG_DDR=y
index ccbfe8947ccbcdefd7c1f51d8b2106c1bbaeb87f..fa240606091a02a44538c9694d6e481dec483036 100644 (file)
@@ -1,39 +1,10 @@
-CONFIG_NO_IOPORT=y
-CONFIG_ARCH_HAS_CPUFREQ=y
 CONFIG_NEED_MACH_GPIO_H=y
 CONFIG_NEED_MACH_MEMORY_H=y
 
-#
-# IRQ subsystem
-#
-CONFIG_GENERIC_IRQ_CHIP=y
-CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
-
-#
-# RCU Subsystem
-#
-CONFIG_TREE_RCU=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
-
-#
-# Kernel Performance Events And Counters
-#
-CONFIG_USE_GENERIC_SMP_HELPERS=y
-
-#
-# IO Schedulers
-#
-CONFIG_PADATA=y
-CONFIG_MUTEX_SPIN_ON_OWNER=y
-
 #
 # System Type
 #
-# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_MULTIPLATFORM is not set
 CONFIG_ARCH_EXYNOS=y
 CONFIG_PLAT_SAMSUNG=y
 CONFIG_PLAT_S5P=y
@@ -100,7 +71,6 @@ CONFIG_EXYNOS4_MCT=y
 CONFIG_EXYNOS_DEV_DMA=y
 CONFIG_EXYNOS_DEV_DRM=y
 CONFIG_EXYNOS4_SETUP_FIMD0=y
-CONFIG_EXYNOS_DEV_SYSMMU=y
 CONFIG_EXYNOS4_SETUP_I2C1=y
 CONFIG_EXYNOS4_SETUP_I2C3=y
 CONFIG_EXYNOS4_SETUP_I2C7=y
@@ -140,281 +110,82 @@ CONFIG_MACH_SMDK4412=y
 # CONFIG_EXYNOS4_SDHCI_CH0_8BIT is not set
 # CONFIG_EXYNOS4_SDHCI_CH2_8BIT 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_LPAE is not set
-# CONFIG_ARM_THUMBEE is not set
-CONFIG_ARM_VIRT_EXT=y
-CONFIG_SWP_EMULATE=y
-# CONFIG_CPU_BPREDICT_DISABLE is not set
-CONFIG_OUTER_CACHE=y
-CONFIG_OUTER_CACHE_SYNC=y
-CONFIG_MIGHT_HAVE_CACHE_L2X0=y
-CONFIG_CACHE_L2X0=y
 CONFIG_CACHE_PL310=y
-CONFIG_ARM_L1_CACHE_SHIFT_6=y
-CONFIG_ARM_L1_CACHE_SHIFT=6
-CONFIG_ARM_DMA_MEM_BUFFERABLE=y
-CONFIG_ARM_ERRATA_430973=y
 CONFIG_ARM_ERRATA_458693=y
 CONFIG_ARM_ERRATA_460075=y
 CONFIG_ARM_ERRATA_742230=y
 CONFIG_ARM_ERRATA_742231=y
-CONFIG_PL310_ERRATA_588369=y
-CONFIG_ARM_ERRATA_720789=y
-CONFIG_PL310_ERRATA_727915=y
 CONFIG_ARM_ERRATA_743622=y
 CONFIG_ARM_ERRATA_751472=y
 CONFIG_PL310_ERRATA_753970=y
-CONFIG_ARM_ERRATA_754322=y
 CONFIG_ARM_ERRATA_754327=y
-CONFIG_ARM_ERRATA_764369=y
-CONFIG_PL310_ERRATA_769419=y
-CONFIG_ARM_ERRATA_775420=y
-CONFIG_ARM_ERRATA_798181=y
-CONFIG_ARM_GIC=y
-CONFIG_GIC_NON_BANKED=y
-
-#
-# Bus support
-#
-# CONFIG_PCI_SYSCALL is not set
-# 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_ARM_ARCH_TIMER is not set
-CONFIG_NR_CPUS=8
-CONFIG_HOTPLUG_CPU=y
-CONFIG_LOCAL_TIMERS=y
+CONFIG_ARCH_NR_GPIO=0
 CONFIG_HZ=200
 # CONFIG_THUMB2_KERNEL is not set
-CONFIG_ARCH_HAS_HOLES_MEMORYMODEL=y
 CONFIG_ARCH_SPARSEMEM_ENABLE=y
 CONFIG_ARCH_SPARSEMEM_DEFAULT=y
 CONFIG_ARCH_SELECT_MEMORY_MODEL=y
+CONFIG_SELECT_MEMORY_MODEL=y
 CONFIG_SPARSEMEM_MANUAL=y
 CONFIG_SPARSEMEM=y
 CONFIG_SPARSEMEM_EXTREME=y
-CONFIG_SPLIT_PTLOCK_CPUS=4
+CONFIG_FORCE_MAX_ZONEORDER=11
+# CONFIG_UACCESS_WITH_MEMCPY is not set
 
 #
 # Boot options
 #
 # CONFIG_USE_OF is not set
 CONFIG_CMDLINE="console=ttySAC1,115200 root=/dev/mmcblk0p2 rootwait"
+# CONFIG_XIP_KERNEL 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
-
-#
-# Bluetooth device drivers
-#
-# CONFIG_RFKILL_REGULATOR is not set
-
-#
-# Generic Driver Options
-#
-CONFIG_REGMAP_I2C=y
-
-#
-# Bus devices
-#
-CONFIG_MTD=y
-CONFIG_MTD_TESTS=m
-# CONFIG_MTD_REDBOOT_PARTS is not set
-CONFIG_MTD_CMDLINE_PARTS=y
-# CONFIG_MTD_AFS_PARTS is not set
-# CONFIG_MTD_AR7_PARTS is not set
-
-#
-# User Modules And Translation Layers
-#
-CONFIG_MTD_CHAR=y
-CONFIG_MTD_BLKDEVS=y
-CONFIG_MTD_BLOCK=y
-# CONFIG_FTL is not set
-# CONFIG_NFTL is not set
-# CONFIG_INFTL is not set
-# CONFIG_RFD_FTL is not set
-# CONFIG_SSFDC is not set
-CONFIG_SM_FTL=m
-# CONFIG_MTD_OOPS is not set
-# CONFIG_MTD_SWAP is not set
-
-#
-# RAM/ROM/Flash chip drivers
-#
-# CONFIG_MTD_CFI is not set
-# CONFIG_MTD_JEDECPROBE is not set
-CONFIG_MTD_MAP_BANK_WIDTH_1=y
-CONFIG_MTD_MAP_BANK_WIDTH_2=y
-CONFIG_MTD_MAP_BANK_WIDTH_4=y
-# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
-# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
-# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
-CONFIG_MTD_CFI_I1=y
-CONFIG_MTD_CFI_I2=y
-# CONFIG_MTD_CFI_I4 is not set
-# CONFIG_MTD_CFI_I8 is not set
-CONFIG_MTD_RAM=m
-# CONFIG_MTD_ROM is not set
-# CONFIG_MTD_ABSENT is not set
-
-#
-# Mapping drivers for chip access
-#
-# CONFIG_MTD_COMPLEX_MAPPINGS is not set
-CONFIG_MTD_PLATRAM=m
-
-#
-# Self-contained MTD device drivers
-#
-CONFIG_MTD_SLRAM=m
-CONFIG_MTD_PHRAM=m
-# CONFIG_MTD_MTDRAM is not set
-# CONFIG_MTD_BLOCK2MTD is not set
+# CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED is not set
 
 #
 # Disk-On-Chip Device Drivers
 #
-# CONFIG_MTD_DOC2000 is not set
-# CONFIG_MTD_DOC2001 is not set
-# CONFIG_MTD_DOC2001PLUS is not set
-# CONFIG_MTD_DOCG3 is not set
-CONFIG_MTD_NAND_ECC=y
-# CONFIG_MTD_NAND_ECC_SMC is not set
-CONFIG_MTD_NAND=y
-# CONFIG_MTD_NAND_ECC_BCH is not set
-# CONFIG_MTD_SM_COMMON is not set
-# CONFIG_MTD_NAND_MUSEUM_IDS is not set
-# CONFIG_MTD_NAND_DENALI is not set
-# CONFIG_MTD_NAND_GPIO is not set
-CONFIG_MTD_NAND_IDS=y
-# CONFIG_MTD_NAND_DISKONCHIP is not set
-# CONFIG_MTD_NAND_DOCG4 is not set
-# CONFIG_MTD_NAND_NANDSIM is not set
-CONFIG_MTD_NAND_PLATFORM=y
-# CONFIG_MTD_ALAUDA is not set
-CONFIG_MTD_ONENAND=y
-# CONFIG_MTD_ONENAND_VERIFY_WRITE is not set
-# CONFIG_MTD_ONENAND_GENERIC is not set
 # CONFIG_MTD_ONENAND_SAMSUNG is not set
-# CONFIG_MTD_ONENAND_OTP is not set
-CONFIG_MTD_ONENAND_2X_PROGRAM=y
-CONFIG_MTD_ONENAND_SIM=m
-
-#
-# LPDDR flash memory drivers
-#
-# CONFIG_MTD_LPDDR is not set
-# CONFIG_MTD_UBI is not set
-# CONFIG_PARPORT is not set
-CONFIG_BLK_DEV_RAM_SIZE=65536
-CONFIG_MG_DISK=m
-CONFIG_MG_DISK_RES=0
-
-#
-# Generic fallback / legacy drivers
-#
-# CONFIG_MULTICORE_RAID456 is not set
-
-#
-# Input device support
-#
-CONFIG_INPUT_FF_MEMLESS=y
 
 #
 # Input Device Drivers
 #
-CONFIG_KEYBOARD_TWL4030=m
-CONFIG_MOUSE_GPIO=m
-CONFIG_INPUT_TWL4030_PWRBUTTON=y
-CONFIG_INPUT_TWL4030_VIBRA=y
-CONFIG_INPUT_TWL6040_VIBRA=y
+CONFIG_INPUT_PWM_BEEPER=m
 CONFIG_INPUT_DA9055_ONKEY=m
 
-#
-# Serial drivers
-#
-CONFIG_SERIAL_8250_DETECT_IRQ=y
-
 #
 # Non-8250 serial port support
 #
-# CONFIG_SERIAL_AMBA_PL010 is not set
 CONFIG_SERIAL_SAMSUNG=y
 CONFIG_SERIAL_SAMSUNG_UARTS_4=y
 CONFIG_SERIAL_SAMSUNG_UARTS=4
 CONFIG_SERIAL_SAMSUNG_DEBUG=y
 CONFIG_SERIAL_SAMSUNG_CONSOLE=y
-CONFIG_I2C=y
 
 #
 # I2C system bus drivers (mostly embedded / system-on-chip)
 #
-# CONFIG_I2C_NOMADIK is not set
 # CONFIG_I2C_S3C2410 is not set
 
 #
 # Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks.
 #
-CONFIG_ARCH_REQUIRE_GPIOLIB=y
 CONFIG_GPIO_DA9055=m
 
-#
-# I2C GPIO expanders:
-#
-# CONFIG_GPIO_SX150X is not set
-CONFIG_GPIO_TWL4030=y
-CONFIG_GPIO_TWL6040=m
-
 #
 # 1-wire Slaves
 #
-# CONFIG_CHARGER_TWL4030 is not set
-# CONFIG_CHARGER_MANAGER is not set
+# CONFIG_POWER_RESET_RESTART is not set
 
 #
 # Native drivers
@@ -426,81 +197,18 @@ CONFIG_SENSORS_DA9055=m
 #
 CONFIG_DA9055_WATCHDOG=m
 # CONFIG_S3C2410_WATCHDOG is not set
-# CONFIG_TWL4030_WATCHDOG is not set
 
 #
 # Multifunction device drivers
 #
-CONFIG_MFD_CORE=y
-# CONFIG_MFD_88PM860X is not set
-# CONFIG_MFD_88PM800 is not set
-# CONFIG_MFD_88PM805 is not set
-# CONFIG_HTC_I2CPLD is not set
-# CONFIG_MFD_TPS6586X is not set
-# CONFIG_MFD_TPS65910 is not set
-# CONFIG_MFD_TPS65912_I2C is not set
-# CONFIG_MFD_TPS80031 is not set
-CONFIG_TWL4030_CORE=y
-# CONFIG_TWL4030_MADC is not set
-CONFIG_TWL4030_POWER=y
-CONFIG_MFD_TWL4030_AUDIO=y
-CONFIG_TWL6040_CORE=y
-# CONFIG_MFD_STMPE is not set
-# CONFIG_MFD_TC3589X is not set
-CONFIG_MFD_SMSC=y
-# CONFIG_PMIC_DA903X is not set
-# CONFIG_MFD_DA9052_I2C is not set
 CONFIG_MFD_DA9055=y
-# CONFIG_PMIC_ADP5520 is not set
 CONFIG_MFD_LP8788=y
-# CONFIG_MFD_MAX77686 is not set
-# CONFIG_MFD_MAX77693 is not set
 CONFIG_MFD_MAX8907=m
-# CONFIG_MFD_MAX8925 is not set
-# CONFIG_MFD_MAX8997 is not set
-# CONFIG_MFD_MAX8998 is not set
-# CONFIG_MFD_SEC_CORE 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_MFD_TPS65090=y
-# CONFIG_MFD_AAT2870_CORE is not set
-# CONFIG_MFD_RC5T583 is not set
-# CONFIG_MFD_PALMAS is not set
-# CONFIG_MFD_AS3711 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
-CONFIG_REGULATOR_GPIO=y
-# CONFIG_REGULATOR_AD5398 is not set
 # CONFIG_REGULATOR_DA9055 is not set
 CONFIG_REGULATOR_FAN53555=m
-# CONFIG_REGULATOR_ISL6271A is not set
-# CONFIG_REGULATOR_MAX1586 is not set
-# CONFIG_REGULATOR_MAX8649 is not set
-# CONFIG_REGULATOR_MAX8660 is not set
 CONFIG_REGULATOR_MAX8907=m
-# CONFIG_REGULATOR_MAX8952 is not set
-# CONFIG_REGULATOR_MAX8973 is not set
-# CONFIG_REGULATOR_LP3971 is not set
-# CONFIG_REGULATOR_LP3972 is not set
-CONFIG_REGULATOR_LP872X=y
+# CONFIG_REGULATOR_LP8755 is not set
 CONFIG_REGULATOR_LP8788=y
-# CONFIG_REGULATOR_TPS51632 is not set
-CONFIG_REGULATOR_TPS62360=m
-# CONFIG_REGULATOR_TPS65023 is not set
-# CONFIG_REGULATOR_TPS6507X is not set
-CONFIG_REGULATOR_TPS65090=m
-CONFIG_REGULATOR_TWL4030=y
-
-#
-# Multimedia core support
-#
-CONFIG_VIDEO_V4L2=y
 
 #
 # Webcam, TV (analog/digital) USB devices
@@ -518,44 +226,20 @@ CONFIG_VIDEO_SAMSUNG_S5P_MIXER=m
 # CONFIG_VIDEO_SAMSUNG_S5P_JPEG is not set
 # CONFIG_VIDEO_SAMSUNG_S5P_MFC is not set
 
-#
-# Media ancillary drivers (tuners, sensors, i2c, frontends)
-#
-CONFIG_VIDEO_IR_I2C=y
-
-#
-# I2C encoder or helper chips
-#
-# CONFIG_DRM_EXYNOS is not set
-# CONFIG_VGASTATE is not set
-# CONFIG_FB_DDC is not set
-CONFIG_FB_CFB_FILLRECT=y
-CONFIG_FB_CFB_COPYAREA=y
-CONFIG_FB_CFB_IMAGEBLIT=y
-# CONFIG_FB_SVGALIB is not set
-# CONFIG_FB_BACKLIGHT is not set
-
 #
 # Frame buffer hardware drivers
 #
 CONFIG_FB_S3C=y
 # CONFIG_FB_S3C_DEBUG_REGWRITE is not set
-# CONFIG_LCD_PLATFORM is not set
 # CONFIG_BACKLIGHT_PWM is not set
-# CONFIG_BACKLIGHT_PANDORA is not set
+# CONFIG_BACKLIGHT_LP8788 is not set
 
 #
 # Console display driver support
 #
-# CONFIG_SND_OPL3_LIB_SEQ is not set
-# CONFIG_SND_EMU10K1_SEQ is not set
+# CONFIG_SND_ATMEL_SOC is not set
 # CONFIG_SND_SOC_SAMSUNG is not set
 
-#
-# I2C HID support
-#
-# CONFIG_USB_ARCH_HAS_XHCI is not set
-
 #
 # USB Host Controller Drivers
 #
@@ -563,40 +247,27 @@ CONFIG_USB_EHCI_S5P=y
 CONFIG_USB_OHCI_EXYNOS=y
 
 #
-# OTG and related infrastructure
-#
-CONFIG_USB_GPIO_VBUS=y
-CONFIG_MMC=y
-
-#
-# MMC/SD/SDIO Card Drivers
+# USB Physical Layer drivers
 #
-CONFIG_MMC_BLOCK=y
+# CONFIG_SAMSUNG_USBPHY is not set
 
 #
 # MMC/SD/SDIO Host Controller Drivers
 #
-CONFIG_MMC_SDHCI=y
 CONFIG_MMC_SDHCI_S3C=y
 CONFIG_MMC_SDHCI_S3C_DMA=y
 
 #
 # LED drivers
 #
-CONFIG_LEDS_GPIO=y
 CONFIG_LEDS_LP8788=m
-# CONFIG_LEDS_REGULATOR is not set
-
-#
-# LED Triggers
-#
-CONFIG_LEDS_TRIGGER_HEARTBEAT=y
+CONFIG_LEDS_PWM=m
 
 #
 # I2C RTC drivers
 #
+CONFIG_RTC_DRV_LP8788=m
 CONFIG_RTC_DRV_MAX8907=m
-# CONFIG_RTC_DRV_TWL4030 is not set
 
 #
 # Platform RTC drivers
@@ -609,40 +280,29 @@ CONFIG_RTC_DRV_DA9055=m
 # CONFIG_RTC_DRV_S3C is not set
 
 #
-# DMA Clients
+# Analog to digital converters
 #
-# CONFIG_VFIO is not set
+# CONFIG_LP8788_ADC is not set
 
 #
-# Hardware Spinlock drivers
-#
-CONFIG_IOMMU_API=y
-CONFIG_EXYNOS_IOMMU=y
-# CONFIG_EXYNOS_IOMMU_DEBUG is not set
-
-#
-# Rpmsg drivers (EXPERIMENTAL)
+# Magnetometer sensors
 #
+CONFIG_PWM=y
 CONFIG_PWM_SAMSUNG=y
 CONFIG_PWM_TWL=m
 CONFIG_PWM_TWL_LED=m
+CONFIG_GIC_NON_BANKED=y
 
 #
-# File systems
-#
-CONFIG_DCACHE_WORD_ACCESS=y
-
-#
-# Pseudo filesystems
+# Kernel hacking
 #
-# CONFIG_JFFS2_FS is not set
+# CONFIG_DEBUG_LOCK_ALLOC is not set
+# CONFIG_PROVE_LOCKING is not set
+# CONFIG_LOCK_STAT is not set
 
 #
-# Kernel hacking
+# RCU Debugging
 #
-CONFIG_RCU_CPU_STALL_TIMEOUT=60
-# CONFIG_RCU_CPU_STALL_INFO is not set
-# CONFIG_DEBUG_PER_CPU_MAPS is not set
 CONFIG_DEBUG_USER=y
 CONFIG_DEBUG_LL=y
 CONFIG_DEBUG_S3C_UART0=y
@@ -653,38 +313,13 @@ CONFIG_DEBUG_S3C_UART0=y
 # CONFIG_DEBUG_ICEDCC is not set
 # CONFIG_DEBUG_SEMIHOSTING is not set
 CONFIG_EARLY_PRINTK=y
-CONFIG_OC_ETM=y
-# CONFIG_PID_IN_CONTEXTIDR is not set
 
 #
 # Non-executable pages
 #
-CONFIG_PAX_NOEXEC=y
-CONFIG_PAX_PAGEEXEC=y
-CONFIG_PAX_MPROTECT=y
-# CONFIG_PAX_MPROTECT_COMPAT is not set
-CONFIG_PAX_ELFRELOCS=y
 # CONFIG_PAX_KERNEXEC is not set
 
 #
 # Miscellaneous hardening features
 #
 # CONFIG_PAX_MEMORY_UDEREF is not set
-CONFIG_PAX_REFCOUNT=y
-
-#
-# Kernel Auditing
-#
-CONFIG_GRKERNSEC_RWXMAP_LOG=y
-CONFIG_GRKERNSEC_AUDIT_TEXTREL=y
-
-#
-# Crypto core or helper
-#
-CONFIG_CRYPTO_PCRYPT=m
-
-#
-# Library routines
-#
-CONFIG_CPU_RMAP=y
-CONFIG_DDR=y
index c86fdf84af127b48e41ded5f5d857425d940558b..4c8e2b0d143efd45f81a0b29bed59bc6bef5da59 100644 (file)
@@ -11,14 +11,12 @@ CONFIG_GENERIC_GPIO=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
 CONFIG_ARCH_SUSPEND_POSSIBLE=y
 CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
-CONFIG_HAVE_IRQ_WORK=y
 CONFIG_IRQ_WORK=y
 CONFIG_BUILDTIME_EXTABLE_SORT=y
 
 #
 # General setup
 #
-CONFIG_EXPERIMENTAL=y
 CONFIG_INIT_ENV_ARG_LIMIT=32
 CONFIG_CROSS_COMPILE=""
 CONFIG_LOCALVERSION=""
@@ -151,16 +149,19 @@ CONFIG_TRACEPOINTS=y
 CONFIG_HAVE_OPROFILE=y
 # CONFIG_KPROBES is not set
 CONFIG_JUMP_LABEL=y
+# CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set
 CONFIG_HAVE_KPROBES=y
 CONFIG_HAVE_KRETPROBES=y
 CONFIG_HAVE_ARCH_TRACEHOOK=y
 CONFIG_HAVE_DMA_ATTRS=y
 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_ARCH_JUMP_LABEL=y
 CONFIG_HAVE_ARCH_SECCOMP_FILTER=y
 CONFIG_SECCOMP_FILTER=y
+CONFIG_OLD_SIGSUSPEND3=y
 
 #
 # GCOV-based kernel profiling
@@ -231,20 +232,20 @@ CONFIG_FREEZER=y
 CONFIG_PREEMPT_NONE=y
 # CONFIG_PREEMPT_VOLUNTARY is not set
 # CONFIG_PREEMPT is not set
-CONFIG_SELECT_MEMORY_MODEL=y
 CONFIG_HAVE_MEMBLOCK=y
+# CONFIG_HAVE_BOOTMEM_INFO_NODE is not set
 CONFIG_PAGEFLAGS_EXTENDED=y
 CONFIG_BALLOON_COMPACTION=y
 CONFIG_COMPACTION=y
 CONFIG_MIGRATION=y
 CONFIG_BOUNCE=y
-CONFIG_VIRT_TO_BUS=y
 CONFIG_KSM=y
 CONFIG_CROSS_MEMORY_ATTACH=y
 CONFIG_CLEANCACHE=y
 # CONFIG_FRONTSWAP is not set
 CONFIG_SECCOMP=y
 CONFIG_CC_STACKPROTECTOR=y
+CONFIG_SCHED_HRTICK=y
 CONFIG_KEXEC=y
 CONFIG_CRASH_DUMP=y
 
@@ -259,6 +260,7 @@ CONFIG_PM_SLEEP=y
 CONFIG_PM_RUNTIME=y
 CONFIG_PM=y
 # CONFIG_PM_DEBUG is not set
+CONFIG_PM_CLK=y
 
 #
 # CPU Frequency scaling
@@ -423,6 +425,7 @@ CONFIG_NF_CONNTRACK_PROCFS=y
 CONFIG_NF_CONNTRACK_EVENTS=y
 CONFIG_NF_CONNTRACK_TIMEOUT=y
 CONFIG_NF_CONNTRACK_TIMESTAMP=y
+CONFIG_NF_CONNTRACK_LABELS=y
 CONFIG_NF_CT_PROTO_DCCP=m
 CONFIG_NF_CT_PROTO_GRE=m
 CONFIG_NF_CT_PROTO_SCTP=m
@@ -495,9 +498,11 @@ CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP=m
 # Xtables matches
 #
 CONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m
+CONFIG_NETFILTER_XT_MATCH_BPF=m
 CONFIG_NETFILTER_XT_MATCH_CLUSTER=m
 CONFIG_NETFILTER_XT_MATCH_COMMENT=m
 CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
+CONFIG_NETFILTER_XT_MATCH_CONNLABEL=m
 CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m
 CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
 CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
@@ -595,7 +600,6 @@ 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_IP_NF_QUEUE is not set
 CONFIG_IP_NF_IPTABLES=y
 CONFIG_IP_NF_MATCH_AH=m
 CONFIG_IP_NF_MATCH_ECN=m
@@ -694,6 +698,7 @@ CONFIG_STP=y
 CONFIG_GARP=y
 CONFIG_BRIDGE=y
 CONFIG_BRIDGE_IGMP_SNOOPING=y
+CONFIG_BRIDGE_VLAN_FILTERING=y
 CONFIG_HAVE_NET_DSA=y
 CONFIG_NET_DSA=y
 CONFIG_NET_DSA_TAG_DSA=y
@@ -701,6 +706,7 @@ CONFIG_NET_DSA_TAG_EDSA=y
 CONFIG_NET_DSA_TAG_TRAILER=y
 CONFIG_VLAN_8021Q=y
 CONFIG_VLAN_8021Q_GVRP=y
+# CONFIG_VLAN_8021Q_MVRP is not set
 # CONFIG_DECNET is not set
 CONFIG_LLC=y
 # CONFIG_LLC2 is not set
@@ -708,7 +714,6 @@ CONFIG_LLC=y
 # CONFIG_ATALK is not set
 # CONFIG_X25 is not set
 # CONFIG_LAPB is not set
-# CONFIG_WAN_ROUTER is not set
 # CONFIG_PHONET is not set
 # CONFIG_IEEE802154 is not set
 CONFIG_NET_SCHED=y
@@ -782,6 +787,7 @@ CONFIG_BATMAN_ADV_BLA=y
 CONFIG_BATMAN_ADV_DAT=y
 # CONFIG_BATMAN_ADV_DEBUG is not set
 CONFIG_OPENVSWITCH=m
+CONFIG_VSOCKETS=m
 CONFIG_NETPRIO_CGROUP=m
 CONFIG_BQL=y
 
@@ -877,6 +883,7 @@ 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
@@ -906,7 +913,6 @@ CONFIG_PARPORT_NOT_PC=y
 #
 CONFIG_BLK_DEV=y
 # CONFIG_PARIDE is not set
-CONFIG_BLK_CPQ_DA=m
 CONFIG_BLK_CPQ_CISS_DA=m
 # CONFIG_CISS_SCSI_TAPE is not set
 CONFIG_BLK_DEV_DAC960=m
@@ -928,16 +934,19 @@ CONFIG_BLK_DEV_RAM_SIZE=16384
 # CONFIG_ATA_OVER_ETH is not set
 CONFIG_VIRTIO_BLK=m
 # CONFIG_BLK_DEV_RBD is not set
+CONFIG_BLK_DEV_RSXX=m
 
 #
 # Misc devices
 #
 # CONFIG_AD525X_DPOT is not set
+# CONFIG_ATMEL_PWM is not set
 # CONFIG_PHANTOM is not set
 # CONFIG_INTEL_MID_PTI is not set
 CONFIG_TIFM_CORE=m
 CONFIG_TIFM_7XX1=m
 CONFIG_ICS932S401=m
+# CONFIG_ATMEL_SSC is not set
 CONFIG_ENCLOSURE_SERVICES=m
 CONFIG_HP_ILO=m
 # CONFIG_APDS9802ALS is not set
@@ -1051,7 +1060,6 @@ CONFIG_SCSI_MVSAS=m
 # CONFIG_SCSI_MVSAS_DEBUG is not set
 CONFIG_SCSI_MVSAS_TASKLET=y
 # CONFIG_SCSI_MVUMI is not set
-CONFIG_SCSI_DPT_I2O=m
 CONFIG_SCSI_ARCMSR=m
 CONFIG_MEGARAID_NEWGEN=y
 CONFIG_MEGARAID_MM=m
@@ -1065,6 +1073,7 @@ CONFIG_SCSI_MPT3SAS=m
 CONFIG_SCSI_MPT3SAS_MAX_SGE=128
 # CONFIG_SCSI_MPT3SAS_LOGGING is not set
 CONFIG_SCSI_UFSHCD=m
+CONFIG_SCSI_UFSHCD_PCI=m
 CONFIG_SCSI_HPTIOP=m
 CONFIG_LIBFC=m
 CONFIG_LIBFCOE=m
@@ -1218,9 +1227,14 @@ CONFIG_MD_FAULTY=m
 CONFIG_BLK_DEV_DM=y
 # CONFIG_DM_DEBUG is not set
 CONFIG_DM_BUFIO=m
+CONFIG_DM_BIO_PRISON=m
+CONFIG_DM_PERSISTENT_DATA=m
 CONFIG_DM_CRYPT=m
 CONFIG_DM_SNAPSHOT=y
 # CONFIG_DM_THIN_PROVISIONING is not set
+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
@@ -1252,8 +1266,6 @@ CONFIG_FIREWIRE_SBP2=m
 CONFIG_I2O=m
 # CONFIG_I2O_LCT_NOTIFY_ON_CHANGES is not set
 CONFIG_I2O_EXT_ADAPTEC=y
-CONFIG_I2O_CONFIG=m
-CONFIG_I2O_CONFIG_OLD_IOCTL=y
 CONFIG_I2O_BUS=m
 CONFIG_I2O_BLOCK=m
 CONFIG_I2O_SCSI=m
@@ -1286,8 +1298,6 @@ CONFIG_ATM_LANAI=m
 CONFIG_ATM_ENI=m
 # CONFIG_ATM_ENI_DEBUG is not set
 # CONFIG_ATM_ENI_TUNE_BURST is not set
-CONFIG_ATM_FIRESTREAM=m
-# CONFIG_ATM_ZATM is not set
 CONFIG_ATM_NICSTAR=m
 # CONFIG_ATM_NICSTAR_USE_SUNI is not set
 # CONFIG_ATM_NICSTAR_USE_IDT77105 is not set
@@ -1295,8 +1305,6 @@ CONFIG_ATM_IDT77252=m
 # CONFIG_ATM_IDT77252_DEBUG is not set
 # CONFIG_ATM_IDT77252_RCV_ALL is not set
 CONFIG_ATM_IDT77252_USE_SUNI=y
-# CONFIG_ATM_AMBASSADOR is not set
-# CONFIG_ATM_HORIZON is not set
 # CONFIG_ATM_IA is not set
 # CONFIG_ATM_FORE200E is not set
 CONFIG_ATM_SOLOS=m
@@ -1343,6 +1351,7 @@ CONFIG_BNX2=m
 CONFIG_CNIC=m
 CONFIG_TIGON3=m
 CONFIG_BNX2X=m
+CONFIG_BNX2X_SRIOV=y
 CONFIG_NET_VENDOR_BROCADE=y
 CONFIG_BNA=m
 CONFIG_NET_CALXEDA_XGMAC=m
@@ -1364,14 +1373,11 @@ CONFIG_TULIP=m
 CONFIG_TULIP_MMIO=y
 CONFIG_TULIP_NAPI=y
 CONFIG_TULIP_NAPI_HW_MITIGATION=y
-CONFIG_DE4X5=m
 CONFIG_WINBOND_840=m
 CONFIG_DM9102=m
 CONFIG_ULI526X=m
 CONFIG_PCMCIA_XIRCOM=m
 CONFIG_NET_VENDOR_DLINK=y
-CONFIG_DE600=m
-CONFIG_DE620=m
 CONFIG_DL2K=m
 CONFIG_SUNDANCE=m
 # CONFIG_SUNDANCE_MMIO is not set
@@ -1388,6 +1394,7 @@ CONFIG_E100=m
 CONFIG_E1000=m
 CONFIG_E1000E=m
 CONFIG_IGB=m
+CONFIG_IGB_HWMON=y
 CONFIG_IGBVF=m
 CONFIG_IXGB=m
 CONFIG_IXGBE=m
@@ -1437,7 +1444,6 @@ CONFIG_R8169=m
 CONFIG_NET_VENDOR_RDC=y
 CONFIG_R6040=m
 CONFIG_NET_VENDOR_SEEQ=y
-# CONFIG_SEEQ8005 is not set
 CONFIG_NET_VENDOR_SILAN=y
 CONFIG_SC92031=m
 CONFIG_NET_VENDOR_SIS=y
@@ -1527,6 +1533,7 @@ CONFIG_USB_PEGASUS=m
 CONFIG_USB_RTL8150=m
 CONFIG_USB_USBNET=m
 CONFIG_USB_NET_AX8817X=m
+CONFIG_USB_NET_AX88179_178A=m
 CONFIG_USB_NET_CDCETHER=m
 CONFIG_USB_NET_CDC_EEM=m
 CONFIG_USB_NET_CDC_NCM=m
@@ -1681,6 +1688,7 @@ CONFIG_RT2800USB_RT35XX=y
 CONFIG_RT2800USB_RT53XX=y
 CONFIG_RT2800USB_UNKNOWN=y
 CONFIG_RT2800_LIB=m
+CONFIG_RT2X00_LIB_MMIO=m
 CONFIG_RT2X00_LIB_PCI=m
 CONFIG_RT2X00_LIB_USB=m
 CONFIG_RT2X00_LIB=m
@@ -1689,13 +1697,13 @@ CONFIG_RT2X00_LIB_CRYPTO=y
 CONFIG_RT2X00_LIB_LEDS=y
 CONFIG_RT2X00_LIB_DEBUGFS=y
 # CONFIG_RT2X00_DEBUG is not set
+CONFIG_RTLWIFI=m
+# CONFIG_RTLWIFI_DEBUG is not set
 CONFIG_RTL8192CE=m
 CONFIG_RTL8192SE=m
 CONFIG_RTL8192DE=m
 CONFIG_RTL8723AE=m
 CONFIG_RTL8192CU=m
-CONFIG_RTLWIFI=m
-# CONFIG_RTLWIFI_DEBUG is not set
 CONFIG_RTL8192C_COMMON=m
 CONFIG_WL_TI=y
 CONFIG_WL1251=m
@@ -1704,7 +1712,7 @@ CONFIG_WL12XX=m
 CONFIG_WL18XX=m
 CONFIG_WLCORE=m
 CONFIG_WLCORE_SDIO=m
-CONFIG_WL12XX_PLATFORM_DATA=y
+CONFIG_WILINK_PLATFORM_DATA=y
 CONFIG_ZD1211RW=m
 # CONFIG_ZD1211RW_DEBUG is not set
 CONFIG_MWIFIEX=m
@@ -1764,8 +1772,6 @@ CONFIG_HISAX_AVM_A1_PCMCIA=y
 CONFIG_HISAX_ELSA=y
 CONFIG_HISAX_DIEHLDIVA=y
 CONFIG_HISAX_SEDLBAUER=y
-CONFIG_HISAX_NETJET=y
-CONFIG_HISAX_NETJET_U=y
 CONFIG_HISAX_NICCY=y
 CONFIG_HISAX_BKM_A4T=y
 CONFIG_HISAX_SCT_QUADRO=y
@@ -1773,7 +1779,6 @@ CONFIG_HISAX_GAZEL=y
 CONFIG_HISAX_HFC_PCI=y
 CONFIG_HISAX_W6692=y
 CONFIG_HISAX_HFC_SX=y
-CONFIG_HISAX_ENTERNOW_PCI=y
 # CONFIG_HISAX_DEBUG is not set
 
 #
@@ -1861,6 +1866,7 @@ 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
@@ -1869,6 +1875,7 @@ CONFIG_MOUSE_PS2=m
 CONFIG_MOUSE_PS2_ALPS=y
 CONFIG_MOUSE_PS2_LOGIPS2PP=y
 CONFIG_MOUSE_PS2_SYNAPTICS=y
+CONFIG_MOUSE_PS2_CYPRESS=y
 CONFIG_MOUSE_PS2_TRACKPOINT=y
 CONFIG_MOUSE_PS2_ELANTECH=y
 CONFIG_MOUSE_PS2_SENTELIC=y
@@ -1876,6 +1883,7 @@ CONFIG_MOUSE_PS2_TOUCHKIT=y
 CONFIG_MOUSE_SERIAL=m
 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
@@ -1920,6 +1928,7 @@ CONFIG_SERIO_ARC_PS2=m
 #
 # Character devices
 #
+CONFIG_TTY=y
 CONFIG_VT=y
 CONFIG_CONSOLE_TRANSLATIONS=y
 CONFIG_VT_CONSOLE=y
@@ -1948,7 +1957,9 @@ CONFIG_N_GSM=m
 # Serial drivers
 #
 CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_DEPRECATED_OPTIONS=y
 CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_8250_DMA=y
 CONFIG_SERIAL_8250_PCI=y
 CONFIG_SERIAL_8250_NR_UARTS=4
 CONFIG_SERIAL_8250_RUNTIME_UARTS=4
@@ -1972,6 +1983,8 @@ CONFIG_SERIAL_SCCNXP=m
 # 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_PRINTER=m
 CONFIG_LP_CONSOLE=y
 CONFIG_PPDEV=m
@@ -1985,7 +1998,9 @@ CONFIG_IPMI_WATCHDOG=m
 CONFIG_IPMI_POWEROFF=m
 CONFIG_HW_RANDOM=y
 CONFIG_HW_RANDOM_TIMERIOMEM=m
+CONFIG_HW_RANDOM_ATMEL=m
 CONFIG_HW_RANDOM_VIRTIO=m
+CONFIG_HW_RANDOM_EXYNOS=m
 CONFIG_NVRAM=y
 CONFIG_R3964=m
 # CONFIG_APPLICOM is not set
@@ -2091,6 +2106,7 @@ CONFIG_PTP_1588_CLOCK=m
 #
 CONFIG_PTP_1588_CLOCK_PCH=m
 CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
+CONFIG_GPIO_DEVRES=y
 CONFIG_GPIOLIB=y
 # CONFIG_DEBUG_GPIO is not set
 CONFIG_GPIO_SYSFS=y
@@ -2153,6 +2169,7 @@ CONFIG_W1_MASTER_DS1WM=m
 CONFIG_W1_SLAVE_THERM=m
 CONFIG_W1_SLAVE_SMEM=m
 CONFIG_W1_SLAVE_DS2408=m
+CONFIG_W1_SLAVE_DS2413=m
 CONFIG_W1_SLAVE_DS2423=m
 CONFIG_W1_SLAVE_DS2431=m
 CONFIG_W1_SLAVE_DS2433=m
@@ -2165,6 +2182,7 @@ CONFIG_W1_SLAVE_BQ27000=m
 CONFIG_POWER_SUPPLY=y
 # CONFIG_POWER_SUPPLY_DEBUG is not set
 # CONFIG_PDA_POWER is not set
+CONFIG_GENERIC_ADC_BATTERY=m
 # CONFIG_TEST_POWER is not set
 # CONFIG_BATTERY_DS2760 is not set
 # CONFIG_BATTERY_DS2780 is not set
@@ -2180,6 +2198,7 @@ CONFIG_POWER_SUPPLY=y
 # CONFIG_CHARGER_GPIO is not set
 # CONFIG_CHARGER_BQ2415X is not set
 # CONFIG_CHARGER_SMB347 is not set
+# CONFIG_BATTERY_GOLDFISH is not set
 CONFIG_POWER_RESET=y
 CONFIG_POWER_AVS=y
 CONFIG_HWMON=y
@@ -2245,6 +2264,7 @@ CONFIG_SENSORS_MAX197=m
 CONFIG_SENSORS_MAX6639=m
 CONFIG_SENSORS_MAX6642=m
 CONFIG_SENSORS_MAX6650=m
+CONFIG_SENSORS_MAX6697=m
 CONFIG_SENSORS_MCP3021=m
 CONFIG_SENSORS_NTC_THERMISTOR=m
 CONFIG_SENSORS_PC87360=m
@@ -2278,6 +2298,7 @@ CONFIG_SENSORS_SCH5636=m
 CONFIG_SENSORS_ADS1015=m
 CONFIG_SENSORS_ADS7828=m
 CONFIG_SENSORS_AMC6821=m
+CONFIG_SENSORS_INA209=m
 CONFIG_SENSORS_INA2XX=m
 CONFIG_SENSORS_THMC50=m
 CONFIG_SENSORS_TMP102=m
@@ -2305,9 +2326,10 @@ CONFIG_THERMAL_HWMON=y
 CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y
 # CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set
 # CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set
-CONFIG_FAIR_SHARE=y
-CONFIG_STEP_WISE=y
-CONFIG_USER_SPACE=y
+CONFIG_THERMAL_GOV_FAIR_SHARE=y
+CONFIG_THERMAL_GOV_STEP_WISE=y
+CONFIG_THERMAL_GOV_USER_SPACE=y
+CONFIG_THERMAL_EMULATION=y
 CONFIG_WATCHDOG=y
 CONFIG_WATCHDOG_CORE=y
 CONFIG_WATCHDOG_NOWAYOUT=y
@@ -2316,6 +2338,7 @@ CONFIG_WATCHDOG_NOWAYOUT=y
 # Watchdog Device Drivers
 #
 CONFIG_SOFT_WATCHDOG=m
+CONFIG_RETU_WATCHDOG=m
 CONFIG_ALIM7101_WDT=m
 CONFIG_I6300ESB_WDT=m
 
@@ -2410,8 +2433,10 @@ CONFIG_VIDEOBUF2_CORE=m
 CONFIG_VIDEOBUF2_MEMOPS=m
 CONFIG_VIDEOBUF2_DMA_CONTIG=m
 CONFIG_VIDEOBUF2_VMALLOC=m
+CONFIG_VIDEO_V4L2_INT_DEVICE=m
 CONFIG_DVB_CORE=y
 CONFIG_DVB_NET=y
+CONFIG_TTPCI_EEPROM=m
 CONFIG_DVB_MAX_ADAPTERS=8
 CONFIG_DVB_DYNAMIC_MINORS=y
 
@@ -2507,6 +2532,8 @@ CONFIG_USB_S2255=m
 #
 # Analog/digital TV USB devices
 #
+CONFIG_VIDEO_AU0828=m
+CONFIG_VIDEO_AU0828_V4L2=y
 CONFIG_VIDEO_CX231XX=m
 CONFIG_VIDEO_CX231XX_RC=y
 CONFIG_VIDEO_CX231XX_ALSA=m
@@ -2604,7 +2631,6 @@ CONFIG_VIDEO_SAA7164=m
 #
 # Media digital TV PCI Adapters
 #
-CONFIG_TTPCI_EEPROM=m
 CONFIG_DVB_AV7110=m
 CONFIG_DVB_AV7110_OSD=y
 CONFIG_DVB_BUDGET_CORE=m
@@ -2628,6 +2654,7 @@ CONFIG_SOC_CAMERA=m
 CONFIG_SOC_CAMERA_PLATFORM=m
 CONFIG_V4L_MEM2MEM_DRIVERS=y
 CONFIG_VIDEO_MEM2MEM_DEINTERLACE=m
+CONFIG_VIDEO_SH_VEU=m
 # CONFIG_V4L_TEST_DRIVERS is not set
 
 #
@@ -2646,18 +2673,19 @@ CONFIG_MEDIA_COMMON_OPTIONS=y
 #
 # common driver options
 #
+CONFIG_VIDEO_CX2341X=m
+CONFIG_VIDEO_BTCX=m
+CONFIG_VIDEO_TVEEPROM=m
 CONFIG_DVB_B2C2_FLEXCOP=m
 CONFIG_VIDEO_SAA7146=m
 CONFIG_VIDEO_SAA7146_VV=m
 CONFIG_SMS_SIANO_MDTV=m
 CONFIG_SMS_SIANO_RC=y
-CONFIG_MEDIA_SUBDRV_AUTOSELECT=y
 
 #
 # Media ancillary drivers (tuners, sensors, i2c, frontends)
 #
-CONFIG_VIDEO_BTCX=m
-CONFIG_VIDEO_TVEEPROM=m
+CONFIG_MEDIA_SUBDRV_AUTOSELECT=y
 CONFIG_VIDEO_IR_I2C=m
 
 #
@@ -2686,11 +2714,6 @@ CONFIG_VIDEO_TVP5150=m
 #
 CONFIG_VIDEO_CX25840=m
 
-#
-# MPEG video encoders
-#
-CONFIG_VIDEO_CX2341X=m
-
 #
 # Video encoders
 #
@@ -2799,6 +2822,7 @@ CONFIG_DVB_TDA826X=m
 CONFIG_DVB_TUA6100=m
 CONFIG_DVB_CX24116=m
 CONFIG_DVB_SI21XX=m
+CONFIG_DVB_TS2020=m
 CONFIG_DVB_DS3000=m
 CONFIG_DVB_MB86A16=m
 CONFIG_DVB_TDA10071=m
@@ -2846,6 +2870,9 @@ CONFIG_DVB_BCM3510=m
 CONFIG_DVB_LGDT330X=m
 CONFIG_DVB_LGDT3305=m
 CONFIG_DVB_S5H1409=m
+CONFIG_DVB_AU8522=m
+CONFIG_DVB_AU8522_DTV=m
+CONFIG_DVB_AU8522_V4L=m
 CONFIG_DVB_S5H1411=m
 
 #
@@ -2892,12 +2919,13 @@ CONFIG_DRM_USB=m
 CONFIG_DRM_KMS_HELPER=m
 # CONFIG_DRM_LOAD_EDID_FIRMWARE is not set
 CONFIG_DRM_TTM=m
-CONFIG_DRM_TDFX=m
-CONFIG_DRM_R128=m
 
 #
 # I2C encoder or helper chips
 #
+CONFIG_DRM_I2C_NXP_TDA998X=m
+CONFIG_DRM_TDFX=m
+CONFIG_DRM_R128=m
 CONFIG_DRM_MGA=m
 CONFIG_DRM_VIA=m
 CONFIG_DRM_SAVAGE=m
@@ -2907,9 +2935,9 @@ CONFIG_DRM_UDL=m
 CONFIG_DRM_AST=m
 CONFIG_DRM_MGAG200=m
 CONFIG_DRM_CIRRUS_QEMU=m
-CONFIG_STUB_POULSBO=m
 CONFIG_VGASTATE=m
 CONFIG_VIDEO_OUTPUT_CONTROL=m
+CONFIG_HDMI=y
 CONFIG_FB=y
 # CONFIG_FIRMWARE_EDID is not set
 CONFIG_FB_DDC=m
@@ -2973,6 +3001,7 @@ CONFIG_FB_TRIDENT=m
 CONFIG_FB_SM501=m
 # CONFIG_FB_SMSCUFX is not set
 CONFIG_FB_UDL=m
+# CONFIG_FB_GOLDFISH is not set
 CONFIG_FB_VIRTUAL=m
 CONFIG_FB_METRONOME=m
 CONFIG_FB_MB862XX=m
@@ -3117,6 +3146,7 @@ CONFIG_SND_HDA_CODEC_CIRRUS=y
 CONFIG_SND_HDA_CODEC_CONEXANT=y
 CONFIG_SND_HDA_CODEC_CA0110=y
 CONFIG_SND_HDA_CODEC_CA0132=y
+# CONFIG_SND_HDA_CODEC_CA0132_DSP is not set
 CONFIG_SND_HDA_CODEC_CMEDIA=y
 CONFIG_SND_HDA_CODEC_SI3054=y
 CONFIG_SND_HDA_GENERIC=y
@@ -3223,11 +3253,13 @@ CONFIG_HID_SAITEK=m
 CONFIG_HID_SAMSUNG=m
 # CONFIG_HID_SONY is not set
 CONFIG_HID_SPEEDLINK=m
+# CONFIG_HID_STEELSERIES is not set
 CONFIG_HID_SUNPLUS=m
 # CONFIG_HID_GREENASIA is not set
 # CONFIG_HID_SMARTJOYPLUS is not set
 CONFIG_HID_TIVO=m
 CONFIG_HID_TOPSEED=m
+CONFIG_HID_THINGM=m
 # CONFIG_HID_THRUSTMASTER is not set
 # CONFIG_HID_WACOM is not set
 # CONFIG_HID_WIIMOTE is not set
@@ -3262,6 +3294,9 @@ CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
 # CONFIG_USB_DYNAMIC_MINORS is not set
 CONFIG_USB_SUSPEND=y
 # CONFIG_USB_OTG is not set
+CONFIG_USB_DWC3=m
+CONFIG_USB_DWC3_HOST=y
+# CONFIG_USB_DWC3_DEBUG is not set
 CONFIG_USB_MON=m
 CONFIG_USB_WUSB=m
 CONFIG_USB_WUSB_CBAF=m
@@ -3272,6 +3307,7 @@ CONFIG_USB_WUSB_CBAF=m
 #
 # CONFIG_USB_C67X00_HCD is not set
 CONFIG_USB_XHCI_HCD=y
+CONFIG_USB_XHCI_PLATFORM=m
 # CONFIG_USB_XHCI_HCD_DEBUGGING is not set
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_EHCI_ROOT_HUB_TT=y
@@ -3392,6 +3428,7 @@ CONFIG_USB_SERIAL_OPTION=m
 # CONFIG_USB_SERIAL_OMNINET is not set
 # CONFIG_USB_SERIAL_OPTICON is not set
 # CONFIG_USB_SERIAL_VIVOPAY_SERIAL is not set
+# CONFIG_USB_SERIAL_XSENS_MT is not set
 # CONFIG_USB_SERIAL_ZIO is not set
 CONFIG_USB_SERIAL_ZTE=m
 CONFIG_USB_SERIAL_SSU100=m
@@ -3423,10 +3460,13 @@ CONFIG_USB_IOWARRIOR=m
 # CONFIG_USB_ISIGHTFW is not set
 CONFIG_USB_YUREX=m
 CONFIG_USB_EZUSB_FX2=m
+CONFIG_USB_HSIC_USB3503=m
 
 #
 # USB Physical Layer drivers
 #
+CONFIG_OMAP_USB3=m
+CONFIG_OMAP_CONTROL_USB=m
 CONFIG_USB_ISP1301=m
 CONFIG_USB_RCAR_PHY=m
 CONFIG_USB_ATM=m
@@ -3467,6 +3507,8 @@ CONFIG_MMC_SDHCI=m
 CONFIG_MMC_SDHCI_PCI=m
 CONFIG_MMC_RICOH_MMC=y
 CONFIG_MMC_SDHCI_PLTFM=m
+CONFIG_MMC_SDHCI_PXAV3=m
+CONFIG_MMC_SDHCI_PXAV2=m
 CONFIG_MMC_TIFM_SD=m
 CONFIG_MMC_CB710=m
 CONFIG_MMC_VIA_SDMMC=m
@@ -3501,12 +3543,14 @@ 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
 CONFIG_LEDS_LP5523=m
 # CONFIG_LEDS_PCA955X is not set
 CONFIG_LEDS_PCA9633=m
 # CONFIG_LEDS_BD2802 is not set
 CONFIG_LEDS_LT3593=m
+# CONFIG_LEDS_RENESAS_TPU is not set
 CONFIG_LEDS_TCA6507=m
 CONFIG_LEDS_LM355x=m
 CONFIG_LEDS_OT200=m
@@ -3532,8 +3576,6 @@ CONFIG_LEDS_TRIGGER_TRANSIENT=m
 # CONFIG_INFINIBAND is not set
 CONFIG_RTC_LIB=y
 CONFIG_RTC_CLASS=y
-CONFIG_RTC_HCTOSYS=y
-CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
 # CONFIG_RTC_DEBUG is not set
 
 #
@@ -3595,6 +3637,11 @@ CONFIG_RTC_DRV_DS2404=m
 #
 # on-CPU RTC drivers
 #
+
+#
+# HID Sensor RTC drivers
+#
+CONFIG_RTC_DRV_HID_SENSOR_TIME=m
 CONFIG_DMADEVICES=y
 # CONFIG_DMADEVICES_DEBUG is not set
 
@@ -3642,6 +3689,7 @@ CONFIG_ET131X=m
 # CONFIG_W35UND is not set
 # CONFIG_PRISM2_USB is not set
 # CONFIG_ECHO is not set
+# CONFIG_COMEDI is not set
 # CONFIG_ASUS_OLED is not set
 # CONFIG_PANEL is not set
 # CONFIG_R8187SE is not set
@@ -3660,6 +3708,79 @@ CONFIG_RTLLIB_CRYPTO_WEP=m
 # CONFIG_VT6655 is not set
 # CONFIG_VT6656 is not set
 # CONFIG_DX_SEP is not set
+
+#
+# IIO staging drivers
+#
+# CONFIG_IIO_ST_HWMON is not set
+
+#
+# Accelerometers
+#
+
+#
+# Analog to digital converters
+#
+# CONFIG_AD7291 is not set
+# CONFIG_AD7606 is not set
+# CONFIG_AD799X is not set
+# CONFIG_ADT7410 is not set
+
+#
+# Analog digital bi-direction converters
+#
+# CONFIG_ADT7316 is not set
+
+#
+# Capacitance to digital converters
+#
+# CONFIG_AD7150 is not set
+# CONFIG_AD7152 is not set
+# CONFIG_AD7746 is not set
+
+#
+# Direct Digital Synthesis
+#
+
+#
+# Digital gyroscope sensors
+#
+
+#
+# Network Analyzer, Impedance Converters
+#
+# CONFIG_AD5933 is not set
+
+#
+# Light sensors
+#
+# CONFIG_SENSORS_ISL29018 is not set
+# CONFIG_SENSORS_ISL29028 is not set
+# CONFIG_TSL2583 is not set
+# CONFIG_TSL2x7x is not set
+
+#
+# Magnetometer sensors
+#
+# CONFIG_SENSORS_AK8975 is not set
+# CONFIG_SENSORS_HMC5843 is not set
+
+#
+# Active energy metering IC
+#
+# CONFIG_ADE7854 is not set
+
+#
+# Resolver to digital converters
+#
+
+#
+# Triggers - standalone
+#
+# CONFIG_IIO_PERIODIC_RTC_TRIGGER is not set
+# CONFIG_IIO_GPIO_TRIGGER is not set
+# CONFIG_IIO_SYSFS_TRIGGER is not set
+# CONFIG_IIO_SIMPLE_DUMMY is not set
 # CONFIG_ZSMALLOC is not set
 # CONFIG_FB_SM7XX is not set
 # CONFIG_CRYSTALHD is not set
@@ -3689,25 +3810,108 @@ CONFIG_BPCTL=m
 CONFIG_CED1401=m
 # CONFIG_DGRP is not set
 CONFIG_FIREWIRE_SERIAL=m
+CONFIG_CLKDEV_LOOKUP=y
+
+#
+# Common Clock Framework
+#
 
 #
 # Hardware Spinlock drivers
 #
+CONFIG_MAILBOX=y
 CONFIG_IOMMU_SUPPORT=y
 
 #
-# Remoteproc drivers (EXPERIMENTAL)
+# Remoteproc drivers
 #
 # CONFIG_STE_MODEM_RPROC is not set
 
 #
-# Rpmsg drivers (EXPERIMENTAL)
+# Rpmsg drivers
 #
 CONFIG_VIRT_DRIVERS=y
 # CONFIG_PM_DEVFREQ is not set
 # CONFIG_EXTCON is not set
 CONFIG_MEMORY=y
-# CONFIG_IIO is not set
+CONFIG_IIO=m
+CONFIG_IIO_BUFFER=y
+CONFIG_IIO_BUFFER_CB=y
+CONFIG_IIO_KFIFO_BUF=m
+CONFIG_IIO_TRIGGER=y
+CONFIG_IIO_CONSUMERS_PER_TRIGGER=2
+
+#
+# Accelerometers
+#
+# CONFIG_HID_SENSOR_ACCEL_3D is not set
+# CONFIG_IIO_ST_ACCEL_3AXIS is not set
+
+#
+# Analog to digital converters
+#
+# CONFIG_MAX1363 is not set
+# CONFIG_TI_ADC081C is not set
+# CONFIG_VIPERBOARD_ADC is not set
+
+#
+# Amplifiers
+#
+
+#
+# Hid Sensor IIO Common
+#
+CONFIG_HID_SENSOR_IIO_COMMON=m
+CONFIG_HID_SENSOR_IIO_TRIGGER=m
+# CONFIG_HID_SENSOR_ENUM_BASE_QUIRKS is not set
+
+#
+# Digital to analog converters
+#
+# CONFIG_AD5064 is not set
+# CONFIG_AD5380 is not set
+# CONFIG_AD5446 is not set
+# CONFIG_MAX517 is not set
+# CONFIG_MCP4725 is not set
+
+#
+# Frequency Synthesizers DDS/PLL
+#
+
+#
+# Clock Generator/Distribution
+#
+
+#
+# Phase-Locked Loop (PLL) frequency synthesizers
+#
+
+#
+# Digital gyroscope sensors
+#
+# CONFIG_HID_SENSOR_GYRO_3D is not set
+# CONFIG_IIO_ST_GYRO_3AXIS is not set
+# CONFIG_ITG3200 is not set
+
+#
+# Inertial measurement units
+#
+# CONFIG_INV_MPU6050_IIO is not set
+
+#
+# Light sensors
+#
+# CONFIG_ADJD_S311 is not set
+# CONFIG_SENSORS_LM3533 is not set
+# CONFIG_SENSORS_TSL2563 is not set
+# CONFIG_VCNL4000 is not set
+# CONFIG_HID_SENSOR_ALS is not set
+
+#
+# Magnetometer sensors
+#
+# CONFIG_HID_SENSOR_MAGNETOMETER_3D is not set
+# CONFIG_IIO_ST_MAGN_3AXIS is not set
 # CONFIG_VME_BUS is not set
 # CONFIG_IPACK_BUS is not set
 
@@ -3973,7 +4177,9 @@ CONFIG_HAVE_DEBUG_KMEMLEAK=y
 # CONFIG_RT_MUTEX_TESTER is not set
 # CONFIG_DEBUG_SPINLOCK is not set
 # CONFIG_DEBUG_MUTEXES is not set
-# CONFIG_SPARSE_RCU_POINTER 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
@@ -3991,6 +4197,11 @@ CONFIG_DEBUG_LIST=y
 # CONFIG_DEBUG_CREDENTIALS is not set
 CONFIG_FRAME_POINTER=y
 CONFIG_BOOT_PRINTK_DELAY=y
+
+#
+# RCU Debugging
+#
+# CONFIG_SPARSE_RCU_POINTER is not set
 # CONFIG_RCU_TORTURE_TEST is not set
 # CONFIG_RCU_TRACE is not set
 # CONFIG_BACKTRACE_SELF_TEST is not set
@@ -4011,7 +4222,6 @@ CONFIG_TRACER_MAX_TRACE=y
 CONFIG_TRACE_CLOCK=y
 CONFIG_RING_BUFFER=y
 CONFIG_EVENT_TRACING=y
-CONFIG_EVENT_POWER_TRACING_DEPRECATED=y
 CONFIG_CONTEXT_SWITCH_TRACER=y
 CONFIG_TRACING=y
 CONFIG_GENERIC_TRACER=y
@@ -4021,6 +4231,7 @@ CONFIG_FUNCTION_TRACER=y
 CONFIG_FUNCTION_GRAPH_TRACER=y
 # CONFIG_IRQSOFF_TRACER is not set
 CONFIG_SCHED_TRACER=y
+# CONFIG_TRACER_SNAPSHOT is not set
 CONFIG_BRANCH_PROFILE_NONE=y
 # CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
 # CONFIG_PROFILE_ALL_BRANCHES is not set
@@ -4094,7 +4305,6 @@ CONFIG_PAX_RANDMMAP=y
 # Miscellaneous hardening features
 #
 CONFIG_PAX_MEMORY_STRUCTLEAK=y
-CONFIG_PAX_CONSTIFY_PLUGIN=y
 CONFIG_PAX_USERCOPY=y
 # CONFIG_PAX_LATENT_ENTROPY is not set
 
@@ -4102,7 +4312,6 @@ CONFIG_PAX_USERCOPY=y
 # Memory Protections
 #
 CONFIG_GRKERNSEC_KMEM=y
-CONFIG_GRKERNSEC_RAND_THREADSTACK=y
 CONFIG_GRKERNSEC_PROC_MEMMAP=y
 CONFIG_GRKERNSEC_BRUTE=y
 CONFIG_GRKERNSEC_MODHARDEN=y
@@ -4144,6 +4353,7 @@ CONFIG_GRKERNSEC_CHROOT_FINDTASK=y
 CONFIG_GRKERNSEC_CHROOT_NICE=y
 CONFIG_GRKERNSEC_CHROOT_SYSCTL=y
 # CONFIG_GRKERNSEC_CHROOT_CAPS is not set
+CONFIG_GRKERNSEC_CHROOT_INITRD=y
 
 #
 # Kernel Auditing
@@ -4272,6 +4482,7 @@ CONFIG_CRYPTO_VMAC=m
 # Digest
 #
 CONFIG_CRYPTO_CRC32C=y
+CONFIG_CRYPTO_CRC32=y
 CONFIG_CRYPTO_GHASH=m
 CONFIG_CRYPTO_MD4=m
 CONFIG_CRYPTO_MD5=y
@@ -4338,7 +4549,6 @@ CONFIG_GENERIC_STRNCPY_FROM_USER=y
 CONFIG_GENERIC_STRNLEN_USER=y
 CONFIG_GENERIC_PCI_IOMAP=y
 CONFIG_GENERIC_IO=y
-CONFIG_PERCPU_RWSEM=y
 CONFIG_CRC_CCITT=m
 CONFIG_CRC16=y
 CONFIG_CRC_T10DIF=y
index 23d112774e3300829d12bbe9fcaec0b9ef69700f..414eb3520837510323cb4f52b9d8afc0d9877eaa 100644 (file)
@@ -23,6 +23,7 @@ CONFIG_RCU_FANOUT=32
 CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
 CONFIG_MODULES_USE_ELF_REL=y
 CONFIG_CLONE_BACKWARDS=y
+CONFIG_OLD_SIGACTION=y
 
 #
 # GCOV-based kernel profiling
@@ -33,6 +34,7 @@ CONFIG_LBDAF=y
 # Processor type and features
 #
 CONFIG_X86_BIGSMP=y
+# CONFIG_X86_GOLDFISH is not set
 # CONFIG_X86_WANT_INTEL_MID is not set
 # CONFIG_X86_RDC321X is not set
 CONFIG_X86_32_NON_STANDARD=y
@@ -257,6 +259,10 @@ CONFIG_CLKSRC_I8253=y
 # Kernel hacking
 #
 # CONFIG_DEBUG_HIGHMEM is not set
+
+#
+# RCU Debugging
+#
 CONFIG_DOUBLEFAULT=y
 
 #
index cc560c91eb36e826d7ea0792d2b8493be524ed88..53a4ded715e489ed8e0e78f89600e3cfa5d21cff 100644 (file)
@@ -105,6 +105,10 @@ CONFIG_MFD_CORE=y
 #
 # I2C encoder or helper chips
 #
+CONFIG_DISPLAY_TIMING=y
+CONFIG_VIDEOMODE=y
+CONFIG_OF_DISPLAY_TIMING=y
+CONFIG_OF_VIDEOMODE=y
 CONFIG_FB_SYS_FILLRECT=m
 CONFIG_FB_SYS_COPYAREA=m
 CONFIG_FB_SYS_IMAGEBLIT=m
@@ -121,11 +125,21 @@ CONFIG_BACKLIGHT_PWM=m
 #
 CONFIG_FB_SSD1307=m
 
+#
+# LED drivers
+#
+CONFIG_LEDS_PWM=m
+
 #
 # on-CPU RTC drivers
 #
 CONFIG_RTC_DRV_SNVS=m
 
+#
+# DMA Devices
+#
+CONFIG_DMA_OF=y
+
 #
 # Microsoft Hyper-V guest support
 #
@@ -142,14 +156,22 @@ CONFIG_XO1_RFKILL=m
 CONFIG_OF_IOMMU=y
 
 #
-# Rpmsg drivers (EXPERIMENTAL)
+# Magnetometer sensors
 #
 CONFIG_PWM=y
+CONFIG_IRQCHIP=y
+
+#
+# Non-executable pages
+#
+CONFIG_PAX_KERNEXEC=y
+CONFIG_PAX_KERNEXEC_MODULE_TEXT=4
 
 #
 # Miscellaneous hardening features
 #
 CONFIG_PAX_MEMORY_UDEREF=y
+CONFIG_PAX_CONSTIFY_PLUGIN=y
 
 #
 # Random Number Generation
index 2a4fa1655631a8b5ec62209474904bd9c7cb64c3..201113a9680b2444125b1f4c21bb0d0827c10eb5 100644 (file)
@@ -29,6 +29,7 @@ CONFIG_GENERIC_PENDING_IRQ=y
 CONFIG_IRQ_FORCED_THREADING=y
 CONFIG_SPARSE_IRQ=y
 CONFIG_CLOCKSOURCE_WATCHDOG=y
+CONFIG_ALWAYS_USE_PERSISTENT_CLOCK=y
 CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
 CONFIG_GENERIC_CLOCKEVENTS_MIN_ADJUST=y
 CONFIG_GENERIC_CMOS_UPDATE=y
@@ -43,6 +44,7 @@ CONFIG_IRQ_TIME_ACCOUNTING=y
 # RCU Subsystem
 #
 CONFIG_TREE_RCU=y
+CONFIG_RCU_STALL_COMMON=y
 CONFIG_RCU_FANOUT_LEAF=16
 # CONFIG_RCU_FANOUT_EXACT is not set
 CONFIG_RCU_FAST_NO_HZ=y
@@ -56,10 +58,10 @@ CONFIG_PCSPKR_PLATFORM=y
 # Kernel Performance Events And Counters
 #
 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
-CONFIG_GENERIC_SIGALTSTACK=y
 
 #
 # IO Schedulers
@@ -75,6 +77,7 @@ CONFIG_ZONE_DMA=y
 CONFIG_SMP=y
 CONFIG_X86_MPPARSE=y
 CONFIG_X86_EXTENDED_PLATFORM=y
+CONFIG_X86_INTEL_LPSS=y
 CONFIG_X86_SUPPORTS_MEMORY_FAILURE=y
 CONFIG_SCHED_OMIT_FRAME_POINTER=y
 CONFIG_PARAVIRT_GUEST=y
@@ -125,16 +128,21 @@ CONFIG_MICROCODE=m
 CONFIG_MICROCODE_INTEL=y
 CONFIG_MICROCODE_AMD=y
 CONFIG_MICROCODE_OLD_INTERFACE=y
+CONFIG_MICROCODE_INTEL_LIB=y
+CONFIG_MICROCODE_INTEL_EARLY=y
+CONFIG_MICROCODE_EARLY=y
 CONFIG_X86_CPUID=y
 CONFIG_ARCH_PHYS_ADDR_T_64BIT=y
 CONFIG_ARCH_DMA_ADDR_T_64BIT=y
 CONFIG_ARCH_SPARSEMEM_ENABLE=y
 CONFIG_ARCH_SELECT_MEMORY_MODEL=y
+CONFIG_SELECT_MEMORY_MODEL=y
 CONFIG_ARCH_DISCARD_MEMBLOCK=y
 CONFIG_MEMORY_ISOLATION=y
 CONFIG_SPLIT_PTLOCK_CPUS=4
 CONFIG_PHYS_ADDR_T_64BIT=y
 CONFIG_ZONE_DMA_FLAG=1
+CONFIG_VIRT_TO_BUS=y
 CONFIG_MMU_NOTIFIER=y
 CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
 CONFIG_ARCH_SUPPORTS_MEMORY_FAILURE=y
@@ -160,7 +168,6 @@ CONFIG_EFI_STUB=y
 CONFIG_HZ_300=y
 # CONFIG_HZ_1000 is not set
 CONFIG_HZ=300
-CONFIG_SCHED_HRTICK=y
 CONFIG_RELOCATABLE=y
 CONFIG_HOTPLUG_CPU=y
 # CONFIG_BOOTPARAM_HOTPLUG_CPU0 is not set
@@ -232,6 +239,7 @@ CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
 #
 # x86 CPU frequency scaling drivers
 #
+CONFIG_X86_INTEL_PSTATE=y
 CONFIG_X86_PCC_CPUFREQ=y
 CONFIG_X86_ACPI_CPUFREQ=y
 # CONFIG_X86_ACPI_CPUFREQ_CPB is not set
@@ -288,10 +296,16 @@ CONFIG_HOTPLUG_PCI_ACPI_IBM=m
 #
 # Classification
 #
+CONFIG_VMWARE_VMCI_VSOCKETS=m
 CONFIG_RPS=y
 CONFIG_RFS_ACCEL=y
 CONFIG_XPS=y
 
+#
+# Bluetooth device drivers
+#
+CONFIG_RFKILL_GPIO=m
+
 #
 # Generic Driver Options
 #
@@ -309,6 +323,7 @@ CONFIG_PNP=y
 CONFIG_PNPACPI=y
 CONFIG_BLK_DEV_FD=m
 CONFIG_BLK_DEV_PCIESSD_MTIP32XX=m
+CONFIG_BLK_CPQ_DA=m
 CONFIG_XEN_BLKDEV_FRONTEND=m
 CONFIG_XEN_BLKDEV_BACKEND=m
 # CONFIG_BLK_DEV_HD is not set
@@ -323,11 +338,13 @@ CONFIG_VMWARE_BALLOON=m
 # Altera FPGA firmware download module
 #
 # CONFIG_INTEL_MEI is not set
+CONFIG_VMWARE_VMCI=m
 
 #
 # SCSI Transports
 #
 CONFIG_SCSI_ACARD=m
+CONFIG_SCSI_DPT_I2O=m
 CONFIG_SCSI_ADVANSYS=m
 CONFIG_SCSI_BUSLOGIC=m
 CONFIG_VMWARE_PVSCSI=m
@@ -339,30 +356,36 @@ CONFIG_SCSI_EATA_MAX_TAGS=16
 CONFIG_SCSI_GDTH=m
 CONFIG_SCSI_ISCI=m
 CONFIG_ATA_ACPI=y
+# CONFIG_SATA_ZPODD is not set
 
 #
 # Generic fallback / legacy drivers
 #
 CONFIG_PATA_ACPI=m
-# CONFIG_MULTICORE_RAID456 is not set
 
 #
 # IEEE 1394 (FireWire) support
 #
 CONFIG_I2O_EXT_ADAPTEC_DMA64=y
+CONFIG_I2O_CONFIG=m
+CONFIG_I2O_CONFIG_OLD_IOCTL=y
 CONFIG_MACINTOSH_DRIVERS=y
 # CONFIG_MAC_EMUMOUSEBTN is not set
 CONFIG_SUNGEM_PHY=m
+CONFIG_ATM_FIRESTREAM=m
+# CONFIG_ATM_ZATM is not set
+# CONFIG_ATM_AMBASSADOR is not set
+# CONFIG_ATM_HORIZON is not set
 CONFIG_ATM_HE=m
 # CONFIG_ATM_HE_USE_SUNI is not set
 
 #
 # Distributed Switch Architecture drivers
 #
+CONFIG_DE4X5=m
 CONFIG_IGB_DCA=y
 CONFIG_IXGBE_DCA=y
 CONFIG_IXGBEVF=m
-# CONFIG_ZNET is not set
 CONFIG_MLX4_EN=m
 CONFIG_MLX4_CORE=m
 CONFIG_MLX4_DEBUG=y
@@ -382,6 +405,13 @@ CONFIG_AIRO=m
 CONFIG_XEN_NETDEV_FRONTEND=m
 CONFIG_XEN_NETDEV_BACKEND=m
 
+#
+# HiSax supported cards
+#
+CONFIG_HISAX_NETJET=y
+CONFIG_HISAX_NETJET_U=y
+CONFIG_HISAX_ENTERNOW_PCI=y
+
 #
 # Input Device Drivers
 #
@@ -407,6 +437,7 @@ CONFIG_SYNCLINK=m
 #
 CONFIG_SERIAL_8250_PNP=y
 CONFIG_FIX_EARLYCON_MEM=y
+CONFIG_SERIAL_8250_DW=m
 
 #
 # Non-8250 serial port support
@@ -427,6 +458,7 @@ CONFIG_HANGCHECK_TIMER=m
 # PC SMBus host controller drivers
 #
 CONFIG_I2C_AMD756_S4882=m
+CONFIG_I2C_ISMT=m
 CONFIG_I2C_NFORCE2_S4985=m
 
 #
@@ -434,6 +466,12 @@ CONFIG_I2C_NFORCE2_S4985=m
 #
 CONFIG_I2C_SCMI=m
 
+#
+# I2C system bus drivers (mostly embedded / system-on-chip)
+#
+CONFIG_I2C_DESIGNWARE_CORE=m
+CONFIG_I2C_DESIGNWARE_PLATFORM=m
+
 #
 # Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks.
 #
@@ -445,6 +483,7 @@ CONFIG_GPIO_ACPI=y
 # CONFIG_GPIO_IT8761E is not set
 CONFIG_GPIO_SCH=m
 CONFIG_GPIO_ICH=m
+# CONFIG_GPIO_LYNXPOINT is not set
 
 #
 # PCI GPIO expanders:
@@ -472,6 +511,7 @@ CONFIG_SENSORS_APPLESMC=m
 CONFIG_SENSORS_ACPI_POWER=m
 CONFIG_SENSORS_ATK0110=m
 CONFIG_CPU_THERMAL=y
+CONFIG_INTEL_POWERCLAMP=m
 
 #
 # Watchdog Device Drivers
@@ -535,6 +575,8 @@ CONFIG_VIDEO_MEYE=m
 # Media digital TV PCI Adapters
 #
 CONFIG_VIDEO_VIA_CAMERA=m
+CONFIG_VIDEO_SH_MOBILE_CSI2=m
+CONFIG_VIDEO_SH_MOBILE_CEU=m
 
 #
 # Graphics support
@@ -545,18 +587,18 @@ CONFIG_AGP_INTEL=y
 CONFIG_AGP_SIS=y
 CONFIG_AGP_VIA=y
 CONFIG_VGA_SWITCHEROO=y
-CONFIG_DRM_RADEON=m
-CONFIG_DRM_RADEON_KMS=y
-CONFIG_DRM_NOUVEAU=m
-CONFIG_NOUVEAU_DEBUG=5
-CONFIG_NOUVEAU_DEBUG_DEFAULT=3
-CONFIG_DRM_NOUVEAU_BACKLIGHT=y
 
 #
 # I2C encoder or helper chips
 #
 # CONFIG_DRM_I2C_CH7006 is not set
 # CONFIG_DRM_I2C_SIL164 is not set
+CONFIG_DRM_RADEON=m
+# CONFIG_DRM_RADEON_UMS is not set
+CONFIG_DRM_NOUVEAU=m
+CONFIG_NOUVEAU_DEBUG=5
+CONFIG_NOUVEAU_DEBUG_DEFAULT=3
+CONFIG_DRM_NOUVEAU_BACKLIGHT=y
 CONFIG_DRM_I810=m
 CONFIG_DRM_I915=m
 CONFIG_DRM_I915_KMS=y
@@ -657,6 +699,8 @@ CONFIG_EDAC_I7300=m
 #
 # CONFIG_INTEL_MID_DMAC is not set
 CONFIG_INTEL_IOATDMA=m
+CONFIG_DW_DMAC=m
+# CONFIG_DW_DMAC_BIG_ENDIAN_IO is not set
 CONFIG_PCH_DMA=m
 
 #
@@ -691,17 +735,20 @@ CONFIG_XEN_PRIVCMD=m
 CONFIG_XEN_ACPI_PROCESSOR=m
 CONFIG_XEN_HAVE_PVMMU=y
 # CONFIG_SLICOSS is not set
-# CONFIG_COMEDI is not set
+
+#
+# Triggers - standalone
+#
 # CONFIG_ACPI_QUICKSTART is not set
 
 #
 # Android
 #
-CONFIG_SB105X=m
 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
@@ -744,6 +791,12 @@ CONFIG_MXM_WMI=m
 CONFIG_INTEL_OAKTRAIL=m
 CONFIG_SAMSUNG_Q10=m
 # CONFIG_APPLE_GMUX is not set
+CONFIG_COMMON_CLK=y
+
+#
+# Common Clock Framework
+#
+# CONFIG_COMMON_CLK_DEBUG is not set
 
 #
 # Hardware Spinlock drivers
@@ -758,7 +811,7 @@ CONFIG_INTEL_IOMMU=y
 CONFIG_INTEL_IOMMU_FLOPPY_WA=y
 
 #
-# Rpmsg drivers (EXPERIMENTAL)
+# Magnetometer sensors
 #
 # CONFIG_PWM is not set
 
@@ -797,12 +850,17 @@ CONFIG_HARDLOCKUP_DETECTOR=y
 CONFIG_BOOTPARAM_HARDLOCKUP_PANIC_VALUE=0
 # CONFIG_DEBUG_VIRTUAL is not set
 CONFIG_ARCH_WANT_FRAME_POINTERS=y
+
+#
+# RCU Debugging
+#
 CONFIG_RCU_CPU_STALL_TIMEOUT=60
 # CONFIG_RCU_CPU_STALL_INFO is not set
 # CONFIG_DEBUG_PER_CPU_MAPS is not set
 CONFIG_USER_STACKTRACE_SUPPORT=y
 CONFIG_FTRACE_SYSCALLS=y
 # CONFIG_UPROBE_EVENT is not set
+CONFIG_DYNAMIC_FTRACE_WITH_REGS=y
 # CONFIG_MMIOTRACE is not set
 # CONFIG_X86_VERBOSE_BOOTUP is not set
 CONFIG_EARLY_PRINTK=y
@@ -890,6 +948,7 @@ CONFIG_CRYPTO_XTS=y
 # Digest
 #
 CONFIG_CRYPTO_CRC32C_INTEL=y
+CONFIG_CRYPTO_CRC32_PCLMUL=m
 
 #
 # Ciphers
@@ -919,3 +978,4 @@ CONFIG_GENERIC_FIND_FIRST_BIT=y
 CONFIG_GENERIC_IOMAP=y
 CONFIG_GENERIC_ALLOCATOR=y
 CONFIG_CPU_RMAP=y
+CONFIG_UCS2_STRING=y
index 42e9fec1bef4b4a71a51fe2700fbef6e38dcf979..c2f69c2df621c4d104745de698637e97ab8e40d1 100644 (file)
@@ -14,6 +14,11 @@ CONFIG_ARCH_HWEIGHT_CFLAGS="-fcall-saved-rdi -fcall-saved-rsi -fcall-saved-rdx -
 CONFIG_ARCH_CLOCKSOURCE_DATA=y
 CONFIG_GENERIC_TIME_VSYSCALL=y
 
+#
+# CPU/Task time and stats accounting
+#
+# CONFIG_VIRT_CPU_ACCOUNTING_GEN is not set
+
 #
 # RCU Subsystem
 #
@@ -27,6 +32,7 @@ CONFIG_RCU_FANOUT=64
 CONFIG_ARCH_WANT_COMPAT_IPC_PARSE_VERSION=y
 CONFIG_ARCH_WANT_OLD_COMPAT_IPC=y
 CONFIG_MODULES_USE_ELF_RELA=y
+CONFIG_COMPAT_OLD_SIGACTION=y
 
 #
 # Partition Types
@@ -159,13 +165,18 @@ CONFIG_AMD_IOMMU=y
 CONFIG_AMD_IOMMU_STATS=y
 CONFIG_IRQ_REMAP=y
 
+#
+# Magnetometer sensors
+#
+# CONFIG_NTB is not set
+
 #
 # File systems
 #
 CONFIG_QUOTACTL_COMPAT=y
 
 #
-# Kernel hacking
+# RCU Debugging
 #
 # CONFIG_DEBUG_TLBFLUSH is not set
 # CONFIG_IOMMU_DEBUG is not set
index 5a1099bdb943929b14ee1caa3244a71781b2b5aa..a9199fd42f95bef793fc4edd8ffbe17b52b87521 100644 (file)
@@ -4,8 +4,8 @@
 ###############################################################################
 
 name       = kernel
-version    = 3.8.6
-release    = 2
+version    = 3.9.3
+release    = 0.1
 thisapp    = linux-%{version}
 
 maintainer = Arne Fitzenreiter <arne.fitzenreiter@ipfire.org>
@@ -39,6 +39,7 @@ build
        requires
                asciidoc
                audit-devel
+               bc
                binutils >= 2.23.51.0.3-3
                binutils-devel
                bison
@@ -104,14 +105,14 @@ build
        end
 
        if "%{DISTRO_ARCH}" == "armv7hl"
+               # Build the default unified kernel.
+               build_kernel_default = 1
+
                # Build a kernel for Samsung's Exynos SoCs.
                build_kernel_exynos = 1
 
-               # Build a kernel for TI OMAP SoCs.
-               build_kernel_omap = 1
-
                kernel_arch = arm
-               kernel_target = uImage
+               kernel_target = zImage
        end
 
        # mkimage is a requirement to build uImage images.
@@ -139,11 +140,6 @@ build
                kernels += kirkwood
        end
 
-       # Build ARM omap kernel.
-       if "%{build_kernel_omap}" == "1"
-               kernels += omap
-       end
-
        prepare_cmds
                rm -f %{DIR_APP}/localversion-grsec
 
@@ -458,18 +454,43 @@ packages
        end
 
        if "%{build_kernel_default}" == "1"
-               package kernel
-                       template KERNEL
+               if "%{DISTRO_ARCH}" == "armv7hl"
+                       package kernel
+                               template KERNEL
 
-                       kernel_name = kernel
-                       kernel_release = %{fullver}
-               end
+                               kernel_name = kernel
+                               kernel_release = %{fullver}
 
-               package kernel-devel
-                       template KERNELDEVEL
+                               # Replace the OMAP kernel.
+                               obsoletes += kernel-omap < %{kernel_release}
+                               conflicts += kernel-omap < %{kernel_release}
+                       end
+
+                       package kernel-devel
+                               template KERNELDEVEL
+
+                               kernel_name = kernel
+                               kernel_release = %{fullver}
+
+                               # Replace the OMAP kernel.
+                               obsoletes += kernel-omap-devel < %{kernel_release}
+                               conflicts += kernel-omap-devel < %{kernel_release}
+                       end
 
-                       kernel_name = kernel
-                       kernel_release = %{fullver}
+               else
+                       package kernel
+                               template KERNEL
+
+                               kernel_name = kernel
+                               kernel_release = %{fullver}
+                       end
+
+                       package kernel-devel
+                               template KERNELDEVEL
+
+                               kernel_name = kernel
+                               kernel_release = %{fullver}
+                       end
                end
        end
 
@@ -521,22 +542,6 @@ packages
                end
        end
 
-       if "%{build_kernel_omap}" == "1"
-               package kernel-omap
-                       template KERNEL
-
-                       kernel_name = kernel-omap
-                       kernel_release = %{fullver}.omap
-               end
-
-               package kernel-omap-devel
-                       template KERNELDEVEL
-
-                       kernel_name = kernel-omap
-                       kernel_release = %{fullver}.omap
-               end
-       end
-
        package kernel-headers
                summary = Header files of the kernel release %{fullver}.
                desciption = %{summary}
similarity index 93%
rename from kernel/patches/grsecurity-2.9.1-3.8.6-201304091939.patch
rename to kernel/patches/grsecurity-2.9.1-3.9.3-201305201732.patch
index 9f38e0fe3794163b224541560b946f3c78eca1fc..b6dd68f7531ba2484b0af168f0b62d9d442a76a8 100644 (file)
@@ -225,10 +225,10 @@ index b89a739..b47493f 100644
 +zconf.lex.c
  zoffset.h
 diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
-index 986614d..e8bfedc 100644
+index 8ccbf27..afffeb4 100644
 --- a/Documentation/kernel-parameters.txt
 +++ b/Documentation/kernel-parameters.txt
-@@ -922,6 +922,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
+@@ -948,6 +948,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
                        Format: <unsigned int> such that (rxsize & ~0x1fffc0) == 0.
                        Default: 1024
  
@@ -239,7 +239,7 @@ index 986614d..e8bfedc 100644
        hashdist=       [KNL,NUMA] Large hashes allocated during boot
                        are distributed across NUMA nodes.  Defaults on
                        for 64-bit NUMA, off otherwise.
-@@ -2121,6 +2125,18 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
+@@ -2147,6 +2151,18 @@ 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.
  
@@ -259,7 +259,7 @@ index 986614d..e8bfedc 100644
  
        pcd.            [PARIDE]
 diff --git a/Makefile b/Makefile
-index 10075d6..dcb3e14 100644
+index 01003d4..da43c4a 100644
 --- a/Makefile
 +++ b/Makefile
 @@ -241,8 +241,9 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
@@ -269,7 +269,7 @@ index 10075d6..dcb3e14 100644
 -HOSTCFLAGS   = -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer
 -HOSTCXXFLAGS = -O2
 +HOSTCFLAGS   = -Wall -W -Wmissing-prototypes -Wstrict-prototypes -Wno-unused-parameter -Wno-missing-field-initializers -O2 -fomit-frame-pointer -fno-delete-null-pointer-checks
-+HOSTCLFAGS  += $(call cc-option, -Wno-empty-body)
++HOSTCFLAGS  += $(call cc-option, -Wno-empty-body)
 +HOSTCXXFLAGS = -O2 -Wall -W -fno-delete-null-pointer-checks
  
  # Decide whether to build built-in, modular, or both.
@@ -285,7 +285,7 @@ index 10075d6..dcb3e14 100644
        $(Q)$(MAKE) $(build)=scripts/basic
        $(Q)rm -f .tmp_quiet_recordmcount
  
-@@ -575,6 +576,65 @@ else
+@@ -576,6 +577,65 @@ else
  KBUILD_CFLAGS += -O2
  endif
  
@@ -351,7 +351,7 @@ index 10075d6..dcb3e14 100644
  include $(srctree)/arch/$(SRCARCH)/Makefile
  
  ifdef CONFIG_READABLE_ASM
-@@ -731,7 +791,7 @@ export mod_sign_cmd
+@@ -733,7 +793,7 @@ export mod_sign_cmd
  
  
  ifeq ($(KBUILD_EXTMOD),)
@@ -360,7 +360,7 @@ index 10075d6..dcb3e14 100644
  
  vmlinux-dirs  := $(patsubst %/,%,$(filter %/, $(init-y) $(init-m) \
                     $(core-y) $(core-m) $(drivers-y) $(drivers-m) \
-@@ -778,6 +838,8 @@ endif
+@@ -780,6 +840,8 @@ endif
  
  # The actual objects are generated when descending, 
  # make sure no implicit rule kicks in
@@ -369,7 +369,7 @@ index 10075d6..dcb3e14 100644
  $(sort $(vmlinux-deps)): $(vmlinux-dirs) ;
  
  # Handle descending into subdirectories listed in $(vmlinux-dirs)
-@@ -787,7 +849,7 @@ $(sort $(vmlinux-deps)): $(vmlinux-dirs) ;
+@@ -789,7 +851,7 @@ $(sort $(vmlinux-deps)): $(vmlinux-dirs) ;
  # Error messages still appears in the original language
  
  PHONY += $(vmlinux-dirs)
@@ -378,7 +378,7 @@ index 10075d6..dcb3e14 100644
        $(Q)$(MAKE) $(build)=$@
  
  # Store (new) KERNELRELASE string in include/config/kernel.release
-@@ -831,6 +893,7 @@ prepare0: archprepare FORCE
+@@ -833,6 +895,7 @@ prepare0: archprepare FORCE
        $(Q)$(MAKE) $(build)=.
  
  # All the preparing..
@@ -386,7 +386,7 @@ index 10075d6..dcb3e14 100644
  prepare: prepare0
  
  # Generate some files
-@@ -938,6 +1001,8 @@ all: modules
+@@ -940,6 +1003,8 @@ all: modules
  #     using awk while concatenating to the final file.
  
  PHONY += modules
@@ -395,7 +395,7 @@ index 10075d6..dcb3e14 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.';
-@@ -953,7 +1018,7 @@ modules.builtin: $(vmlinux-dirs:%=%/modules.builtin)
+@@ -955,7 +1020,7 @@ modules.builtin: $(vmlinux-dirs:%=%/modules.builtin)
  
  # Target to prepare building external modules
  PHONY += modules_prepare
@@ -404,7 +404,7 @@ index 10075d6..dcb3e14 100644
  
  # Target to install modules
  PHONY += modules_install
-@@ -1019,7 +1084,7 @@ MRPROPER_FILES += .config .config.old .version .old_version $(version_h) \
+@@ -1021,7 +1086,7 @@ 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             \
@@ -413,7 +413,7 @@ index 10075d6..dcb3e14 100644
  
  # clean - Delete most, but leave enough to build external modules
  #
-@@ -1059,6 +1124,7 @@ distclean: mrproper
+@@ -1061,6 +1126,7 @@ distclean: mrproper
                \( -name '*.orig' -o -name '*.rej' -o -name '*~' \
                -o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \
                -o -name '.*.rej' \
@@ -421,7 +421,7 @@ index 10075d6..dcb3e14 100644
                -o -name '*%' -o -name '.*.cmd' -o -name 'core' \) \
                -type f -print | xargs rm -f
  
-@@ -1219,6 +1285,8 @@ PHONY += $(module-dirs) modules
+@@ -1221,6 +1287,8 @@ PHONY += $(module-dirs) modules
  $(module-dirs): crmodverdir $(objtree)/Module.symvers
        $(Q)$(MAKE) $(build)=$(patsubst _module_%,%,$@)
  
@@ -430,7 +430,7 @@ index 10075d6..dcb3e14 100644
  modules: $(module-dirs)
        @$(kecho) '  Building modules, stage 2.';
        $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
-@@ -1355,17 +1423,21 @@ else
+@@ -1357,17 +1425,21 @@ else
          target-dir = $(if $(KBUILD_EXTMOD),$(dir $<),$(dir $@))
  endif
  
@@ -456,7 +456,7 @@ index 10075d6..dcb3e14 100644
        $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
  %.symtypes: %.c prepare scripts FORCE
        $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
-@@ -1375,11 +1447,15 @@ endif
+@@ -1377,11 +1449,15 @@ endif
        $(cmd_crmodverdir)
        $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
        $(build)=$(build-dir)
@@ -592,10 +592,10 @@ index 2fd00b7..cfd5069 100644
  
        for (i = 0; i < n; i++) {
 diff --git a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c
-index 14db93e..47bed62 100644
+index b9e37ad..44c24e7 100644
 --- a/arch/alpha/kernel/osf_sys.c
 +++ b/arch/alpha/kernel/osf_sys.c
-@@ -1295,16 +1295,16 @@ SYSCALL_DEFINE1(old_adjtimex, struct timex32 __user *, txc_p)
+@@ -1297,10 +1297,11 @@ SYSCALL_DEFINE1(old_adjtimex, struct timex32 __user *, txc_p)
     generic version except that we know how to honor ADDR_LIMIT_32BIT.  */
  
  static unsigned long
@@ -604,19 +604,20 @@ index 14db93e..47bed62 100644
 +arch_get_unmapped_area_1(struct file *filp, unsigned long addr, unsigned long len,
 +                       unsigned long limit, unsigned long flags)
  {
-       struct vm_area_struct *vma = find_vma(current->mm, addr);
--
+       struct vm_unmapped_area_info info;
 +      unsigned long offset = gr_rand_threadstack_offset(current->mm, filp, flags);
-       while (1) {
-               /* At this point:  (!vma || addr < vma->vm_end). */
-               if (limit - len < addr)
-                       return -ENOMEM;
--              if (!vma || addr + len <= vma->vm_start)
-+              if (check_heap_stack_gap(vma, addr, len, offset))
-                       return addr;
-               addr = vma->vm_end;
-               vma = vma->vm_next;
-@@ -1340,20 +1340,24 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
+       info.flags = 0;
+       info.length = len;
+@@ -1308,6 +1309,7 @@ arch_get_unmapped_area_1(unsigned long addr, unsigned long len,
+       info.high_limit = limit;
+       info.align_mask = 0;
+       info.align_offset = 0;
++      info.threadstack_offset = offset;
+       return vm_unmapped_area(&info);
+ }
+@@ -1340,20 +1342,24 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
           merely specific addresses, but regions of memory -- perhaps
           this feature should be incorporated into all ports?  */
  
@@ -806,27 +807,10 @@ index 0c4132d..88f0d53 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 67874b8..9aa2d62 100644
+index 1cacda4..2cef624 100644
 --- a/arch/arm/Kconfig
 +++ b/arch/arm/Kconfig
-@@ -1427,6 +1427,16 @@ config ARM_ERRATA_775420
-        to deadlock. This workaround puts DSB before executing ISB if
-        an abort may occur on cache maintenance.
-+config ARM_ERRATA_798181
-+      bool "ARM errata: TLBI/DSB failure on Cortex-A15"
-+      depends on CPU_V7 && SMP
-+      help
-+        On Cortex-A15 (r0p0..r3p2) the TLBI*IS/DSB operations are not
-+        adequately shooting down all use of the old entries. This
-+        option enables the Linux kernel workaround for this erratum
-+        which sends an IPI to the CPUs that are running the same ASID
-+        as the one being invalidated.
-+
- endmenu
- source "arch/arm/common/Kconfig"
-@@ -1813,7 +1823,7 @@ config ALIGNMENT_TRAP
+@@ -1850,7 +1850,7 @@ config ALIGNMENT_TRAP
  
  config UACCESS_WITH_MEMCPY
        bool "Use kernel mem{cpy,set}() for {copy_to,clear}_user()"
@@ -835,28 +819,6 @@ index 67874b8..9aa2d62 100644
        default y if CPU_FEROCEON
        help
          Implement faster copy_to_user and clear_user methods for CPU
-diff --git a/arch/arm/common/gic.c b/arch/arm/common/gic.c
-index 87dfa902..3a523fc 100644
---- a/arch/arm/common/gic.c
-+++ b/arch/arm/common/gic.c
-@@ -81,7 +81,7 @@ static u8 gic_cpu_map[NR_GIC_CPU_IF] __read_mostly;
-  * Supported arch specific GIC irq extension.
-  * Default make them NULL.
-  */
--struct irq_chip gic_arch_extn = {
-+irq_chip_no_const gic_arch_extn __read_only = {
-       .irq_eoi        = NULL,
-       .irq_mask       = NULL,
-       .irq_unmask     = NULL,
-@@ -329,7 +329,7 @@ static void gic_handle_cascade_irq(unsigned int irq, struct irq_desc *desc)
-       chained_irq_exit(chip, desc);
- }
--static struct irq_chip gic_chip = {
-+static irq_chip_no_const gic_chip __read_only = {
-       .name                   = "GIC",
-       .irq_mask               = gic_mask_irq,
-       .irq_unmask             = gic_unmask_irq,
 diff --git a/arch/arm/include/asm/atomic.h b/arch/arm/include/asm/atomic.h
 index c79f61f..9ac0642 100644
 --- a/arch/arm/include/asm/atomic.h
@@ -1547,7 +1509,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 7eb18c1..e38b6d2 100644
+index 4f009c1..466c59b 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
@@ -1559,33 +1521,6 @@ index 7eb18c1..e38b6d2 100644
  
  #include <asm-generic/cmpxchg-local.h>
  
-diff --git a/arch/arm/include/asm/delay.h b/arch/arm/include/asm/delay.h
-index 720799f..2f67631 100644
---- a/arch/arm/include/asm/delay.h
-+++ b/arch/arm/include/asm/delay.h
-@@ -25,9 +25,9 @@ extern struct arm_delay_ops {
-       void (*const_udelay)(unsigned long);
-       void (*udelay)(unsigned long);
-       bool const_clock;
--} arm_delay_ops;
-+} *arm_delay_ops;
--#define __delay(n)            arm_delay_ops.delay(n)
-+#define __delay(n)            arm_delay_ops->delay(n)
- /*
-  * This function intentionally does not exist; if you see references to
-@@ -48,8 +48,8 @@ extern void __bad_udelay(void);
-  * first constant multiplications gets optimized away if the delay is
-  * a constant)
-  */
--#define __udelay(n)           arm_delay_ops.udelay(n)
--#define __const_udelay(n)     arm_delay_ops.const_udelay(n)
-+#define __udelay(n)           arm_delay_ops->udelay(n)
-+#define __const_udelay(n)     arm_delay_ops->const_udelay(n)
- #define udelay(n)                                                     \
-       (__builtin_constant_p(n) ?                                      \
 diff --git a/arch/arm/include/asm/domain.h b/arch/arm/include/asm/domain.h
 index 6ddbe44..b5e38b1 100644
 --- a/arch/arm/include/asm/domain.h
@@ -1746,40 +1681,6 @@ index e42cf59..7b94b8f 100644
        pagefault_enable();     /* subsumes preempt_enable() */
  
        if (!ret) {
-diff --git a/arch/arm/include/asm/hardware/gic.h b/arch/arm/include/asm/hardware/gic.h
-index 4b1ce6c..bea3f73 100644
---- a/arch/arm/include/asm/hardware/gic.h
-+++ b/arch/arm/include/asm/hardware/gic.h
-@@ -34,9 +34,10 @@
- #ifndef __ASSEMBLY__
- #include <linux/irqdomain.h>
-+#include <linux/irq.h>
- struct device_node;
--extern struct irq_chip gic_arch_extn;
-+extern irq_chip_no_const gic_arch_extn;
- void gic_init_bases(unsigned int, int, void __iomem *, void __iomem *,
-                   u32 offset, struct device_node *);
-diff --git a/arch/arm/include/asm/highmem.h b/arch/arm/include/asm/highmem.h
-index 8c5e828..91b99ab 100644
---- a/arch/arm/include/asm/highmem.h
-+++ b/arch/arm/include/asm/highmem.h
-@@ -41,6 +41,13 @@ extern void kunmap_high(struct page *page);
- #endif
- #endif
-+/*
-+ * Needed to be able to broadcast the TLB invalidation for kmap.
-+ */
-+#ifdef CONFIG_ARM_ERRATA_798181
-+#undef ARCH_NEEDS_KMAP_HIGH_GET
-+#endif
-+
- #ifdef ARCH_NEEDS_KMAP_HIGH_GET
- extern void *kmap_high_get(struct page *page);
- #else
 diff --git a/arch/arm/include/asm/kmap_types.h b/arch/arm/include/asm/kmap_types.h
 index 83eb2f7..ed77159 100644
 --- a/arch/arm/include/asm/kmap_types.h
@@ -1828,21 +1729,8 @@ index 2fe141f..192dc01 100644
  
  #ifdef CONFIG_MMU
  extern void iotable_init(struct map_desc *, int);
-diff --git a/arch/arm/include/asm/mmu_context.h b/arch/arm/include/asm/mmu_context.h
-index 863a661..a7b85e0 100644
---- a/arch/arm/include/asm/mmu_context.h
-+++ b/arch/arm/include/asm/mmu_context.h
-@@ -27,6 +27,8 @@ void __check_vmalloc_seq(struct mm_struct *mm);
- void check_and_switch_context(struct mm_struct *mm, struct task_struct *tsk);
- #define init_new_context(tsk,mm)      ({ atomic64_set(&mm->context.id, 0); 0; })
-+DECLARE_PER_CPU(atomic64_t, active_asids);
-+
- #else /* !CONFIG_CPU_HAS_ASID */
- #ifdef CONFIG_MMU
 diff --git a/arch/arm/include/asm/outercache.h b/arch/arm/include/asm/outercache.h
-index 53426c6..c7baff3 100644
+index 12f71a1..04e063c 100644
 --- a/arch/arm/include/asm/outercache.h
 +++ b/arch/arm/include/asm/outercache.h
 @@ -35,7 +35,7 @@ struct outer_cache_fns {
@@ -1977,17 +1865,10 @@ index f97ee02..07f1be5 100644
  /*
   * These are the memory types, defined to be compatible with
 diff --git a/arch/arm/include/asm/pgtable-3level-hwdef.h b/arch/arm/include/asm/pgtable-3level-hwdef.h
-index d795282..a43ea90 100644
+index 18f5cef..25b8f43 100644
 --- a/arch/arm/include/asm/pgtable-3level-hwdef.h
 +++ b/arch/arm/include/asm/pgtable-3level-hwdef.h
-@@ -32,15 +32,18 @@
- #define PMD_TYPE_SECT         (_AT(pmdval_t, 1) << 0)
- #define PMD_BIT4              (_AT(pmdval_t, 0))
- #define PMD_DOMAIN(x)         (_AT(pmdval_t, 0))
-+#define PMD_PXNTABLE          (_AT(pmdval_t, 1) << 59) /* PXNTable */
- /*
-  *   - section
+@@ -41,6 +41,7 @@
   */
  #define PMD_SECT_BUFFERABLE   (_AT(pmdval_t, 1) << 2)
  #define PMD_SECT_CACHEABLE    (_AT(pmdval_t, 1) << 3)
@@ -1995,11 +1876,7 @@ index d795282..a43ea90 100644
  #define PMD_SECT_S            (_AT(pmdval_t, 3) << 8)
  #define PMD_SECT_AF           (_AT(pmdval_t, 1) << 10)
  #define PMD_SECT_nG           (_AT(pmdval_t, 1) << 11)
-+#define PMD_SECT_PXN          (_AT(pmdval_t, 1) << 53)
- #define PMD_SECT_XN           (_AT(pmdval_t, 1) << 54)
- #define PMD_SECT_AP_WRITE     (_AT(pmdval_t, 0))
- #define PMD_SECT_AP_READ      (_AT(pmdval_t, 0))
-@@ -66,6 +69,7 @@
+@@ -71,6 +72,7 @@
  #define PTE_EXT_SHARED                (_AT(pteval_t, 3) << 8)         /* SH[1:0], inner shareable */
  #define PTE_EXT_AF            (_AT(pteval_t, 1) << 10)        /* Access Flag */
  #define PTE_EXT_NG            (_AT(pteval_t, 1) << 11)        /* nG */
@@ -2008,7 +1885,7 @@ index d795282..a43ea90 100644
  
  /*
 diff --git a/arch/arm/include/asm/pgtable-3level.h b/arch/arm/include/asm/pgtable-3level.h
-index a3f3792..7b932a6 100644
+index 86b8fe3..e25f975 100644
 --- a/arch/arm/include/asm/pgtable-3level.h
 +++ b/arch/arm/include/asm/pgtable-3level.h
 @@ -74,6 +74,7 @@
@@ -2028,7 +1905,7 @@ index a3f3792..7b932a6 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 c094749..a6ff605 100644
+index 9bcd262..fba731c 100644
 --- a/arch/arm/include/asm/pgtable.h
 +++ b/arch/arm/include/asm/pgtable.h
 @@ -30,6 +30,9 @@
@@ -2102,7 +1979,7 @@ index c094749..a6ff605 100644
  /*
   * This is the lowest virtual address we can permit any user space
   * mapping to be mapped at.  This is particularly important for
-@@ -63,8 +113,8 @@ extern void __pgd_error(const char *file, int line, pgd_t);
+@@ -72,8 +122,8 @@ extern void __pgd_error(const char *file, int line, pgd_t);
  /*
   * The pgprot_* and protection_map entries will be fixed up in runtime
   * to include the cachable and bufferable bits based on memory policy,
@@ -2113,7 +1990,7 @@ index c094749..a6ff605 100644
   */
  #define _L_PTE_DEFAULT        L_PTE_PRESENT | L_PTE_YOUNG
  
-@@ -241,7 +291,7 @@ static inline pte_t pte_mkspecial(pte_t pte) { return pte; }
+@@ -257,7 +307,7 @@ static inline pte_t pte_mkspecial(pte_t pte) { return pte; }
  static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
  {
        const pteval_t mask = L_PTE_XN | L_PTE_RDONLY | L_PTE_USER |
@@ -2151,6 +2028,19 @@ index 06e7d50..8a8e251 100644
        nommu_start_thread(regs);                                       \
  })
  
+diff --git a/arch/arm/include/asm/psci.h b/arch/arm/include/asm/psci.h
+index ce0dbe7..c085b6f 100644
+--- a/arch/arm/include/asm/psci.h
++++ b/arch/arm/include/asm/psci.h
+@@ -29,7 +29,7 @@ struct psci_operations {
+       int (*cpu_off)(struct psci_power_state state);
+       int (*cpu_on)(unsigned long cpuid, unsigned long entry_point);
+       int (*migrate)(unsigned long cpuid);
+-};
++} __no_const;
+ extern struct psci_operations psci_ops;
 diff --git a/arch/arm/include/asm/smp.h b/arch/arm/include/asm/smp.h
 index d3a22be..3a69ad5 100644
 --- a/arch/arm/include/asm/smp.h
@@ -2207,32 +2097,6 @@ index cddda1f..ff357f7 100644
  
  /*
   * Change these and you break ASM code in entry-common.S
-diff --git a/arch/arm/include/asm/tlbflush.h b/arch/arm/include/asm/tlbflush.h
-index 6e924d3..a9f3ddf 100644
---- a/arch/arm/include/asm/tlbflush.h
-+++ b/arch/arm/include/asm/tlbflush.h
-@@ -430,6 +430,21 @@ static inline void local_flush_tlb_kernel_page(unsigned long kaddr)
-       }
- }
-+#ifdef CONFIG_ARM_ERRATA_798181
-+static inline void dummy_flush_tlb_a15_erratum(void)
-+{
-+      /*
-+       * Dummy TLBIMVAIS. Using the unmapped address 0 and ASID 0.
-+       */
-+      asm("mcr p15, 0, %0, c8, c3, 1" : : "r" (0));
-+      dsb();
-+}
-+#else
-+static inline void dummy_flush_tlb_a15_erratum(void)
-+{
-+}
-+#endif
-+
- /*
-  *    flush_pmd_entry
-  *
 diff --git a/arch/arm/include/asm/uaccess.h b/arch/arm/include/asm/uaccess.h
 index 7e1f760..752fcb7 100644
 --- a/arch/arm/include/asm/uaccess.h
@@ -2630,7 +2494,7 @@ index 0f82098..3dbd3ee 100644
  #endif
        mov     r5, r0
 diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S
-index a6c301e..908821b 100644
+index fefd7f9..e6f250e 100644
 --- a/arch/arm/kernel/entry-common.S
 +++ b/arch/arm/kernel/entry-common.S
 @@ -10,18 +10,46 @@
@@ -2683,7 +2547,7 @@ index a6c301e..908821b 100644
        .align  5
  /*
   * This is the fast syscall return path.  We do as little as
-@@ -339,6 +367,7 @@ ENDPROC(ftrace_stub)
+@@ -351,6 +379,7 @@ ENDPROC(ftrace_stub)
  
        .align  5
  ENTRY(vector_swi)
@@ -2691,7 +2555,7 @@ index a6c301e..908821b 100644
        sub     sp, sp, #S_FRAME_SIZE
        stmia   sp, {r0 - r12}                  @ Calling r0 - r12
   ARM( add     r8, sp, #S_PC           )
-@@ -388,6 +417,12 @@ ENTRY(vector_swi)
+@@ -400,6 +429,12 @@ ENTRY(vector_swi)
        ldr     scno, [lr, #-4]                 @ get SWI instruction
  #endif
  
@@ -2800,7 +2664,7 @@ index 2adda11..7fbe958 100644
        flush_icache_range(0xffff001c, 0xffff001c + length);
        if (!vectors_high())
 diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S
-index e0eb9a1..caee108 100644
+index 8bac553..caee108 100644
 --- a/arch/arm/kernel/head.S
 +++ b/arch/arm/kernel/head.S
 @@ -52,7 +52,9 @@
@@ -2814,15 +2678,6 @@ index e0eb9a1..caee108 100644
        .endm
  
  /*
-@@ -267,7 +269,7 @@ __create_page_tables:
-       addne   r6, r6, #1 << SECTION_SHIFT
-       strne   r6, [r3]
--#if defined(CONFIG_LPAE) && defined(CONFIG_CPU_ENDIAN_BE8)
-+#if defined(CONFIG_ARM_LPAE) && defined(CONFIG_CPU_ENDIAN_BE8)
-       sub     r4, r4, #4                      @ Fixup page table pointer
-                                               @ for 64-bit descriptors
- #endif
 @@ -434,7 +436,7 @@ __enable_mmu:
        mov     r5, #(domain_val(DOMAIN_USER, DOMAIN_MANAGER) | \
                      domain_val(DOMAIN_KERNEL, DOMAIN_MANAGER) | \
@@ -2833,10 +2688,10 @@ index e0eb9a1..caee108 100644
        mcr     p15, 0, r4, c2, c0, 0           @ load page table pointer
  #endif
 diff --git a/arch/arm/kernel/hw_breakpoint.c b/arch/arm/kernel/hw_breakpoint.c
-index 5ff2e77..556d030 100644
+index 1fd749e..47adb08 100644
 --- a/arch/arm/kernel/hw_breakpoint.c
 +++ b/arch/arm/kernel/hw_breakpoint.c
-@@ -1011,7 +1011,7 @@ static int __cpuinit dbg_reset_notify(struct notifier_block *self,
+@@ -1029,7 +1029,7 @@ static int __cpuinit dbg_reset_notify(struct notifier_block *self,
        return NOTIFY_OK;
  }
  
@@ -2910,7 +2765,7 @@ index 07314af..c46655c 100644
        flush_icache_range((uintptr_t)(addr),
                           (uintptr_t)(addr) + size);
 diff --git a/arch/arm/kernel/perf_event_cpu.c b/arch/arm/kernel/perf_event_cpu.c
-index 5f66206..dce492f 100644
+index 1f2740e..b36e225 100644
 --- a/arch/arm/kernel/perf_event_cpu.c
 +++ b/arch/arm/kernel/perf_event_cpu.c
 @@ -171,7 +171,7 @@ static int __cpuinit cpu_pmu_notify(struct notifier_block *b,
@@ -2923,7 +2778,7 @@ index 5f66206..dce492f 100644
  };
  
 diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c
-index c6dec5f..e0fddd1 100644
+index 047d3e4..7e96107 100644
 --- a/arch/arm/kernel/process.c
 +++ b/arch/arm/kernel/process.c
 @@ -28,7 +28,6 @@
@@ -2934,7 +2789,7 @@ index c6dec5f..e0fddd1 100644
  #include <linux/hw_breakpoint.h>
  #include <linux/cpuidle.h>
  #include <linux/leds.h>
-@@ -256,9 +255,10 @@ void machine_power_off(void)
+@@ -251,9 +250,10 @@ void machine_power_off(void)
        machine_shutdown();
        if (pm_power_off)
                pm_power_off();
@@ -2946,7 +2801,7 @@ index c6dec5f..e0fddd1 100644
  {
        machine_shutdown();
  
-@@ -283,8 +283,8 @@ void __show_regs(struct pt_regs *regs)
+@@ -278,8 +278,8 @@ void __show_regs(struct pt_regs *regs)
                init_utsname()->release,
                (int)strcspn(init_utsname()->version, " "),
                init_utsname()->version);
@@ -2957,7 +2812,7 @@ index c6dec5f..e0fddd1 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,
-@@ -452,12 +452,6 @@ unsigned long get_wchan(struct task_struct *p)
+@@ -447,12 +447,6 @@ unsigned long get_wchan(struct task_struct *p)
        return 0;
  }
  
@@ -2970,7 +2825,7 @@ index c6dec5f..e0fddd1 100644
  #ifdef CONFIG_MMU
  /*
   * The vectors page is always readable from user space for the
-@@ -470,9 +464,8 @@ static int __init gate_vma_init(void)
+@@ -465,9 +459,8 @@ static int __init gate_vma_init(void)
  {
        gate_vma.vm_start       = 0xffff0000;
        gate_vma.vm_end         = 0xffff0000 + PAGE_SIZE;
@@ -2982,6 +2837,19 @@ index c6dec5f..e0fddd1 100644
        return 0;
  }
  arch_initcall(gate_vma_init);
+diff --git a/arch/arm/kernel/psci.c b/arch/arm/kernel/psci.c
+index 3653164..d83e55d 100644
+--- a/arch/arm/kernel/psci.c
++++ b/arch/arm/kernel/psci.c
+@@ -24,7 +24,7 @@
+ #include <asm/opcodes-virt.h>
+ #include <asm/psci.h>
+-struct psci_operations psci_ops;
++struct psci_operations psci_ops __read_only;
+ static int (*invoke_psci_fn)(u32, u32, u32, u32);
 diff --git a/arch/arm/kernel/ptrace.c b/arch/arm/kernel/ptrace.c
 index 03deeff..741ce88 100644
 --- a/arch/arm/kernel/ptrace.c
@@ -3007,10 +2875,10 @@ index 03deeff..741ce88 100644
        if (secure_computing(scno) == -1)
                return -1;
 diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
-index 3f6cbb2..39305c7 100644
+index 234e339..81264a1 100644
 --- a/arch/arm/kernel/setup.c
 +++ b/arch/arm/kernel/setup.c
-@@ -97,21 +97,23 @@ EXPORT_SYMBOL(system_serial_high);
+@@ -96,21 +96,23 @@ EXPORT_SYMBOL(system_serial_high);
  unsigned int elf_hwcap __read_mostly;
  EXPORT_SYMBOL(elf_hwcap);
  
@@ -3039,7 +2907,7 @@ index 3f6cbb2..39305c7 100644
  EXPORT_SYMBOL(outer_cache);
  #endif
  
-@@ -236,9 +238,13 @@ static int __get_cpu_architecture(void)
+@@ -235,9 +237,13 @@ static int __get_cpu_architecture(void)
                asm("mrc        p15, 0, %0, c0, c1, 4"
                    : "=r" (mmfr0));
                if ((mmfr0 & 0x0000000f) >= 0x00000003 ||
@@ -3055,7 +2923,7 @@ index 3f6cbb2..39305c7 100644
                         (mmfr0 & 0x000000f0) == 0x00000020)
                        cpu_arch = CPU_ARCH_ARMv6;
                else
-@@ -462,7 +468,7 @@ static void __init setup_processor(void)
+@@ -478,7 +484,7 @@ static void __init setup_processor(void)
        __cpu_architecture = __get_cpu_architecture();
  
  #ifdef MULTI_CPU
@@ -3064,20 +2932,11 @@ index 3f6cbb2..39305c7 100644
  #endif
  #ifdef MULTI_TLB
        cpu_tlb = *list->tlb;
-@@ -524,7 +530,7 @@ int __init arm_add_memory(phys_addr_t start, phys_addr_t size)
-       size -= start & ~PAGE_MASK;
-       bank->start = PAGE_ALIGN(start);
--#ifndef CONFIG_LPAE
-+#ifndef CONFIG_ARM_LPAE
-       if (bank->start + size < bank->start) {
-               printk(KERN_CRIT "Truncating memory at 0x%08llx to fit in "
-                       "32-bit physical address space\n", (long long)start);
 diff --git a/arch/arm/kernel/signal.c b/arch/arm/kernel/signal.c
-index 56f72d2..6924200 100644
+index 296786b..a8d4dd5 100644
 --- a/arch/arm/kernel/signal.c
 +++ b/arch/arm/kernel/signal.c
-@@ -433,22 +433,14 @@ setup_return(struct pt_regs *regs, struct k_sigaction *ka,
+@@ -396,22 +396,14 @@ setup_return(struct pt_regs *regs, struct ksignal *ksig,
                    __put_user(sigreturn_codes[idx+1], rc+1))
                        return 1;
  
@@ -3106,9 +2965,9 @@ index 56f72d2..6924200 100644
 +              retcode = ((unsigned long)rc) + thumb;
        }
  
-       regs->ARM_r0 = usig;
+       regs->ARM_r0 = map_sig(ksig->sig);
 diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c
-index 58af91c..343ce99 100644
+index 1f2cccc..f40c02e 100644
 --- a/arch/arm/kernel/smp.c
 +++ b/arch/arm/kernel/smp.c
 @@ -70,7 +70,7 @@ enum ipi_msg_type {
@@ -3120,132 +2979,8 @@ index 58af91c..343ce99 100644
  
  void __init smp_set_ops(struct smp_operations *ops)
  {
-diff --git a/arch/arm/kernel/smp_tlb.c b/arch/arm/kernel/smp_tlb.c
-index 02c5d2c..e5695ad 100644
---- a/arch/arm/kernel/smp_tlb.c
-+++ b/arch/arm/kernel/smp_tlb.c
-@@ -12,6 +12,7 @@
- #include <asm/smp_plat.h>
- #include <asm/tlbflush.h>
-+#include <asm/mmu_context.h>
- /**********************************************************************/
-@@ -64,12 +65,72 @@ static inline void ipi_flush_tlb_kernel_range(void *arg)
-       local_flush_tlb_kernel_range(ta->ta_start, ta->ta_end);
- }
-+#ifdef CONFIG_ARM_ERRATA_798181
-+static int erratum_a15_798181(void)
-+{
-+      unsigned int midr = read_cpuid_id();
-+
-+      /* Cortex-A15 r0p0..r3p2 affected */
-+      if ((midr & 0xff0ffff0) != 0x410fc0f0 || midr > 0x413fc0f2)
-+              return 0;
-+      return 1;
-+}
-+#else
-+static int erratum_a15_798181(void)
-+{
-+      return 0;
-+}
-+#endif
-+
-+static void ipi_flush_tlb_a15_erratum(void *arg)
-+{
-+      dmb();
-+}
-+
-+static void broadcast_tlb_a15_erratum(void)
-+{
-+      if (!erratum_a15_798181())
-+              return;
-+
-+      dummy_flush_tlb_a15_erratum();
-+      smp_call_function_many(cpu_online_mask, ipi_flush_tlb_a15_erratum,
-+                             NULL, 1);
-+}
-+
-+static void broadcast_tlb_mm_a15_erratum(struct mm_struct *mm)
-+{
-+      int cpu;
-+      cpumask_t mask = { CPU_BITS_NONE };
-+
-+      if (!erratum_a15_798181())
-+              return;
-+
-+      dummy_flush_tlb_a15_erratum();
-+      for_each_online_cpu(cpu) {
-+              if (cpu == smp_processor_id())
-+                      continue;
-+              /*
-+               * We only need to send an IPI if the other CPUs are running
-+               * the same ASID as the one being invalidated. There is no
-+               * need for locking around the active_asids check since the
-+               * switch_mm() function has at least one dmb() (as required by
-+               * this workaround) in case a context switch happens on
-+               * another CPU after the condition below.
-+               */
-+              if (atomic64_read(&mm->context.id) ==
-+                  atomic64_read(&per_cpu(active_asids, cpu)))
-+                      cpumask_set_cpu(cpu, &mask);
-+      }
-+      smp_call_function_many(&mask, ipi_flush_tlb_a15_erratum, NULL, 1);
-+}
-+
- void flush_tlb_all(void)
- {
-       if (tlb_ops_need_broadcast())
-               on_each_cpu(ipi_flush_tlb_all, NULL, 1);
-       else
-               local_flush_tlb_all();
-+      broadcast_tlb_a15_erratum();
- }
- void flush_tlb_mm(struct mm_struct *mm)
-@@ -78,6 +139,7 @@ void flush_tlb_mm(struct mm_struct *mm)
-               on_each_cpu_mask(mm_cpumask(mm), ipi_flush_tlb_mm, mm, 1);
-       else
-               local_flush_tlb_mm(mm);
-+      broadcast_tlb_mm_a15_erratum(mm);
- }
- void flush_tlb_page(struct vm_area_struct *vma, unsigned long uaddr)
-@@ -90,6 +152,7 @@ void flush_tlb_page(struct vm_area_struct *vma, unsigned long uaddr)
-                                       &ta, 1);
-       } else
-               local_flush_tlb_page(vma, uaddr);
-+      broadcast_tlb_mm_a15_erratum(vma->vm_mm);
- }
- void flush_tlb_kernel_page(unsigned long kaddr)
-@@ -100,6 +163,7 @@ void flush_tlb_kernel_page(unsigned long kaddr)
-               on_each_cpu(ipi_flush_tlb_kernel_page, &ta, 1);
-       } else
-               local_flush_tlb_kernel_page(kaddr);
-+      broadcast_tlb_a15_erratum();
- }
- void flush_tlb_range(struct vm_area_struct *vma,
-@@ -114,6 +178,7 @@ void flush_tlb_range(struct vm_area_struct *vma,
-                                       &ta, 1);
-       } else
-               local_flush_tlb_range(vma, start, end);
-+      broadcast_tlb_mm_a15_erratum(vma->vm_mm);
- }
- void flush_tlb_kernel_range(unsigned long start, unsigned long end)
-@@ -125,5 +190,6 @@ void flush_tlb_kernel_range(unsigned long start, unsigned long end)
-               on_each_cpu(ipi_flush_tlb_kernel_range, &ta, 1);
-       } else
-               local_flush_tlb_kernel_range(start, end);
-+      broadcast_tlb_a15_erratum();
- }
 diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c
-index b0179b8..829510e 100644
+index 1c08911..264f009 100644
 --- a/arch/arm/kernel/traps.c
 +++ b/arch/arm/kernel/traps.c
 @@ -57,7 +57,7 @@ static void dump_mem(const char *, const char *, unsigned long, unsigned long);
@@ -3306,7 +3041,7 @@ index b0179b8..829510e 100644
 +
  }
 diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S
-index 11c1785..c67d54c 100644
+index b571484..4b2fc9b 100644
 --- a/arch/arm/kernel/vmlinux.lds.S
 +++ b/arch/arm/kernel/vmlinux.lds.S
 @@ -8,7 +8,11 @@
@@ -3322,7 +3057,7 @@ index 11c1785..c67d54c 100644
  #define PROC_INFO                                                     \
        . = ALIGN(4);                                                   \
        VMLINUX_SYMBOL(__proc_info_begin) = .;                          \
-@@ -90,6 +94,11 @@ SECTIONS
+@@ -94,6 +98,11 @@ SECTIONS
                _text = .;
                HEAD_TEXT
        }
@@ -3334,18 +3069,27 @@ index 11c1785..c67d54c 100644
        .text : {                       /* Real text segment            */
                _stext = .;             /* Text and read-only data      */
                        __exception_text_start = .;
-@@ -144,6 +153,10 @@ SECTIONS
+@@ -116,6 +125,8 @@ SECTIONS
+                       ARM_CPU_KEEP(PROC_INFO)
+       }
  
-       _etext = .;                     /* End of text and rodata section */
++      _etext = .;                     /* End of text section */
++
+       RO_DATA(PAGE_SIZE)
+       . = ALIGN(4);
+@@ -146,7 +157,9 @@ SECTIONS
  
+       NOTES
+-      _etext = .;                     /* End of text and rodata section */
 +#ifdef CONFIG_PAX_KERNEXEC
 +      . = ALIGN(1<<SECTION_SHIFT);
 +#endif
-+
  #ifndef CONFIG_XIP_KERNEL
        . = ALIGN(PAGE_SIZE);
-       __init_begin = .;
-@@ -203,6 +216,11 @@ SECTIONS
+@@ -207,6 +220,11 @@ SECTIONS
        . = PAGE_OFFSET + TEXT_OFFSET;
  #else
        __init_end = .;
@@ -3469,52 +3213,18 @@ index 7d08b43..f7ca7ea 100644
  #include "csumpartialcopygeneric.S"
  
 diff --git a/arch/arm/lib/delay.c b/arch/arm/lib/delay.c
-index 6b93f6a..1aa92d0 100644
+index 64dbfa5..84a3fd9 100644
 --- a/arch/arm/lib/delay.c
 +++ b/arch/arm/lib/delay.c
-@@ -28,12 +28,15 @@
+@@ -28,7 +28,7 @@
  /*
   * Default to the loop-based delay implementation.
   */
 -struct arm_delay_ops arm_delay_ops = {
-+static struct arm_delay_ops arm_loop_delay_ops = {
++struct arm_delay_ops arm_delay_ops __read_only = {
        .delay          = __loop_delay,
        .const_udelay   = __loop_const_udelay,
        .udelay         = __loop_udelay,
-+      .const_clock    = false,
- };
-+struct arm_delay_ops *arm_delay_ops __read_only = &arm_loop_delay_ops;
-+
- static const struct delay_timer *delay_timer;
- static bool delay_calibrated;
-@@ -67,6 +70,13 @@ static void __timer_udelay(unsigned long usecs)
-       __timer_const_udelay(usecs * UDELAY_MULT);
- }
-+static struct arm_delay_ops arm_timer_delay_ops = {
-+      .delay          = __timer_delay,
-+      .const_udelay   = __timer_const_udelay,
-+      .udelay         = __timer_udelay,
-+      .const_clock    = true,
-+};
-+
- void __init register_current_timer_delay(const struct delay_timer *timer)
- {
-       if (!delay_calibrated) {
-@@ -74,10 +84,7 @@ void __init register_current_timer_delay(const struct delay_timer *timer)
-               delay_timer                     = timer;
-               lpj_fine                        = timer->freq / HZ;
-               loops_per_jiffy                 = lpj_fine;
--              arm_delay_ops.delay             = __timer_delay;
--              arm_delay_ops.const_udelay      = __timer_const_udelay;
--              arm_delay_ops.udelay            = __timer_udelay;
--              arm_delay_ops.const_clock       = true;
-+              arm_delay_ops                   = &arm_timer_delay_ops;
-               delay_calibrated                = true;
-       } else {
-               pr_info("Ignoring duplicate/late registration of read_current_timer delay\n");
 diff --git a/arch/arm/lib/uaccess_with_memcpy.c b/arch/arm/lib/uaccess_with_memcpy.c
 index 025f742..8432b08 100644
 --- a/arch/arm/lib/uaccess_with_memcpy.c
@@ -3529,7 +3239,7 @@ index 025f742..8432b08 100644
        /*
         * This test is stubbed out of the main function above to keep
 diff --git a/arch/arm/mach-kirkwood/common.c b/arch/arm/mach-kirkwood/common.c
-index bac21a5..b67ef8e 100644
+index 49792a0..f192052 100644
 --- a/arch/arm/mach-kirkwood/common.c
 +++ b/arch/arm/mach-kirkwood/common.c
 @@ -150,7 +150,16 @@ static void clk_gate_fn_disable(struct clk_hw *hw)
@@ -3566,7 +3276,7 @@ index bac21a5..b67ef8e 100644
  
        if (IS_ERR(clk))
 diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c
-index 0abb30f..54064da 100644
+index f6eeb87..cc90868 100644
 --- a/arch/arm/mach-omap2/board-n8x0.c
 +++ b/arch/arm/mach-omap2/board-n8x0.c
 @@ -631,7 +631,7 @@ static int n8x0_menelaus_late_init(struct device *dev)
@@ -3579,10 +3289,10 @@ index 0abb30f..54064da 100644
  };
  
 diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
-index 8033cb7..2f7cb62 100644
+index 410e1ba..1d2dd59 100644
 --- a/arch/arm/mach-omap2/gpmc.c
 +++ b/arch/arm/mach-omap2/gpmc.c
-@@ -139,7 +139,6 @@ struct omap3_gpmc_regs {
+@@ -145,7 +145,6 @@ struct omap3_gpmc_regs {
  };
  
  static struct gpmc_client_irq gpmc_client_irq[GPMC_NR_IRQ];
@@ -3590,7 +3300,7 @@ index 8033cb7..2f7cb62 100644
  static unsigned gpmc_irq_start;
  
  static struct resource        gpmc_mem_root;
-@@ -700,6 +699,18 @@ static void gpmc_irq_noop(struct irq_data *data) { }
+@@ -707,6 +706,18 @@ static void gpmc_irq_noop(struct irq_data *data) { }
  
  static unsigned int gpmc_irq_noop_ret(struct irq_data *data) { return 0; }
  
@@ -3609,7 +3319,7 @@ index 8033cb7..2f7cb62 100644
  static int gpmc_setup_irq(void)
  {
        int i;
-@@ -714,15 +725,6 @@ static int gpmc_setup_irq(void)
+@@ -721,15 +732,6 @@ static int gpmc_setup_irq(void)
                return gpmc_irq_start;
        }
  
@@ -3626,10 +3336,10 @@ index 8033cb7..2f7cb62 100644
        gpmc_client_irq[1].bitmask = GPMC_IRQ_COUNT_EVENT;
  
 diff --git a/arch/arm/mach-omap2/omap-wakeupgen.c b/arch/arm/mach-omap2/omap-wakeupgen.c
-index 5d3b4f4..ddba3c0 100644
+index f8bb3b9..831e7b8 100644
 --- a/arch/arm/mach-omap2/omap-wakeupgen.c
 +++ b/arch/arm/mach-omap2/omap-wakeupgen.c
-@@ -340,7 +340,7 @@ static int __cpuinit irq_cpu_hotplug_notify(struct notifier_block *self,
+@@ -339,7 +339,7 @@ static int __cpuinit irq_cpu_hotplug_notify(struct notifier_block *self,
        return NOTIFY_OK;
  }
  
@@ -3639,53 +3349,51 @@ index 5d3b4f4..ddba3c0 100644
  };
  
 diff --git a/arch/arm/mach-omap2/omap_device.c b/arch/arm/mach-omap2/omap_device.c
-index e065daa..7b1ad9b 100644
+index 381be7a..89b9c7e 100644
 --- a/arch/arm/mach-omap2/omap_device.c
 +++ b/arch/arm/mach-omap2/omap_device.c
-@@ -686,7 +686,7 @@ void omap_device_delete(struct omap_device *od)
-  * passes along the return value of omap_device_build_ss().
-  */
struct platform_device __init *omap_device_build(const char *pdev_name, int pdev_id,
--                                    struct omap_hwmod *oh, void *pdata,
-+                                    struct omap_hwmod *oh, const void *pdata,
-                                     int pdata_len,
-                                     struct omap_device_pm_latency *pm_lats,
-                                     int pm_lats_cnt, int is_early_device)
-@@ -720,7 +720,7 @@ struct platform_device __init *omap_device_build(const char *pdev_name, int pdev
-  */
struct platform_device __init *omap_device_build_ss(const char *pdev_name, int pdev_id,
-                                        struct omap_hwmod **ohs, int oh_cnt,
--                                       void *pdata, int pdata_len,
-+                                       const void *pdata, int pdata_len,
-                                        struct omap_device_pm_latency *pm_lats,
-                                        int pm_lats_cnt, int is_early_device)
- {
+@@ -499,7 +499,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,
+-                                               void *pdata, int pdata_len)
++                                               const void *pdata, int pdata_len)
+ {
+       struct omap_hwmod *ohs[] = { oh };
+@@ -527,7 +527,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,
+-                                                  int oh_cnt, void *pdata,
++                                                  int oh_cnt, const void *pdata,
+                                                   int pdata_len)
+ {
+       int ret = -ENOMEM;
 diff --git a/arch/arm/mach-omap2/omap_device.h b/arch/arm/mach-omap2/omap_device.h
-index 0933c59..42b8e2d 100644
+index 044c31d..2ee0861 100644
 --- a/arch/arm/mach-omap2/omap_device.h
 +++ b/arch/arm/mach-omap2/omap_device.h
-@@ -91,14 +91,14 @@ int omap_device_shutdown(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,
--                                    struct omap_hwmod *oh, void *pdata,
-+                                    struct omap_hwmod *oh, const void *pdata,
-                                     int pdata_len,
-                                     struct omap_device_pm_latency *pm_lats,
-                                     int pm_lats_cnt, int is_early_device);
+-                                        struct omap_hwmod *oh, void *pdata,
++                                        struct omap_hwmod *oh, const void *pdata,
+                                         int pdata_len);
  
  struct platform_device *omap_device_build_ss(const char *pdev_name, int pdev_id,
                                         struct omap_hwmod **oh, int oh_cnt,
--                                       void *pdata, int pdata_len,
-+                                       const void *pdata, int pdata_len,
-                                        struct omap_device_pm_latency *pm_lats,
-                                        int pm_lats_cnt, int is_early_device);
+-                                       void *pdata, int pdata_len);
++                                       const void *pdata, int pdata_len);
  
+ 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 4653efb..8c60bf7 100644
+index a202a47..c430564 100644
 --- a/arch/arm/mach-omap2/omap_hwmod.c
 +++ b/arch/arm/mach-omap2/omap_hwmod.c
-@@ -189,10 +189,10 @@ struct omap_hwmod_soc_ops {
+@@ -191,10 +191,10 @@ struct omap_hwmod_soc_ops {
        int (*init_clkdm)(struct omap_hwmod *oh);
        void (*update_context_lost)(struct omap_hwmod *oh);
        int (*get_context_lost)(struct omap_hwmod *oh);
@@ -3699,7 +3407,7 @@ index 4653efb..8c60bf7 100644
  /* omap_hwmod_list contains all registered struct omap_hwmods */
  static LIST_HEAD(omap_hwmod_list);
 diff --git a/arch/arm/mach-omap2/wd_timer.c b/arch/arm/mach-omap2/wd_timer.c
-index 7c2b4ed..b2ea51f 100644
+index d15c7bb..b2d1f0c 100644
 --- a/arch/arm/mach-omap2/wd_timer.c
 +++ b/arch/arm/mach-omap2/wd_timer.c
 @@ -110,7 +110,9 @@ static int __init omap_init_wdt(void)
@@ -3720,13 +3428,13 @@ index 7c2b4ed..b2ea51f 100644
 -      pdata.read_reset_sources = prm_read_reset_sources;
 -
        pdev = omap_device_build(dev_name, id, oh, &pdata,
-                                sizeof(struct omap_wd_timer_platform_data),
-                                NULL, 0, 0);
+                                sizeof(struct omap_wd_timer_platform_data));
+       WARN(IS_ERR(pdev), "Can't build omap_device for %s:%s.\n",
 diff --git a/arch/arm/mach-ux500/include/mach/setup.h b/arch/arm/mach-ux500/include/mach/setup.h
-index 6be4c4d..32ac32a 100644
+index bddce2b..3eb04e2 100644
 --- a/arch/arm/mach-ux500/include/mach/setup.h
 +++ b/arch/arm/mach-ux500/include/mach/setup.h
-@@ -38,13 +38,6 @@ extern struct sys_timer ux500_timer;
+@@ -37,13 +37,6 @@ extern void ux500_timer_init(void);
        .type           = MT_DEVICE,            \
  }
  
@@ -3741,7 +3449,7 @@ index 6be4c4d..32ac32a 100644
  extern void ux500_cpu_die(unsigned int cpu);
  
 diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig
-index 3fd629d..8b1aca9 100644
+index 4045c49..4e26c79 100644
 --- a/arch/arm/mm/Kconfig
 +++ b/arch/arm/mm/Kconfig
 @@ -425,7 +425,7 @@ config CPU_32v5
@@ -3753,7 +3461,7 @@ index 3fd629d..8b1aca9 100644
        select TLS_REG_EMUL if !CPU_32v6K && !MMU
  
  config CPU_32v6K
-@@ -577,6 +577,7 @@ config CPU_CP15_MPU
+@@ -574,6 +574,7 @@ config CPU_CP15_MPU
  
  config CPU_USE_DOMAINS
        bool
@@ -3826,31 +3534,6 @@ index db26e2e..ee44569 100644
                if (err)                                        \
                        goto fault;                             \
        } while (0)
-diff --git a/arch/arm/mm/context.c b/arch/arm/mm/context.c
-index d07df17..59d5493 100644
---- a/arch/arm/mm/context.c
-+++ b/arch/arm/mm/context.c
-@@ -45,7 +45,7 @@ static DEFINE_RAW_SPINLOCK(cpu_asid_lock);
- static atomic64_t asid_generation = ATOMIC64_INIT(ASID_FIRST_VERSION);
- static DECLARE_BITMAP(asid_map, NUM_USER_ASIDS);
--static DEFINE_PER_CPU(atomic64_t, active_asids);
-+DEFINE_PER_CPU(atomic64_t, active_asids);
- static DEFINE_PER_CPU(u64, reserved_asids);
- static cpumask_t tlb_flush_pending;
-@@ -209,8 +209,10 @@ void check_and_switch_context(struct mm_struct *mm, struct task_struct *tsk)
-               atomic64_set(&mm->context.id, asid);
-       }
--      if (cpumask_test_and_clear_cpu(cpu, &tlb_flush_pending))
-+      if (cpumask_test_and_clear_cpu(cpu, &tlb_flush_pending)) {
-               local_flush_tlb_all();
-+              dummy_flush_tlb_a15_erratum();
-+      }
-       atomic64_set(&per_cpu(active_asids, cpu), asid);
-       cpumask_set_cpu(cpu, mm_cpumask(mm));
 diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c
 index 5dbf13f..1a60561 100644
 --- a/arch/arm/mm/fault.c
@@ -4096,10 +3779,10 @@ index ad722f1..763fdd3 100644
        totalram_pages += free_area(__phys_to_pfn(__pa(&__tcm_start)),
                                    __phys_to_pfn(__pa(&__tcm_end)),
 diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c
-index 88fd86c..7a224ce 100644
+index 04d9006..c547d85 100644
 --- a/arch/arm/mm/ioremap.c
 +++ b/arch/arm/mm/ioremap.c
-@@ -335,9 +335,9 @@ __arm_ioremap_exec(unsigned long phys_addr, size_t size, bool cached)
+@@ -392,9 +392,9 @@ __arm_ioremap_exec(unsigned long phys_addr, size_t size, bool cached)
        unsigned int mtype;
  
        if (cached)
@@ -4112,7 +3795,7 @@ index 88fd86c..7a224ce 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 10062ce..aa96dd7 100644
+index 10062ce..cd34fb9 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,
@@ -4144,7 +3827,15 @@ index 10062ce..aa96dd7 100644
                        return addr;
        }
  
-@@ -112,6 +116,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
+@@ -99,6 +103,7 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
+       info.high_limit = TASK_SIZE;
+       info.align_mask = do_align ? (PAGE_MASK & (SHMLBA - 1)) : 0;
+       info.align_offset = pgoff << PAGE_SHIFT;
++      info.threadstack_offset = offset;
+       return vm_unmapped_area(&info);
+ }
+@@ -112,6 +117,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
        unsigned long addr = addr0;
        int do_align = 0;
        int aliasing = cache_is_vipt_aliasing();
@@ -4152,7 +3843,7 @@ index 10062ce..aa96dd7 100644
        struct vm_unmapped_area_info info;
  
        /*
-@@ -132,6 +137,10 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
+@@ -132,6 +138,10 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
                return addr;
        }
  
@@ -4163,7 +3854,7 @@ index 10062ce..aa96dd7 100644
        /* requesting a specific address */
        if (addr) {
                if (do_align)
-@@ -139,8 +148,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
+@@ -139,8 +149,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
                else
                        addr = PAGE_ALIGN(addr);
                vma = find_vma(mm, addr);
@@ -4173,7 +3864,15 @@ index 10062ce..aa96dd7 100644
                        return addr;
        }
  
-@@ -162,6 +170,12 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
+@@ -150,6 +159,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
+       info.high_limit = mm->mmap_base;
+       info.align_mask = do_align ? (PAGE_MASK & (SHMLBA - 1)) : 0;
+       info.align_offset = pgoff << PAGE_SHIFT;
++      info.threadstack_offset = offset;
+       addr = vm_unmapped_area(&info);
+       /*
+@@ -162,6 +172,12 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
                VM_BUG_ON(addr != -ENOMEM);
                info.flags = 0;
                info.low_limit = mm->mmap_base;
@@ -4186,7 +3885,7 @@ index 10062ce..aa96dd7 100644
                info.high_limit = TASK_SIZE;
                addr = vm_unmapped_area(&info);
        }
-@@ -173,6 +187,10 @@ void arch_pick_mmap_layout(struct mm_struct *mm)
+@@ -173,6 +189,10 @@ void arch_pick_mmap_layout(struct mm_struct *mm)
  {
        unsigned long random_factor = 0UL;
  
@@ -4197,7 +3896,7 @@ index 10062ce..aa96dd7 100644
        /* 8 bits of randomness in 20 address space bits */
        if ((current->flags & PF_RANDOMIZE) &&
            !(current->personality & ADDR_NO_RANDOMIZE))
-@@ -180,10 +198,22 @@ void arch_pick_mmap_layout(struct mm_struct *mm)
+@@ -180,10 +200,22 @@ void arch_pick_mmap_layout(struct mm_struct *mm)
  
        if (mmap_is_legacy()) {
                mm->mmap_base = TASK_UNMAPPED_BASE + random_factor;
@@ -4221,14 +3920,13 @@ index 10062ce..aa96dd7 100644
                mm->unmap_area = arch_unmap_area_topdown;
        }
 diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
-index ce328c7..35b88dc 100644
+index a84ff76..f221c1d 100644
 --- a/arch/arm/mm/mmu.c
 +++ b/arch/arm/mm/mmu.c
-@@ -35,6 +35,23 @@
+@@ -36,6 +36,22 @@
  #include "mm.h"
+ #include "tcm.h"
  
-+
 +#if defined(CONFIG_CPU_USE_DOMAINS) || defined(CONFIG_PAX_KERNEXEC) || defined(CONFIG_PAX_MEMORY_UDEREF)
 +void modify_domain(unsigned int dom, unsigned int type)
 +{
@@ -4248,7 +3946,7 @@ index ce328c7..35b88dc 100644
  /*
   * empty_zero_page is a special page that is used for
   * zero-initialized data and COW.
-@@ -195,10 +212,18 @@ void adjust_cr(unsigned long mask, unsigned long set)
+@@ -211,10 +227,18 @@ void adjust_cr(unsigned long mask, unsigned long set)
  }
  #endif
  
@@ -4269,7 +3967,7 @@ index ce328c7..35b88dc 100644
        [MT_DEVICE] = {           /* Strongly ordered / ARMv6 shared device */
                .prot_pte       = PROT_PTE_DEVICE | L_PTE_MT_DEV_SHARED |
                                  L_PTE_SHARED,
-@@ -227,16 +252,16 @@ static struct mem_type mem_types[] = {
+@@ -243,16 +267,16 @@ static struct mem_type mem_types[] = {
        [MT_UNCACHED] = {
                .prot_pte       = PROT_PTE_DEVICE,
                .prot_l1        = PMD_TYPE_TABLE,
@@ -4289,7 +3987,7 @@ index ce328c7..35b88dc 100644
                .domain    = DOMAIN_KERNEL,
        },
  #endif
-@@ -244,36 +269,54 @@ static struct mem_type mem_types[] = {
+@@ -260,36 +284,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,
@@ -4353,7 +4051,7 @@ index ce328c7..35b88dc 100644
                .domain    = DOMAIN_KERNEL,
        },
        [MT_MEMORY_ITCM] = {
-@@ -283,10 +326,10 @@ static struct mem_type mem_types[] = {
+@@ -299,10 +341,10 @@ static struct mem_type mem_types[] = {
        },
        [MT_MEMORY_SO] = {
                .prot_pte  = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY |
@@ -4366,7 +4064,7 @@ index ce328c7..35b88dc 100644
                .domain    = DOMAIN_KERNEL,
        },
        [MT_MEMORY_DMA_READY] = {
-@@ -371,9 +414,35 @@ static void __init build_mem_type_table(void)
+@@ -388,9 +430,35 @@ static void __init build_mem_type_table(void)
                         * to prevent speculative instruction fetches.
                         */
                        mem_types[MT_DEVICE].prot_sect |= PMD_SECT_XN;
@@ -4402,7 +4100,7 @@ index ce328c7..35b88dc 100644
                }
                if (cpu_arch >= CPU_ARCH_ARMv7 && (cr & CR_TRE)) {
                        /*
-@@ -432,6 +501,9 @@ static void __init build_mem_type_table(void)
+@@ -451,6 +519,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;
@@ -4412,7 +4110,7 @@ index ce328c7..35b88dc 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
-@@ -448,11 +520,17 @@ static void __init build_mem_type_table(void)
+@@ -468,11 +539,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;
@@ -4434,7 +4132,7 @@ index ce328c7..35b88dc 100644
                }
        }
  
-@@ -463,15 +541,20 @@ static void __init build_mem_type_table(void)
+@@ -483,15 +560,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 */
@@ -4458,7 +4156,7 @@ index ce328c7..35b88dc 100644
        }
  
  #ifdef CONFIG_ARM_LPAE
-@@ -487,6 +570,8 @@ static void __init build_mem_type_table(void)
+@@ -507,6 +589,8 @@ static void __init build_mem_type_table(void)
        vecs_pgprot |= PTE_EXT_AF;
  #endif
  
@@ -4467,7 +4165,7 @@ index ce328c7..35b88dc 100644
        for (i = 0; i < 16; i++) {
                pteval_t v = pgprot_val(protection_map[i]);
                protection_map[i] = __pgprot(v | user_pgprot);
-@@ -501,10 +586,15 @@ static void __init build_mem_type_table(void)
+@@ -524,10 +608,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;
@@ -4486,7 +4184,7 @@ index ce328c7..35b88dc 100644
        mem_types[MT_ROM].prot_sect |= cp->pmd;
  
        switch (cp->pmd) {
-@@ -1105,18 +1195,15 @@ void __init arm_mm_memblock_reserve(void)
+@@ -1147,18 +1236,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.
   */
@@ -4509,7 +4207,7 @@ index ce328c7..35b88dc 100644
  
        for (addr = VMALLOC_START; addr; addr += PMD_SIZE)
                pmd_clear(pmd_off_k(addr));
-@@ -1156,7 +1243,7 @@ static void __init devicemaps_init(struct machine_desc *mdesc)
+@@ -1198,7 +1284,7 @@ static void __init devicemaps_init(struct machine_desc *mdesc)
         * location (0xffff0000).  If we aren't using high-vectors, also
         * create a mapping at the low-vectors virtual address.
         */
@@ -4518,7 +4216,7 @@ index ce328c7..35b88dc 100644
        map.virtual = 0xffff0000;
        map.length = PAGE_SIZE;
        map.type = MT_HIGH_VECTORS;
-@@ -1214,8 +1301,39 @@ static void __init map_lowmem(void)
+@@ -1256,8 +1342,39 @@ static void __init map_lowmem(void)
                map.pfn = __phys_to_pfn(start);
                map.virtual = __phys_to_virt(start);
                map.length = end - start;
@@ -4560,7 +4258,7 @@ index ce328c7..35b88dc 100644
        }
  }
 diff --git a/arch/arm/mm/proc-v7-2level.S b/arch/arm/mm/proc-v7-2level.S
-index 6d98c13..3cfb174 100644
+index 78f520b..31f0cb6 100644
 --- a/arch/arm/mm/proc-v7-2level.S
 +++ b/arch/arm/mm/proc-v7-2level.S
 @@ -99,6 +99,9 @@ ENTRY(cpu_v7_set_pte_ext)
@@ -4587,10 +4285,10 @@ index a5bc92d..0bb4730 100644
 +      pax_close_kernel();
  }
 diff --git a/arch/arm/plat-samsung/include/plat/dma-ops.h b/arch/arm/plat-samsung/include/plat/dma-ops.h
-index f5144cd..71f6d1f 100644
+index 1141782..0959d64 100644
 --- a/arch/arm/plat-samsung/include/plat/dma-ops.h
 +++ b/arch/arm/plat-samsung/include/plat/dma-ops.h
-@@ -47,7 +47,7 @@ struct samsung_dma_ops {
+@@ -48,7 +48,7 @@ struct samsung_dma_ops {
        int (*started)(unsigned ch);
        int (*flush)(unsigned ch);
        int (*stop)(unsigned ch);
@@ -4642,7 +4340,7 @@ index c3a58a1..78fbf54 100644
  /*
   * Memory returned by kmalloc() may be used for DMA, so we must make
 diff --git a/arch/avr32/include/asm/elf.h b/arch/avr32/include/asm/elf.h
-index e2c3287..6c4f98c 100644
+index d232888..87c8df1 100644
 --- a/arch/avr32/include/asm/elf.h
 +++ b/arch/avr32/include/asm/elf.h
 @@ -84,8 +84,14 @@ typedef struct user_fpu_struct elf_fpregset_t;
@@ -4827,13 +4525,13 @@ index 43901f2..0d8b865 100644
  
  #endif
 diff --git a/arch/frv/mm/elf-fdpic.c b/arch/frv/mm/elf-fdpic.c
-index 385fd30..3aaf4fe 100644
+index 836f147..4cf23f5 100644
 --- a/arch/frv/mm/elf-fdpic.c
 +++ b/arch/frv/mm/elf-fdpic.c
 @@ -61,6 +61,7 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsi
  {
        struct vm_area_struct *vma;
-       unsigned long limit;
+       struct vm_unmapped_area_info info;
 +      unsigned long offset = gr_rand_threadstack_offset(current->mm, filp, flags);
  
        if (len > TASK_SIZE)
@@ -4848,24 +4546,14 @@ index 385fd30..3aaf4fe 100644
                        goto success;
        }
  
-@@ -89,7 +89,7 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsi
-                       for (; vma; vma = vma->vm_next) {
-                               if (addr > limit)
-                                       break;
--                              if (addr + len <= vma->vm_start)
-+                              if (check_heap_stack_gap(vma, addr, len, offset))
-                                       goto success;
-                               addr = vma->vm_end;
-                       }
-@@ -104,7 +104,7 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsi
-               for (; vma; vma = vma->vm_next) {
-                       if (addr > limit)
-                               break;
--                      if (addr + len <= vma->vm_start)
-+                      if (check_heap_stack_gap(vma, addr, len, offset))
-                               goto success;
-                       addr = vma->vm_end;
-               }
+@@ -85,6 +85,7 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsi
+       info.high_limit = (current->mm->start_stack - 0x00200000);
+       info.align_mask = 0;
+       info.align_offset = 0;
++      info.threadstack_offset = offset;
+       addr = vm_unmapped_area(&info);
+       if (!(addr & ~PAGE_MASK))
+               goto success;
 diff --git a/arch/hexagon/include/asm/cache.h b/arch/hexagon/include/asm/cache.h
 index f4ca594..adc72fd6 100644
 --- a/arch/hexagon/include/asm/cache.h
@@ -4927,7 +4615,7 @@ index 988254a..e1ee885 100644
  #ifdef CONFIG_SMP
  # define SMP_CACHE_SHIFT      L1_CACHE_SHIFT
 diff --git a/arch/ia64/include/asm/elf.h b/arch/ia64/include/asm/elf.h
-index b5298eb..67c6e62 100644
+index 5a83c5c..4d7f553 100644
 --- a/arch/ia64/include/asm/elf.h
 +++ b/arch/ia64/include/asm/elf.h
 @@ -42,6 +42,13 @@
@@ -5094,7 +4782,7 @@ index 2d67317..07d8bfa 100644
        .notifier_call = err_inject_cpu_callback,
  };
 diff --git a/arch/ia64/kernel/mca.c b/arch/ia64/kernel/mca.c
-index 65bf9cd..794f06b 100644
+index d7396db..b33e873 100644
 --- a/arch/ia64/kernel/mca.c
 +++ b/arch/ia64/kernel/mca.c
 @@ -1922,7 +1922,7 @@ static int __cpuinit mca_cpu_callback(struct notifier_block *nfb,
@@ -5199,10 +4887,10 @@ index 24603be..948052d 100644
                DEBUGP("%s: placing gp at 0x%lx\n", __func__, gp);
        }
 diff --git a/arch/ia64/kernel/palinfo.c b/arch/ia64/kernel/palinfo.c
-index 77597e5..6f28f3f 100644
+index 79521d5..43dddff 100644
 --- a/arch/ia64/kernel/palinfo.c
 +++ b/arch/ia64/kernel/palinfo.c
-@@ -1045,7 +1045,7 @@ static int __cpuinit palinfo_cpu_callback(struct notifier_block *nfb,
+@@ -1006,7 +1006,7 @@ static int __cpuinit palinfo_cpu_callback(struct notifier_block *nfb,
        return NOTIFY_OK;
  }
  
@@ -5212,7 +4900,7 @@ index 77597e5..6f28f3f 100644
        .notifier_call = palinfo_cpu_callback,
        .priority = 0,
 diff --git a/arch/ia64/kernel/salinfo.c b/arch/ia64/kernel/salinfo.c
-index 79802e5..1a89ec5 100644
+index aa527d7..f237752 100644
 --- a/arch/ia64/kernel/salinfo.c
 +++ b/arch/ia64/kernel/salinfo.c
 @@ -616,7 +616,7 @@ salinfo_cpu_callback(struct notifier_block *nb, unsigned long action, void *hcpu
@@ -5225,13 +4913,13 @@ index 79802e5..1a89ec5 100644
        .notifier_call = salinfo_cpu_callback,
        .priority = 0,
 diff --git a/arch/ia64/kernel/sys_ia64.c b/arch/ia64/kernel/sys_ia64.c
-index d9439ef..d0cac6b 100644
+index 41e33f8..65180b2 100644
 --- a/arch/ia64/kernel/sys_ia64.c
 +++ b/arch/ia64/kernel/sys_ia64.c
 @@ -28,6 +28,7 @@ arch_get_unmapped_area (struct file *filp, unsigned long addr, unsigned long len
-       unsigned long start_addr, align_mask = PAGE_SIZE - 1;
+       unsigned long align_mask = 0;
        struct mm_struct *mm = current->mm;
-       struct vm_area_struct *vma;
+       struct vm_unmapped_area_info info;
 +      unsigned long offset = gr_rand_threadstack_offset(mm, filp, flags);
  
        if (len > RGN_MAP_LIMIT)
@@ -5248,26 +4936,16 @@ index d9439ef..d0cac6b 100644
 +#endif
 +
        if (!addr)
-               addr = mm->free_area_cache;
+               addr = TASK_UNMAPPED_BASE;
+@@ -61,6 +69,7 @@ arch_get_unmapped_area (struct file *filp, unsigned long addr, unsigned long len
+       info.high_limit = TASK_SIZE;
+       info.align_mask = align_mask;
+       info.align_offset = 0;
++      info.threadstack_offset = offset;
+       return vm_unmapped_area(&info);
+ }
  
-@@ -61,14 +69,14 @@ arch_get_unmapped_area (struct file *filp, unsigned long addr, unsigned long len
-       for (vma = find_vma(mm, addr); ; vma = vma->vm_next) {
-               /* At this point:  (!vma || addr < vma->vm_end). */
-               if (TASK_SIZE - len < addr || RGN_MAP_LIMIT - len < REGION_OFFSET(addr)) {
--                      if (start_addr != TASK_UNMAPPED_BASE) {
-+                      if (start_addr != mm->mmap_base) {
-                               /* Start a new search --- just in case we missed some holes.  */
--                              addr = TASK_UNMAPPED_BASE;
-+                              addr = mm->mmap_base;
-                               goto full_search;
-                       }
-                       return -ENOMEM;
-               }
--              if (!vma || addr + len <= vma->vm_start) {
-+              if (check_heap_stack_gap(vma, addr, len, offset)) {
-                       /* Remember the address where we stopped this search:  */
-                       mm->free_area_cache = addr + len;
-                       return addr;
 diff --git a/arch/ia64/kernel/topology.c b/arch/ia64/kernel/topology.c
 index dc00b2c..cce53c2 100644
 --- a/arch/ia64/kernel/topology.c
@@ -5346,28 +5024,27 @@ index 6cf0341..d352594 100644
        /*
         * If for any reason at all we couldn't handle the fault, make
 diff --git a/arch/ia64/mm/hugetlbpage.c b/arch/ia64/mm/hugetlbpage.c
-index 5ca674b..127c3cb 100644
+index 76069c1..c2aa816 100644
 --- a/arch/ia64/mm/hugetlbpage.c
 +++ b/arch/ia64/mm/hugetlbpage.c
 @@ -149,6 +149,7 @@ unsigned long hugetlb_get_unmapped_area(struct file *file, unsigned long addr, u
                unsigned long pgoff, unsigned long flags)
  {
-       struct vm_area_struct *vmm;
+       struct vm_unmapped_area_info info;
 +      unsigned long offset = gr_rand_threadstack_offset(current->mm, file, flags);
  
        if (len > RGN_MAP_LIMIT)
                return -ENOMEM;
-@@ -171,7 +172,7 @@ unsigned long hugetlb_get_unmapped_area(struct file *file, unsigned long addr, u
-               /* At this point:  (!vmm || addr < vmm->vm_end). */
-               if (REGION_OFFSET(addr) + len > RGN_MAP_LIMIT)
-                       return -ENOMEM;
--              if (!vmm || (addr + len) <= vmm->vm_start)
-+              if (check_heap_stack_gap(vmm, addr, len, offset))
-                       return addr;
-               addr = ALIGN(vmm->vm_end, HPAGE_SIZE);
-       }
+@@ -172,6 +173,7 @@ unsigned long hugetlb_get_unmapped_area(struct file *file, unsigned long addr, u
+       info.high_limit = HPAGE_REGION_BASE + RGN_MAP_LIMIT;
+       info.align_mask = PAGE_MASK & (HPAGE_SIZE - 1);
+       info.align_offset = 0;
++      info.threadstack_offset = offset;
+       return vm_unmapped_area(&info);
+ }
 diff --git a/arch/ia64/mm/init.c b/arch/ia64/mm/init.c
-index b755ea9..b9a969e 100644
+index 20bc967..a26993e 100644
 --- a/arch/ia64/mm/init.c
 +++ b/arch/ia64/mm/init.c
 @@ -120,6 +120,19 @@ ia64_init_addr_space (void)
@@ -5447,6 +5124,18 @@ index 0395c51..5f26031 100644
  
  #define ARCH_DMA_MINALIGN     L1_CACHE_BYTES
  
+diff --git a/arch/metag/mm/hugetlbpage.c b/arch/metag/mm/hugetlbpage.c
+index 3c52fa6..11b2ad8 100644
+--- a/arch/metag/mm/hugetlbpage.c
++++ b/arch/metag/mm/hugetlbpage.c
+@@ -200,6 +200,7 @@ hugetlb_get_unmapped_area_new_pmd(unsigned long len)
+       info.high_limit = TASK_SIZE;
+       info.align_mask = PAGE_MASK & HUGEPT_MASK;
+       info.align_offset = 0;
++      info.threadstack_offset = 0;
+       return vm_unmapped_area(&info);
+ }
 diff --git a/arch/microblaze/include/asm/cache.h b/arch/microblaze/include/asm/cache.h
 index 4efe96a..60e8699 100644
 --- a/arch/microblaze/include/asm/cache.h
@@ -5466,7 +5155,7 @@ index 4efe96a..60e8699 100644
  #define SMP_CACHE_BYTES       L1_CACHE_BYTES
  
 diff --git a/arch/mips/include/asm/atomic.h b/arch/mips/include/asm/atomic.h
-index 01cc6ba..bcb7a5d 100644
+index 08b6079..eb272cf 100644
 --- a/arch/mips/include/asm/atomic.h
 +++ b/arch/mips/include/asm/atomic.h
 @@ -21,6 +21,10 @@
@@ -5477,7 +5166,7 @@ index 01cc6ba..bcb7a5d 100644
 +#include <asm-generic/atomic64.h>
 +#endif
 +
- #define ATOMIC_INIT(i)    { (i) }
+ #define ATOMIC_INIT(i)          { (i) }
  
  /*
 @@ -759,6 +763,16 @@ static __inline__ int atomic64_add_unless(atomic64_t *v, long a, long u)
@@ -5515,11 +5204,11 @@ 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 455c0ac..ad65fbe 100644
+index cf3ae24..238d22f 100644
 --- a/arch/mips/include/asm/elf.h
 +++ b/arch/mips/include/asm/elf.h
 @@ -372,13 +372,16 @@ extern const char *__elf_platform;
- #define ELF_ET_DYN_BASE         (TASK_SIZE / 3 * 2)
+ #define ELF_ET_DYN_BASE               (TASK_SIZE / 3 * 2)
  #endif
  
 +#ifdef CONFIG_PAX_ASLR
@@ -5552,18 +5241,18 @@ index c1f6afa..38cc6e9 100644
  
  #endif /* _ASM_EXEC_H */
 diff --git a/arch/mips/include/asm/page.h b/arch/mips/include/asm/page.h
-index dbaec94..6a14935 100644
+index eab99e5..607c98e 100644
 --- a/arch/mips/include/asm/page.h
 +++ b/arch/mips/include/asm/page.h
 @@ -96,7 +96,7 @@ extern void copy_user_highpage(struct page *to, struct page *from,
    #ifdef CONFIG_CPU_MIPS32
      typedef struct { unsigned long pte_low, pte_high; } pte_t;
-     #define pte_val(x)    ((x).pte_low | ((unsigned long long)(x).pte_high << 32))
--    #define __pte(x)      ({ pte_t __pte = {(x), ((unsigned long long)(x)) >> 32}; __pte; })
-+    #define __pte(x)      ({ pte_t __pte = {(x), (x) >> 32}; __pte; })
+     #define pte_val(x)          ((x).pte_low | ((unsigned long long)(x).pte_high << 32))
+-    #define __pte(x)    ({ pte_t __pte = {(x), ((unsigned long long)(x)) >> 32}; __pte; })
++    #define __pte(x)    ({ pte_t __pte = {(x), (x) >> 32}; __pte; })
    #else
       typedef struct { unsigned long long pte; } pte_t;
-      #define pte_val(x)       ((x).pte)
+      #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
 --- a/arch/mips/include/asm/pgalloc.h
@@ -5581,7 +5270,7 @@ index 881d18b..cea38bc 100644
  
  /*
 diff --git a/arch/mips/include/asm/thread_info.h b/arch/mips/include/asm/thread_info.h
-index b2050b9..d71bb1b 100644
+index 178f792..8ebc510 100644
 --- a/arch/mips/include/asm/thread_info.h
 +++ b/arch/mips/include/asm/thread_info.h
 @@ -111,6 +111,8 @@ register struct thread_info *__current_thread_info __asm__("$28");
@@ -5615,12 +5304,12 @@ index b2050b9..d71bb1b 100644
  #endif /* __KERNEL__ */
  
 diff --git a/arch/mips/kernel/binfmt_elfn32.c b/arch/mips/kernel/binfmt_elfn32.c
-index 9fdd8bc..4bd7f1a 100644
+index e06f777..3244284 100644
 --- a/arch/mips/kernel/binfmt_elfn32.c
 +++ b/arch/mips/kernel/binfmt_elfn32.c
 @@ -50,6 +50,13 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
  #undef ELF_ET_DYN_BASE
- #define ELF_ET_DYN_BASE         (TASK32_SIZE / 3 * 2)
+ #define ELF_ET_DYN_BASE               (TASK32_SIZE / 3 * 2)
  
 +#ifdef CONFIG_PAX_ASLR
 +#define PAX_ELF_ET_DYN_BASE   (TASK_IS_32BIT_ADDR ? 0x00400000UL : 0x00400000UL)
@@ -5633,12 +5322,12 @@ index 9fdd8bc..4bd7f1a 100644
  #include <linux/module.h>
  #include <linux/elfcore.h>
 diff --git a/arch/mips/kernel/binfmt_elfo32.c b/arch/mips/kernel/binfmt_elfo32.c
-index ff44823..97f8906 100644
+index 556a435..b4fd2e3 100644
 --- a/arch/mips/kernel/binfmt_elfo32.c
 +++ b/arch/mips/kernel/binfmt_elfo32.c
 @@ -52,6 +52,13 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
  #undef ELF_ET_DYN_BASE
- #define ELF_ET_DYN_BASE         (TASK32_SIZE / 3 * 2)
+ #define ELF_ET_DYN_BASE               (TASK32_SIZE / 3 * 2)
  
 +#ifdef CONFIG_PAX_ASLR
 +#define PAX_ELF_ET_DYN_BASE   (TASK_IS_32BIT_ADDR ? 0x00400000UL : 0x00400000UL)
@@ -5651,10 +5340,10 @@ index ff44823..97f8906 100644
  
  /*
 diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c
-index a11c6f9..be5e164 100644
+index 3be4405..a799827 100644
 --- a/arch/mips/kernel/process.c
 +++ b/arch/mips/kernel/process.c
-@@ -460,15 +460,3 @@ unsigned long get_wchan(struct task_struct *task)
+@@ -461,15 +461,3 @@ unsigned long get_wchan(struct task_struct *task)
  out:
        return pc;
  }
@@ -5671,7 +5360,7 @@ index a11c6f9..be5e164 100644
 -      return sp & ALMASK;
 -}
 diff --git a/arch/mips/kernel/ptrace.c b/arch/mips/kernel/ptrace.c
-index 4812c6d..2069554 100644
+index 9c6299c..2fb4c22 100644
 --- a/arch/mips/kernel/ptrace.c
 +++ b/arch/mips/kernel/ptrace.c
 @@ -528,6 +528,10 @@ static inline int audit_arch(void)
@@ -5698,7 +5387,7 @@ index 4812c6d..2069554 100644
                goto out;
  
 diff --git a/arch/mips/kernel/scall32-o32.S b/arch/mips/kernel/scall32-o32.S
-index d20a4bc..7096ae5 100644
+index 9ea2964..c4329c3 100644
 --- a/arch/mips/kernel/scall32-o32.S
 +++ b/arch/mips/kernel/scall32-o32.S
 @@ -52,7 +52,7 @@ NESTED(handle_sys, PT_SIZE, sp)
@@ -5708,10 +5397,10 @@ index d20a4bc..7096ae5 100644
 -      li      t1, _TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT
 +      li      t1, _TIF_SYSCALL_WORK
        and     t0, t1
-       bnez    t0, syscall_trace_entry # -> yes
+       bnez    t0, syscall_trace_entry # -> yes
  
 diff --git a/arch/mips/kernel/scall64-64.S b/arch/mips/kernel/scall64-64.S
-index b64f642..0fe6eab 100644
+index 36cfd40..b1436e0 100644
 --- a/arch/mips/kernel/scall64-64.S
 +++ b/arch/mips/kernel/scall64-64.S
 @@ -54,7 +54,7 @@ NESTED(handle_sys64, PT_SIZE, sp)
@@ -5724,7 +5413,7 @@ index b64f642..0fe6eab 100644
        and     t0, t1, t0
        bnez    t0, syscall_trace_entry
 diff --git a/arch/mips/kernel/scall64-n32.S b/arch/mips/kernel/scall64-n32.S
-index c29ac19..c592d05 100644
+index 693d60b..ae0ba75 100644
 --- a/arch/mips/kernel/scall64-n32.S
 +++ b/arch/mips/kernel/scall64-n32.S
 @@ -47,7 +47,7 @@ NESTED(handle_sysn32, PT_SIZE, sp)
@@ -5737,7 +5426,7 @@ index c29ac19..c592d05 100644
        and     t0, t1, t0
        bnez    t0, n32_syscall_trace_entry
 diff --git a/arch/mips/kernel/scall64-o32.S b/arch/mips/kernel/scall64-o32.S
-index cf3e75e..72e93fe 100644
+index af8887f..611ccb6 100644
 --- a/arch/mips/kernel/scall64-o32.S
 +++ b/arch/mips/kernel/scall64-o32.S
 @@ -81,7 +81,7 @@ NESTED(handle_sys, PT_SIZE, sp)
@@ -5750,7 +5439,7 @@ index cf3e75e..72e93fe 100644
        and     t0, t1, t0
        bnez    t0, trace_a_syscall
 diff --git a/arch/mips/mm/fault.c b/arch/mips/mm/fault.c
-index ddcec1e..c7f983e 100644
+index 0fead53..a2c0fb5 100644
 --- a/arch/mips/mm/fault.c
 +++ b/arch/mips/mm/fault.c
 @@ -27,6 +27,23 @@
@@ -5778,7 +5467,7 @@ index ddcec1e..c7f983e 100644
   * This routine handles page faults.  It determines the address,
   * and the problem, and then passes it off to one of the appropriate
 diff --git a/arch/mips/mm/mmap.c b/arch/mips/mm/mmap.c
-index 7e5fe27..479a219 100644
+index 7e5fe27..9656513 100644
 --- a/arch/mips/mm/mmap.c
 +++ b/arch/mips/mm/mmap.c
 @@ -59,6 +59,7 @@ static unsigned long arch_get_unmapped_area_common(struct file *filp,
@@ -5801,7 +5490,7 @@ index 7e5fe27..479a219 100644
        if (addr) {
                if (do_color_align)
                        addr = COLOUR_ALIGN(addr, pgoff);
-@@ -91,8 +97,7 @@ static unsigned long arch_get_unmapped_area_common(struct file *filp,
+@@ -91,14 +97,14 @@ static unsigned long arch_get_unmapped_area_common(struct file *filp,
                        addr = PAGE_ALIGN(addr);
  
                vma = find_vma(mm, addr);
@@ -5811,7 +5500,14 @@ index 7e5fe27..479a219 100644
                        return addr;
        }
  
-@@ -146,6 +151,10 @@ void arch_pick_mmap_layout(struct mm_struct *mm)
+       info.length = len;
+       info.align_mask = do_color_align ? (PAGE_MASK & shm_align_mask) : 0;
+       info.align_offset = pgoff << PAGE_SHIFT;
++      info.threadstack_offset = offset;
+       if (dir == DOWN) {
+               info.flags = VM_UNMAPPED_AREA_TOPDOWN;
+@@ -146,6 +152,10 @@ void arch_pick_mmap_layout(struct mm_struct *mm)
  {
        unsigned long random_factor = 0UL;
  
@@ -5822,7 +5518,7 @@ index 7e5fe27..479a219 100644
        if (current->flags & PF_RANDOMIZE) {
                random_factor = get_random_int();
                random_factor = random_factor << PAGE_SHIFT;
-@@ -157,42 +166,27 @@ void arch_pick_mmap_layout(struct mm_struct *mm)
+@@ -157,42 +167,27 @@ void arch_pick_mmap_layout(struct mm_struct *mm)
  
        if (mmap_is_legacy()) {
                mm->mmap_base = TASK_UNMAPPED_BASE + random_factor;
@@ -5938,7 +5634,7 @@ index 4ce7a01..449202a 100644
  
  #endif /* __ASM_OPENRISC_CACHE_H */
 diff --git a/arch/parisc/include/asm/atomic.h b/arch/parisc/include/asm/atomic.h
-index af9cf30..2aae9b2 100644
+index f38e198..4179e38 100644
 --- a/arch/parisc/include/asm/atomic.h
 +++ b/arch/parisc/include/asm/atomic.h
 @@ -229,6 +229,16 @@ static __inline__ int atomic64_add_unless(atomic64_t *v, long a, long u)
@@ -5987,7 +5683,7 @@ index 47f11c7..3420df2 100644
  
  #define SMP_CACHE_BYTES L1_CACHE_BYTES
 diff --git a/arch/parisc/include/asm/elf.h b/arch/parisc/include/asm/elf.h
-index 19f6cb1..6c78cf2 100644
+index ad2b503..bdf1651 100644
 --- a/arch/parisc/include/asm/elf.h
 +++ b/arch/parisc/include/asm/elf.h
 @@ -342,6 +342,13 @@ struct pt_regs;   /* forward declaration... */
@@ -6029,10 +5725,10 @@ index fc987a1..6e068ef 100644
  #endif
  
 diff --git a/arch/parisc/include/asm/pgtable.h b/arch/parisc/include/asm/pgtable.h
-index 7df49fa..38b62bf 100644
+index 1e40d7f..a3eb445 100644
 --- a/arch/parisc/include/asm/pgtable.h
 +++ b/arch/parisc/include/asm/pgtable.h
-@@ -218,6 +218,17 @@ extern void purge_tlb_entries(struct mm_struct *, unsigned long);
+@@ -223,6 +223,17 @@ extern void purge_tlb_entries(struct mm_struct *, unsigned long);
  #define PAGE_EXECREAD   __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_READ | _PAGE_EXEC |_PAGE_ACCESSED)
  #define PAGE_COPY       PAGE_EXECREAD
  #define PAGE_RWX        __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_READ | _PAGE_WRITE | _PAGE_EXEC |_PAGE_ACCESSED)
@@ -6051,10 +5747,10 @@ index 7df49fa..38b62bf 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 4ba2c93..f5e3974 100644
+index e0a8235..ce2f1e1 100644
 --- a/arch/parisc/include/asm/uaccess.h
 +++ b/arch/parisc/include/asm/uaccess.h
-@@ -251,10 +251,10 @@ static inline unsigned long __must_check copy_from_user(void *to,
+@@ -245,10 +245,10 @@ static inline unsigned long __must_check copy_from_user(void *to,
                                            const void __user *from,
                                            unsigned long n)
  {
@@ -6171,7 +5867,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 f76c108..92bad82 100644
+index 5dfd248..64914ac 100644
 --- a/arch/parisc/kernel/sys_parisc.c
 +++ b/arch/parisc/kernel/sys_parisc.c
 @@ -33,9 +33,11 @@
@@ -6180,24 +5876,23 @@ index f76c108..92bad82 100644
  
 -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,
-+                                     unsigned long flags)
++                                      unsigned long flags)
  {
-       struct vm_area_struct *vma;
+       struct vm_unmapped_area_info info;
 +      unsigned long offset = gr_rand_threadstack_offset(current->mm, filp, flags);
  
-       addr = PAGE_ALIGN(addr);
+       info.flags = 0;
+       info.length = len;
+@@ -43,6 +45,7 @@ static unsigned long get_unshared_area(unsigned long addr, unsigned long len)
+       info.high_limit = TASK_SIZE;
+       info.align_mask = 0;
+       info.align_offset = 0;
++      info.threadstack_offset = offset;
+       return vm_unmapped_area(&info);
+ }
  
-@@ -43,7 +45,7 @@ static unsigned long get_unshared_area(unsigned long addr, unsigned long len)
-               /* At this point:  (!vma || addr < vma->vm_end). */
-               if (TASK_SIZE - len < addr)
-                       return -ENOMEM;
--              if (!vma || addr + len <= vma->vm_start)
-+              if (check_heap_stack_gap(vma, addr, len, offset))
-                       return addr;
-               addr = vma->vm_end;
-       }
-@@ -67,11 +69,12 @@ static int get_offset(struct address_space *mapping)
-       return offset & 0x3FF000;
+@@ -61,10 +64,11 @@ static int get_offset(struct address_space *mapping)
+       return (unsigned long) mapping >> 8;
  }
  
 -static unsigned long get_shared_area(struct address_space *mapping,
@@ -6205,28 +5900,34 @@ index f76c108..92bad82 100644
 +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)
  {
-       struct vm_area_struct *vma;
-       int offset = mapping ? get_offset(mapping) : 0;
-+      unsigned long rand_offset = gr_rand_threadstack_offset(current->mm, filp, flags);
+       struct vm_unmapped_area_info info;
++      unsigned long offset = gr_rand_threadstack_offset(current->mm, filp, flags);
  
-       offset = (offset + (pgoff << PAGE_SHIFT)) & 0x3FF000;
+       info.flags = 0;
+       info.length = len;
+@@ -72,6 +76,7 @@ static unsigned long get_shared_area(struct address_space *mapping,
+       info.high_limit = TASK_SIZE;
+       info.align_mask = PAGE_MASK & (SHMLBA - 1);
+       info.align_offset = (get_offset(mapping) + pgoff) << PAGE_SHIFT;
++      info.threadstack_offset = offset;
+       return vm_unmapped_area(&info);
+ }
  
-@@ -81,7 +84,7 @@ static unsigned long get_shared_area(struct address_space *mapping,
-               /* At this point:  (!vma || addr < vma->vm_end). */
-               if (TASK_SIZE - len < addr)
-                       return -ENOMEM;
--              if (!vma || addr + len <= vma->vm_start)
-+              if (check_heap_stack_gap(vma, addr, len, rand_offset))
-                       return addr;
-               addr = DCACHE_ALIGN(vma->vm_end - offset) + offset;
-               if (addr < vma->vm_end) /* handle wraparound */
-@@ -100,14 +103,14 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr,
-       if (flags & MAP_FIXED)
+@@ -86,15 +91,22 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr,
+                       return -EINVAL;
                return addr;
-       if (!addr)
--              addr = TASK_UNMAPPED_BASE;
-+              addr = current->mm->mmap_base;
+       }
+-      if (!addr)
++      if (!addr) {
+               addr = TASK_UNMAPPED_BASE;
  
++#ifdef CONFIG_PAX_RANDMMAP
++              if (current->mm->pax_flags & MF_PAX_RANDMMAP)
++                      addr += current->mm->delta_mmap;
++#endif
++
++      }
++
        if (filp) {
 -              addr = get_shared_area(filp->f_mapping, addr, len, pgoff);
 +              addr = get_shared_area(filp, filp->f_mapping, addr, len, pgoff, flags);
@@ -6240,7 +5941,7 @@ index f76c108..92bad82 100644
        return addr;
  }
 diff --git a/arch/parisc/kernel/traps.c b/arch/parisc/kernel/traps.c
-index 45ba99f..8e22c33 100644
+index aeb8f8f..27a6c2f 100644
 --- a/arch/parisc/kernel/traps.c
 +++ b/arch/parisc/kernel/traps.c
 @@ -732,9 +732,7 @@ void notrace handle_interruption(int code, struct pt_regs *regs)
@@ -6255,7 +5956,7 @@ index 45ba99f..8e22c33 100644
                                fault_space = regs->iasq[0];
  
 diff --git a/arch/parisc/mm/fault.c b/arch/parisc/mm/fault.c
-index 18162ce..94de376 100644
+index f247a34..dc0f219 100644
 --- a/arch/parisc/mm/fault.c
 +++ b/arch/parisc/mm/fault.c
 @@ -15,6 +15,7 @@
@@ -6392,7 +6093,7 @@ index 18162ce..94de376 100644
  int fixup_exception(struct pt_regs *regs)
  {
        const struct exception_table_entry *fix;
-@@ -192,8 +303,33 @@ good_area:
+@@ -194,8 +305,33 @@ good_area:
  
        acc_type = parisc_acctyp(code,regs->iir);
  
@@ -6470,7 +6171,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 6abf0a1..459d0f1 100644
+index ac9790f..6d30741 100644
 --- a/arch/powerpc/include/asm/elf.h
 +++ b/arch/powerpc/include/asm/elf.h
 @@ -28,8 +28,19 @@
@@ -6495,7 +6196,7 @@ index 6abf0a1..459d0f1 100644
  
  /*
   * Our registers are always unsigned longs, whether we're a 32 bit
-@@ -124,10 +135,6 @@ extern int arch_setup_additional_pages(struct linux_binprm *bprm,
+@@ -122,10 +133,6 @@ extern int arch_setup_additional_pages(struct linux_binprm *bprm,
        (0x7ff >> (PAGE_SHIFT - 12)) : \
        (0x3ffff >> (PAGE_SHIFT - 12)))
  
@@ -6652,10 +6353,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 3d5c9dc..62f8414 100644
+index c9c67fc..e10c012 100644
 --- a/arch/powerpc/include/asm/reg.h
 +++ b/arch/powerpc/include/asm/reg.h
-@@ -215,6 +215,7 @@
+@@ -245,6 +245,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 */
@@ -6663,6 +6364,19 @@ index 3d5c9dc..62f8414 100644
  #define   DSISR_PROTFAULT     0x08000000      /* protection fault */
  #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 195ce2a..ab5c614 100644
+--- a/arch/powerpc/include/asm/smp.h
++++ b/arch/powerpc/include/asm/smp.h
+@@ -50,7 +50,7 @@ struct smp_ops_t {
+       int   (*cpu_disable)(void);
+       void  (*cpu_die)(unsigned int nr);
+       int   (*cpu_bootable)(unsigned int nr);
+-};
++} __no_const;
+ 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 406b7b9..af63426 100644
 --- a/arch/powerpc/include/asm/thread_info.h
@@ -6870,10 +6584,10 @@ index 4db4959..aba5c41 100644
  
  static inline unsigned long clear_user(void __user *addr, unsigned long size)
 diff --git a/arch/powerpc/kernel/exceptions-64e.S b/arch/powerpc/kernel/exceptions-64e.S
-index 4684e33..acc4d19e 100644
+index ae54553..cf2184d 100644
 --- a/arch/powerpc/kernel/exceptions-64e.S
 +++ b/arch/powerpc/kernel/exceptions-64e.S
-@@ -715,6 +715,7 @@ storage_fault_common:
+@@ -716,6 +716,7 @@ storage_fault_common:
        std     r14,_DAR(r1)
        std     r15,_DSISR(r1)
        addi    r3,r1,STACK_FRAME_OVERHEAD
@@ -6881,7 +6595,7 @@ index 4684e33..acc4d19e 100644
        mr      r4,r14
        mr      r5,r15
        ld      r14,PACA_EXGEN+EX_R14(r13)
-@@ -723,8 +724,7 @@ storage_fault_common:
+@@ -724,8 +725,7 @@ storage_fault_common:
        cmpdi   r3,0
        bne-    1f
        b       .ret_from_except_lite
@@ -6892,10 +6606,10 @@ index 4684e33..acc4d19e 100644
        ld      r4,_DAR(r1)
        bl      .bad_page_fault
 diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S
-index 3684cbd..bc89eab 100644
+index 3bbe7ed..14ec3eb 100644
 --- a/arch/powerpc/kernel/exceptions-64s.S
 +++ b/arch/powerpc/kernel/exceptions-64s.S
-@@ -1206,10 +1206,10 @@ handle_page_fault:
+@@ -1390,10 +1390,10 @@ handle_page_fault:
  11:   ld      r4,_DAR(r1)
        ld      r5,_DSISR(r1)
        addi    r3,r1,STACK_FRAME_OVERHEAD
@@ -6941,10 +6655,10 @@ index 2e3200c..72095ce 100644
        /* Find this entry, or if that fails, the next avail. entry */
        while (entry->jump[0]) {
 diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
-index 8143067..21ae55b 100644
+index 16e77a8..4501b41 100644
 --- a/arch/powerpc/kernel/process.c
 +++ b/arch/powerpc/kernel/process.c
-@@ -680,8 +680,8 @@ void show_regs(struct pt_regs * regs)
+@@ -870,8 +870,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
         */
@@ -6953,9 +6667,9 @@ index 8143067..21ae55b 100644
 +      printk("NIP ["REG"] %pA\n", regs->nip, (void *)regs->nip);
 +      printk("LR ["REG"] %pA\n", regs->link, (void *)regs->link);
  #endif
-       show_stack(current, (unsigned long *) regs->gpr[1]);
-       if (!user_mode(regs))
-@@ -1129,10 +1129,10 @@ void show_stack(struct task_struct *tsk, unsigned long *stack)
+ #ifdef CONFIG_PPC_TRANSACTIONAL_MEM
+       printk("PACATMSCRATCH [%llx]\n", get_paca()->tm_scratch);
+@@ -1330,10 +1330,10 @@ void show_stack(struct task_struct *tsk, unsigned long *stack)
                newsp = stack[0];
                ip = stack[STACK_FRAME_LR_SAVE];
                if (!firstframe || ip != lr) {
@@ -6968,7 +6682,7 @@ index 8143067..21ae55b 100644
                                       (void *)current->ret_stack[curr_frame].ret);
                                curr_frame--;
                        }
-@@ -1152,7 +1152,7 @@ void show_stack(struct task_struct *tsk, unsigned long *stack)
+@@ -1353,7 +1353,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;
@@ -6977,7 +6691,7 @@ index 8143067..21ae55b 100644
                               regs->trap, (void *)regs->nip, (void *)lr);
                        firstframe = 1;
                }
-@@ -1194,58 +1194,3 @@ void __ppc64_runlatch_off(void)
+@@ -1395,58 +1395,3 @@ void __ppc64_runlatch_off(void)
        mtspr(SPRN_CTRLT, ctrl);
  }
  #endif /* CONFIG_PPC64 */
@@ -7037,10 +6751,10 @@ index 8143067..21ae55b 100644
 -      return ret;
 -}
 diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c
-index c497000..8fde506 100644
+index f9b30c6..d72e7a3 100644
 --- a/arch/powerpc/kernel/ptrace.c
 +++ b/arch/powerpc/kernel/ptrace.c
-@@ -1737,6 +1737,10 @@ long arch_ptrace(struct task_struct *child, long request,
+@@ -1771,6 +1771,10 @@ long arch_ptrace(struct task_struct *child, long request,
        return ret;
  }
  
@@ -7051,7 +6765,7 @@ index c497000..8fde506 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.
-@@ -1747,6 +1751,11 @@ long do_syscall_trace_enter(struct pt_regs *regs)
+@@ -1781,6 +1785,11 @@ long do_syscall_trace_enter(struct pt_regs *regs)
  
        secure_computing_strict(regs->gpr[0]);
  
@@ -7063,7 +6777,7 @@ index c497000..8fde506 100644
        if (test_thread_flag(TIF_SYSCALL_TRACE) &&
            tracehook_report_syscall_entry(regs))
                /*
-@@ -1781,6 +1790,11 @@ void do_syscall_trace_leave(struct pt_regs *regs)
+@@ -1815,6 +1824,11 @@ void do_syscall_trace_leave(struct pt_regs *regs)
  {
        int step;
  
@@ -7076,24 +6790,24 @@ index c497000..8fde506 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 804e323..79181c1 100644
+index 95068bf..9ba1814 100644
 --- a/arch/powerpc/kernel/signal_32.c
 +++ b/arch/powerpc/kernel/signal_32.c
-@@ -851,7 +851,7 @@ int handle_rt_signal32(unsigned long sig, struct k_sigaction *ka,
+@@ -982,7 +982,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;
 -      if (vdso32_rt_sigtramp && current->mm->context.vdso_base) {
 +      if (vdso32_rt_sigtramp && current->mm->context.vdso_base != ~0UL) {
-               if (save_user_regs(regs, frame, 0, 1))
-                       goto badframe;
-               regs->link = current->mm->context.vdso_base + vdso32_rt_sigtramp;
+               sigret = 0;
+               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 1ca045d..139c3f7 100644
+index c179428..58acdaa 100644
 --- a/arch/powerpc/kernel/signal_64.c
 +++ b/arch/powerpc/kernel/signal_64.c
-@@ -430,7 +430,7 @@ int handle_rt_signal64(int signr, struct k_sigaction *ka, siginfo_t *info,
-       current->thread.fpscr.val = 0;
+@@ -758,7 +758,7 @@ int handle_rt_signal64(int signr, struct k_sigaction *ka, siginfo_t *info,
+ #endif
  
        /* Set up to return from userspace. */
 -      if (vdso64_rt_sigtramp && current->mm->context.vdso_base) {
@@ -7115,10 +6829,10 @@ index 3ce1f86..c30e629 100644
  };
  
 diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
-index 3251840..3f7c77a 100644
+index 83efa2f..6bb5839 100644
 --- a/arch/powerpc/kernel/traps.c
 +++ b/arch/powerpc/kernel/traps.c
-@@ -133,6 +133,8 @@ static unsigned __kprobes long oops_begin(struct pt_regs *regs)
+@@ -141,6 +141,8 @@ static unsigned __kprobes long oops_begin(struct pt_regs *regs)
        return flags;
  }
  
@@ -7127,7 +6841,7 @@ index 3251840..3f7c77a 100644
  static void __kprobes oops_end(unsigned long flags, struct pt_regs *regs,
                               int signr)
  {
-@@ -182,6 +184,9 @@ static void __kprobes oops_end(unsigned long flags, struct pt_regs *regs,
+@@ -190,6 +192,9 @@ static void __kprobes oops_end(unsigned long flags, struct pt_regs *regs,
                panic("Fatal exception in interrupt");
        if (panic_on_oops)
                panic("Fatal exception");
@@ -7203,7 +6917,7 @@ index 5eea6f3..5d10396 100644
  EXPORT_SYMBOL(copy_in_user);
  
 diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c
-index 3a8489a..6a63b3b 100644
+index 229951f..cdeca42 100644
 --- a/arch/powerpc/mm/fault.c
 +++ b/arch/powerpc/mm/fault.c
 @@ -32,6 +32,10 @@
@@ -7354,7 +7068,7 @@ index e779642..e5bb889 100644
  };
  
 diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
-index bba87ca..c346a33 100644
+index 6a252c4..3024d81 100644
 --- a/arch/powerpc/mm/numa.c
 +++ b/arch/powerpc/mm/numa.c
 @@ -932,7 +932,7 @@ static void __init *careful_zallocation(int nid, unsigned long size,
@@ -7437,7 +7151,7 @@ index cf9dada..241529f 100644
        if (!fixed && addr) {
                addr = _ALIGN_UP(addr, 1ul << pshift);
 diff --git a/arch/powerpc/platforms/cell/spufs/file.c b/arch/powerpc/platforms/cell/spufs/file.c
-index 0cfece4..2f1a0e5 100644
+index 68c57d3..1fdcfb2 100644
 --- a/arch/powerpc/platforms/cell/spufs/file.c
 +++ b/arch/powerpc/platforms/cell/spufs/file.c
 @@ -281,9 +281,9 @@ spufs_mem_mmap_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
@@ -7503,7 +7217,7 @@ index 4d7ccac..d03d0ad 100644
  
  #define __read_mostly __attribute__((__section__(".data..read_mostly")))
 diff --git a/arch/s390/include/asm/elf.h b/arch/s390/include/asm/elf.h
-index 178ff96..8c93bd1 100644
+index 1bfdf24..9c9ab2e 100644
 --- a/arch/s390/include/asm/elf.h
 +++ b/arch/s390/include/asm/elf.h
 @@ -160,8 +160,14 @@ extern unsigned int vdso_enabled;
@@ -7523,7 +7237,7 @@ index 178ff96..8c93bd1 100644
  
  /* This yields a mask that user programs can use to figure out what
     instruction set this CPU supports. */
-@@ -210,9 +216,6 @@ struct linux_binprm;
+@@ -207,9 +213,6 @@ struct linux_binprm;
  #define ARCH_HAS_SETUP_ADDITIONAL_PAGES 1
  int arch_setup_additional_pages(struct linux_binprm *, int);
  
@@ -7546,7 +7260,7 @@ 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 34268df..ea97318 100644
+index 9c33ed4..e40cbef 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
@@ -7557,10 +7271,10 @@ index 34268df..ea97318 100644
 +      if ((long)n < 0)
 +              return n;
 +
-       if (access_ok(VERIFY_WRITE, to, n))
-               n = __copy_to_user(to, from, n);
-       return n;
-@@ -277,6 +281,9 @@ copy_to_user(void __user *to, const void *from, unsigned long n)
+       return __copy_to_user(to, from, n);
+ }
+@@ -275,6 +279,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)
  {
@@ -7570,7 +7284,7 @@ index 34268df..ea97318 100644
        if (__builtin_constant_p(n) && (n <= 256))
                return uaccess.copy_from_user_small(n, from, to);
        else
-@@ -308,10 +315,14 @@ __compiletime_warning("copy_from_user() buffer size is not provably correct")
+@@ -306,10 +313,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)
  {
@@ -7588,10 +7302,10 @@ index 34268df..ea97318 100644
                return n;
        }
 diff --git a/arch/s390/kernel/module.c b/arch/s390/kernel/module.c
-index 4610dea..cf0af21 100644
+index 7845e15..59c4353 100644
 --- a/arch/s390/kernel/module.c
 +++ b/arch/s390/kernel/module.c
-@@ -171,11 +171,11 @@ module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs,
+@@ -169,11 +169,11 @@ int module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs,
  
        /* Increase core size by size of got & plt and set start
           offsets for got and plt. */
@@ -7608,7 +7322,7 @@ index 4610dea..cf0af21 100644
        return 0;
  }
  
-@@ -252,7 +252,7 @@ apply_rela(Elf_Rela *rela, Elf_Addr base, Elf_Sym *symtab,
+@@ -289,7 +289,7 @@ static int apply_rela(Elf_Rela *rela, Elf_Addr base, Elf_Sym *symtab,
                if (info->got_initialized == 0) {
                        Elf_Addr *gotent;
  
@@ -7617,16 +7331,16 @@ index 4610dea..cf0af21 100644
                                info->got_offset;
                        *gotent = val;
                        info->got_initialized = 1;
-@@ -276,7 +276,7 @@ apply_rela(Elf_Rela *rela, Elf_Addr base, Elf_Sym *symtab,
+@@ -312,7 +312,7 @@ static int apply_rela(Elf_Rela *rela, Elf_Addr base, Elf_Sym *symtab,
+                       rc = apply_rela_bits(loc, val, 0, 64, 0);
                else if (r_type == R_390_GOTENT ||
-                        r_type == R_390_GOTPLTENT)
-                       *(unsigned int *) loc =
--                              (val + (Elf_Addr) me->module_core - loc) >> 1;
-+                              (val + (Elf_Addr) me->module_core_rw - loc) >> 1;
-               else if (r_type == R_390_GOT64 ||
-                        r_type == R_390_GOTPLT64)
-                       *(unsigned long *) loc = val;
-@@ -290,7 +290,7 @@ apply_rela(Elf_Rela *rela, Elf_Addr base, Elf_Sym *symtab,
+                        r_type == R_390_GOTPLTENT) {
+-                      val += (Elf_Addr) me->module_core - loc;
++                      val += (Elf_Addr) me->module_core_rw - loc;
+                       rc = apply_rela_bits(loc, val, 1, 32, 1);
+               }
+               break;
+@@ -325,7 +325,7 @@ static int apply_rela(Elf_Rela *rela, Elf_Addr base, Elf_Sym *symtab,
        case R_390_PLTOFF64:    /* 16 bit offset from GOT to PLT. */
                if (info->plt_initialized == 0) {
                        unsigned int *ip;
@@ -7635,7 +7349,7 @@ index 4610dea..cf0af21 100644
                                info->plt_offset;
  #ifndef CONFIG_64BIT
                        ip[0] = 0x0d105810; /* basr 1,0; l 1,6(1); br 1 */
-@@ -315,7 +315,7 @@ apply_rela(Elf_Rela *rela, Elf_Addr base, Elf_Sym *symtab,
+@@ -350,7 +350,7 @@ static int apply_rela(Elf_Rela *rela, Elf_Addr base, Elf_Sym *symtab,
                               val - loc + 0xffffUL < 0x1ffffeUL) ||
                              (r_type == R_390_PLT32DBL &&
                               val - loc + 0xffffffffULL < 0x1fffffffeULL)))
@@ -7644,16 +7358,16 @@ index 4610dea..cf0af21 100644
                                        me->arch.plt_offset +
                                        info->plt_offset;
                        val += rela->r_addend - loc;
-@@ -337,7 +337,7 @@ apply_rela(Elf_Rela *rela, Elf_Addr base, Elf_Sym *symtab,
+@@ -372,7 +372,7 @@ static int apply_rela(Elf_Rela *rela, Elf_Addr base, Elf_Sym *symtab,
        case R_390_GOTOFF32:    /* 32 bit offset to GOT.  */
        case R_390_GOTOFF64:    /* 64 bit offset to GOT. */
                val = val + rela->r_addend -
 -                      ((Elf_Addr) me->module_core + me->arch.got_offset);
 +                      ((Elf_Addr) me->module_core_rw + me->arch.got_offset);
                if (r_type == R_390_GOTOFF16)
-                       *(unsigned short *) loc = val;
+                       rc = apply_rela_bits(loc, val, 0, 16, 0);
                else if (r_type == R_390_GOTOFF32)
-@@ -347,7 +347,7 @@ apply_rela(Elf_Rela *rela, Elf_Addr base, Elf_Sym *symtab,
+@@ -382,7 +382,7 @@ static int apply_rela(Elf_Rela *rela, Elf_Addr base, Elf_Sym *symtab,
                break;
        case R_390_GOTPC:       /* 32 bit PC relative offset to GOT. */
        case R_390_GOTPCDBL:    /* 32 bit PC rel. off. to GOT shifted by 1. */
@@ -7661,7 +7375,7 @@ index 4610dea..cf0af21 100644
 +              val = (Elf_Addr) me->module_core_rw + me->arch.got_offset +
                        rela->r_addend - loc;
                if (r_type == R_390_GOTPC)
-                       *(unsigned int *) loc = val;
+                       rc = apply_rela_bits(loc, val, 1, 32, 0);
 diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c
 index 536d645..4a5bd9e 100644
 --- a/arch/s390/kernel/process.c
@@ -7707,7 +7421,7 @@ index 536d645..4a5bd9e 100644
 -      return ret;
 -}
 diff --git a/arch/s390/mm/mmap.c b/arch/s390/mm/mmap.c
-index c59a5ef..3fae59c 100644
+index 06bafec..2bca531 100644
 --- a/arch/s390/mm/mmap.c
 +++ b/arch/s390/mm/mmap.c
 @@ -90,10 +90,22 @@ void arch_pick_mmap_layout(struct mm_struct *mm)
@@ -7733,7 +7447,7 @@ index c59a5ef..3fae59c 100644
                mm->get_unmapped_area = arch_get_unmapped_area_topdown;
                mm->unmap_area = arch_unmap_area_topdown;
        }
-@@ -172,10 +184,22 @@ void arch_pick_mmap_layout(struct mm_struct *mm)
+@@ -175,10 +187,22 @@ void arch_pick_mmap_layout(struct mm_struct *mm)
         */
        if (mmap_is_legacy()) {
                mm->mmap_base = TASK_UNMAPPED_BASE;
@@ -7814,7 +7528,7 @@ index ef9e555..331bd29 100644
  #define __read_mostly __attribute__((__section__(".data..read_mostly")))
  
 diff --git a/arch/sh/kernel/cpu/sh4a/smp-shx3.c b/arch/sh/kernel/cpu/sh4a/smp-shx3.c
-index 03f2b55..b027032 100644
+index 03f2b55..b0270327 100644
 --- a/arch/sh/kernel/cpu/sh4a/smp-shx3.c
 +++ b/arch/sh/kernel/cpu/sh4a/smp-shx3.c
 @@ -143,7 +143,7 @@ shx3_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu)
@@ -8117,7 +7831,7 @@ index 5bb6991..5c2132e 100644
  #ifdef CONFIG_SPARC32
  #define SMP_CACHE_BYTES_SHIFT 5
 diff --git a/arch/sparc/include/asm/elf_32.h b/arch/sparc/include/asm/elf_32.h
-index ac74a2c..a9e58af 100644
+index a24e41f..47677ff 100644
 --- a/arch/sparc/include/asm/elf_32.h
 +++ b/arch/sparc/include/asm/elf_32.h
 @@ -114,6 +114,13 @@ typedef struct {
@@ -8516,10 +8230,10 @@ index 6cf591b..b49e65a 100644
  extra-y     := head_$(BITS).o
  
 diff --git a/arch/sparc/kernel/process_32.c b/arch/sparc/kernel/process_32.c
-index be8e862..5b50b12 100644
+index 62eede1..9c5b904 100644
 --- a/arch/sparc/kernel/process_32.c
 +++ b/arch/sparc/kernel/process_32.c
-@@ -126,14 +126,14 @@ void show_regs(struct pt_regs *r)
+@@ -125,14 +125,14 @@ void show_regs(struct pt_regs *r)
  
          printk("PSR: %08lx PC: %08lx NPC: %08lx Y: %08lx    %s\n",
               r->psr, r->pc, r->npc, r->y, print_tainted());
@@ -8536,7 +8250,7 @@ index be8e862..5b50b12 100644
  
        printk("%%L: %08lx %08lx  %08lx %08lx  %08lx %08lx  %08lx %08lx\n",
               rw->locals[0], rw->locals[1], rw->locals[2], rw->locals[3],
-@@ -168,7 +168,7 @@ void show_stack(struct task_struct *tsk, unsigned long *_ksp)
+@@ -167,7 +167,7 @@ void show_stack(struct task_struct *tsk, unsigned long *_ksp)
                rw = (struct reg_window32 *) fp;
                pc = rw->ins[7];
                printk("[%08lx : ", pc);
@@ -8585,7 +8299,7 @@ index cdb80b2..5ca141d 100644
                               (void *) gp->o7,
                               (void *) gp->i7,
 diff --git a/arch/sparc/kernel/prom_common.c b/arch/sparc/kernel/prom_common.c
-index 1303021..c2a6321 100644
+index 9f20566..67eb41b 100644
 --- a/arch/sparc/kernel/prom_common.c
 +++ b/arch/sparc/kernel/prom_common.c
 @@ -143,7 +143,7 @@ static int __init prom_common_nextprop(phandle node, char *prev, char *buf)
@@ -8637,7 +8351,7 @@ index 7ff45e4..a58f271 100644
  
        if (unlikely(test_thread_flag(TIF_SYSCALL_TRACEPOINT)))
 diff --git a/arch/sparc/kernel/sys_sparc_32.c b/arch/sparc/kernel/sys_sparc_32.c
-index 2da0bdc..79128d2 100644
+index 3a8d184..49498a8 100644
 --- a/arch/sparc/kernel/sys_sparc_32.c
 +++ b/arch/sparc/kernel/sys_sparc_32.c
 @@ -52,7 +52,7 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsi
@@ -8650,7 +8364,7 @@ index 2da0bdc..79128d2 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 708bc29..f0129cb 100644
+index 708bc29..6bfdfad 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
@@ -8680,7 +8394,7 @@ index 708bc29..f0129cb 100644
        if (addr) {
                if (do_color_align)
                        addr = COLOR_ALIGN(addr, pgoff);
-@@ -118,14 +123,13 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsi
+@@ -118,22 +123,28 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsi
                        addr = PAGE_ALIGN(addr);
  
                vma = find_vma(mm, addr);
@@ -8697,7 +8411,9 @@ index 708bc29..f0129cb 100644
        info.high_limit = min(task_size, VA_EXCLUDE_START);
        info.align_mask = do_color_align ? (PAGE_MASK & (SHMLBA - 1)) : 0;
        info.align_offset = pgoff << PAGE_SHIFT;
-@@ -134,6 +138,12 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsi
++      info.threadstack_offset = offset;
+       addr = vm_unmapped_area(&info);
        if ((addr & ~PAGE_MASK) && task_size > VA_EXCLUDE_END) {
                VM_BUG_ON(addr != -ENOMEM);
                info.low_limit = VA_EXCLUDE_END;
@@ -8710,7 +8426,7 @@ index 708bc29..f0129cb 100644
                info.high_limit = task_size;
                addr = vm_unmapped_area(&info);
        }
-@@ -151,6 +161,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
+@@ -151,6 +162,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;
@@ -8718,7 +8434,7 @@ index 708bc29..f0129cb 100644
        struct vm_unmapped_area_info info;
  
        /* This should only ever run for 32-bit processes.  */
-@@ -160,7 +171,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
+@@ -160,7 +172,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.
                 */
@@ -8727,7 +8443,7 @@ index 708bc29..f0129cb 100644
                    ((addr - (pgoff << PAGE_SHIFT)) & (SHMLBA - 1)))
                        return -EINVAL;
                return addr;
-@@ -173,6 +184,10 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
+@@ -173,6 +185,10 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
        if (filp || (flags & MAP_SHARED))
                do_color_align = 1;
  
@@ -8738,7 +8454,7 @@ index 708bc29..f0129cb 100644
        /* requesting a specific address */
        if (addr) {
                if (do_color_align)
-@@ -181,8 +196,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
+@@ -181,8 +197,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
                        addr = PAGE_ALIGN(addr);
  
                vma = find_vma(mm, addr);
@@ -8748,7 +8464,15 @@ index 708bc29..f0129cb 100644
                        return addr;
        }
  
-@@ -204,6 +218,12 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
+@@ -192,6 +207,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;
++      info.threadstack_offset = offset;
+       addr = vm_unmapped_area(&info);
+       /*
+@@ -204,6 +220,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;
@@ -8761,7 +8485,7 @@ index 708bc29..f0129cb 100644
                info.high_limit = STACK_TOP32;
                addr = vm_unmapped_area(&info);
        }
-@@ -264,6 +284,10 @@ static unsigned long mmap_rnd(void)
+@@ -264,6 +286,10 @@ static unsigned long mmap_rnd(void)
  {
        unsigned long rnd = 0UL;
  
@@ -8772,7 +8496,7 @@ index 708bc29..f0129cb 100644
        if (current->flags & PF_RANDOMIZE) {
                unsigned long val = get_random_int();
                if (test_thread_flag(TIF_32BIT))
-@@ -289,6 +313,12 @@ void arch_pick_mmap_layout(struct mm_struct *mm)
+@@ -289,6 +315,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;
@@ -8785,7 +8509,7 @@ index 708bc29..f0129cb 100644
                mm->get_unmapped_area = arch_get_unmapped_area;
                mm->unmap_area = arch_unmap_area;
        } else {
-@@ -301,6 +331,12 @@ void arch_pick_mmap_layout(struct mm_struct *mm)
+@@ -301,6 +333,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);
@@ -8799,10 +8523,10 @@ index 708bc29..f0129cb 100644
                mm->unmap_area = arch_unmap_area_topdown;
        }
 diff --git a/arch/sparc/kernel/syscalls.S b/arch/sparc/kernel/syscalls.S
-index e0fed77..604a7e5 100644
+index 22a1098..6255eb9 100644
 --- a/arch/sparc/kernel/syscalls.S
 +++ b/arch/sparc/kernel/syscalls.S
-@@ -58,7 +58,7 @@ sys32_rt_sigreturn:
+@@ -52,7 +52,7 @@ sys32_rt_sigreturn:
  #endif
        .align  32
  1:    ldx     [%g6 + TI_FLAGS], %l5
@@ -8811,7 +8535,7 @@ index e0fed77..604a7e5 100644
        be,pt   %icc, rtrap
         nop
        call    syscall_trace_leave
-@@ -190,7 +190,7 @@ linux_sparc_syscall32:
+@@ -184,7 +184,7 @@ linux_sparc_syscall32:
  
        srl     %i5, 0, %o5                             ! IEU1
        srl     %i2, 0, %o2                             ! IEU0  Group
@@ -8820,7 +8544,7 @@ index e0fed77..604a7e5 100644
        bne,pn  %icc, linux_syscall_trace32             ! CTI
         mov    %i0, %l5                                ! IEU1
        call    %l7                                     ! CTI   Group brk forced
-@@ -213,7 +213,7 @@ linux_sparc_syscall:
+@@ -207,7 +207,7 @@ linux_sparc_syscall:
  
        mov     %i3, %o3                                ! IEU1
        mov     %i4, %o4                                ! IEU0  Group
@@ -8829,7 +8553,7 @@ index e0fed77..604a7e5 100644
        bne,pn  %icc, linux_syscall_trace               ! CTI   Group
         mov    %i0, %l5                                ! IEU0
  2:    call    %l7                                     ! CTI   Group brk forced
-@@ -229,7 +229,7 @@ ret_sys_call:
+@@ -223,7 +223,7 @@ ret_sys_call:
  
        cmp     %o0, -ERESTART_RESTARTBLOCK
        bgeu,pn %xcc, 1f
@@ -8852,7 +8576,7 @@ index 654e8aa..45f431b 100644
  };
  
 diff --git a/arch/sparc/kernel/traps_32.c b/arch/sparc/kernel/traps_32.c
-index a5785ea..405c5f7 100644
+index 6629829..036032d 100644
 --- a/arch/sparc/kernel/traps_32.c
 +++ b/arch/sparc/kernel/traps_32.c
 @@ -44,6 +44,8 @@ static void instruction_dump(unsigned long *pc)
@@ -8885,7 +8609,7 @@ index a5785ea..405c5f7 100644
  }
  
 diff --git a/arch/sparc/kernel/traps_64.c b/arch/sparc/kernel/traps_64.c
-index e7ecf15..6520e65 100644
+index 8d38ca9..845b1d6 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)
@@ -9039,7 +8763,7 @@ index 8201c25e..072a2a7 100644
        }
  }
 diff --git a/arch/sparc/kernel/us3_cpufreq.c b/arch/sparc/kernel/us3_cpufreq.c
-index eb1624b..f9f4ddb 100644
+index eb1624b..55100de 100644
 --- a/arch/sparc/kernel/us3_cpufreq.c
 +++ b/arch/sparc/kernel/us3_cpufreq.c
 @@ -18,14 +18,12 @@
@@ -9129,7 +8853,7 @@ index eb1624b..f9f4ddb 100644
 -              return ret;
 -      }
 +           impl == PANTHER_IMPL))
-+              return cpufreq_register_driver(cpufreq_us3_driver);
++              return cpufreq_register_driver(&cpufreq_us3_driver);
  
        return -ENODEV;
  }
@@ -9143,7 +8867,7 @@ index eb1624b..f9f4ddb 100644
 -              kfree(us3_freq_table);
 -              us3_freq_table = NULL;
 -      }
-+      cpufreq_unregister_driver(cpufreq_us3_driver);
++      cpufreq_unregister_driver(&cpufreq_us3_driver);
  }
  
  MODULE_AUTHOR("David S. Miller <davem@redhat.com>");
@@ -10366,6 +10090,26 @@ index 9ab078a..d6635c2 100644
                n = _copy_from_user(to, from, n);
        else
                copy_from_user_overflow();
+diff --git a/arch/tile/mm/hugetlbpage.c b/arch/tile/mm/hugetlbpage.c
+index 650ccff..45fe2d6 100644
+--- a/arch/tile/mm/hugetlbpage.c
++++ b/arch/tile/mm/hugetlbpage.c
+@@ -239,6 +239,7 @@ static unsigned long hugetlb_get_unmapped_area_bottomup(struct file *file,
+       info.high_limit = TASK_SIZE;
+       info.align_mask = PAGE_MASK & ~huge_page_mask(h);
+       info.align_offset = 0;
++      info.threadstack_offset = 0;
+       return vm_unmapped_area(&info);
+ }
+@@ -256,6 +257,7 @@ static unsigned long hugetlb_get_unmapped_area_topdown(struct file *file,
+       info.high_limit = current->mm->mmap_base;
+       info.align_mask = PAGE_MASK & ~huge_page_mask(h);
+       info.align_offset = 0;
++      info.threadstack_offset = 0;
+       addr = vm_unmapped_area(&info);
+       /*
 diff --git a/arch/um/Makefile b/arch/um/Makefile
 index 133f7de..1d6f2f1 100644
 --- a/arch/um/Makefile
@@ -10381,6 +10125,18 @@ 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 08107a7..ab22afe 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
@@ -10484,10 +10240,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 0694d09..b58b3aa 100644
+index 6ef2a37..74ad6ad 100644
 --- a/arch/x86/Kconfig
 +++ b/arch/x86/Kconfig
-@@ -238,7 +238,7 @@ config X86_HT
+@@ -243,7 +243,7 @@ config X86_HT
  
  config X86_32_LAZY_GS
        def_bool y
@@ -10496,7 +10252,7 @@ index 0694d09..b58b3aa 100644
  
  config ARCH_HWEIGHT_CFLAGS
        string
-@@ -1031,6 +1031,7 @@ config MICROCODE_OLD_INTERFACE
+@@ -1076,6 +1076,7 @@ config MICROCODE_EARLY
  
  config X86_MSR
        tristate "/dev/cpu/*/msr - Model-specific register support"
@@ -10504,7 +10260,7 @@ index 0694d09..b58b3aa 100644
        ---help---
          This device gives privileged processes access to the x86
          Model-Specific Registers (MSRs).  It is a character device with
-@@ -1054,7 +1055,7 @@ choice
+@@ -1099,7 +1100,7 @@ choice
  
  config NOHIGHMEM
        bool "off"
@@ -10513,7 +10269,7 @@ index 0694d09..b58b3aa 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
-@@ -1091,7 +1092,7 @@ config NOHIGHMEM
+@@ -1136,7 +1137,7 @@ config NOHIGHMEM
  
  config HIGHMEM4G
        bool "4GB"
@@ -10522,7 +10278,7 @@ index 0694d09..b58b3aa 100644
        ---help---
          Select this if you have a 32-bit processor and between 1 and 4
          gigabytes of physical RAM.
-@@ -1145,7 +1146,7 @@ config PAGE_OFFSET
+@@ -1189,7 +1190,7 @@ config PAGE_OFFSET
        hex
        default 0xB0000000 if VMSPLIT_3G_OPT
        default 0x80000000 if VMSPLIT_2G
@@ -10531,7 +10287,7 @@ index 0694d09..b58b3aa 100644
        default 0x40000000 if VMSPLIT_1G
        default 0xC0000000
        depends on X86_32
-@@ -1542,6 +1543,7 @@ config SECCOMP
+@@ -1587,6 +1588,7 @@ config SECCOMP
  
  config CC_STACKPROTECTOR
        bool "Enable -fstack-protector buffer overflow detection"
@@ -10539,23 +10295,16 @@ index 0694d09..b58b3aa 100644
        ---help---
          This option turns on the -fstack-protector GCC feature. This
          feature puts, at the beginning of functions, a canary value on
-@@ -1599,6 +1601,7 @@ config KEXEC_JUMP
- config PHYSICAL_START
-       hex "Physical address where the kernel is loaded" if (EXPERT || CRASH_DUMP)
-       default "0x1000000"
-+      range 0x400000 0x40000000
-       ---help---
-         This gives the physical address where the kernel is loaded.
-@@ -1662,6 +1665,7 @@ config X86_NEED_RELOCS
+@@ -1706,6 +1708,8 @@ config X86_NEED_RELOCS
  config PHYSICAL_ALIGN
        hex "Alignment value to which kernel should be aligned" if X86_32
        default "0x1000000"
-+      range 0x400000 0x1000000 if PAX_KERNEXEC
++      range 0x200000 0x1000000 if PAX_KERNEXEC && X86_PAE
++      range 0x400000 0x1000000 if PAX_KERNEXEC && !X86_PAE
        range 0x2000 0x1000000
        ---help---
          This value puts the alignment restrictions on physical address
-@@ -1737,9 +1741,10 @@ config DEBUG_HOTPLUG_CPU0
+@@ -1781,9 +1785,10 @@ config DEBUG_HOTPLUG_CPU0
          If unsure, say N.
  
  config COMPAT_VDSO
@@ -10630,10 +10379,10 @@ index b322f12..652d0d9 100644
          Enabling this option turns a certain set of sanity checks for user
          copy operations into compile time failures.
 diff --git a/arch/x86/Makefile b/arch/x86/Makefile
-index e71fc42..7829607 100644
+index 5c47726..8c4fa67 100644
 --- a/arch/x86/Makefile
 +++ b/arch/x86/Makefile
-@@ -50,6 +50,7 @@ else
+@@ -54,6 +54,7 @@ else
          UTS_MACHINE := x86_64
          CHECKFLAGS += -D__x86_64__ -m64
  
@@ -10641,7 +10390,7 @@ index e71fc42..7829607 100644
          KBUILD_AFLAGS += -m64
          KBUILD_CFLAGS += -m64
  
-@@ -230,3 +231,12 @@ define archhelp
+@@ -234,3 +235,12 @@ define archhelp
    echo  '                  FDARGS="..."  arguments for the booted kernel'
    echo  '                  FDINITRD=file initrd for the booted kernel'
  endef
@@ -10691,7 +10440,7 @@ index 878e4b9..20537ab 100644
  
  #endif /* BOOT_BITOPS_H */
 diff --git a/arch/x86/boot/boot.h b/arch/x86/boot/boot.h
-index 18997e5..83d9c67 100644
+index 5b75319..331a4ca 100644
 --- a/arch/x86/boot/boot.h
 +++ b/arch/x86/boot/boot.h
 @@ -85,7 +85,7 @@ static inline void io_delay(void)
@@ -10713,7 +10462,7 @@ index 18997e5..83d9c67 100644
        return diff;
  }
 diff --git a/arch/x86/boot/compressed/Makefile b/arch/x86/boot/compressed/Makefile
-index 8a84501..b2d165f 100644
+index 5ef205c..342191d 100644
 --- a/arch/x86/boot/compressed/Makefile
 +++ b/arch/x86/boot/compressed/Makefile
 @@ -14,6 +14,9 @@ cflags-$(CONFIG_X86_64) := -mcmodel=small
@@ -10727,7 +10476,7 @@ index 8a84501..b2d165f 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 c205035..5853587 100644
+index 35ee62f..b6609b6 100644
 --- a/arch/x86/boot/compressed/eboot.c
 +++ b/arch/x86/boot/compressed/eboot.c
 @@ -150,7 +150,6 @@ again:
@@ -10779,10 +10528,10 @@ index 1e3184f..0d11e2e 100644
        jmp     1b
  2:
 diff --git a/arch/x86/boot/compressed/head_64.S b/arch/x86/boot/compressed/head_64.S
-index f5d1aaa..cce11dc 100644
+index c1d383d..57ab51c 100644
 --- a/arch/x86/boot/compressed/head_64.S
 +++ b/arch/x86/boot/compressed/head_64.S
-@@ -91,7 +91,7 @@ ENTRY(startup_32)
+@@ -97,7 +97,7 @@ ENTRY(startup_32)
        notl    %eax
        andl    %eax, %ebx
  #else
@@ -10791,7 +10540,7 @@ index f5d1aaa..cce11dc 100644
  #endif
  
        /* Target address to relocate to for decompression */
-@@ -273,7 +273,7 @@ preferred_addr:
+@@ -272,7 +272,7 @@ preferred_addr:
        notq    %rax
        andq    %rax, %rbp
  #else
@@ -10800,8 +10549,19 @@ index f5d1aaa..cce11dc 100644
  #endif
  
        /* Target address to relocate to for decompression */
+@@ -363,8 +363,8 @@ gdt:
+       .long   gdt
+       .word   0
+       .quad   0x0000000000000000      /* NULL descriptor */
+-      .quad   0x00af9a000000ffff      /* __KERNEL_CS */
+-      .quad   0x00cf92000000ffff      /* __KERNEL_DS */
++      .quad   0x00af9b000000ffff      /* __KERNEL_CS */
++      .quad   0x00cf93000000ffff      /* __KERNEL_DS */
+       .quad   0x0080890000000000      /* TS descriptor */
+       .quad   0x0000000000000000      /* TS continued */
+ gdt_end:
 diff --git a/arch/x86/boot/compressed/misc.c b/arch/x86/boot/compressed/misc.c
-index 88f7ff6..ed695dd 100644
+index 7cb56c6..d382d84 100644
 --- a/arch/x86/boot/compressed/misc.c
 +++ b/arch/x86/boot/compressed/misc.c
 @@ -303,7 +303,7 @@ static void parse_elf(void *output)
@@ -10813,7 +10573,7 @@ index 88f7ff6..ed695dd 100644
  #else
                        dest = (void *)(phdr->p_paddr);
  #endif
-@@ -352,7 +352,7 @@ asmlinkage void decompress_kernel(void *rmode, memptr heap,
+@@ -354,7 +354,7 @@ asmlinkage void decompress_kernel(void *rmode, memptr heap,
                error("Destination address too large");
  #endif
  #ifndef CONFIG_RELOCATABLE
@@ -10922,10 +10682,10 @@ index 4d3ff03..e4972ff 100644
                err = check_flags();
        }
 diff --git a/arch/x86/boot/header.S b/arch/x86/boot/header.S
-index 944ce59..87ee37a 100644
+index 9ec06a1..2c25e79 100644
 --- a/arch/x86/boot/header.S
 +++ b/arch/x86/boot/header.S
-@@ -401,10 +401,14 @@ setup_data:              .quad 0                 # 64-bit physical pointer to
+@@ -409,10 +409,14 @@ setup_data:              .quad 0                 # 64-bit physical pointer to
                                                # single linked list of
                                                # struct setup_data
  
@@ -10980,7 +10740,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 5b577d5..3c1fed4 100644
+index 9105655..5e37f27 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 @@
@@ -10992,17 +10752,17 @@ index 5b577d5..3c1fed4 100644
  .extern crypto_ft_tab
  .extern crypto_it_tab
  .extern crypto_fl_tab
-@@ -71,6 +73,8 @@ FUNC:        movq    r1,r2;                  \
+@@ -70,6 +72,8 @@
        je      B192;                   \
        leaq    32(r9),r9;
  
 +#define ret   pax_force_retaddr 0, 1; ret
 +
- #define epilogue(r1,r2,r3,r4,r5,r6,r7,r8,r9) \
+ #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 3470624..201259d 100644
+index 04b7977..402f223 100644
 --- a/arch/x86/crypto/aesni-intel_asm.S
 +++ b/arch/x86/crypto/aesni-intel_asm.S
 @@ -31,6 +31,7 @@
@@ -11013,427 +10773,408 @@ index 3470624..201259d 100644
  
  #ifdef __x86_64__
  .data
-@@ -1436,7 +1437,9 @@ _return_T_done_decrypt:
+@@ -1435,6 +1436,7 @@ _return_T_done_decrypt:
        pop     %r14
        pop     %r13
        pop     %r12
 +      pax_force_retaddr 0, 1
        ret
-+ENDPROC(aesni_gcm_dec)
+ ENDPROC(aesni_gcm_dec)
  
- /*****************************************************************************
-@@ -1699,7 +1702,9 @@ _return_T_done_encrypt:
+@@ -1699,6 +1701,7 @@ _return_T_done_encrypt:
        pop     %r14
        pop     %r13
        pop     %r12
 +      pax_force_retaddr 0, 1
        ret
-+ENDPROC(aesni_gcm_enc)
- #endif
+ ENDPROC(aesni_gcm_enc)
  
-@@ -1714,6 +1719,7 @@ _key_expansion_256a:
+@@ -1716,6 +1719,7 @@ _key_expansion_256a:
        pxor %xmm1, %xmm0
        movaps %xmm0, (TKEYP)
        add $0x10, TKEYP
 +      pax_force_retaddr_bts
        ret
- .align 4
-@@ -1738,6 +1744,7 @@ _key_expansion_192a:
+ ENDPROC(_key_expansion_128)
+ ENDPROC(_key_expansion_256a)
+@@ -1742,6 +1746,7 @@ _key_expansion_192a:
        shufps $0b01001110, %xmm2, %xmm1
        movaps %xmm1, 0x10(TKEYP)
        add $0x20, TKEYP
 +      pax_force_retaddr_bts
        ret
+ ENDPROC(_key_expansion_192a)
  
- .align 4
-@@ -1757,6 +1764,7 @@ _key_expansion_192b:
+@@ -1762,6 +1767,7 @@ _key_expansion_192b:
  
        movaps %xmm0, (TKEYP)
        add $0x10, TKEYP
 +      pax_force_retaddr_bts
        ret
+ ENDPROC(_key_expansion_192b)
  
- .align 4
-@@ -1769,6 +1777,7 @@ _key_expansion_256b:
+@@ -1775,6 +1781,7 @@ _key_expansion_256b:
        pxor %xmm1, %xmm2
        movaps %xmm2, (TKEYP)
        add $0x10, TKEYP
 +      pax_force_retaddr_bts
        ret
+ ENDPROC(_key_expansion_256b)
  
- /*
-@@ -1881,7 +1890,9 @@ ENTRY(aesni_set_key)
+@@ -1888,6 +1895,7 @@ ENTRY(aesni_set_key)
  #ifndef __x86_64__
        popl KEYP
  #endif
 +      pax_force_retaddr 0, 1
        ret
-+ENDPROC(aesni_set_key)
+ ENDPROC(aesni_set_key)
  
- /*
-  * void aesni_enc(struct crypto_aes_ctx *ctx, u8 *dst, const u8 *src)
-@@ -1902,7 +1913,9 @@ ENTRY(aesni_enc)
+@@ -1910,6 +1918,7 @@ ENTRY(aesni_enc)
        popl KLEN
        popl KEYP
  #endif
 +      pax_force_retaddr 0, 1
        ret
-+ENDPROC(aesni_enc)
+ ENDPROC(aesni_enc)
  
- /*
-  * _aesni_enc1:               internal ABI
-@@ -1959,6 +1972,7 @@ _aesni_enc1:
+@@ -1968,6 +1977,7 @@ _aesni_enc1:
        AESENC KEY STATE
        movaps 0x70(TKEYP), KEY
        AESENCLAST KEY STATE
 +      pax_force_retaddr_bts
        ret
+ ENDPROC(_aesni_enc1)
  
- /*
-@@ -2067,6 +2081,7 @@ _aesni_enc4:
+@@ -2077,6 +2087,7 @@ _aesni_enc4:
        AESENCLAST KEY STATE2
        AESENCLAST KEY STATE3
        AESENCLAST KEY STATE4
 +      pax_force_retaddr_bts
        ret
+ ENDPROC(_aesni_enc4)
  
- /*
-@@ -2089,7 +2104,9 @@ ENTRY(aesni_dec)
+@@ -2100,6 +2111,7 @@ ENTRY(aesni_dec)
        popl KLEN
        popl KEYP
  #endif
 +      pax_force_retaddr 0, 1
        ret
-+ENDPROC(aesni_dec)
+ ENDPROC(aesni_dec)
  
- /*
-  * _aesni_dec1:               internal ABI
-@@ -2146,6 +2163,7 @@ _aesni_dec1:
+@@ -2158,6 +2170,7 @@ _aesni_dec1:
        AESDEC KEY STATE
        movaps 0x70(TKEYP), KEY
        AESDECLAST KEY STATE
 +      pax_force_retaddr_bts
        ret
+ ENDPROC(_aesni_dec1)
  
- /*
-@@ -2254,6 +2272,7 @@ _aesni_dec4:
+@@ -2267,6 +2280,7 @@ _aesni_dec4:
        AESDECLAST KEY STATE2
        AESDECLAST KEY STATE3
        AESDECLAST KEY STATE4
 +      pax_force_retaddr_bts
        ret
+ ENDPROC(_aesni_dec4)
  
- /*
-@@ -2311,7 +2330,9 @@ ENTRY(aesni_ecb_enc)
+@@ -2325,6 +2339,7 @@ ENTRY(aesni_ecb_enc)
        popl KEYP
        popl LEN
  #endif
 +      pax_force_retaddr 0, 1
        ret
-+ENDPROC(aesni_ecb_enc)
+ ENDPROC(aesni_ecb_enc)
  
- /*
-  * void aesni_ecb_dec(struct crypto_aes_ctx *ctx, const u8 *dst, u8 *src,
-@@ -2369,7 +2390,9 @@ ENTRY(aesni_ecb_dec)
+@@ -2384,6 +2399,7 @@ ENTRY(aesni_ecb_dec)
        popl KEYP
        popl LEN
  #endif
 +      pax_force_retaddr 0, 1
        ret
-+ENDPROC(aesni_ecb_dec)
+ ENDPROC(aesni_ecb_dec)
  
- /*
-  * void aesni_cbc_enc(struct crypto_aes_ctx *ctx, const u8 *dst, u8 *src,
-@@ -2410,7 +2433,9 @@ ENTRY(aesni_cbc_enc)
+@@ -2426,6 +2442,7 @@ ENTRY(aesni_cbc_enc)
        popl LEN
        popl IVP
  #endif
 +      pax_force_retaddr 0, 1
        ret
-+ENDPROC(aesni_cbc_enc)
+ ENDPROC(aesni_cbc_enc)
  
- /*
-  * void aesni_cbc_dec(struct crypto_aes_ctx *ctx, const u8 *dst, u8 *src,
-@@ -2500,7 +2525,9 @@ ENTRY(aesni_cbc_dec)
+@@ -2517,6 +2534,7 @@ ENTRY(aesni_cbc_dec)
        popl LEN
        popl IVP
  #endif
 +      pax_force_retaddr 0, 1
        ret
-+ENDPROC(aesni_cbc_dec)
+ ENDPROC(aesni_cbc_dec)
  
- #ifdef __x86_64__
- .align 16
-@@ -2526,6 +2553,7 @@ _aesni_inc_init:
+@@ -2544,6 +2562,7 @@ _aesni_inc_init:
        mov $1, TCTR_LOW
        MOVQ_R64_XMM TCTR_LOW INC
        MOVQ_R64_XMM CTR TCTR_LOW
 +      pax_force_retaddr_bts
        ret
+ ENDPROC(_aesni_inc_init)
  
- /*
-@@ -2554,6 +2582,7 @@ _aesni_inc:
+@@ -2573,6 +2592,7 @@ _aesni_inc:
  .Linc_low:
        movaps CTR, IV
        PSHUFB_XMM BSWAP_MASK IV
 +      pax_force_retaddr_bts
        ret
+ ENDPROC(_aesni_inc)
  
- /*
-@@ -2614,5 +2643,7 @@ ENTRY(aesni_ctr_enc)
+@@ -2634,6 +2654,7 @@ ENTRY(aesni_ctr_enc)
  .Lctr_enc_ret:
        movups IV, (IVP)
  .Lctr_enc_just_ret:
 +      pax_force_retaddr 0, 1
        ret
-+ENDPROC(aesni_ctr_enc)
+ ENDPROC(aesni_ctr_enc)
  #endif
 diff --git a/arch/x86/crypto/blowfish-x86_64-asm_64.S b/arch/x86/crypto/blowfish-x86_64-asm_64.S
-index 391d245..67f35c2 100644
+index 246c670..4d1ed00 100644
 --- a/arch/x86/crypto/blowfish-x86_64-asm_64.S
 +++ b/arch/x86/crypto/blowfish-x86_64-asm_64.S
-@@ -20,6 +20,8 @@
-  *
+@@ -21,6 +21,7 @@
   */
  
+ #include <linux/linkage.h>
 +#include <asm/alternative-asm.h>
-+
  .file "blowfish-x86_64-asm.S"
  .text
-@@ -151,9 +153,11 @@ __blowfish_enc_blk:
-       jnz __enc_xor;
+@@ -149,9 +150,11 @@ ENTRY(__blowfish_enc_blk)
+       jnz .L__enc_xor;
  
        write_block();
 +      pax_force_retaddr 0, 1
        ret;
- __enc_xor:
.L__enc_xor:
        xor_block();
 +      pax_force_retaddr 0, 1
        ret;
+ ENDPROC(__blowfish_enc_blk)
  
- .align 8
-@@ -188,6 +192,7 @@ blowfish_dec_blk:
+@@ -183,6 +186,7 @@ ENTRY(blowfish_dec_blk)
  
        movq %r11, %rbp;
  
 +      pax_force_retaddr 0, 1
        ret;
+ ENDPROC(blowfish_dec_blk)
  
- /**********************************************************************
-@@ -342,6 +347,7 @@ __blowfish_enc_blk_4way:
+@@ -334,6 +338,7 @@ ENTRY(__blowfish_enc_blk_4way)
  
        popq %rbx;
        popq %rbp;
 +      pax_force_retaddr 0, 1
        ret;
  
- __enc_xor4:
-@@ -349,6 +355,7 @@ __enc_xor4:
.L__enc_xor4:
+@@ -341,6 +346,7 @@ ENTRY(__blowfish_enc_blk_4way)
  
        popq %rbx;
        popq %rbp;
 +      pax_force_retaddr 0, 1
        ret;
+ ENDPROC(__blowfish_enc_blk_4way)
  
- .align 8
-@@ -386,5 +393,6 @@ blowfish_dec_blk_4way:
+@@ -375,5 +381,6 @@ ENTRY(blowfish_dec_blk_4way)
        popq %rbx;
        popq %rbp;
  
 +      pax_force_retaddr 0, 1
        ret;
+ ENDPROC(blowfish_dec_blk_4way)
 diff --git a/arch/x86/crypto/camellia-x86_64-asm_64.S b/arch/x86/crypto/camellia-x86_64-asm_64.S
-index 0b33743..7a56206 100644
+index 310319c..ce174a4 100644
 --- a/arch/x86/crypto/camellia-x86_64-asm_64.S
 +++ b/arch/x86/crypto/camellia-x86_64-asm_64.S
-@@ -20,6 +20,8 @@
-  *
+@@ -21,6 +21,7 @@
   */
  
+ #include <linux/linkage.h>
 +#include <asm/alternative-asm.h>
-+
  .file "camellia-x86_64-asm_64.S"
  .text
-@@ -229,12 +231,14 @@ __enc_done:
+@@ -228,12 +229,14 @@ ENTRY(__camellia_enc_blk)
        enc_outunpack(mov, RT1);
  
        movq RRBP, %rbp;
 +      pax_force_retaddr 0, 1
        ret;
  
- __enc_xor:
.L__enc_xor:
        enc_outunpack(xor, RT1);
  
        movq RRBP, %rbp;
 +      pax_force_retaddr 0, 1
        ret;
+ ENDPROC(__camellia_enc_blk)
  
- .global camellia_dec_blk;
-@@ -275,6 +279,7 @@ __dec_rounds16:
+@@ -272,6 +275,7 @@ ENTRY(camellia_dec_blk)
        dec_outunpack();
  
        movq RRBP, %rbp;
 +      pax_force_retaddr 0, 1
        ret;
+ ENDPROC(camellia_dec_blk)
  
- /**********************************************************************
-@@ -468,6 +473,7 @@ __enc2_done:
+@@ -463,6 +467,7 @@ ENTRY(__camellia_enc_blk_2way)
  
        movq RRBP, %rbp;
        popq %rbx;
 +      pax_force_retaddr 0, 1
        ret;
  
- __enc2_xor:
-@@ -475,6 +481,7 @@ __enc2_xor:
.L__enc2_xor:
+@@ -470,6 +475,7 @@ ENTRY(__camellia_enc_blk_2way)
  
        movq RRBP, %rbp;
        popq %rbx;
 +      pax_force_retaddr 0, 1
        ret;
+ ENDPROC(__camellia_enc_blk_2way)
  
- .global camellia_dec_blk_2way;
-@@ -517,4 +524,5 @@ __dec2_rounds16:
+@@ -510,5 +516,6 @@ ENTRY(camellia_dec_blk_2way)
  
        movq RRBP, %rbp;
        movq RXOR, %rbx;
 +      pax_force_retaddr 0, 1
        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 15b00ac..2071784 100644
+index c35fd5d..c1ee236 100644
 --- a/arch/x86/crypto/cast5-avx-x86_64-asm_64.S
 +++ b/arch/x86/crypto/cast5-avx-x86_64-asm_64.S
-@@ -23,6 +23,8 @@
-  *
+@@ -24,6 +24,7 @@
   */
  
+ #include <linux/linkage.h>
 +#include <asm/alternative-asm.h>
-+
  .file "cast5-avx-x86_64-asm_64.S"
  
- .extern cast_s1
-@@ -281,6 +283,7 @@ __skip_enc:
+@@ -281,6 +282,7 @@ __cast5_enc_blk16:
        outunpack_blocks(RR3, RL3, RTMP, RX, RKM);
        outunpack_blocks(RR4, RL4, RTMP, RX, RKM);
  
 +      pax_force_retaddr 0, 1
        ret;
+ ENDPROC(__cast5_enc_blk16)
  
- .align 16
-@@ -353,6 +356,7 @@ __dec_tail:
+@@ -352,6 +354,7 @@ __cast5_dec_blk16:
        outunpack_blocks(RR3, RL3, RTMP, RX, RKM);
        outunpack_blocks(RR4, RL4, RTMP, RX, RKM);
  
 +      pax_force_retaddr 0, 1
        ret;
  
- __skip_dec:
-@@ -392,6 +396,7 @@ cast5_ecb_enc_16way:
.L__skip_dec:
+@@ -388,6 +391,7 @@ ENTRY(cast5_ecb_enc_16way)
        vmovdqu RR4, (6*4*4)(%r11);
        vmovdqu RL4, (7*4*4)(%r11);
  
 +      pax_force_retaddr
        ret;
+ ENDPROC(cast5_ecb_enc_16way)
  
- .align 16
-@@ -427,6 +432,7 @@ cast5_ecb_dec_16way:
+@@ -420,6 +424,7 @@ ENTRY(cast5_ecb_dec_16way)
        vmovdqu RR4, (6*4*4)(%r11);
        vmovdqu RL4, (7*4*4)(%r11);
  
 +      pax_force_retaddr
        ret;
+ ENDPROC(cast5_ecb_dec_16way)
  
- .align 16
-@@ -479,6 +485,7 @@ cast5_cbc_dec_16way:
+@@ -469,6 +474,7 @@ ENTRY(cast5_cbc_dec_16way)
  
        popq %r12;
  
 +      pax_force_retaddr
        ret;
+ ENDPROC(cast5_cbc_dec_16way)
  
- .align 16
-@@ -555,4 +562,5 @@ cast5_ctr_16way:
+@@ -542,5 +548,6 @@ ENTRY(cast5_ctr_16way)
  
        popq %r12;
  
 +      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 2569d0d..637c289 100644
+index f93b610..c09bf40 100644
 --- a/arch/x86/crypto/cast6-avx-x86_64-asm_64.S
 +++ b/arch/x86/crypto/cast6-avx-x86_64-asm_64.S
-@@ -23,6 +23,8 @@
-  *
+@@ -24,6 +24,7 @@
   */
  
+ #include <linux/linkage.h>
 +#include <asm/alternative-asm.h>
-+
  #include "glue_helper-asm-avx.S"
  
  .file "cast6-avx-x86_64-asm_64.S"
-@@ -294,6 +296,7 @@ __cast6_enc_blk8:
+@@ -293,6 +294,7 @@ __cast6_enc_blk8:
        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
        ret;
+ ENDPROC(__cast6_enc_blk8)
  
- .align 8
-@@ -340,6 +343,7 @@ __cast6_dec_blk8:
+@@ -338,6 +340,7 @@ __cast6_dec_blk8:
        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
        ret;
+ ENDPROC(__cast6_dec_blk8)
  
- .align 8
-@@ -361,6 +365,7 @@ cast6_ecb_enc_8way:
+@@ -356,6 +359,7 @@ ENTRY(cast6_ecb_enc_8way)
  
        store_8way(%r11, RA1, RB1, RC1, RD1, RA2, RB2, RC2, RD2);
  
 +      pax_force_retaddr
        ret;
+ ENDPROC(cast6_ecb_enc_8way)
  
- .align 8
-@@ -382,6 +387,7 @@ cast6_ecb_dec_8way:
+@@ -374,6 +378,7 @@ ENTRY(cast6_ecb_dec_8way)
  
        store_8way(%r11, RA1, RB1, RC1, RD1, RA2, RB2, RC2, RD2);
  
 +      pax_force_retaddr
        ret;
+ ENDPROC(cast6_ecb_dec_8way)
  
- .align 8
-@@ -408,6 +414,7 @@ cast6_cbc_dec_8way:
+@@ -397,6 +402,7 @@ ENTRY(cast6_cbc_dec_8way)
  
        popq %r12;
  
 +      pax_force_retaddr
        ret;
+ ENDPROC(cast6_cbc_dec_8way)
  
- .align 8
-@@ -436,4 +443,5 @@ cast6_ctr_8way:
+@@ -422,5 +428,6 @@ ENTRY(cast6_ctr_8way)
  
        popq %r12;
  
 +      pax_force_retaddr
        ret;
+ ENDPROC(cast6_ctr_8way)
 diff --git a/arch/x86/crypto/salsa20-x86_64-asm_64.S b/arch/x86/crypto/salsa20-x86_64-asm_64.S
-index 6214a9b..1f4fc9a 100644
+index 9279e0b..9270820 100644
 --- a/arch/x86/crypto/salsa20-x86_64-asm_64.S
 +++ b/arch/x86/crypto/salsa20-x86_64-asm_64.S
-@@ -1,3 +1,5 @@
+@@ -1,4 +1,5 @@
+ #include <linux/linkage.h>
 +#include <asm/alternative-asm.h>
-+
- # enter ECRYPT_encrypt_bytes
- .text
- .p2align 5
-@@ -790,6 +792,7 @@ ECRYPT_encrypt_bytes:
+ # enter salsa20_encrypt_bytes
+ ENTRY(salsa20_encrypt_bytes)
+@@ -789,6 +790,7 @@ ENTRY(salsa20_encrypt_bytes)
        add     %r11,%rsp
        mov     %rdi,%rax
        mov     %rsi,%rdx
@@ -11441,257 +11182,257 @@ index 6214a9b..1f4fc9a 100644
        ret
  #   bytesatleast65:
  ._bytesatleast65:
-@@ -891,6 +894,7 @@ ECRYPT_keysetup:
+@@ -889,6 +891,7 @@ ENTRY(salsa20_keysetup)
        add     %r11,%rsp
        mov     %rdi,%rax
        mov     %rsi,%rdx
 +      pax_force_retaddr
        ret
- # enter ECRYPT_ivsetup
- .text
-@@ -917,4 +921,5 @@ ECRYPT_ivsetup:
+ ENDPROC(salsa20_keysetup)
+@@ -914,5 +917,6 @@ ENTRY(salsa20_ivsetup)
        add     %r11,%rsp
        mov     %rdi,%rax
        mov     %rsi,%rdx
 +      pax_force_retaddr
        ret
+ ENDPROC(salsa20_ivsetup)
 diff --git a/arch/x86/crypto/serpent-avx-x86_64-asm_64.S b/arch/x86/crypto/serpent-avx-x86_64-asm_64.S
-index 02b0e9f..cf4cf5c 100644
+index 43c9386..a0e2d60 100644
 --- a/arch/x86/crypto/serpent-avx-x86_64-asm_64.S
 +++ b/arch/x86/crypto/serpent-avx-x86_64-asm_64.S
-@@ -24,6 +24,8 @@
-  *
+@@ -25,6 +25,7 @@
   */
  
+ #include <linux/linkage.h>
 +#include <asm/alternative-asm.h>
-+
  #include "glue_helper-asm-avx.S"
  
  .file "serpent-avx-x86_64-asm_64.S"
-@@ -618,6 +620,7 @@ __serpent_enc_blk8_avx:
+@@ -617,6 +618,7 @@ __serpent_enc_blk8_avx:
        write_blocks(RA1, RB1, RC1, RD1, RK0, RK1, RK2);
        write_blocks(RA2, RB2, RC2, RD2, RK0, RK1, RK2);
  
 +      pax_force_retaddr
        ret;
+ ENDPROC(__serpent_enc_blk8_avx)
  
- .align 8
-@@ -673,6 +676,7 @@ __serpent_dec_blk8_avx:
+@@ -671,6 +673,7 @@ __serpent_dec_blk8_avx:
        write_blocks(RC1, RD1, RB1, RE1, RK0, RK1, RK2);
        write_blocks(RC2, RD2, RB2, RE2, RK0, RK1, RK2);
  
 +      pax_force_retaddr
        ret;
+ ENDPROC(__serpent_dec_blk8_avx)
  
- .align 8
-@@ -692,6 +696,7 @@ serpent_ecb_enc_8way_avx:
+@@ -687,6 +690,7 @@ ENTRY(serpent_ecb_enc_8way_avx)
  
        store_8way(%rsi, RA1, RB1, RC1, RD1, RA2, RB2, RC2, RD2);
  
 +      pax_force_retaddr
        ret;
+ ENDPROC(serpent_ecb_enc_8way_avx)
  
- .align 8
-@@ -711,6 +716,7 @@ serpent_ecb_dec_8way_avx:
+@@ -703,6 +707,7 @@ ENTRY(serpent_ecb_dec_8way_avx)
  
        store_8way(%rsi, RC1, RD1, RB1, RE1, RC2, RD2, RB2, RE2);
  
 +      pax_force_retaddr
        ret;
+ ENDPROC(serpent_ecb_dec_8way_avx)
  
- .align 8
-@@ -730,6 +736,7 @@ serpent_cbc_dec_8way_avx:
+@@ -719,6 +724,7 @@ ENTRY(serpent_cbc_dec_8way_avx)
  
        store_cbc_8way(%rdx, %rsi, RC1, RD1, RB1, RE1, RC2, RD2, RB2, RE2);
  
 +      pax_force_retaddr
        ret;
+ ENDPROC(serpent_cbc_dec_8way_avx)
  
- .align 8
-@@ -751,4 +758,5 @@ serpent_ctr_8way_avx:
+@@ -737,5 +743,6 @@ ENTRY(serpent_ctr_8way_avx)
  
        store_ctr_8way(%rdx, %rsi, RA1, RB1, RC1, RD1, RA2, RB2, RC2, RD2);
  
 +      pax_force_retaddr
        ret;
+ ENDPROC(serpent_ctr_8way_avx)
 diff --git a/arch/x86/crypto/serpent-sse2-x86_64-asm_64.S b/arch/x86/crypto/serpent-sse2-x86_64-asm_64.S
-index 3ee1ff0..cbc568b 100644
+index acc066c..1559cc4 100644
 --- a/arch/x86/crypto/serpent-sse2-x86_64-asm_64.S
 +++ b/arch/x86/crypto/serpent-sse2-x86_64-asm_64.S
-@@ -24,6 +24,8 @@
-  *
+@@ -25,6 +25,7 @@
   */
  
+ #include <linux/linkage.h>
 +#include <asm/alternative-asm.h>
-+
  .file "serpent-sse2-x86_64-asm_64.S"
  .text
-@@ -692,12 +694,14 @@ __serpent_enc_blk_8way:
+@@ -690,12 +691,14 @@ ENTRY(__serpent_enc_blk_8way)
        write_blocks(%rsi, RA1, RB1, RC1, RD1, RK0, RK1, RK2);
        write_blocks(%rax, RA2, RB2, RC2, RD2, RK0, RK1, RK2);
  
 +      pax_force_retaddr
        ret;
  
- __enc_xor8:
.L__enc_xor8:
        xor_blocks(%rsi, RA1, RB1, RC1, RD1, RK0, RK1, RK2);
        xor_blocks(%rax, RA2, RB2, RC2, RD2, RK0, RK1, RK2);
  
 +      pax_force_retaddr
        ret;
+ ENDPROC(__serpent_enc_blk_8way)
  
- .align 8
-@@ -755,4 +759,5 @@ serpent_dec_blk_8way:
+@@ -750,5 +753,6 @@ ENTRY(serpent_dec_blk_8way)
        write_blocks(%rsi, RC1, RD1, RB1, RE1, RK0, RK1, RK2);
        write_blocks(%rax, RC2, RD2, RB2, RE2, RK0, RK1, RK2);
  
 +      pax_force_retaddr
        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 49d6987..df66bd4 100644
+index a410950..3356d42 100644
 --- a/arch/x86/crypto/sha1_ssse3_asm.S
 +++ b/arch/x86/crypto/sha1_ssse3_asm.S
-@@ -28,6 +28,8 @@
-  * (at your option) any later version.
+@@ -29,6 +29,7 @@
   */
  
+ #include <linux/linkage.h>
 +#include <asm/alternative-asm.h>
-+
  #define CTX   %rdi    // arg1
  #define BUF   %rsi    // arg2
- #define CNT   %rdx    // arg3
-@@ -104,6 +106,7 @@
+@@ -104,6 +105,7 @@
        pop     %r12
        pop     %rbp
        pop     %rbx
 +      pax_force_retaddr 0, 1
        ret
  
-       .size   \name, .-\name
+       ENDPROC(\name)
 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 ebac16b..8092eb9 100644
+index 8d3e113..898b161 100644
 --- a/arch/x86/crypto/twofish-avx-x86_64-asm_64.S
 +++ b/arch/x86/crypto/twofish-avx-x86_64-asm_64.S
-@@ -23,6 +23,8 @@
-  *
+@@ -24,6 +24,7 @@
   */
  
+ #include <linux/linkage.h>
 +#include <asm/alternative-asm.h>
-+
  #include "glue_helper-asm-avx.S"
  
  .file "twofish-avx-x86_64-asm_64.S"
-@@ -283,6 +285,7 @@ __twofish_enc_blk8:
+@@ -282,6 +283,7 @@ __twofish_enc_blk8:
        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
        ret;
+ ENDPROC(__twofish_enc_blk8)
  
- .align 8
-@@ -324,6 +327,7 @@ __twofish_dec_blk8:
+@@ -322,6 +324,7 @@ __twofish_dec_blk8:
        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
        ret;
+ ENDPROC(__twofish_dec_blk8)
  
- .align 8
-@@ -345,6 +349,7 @@ twofish_ecb_enc_8way:
+@@ -340,6 +343,7 @@ ENTRY(twofish_ecb_enc_8way)
  
        store_8way(%r11, RC1, RD1, RA1, RB1, RC2, RD2, RA2, RB2);
  
 +      pax_force_retaddr 0, 1
        ret;
+ ENDPROC(twofish_ecb_enc_8way)
  
- .align 8
-@@ -366,6 +371,7 @@ twofish_ecb_dec_8way:
+@@ -358,6 +362,7 @@ ENTRY(twofish_ecb_dec_8way)
  
        store_8way(%r11, RA1, RB1, RC1, RD1, RA2, RB2, RC2, RD2);
  
 +      pax_force_retaddr 0, 1
        ret;
+ ENDPROC(twofish_ecb_dec_8way)
  
- .align 8
-@@ -392,6 +398,7 @@ twofish_cbc_dec_8way:
+@@ -381,6 +386,7 @@ ENTRY(twofish_cbc_dec_8way)
  
        popq %r12;
  
 +      pax_force_retaddr 0, 1
        ret;
+ ENDPROC(twofish_cbc_dec_8way)
  
- .align 8
-@@ -420,4 +427,5 @@ twofish_ctr_8way:
+@@ -406,5 +412,6 @@ ENTRY(twofish_ctr_8way)
  
        popq %r12;
  
 +      pax_force_retaddr 0, 1
        ret;
+ ENDPROC(twofish_ctr_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 5b012a2..36d5364 100644
+index 1c3b7ce..b365c5e 100644
 --- a/arch/x86/crypto/twofish-x86_64-asm_64-3way.S
 +++ b/arch/x86/crypto/twofish-x86_64-asm_64-3way.S
-@@ -20,6 +20,8 @@
-  *
+@@ -21,6 +21,7 @@
   */
  
+ #include <linux/linkage.h>
 +#include <asm/alternative-asm.h>
-+
  .file "twofish-x86_64-asm-3way.S"
  .text
-@@ -260,6 +262,7 @@ __twofish_enc_blk_3way:
+@@ -258,6 +259,7 @@ ENTRY(__twofish_enc_blk_3way)
        popq %r13;
        popq %r14;
        popq %r15;
 +      pax_force_retaddr 0, 1
        ret;
  
- __enc_xor3:
-@@ -271,6 +274,7 @@ __enc_xor3:
.L__enc_xor3:
+@@ -269,6 +271,7 @@ ENTRY(__twofish_enc_blk_3way)
        popq %r13;
        popq %r14;
        popq %r15;
 +      pax_force_retaddr 0, 1
        ret;
+ ENDPROC(__twofish_enc_blk_3way)
  
- .global twofish_dec_blk_3way
-@@ -312,5 +316,6 @@ twofish_dec_blk_3way:
+@@ -308,5 +311,6 @@ ENTRY(twofish_dec_blk_3way)
        popq %r13;
        popq %r14;
        popq %r15;
 +      pax_force_retaddr 0, 1
        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 7bcf3fc..f53832f 100644
+index a039d21..29e7615 100644
 --- a/arch/x86/crypto/twofish-x86_64-asm_64.S
 +++ b/arch/x86/crypto/twofish-x86_64-asm_64.S
-@@ -21,6 +21,7 @@
- .text
+@@ -22,6 +22,7 @@
  
+ #include <linux/linkage.h>
  #include <asm/asm-offsets.h>
 +#include <asm/alternative-asm.h>
  
  #define a_offset      0
  #define b_offset      4
-@@ -268,6 +269,7 @@ twofish_enc_blk:
+@@ -265,6 +266,7 @@ ENTRY(twofish_enc_blk)
  
        popq    R1
        movq    $1,%rax
 +      pax_force_retaddr 0, 1
        ret
+ ENDPROC(twofish_enc_blk)
  
- twofish_dec_blk:
-@@ -319,4 +321,5 @@ twofish_dec_blk:
+@@ -317,5 +319,6 @@ ENTRY(twofish_dec_blk)
  
        popq    R1
        movq    $1,%rax
 +      pax_force_retaddr 0, 1
        ret
+ ENDPROC(twofish_dec_blk)
 diff --git a/arch/x86/ia32/ia32_aout.c b/arch/x86/ia32/ia32_aout.c
-index a703af1..f5b9c36 100644
+index 03abf9b..a42ba29 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,
@@ -11704,10 +11445,10 @@ index a703af1..f5b9c36 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 a1daf4a..f8c4537 100644
+index cf1a471..3bc4cf8 100644
 --- a/arch/x86/ia32/ia32_signal.c
 +++ b/arch/x86/ia32/ia32_signal.c
-@@ -348,7 +348,7 @@ static void __user *get_sigframe(struct k_sigaction *ka, struct pt_regs *regs,
+@@ -340,7 +340,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,
         * i.e. so that on function entry ((sp + 4) & 15) == 0. */
@@ -11716,7 +11457,7 @@ index a1daf4a..f8c4537 100644
        return (void __user *) sp;
  }
  
-@@ -406,7 +406,7 @@ int ia32_setup_frame(int sig, struct k_sigaction *ka,
+@@ -398,7 +398,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.
                 */
@@ -11725,7 +11466,7 @@ index a1daf4a..f8c4537 100644
        } put_user_catch(err);
  
        if (err)
-@@ -448,7 +448,7 @@ int ia32_setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
+@@ -440,7 +440,7 @@ int ia32_setup_rt_frame(int sig, struct ksignal *ksig,
                0xb8,
                __NR_ia32_rt_sigreturn,
                0x80cd,
@@ -11733,11 +11474,11 @@ index a1daf4a..f8c4537 100644
 +              0
        };
  
-       frame = get_sigframe(ka, regs, sizeof(*frame), &fpstate);
-@@ -471,16 +471,18 @@ int ia32_setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
+       frame = get_sigframe(ksig, regs, sizeof(*frame), &fpstate);
+@@ -463,16 +463,18 @@ int ia32_setup_rt_frame(int sig, struct ksignal *ksig,
  
-               if (ka->sa.sa_flags & SA_RESTORER)
-                       restorer = ka->sa.sa_restorer;
+               if (ksig->ka.sa.sa_flags & SA_RESTORER)
+                       restorer = ksig->ka.sa.sa_restorer;
 +              else if (current->mm->context.vdso)
 +                      /* Return stub is in 32bit vsyscall page */
 +                      restorer = VDSO32_SYMBOL(current->mm->context.vdso, rt_sigreturn);
@@ -11755,9 +11496,9 @@ index a1daf4a..f8c4537 100644
 +              put_user_ex(*((const u64 *)&code), (u64 __user *)frame->retcode);
        } put_user_catch(err);
  
-       err |= copy_siginfo_to_user32(&frame->info, info);
+       err |= copy_siginfo_to_user32(&frame->info, &ksig->info);
 diff --git a/arch/x86/ia32/ia32entry.S b/arch/x86/ia32/ia32entry.S
-index 142c4ce..19b683f 100644
+index 474dc1b..be7bff5 100644
 --- a/arch/x86/ia32/ia32entry.S
 +++ b/arch/x86/ia32/ia32entry.S
 @@ -15,8 +15,10 @@
@@ -11851,7 +11592,7 @@ index 142c4ce..19b683f 100644
           32bit zero extended */ 
 +
 +#ifdef CONFIG_PAX_MEMORY_UDEREF
-+      mov $PAX_USER_SHADOW_BASE,%r11
++      mov pax_user_shadow_base,%r11
 +      add %r11,%rbp
 +#endif
 +
@@ -11971,7 +11712,7 @@ index 142c4ce..19b683f 100644
        /* hardware stack frame is complete now */      
 +
 +#ifdef CONFIG_PAX_MEMORY_UDEREF
-+      mov $PAX_USER_SHADOW_BASE,%r11
++      mov pax_user_shadow_base,%r11
 +      add %r11,%r8
 +#endif
 +
@@ -12069,7 +11810,7 @@ index 142c4ce..19b683f 100644
  END(ia32_syscall)
  
 diff --git a/arch/x86/ia32/sys_ia32.c b/arch/x86/ia32/sys_ia32.c
-index d0b689b..6811ddc 100644
+index ad7a20c..1ffa3c1 100644
 --- a/arch/x86/ia32/sys_ia32.c
 +++ b/arch/x86/ia32/sys_ia32.c
 @@ -69,8 +69,8 @@ asmlinkage long sys32_ftruncate64(unsigned int fd, unsigned long offset_low,
@@ -12083,41 +11824,7 @@ index d0b689b..6811ddc 100644
        SET_UID(uid, from_kuid_munged(current_user_ns(), stat->uid));
        SET_GID(gid, from_kgid_munged(current_user_ns(), stat->gid));
        if (!access_ok(VERIFY_WRITE, ubuf, sizeof(struct stat64)) ||
-@@ -303,7 +303,7 @@ asmlinkage long sys32_sched_rr_get_interval(compat_pid_t pid,
-       mm_segment_t old_fs = get_fs();
-       set_fs(KERNEL_DS);
--      ret = sys_sched_rr_get_interval(pid, (struct timespec __user *)&t);
-+      ret = sys_sched_rr_get_interval(pid, (struct timespec __force_user *)&t);
-       set_fs(old_fs);
-       if (put_compat_timespec(&t, interval))
-               return -EFAULT;
-@@ -313,13 +313,13 @@ asmlinkage long sys32_sched_rr_get_interval(compat_pid_t pid,
- asmlinkage long sys32_rt_sigpending(compat_sigset_t __user *set,
-                                   compat_size_t sigsetsize)
- {
--      sigset_t s;
-+      sigset_t s = { };
-       compat_sigset_t s32;
-       int ret;
-       mm_segment_t old_fs = get_fs();
-       set_fs(KERNEL_DS);
--      ret = sys_rt_sigpending((sigset_t __user *)&s, sigsetsize);
-+      ret = sys_rt_sigpending((sigset_t __force_user *)&s, sigsetsize);
-       set_fs(old_fs);
-       if (!ret) {
-               switch (_NSIG_WORDS) {
-@@ -344,7 +344,7 @@ asmlinkage long sys32_rt_sigqueueinfo(int pid, int sig,
-       if (copy_siginfo_from_user32(&info, uinfo))
-               return -EFAULT;
-       set_fs(KERNEL_DS);
--      ret = sys_rt_sigqueueinfo(pid, sig, (siginfo_t __user *)&info);
-+      ret = sys_rt_sigqueueinfo(pid, sig, (siginfo_t __force_user *)&info);
-       set_fs(old_fs);
-       return ret;
- }
-@@ -376,7 +376,7 @@ asmlinkage long sys32_sendfile(int out_fd, int in_fd,
+@@ -205,7 +205,7 @@ asmlinkage long sys32_sendfile(int out_fd, int in_fd,
                return -EFAULT;
  
        set_fs(KERNEL_DS);
@@ -13338,10 +13045,10 @@ index 59c6c40..5e0b22c 100644
  struct compat_timespec {
        compat_time_t   tv_sec;
 diff --git a/arch/x86/include/asm/cpufeature.h b/arch/x86/include/asm/cpufeature.h
-index 2d9075e..b75a844 100644
+index 93fe929..90858b7 100644
 --- a/arch/x86/include/asm/cpufeature.h
 +++ b/arch/x86/include/asm/cpufeature.h
-@@ -206,7 +206,7 @@
+@@ -207,7 +207,7 @@
  #define X86_FEATURE_BMI1      (9*32+ 3) /* 1st group bit manipulation extensions */
  #define X86_FEATURE_HLE               (9*32+ 4) /* Hardware Lock Elision */
  #define X86_FEATURE_AVX2      (9*32+ 5) /* AVX2 instructions */
@@ -13350,7 +13057,7 @@ index 2d9075e..b75a844 100644
  #define X86_FEATURE_BMI2      (9*32+ 8) /* 2nd group bit manipulation extensions */
  #define X86_FEATURE_ERMS      (9*32+ 9) /* Enhanced REP MOVSB/STOSB */
  #define X86_FEATURE_INVPCID   (9*32+10) /* Invalidate Processor Context ID */
-@@ -375,7 +375,7 @@ static __always_inline __pure bool __static_cpu_has(u16 bit)
+@@ -377,7 +377,7 @@ static __always_inline __pure bool __static_cpu_has(u16 bit)
                             ".section .discard,\"aw\",@progbits\n"
                             " .byte 0xff + (4f-3f) - (2b-1b)\n" /* size check */
                             ".previous\n"
@@ -13673,10 +13380,10 @@ index 75ce3f4..882e801 100644
  
  #endif /* _ASM_X86_EMERGENCY_RESTART_H */
 diff --git a/arch/x86/include/asm/fpu-internal.h b/arch/x86/include/asm/fpu-internal.h
-index 41ab26e..a88c9e6 100644
+index e25cc33..425d099 100644
 --- a/arch/x86/include/asm/fpu-internal.h
 +++ b/arch/x86/include/asm/fpu-internal.h
-@@ -126,7 +126,9 @@ static inline void sanitize_i387_state(struct task_struct *tsk)
+@@ -127,7 +127,9 @@ static inline void sanitize_i387_state(struct task_struct *tsk)
  ({                                                                    \
        int err;                                                        \
        asm volatile(ASM_STAC "\n"                                      \
@@ -13687,7 +13394,7 @@ index 41ab26e..a88c9e6 100644
                     "2: " ASM_CLAC "\n"                                \
                     ".section .fixup,\"ax\"\n"                         \
                     "3:  movl $-1,%[err]\n"                            \
-@@ -299,7 +301,7 @@ static inline int restore_fpu_checking(struct task_struct *tsk)
+@@ -300,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,
@@ -13767,10 +13474,10 @@ index be27ba1..8f13ff9 100644
                     : "memory"
        );
 diff --git a/arch/x86/include/asm/hw_irq.h b/arch/x86/include/asm/hw_irq.h
-index eb92a6e..b98b2f4 100644
+index 10a78c3..cc77143 100644
 --- a/arch/x86/include/asm/hw_irq.h
 +++ b/arch/x86/include/asm/hw_irq.h
-@@ -136,8 +136,8 @@ extern void setup_ioapic_dest(void);
+@@ -147,8 +147,8 @@ extern void setup_ioapic_dest(void);
  extern void enable_IO_APIC(void);
  
  /* Statistics */
@@ -13859,7 +13566,7 @@ index bba3cf8..06bc8da 100644
  #define INTERRUPT_RETURN              iret
  #define ENABLE_INTERRUPTS_SYSEXIT     sti; sysexit
 diff --git a/arch/x86/include/asm/kprobes.h b/arch/x86/include/asm/kprobes.h
-index d3ddd17..c9fb0cc 100644
+index 5a6d287..f815789 100644
 --- a/arch/x86/include/asm/kprobes.h
 +++ b/arch/x86/include/asm/kprobes.h
 @@ -38,13 +38,8 @@ typedef u8 kprobe_opcode_t;
@@ -13878,21 +13585,6 @@ index d3ddd17..c9fb0cc 100644
  
  #define flush_insn_slot(p)    do { } while (0)
  
-diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
-index dc87b65..85039f9 100644
---- a/arch/x86/include/asm/kvm_host.h
-+++ b/arch/x86/include/asm/kvm_host.h
-@@ -419,8 +419,8 @@ struct kvm_vcpu_arch {
-       gpa_t time;
-       struct pvclock_vcpu_time_info hv_clock;
-       unsigned int hw_tsc_khz;
--      unsigned int time_offset;
--      struct page *time_page;
-+      struct gfn_to_hva_cache pv_time;
-+      bool pv_time_enabled;
-       /* set guest stopped flag in pvclock flags field */
-       bool pvclock_set_guest_stopped_request;
 diff --git a/arch/x86/include/asm/local.h b/arch/x86/include/asm/local.h
 index 2d89e39..baee879 100644
 --- a/arch/x86/include/asm/local.h
@@ -14352,21 +14044,21 @@ index c0fa356..07a498a 100644
  
  void unregister_nmi_handler(unsigned int, const char *);
  
-diff --git a/arch/x86/include/asm/page_64_types.h b/arch/x86/include/asm/page_64_types.h
-index 320f7bb..e89f8f8 100644
---- a/arch/x86/include/asm/page_64_types.h
-+++ b/arch/x86/include/asm/page_64_types.h
-@@ -56,7 +56,7 @@ void copy_page(void *to, void *from);
+diff --git a/arch/x86/include/asm/page_64.h b/arch/x86/include/asm/page_64.h
+index 0f1ddee..e56bec9 100644
+--- a/arch/x86/include/asm/page_64.h
++++ b/arch/x86/include/asm/page_64.h
+@@ -7,7 +7,7 @@
  
  /* duplicated to the one in bootmem.h */
  extern unsigned long max_pfn;
 -extern unsigned long phys_base;
 +extern const unsigned long phys_base;
  
- extern unsigned long __phys_addr(unsigned long);
- #define __phys_reloc_hide(x)  (x)
+ static inline unsigned long __phys_addr_nodebug(unsigned long x)
+ {
 diff --git a/arch/x86/include/asm/paravirt.h b/arch/x86/include/asm/paravirt.h
-index 5edd174..c395822 100644
+index 7361e47..16dc226 100644
 --- a/arch/x86/include/asm/paravirt.h
 +++ b/arch/x86/include/asm/paravirt.h
 @@ -564,7 +564,7 @@ static inline pmd_t __pmd(pmdval_t val)
@@ -14397,7 +14089,7 @@ index 5edd174..c395822 100644
  static inline void pgd_clear(pgd_t *pgdp)
  {
        set_pgd(pgdp, __pgd(0));
-@@ -711,6 +723,21 @@ static inline void __set_fixmap(unsigned /* enum fixed_addresses */ idx,
+@@ -714,6 +726,21 @@ static inline void __set_fixmap(unsigned /* enum fixed_addresses */ idx,
        pv_mmu_ops.set_fixmap(idx, phys, flags);
  }
  
@@ -14419,7 +14111,7 @@ index 5edd174..c395822 100644
  #if defined(CONFIG_SMP) && defined(CONFIG_PARAVIRT_SPINLOCKS)
  
  static inline int arch_spin_is_locked(struct arch_spinlock *lock)
-@@ -927,7 +954,7 @@ extern void default_banner(void);
+@@ -930,7 +957,7 @@ extern void default_banner(void);
  
  #define PARA_PATCH(struct, off)        ((PARAVIRT_PATCH_##struct + (off)) / 4)
  #define PARA_SITE(ptype, clobbers, ops) _PVSITE(ptype, clobbers, ops, .long, 4)
@@ -14428,7 +14120,7 @@ index 5edd174..c395822 100644
  #endif
  
  #define INTERRUPT_RETURN                                              \
-@@ -1002,6 +1029,21 @@ extern void default_banner(void);
+@@ -1005,6 +1032,21 @@ extern void default_banner(void);
        PARA_SITE(PARA_PATCH(pv_cpu_ops, PV_CPU_irq_enable_sysexit),    \
                  CLBR_NONE,                                            \
                  jmp PARA_INDIRECT(pv_cpu_ops+PV_CPU_irq_enable_sysexit))
@@ -14451,7 +14143,7 @@ index 5edd174..c395822 100644
  
  #endif /* __ASSEMBLY__ */
 diff --git a/arch/x86/include/asm/paravirt_types.h b/arch/x86/include/asm/paravirt_types.h
-index 142236e..5446ffbc 100644
+index b3b0ec1..b1cd3eb 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 {
@@ -14463,7 +14155,7 @@ index 142236e..5446ffbc 100644
  
  
  struct pv_lazy_ops {
-@@ -97,7 +97,7 @@ struct pv_time_ops {
+@@ -98,7 +98,7 @@ struct pv_time_ops {
        unsigned long long (*sched_clock)(void);
        unsigned long long (*steal_clock)(int cpu);
        unsigned long (*get_tsc_khz)(void);
@@ -14472,7 +14164,7 @@ index 142236e..5446ffbc 100644
  
  struct pv_cpu_ops {
        /* hooks for various privileged instructions */
-@@ -191,7 +191,7 @@ struct pv_cpu_ops {
+@@ -192,7 +192,7 @@ struct pv_cpu_ops {
  
        void (*start_context_switch)(struct task_struct *prev);
        void (*end_context_switch)(struct task_struct *next);
@@ -14481,7 +14173,7 @@ index 142236e..5446ffbc 100644
  
  struct pv_irq_ops {
        /*
-@@ -222,7 +222,7 @@ struct pv_apic_ops {
+@@ -223,7 +223,7 @@ struct pv_apic_ops {
                                 unsigned long start_eip,
                                 unsigned long start_esp);
  #endif
@@ -14490,7 +14182,7 @@ index 142236e..5446ffbc 100644
  
  struct pv_mmu_ops {
        unsigned long (*read_cr2)(void);
-@@ -312,6 +312,7 @@ struct pv_mmu_ops {
+@@ -313,6 +313,7 @@ struct pv_mmu_ops {
        struct paravirt_callee_save make_pud;
  
        void (*set_pgd)(pgd_t *pudp, pgd_t pgdval);
@@ -14498,7 +14190,7 @@ index 142236e..5446ffbc 100644
  #endif        /* PAGETABLE_LEVELS == 4 */
  #endif        /* PAGETABLE_LEVELS >= 3 */
  
-@@ -323,6 +324,12 @@ struct pv_mmu_ops {
+@@ -324,6 +325,12 @@ 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);
@@ -14511,7 +14203,7 @@ index 142236e..5446ffbc 100644
  };
  
  struct arch_spinlock;
-@@ -333,7 +340,7 @@ struct pv_lock_ops {
+@@ -334,7 +341,7 @@ struct pv_lock_ops {
        void (*spin_lock_flags)(struct arch_spinlock *lock, unsigned long flags);
        int (*spin_trylock)(struct arch_spinlock *lock);
        void (*spin_unlock)(struct arch_spinlock *lock);
@@ -14610,7 +14302,7 @@ index 4cc9f2b..5fd9226 100644
  
  /*
 diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h
-index 1c1a955..50f828c 100644
+index 1e67223..dd6e7ea 100644
 --- a/arch/x86/include/asm/pgtable.h
 +++ b/arch/x86/include/asm/pgtable.h
 @@ -44,6 +44,7 @@ extern struct mm_struct *pgd_page_get_mm(struct page *page);
@@ -14673,7 +14365,19 @@ index 1c1a955..50f828c 100644
  static inline int pte_dirty(pte_t pte)
  {
        return pte_flags(pte) & _PAGE_DIRTY;
-@@ -200,9 +240,29 @@ static inline pte_t pte_wrprotect(pte_t pte)
+@@ -147,6 +187,11 @@ static inline unsigned long pud_pfn(pud_t pud)
+       return (pud_val(pud) & PTE_PFN_MASK) >> PAGE_SHIFT;
+ }
++static inline unsigned long pgd_pfn(pgd_t pgd)
++{
++      return (pgd_val(pgd) & PTE_PFN_MASK) >> PAGE_SHIFT;
++}
++
+ #define pte_page(pte) pfn_to_page(pte_pfn(pte))
+ static inline int pmd_large(pmd_t pte)
+@@ -200,9 +245,29 @@ static inline pte_t pte_wrprotect(pte_t pte)
        return pte_clear_flags(pte, _PAGE_RW);
  }
  
@@ -14704,7 +14408,7 @@ index 1c1a955..50f828c 100644
  }
  
  static inline pte_t pte_mkdirty(pte_t pte)
-@@ -394,6 +454,15 @@ pte_t *populate_extra_pte(unsigned long vaddr);
+@@ -394,6 +459,15 @@ pte_t *populate_extra_pte(unsigned long vaddr);
  #endif
  
  #ifndef __ASSEMBLY__
@@ -14718,9 +14422,27 @@ index 1c1a955..50f828c 100644
 +#endif
 +
  #include <linux/mm_types.h>
+ #include <linux/log2.h>
+@@ -529,7 +603,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:
+  */
+-#define pud_page(pud)         pfn_to_page(pud_val(pud) >> PAGE_SHIFT)
++#define pud_page(pud)         pfn_to_page((pud_val(pud) & PTE_PFN_MASK) >> PAGE_SHIFT)
+ /* Find an entry in the second-level page table.. */
+ static inline pmd_t *pmd_offset(pud_t *pud, unsigned long address)
+@@ -569,7 +643,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:
+  */
+-#define pgd_page(pgd)         pfn_to_page(pgd_val(pgd) >> PAGE_SHIFT)
++#define pgd_page(pgd)         pfn_to_page((pgd_val(pgd) & PTE_PFN_MASK) >> PAGE_SHIFT)
  
- static inline int pte_none(pte_t pte)
-@@ -583,7 +652,7 @@ static inline pud_t *pud_offset(pgd_t *pgd, unsigned long address)
+ /* to find an entry in a page-table-directory. */
+ static inline unsigned long pud_index(unsigned long address)
+@@ -584,7 +658,7 @@ static inline pud_t *pud_offset(pgd_t *pgd, unsigned long address)
  
  static inline int pgd_bad(pgd_t pgd)
  {
@@ -14729,7 +14451,7 @@ index 1c1a955..50f828c 100644
  }
  
  static inline int pgd_none(pgd_t pgd)
-@@ -606,7 +675,12 @@ static inline int pgd_none(pgd_t pgd)
+@@ -607,7 +681,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;
   */
@@ -14743,7 +14465,7 @@ index 1c1a955..50f828c 100644
  /*
   * a shortcut which implies the use of the kernel's pgd, instead
   * of a process's
-@@ -617,6 +691,20 @@ static inline int pgd_none(pgd_t pgd)
+@@ -618,6 +697,22 @@ 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)
  
@@ -14754,9 +14476,11 @@ index 1c1a955..50f828c 100644
 +#define USER_PGD_PTRS         (_AC(1,UL) << (TASK_SIZE_MAX_SHIFT - PGDIR_SHIFT))
 +
 +#ifdef CONFIG_PAX_MEMORY_UDEREF
-+#define PAX_USER_SHADOW_BASE  (_AC(1,UL) << TASK_SIZE_MAX_SHIFT)
++#ifdef __ASSEMBLY__
++#define pax_user_shadow_base  pax_user_shadow_base(%rip)
 +#else
-+#define PAX_USER_SHADOW_BASE  (_AC(0,UL))
++extern unsigned long pax_user_shadow_base;
++#endif
 +#endif
 +
 +#endif
@@ -14764,7 +14488,7 @@ index 1c1a955..50f828c 100644
  #ifndef __ASSEMBLY__
  
  extern int direct_gbpages;
-@@ -781,11 +869,23 @@ static inline void pmdp_set_wrprotect(struct mm_struct *mm,
+@@ -784,11 +879,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.
   */
@@ -14787,11 +14511,12 @@ index 1c1a955..50f828c 100644
 +#else
 +static inline void __shadow_user_pgds(pgd_t *dst, const pgd_t *src) {}
 +#endif
- #include <asm-generic/pgtable.h>
- #endif        /* __ASSEMBLY__ */
++
+ #define PTE_SHIFT ilog2(PTRS_PER_PTE)
+ static inline int page_level_shift(enum pg_level level)
+ {
 diff --git a/arch/x86/include/asm/pgtable_32.h b/arch/x86/include/asm/pgtable_32.h
-index 8faa215..a8a17ea 100644
+index 9ee3221..b979c6b 100644
 --- a/arch/x86/include/asm/pgtable_32.h
 +++ b/arch/x86/include/asm/pgtable_32.h
 @@ -25,9 +25,6 @@
@@ -14817,7 +14542,7 @@ index 8faa215..a8a17ea 100644
  #if defined(CONFIG_HIGHPTE)
  #define pte_offset_map(dir, address)                                  \
        ((pte_t *)kmap_atomic(pmd_page(*(dir))) +               \
-@@ -62,7 +65,9 @@ extern void set_pmd_pfn(unsigned long, unsigned long, pgprot_t);
+@@ -62,12 +65,17 @@ extern void set_pmd_pfn(unsigned long, unsigned long, pgprot_t);
  /* Clear a kernel PTE and flush it from the TLB */
  #define kpte_clear_flush(ptep, vaddr)         \
  do {                                          \
@@ -14827,8 +14552,6 @@ index 8faa215..a8a17ea 100644
        __flush_tlb_one((vaddr));               \
  } while (0)
  
-@@ -75,6 +80,9 @@ do {                                         \
  #endif /* !__ASSEMBLY__ */
  
 +#define HAVE_ARCH_UNMAPPED_AREA
@@ -14871,7 +14594,7 @@ index ed5903b..c7fe163 100644
  #define MODULES_END   VMALLOC_END
  #define MODULES_LEN   (MODULES_VADDR - MODULES_END)
 diff --git a/arch/x86/include/asm/pgtable_64.h b/arch/x86/include/asm/pgtable_64.h
-index 47356f9..deb94a2 100644
+index e22c1db..23a625a 100644
 --- a/arch/x86/include/asm/pgtable_64.h
 +++ b/arch/x86/include/asm/pgtable_64.h
 @@ -16,10 +16,14 @@
@@ -14926,10 +14649,10 @@ index 47356f9..deb94a2 100644
  }
  
 diff --git a/arch/x86/include/asm/pgtable_64_types.h b/arch/x86/include/asm/pgtable_64_types.h
-index 766ea16..5b96cb3 100644
+index 2d88344..4679fc3 100644
 --- a/arch/x86/include/asm/pgtable_64_types.h
 +++ b/arch/x86/include/asm/pgtable_64_types.h
-@@ -59,5 +59,10 @@ typedef struct { pteval_t pte; } pte_t;
+@@ -61,6 +61,11 @@ typedef struct { pteval_t pte; } pte_t;
  #define MODULES_VADDR    _AC(0xffffffffa0000000, UL)
  #define MODULES_END      _AC(0xffffffffff000000, UL)
  #define MODULES_LEN   (MODULES_END - MODULES_VADDR)
@@ -14939,9 +14662,10 @@ index 766ea16..5b96cb3 100644
 +#define ktla_ktva(addr)               (addr)
 +#define ktva_ktla(addr)               (addr)
  
- #endif /* _ASM_X86_PGTABLE_64_DEFS_H */
+ #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 3c32db8..1ddccf5 100644
+index 567b5d0..bd91d64 100644
 --- a/arch/x86/include/asm/pgtable_types.h
 +++ b/arch/x86/include/asm/pgtable_types.h
 @@ -16,13 +16,12 @@
@@ -15056,10 +14780,10 @@ index 3c32db8..1ddccf5 100644
  #define pgprot_writecombine   pgprot_writecombine
  extern pgprot_t pgprot_writecombine(pgprot_t prot);
 diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h
-index 888184b..a07ac89 100644
+index 3270116..8d99d82 100644
 --- a/arch/x86/include/asm/processor.h
 +++ b/arch/x86/include/asm/processor.h
-@@ -287,7 +287,7 @@ struct tss_struct {
+@@ -285,7 +285,7 @@ struct tss_struct {
  
  } ____cacheline_aligned;
  
@@ -15068,7 +14792,7 @@ index 888184b..a07ac89 100644
  
  /*
   * Save the original ist values for checking stack pointers during debugging
-@@ -827,11 +827,18 @@ static inline void spin_lock_prefetch(const void *x)
+@@ -826,11 +826,18 @@ static inline void spin_lock_prefetch(const void *x)
   */
  #define TASK_SIZE             PAGE_OFFSET
  #define TASK_SIZE_MAX         TASK_SIZE
@@ -15089,7 +14813,7 @@ index 888184b..a07ac89 100644
        .vm86_info              = NULL,                                   \
        .sysenter_cs            = __KERNEL_CS,                            \
        .io_bitmap_ptr          = NULL,                                   \
-@@ -845,7 +852,7 @@ static inline void spin_lock_prefetch(const void *x)
+@@ -844,7 +851,7 @@ static inline void spin_lock_prefetch(const void *x)
   */
  #define INIT_TSS  {                                                     \
        .x86_tss = {                                                      \
@@ -15098,7 +14822,7 @@ index 888184b..a07ac89 100644
                .ss0            = __KERNEL_DS,                            \
                .ss1            = __KERNEL_CS,                            \
                .io_bitmap_base = INVALID_IO_BITMAP_OFFSET,               \
-@@ -856,11 +863,7 @@ static inline void spin_lock_prefetch(const void *x)
+@@ -855,11 +862,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))
@@ -15111,7 +14835,7 @@ index 888184b..a07ac89 100644
  
  /*
   * The below -8 is to reserve 8 bytes on top of the ring0 stack.
-@@ -875,7 +878,7 @@ extern unsigned long thread_saved_pc(struct task_struct *tsk);
+@@ -874,7 +877,7 @@ extern unsigned long thread_saved_pc(struct task_struct *tsk);
  #define task_pt_regs(task)                                             \
  ({                                                                     \
         struct pt_regs *__regs__;                                       \
@@ -15120,7 +14844,7 @@ index 888184b..a07ac89 100644
         __regs__ - 1;                                                   \
  })
  
-@@ -885,13 +888,13 @@ extern unsigned long thread_saved_pc(struct task_struct *tsk);
+@@ -884,13 +887,13 @@ extern unsigned long thread_saved_pc(struct task_struct *tsk);
  /*
   * User space process size. 47bits minus one guard page.
   */
@@ -15136,7 +14860,7 @@ index 888184b..a07ac89 100644
  
  #define TASK_SIZE             (test_thread_flag(TIF_ADDR32) ? \
                                        IA32_PAGE_OFFSET : TASK_SIZE_MAX)
-@@ -902,11 +905,11 @@ extern unsigned long thread_saved_pc(struct task_struct *tsk);
+@@ -901,11 +904,11 @@ extern unsigned long thread_saved_pc(struct task_struct *tsk);
  #define STACK_TOP_MAX         TASK_SIZE_MAX
  
  #define INIT_THREAD  { \
@@ -15150,7 +14874,7 @@ index 888184b..a07ac89 100644
  }
  
  /*
-@@ -934,6 +937,10 @@ extern void start_thread(struct pt_regs *regs, unsigned long new_ip,
+@@ -933,6 +936,10 @@ extern void start_thread(struct pt_regs *regs, unsigned long new_ip,
   */
  #define TASK_UNMAPPED_BASE    (PAGE_ALIGN(TASK_SIZE / 3))
  
@@ -15161,7 +14885,7 @@ index 888184b..a07ac89 100644
  #define KSTK_EIP(task)                (task_pt_regs(task)->ip)
  
  /* Get/set a process' ability to use the timestamp counter instruction */
-@@ -994,12 +1001,12 @@ extern bool cpu_has_amd_erratum(const int *);
+@@ -993,7 +1000,7 @@ extern bool cpu_has_amd_erratum(const int *);
  #define cpu_has_amd_erratum(x)        (false)
  #endif /* CONFIG_CPU_SUP_AMD */
  
@@ -15170,7 +14894,9 @@ index 888184b..a07ac89 100644
  extern void free_init_pages(char *what, unsigned long begin, unsigned long end);
  
  void default_idle(void);
- bool set_pm_idle_to_default(void);
+@@ -1003,6 +1010,6 @@ bool xen_set_default_idle(void);
+ #define xen_set_default_idle 0
+ #endif
  
 -void stop_this_cpu(void *dummy);
 +void stop_this_cpu(void *dummy) __noreturn;
@@ -15251,7 +14977,7 @@ index 942a086..6c26446 100644
        return *(unsigned long *)((unsigned long)regs + offset);
  }
 diff --git a/arch/x86/include/asm/realmode.h b/arch/x86/include/asm/realmode.h
-index fe1ec5b..dc5c3fe 100644
+index 9c6b890..5305f53 100644
 --- a/arch/x86/include/asm/realmode.h
 +++ b/arch/x86/include/asm/realmode.h
 @@ -22,16 +22,14 @@ struct real_mode_header {
@@ -15697,7 +15423,7 @@ index 4ec45b3..a4f0a8a 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 2d946e6..e453ec4 100644
+index 2cd056e..0224df8 100644
 --- a/arch/x86/include/asm/thread_info.h
 +++ b/arch/x86/include/asm/thread_info.h
 @@ -10,6 +10,7 @@
@@ -15708,7 +15434,7 @@ index 2d946e6..e453ec4 100644
  
  /*
   * low level task data that entry.S needs immediate access to
-@@ -24,7 +25,6 @@ struct exec_domain;
+@@ -23,7 +24,6 @@ struct exec_domain;
  #include <linux/atomic.h>
  
  struct thread_info {
@@ -15716,7 +15442,7 @@ index 2d946e6..e453ec4 100644
        struct exec_domain      *exec_domain;   /* execution domain */
        __u32                   flags;          /* low level flags */
        __u32                   status;         /* thread synchronous flags */
-@@ -34,19 +34,13 @@ struct thread_info {
+@@ -33,19 +33,13 @@ struct thread_info {
        mm_segment_t            addr_limit;
        struct restart_block    restart_block;
        void __user             *sysenter_return;
@@ -15738,7 +15464,7 @@ index 2d946e6..e453ec4 100644
        .exec_domain    = &default_exec_domain, \
        .flags          = 0,                    \
        .cpu            = 0,                    \
-@@ -57,7 +51,7 @@ struct thread_info {
+@@ -56,7 +50,7 @@ struct thread_info {
        },                                      \
  }
  
@@ -15747,7 +15473,7 @@ index 2d946e6..e453ec4 100644
  #define init_stack            (init_thread_union.stack)
  
  #else /* !__ASSEMBLY__ */
-@@ -98,6 +92,7 @@ struct thread_info {
+@@ -97,6 +91,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 */
@@ -15755,7 +15481,7 @@ index 2d946e6..e453ec4 100644
  
  #define _TIF_SYSCALL_TRACE    (1 << TIF_SYSCALL_TRACE)
  #define _TIF_NOTIFY_RESUME    (1 << TIF_NOTIFY_RESUME)
-@@ -122,17 +117,18 @@ struct thread_info {
+@@ -121,17 +116,18 @@ struct thread_info {
  #define _TIF_SYSCALL_TRACEPOINT       (1 << TIF_SYSCALL_TRACEPOINT)
  #define _TIF_ADDR32           (1 << TIF_ADDR32)
  #define _TIF_X32              (1 << TIF_X32)
@@ -15776,7 +15502,7 @@ index 2d946e6..e453ec4 100644
  
  /* work to do on interrupt/exception return */
  #define _TIF_WORK_MASK                                                        \
-@@ -143,7 +139,7 @@ struct thread_info {
+@@ -142,7 +138,7 @@ struct thread_info {
  /* work to do on any return to user space */
  #define _TIF_ALLWORK_MASK                                             \
        ((0x0000FFFF & ~_TIF_SECCOMP) | _TIF_SYSCALL_TRACEPOINT |       \
@@ -15785,7 +15511,7 @@ index 2d946e6..e453ec4 100644
  
  /* Only used for 64 bit */
  #define _TIF_DO_NOTIFY_MASK                                           \
-@@ -159,45 +155,40 @@ struct thread_info {
+@@ -158,45 +154,40 @@ struct thread_info {
  
  #define PREEMPT_ACTIVE                0x10000000
  
@@ -15856,7 +15582,7 @@ index 2d946e6..e453ec4 100644
  /*
   * macros/functions for gaining access to the thread information structure
   * preempt_count needs to be 1 initially, until the scheduler is functional.
-@@ -205,27 +196,8 @@ static inline struct thread_info *current_thread_info(void)
+@@ -204,27 +195,8 @@ static inline struct thread_info *current_thread_info(void)
  #ifndef __ASSEMBLY__
  DECLARE_PER_CPU(unsigned long, kernel_stack);
  
@@ -15886,7 +15612,7 @@ index 2d946e6..e453ec4 100644
  #endif
  
  #endif /* !X86_32 */
-@@ -286,5 +258,12 @@ static inline bool is_ia32_task(void)
+@@ -285,5 +257,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);
@@ -15900,7 +15626,7 @@ index 2d946e6..e453ec4 100644
  #endif
  #endif /* _ASM_X86_THREAD_INFO_H */
 diff --git a/arch/x86/include/asm/uaccess.h b/arch/x86/include/asm/uaccess.h
-index 1709801..0a60f2f 100644
+index 5ee2687..70d5895 100644
 --- a/arch/x86/include/asm/uaccess.h
 +++ b/arch/x86/include/asm/uaccess.h
 @@ -7,6 +7,7 @@
@@ -15960,7 +15686,7 @@ index 1709801..0a60f2f 100644
  
  /*
   * The exception table consists of pairs of addresses relative to the
-@@ -189,13 +220,21 @@ extern int __get_user_bad(void);
+@@ -176,13 +207,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")
  
@@ -15985,7 +15711,7 @@ index 1709801..0a60f2f 100644
                     "3: " ASM_CLAC "\n"                                \
                     ".section .fixup,\"ax\"\n"                         \
                     "4:        movl %3,%0\n"                           \
-@@ -208,8 +247,8 @@ extern int __get_user_bad(void);
+@@ -195,8 +234,8 @@ __typeof__(__builtin_choose_expr(sizeof(x) > sizeof(0UL), 0ULL, 0UL))
  
  #define __put_user_asm_ex_u64(x, addr)                                        \
        asm volatile(ASM_STAC "\n"                                      \
@@ -15996,7 +15722,7 @@ index 1709801..0a60f2f 100644
                     "3: " ASM_CLAC "\n"                                \
                     _ASM_EXTABLE_EX(1b, 2b)                            \
                     _ASM_EXTABLE_EX(2b, 3b)                            \
-@@ -259,7 +298,7 @@ extern void __put_user_8(void);
+@@ -246,7 +285,7 @@ extern void __put_user_8(void);
        __typeof__(*(ptr)) __pu_val;                            \
        __chk_user_ptr(ptr);                                    \
        might_fault();                                          \
@@ -16005,7 +15731,7 @@ index 1709801..0a60f2f 100644
        switch (sizeof(*(ptr))) {                               \
        case 1:                                                 \
                __put_user_x(1, __pu_val, ptr, __ret_pu);       \
-@@ -358,7 +397,7 @@ do {                                                                       \
+@@ -345,7 +384,7 @@ do {                                                                       \
  
  #define __get_user_asm(x, addr, err, itype, rtype, ltype, errret)     \
        asm volatile(ASM_STAC "\n"                                      \
@@ -16014,7 +15740,7 @@ index 1709801..0a60f2f 100644
                     "2: " ASM_CLAC "\n"                                \
                     ".section .fixup,\"ax\"\n"                         \
                     "3:        mov %3,%0\n"                            \
-@@ -366,7 +405,7 @@ do {                                                                       \
+@@ -353,7 +392,7 @@ do {                                                                       \
                     "  jmp 2b\n"                                       \
                     ".previous\n"                                      \
                     _ASM_EXTABLE(1b, 3b)                               \
@@ -16023,7 +15749,7 @@ index 1709801..0a60f2f 100644
                     : "m" (__m(addr)), "i" (errret), "0" (err))
  
  #define __get_user_size_ex(x, ptr, size)                              \
-@@ -391,7 +430,7 @@ do {                                                                       \
+@@ -378,7 +417,7 @@ do {                                                                       \
  } while (0)
  
  #define __get_user_asm_ex(x, addr, itype, rtype, ltype)                       \
@@ -16032,7 +15758,7 @@ index 1709801..0a60f2f 100644
                     "2:\n"                                             \
                     _ASM_EXTABLE_EX(1b, 2b)                            \
                     : ltype(x) : "m" (__m(addr)))
-@@ -408,13 +447,24 @@ do {                                                                     \
+@@ -395,13 +434,24 @@ do {                                                                     \
        int __gu_err;                                                   \
        unsigned long __gu_val;                                         \
        __get_user_size(__gu_val, (ptr), (size), __gu_err, -EFAULT);    \
@@ -16048,9 +15774,9 @@ index 1709801..0a60f2f 100644
 +#define ____m(x)                                      \
 +({                                                    \
 +      unsigned long ____x = (unsigned long)(x);       \
-+      if (____x < PAX_USER_SHADOW_BASE)               \
-+              ____x += PAX_USER_SHADOW_BASE;          \
-+      (void __user *)____x;                           \
++      if (____x < pax_user_shadow_base)               \
++              ____x += pax_user_shadow_base;          \
++      (typeof(x))____x;                               \
 +})
 +#else
 +#define ____m(x) (x)
@@ -16059,7 +15785,7 @@ index 1709801..0a60f2f 100644
  
  /*
   * Tell gcc we read from memory instead of writing: this is because
-@@ -423,7 +473,7 @@ struct __large_struct { unsigned long buf[100]; };
+@@ -410,7 +460,7 @@ struct __large_struct { unsigned long buf[100]; };
   */
  #define __put_user_asm(x, addr, err, itype, rtype, ltype, errret)     \
        asm volatile(ASM_STAC "\n"                                      \
@@ -16068,7 +15794,7 @@ index 1709801..0a60f2f 100644
                     "2: " ASM_CLAC "\n"                                \
                     ".section .fixup,\"ax\"\n"                         \
                     "3:        mov %3,%0\n"                            \
-@@ -431,10 +481,10 @@ struct __large_struct { unsigned long buf[100]; };
+@@ -418,10 +468,10 @@ struct __large_struct { unsigned long buf[100]; };
                     ".previous\n"                                      \
                     _ASM_EXTABLE(1b, 3b)                               \
                     : "=r"(err)                                        \
@@ -16081,7 +15807,7 @@ index 1709801..0a60f2f 100644
                     "2:\n"                                             \
                     _ASM_EXTABLE_EX(1b, 2b)                            \
                     : : ltype(x), "m" (__m(addr)))
-@@ -473,8 +523,12 @@ struct __large_struct { unsigned long buf[100]; };
+@@ -460,8 +510,12 @@ struct __large_struct { unsigned long buf[100]; };
   * On error, the variable @x is set to zero.
   */
  
@@ -16094,7 +15820,7 @@ index 1709801..0a60f2f 100644
  
  /**
   * __put_user: - Write a simple value into user space, with less checking.
-@@ -496,8 +550,12 @@ struct __large_struct { unsigned long buf[100]; };
+@@ -483,8 +537,12 @@ struct __large_struct { unsigned long buf[100]; };
   * Returns zero on success, or -EFAULT on error.
   */
  
@@ -16107,7 +15833,7 @@ index 1709801..0a60f2f 100644
  
  #define __get_user_unaligned __get_user
  #define __put_user_unaligned __put_user
-@@ -515,7 +573,7 @@ struct __large_struct { unsigned long buf[100]; };
+@@ -502,7 +560,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))));       \
@@ -16116,7 +15842,7 @@ index 1709801..0a60f2f 100644
  } while (0)
  
  #define put_user_try          uaccess_try
-@@ -532,8 +590,8 @@ strncpy_from_user(char *dst, const char __user *src, long count);
+@@ -519,8 +577,8 @@ strncpy_from_user(char *dst, const char __user *src, long count);
  extern __must_check long strlen_user(const char __user *str);
  extern __must_check long strnlen_user(const char __user *str, long n);
  
@@ -16713,10 +16439,10 @@ 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 5769349..a3d3e2a 100644
+index d8d9922..bf6cecb 100644
 --- a/arch/x86/include/asm/x86_init.h
 +++ b/arch/x86/include/asm/x86_init.h
-@@ -141,7 +141,7 @@ struct x86_init_ops {
+@@ -129,7 +129,7 @@ struct x86_init_ops {
        struct x86_init_timers          timers;
        struct x86_init_iommu           iommu;
        struct x86_init_pci             pci;
@@ -16725,7 +16451,7 @@ index 5769349..a3d3e2a 100644
  
  /**
   * struct x86_cpuinit_ops - platform specific cpu hotplug setups
-@@ -152,7 +152,7 @@ struct x86_cpuinit_ops {
+@@ -140,7 +140,7 @@ struct x86_cpuinit_ops {
        void (*setup_percpu_clockev)(void);
        void (*early_percpu_clock_init)(void);
        void (*fixup_cpu_id)(struct cpuinfo_x86 *c, int node);
@@ -16734,7 +16460,7 @@ index 5769349..a3d3e2a 100644
  
  /**
   * struct x86_platform_ops - platform specific runtime functions
-@@ -178,7 +178,7 @@ struct x86_platform_ops {
+@@ -166,7 +166,7 @@ struct x86_platform_ops {
        void (*save_sched_clock_state)(void);
        void (*restore_sched_clock_state)(void);
        void (*apic_post_init)(void);
@@ -16742,19 +16468,20 @@ index 5769349..a3d3e2a 100644
 +} __no_const;
  
  struct pci_dev;
-@@ -187,14 +187,14 @@ struct x86_msi_ops {
-       void (*teardown_msi_irq)(unsigned int irq);
+ struct msi_msg;
+@@ -180,7 +180,7 @@ struct x86_msi_ops {
        void (*teardown_msi_irqs)(struct pci_dev *dev);
        void (*restore_msi_irqs)(struct pci_dev *dev, int irq);
+       int  (*setup_hpet_msi)(unsigned int irq, unsigned int id);
 -};
 +} __no_const;
  
- struct x86_io_apic_ops {
-       void            (*init)  (void);
-       unsigned int    (*read)  (unsigned int apic, unsigned int reg);
-       void            (*write) (unsigned int apic, unsigned int reg, unsigned int value);
-       void            (*modify)(unsigned int apic, unsigned int reg, unsigned int value);
+ struct IO_APIC_route_entry;
+ struct io_apic_irq_attr;
+@@ -201,7 +201,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);
 -};
 +} __no_const;
  
@@ -16806,7 +16533,7 @@ index bbae024..e1528f9 100644
  
  #define BIOS_ROM_BASE         0xffe00000
 diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile
-index 34e923a..0c6bb6e 100644
+index 7bd3bd3..5dac791 100644
 --- a/arch/x86/kernel/Makefile
 +++ b/arch/x86/kernel/Makefile
 @@ -22,7 +22,7 @@ obj-y                        += time.o ioport.o ldt.o dumpstack.o nmi.o
@@ -16819,10 +16546,10 @@ index 34e923a..0c6bb6e 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 bacf4b0..4ede72e 100644
+index 230c8ea..f915130 100644
 --- a/arch/x86/kernel/acpi/boot.c
 +++ b/arch/x86/kernel/acpi/boot.c
-@@ -1358,7 +1358,7 @@ static int __init dmi_ignore_irq0_timer_override(const struct dmi_system_id *d)
+@@ -1361,7 +1361,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
   */
@@ -16831,7 +16558,7 @@ index bacf4b0..4ede72e 100644
        /*
         * Boxes that need ACPI disabled
         */
-@@ -1433,7 +1433,7 @@ static struct dmi_system_id __initdata acpi_dmi_table[] = {
+@@ -1436,7 +1436,7 @@ static struct dmi_system_id __initdata acpi_dmi_table[] = {
  };
  
  /* second table for DMI checks that should run after early-quirks */
@@ -16841,7 +16568,7 @@ index bacf4b0..4ede72e 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 d5e0d71..6533e08 100644
+index 0532f5d..36afc0a 100644
 --- a/arch/x86/kernel/acpi/sleep.c
 +++ b/arch/x86/kernel/acpi/sleep.c
 @@ -74,8 +74,12 @@ int acpi_suspend_lowlevel(void)
@@ -17015,7 +16742,7 @@ index ef5ccca..bd83949 100644
  }
  
 diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
-index cbf5121..812b537 100644
+index 904611b..004dde6 100644
 --- a/arch/x86/kernel/apic/apic.c
 +++ b/arch/x86/kernel/apic/apic.c
 @@ -189,7 +189,7 @@ int first_system_vector = 0xfe;
@@ -17027,7 +16754,7 @@ index cbf5121..812b537 100644
  
  int pic_mode;
  
-@@ -1956,7 +1956,7 @@ void smp_error_interrupt(struct pt_regs *regs)
+@@ -1955,7 +1955,7 @@ void smp_error_interrupt(struct pt_regs *regs)
        apic_write(APIC_ESR, 0);
        v1 = apic_read(APIC_ESR);
        ack_APIC_irq();
@@ -17108,10 +16835,10 @@ index 0874799..a7a7892 100644
        .name                           = "es7000",
        .probe                          = probe_es7000,
 diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
-index b739d39..aebc14c 100644
+index 9ed796c..e930fe4 100644
 --- a/arch/x86/kernel/apic/io_apic.c
 +++ b/arch/x86/kernel/apic/io_apic.c
-@@ -1084,7 +1084,7 @@ int IO_APIC_get_PCI_irq_vector(int bus, int slot, int pin,
+@@ -1060,7 +1060,7 @@ int IO_APIC_get_PCI_irq_vector(int bus, int slot, int pin,
  }
  EXPORT_SYMBOL(IO_APIC_get_PCI_irq_vector);
  
@@ -17120,7 +16847,7 @@ index b739d39..aebc14c 100644
  {
        /* Used to the online set of cpus does not change
         * during assign_irq_vector.
-@@ -1092,7 +1092,7 @@ void lock_vector_lock(void)
+@@ -1068,7 +1068,7 @@ void lock_vector_lock(void)
        raw_spin_lock(&vector_lock);
  }
  
@@ -17129,7 +16856,7 @@ index b739d39..aebc14c 100644
  {
        raw_spin_unlock(&vector_lock);
  }
-@@ -2399,7 +2399,7 @@ static void ack_apic_edge(struct irq_data *data)
+@@ -2362,7 +2362,7 @@ static void ack_apic_edge(struct irq_data *data)
        ack_APIC_irq();
  }
  
@@ -17138,7 +16865,7 @@ index b739d39..aebc14c 100644
  
  #ifdef CONFIG_GENERIC_PENDING_IRQ
  static bool io_apic_level_ack_pending(struct irq_cfg *cfg)
-@@ -2540,7 +2540,7 @@ static void ack_apic_level(struct irq_data *data)
+@@ -2503,7 +2503,7 @@ static void ack_apic_level(struct irq_data *data)
         * at the cpu.
         */
        if (!(v & (1 << (i & 0x1f)))) {
@@ -17147,24 +16874,6 @@ index b739d39..aebc14c 100644
  
                eoi_ioapic_irq(irq, cfg);
        }
-@@ -2567,11 +2567,13 @@ static void ir_print_prefix(struct irq_data *data, struct seq_file *p)
- static void irq_remap_modify_chip_defaults(struct irq_chip *chip)
- {
--      chip->irq_print_chip = ir_print_prefix;
--      chip->irq_ack = ir_ack_apic_edge;
--      chip->irq_eoi = ir_ack_apic_level;
-+      pax_open_kernel();
-+      *(void **)&chip->irq_print_chip = ir_print_prefix;
-+      *(void **)&chip->irq_ack = ir_ack_apic_edge;
-+      *(void **)&chip->irq_eoi = ir_ack_apic_level;
--      chip->irq_set_affinity = set_remapped_irq_affinity;
-+      *(void **)&chip->irq_set_affinity = set_remapped_irq_affinity;
-+      pax_close_kernel();
- }
- #endif /* CONFIG_IRQ_REMAP */
 diff --git a/arch/x86/kernel/apic/numaq_32.c b/arch/x86/kernel/apic/numaq_32.c
 index d661ee9..791fd33 100644
 --- a/arch/x86/kernel/apic/numaq_32.c
@@ -17241,10 +16950,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 8cfade9..b9d04fc 100644
+index 794f6eb..67e1db2 100644
 --- a/arch/x86/kernel/apic/x2apic_uv_x.c
 +++ b/arch/x86/kernel/apic/x2apic_uv_x.c
-@@ -333,7 +333,7 @@ static int uv_probe(void)
+@@ -342,7 +342,7 @@ static int uv_probe(void)
        return apic == &apic_x2apic_uv_x;
  }
  
@@ -17254,10 +16963,10 @@ index 8cfade9..b9d04fc 100644
        .name                           = "UV large system",
        .probe                          = uv_probe,
 diff --git a/arch/x86/kernel/apm_32.c b/arch/x86/kernel/apm_32.c
-index d65464e..1035d31 100644
+index 66b5faf..3442423 100644
 --- a/arch/x86/kernel/apm_32.c
 +++ b/arch/x86/kernel/apm_32.c
-@@ -412,7 +412,7 @@ static DEFINE_MUTEX(apm_mutex);
+@@ -434,7 +434,7 @@ static DEFINE_MUTEX(apm_mutex);
   * This is for buggy BIOS's that refer to (real mode) segment 0x40
   * even though they are called in protected mode.
   */
@@ -17266,7 +16975,7 @@ index d65464e..1035d31 100644
                        (unsigned long)__va(0x400UL), PAGE_SIZE - 0x400 - 1);
  
  static const char driver_version[] = "1.16ac";        /* no spaces */
-@@ -590,7 +590,10 @@ static long __apm_bios_call(void *_call)
+@@ -612,7 +612,10 @@ static long __apm_bios_call(void *_call)
        BUG_ON(cpu != 0);
        gdt = get_cpu_gdt_table(cpu);
        save_desc_40 = gdt[0x40 / 8];
@@ -17277,7 +16986,7 @@ index d65464e..1035d31 100644
  
        apm_irq_save(flags);
        APM_DO_SAVE_SEGS;
-@@ -599,7 +602,11 @@ static long __apm_bios_call(void *_call)
+@@ -621,7 +624,11 @@ static long __apm_bios_call(void *_call)
                          &call->esi);
        APM_DO_RESTORE_SEGS;
        apm_irq_restore(flags);
@@ -17289,7 +16998,7 @@ index d65464e..1035d31 100644
        put_cpu();
  
        return call->eax & 0xff;
-@@ -666,7 +673,10 @@ static long __apm_bios_call_simple(void *_call)
+@@ -688,7 +695,10 @@ static long __apm_bios_call_simple(void *_call)
        BUG_ON(cpu != 0);
        gdt = get_cpu_gdt_table(cpu);
        save_desc_40 = gdt[0x40 / 8];
@@ -17300,7 +17009,7 @@ index d65464e..1035d31 100644
  
        apm_irq_save(flags);
        APM_DO_SAVE_SEGS;
-@@ -674,7 +684,11 @@ static long __apm_bios_call_simple(void *_call)
+@@ -696,7 +706,11 @@ static long __apm_bios_call_simple(void *_call)
                                         &call->eax);
        APM_DO_RESTORE_SEGS;
        apm_irq_restore(flags);
@@ -17312,7 +17021,7 @@ index d65464e..1035d31 100644
        put_cpu();
        return error;
  }
-@@ -2345,12 +2359,15 @@ static int __init apm_init(void)
+@@ -2363,12 +2377,15 @@ static int __init apm_init(void)
         * code to that CPU.
         */
        gdt = get_cpu_gdt_table(0);
@@ -17396,10 +17105,10 @@ index a0e067d..9c7db16 100644
  obj-y                 += proc.o capflags.o powerflags.o common.o
  obj-y                 += vmware.o hypervisor.o mshyperv.o
 diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
-index 15239ff..e23e04e 100644
+index fa96eb0..03efe73 100644
 --- a/arch/x86/kernel/cpu/amd.c
 +++ b/arch/x86/kernel/cpu/amd.c
-@@ -733,7 +733,7 @@ static unsigned int __cpuinit amd_size_cache(struct cpuinfo_x86 *c,
+@@ -737,7 +737,7 @@ static unsigned int __cpuinit amd_size_cache(struct cpuinfo_x86 *c,
                                                        unsigned int size)
  {
        /* AMD errata T13 (order #21922) */
@@ -17409,10 +17118,10 @@ index 15239ff..e23e04e 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 9c3ab43..51e6366 100644
+index d814772..c615653 100644
 --- a/arch/x86/kernel/cpu/common.c
 +++ b/arch/x86/kernel/cpu/common.c
-@@ -86,60 +86,6 @@ static const struct cpu_dev __cpuinitconst default_cpu = {
+@@ -88,60 +88,6 @@ static const struct cpu_dev __cpuinitconst default_cpu = {
  
  static const struct cpu_dev *this_cpu __cpuinitdata = &default_cpu;
  
@@ -17473,7 +17182,7 @@ index 9c3ab43..51e6366 100644
  static int __init x86_xsave_setup(char *s)
  {
        setup_clear_cpu_cap(X86_FEATURE_XSAVE);
-@@ -389,7 +335,7 @@ void switch_to_new_gdt(int cpu)
+@@ -386,7 +332,7 @@ void switch_to_new_gdt(int cpu)
  {
        struct desc_ptr gdt_descr;
  
@@ -17482,7 +17191,7 @@ index 9c3ab43..51e6366 100644
        gdt_descr.size = GDT_SIZE - 1;
        load_gdt(&gdt_descr);
        /* Reload the per-cpu base */
-@@ -885,6 +831,10 @@ static void __cpuinit identify_cpu(struct cpuinfo_x86 *c)
+@@ -882,6 +828,10 @@ static void __cpuinit identify_cpu(struct cpuinfo_x86 *c)
        /* Filter out anything that depends on CPUID levels we don't have */
        filter_cpuid_features(c, true);
  
@@ -17493,7 +17202,7 @@ index 9c3ab43..51e6366 100644
        /* If the model name is still unset, do table lookup. */
        if (!c->x86_model_id[0]) {
                const char *p;
-@@ -1068,10 +1018,12 @@ static __init int setup_disablecpuid(char *arg)
+@@ -1065,10 +1015,12 @@ static __init int setup_disablecpuid(char *arg)
  }
  __setup("clearcpuid=", setup_disablecpuid);
  
@@ -17508,7 +17217,7 @@ index 9c3ab43..51e6366 100644
  
  DEFINE_PER_CPU_FIRST(union irq_stack_union,
                     irq_stack_union) __aligned(PAGE_SIZE);
-@@ -1085,7 +1037,7 @@ DEFINE_PER_CPU(struct task_struct *, current_task) ____cacheline_aligned =
+@@ -1082,7 +1034,7 @@ DEFINE_PER_CPU(struct task_struct *, current_task) ____cacheline_aligned =
  EXPORT_PER_CPU_SYMBOL(current_task);
  
  DEFINE_PER_CPU(unsigned long, kernel_stack) =
@@ -17517,8 +17226,8 @@ index 9c3ab43..51e6366 100644
  EXPORT_PER_CPU_SYMBOL(kernel_stack);
  
  DEFINE_PER_CPU(char *, irq_stack_ptr) =
-@@ -1224,7 +1176,7 @@ void __cpuinit cpu_init(void)
-       int i;
+@@ -1227,7 +1179,7 @@ void __cpuinit cpu_init(void)
+       load_ucode_ap();
  
        cpu = stack_smp_processor_id();
 -      t = &per_cpu(init_tss, cpu);
@@ -17526,7 +17235,7 @@ index 9c3ab43..51e6366 100644
        oist = &per_cpu(orig_ist, cpu);
  
  #ifdef CONFIG_NUMA
-@@ -1250,7 +1202,7 @@ void __cpuinit cpu_init(void)
+@@ -1253,7 +1205,7 @@ void __cpuinit cpu_init(void)
        switch_to_new_gdt(cpu);
        loadsegment(fs, 0);
  
@@ -17535,7 +17244,7 @@ index 9c3ab43..51e6366 100644
  
        memset(me->thread.tls_array, 0, GDT_ENTRY_TLS_ENTRIES * 8);
        syscall_init();
-@@ -1259,7 +1211,6 @@ void __cpuinit cpu_init(void)
+@@ -1262,7 +1214,6 @@ void __cpuinit cpu_init(void)
        wrmsrl(MSR_KERNEL_GS_BASE, 0);
        barrier();
  
@@ -17543,7 +17252,7 @@ index 9c3ab43..51e6366 100644
        enable_x2apic();
  
        /*
-@@ -1311,7 +1262,7 @@ void __cpuinit cpu_init(void)
+@@ -1314,7 +1265,7 @@ void __cpuinit cpu_init(void)
  {
        int cpu = smp_processor_id();
        struct task_struct *curr = current;
@@ -17551,12 +17260,12 @@ index 9c3ab43..51e6366 100644
 +      struct tss_struct *t = init_tss + cpu;
        struct thread_struct *thread = &curr->thread;
  
-       if (cpumask_test_and_set_cpu(cpu, cpu_initialized_mask)) {
+       show_ucode_info_early();
 diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c
-index fcaabd0..7b55a26 100644
+index 1905ce9..a7ac587 100644
 --- a/arch/x86/kernel/cpu/intel.c
 +++ b/arch/x86/kernel/cpu/intel.c
-@@ -174,7 +174,7 @@ static void __cpuinit trap_init_f00f_bug(void)
+@@ -173,7 +173,7 @@ static void __cpuinit trap_init_f00f_bug(void)
         * Update the IDT descriptor and reload the IDT so that
         * it uses the read-only mapped virtual address.
         */
@@ -17566,7 +17275,7 @@ index fcaabd0..7b55a26 100644
  }
  #endif
 diff --git a/arch/x86/kernel/cpu/intel_cacheinfo.c b/arch/x86/kernel/cpu/intel_cacheinfo.c
-index 84c1309..39b7224 100644
+index 7c6f7d5..8cac382 100644
 --- a/arch/x86/kernel/cpu/intel_cacheinfo.c
 +++ b/arch/x86/kernel/cpu/intel_cacheinfo.c
 @@ -1017,6 +1017,22 @@ static struct attribute *default_attrs[] = {
@@ -17666,7 +17375,7 @@ index 84c1309..39b7224 100644
  };
  
 diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
-index 80dbda8..be16652 100644
+index 7bc1263..ce2cbfb 100644
 --- a/arch/x86/kernel/cpu/mcheck/mce.c
 +++ b/arch/x86/kernel/cpu/mcheck/mce.c
 @@ -45,6 +45,7 @@
@@ -17717,7 +17426,7 @@ index 80dbda8..be16652 100644
                        return;
        }
        /* First print corrected ones that are still unlogged */
-@@ -686,7 +687,7 @@ static int mce_timed_out(u64 *t)
+@@ -683,7 +684,7 @@ static int mce_timed_out(u64 *t)
         * might have been modified by someone else.
         */
        rmb();
@@ -17726,7 +17435,7 @@ index 80dbda8..be16652 100644
                wait_for_panic();
        if (!mca_cfg.monarch_timeout)
                goto out;
-@@ -1662,7 +1663,7 @@ static void unexpected_machine_check(struct pt_regs *regs, long error_code)
+@@ -1654,7 +1655,7 @@ static void unexpected_machine_check(struct pt_regs *regs, long error_code)
  }
  
  /* Call the installed machine check handler for this CPU setup. */
@@ -17735,7 +17444,7 @@ index 80dbda8..be16652 100644
                                                unexpected_machine_check;
  
  /*
-@@ -1685,7 +1686,9 @@ void __cpuinit mcheck_cpu_init(struct cpuinfo_x86 *c)
+@@ -1677,7 +1678,9 @@ void __cpuinit mcheck_cpu_init(struct cpuinfo_x86 *c)
                return;
        }
  
@@ -17745,7 +17454,7 @@ index 80dbda8..be16652 100644
  
        __mcheck_cpu_init_generic();
        __mcheck_cpu_init_vendor(c);
-@@ -1699,7 +1702,7 @@ void __cpuinit mcheck_cpu_init(struct cpuinfo_x86 *c)
+@@ -1691,7 +1694,7 @@ void __cpuinit mcheck_cpu_init(struct cpuinfo_x86 *c)
   */
  
  static DEFINE_SPINLOCK(mce_chrdev_state_lock);
@@ -17754,7 +17463,7 @@ index 80dbda8..be16652 100644
  static int mce_chrdev_open_exclu;     /* already open exclusive? */
  
  static int mce_chrdev_open(struct inode *inode, struct file *file)
-@@ -1707,7 +1710,7 @@ static int mce_chrdev_open(struct inode *inode, struct file *file)
+@@ -1699,7 +1702,7 @@ static int mce_chrdev_open(struct inode *inode, struct file *file)
        spin_lock(&mce_chrdev_state_lock);
  
        if (mce_chrdev_open_exclu ||
@@ -17763,7 +17472,7 @@ index 80dbda8..be16652 100644
                spin_unlock(&mce_chrdev_state_lock);
  
                return -EBUSY;
-@@ -1715,7 +1718,7 @@ static int mce_chrdev_open(struct inode *inode, struct file *file)
+@@ -1707,7 +1710,7 @@ static int mce_chrdev_open(struct inode *inode, struct file *file)
  
        if (file->f_flags & O_EXCL)
                mce_chrdev_open_exclu = 1;
@@ -17772,7 +17481,7 @@ index 80dbda8..be16652 100644
  
        spin_unlock(&mce_chrdev_state_lock);
  
-@@ -1726,7 +1729,7 @@ static int mce_chrdev_release(struct inode *inode, struct file *file)
+@@ -1718,7 +1721,7 @@ static int mce_chrdev_release(struct inode *inode, struct file *file)
  {
        spin_lock(&mce_chrdev_state_lock);
  
@@ -17781,7 +17490,7 @@ index 80dbda8..be16652 100644
        mce_chrdev_open_exclu = 0;
  
        spin_unlock(&mce_chrdev_state_lock);
-@@ -2372,7 +2375,7 @@ mce_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu)
+@@ -2364,7 +2367,7 @@ mce_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu)
        return NOTIFY_OK;
  }
  
@@ -17790,7 +17499,7 @@ index 80dbda8..be16652 100644
        .notifier_call = mce_cpu_callback,
  };
  
-@@ -2382,7 +2385,7 @@ static __init void mce_init_banks(void)
+@@ -2374,7 +2377,7 @@ static __init void mce_init_banks(void)
  
        for (i = 0; i < mca_cfg.banks; i++) {
                struct mce_bank *b = &mce_banks[i];
@@ -17799,7 +17508,7 @@ index 80dbda8..be16652 100644
  
                sysfs_attr_init(&a->attr);
                a->attr.name    = b->attrname;
-@@ -2450,7 +2453,7 @@ struct dentry *mce_get_debugfs_dir(void)
+@@ -2442,7 +2445,7 @@ struct dentry *mce_get_debugfs_dir(void)
  static void mce_reset(void)
  {
        cpu_missing = 0;
@@ -17809,7 +17518,7 @@ index 80dbda8..be16652 100644
        atomic_set(&mce_callin, 0);
        atomic_set(&global_nwo, 0);
 diff --git a/arch/x86/kernel/cpu/mcheck/p5.c b/arch/x86/kernel/cpu/mcheck/p5.c
-index 2d5454c..51987eb 100644
+index 1c044b1..37a2a43 100644
 --- a/arch/x86/kernel/cpu/mcheck/p5.c
 +++ b/arch/x86/kernel/cpu/mcheck/p5.c
 @@ -11,6 +11,7 @@
@@ -17844,7 +17553,7 @@ index 47a1870..8c019a7 100644
        .notifier_call = thermal_throttle_cpu_callback,
  };
 diff --git a/arch/x86/kernel/cpu/mcheck/winchip.c b/arch/x86/kernel/cpu/mcheck/winchip.c
-index 2d7998f..17c9de1 100644
+index e9a701a..35317d6 100644
 --- a/arch/x86/kernel/cpu/mcheck/winchip.c
 +++ b/arch/x86/kernel/cpu/mcheck/winchip.c
 @@ -10,6 +10,7 @@
@@ -17892,7 +17601,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 6774c17..72c1b22 100644
+index bf0f01a..9adfee1 100644
 --- a/arch/x86/kernel/cpu/perf_event.c
 +++ b/arch/x86/kernel/cpu/perf_event.c
 @@ -1305,7 +1305,7 @@ static void __init pmu_check_apic(void)
@@ -17904,16 +17613,7 @@ index 6774c17..72c1b22 100644
        .name = "format",
        .attrs = NULL,
  };
-@@ -1313,7 +1313,7 @@ static struct attribute_group x86_pmu_format_group = {
- struct perf_pmu_events_attr {
-       struct device_attribute attr;
-       u64 id;
--};
-+} __do_const;
- /*
-  * Remove all undefined events (x86_pmu.event_map(id) == 0)
-@@ -1381,7 +1381,7 @@ static struct attribute *events_attr[] = {
+@@ -1374,7 +1374,7 @@ static struct attribute *events_attr[] = {
        NULL,
  };
  
@@ -17922,7 +17622,7 @@ index 6774c17..72c1b22 100644
        .name = "events",
        .attrs = events_attr,
  };
-@@ -1880,7 +1880,7 @@ static unsigned long get_segment_base(unsigned int segment)
+@@ -1873,7 +1873,7 @@ static unsigned long get_segment_base(unsigned int segment)
                if (idx > GDT_ENTRIES)
                        return 0;
  
@@ -17931,7 +17631,7 @@ index 6774c17..72c1b22 100644
        }
  
        return get_desc_base(desc + idx);
-@@ -1970,7 +1970,7 @@ perf_callchain_user(struct perf_callchain_entry *entry, struct pt_regs *regs)
+@@ -1963,7 +1963,7 @@ perf_callchain_user(struct perf_callchain_entry *entry, struct pt_regs *regs)
                        break;
  
                perf_callchain_store(entry, frame.return_address);
@@ -17941,10 +17641,10 @@ index 6774c17..72c1b22 100644
  }
  
 diff --git a/arch/x86/kernel/cpu/perf_event_intel.c b/arch/x86/kernel/cpu/perf_event_intel.c
-index 4914e94..60b06e3 100644
+index 4a0a462..be3b204 100644
 --- a/arch/x86/kernel/cpu/perf_event_intel.c
 +++ b/arch/x86/kernel/cpu/perf_event_intel.c
-@@ -1958,10 +1958,10 @@ __init int intel_pmu_init(void)
+@@ -1994,10 +1994,10 @@ __init int intel_pmu_init(void)
         * v2 and above have a perf capabilities MSR
         */
        if (version > 1) {
@@ -17959,45 +17659,18 @@ index 4914e94..60b06e3 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 b43200d..d235b3e 100644
+index 3e091f0..d2dc8d6 100644
 --- a/arch/x86/kernel/cpu/perf_event_intel_uncore.c
 +++ b/arch/x86/kernel/cpu/perf_event_intel_uncore.c
 @@ -2428,7 +2428,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;
--      struct attribute_group *events_group;
+-      struct attribute_group *attr_group;
 +      attribute_group_no_const *attr_group;
        struct attribute **attrs;
        int i, j;
  
-@@ -2455,19 +2455,19 @@ static int __init uncore_type_init(struct intel_uncore_type *type)
-               while (type->event_descs[i].attr.attr.name)
-                       i++;
--              events_group = kzalloc(sizeof(struct attribute *) * (i + 1) +
--                                      sizeof(*events_group), GFP_KERNEL);
--              if (!events_group)
-+              attr_group = kzalloc(sizeof(struct attribute *) * (i + 1) +
-+                                      sizeof(*attr_group), GFP_KERNEL);
-+              if (!attr_group)
-                       goto fail;
--              attrs = (struct attribute **)(events_group + 1);
--              events_group->name = "events";
--              events_group->attrs = attrs;
-+              attrs = (struct attribute **)(attr_group + 1);
-+              attr_group->name = "events";
-+              attr_group->attrs = attrs;
-               for (j = 0; j < i; j++)
-                       attrs[j] = &type->event_descs[j].attr.attr;
--              type->events_group = events_group;
-+              type->events_group = attr_group;
-       }
-       type->pmu_group = &uncore_pmu_attr_group;
 @@ -2826,7 +2826,7 @@ static int
        return NOTIFY_OK;
  }
@@ -18021,7 +17694,7 @@ index e68a455..975a932 100644
  #define INTEL_UNCORE_EVENT_DESC(_name, _config)                       \
  {                                                             \
 diff --git a/arch/x86/kernel/cpuid.c b/arch/x86/kernel/cpuid.c
-index 60c7891..9e911d3 100644
+index 1e4dbcf..b9a34c2 100644
 --- a/arch/x86/kernel/cpuid.c
 +++ b/arch/x86/kernel/cpuid.c
 @@ -171,7 +171,7 @@ static int __cpuinit cpuid_class_cpu_callback(struct notifier_block *nfb,
@@ -18085,7 +17758,7 @@ index 37250fe..bf2ec74 100644
  
                .__cr3          = __pa_nodebug(swapper_pg_dir),
 diff --git a/arch/x86/kernel/dumpstack.c b/arch/x86/kernel/dumpstack.c
-index ae42418b..787c16b 100644
+index c8797d5..c605e53 100644
 --- a/arch/x86/kernel/dumpstack.c
 +++ b/arch/x86/kernel/dumpstack.c
 @@ -2,6 +2,9 @@
@@ -18468,7 +18141,7 @@ index 9b9f18b..9fcaa04 100644
  #include <asm/processor.h>
  #include <asm/fcntl.h>
 diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S
-index 6ed91d9..6cc365b 100644
+index 8f3e2de..934870f 100644
 --- a/arch/x86/kernel/entry_32.S
 +++ b/arch/x86/kernel/entry_32.S
 @@ -177,13 +177,153 @@
@@ -18942,7 +18615,7 @@ index 6ed91d9..6cc365b 100644
        CFI_ENDPROC
  /*
   * End of kprobes section
-@@ -753,8 +985,15 @@ PTREGSCALL1(vm86old)
+@@ -708,8 +940,15 @@ END(syscall_badsys)
   * normal stack and adjusts ESP with the matching offset.
   */
        /* fixup the stack */
@@ -18960,7 +18633,7 @@ index 6ed91d9..6cc365b 100644
        shl $16, %eax
        addl %esp, %eax                 /* the adjusted stack pointer */
        pushl_cfi $__KERNEL_DS
-@@ -807,7 +1046,7 @@ vector=vector+1
+@@ -762,7 +1001,7 @@ vector=vector+1
    .endr
  2:    jmp common_interrupt
  .endr
@@ -18969,7 +18642,7 @@ index 6ed91d9..6cc365b 100644
  
  .previous
  END(interrupt)
-@@ -858,7 +1097,7 @@ ENTRY(coprocessor_error)
+@@ -813,7 +1052,7 @@ ENTRY(coprocessor_error)
        pushl_cfi $do_coprocessor_error
        jmp error_code
        CFI_ENDPROC
@@ -18978,7 +18651,7 @@ index 6ed91d9..6cc365b 100644
  
  ENTRY(simd_coprocessor_error)
        RING0_INT_FRAME
-@@ -880,7 +1119,7 @@ ENTRY(simd_coprocessor_error)
+@@ -835,7 +1074,7 @@ ENTRY(simd_coprocessor_error)
  #endif
        jmp error_code
        CFI_ENDPROC
@@ -18987,7 +18660,7 @@ index 6ed91d9..6cc365b 100644
  
  ENTRY(device_not_available)
        RING0_INT_FRAME
-@@ -889,18 +1128,18 @@ ENTRY(device_not_available)
+@@ -844,18 +1083,18 @@ ENTRY(device_not_available)
        pushl_cfi $do_device_not_available
        jmp error_code
        CFI_ENDPROC
@@ -19009,7 +18682,7 @@ index 6ed91d9..6cc365b 100644
  #endif
  
  ENTRY(overflow)
-@@ -910,7 +1149,7 @@ ENTRY(overflow)
+@@ -865,7 +1104,7 @@ ENTRY(overflow)
        pushl_cfi $do_overflow
        jmp error_code
        CFI_ENDPROC
@@ -19018,7 +18691,7 @@ index 6ed91d9..6cc365b 100644
  
  ENTRY(bounds)
        RING0_INT_FRAME
-@@ -919,7 +1158,7 @@ ENTRY(bounds)
+@@ -874,7 +1113,7 @@ ENTRY(bounds)
        pushl_cfi $do_bounds
        jmp error_code
        CFI_ENDPROC
@@ -19027,7 +18700,7 @@ index 6ed91d9..6cc365b 100644
  
  ENTRY(invalid_op)
        RING0_INT_FRAME
-@@ -928,7 +1167,7 @@ ENTRY(invalid_op)
+@@ -883,7 +1122,7 @@ ENTRY(invalid_op)
        pushl_cfi $do_invalid_op
        jmp error_code
        CFI_ENDPROC
@@ -19036,7 +18709,7 @@ index 6ed91d9..6cc365b 100644
  
  ENTRY(coprocessor_segment_overrun)
        RING0_INT_FRAME
-@@ -937,7 +1176,7 @@ ENTRY(coprocessor_segment_overrun)
+@@ -892,7 +1131,7 @@ ENTRY(coprocessor_segment_overrun)
        pushl_cfi $do_coprocessor_segment_overrun
        jmp error_code
        CFI_ENDPROC
@@ -19045,7 +18718,7 @@ index 6ed91d9..6cc365b 100644
  
  ENTRY(invalid_TSS)
        RING0_EC_FRAME
-@@ -945,7 +1184,7 @@ ENTRY(invalid_TSS)
+@@ -900,7 +1139,7 @@ ENTRY(invalid_TSS)
        pushl_cfi $do_invalid_TSS
        jmp error_code
        CFI_ENDPROC
@@ -19054,7 +18727,7 @@ index 6ed91d9..6cc365b 100644
  
  ENTRY(segment_not_present)
        RING0_EC_FRAME
-@@ -953,7 +1192,7 @@ ENTRY(segment_not_present)
+@@ -908,7 +1147,7 @@ ENTRY(segment_not_present)
        pushl_cfi $do_segment_not_present
        jmp error_code
        CFI_ENDPROC
@@ -19063,7 +18736,7 @@ index 6ed91d9..6cc365b 100644
  
  ENTRY(stack_segment)
        RING0_EC_FRAME
-@@ -961,7 +1200,7 @@ ENTRY(stack_segment)
+@@ -916,7 +1155,7 @@ ENTRY(stack_segment)
        pushl_cfi $do_stack_segment
        jmp error_code
        CFI_ENDPROC
@@ -19072,7 +18745,7 @@ index 6ed91d9..6cc365b 100644
  
  ENTRY(alignment_check)
        RING0_EC_FRAME
-@@ -969,7 +1208,7 @@ ENTRY(alignment_check)
+@@ -924,7 +1163,7 @@ ENTRY(alignment_check)
        pushl_cfi $do_alignment_check
        jmp error_code
        CFI_ENDPROC
@@ -19081,7 +18754,7 @@ index 6ed91d9..6cc365b 100644
  
  ENTRY(divide_error)
        RING0_INT_FRAME
-@@ -978,7 +1217,7 @@ ENTRY(divide_error)
+@@ -933,7 +1172,7 @@ ENTRY(divide_error)
        pushl_cfi $do_divide_error
        jmp error_code
        CFI_ENDPROC
@@ -19090,7 +18763,7 @@ index 6ed91d9..6cc365b 100644
  
  #ifdef CONFIG_X86_MCE
  ENTRY(machine_check)
-@@ -988,7 +1227,7 @@ ENTRY(machine_check)
+@@ -943,7 +1182,7 @@ ENTRY(machine_check)
        pushl_cfi machine_check_vector
        jmp error_code
        CFI_ENDPROC
@@ -19099,7 +18772,7 @@ index 6ed91d9..6cc365b 100644
  #endif
  
  ENTRY(spurious_interrupt_bug)
-@@ -998,7 +1237,7 @@ ENTRY(spurious_interrupt_bug)
+@@ -953,7 +1192,7 @@ ENTRY(spurious_interrupt_bug)
        pushl_cfi $do_spurious_interrupt_bug
        jmp error_code
        CFI_ENDPROC
@@ -19108,7 +18781,7 @@ index 6ed91d9..6cc365b 100644
  /*
   * End of kprobes section
   */
-@@ -1101,7 +1340,7 @@ BUILD_INTERRUPT3(xen_hvm_callback_vector, XEN_HVM_EVTCHN_CALLBACK,
+@@ -1063,7 +1302,7 @@ BUILD_INTERRUPT3(hyperv_callback_vector, HYPERVISOR_CALLBACK_VECTOR,
  
  ENTRY(mcount)
        ret
@@ -19117,7 +18790,7 @@ index 6ed91d9..6cc365b 100644
  
  ENTRY(ftrace_caller)
        cmpl $0, function_trace_stop
-@@ -1134,7 +1373,7 @@ ftrace_graph_call:
+@@ -1096,7 +1335,7 @@ ftrace_graph_call:
  .globl ftrace_stub
  ftrace_stub:
        ret
@@ -19126,7 +18799,7 @@ index 6ed91d9..6cc365b 100644
  
  ENTRY(ftrace_regs_caller)
        pushf   /* push flags before compare (in cs location) */
-@@ -1235,7 +1474,7 @@ trace:
+@@ -1197,7 +1436,7 @@ trace:
        popl %ecx
        popl %eax
        jmp ftrace_stub
@@ -19135,7 +18808,7 @@ index 6ed91d9..6cc365b 100644
  #endif /* CONFIG_DYNAMIC_FTRACE */
  #endif /* CONFIG_FUNCTION_TRACER */
  
-@@ -1253,7 +1492,7 @@ ENTRY(ftrace_graph_caller)
+@@ -1215,7 +1454,7 @@ ENTRY(ftrace_graph_caller)
        popl %ecx
        popl %eax
        ret
@@ -19144,7 +18817,7 @@ index 6ed91d9..6cc365b 100644
  
  .globl return_to_handler
  return_to_handler:
-@@ -1309,15 +1548,18 @@ error_code:
+@@ -1271,15 +1510,18 @@ error_code:
        movl $-1, PT_ORIG_EAX(%esp)     # no syscall to restart
        REG_TO_PTGS %ecx
        SET_KERNEL_GS %ecx
@@ -19165,7 +18838,7 @@ index 6ed91d9..6cc365b 100644
  
  /*
   * Debug traps and NMI can happen at the one SYSENTER instruction
-@@ -1360,7 +1602,7 @@ debug_stack_correct:
+@@ -1322,7 +1564,7 @@ debug_stack_correct:
        call do_debug
        jmp ret_from_exception
        CFI_ENDPROC
@@ -19174,7 +18847,7 @@ index 6ed91d9..6cc365b 100644
  
  /*
   * NMI is doubly nasty. It can happen _while_ we're handling
-@@ -1398,6 +1640,9 @@ nmi_stack_correct:
+@@ -1360,6 +1602,9 @@ nmi_stack_correct:
        xorl %edx,%edx          # zero error code
        movl %esp,%eax          # pt_regs pointer
        call do_nmi
@@ -19184,7 +18857,7 @@ index 6ed91d9..6cc365b 100644
        jmp restore_all_notrace
        CFI_ENDPROC
  
-@@ -1434,12 +1679,15 @@ nmi_espfix_stack:
+@@ -1396,12 +1641,15 @@ nmi_espfix_stack:
        FIXUP_ESPFIX_STACK              # %eax == %esp
        xorl %edx,%edx                  # zero error code
        call do_nmi
@@ -19201,7 +18874,7 @@ index 6ed91d9..6cc365b 100644
  
  ENTRY(int3)
        RING0_INT_FRAME
-@@ -1452,14 +1700,14 @@ ENTRY(int3)
+@@ -1414,14 +1662,14 @@ ENTRY(int3)
        call do_int3
        jmp ret_from_exception
        CFI_ENDPROC
@@ -19218,7 +18891,7 @@ index 6ed91d9..6cc365b 100644
  
  #ifdef CONFIG_KVM_GUEST
  ENTRY(async_page_fault)
-@@ -1468,7 +1716,7 @@ ENTRY(async_page_fault)
+@@ -1430,7 +1678,7 @@ ENTRY(async_page_fault)
        pushl_cfi $do_async_page_fault
        jmp error_code
        CFI_ENDPROC
@@ -19228,7 +18901,7 @@ index 6ed91d9..6cc365b 100644
  
  /*
 diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S
-index cb3c591..bc63707 100644
+index c1d01e6..5625dce 100644
 --- a/arch/x86/kernel/entry_64.S
 +++ b/arch/x86/kernel/entry_64.S
 @@ -59,6 +59,8 @@
@@ -19315,7 +18988,7 @@ index cb3c591..bc63707 100644
  #endif
  
  
-@@ -284,6 +293,273 @@ ENTRY(native_usergs_sysret64)
+@@ -284,6 +293,282 @@ ENTRY(native_usergs_sysret64)
  ENDPROC(native_usergs_sysret64)
  #endif /* CONFIG_PARAVIRT */
  
@@ -19370,7 +19043,7 @@ index cb3c591..bc63707 100644
 +      pax_force_retaddr
 +      retq
 +
-+2:    ljmpq __KERNEL_CS,1f
++2:    ljmpq __KERNEL_CS,1b
 +3:    ljmpq __KERNEXEC_KERNEL_CS,4f
 +4:    SET_RDI_INTO_CR0
 +      jmp 1b
@@ -19386,6 +19059,9 @@ index cb3c591..bc63707 100644
 +      mov %cs,%rdi
 +      cmp $__KERNEXEC_KERNEL_CS,%edi
 +      jz 2f
++      GET_CR0_INTO_RDI
++      bts $16,%rdi
++      jnc 4f
 +1:
 +
 +#ifdef CONFIG_PARAVIRT
@@ -19398,9 +19074,12 @@ index cb3c591..bc63707 100644
 +
 +2:    GET_CR0_INTO_RDI
 +      btr $16,%rdi
++      jnc 4f
 +      ljmpq __KERNEL_CS,3f
 +3:    SET_RDI_INTO_CR0
 +      jmp 1b
++4:    ud2
++      jmp 4b
 +ENDPROC(pax_exit_kernel)
 +#endif
 +
@@ -19490,6 +19169,7 @@ index cb3c591..bc63707 100644
 +#ifdef CONFIG_PAX_KERNEXEC
 +      GET_CR0_INTO_RDI
 +      btr $16,%rdi
++      jnc 3f
 +      SET_RDI_INTO_CR0
 +#endif
 +
@@ -19527,6 +19207,8 @@ index cb3c591..bc63707 100644
 +      popq %rdi
 +      pax_force_retaddr
 +      retq
++3:    ud2
++      jmp 3b
 +ENDPROC(pax_exit_kernel_user)
 +#endif
 +
@@ -19589,7 +19271,7 @@ index cb3c591..bc63707 100644
  
  .macro TRACE_IRQS_IRETQ offset=ARGOFFSET
  #ifdef CONFIG_TRACE_IRQFLAGS
-@@ -375,8 +651,8 @@ ENDPROC(native_usergs_sysret64)
+@@ -375,8 +660,8 @@ ENDPROC(native_usergs_sysret64)
        .endm
  
        .macro UNFAKE_STACK_FRAME
@@ -19600,7 +19282,7 @@ index cb3c591..bc63707 100644
        .endm
  
  /*
-@@ -463,7 +739,7 @@ ENDPROC(native_usergs_sysret64)
+@@ -463,7 +748,7 @@ ENDPROC(native_usergs_sysret64)
        movq %rsp, %rsi
  
        leaq -RBP(%rsp),%rdi    /* arg1 for handler */
@@ -19609,7 +19291,7 @@ index cb3c591..bc63707 100644
        je 1f
        SWAPGS
        /*
-@@ -498,9 +774,10 @@ ENTRY(save_rest)
+@@ -498,9 +783,10 @@ ENTRY(save_rest)
        movq_cfi r15, R15+16
        movq %r11, 8(%rsp)      /* return address */
        FIXUP_TOP_OF_STACK %r11, 16
@@ -19621,7 +19303,7 @@ index cb3c591..bc63707 100644
  
  /* save complete stack frame */
        .pushsection .kprobes.text, "ax"
-@@ -529,9 +806,10 @@ ENTRY(save_paranoid)
+@@ -529,9 +815,10 @@ ENTRY(save_paranoid)
        js 1f   /* negative -> in kernel */
        SWAPGS
        xorl %ebx,%ebx
@@ -19634,7 +19316,7 @@ index cb3c591..bc63707 100644
        .popsection
  
  /*
-@@ -553,7 +831,7 @@ ENTRY(ret_from_fork)
+@@ -553,7 +840,7 @@ ENTRY(ret_from_fork)
  
        RESTORE_REST
  
@@ -19643,7 +19325,7 @@ index cb3c591..bc63707 100644
        jz   1f
  
        testl $_TIF_IA32, TI_flags(%rcx)        # 32-bit compat task needs IRET
-@@ -571,7 +849,7 @@ ENTRY(ret_from_fork)
+@@ -571,7 +858,7 @@ ENTRY(ret_from_fork)
        RESTORE_REST
        jmp int_ret_from_sys_call
        CFI_ENDPROC
@@ -19652,7 +19334,7 @@ index cb3c591..bc63707 100644
  
  /*
   * System call entry. Up to 6 arguments in registers are supported.
-@@ -608,7 +886,7 @@ END(ret_from_fork)
+@@ -608,7 +895,7 @@ END(ret_from_fork)
  ENTRY(system_call)
        CFI_STARTPROC   simple
        CFI_SIGNAL_FRAME
@@ -19661,7 +19343,7 @@ index cb3c591..bc63707 100644
        CFI_REGISTER    rip,rcx
        /*CFI_REGISTER  rflags,r11*/
        SWAPGS_UNSAFE_STACK
-@@ -621,16 +899,23 @@ GLOBAL(system_call_after_swapgs)
+@@ -621,16 +908,23 @@ GLOBAL(system_call_after_swapgs)
  
        movq    %rsp,PER_CPU_VAR(old_rsp)
        movq    PER_CPU_VAR(kernel_stack),%rsp
@@ -19687,7 +19369,7 @@ index cb3c591..bc63707 100644
        jnz tracesys
  system_call_fastpath:
  #if __SYSCALL_MASK == ~0
-@@ -640,7 +925,7 @@ system_call_fastpath:
+@@ -640,7 +934,7 @@ system_call_fastpath:
        cmpl $__NR_syscall_max,%eax
  #endif
        ja badsys
@@ -19696,7 +19378,7 @@ index cb3c591..bc63707 100644
        call *sys_call_table(,%rax,8)  # XXX:    rip relative
        movq %rax,RAX-ARGOFFSET(%rsp)
  /*
-@@ -654,10 +939,13 @@ sysret_check:
+@@ -654,10 +948,13 @@ sysret_check:
        LOCKDEP_SYS_EXIT
        DISABLE_INTERRUPTS(CLBR_NONE)
        TRACE_IRQS_OFF
@@ -19711,7 +19393,7 @@ index cb3c591..bc63707 100644
        /*
         * sysretq will re-enable interrupts:
         */
-@@ -709,14 +997,18 @@ badsys:
+@@ -709,14 +1006,18 @@ badsys:
         * jump back to the normal fast path.
         */
  auditsys:
@@ -19731,7 +19413,7 @@ index cb3c591..bc63707 100644
        jmp system_call_fastpath
  
        /*
-@@ -737,7 +1029,7 @@ sysret_audit:
+@@ -737,7 +1038,7 @@ sysret_audit:
        /* Do syscall tracing */
  tracesys:
  #ifdef CONFIG_AUDITSYSCALL
@@ -19740,7 +19422,7 @@ index cb3c591..bc63707 100644
        jz auditsys
  #endif
        SAVE_REST
-@@ -745,12 +1037,16 @@ tracesys:
+@@ -745,12 +1046,16 @@ tracesys:
        FIXUP_TOP_OF_STACK %rdi
        movq %rsp,%rdi
        call syscall_trace_enter
@@ -19757,7 +19439,7 @@ index cb3c591..bc63707 100644
        RESTORE_REST
  #if __SYSCALL_MASK == ~0
        cmpq $__NR_syscall_max,%rax
-@@ -759,7 +1055,7 @@ tracesys:
+@@ -759,7 +1064,7 @@ tracesys:
        cmpl $__NR_syscall_max,%eax
  #endif
        ja   int_ret_from_sys_call      /* RAX(%rsp) set to -ENOSYS above */
@@ -19766,7 +19448,7 @@ index cb3c591..bc63707 100644
        call *sys_call_table(,%rax,8)
        movq %rax,RAX-ARGOFFSET(%rsp)
        /* Use IRET because user could have changed frame */
-@@ -780,7 +1076,9 @@ GLOBAL(int_with_check)
+@@ -780,7 +1085,9 @@ GLOBAL(int_with_check)
        andl %edi,%edx
        jnz   int_careful
        andl    $~TS_COMPAT,TI_status(%rcx)
@@ -19777,25 +19459,16 @@ index cb3c591..bc63707 100644
  
        /* Either reschedule or signal or syscall exit tracking needed. */
        /* First do a reschedule test. */
-@@ -826,7 +1124,7 @@ int_restore_rest:
+@@ -826,7 +1133,7 @@ int_restore_rest:
        TRACE_IRQS_OFF
        jmp int_with_check
        CFI_ENDPROC
 -END(system_call)
 +ENDPROC(system_call)
  
- /*
-  * Certain special system calls that need to save a complete full stack frame.
-@@ -842,7 +1140,7 @@ ENTRY(\label)
-       call \func
-       jmp ptregscall_common
-       CFI_ENDPROC
--END(\label)
-+ENDPROC(\label)
-       .endm
        .macro FORK_LIKE func
-@@ -856,9 +1154,10 @@ ENTRY(stub_\func)
+ ENTRY(stub_\func)
+@@ -839,9 +1146,10 @@ ENTRY(stub_\func)
        DEFAULT_FRAME 0 8               /* offset 8: return address */
        call sys_\func
        RESTORE_TOP_OF_STACK %r11, 8
@@ -19806,8 +19479,20 @@ index cb3c591..bc63707 100644
 +ENDPROC(stub_\func)
        .endm
  
+       .macro FIXED_FRAME label,func
+@@ -851,9 +1159,10 @@ ENTRY(\label)
+       FIXUP_TOP_OF_STACK %r11, 8-ARGOFFSET
+       call \func
+       RESTORE_TOP_OF_STACK %r11, 8-ARGOFFSET
++      pax_force_retaddr
+       ret
+       CFI_ENDPROC
+-END(\label)
++ENDPROC(\label)
+       .endm
        FORK_LIKE  clone
-@@ -875,9 +1174,10 @@ ENTRY(ptregscall_common)
+@@ -870,9 +1179,10 @@ ENTRY(ptregscall_common)
        movq_cfi_restore R12+8, r12
        movq_cfi_restore RBP+8, rbp
        movq_cfi_restore RBX+8, rbx
@@ -19819,7 +19504,7 @@ index cb3c591..bc63707 100644
  
  ENTRY(stub_execve)
        CFI_STARTPROC
-@@ -891,7 +1191,7 @@ ENTRY(stub_execve)
+@@ -885,7 +1195,7 @@ ENTRY(stub_execve)
        RESTORE_REST
        jmp int_ret_from_sys_call
        CFI_ENDPROC
@@ -19828,7 +19513,7 @@ index cb3c591..bc63707 100644
  
  /*
   * sigreturn is special because it needs to restore all registers on return.
-@@ -909,7 +1209,7 @@ ENTRY(stub_rt_sigreturn)
+@@ -902,7 +1212,7 @@ ENTRY(stub_rt_sigreturn)
        RESTORE_REST
        jmp int_ret_from_sys_call
        CFI_ENDPROC
@@ -19837,7 +19522,25 @@ index cb3c591..bc63707 100644
  
  #ifdef CONFIG_X86_X32_ABI
  ENTRY(stub_x32_rt_sigreturn)
-@@ -975,7 +1275,7 @@ vector=vector+1
+@@ -916,7 +1226,7 @@ ENTRY(stub_x32_rt_sigreturn)
+       RESTORE_REST
+       jmp int_ret_from_sys_call
+       CFI_ENDPROC
+-END(stub_x32_rt_sigreturn)
++ENDPROC(stub_x32_rt_sigreturn)
+ ENTRY(stub_x32_execve)
+       CFI_STARTPROC
+@@ -930,7 +1240,7 @@ ENTRY(stub_x32_execve)
+       RESTORE_REST
+       jmp int_ret_from_sys_call
+       CFI_ENDPROC
+-END(stub_x32_execve)
++ENDPROC(stub_x32_execve)
+ #endif
+@@ -967,7 +1277,7 @@ vector=vector+1
  2:    jmp common_interrupt
  .endr
        CFI_ENDPROC
@@ -19846,7 +19549,7 @@ index cb3c591..bc63707 100644
  
  .previous
  END(interrupt)
-@@ -995,6 +1295,16 @@ END(interrupt)
+@@ -987,6 +1297,16 @@ END(interrupt)
        subq $ORIG_RAX-RBP, %rsp
        CFI_ADJUST_CFA_OFFSET ORIG_RAX-RBP
        SAVE_ARGS_IRQ
@@ -19863,7 +19566,7 @@ index cb3c591..bc63707 100644
        call \func
        .endm
  
-@@ -1027,7 +1337,7 @@ ret_from_intr:
+@@ -1019,7 +1339,7 @@ ret_from_intr:
  
  exit_intr:
        GET_THREAD_INFO(%rcx)
@@ -19872,7 +19575,7 @@ index cb3c591..bc63707 100644
        je retint_kernel
  
        /* Interrupt came from user space */
-@@ -1049,12 +1359,16 @@ retint_swapgs:         /* return to user-space */
+@@ -1041,12 +1361,16 @@ retint_swapgs:         /* return to user-space */
         * The iretq could re-enable interrupts:
         */
        DISABLE_INTERRUPTS(CLBR_ANY)
@@ -19889,7 +19592,7 @@ index cb3c591..bc63707 100644
        /*
         * The iretq could re-enable interrupts:
         */
-@@ -1137,7 +1451,7 @@ ENTRY(retint_kernel)
+@@ -1129,7 +1453,7 @@ ENTRY(retint_kernel)
  #endif
  
        CFI_ENDPROC
@@ -19898,7 +19601,7 @@ index cb3c591..bc63707 100644
  /*
   * End of kprobes section
   */
-@@ -1155,7 +1469,7 @@ ENTRY(\sym)
+@@ -1147,7 +1471,7 @@ ENTRY(\sym)
        interrupt \do_sym
        jmp ret_from_intr
        CFI_ENDPROC
@@ -19907,7 +19610,7 @@ index cb3c591..bc63707 100644
  .endm
  
  #ifdef CONFIG_SMP
-@@ -1211,12 +1525,22 @@ ENTRY(\sym)
+@@ -1203,12 +1527,22 @@ ENTRY(\sym)
        CFI_ADJUST_CFA_OFFSET ORIG_RAX-R15
        call error_entry
        DEFAULT_FRAME 0
@@ -19931,7 +19634,7 @@ index cb3c591..bc63707 100644
  .endm
  
  .macro paranoidzeroentry sym do_sym
-@@ -1229,15 +1553,25 @@ ENTRY(\sym)
+@@ -1221,15 +1555,25 @@ ENTRY(\sym)
        CFI_ADJUST_CFA_OFFSET ORIG_RAX-R15
        call save_paranoid
        TRACE_IRQS_OFF
@@ -19959,7 +19662,7 @@ index cb3c591..bc63707 100644
  .macro paranoidzeroentry_ist sym do_sym ist
  ENTRY(\sym)
        INTR_FRAME
-@@ -1248,14 +1582,30 @@ ENTRY(\sym)
+@@ -1240,14 +1584,30 @@ ENTRY(\sym)
        CFI_ADJUST_CFA_OFFSET ORIG_RAX-R15
        call save_paranoid
        TRACE_IRQS_OFF_DEBUG
@@ -19991,7 +19694,7 @@ index cb3c591..bc63707 100644
  .endm
  
  .macro errorentry sym do_sym
-@@ -1267,13 +1617,23 @@ ENTRY(\sym)
+@@ -1259,13 +1619,23 @@ ENTRY(\sym)
        CFI_ADJUST_CFA_OFFSET ORIG_RAX-R15
        call error_entry
        DEFAULT_FRAME 0
@@ -20016,7 +19719,7 @@ index cb3c591..bc63707 100644
  .endm
  
        /* error code is on the stack already */
-@@ -1287,13 +1647,23 @@ ENTRY(\sym)
+@@ -1279,13 +1649,23 @@ ENTRY(\sym)
        call save_paranoid
        DEFAULT_FRAME 0
        TRACE_IRQS_OFF
@@ -20041,7 +19744,7 @@ index cb3c591..bc63707 100644
  .endm
  
  zeroentry divide_error do_divide_error
-@@ -1323,9 +1693,10 @@ gs_change:
+@@ -1315,9 +1695,10 @@ gs_change:
  2:    mfence          /* workaround */
        SWAPGS
        popfq_cfi
@@ -20053,7 +19756,7 @@ index cb3c591..bc63707 100644
  
        _ASM_EXTABLE(gs_change,bad_gs)
        .section .fixup,"ax"
-@@ -1353,9 +1724,10 @@ ENTRY(call_softirq)
+@@ -1345,9 +1726,10 @@ ENTRY(call_softirq)
        CFI_DEF_CFA_REGISTER    rsp
        CFI_ADJUST_CFA_OFFSET   -8
        decl PER_CPU_VAR(irq_count)
@@ -20065,7 +19768,7 @@ index cb3c591..bc63707 100644
  
  #ifdef CONFIG_XEN
  zeroentry xen_hypervisor_callback xen_do_hypervisor_callback
-@@ -1393,7 +1765,7 @@ ENTRY(xen_do_hypervisor_callback)   # do_hypervisor_callback(struct *pt_regs)
+@@ -1385,7 +1767,7 @@ ENTRY(xen_do_hypervisor_callback)   # do_hypervisor_callback(struct *pt_regs)
        decl PER_CPU_VAR(irq_count)
        jmp  error_exit
        CFI_ENDPROC
@@ -20074,16 +19777,16 @@ index cb3c591..bc63707 100644
  
  /*
   * Hypervisor uses this for application faults while it executes.
-@@ -1452,7 +1824,7 @@ ENTRY(xen_failsafe_callback)
+@@ -1444,7 +1826,7 @@ ENTRY(xen_failsafe_callback)
        SAVE_ALL
        jmp error_exit
        CFI_ENDPROC
 -END(xen_failsafe_callback)
 +ENDPROC(xen_failsafe_callback)
  
- apicinterrupt XEN_HVM_EVTCHN_CALLBACK \
+ apicinterrupt HYPERVISOR_CALLBACK_VECTOR \
        xen_hvm_callback_vector xen_evtchn_do_upcall
-@@ -1501,16 +1873,31 @@ ENTRY(paranoid_exit)
+@@ -1498,16 +1880,31 @@ ENTRY(paranoid_exit)
        TRACE_IRQS_OFF_DEBUG
        testl %ebx,%ebx                         /* swapgs needed? */
        jnz paranoid_restore
@@ -20116,7 +19819,7 @@ index cb3c591..bc63707 100644
        jmp irq_return
  paranoid_userspace:
        GET_THREAD_INFO(%rcx)
-@@ -1539,7 +1926,7 @@ paranoid_schedule:
+@@ -1536,7 +1933,7 @@ paranoid_schedule:
        TRACE_IRQS_OFF
        jmp paranoid_userspace
        CFI_ENDPROC
@@ -20125,7 +19828,7 @@ index cb3c591..bc63707 100644
  
  /*
   * Exception entry point. This expects an error code/orig_rax on the stack.
-@@ -1566,12 +1953,13 @@ ENTRY(error_entry)
+@@ -1563,12 +1960,13 @@ ENTRY(error_entry)
        movq_cfi r14, R14+8
        movq_cfi r15, R15+8
        xorl %ebx,%ebx
@@ -20140,7 +19843,7 @@ index cb3c591..bc63707 100644
        ret
  
  /*
-@@ -1598,7 +1986,7 @@ bstep_iret:
+@@ -1595,7 +1993,7 @@ bstep_iret:
        movq %rcx,RIP+8(%rsp)
        jmp error_swapgs
        CFI_ENDPROC
@@ -20149,7 +19852,7 @@ index cb3c591..bc63707 100644
  
  
  /* ebx:       no swapgs flag (1: don't need swapgs, 0: need it) */
-@@ -1618,7 +2006,7 @@ ENTRY(error_exit)
+@@ -1615,7 +2013,7 @@ ENTRY(error_exit)
        jnz retint_careful
        jmp retint_swapgs
        CFI_ENDPROC
@@ -20158,7 +19861,7 @@ index cb3c591..bc63707 100644
  
  /*
   * Test if a given stack is an NMI stack or not.
-@@ -1676,9 +2064,11 @@ ENTRY(nmi)
+@@ -1673,9 +2071,11 @@ ENTRY(nmi)
         * If %cs was not the kernel segment, then the NMI triggered in user
         * space, which means it is definitely not nested.
         */
@@ -20171,7 +19874,25 @@ index cb3c591..bc63707 100644
        /*
         * Check the special variable on the stack to see if NMIs are
         * executing.
-@@ -1847,6 +2237,17 @@ end_repeat_nmi:
+@@ -1709,8 +2109,7 @@ nested_nmi:
+ 1:
+       /* Set up the interrupted NMIs stack to jump to repeat_nmi */
+-      leaq -1*8(%rsp), %rdx
+-      movq %rdx, %rsp
++      subq $8, %rsp
+       CFI_ADJUST_CFA_OFFSET 1*8
+       leaq -10*8(%rsp), %rdx
+       pushq_cfi $__KERNEL_DS
+@@ -1728,6 +2127,7 @@ nested_nmi_out:
+       CFI_RESTORE rdx
+       /* No need to check faults here */
++      pax_force_retaddr_bts
+       INTERRUPT_RETURN
+       CFI_RESTORE_STATE
+@@ -1844,6 +2244,17 @@ end_repeat_nmi:
         */
        movq %cr2, %r12
  
@@ -20189,7 +19910,7 @@ index cb3c591..bc63707 100644
        /* paranoidentry do_nmi, 0; without TRACE_IRQS_OFF */
        movq %rsp,%rdi
        movq $-1,%rsi
-@@ -1862,23 +2263,34 @@ end_repeat_nmi:
+@@ -1859,23 +2270,34 @@ end_repeat_nmi:
        testl %ebx,%ebx                         /* swapgs needed? */
        jnz nmi_restore
  nmi_swapgs:
@@ -20227,7 +19948,7 @@ index cb3c591..bc63707 100644
  /*
   * End of kprobes section
 diff --git a/arch/x86/kernel/ftrace.c b/arch/x86/kernel/ftrace.c
-index 1d41402..af9a46a 100644
+index 42a392a..fbbd930 100644
 --- a/arch/x86/kernel/ftrace.c
 +++ b/arch/x86/kernel/ftrace.c
 @@ -105,6 +105,8 @@ ftrace_modify_code_direct(unsigned long ip, unsigned const char *old_code,
@@ -20261,8 +19982,8 @@ index 1d41402..af9a46a 100644
         * kernel identity mapping to modify code.
         */
        if (within(ip, (unsigned long)_text, (unsigned long)_etext))
--              ip = (unsigned long)__va(__pa(ip));
-+              ip = (unsigned long)__va(__pa(ktla_ktva(ip)));
+-              ip = (unsigned long)__va(__pa_symbol(ip));
++              ip = (unsigned long)__va(__pa_symbol(ktla_ktva(ip)));
  
        return probe_kernel_write((void *)ip, val, size);
  }
@@ -20293,30 +20014,20 @@ index 1d41402..af9a46a 100644
        if (probe_kernel_read(code, (void *)ip, MCOUNT_INSN_SIZE))
                return -EFAULT;
  
-diff --git a/arch/x86/kernel/head32.c b/arch/x86/kernel/head32.c
-index c18f59d..9c0c9f6 100644
---- a/arch/x86/kernel/head32.c
-+++ b/arch/x86/kernel/head32.c
-@@ -18,6 +18,7 @@
- #include <asm/io_apic.h>
- #include <asm/bios_ebda.h>
- #include <asm/tlbflush.h>
-+#include <asm/boot.h>
- static void __init i386_default_early_setup(void)
- {
-@@ -30,8 +31,7 @@ static void __init i386_default_early_setup(void)
+diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c
+index 1c68ccb..b4bc15c 100644
+--- a/arch/x86/kernel/head64.c
++++ b/arch/x86/kernel/head64.c
+@@ -175,7 +175,6 @@ void __init x86_64_start_kernel(char * real_mode_data)
+       if (console_loglevel == 10)
+               early_printk("Kernel alive\n");
  
- void __init i386_start_kernel(void)
- {
--      memblock_reserve(__pa_symbol(&_text),
--                       __pa_symbol(&__bss_stop) - __pa_symbol(&_text));
-+      memblock_reserve(LOAD_PHYSICAL_ADDR, __pa_symbol(&__bss_stop) - LOAD_PHYSICAL_ADDR);
+-      clear_page(init_level4_pgt);
+       /* set init_level4_pgt kernel high mapping*/
+       init_level4_pgt[511] = early_level4_pgt[511];
  
- #ifdef CONFIG_BLK_DEV_INITRD
-       /* Reserve INITRD */
 diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel/head_32.S
-index c8932c7..d56b622 100644
+index 73afd11..d1670f5 100644
 --- a/arch/x86/kernel/head_32.S
 +++ b/arch/x86/kernel/head_32.S
 @@ -26,6 +26,12 @@
@@ -20432,7 +20143,7 @@ index c8932c7..d56b622 100644
  /*
   * Clear BSS first so that there are no surprises...
   */
-@@ -196,8 +264,11 @@ ENTRY(startup_32)
+@@ -201,8 +269,11 @@ ENTRY(startup_32)
        movl %eax, pa(max_pfn_mapped)
  
        /* Do early initialization of the fixmap area */
@@ -20446,7 +20157,7 @@ index c8932c7..d56b622 100644
  #else /* Not PAE */
  
  page_pde_offset = (__PAGE_OFFSET >> 20);
-@@ -227,8 +298,11 @@ page_pde_offset = (__PAGE_OFFSET >> 20);
+@@ -232,8 +303,11 @@ page_pde_offset = (__PAGE_OFFSET >> 20);
        movl %eax, pa(max_pfn_mapped)
  
        /* Do early initialization of the fixmap area */
@@ -20460,7 +20171,7 @@ index c8932c7..d56b622 100644
  #endif
  
  #ifdef CONFIG_PARAVIRT
-@@ -242,9 +316,7 @@ page_pde_offset = (__PAGE_OFFSET >> 20);
+@@ -247,9 +321,7 @@ page_pde_offset = (__PAGE_OFFSET >> 20);
        cmpl $num_subarch_entries, %eax
        jae bad_subarch
  
@@ -20471,7 +20182,7 @@ index c8932c7..d56b622 100644
  
  bad_subarch:
  WEAK(lguest_entry)
-@@ -256,10 +328,10 @@ WEAK(xen_entry)
+@@ -261,10 +333,10 @@ WEAK(xen_entry)
        __INITDATA
  
  subarch_entries:
@@ -20486,25 +20197,25 @@ index c8932c7..d56b622 100644
  num_subarch_entries = (. - subarch_entries) / 4
  .previous
  #else
-@@ -335,6 +407,7 @@ default_entry:
+@@ -355,6 +427,7 @@ default_entry:
        movl pa(mmu_cr4_features),%eax
        movl %eax,%cr4
  
 +#ifdef CONFIG_X86_PAE
        testb $X86_CR4_PAE, %al         # check if PAE is enabled
-       jz 6f
+       jz enable_paging
  
-@@ -363,6 +436,9 @@ default_entry:
+@@ -383,6 +456,9 @@ default_entry:
        /* Make changes effective */
        wrmsr
  
 +      btsl $_PAGE_BIT_NX-32,pa(__supported_pte_mask+4)
 +#endif
 +
6:
enable_paging:
  
  /*
-@@ -460,14 +536,20 @@ is386:   movl $2,%ecx            # set MP
+@@ -451,14 +527,20 @@ is486:
  1:    movl $(__KERNEL_DS),%eax        # reload all the segment registers
        movl %eax,%ss                   # after changing gdt.
  
@@ -20526,7 +20237,7 @@ index c8932c7..d56b622 100644
        movl %eax,%gs
  
        xorl %eax,%eax                  # Clear LDT
-@@ -544,8 +626,11 @@ setup_once:
+@@ -534,8 +616,11 @@ setup_once:
         * relocation.  Manually set base address in stack canary
         * segment descriptor.
         */
@@ -20539,7 +20250,7 @@ index c8932c7..d56b622 100644
        movw %cx, 8 * GDT_ENTRY_STACK_CANARY + 2(%eax)
        shrl $16, %ecx
        movb %cl, 8 * GDT_ENTRY_STACK_CANARY + 4(%eax)
-@@ -576,7 +661,7 @@ ENDPROC(early_idt_handlers)
+@@ -566,7 +651,7 @@ ENDPROC(early_idt_handlers)
        /* This is global to keep gas from relaxing the jumps */
  ENTRY(early_idt_handler)
        cld
@@ -20548,7 +20259,7 @@ index c8932c7..d56b622 100644
        je hlt_loop
        incl %ss:early_recursion_flag
  
-@@ -614,8 +699,8 @@ ENTRY(early_idt_handler)
+@@ -604,8 +689,8 @@ ENTRY(early_idt_handler)
        pushl (20+6*4)(%esp)    /* trapno */
        pushl $fault_msg
        call printk
@@ -20558,7 +20269,7 @@ index c8932c7..d56b622 100644
  hlt_loop:
        hlt
        jmp hlt_loop
-@@ -634,8 +719,11 @@ ENDPROC(early_idt_handler)
+@@ -624,8 +709,11 @@ ENDPROC(early_idt_handler)
  /* This is the default interrupt "handler" :-) */
        ALIGN
  ignore_int:
@@ -20571,7 +20282,7 @@ index c8932c7..d56b622 100644
        pushl %eax
        pushl %ecx
        pushl %edx
-@@ -644,9 +732,6 @@ ignore_int:
+@@ -634,9 +722,6 @@ ignore_int:
        movl $(__KERNEL_DS),%eax
        movl %eax,%ds
        movl %eax,%es
@@ -20581,7 +20292,7 @@ index c8932c7..d56b622 100644
        pushl 16(%esp)
        pushl 24(%esp)
        pushl 32(%esp)
-@@ -680,29 +765,43 @@ ENTRY(setup_once_ref)
+@@ -670,29 +755,43 @@ ENTRY(setup_once_ref)
  /*
   * BSS section
   */
@@ -20630,7 +20341,7 @@ index c8932c7..d56b622 100644
  ENTRY(initial_page_table)
        .long   pa(initial_pg_pmd+PGD_IDENT_ATTR),0     /* low identity map */
  # if KPMDS == 3
-@@ -721,12 +820,20 @@ ENTRY(initial_page_table)
+@@ -711,12 +810,20 @@ ENTRY(initial_page_table)
  #  error "Kernel PMDs should be 1, 2 or 3"
  # endif
        .align PAGE_SIZE                /* needs to be page-sized too */
@@ -20652,7 +20363,7 @@ index c8932c7..d56b622 100644
  
  __INITRODATA
  int_msg:
-@@ -754,7 +861,7 @@ fault_msg:
+@@ -744,7 +851,7 @@ fault_msg:
   * segment size, and 32-bit linear address value:
   */
  
@@ -20661,7 +20372,7 @@ index c8932c7..d56b622 100644
  .globl boot_gdt_descr
  .globl idt_descr
  
-@@ -763,7 +870,7 @@ fault_msg:
+@@ -753,7 +860,7 @@ fault_msg:
        .word 0                         # 32 bit align gdt_desc.address
  boot_gdt_descr:
        .word __BOOT_DS+7
@@ -20670,7 +20381,7 @@ index c8932c7..d56b622 100644
  
        .word 0                         # 32-bit align idt_desc.address
  idt_descr:
-@@ -774,7 +881,7 @@ idt_descr:
+@@ -764,7 +871,7 @@ idt_descr:
        .word 0                         # 32 bit align gdt_desc.address
  ENTRY(early_gdt_descr)
        .word GDT_ENTRIES*8-1
@@ -20679,7 +20390,7 @@ index c8932c7..d56b622 100644
  
  /*
   * The boot_gdt must mirror the equivalent in setup.S and is
-@@ -783,5 +890,65 @@ ENTRY(early_gdt_descr)
+@@ -773,5 +880,65 @@ ENTRY(early_gdt_descr)
        .align L1_CACHE_BYTES
  ENTRY(boot_gdt)
        .fill GDT_ENTRY_BOOT_CS,8,0
@@ -20748,7 +20459,7 @@ index c8932c7..d56b622 100644
 +      .fill PAGE_SIZE_asm - GDT_SIZE,1,0
 +      .endr
 diff --git a/arch/x86/kernel/head_64.S b/arch/x86/kernel/head_64.S
-index 980053c..74d3b44 100644
+index 08f7e80..40cbed5 100644
 --- a/arch/x86/kernel/head_64.S
 +++ b/arch/x86/kernel/head_64.S
 @@ -20,6 +20,8 @@
@@ -20773,65 +20484,34 @@ index 980053c..74d3b44 100644
  
        .text
        __HEAD
-@@ -88,35 +96,23 @@ startup_64:
+@@ -89,11 +97,15 @@ startup_64:
+        * Fixup the physical addresses in the page table
         */
-       addq    %rbp, init_level4_pgt + 0(%rip)
-       addq    %rbp, init_level4_pgt + (L4_PAGE_OFFSET*8)(%rip)
+       addq    %rbp, early_level4_pgt + (L4_START_KERNEL*8)(%rip)
 +      addq    %rbp, init_level4_pgt + (L4_VMALLOC_START*8)(%rip)
 +      addq    %rbp, init_level4_pgt + (L4_VMALLOC_END*8)(%rip)
 +      addq    %rbp, init_level4_pgt + (L4_VMEMMAP_START*8)(%rip)
-       addq    %rbp, init_level4_pgt + (L4_START_KERNEL*8)(%rip)
  
-       addq    %rbp, level3_ident_pgt + 0(%rip)
-+#ifndef CONFIG_XEN
-+      addq    %rbp, level3_ident_pgt + 8(%rip)
-+#endif
--      addq    %rbp, level3_kernel_pgt + (510*8)(%rip)
--      addq    %rbp, level3_kernel_pgt + (511*8)(%rip)
-+      addq    %rbp, level3_vmemmap_pgt + (L3_VMEMMAP_START*8)(%rip)
-+
-+      addq    %rbp, level3_kernel_pgt + (L3_START_KERNEL*8)(%rip)
-+      addq    %rbp, level3_kernel_pgt + (L3_START_KERNEL*8+8)(%rip)
+       addq    %rbp, level3_kernel_pgt + (510*8)(%rip)
+       addq    %rbp, level3_kernel_pgt + (511*8)(%rip)
  
        addq    %rbp, level2_fixmap_pgt + (506*8)(%rip)
--
--      /* Add an Identity mapping if I am above 1G */
--      leaq    _text(%rip), %rdi
--      andq    $PMD_PAGE_MASK, %rdi
--
--      movq    %rdi, %rax
--      shrq    $PUD_SHIFT, %rax
--      andq    $(PTRS_PER_PUD - 1), %rax
--      jz      ident_complete
--
--      leaq    (level2_spare_pgt - __START_KERNEL_map + _KERNPG_TABLE)(%rbp), %rdx
--      leaq    level3_ident_pgt(%rip), %rbx
--      movq    %rdx, 0(%rbx, %rax, 8)
--
--      movq    %rdi, %rax
--      shrq    $PMD_SHIFT, %rax
--      andq    $(PTRS_PER_PMD - 1), %rax
--      leaq    __PAGE_KERNEL_IDENT_LARGE_EXEC(%rdi), %rdx
--      leaq    level2_spare_pgt(%rip), %rbx
--      movq    %rdx, 0(%rbx, %rax, 8)
--ident_complete:
 +      addq    %rbp, level2_fixmap_pgt + (507*8)(%rip)
  
        /*
-        * Fixup the kernel text+data virtual addresses. Note that
-@@ -159,8 +155,8 @@ ENTRY(secondary_startup_64)
-        * after the boot processor executes this code.
-        */
+        * Set up the identity mapping for the switchover.  These
+@@ -175,8 +187,8 @@ ENTRY(secondary_startup_64)
+       movq    $(init_level4_pgt - __START_KERNEL_map), %rax
+ 1:
  
 -      /* Enable PAE mode and PGE */
--      movl    $(X86_CR4_PAE | X86_CR4_PGE), %eax
+-      movl    $(X86_CR4_PAE | X86_CR4_PGE), %ecx
 +      /* Enable PAE mode and PSE/PGE */
-+      movl    $(X86_CR4_PSE | X86_CR4_PAE | X86_CR4_PGE), %eax
-       movq    %rax, %cr4
++      movl    $(X86_CR4_PSE | X86_CR4_PAE | X86_CR4_PGE), %ecx
+       movq    %rcx, %cr4
  
        /* Setup early boot stage 4 level pagetables. */
-@@ -182,9 +178,17 @@ ENTRY(secondary_startup_64)
+@@ -197,10 +209,18 @@ ENTRY(secondary_startup_64)
        movl    $MSR_EFER, %ecx
        rdmsr
        btsl    $_EFER_SCE, %eax        /* Enable System Call */
@@ -20839,6 +20519,7 @@ index 980053c..74d3b44 100644
 +      btl     $(X86_FEATURE_NX & 31),%edi     /* No Execute supported? */
        jnc     1f
        btsl    $_EFER_NX, %eax
+       btsq    $_PAGE_BIT_NX,early_pmd_flags(%rip)
 +      leaq    init_level4_pgt(%rip), %rdi
 +#ifndef CONFIG_EFI
 +      btsq    $_PAGE_BIT_NX, 8*L4_PAGE_OFFSET(%rdi)
@@ -20850,24 +20531,15 @@ index 980053c..74d3b44 100644
  1:    wrmsr                           /* Make changes effective */
  
        /* Setup cr0 */
-@@ -246,6 +250,7 @@ ENTRY(secondary_startup_64)
-        * jump.  In addition we need to ensure %cs is set so we make this
-        * a far return.
+@@ -280,6 +300,7 @@ ENTRY(secondary_startup_64)
+        *      REX.W + FF /5 JMP m16:64 Jump far, absolute indirect,
+        *              address given in m16:64.
         */
 +      pax_set_fptr_mask
        movq    initial_code(%rip),%rax
        pushq   $0              # fake return address to stop unwinder
        pushq   $__KERNEL_CS    # set correct cs
-@@ -284,7 +289,7 @@ ENDPROC(start_cpu0)
- bad_address:
-       jmp bad_address
--      .section ".init.text","ax"
-+      __INIT
-       .globl early_idt_handlers
- early_idt_handlers:
-       # 104(%rsp) %rflags
-@@ -343,7 +348,7 @@ ENTRY(early_idt_handler)
+@@ -386,7 +407,7 @@ ENTRY(early_idt_handler)
        call dump_stack
  #ifdef CONFIG_KALLSYMS        
        leaq early_idt_ripmsg(%rip),%rdi
@@ -20876,51 +20548,35 @@ index 980053c..74d3b44 100644
        call __print_symbol
  #endif
  #endif /* EARLY_PRINTK */
-@@ -363,11 +368,15 @@ ENTRY(early_idt_handler)
-       addq $16,%rsp           # drop vector number and error code
-       decl early_recursion_flag(%rip)
-       INTERRUPT_RETURN
-+      .previous
-+      __INITDATA
-       .balign 4
+@@ -414,6 +435,7 @@ ENDPROC(early_idt_handler)
  early_recursion_flag:
        .long 0
-+      .previous
  
 +      .section .rodata,"a",@progbits
  #ifdef CONFIG_EARLY_PRINTK
  early_idt_msg:
        .asciz "PANIC: early exception %02lx rip %lx:%lx error %lx cr2 %lx\n"
-@@ -376,6 +385,7 @@ early_idt_ripmsg:
- #endif /* CONFIG_EARLY_PRINTK */
-       .previous
+@@ -443,27 +465,50 @@ NEXT_PAGE(early_dynamic_pgts)
  
-+      .section .rodata,"a",@progbits
- #define NEXT_PAGE(name) \
-       .balign PAGE_SIZE; \
- ENTRY(name)
-@@ -388,7 +398,6 @@ ENTRY(name)
-       i = i + 1 ;                                     \
-       .endr
+       .data
  
--      .data
-       /*
-        * This default setting generates an ident mapping at address 0x100000
-        * and a mapping for the kernel that precisely maps virtual address
-@@ -399,13 +408,41 @@ NEXT_PAGE(init_level4_pgt)
-       .quad   level3_ident_pgt - __START_KERNEL_map + _KERNPG_TABLE
-       .org    init_level4_pgt + L4_PAGE_OFFSET*8, 0
-       .quad   level3_ident_pgt - __START_KERNEL_map + _KERNPG_TABLE
+-#ifndef CONFIG_XEN
+ NEXT_PAGE(init_level4_pgt)
+-      .fill   512,8,0
+-#else
+-NEXT_PAGE(init_level4_pgt)
+-      .quad   level3_ident_pgt - __START_KERNEL_map + _KERNPG_TABLE
+       .org    init_level4_pgt + L4_PAGE_OFFSET*8, 0
+       .quad   level3_ident_pgt - __START_KERNEL_map + _KERNPG_TABLE
 +      .org    init_level4_pgt + L4_VMALLOC_START*8, 0
 +      .quad   level3_vmalloc_start_pgt - __START_KERNEL_map + _KERNPG_TABLE
 +      .org    init_level4_pgt + L4_VMALLOC_END*8, 0
 +      .quad   level3_vmalloc_end_pgt - __START_KERNEL_map + _KERNPG_TABLE
 +      .org    init_level4_pgt + L4_VMEMMAP_START*8, 0
 +      .quad   level3_vmemmap_pgt - __START_KERNEL_map + _KERNPG_TABLE
-       .org    init_level4_pgt + L4_START_KERNEL*8, 0
+       .org    init_level4_pgt + L4_START_KERNEL*8, 0
        /* (2^48-(2*1024*1024*1024))/(2^39) = 511 */
-       .quad   level3_kernel_pgt - __START_KERNEL_map + _PAGE_TABLE
+       .quad   level3_kernel_pgt - __START_KERNEL_map + _PAGE_TABLE
  
 +#ifdef CONFIG_PAX_PER_CPU_PGD
 +NEXT_PAGE(cpu_pgd)
@@ -20932,7 +20588,7 @@ index 980053c..74d3b44 100644
  NEXT_PAGE(level3_ident_pgt)
        .quad   level2_ident_pgt - __START_KERNEL_map + _KERNPG_TABLE
 +#ifdef CONFIG_XEN
-       .fill   511,8,0
+       .fill   511, 8, 0
 +#else
 +      .quad   level2_ident_pgt + PAGE_SIZE - __START_KERNEL_map + _KERNPG_TABLE
 +      .fill   510,8,0
@@ -20947,16 +20603,31 @@ index 980053c..74d3b44 100644
 +NEXT_PAGE(level3_vmemmap_pgt)
 +      .fill   L3_VMEMMAP_START,8,0
 +      .quad   level2_vmemmap_pgt - __START_KERNEL_map + _KERNPG_TABLE
++
+ NEXT_PAGE(level2_ident_pgt)
+-      /* Since I easily can, map the first 1G.
++      /* Since I easily can, map the first 2G.
+        * Don't set NX because code runs from these pages.
+        */
+-      PMDS(0, __PAGE_KERNEL_IDENT_LARGE_EXEC, PTRS_PER_PMD)
+-#endif
++      PMDS(0, __PAGE_KERNEL_IDENT_LARGE_EXEC, 2*PTRS_PER_PMD)
  
  NEXT_PAGE(level3_kernel_pgt)
        .fill   L3_START_KERNEL,8,0
-@@ -413,20 +450,23 @@ NEXT_PAGE(level3_kernel_pgt)
+@@ -471,6 +516,9 @@ NEXT_PAGE(level3_kernel_pgt)
        .quad   level2_kernel_pgt - __START_KERNEL_map + _KERNPG_TABLE
        .quad   level2_fixmap_pgt - __START_KERNEL_map + _PAGE_TABLE
  
 +NEXT_PAGE(level2_vmemmap_pgt)
 +      .fill   512,8,0
 +
+ NEXT_PAGE(level2_kernel_pgt)
+       /*
+        * 512 MB kernel mapping. We spend a full page on this pagetable
+@@ -486,38 +534,64 @@ NEXT_PAGE(level2_kernel_pgt)
+               KERNEL_IMAGE_SIZE/PMD_SIZE)
  NEXT_PAGE(level2_fixmap_pgt)
 -      .fill   506,8,0
 -      .quad   level1_fixmap_pgt - __START_KERNEL_map + _PAGE_TABLE
@@ -20971,30 +20642,7 @@ index 980053c..74d3b44 100644
 +NEXT_PAGE(level1_vsyscall_pgt)
        .fill   512,8,0
  
--NEXT_PAGE(level2_ident_pgt)
--      /* Since I easily can, map the first 1G.
-+      /* Since I easily can, map the first 2G.
-        * Don't set NX because code runs from these pages.
-        */
--      PMDS(0, __PAGE_KERNEL_IDENT_LARGE_EXEC, PTRS_PER_PMD)
-+NEXT_PAGE(level2_ident_pgt)
-+      PMDS(0, __PAGE_KERNEL_IDENT_LARGE_EXEC, 2*PTRS_PER_PMD)
- NEXT_PAGE(level2_kernel_pgt)
-       /*
-@@ -439,37 +479,59 @@ NEXT_PAGE(level2_kernel_pgt)
-        *  If you want to increase this then increase MODULES_VADDR
-        *  too.)
-        */
--      PMDS(0, __PAGE_KERNEL_LARGE_EXEC,
--              KERNEL_IMAGE_SIZE/PMD_SIZE)
--
--NEXT_PAGE(level2_spare_pgt)
--      .fill   512, 8, 0
-+      PMDS(0, __PAGE_KERNEL_LARGE_EXEC, KERNEL_IMAGE_SIZE/PMD_SIZE)
  #undef PMDS
- #undef NEXT_PAGE
  
 -      .data
 +      .align PAGE_SIZE
@@ -21052,9 +20700,9 @@ index 980053c..74d3b44 100644
 +      .fill 512,8,0
  
        __PAGE_ALIGNED_BSS
-       .align PAGE_SIZE
+ NEXT_PAGE(empty_zero_page)
 diff --git a/arch/x86/kernel/i386_ksyms_32.c b/arch/x86/kernel/i386_ksyms_32.c
-index 9c3bd4a..e1d9b35 100644
+index 0fa6912..37fce70 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);
@@ -21070,7 +20718,7 @@ index 9c3bd4a..e1d9b35 100644
  
  EXPORT_SYMBOL(__get_user_1);
  EXPORT_SYMBOL(__get_user_2);
-@@ -36,3 +40,7 @@ EXPORT_SYMBOL(strstr);
+@@ -37,3 +41,7 @@ EXPORT_SYMBOL(strstr);
  
  EXPORT_SYMBOL(csum_partial);
  EXPORT_SYMBOL(empty_zero_page);
@@ -21092,9 +20740,18 @@ index 245a71d..89d9ce4 100644
  
  /*
 diff --git a/arch/x86/kernel/i8259.c b/arch/x86/kernel/i8259.c
-index 9a5c460..b332a4b 100644
+index 9a5c460..84868423 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)
+ static void make_8259A_irq(unsigned int irq)
+ {
+       disable_irq_nosync(irq);
+-      io_apic_irqs &= ~(1<<irq);
++      io_apic_irqs &= ~(1UL<<irq);
+       irq_set_chip_and_handler_name(irq, &i8259A_chip, handle_level_irq,
+                                     i8259A_chip.name);
+       enable_irq(irq);
 @@ -209,7 +209,7 @@ spurious_8259A_irq:
                               "spurious 8259A interrupt: IRQ%d.\n", irq);
                        spurious_irq_mask |= irqmask;
@@ -21137,7 +20794,7 @@ index a979b5b..1d6db75 100644
                .callback       = dmi_io_delay_0xed_port,
                .ident          = "Compaq Presario V6000",
 diff --git a/arch/x86/kernel/ioport.c b/arch/x86/kernel/ioport.c
-index 8c96897..be66bfa 100644
+index 4ddaf66..6292f4e 100644
 --- a/arch/x86/kernel/ioport.c
 +++ b/arch/x86/kernel/ioport.c
 @@ -6,6 +6,7 @@
@@ -21170,7 +20827,7 @@ index 8c96897..be66bfa 100644
  
        if (turn_on)
                bitmap_clear(t->io_bitmap_ptr, from, num);
-@@ -102,6 +109,12 @@ long sys_iopl(unsigned int level, struct pt_regs *regs)
+@@ -103,6 +110,12 @@ SYSCALL_DEFINE1(iopl, unsigned int, level)
                return -EINVAL;
        /* Trying to gain more privileges? */
        if (level > old) {
@@ -21184,7 +20841,7 @@ index 8c96897..be66bfa 100644
                        return -EPERM;
        }
 diff --git a/arch/x86/kernel/irq.c b/arch/x86/kernel/irq.c
-index e4595f1..ee3bfb8 100644
+index 84b7789..e65e8be 100644
 --- a/arch/x86/kernel/irq.c
 +++ b/arch/x86/kernel/irq.c
 @@ -18,7 +18,7 @@
@@ -21208,19 +20865,15 @@ index e4595f1..ee3bfb8 100644
  #endif
        return 0;
  }
-@@ -164,10 +164,10 @@ u64 arch_irq_stat_cpu(unsigned int cpu)
+@@ -164,7 +164,7 @@ u64 arch_irq_stat_cpu(unsigned int cpu)
  
  u64 arch_irq_stat(void)
  {
 -      u64 sum = atomic_read(&irq_err_count);
 +      u64 sum = atomic_read_unchecked(&irq_err_count);
- #ifdef CONFIG_X86_IO_APIC
--      sum += atomic_read(&irq_mis_count);
-+      sum += atomic_read_unchecked(&irq_mis_count);
- #endif
        return sum;
  }
 diff --git a/arch/x86/kernel/irq_32.c b/arch/x86/kernel/irq_32.c
 index 344faf8..355f60d 100644
 --- a/arch/x86/kernel/irq_32.c
@@ -21490,64 +21143,13 @@ index 836f832..a8bda67 100644
                                  (char *)bpt->saved_instr, BREAK_INSTR_SIZE);
  }
  
-diff --git a/arch/x86/kernel/kprobes-opt.c b/arch/x86/kernel/kprobes-opt.c
-index c5e410e..ed5a7f0 100644
---- a/arch/x86/kernel/kprobes-opt.c
-+++ b/arch/x86/kernel/kprobes-opt.c
-@@ -338,7 +338,7 @@ int __kprobes arch_prepare_optimized_kprobe(struct optimized_kprobe *op)
-        * Verify if the address gap is in 2GB range, because this uses
-        * a relative jump.
-        */
--      rel = (long)op->optinsn.insn - (long)op->kp.addr + RELATIVEJUMP_SIZE;
-+      rel = (long)op->optinsn.insn - ktla_ktva((long)op->kp.addr) + RELATIVEJUMP_SIZE;
-       if (abs(rel) > 0x7fffffff)
-               return -ERANGE;
-@@ -353,16 +353,16 @@ int __kprobes arch_prepare_optimized_kprobe(struct optimized_kprobe *op)
-       op->optinsn.size = ret;
-       /* Copy arch-dep-instance from template */
--      memcpy(buf, &optprobe_template_entry, TMPL_END_IDX);
-+      memcpy(buf, ktla_ktva(&optprobe_template_entry), TMPL_END_IDX);
-       /* Set probe information */
-       synthesize_set_arg1(buf + TMPL_MOVE_IDX, (unsigned long)op);
-       /* Set probe function call */
--      synthesize_relcall(buf + TMPL_CALL_IDX, optimized_callback);
-+      synthesize_relcall(ktva_ktla(buf) + TMPL_CALL_IDX, optimized_callback);
-       /* Set returning jmp instruction at the tail of out-of-line buffer */
--      synthesize_reljump(buf + TMPL_END_IDX + op->optinsn.size,
-+      synthesize_reljump(ktva_ktla(buf) + TMPL_END_IDX + op->optinsn.size,
-                          (u8 *)op->kp.addr + op->optinsn.size);
-       flush_icache_range((unsigned long) buf,
-@@ -385,7 +385,7 @@ static void __kprobes setup_optimize_kprobe(struct text_poke_param *tprm,
-                       ((long)op->kp.addr + RELATIVEJUMP_SIZE));
-       /* Backup instructions which will be replaced by jump address */
--      memcpy(op->optinsn.copied_insn, op->kp.addr + INT3_SIZE,
-+      memcpy(op->optinsn.copied_insn, ktla_ktva(op->kp.addr) + INT3_SIZE,
-              RELATIVE_ADDR_SIZE);
-       insn_buf[0] = RELATIVEJUMP_OPCODE;
-@@ -483,7 +483,7 @@ setup_detour_execution(struct kprobe *p, struct pt_regs *regs, int reenter)
-               /* This kprobe is really able to run optimized path. */
-               op = container_of(p, struct optimized_kprobe, kp);
-               /* Detour through copied instructions */
--              regs->ip = (unsigned long)op->optinsn.insn + TMPL_END_IDX;
-+              regs->ip = ktva_ktla((unsigned long)op->optinsn.insn) + TMPL_END_IDX;
-               if (!reenter)
-                       reset_current_kprobe();
-               preempt_enable_no_resched();
-diff --git a/arch/x86/kernel/kprobes.c b/arch/x86/kernel/kprobes.c
-index 57916c0..9e0b9d0 100644
---- a/arch/x86/kernel/kprobes.c
-+++ b/arch/x86/kernel/kprobes.c
+diff --git a/arch/x86/kernel/kprobes/core.c b/arch/x86/kernel/kprobes/core.c
+index 7bfe318..383d238 100644
+--- a/arch/x86/kernel/kprobes/core.c
++++ b/arch/x86/kernel/kprobes/core.c
 @@ -119,9 +119,12 @@ static void __kprobes __synthesize_relative_insn(void *from, void *to, u8 op)
                s32 raddr;
-       } __attribute__((packed)) *insn;
+       } __packed *insn;
  
 -      insn = (struct __arch_relative_insn *)from;
 +      insn = (struct __arch_relative_insn *)ktla_ktva(from);
@@ -21600,7 +21202,7 @@ index 57916c0..9e0b9d0 100644
        }
  #endif
        return insn.length;
-@@ -485,7 +492,7 @@ setup_singlestep(struct kprobe *p, struct pt_regs *regs, struct kprobe_ctlblk *k
+@@ -488,7 +495,7 @@ setup_singlestep(struct kprobe *p, struct pt_regs *regs, struct kprobe_ctlblk *k
                 * nor set current_kprobe, because it doesn't use single
                 * stepping.
                 */
@@ -21609,7 +21211,7 @@ index 57916c0..9e0b9d0 100644
                preempt_enable_no_resched();
                return;
        }
-@@ -502,9 +509,9 @@ setup_singlestep(struct kprobe *p, struct pt_regs *regs, struct kprobe_ctlblk *k
+@@ -505,9 +512,9 @@ setup_singlestep(struct kprobe *p, struct pt_regs *regs, struct kprobe_ctlblk *k
        regs->flags &= ~X86_EFLAGS_IF;
        /* single step inline if the instruction is an int3 */
        if (p->opcode == BREAKPOINT_INSTRUCTION)
@@ -21621,7 +21223,7 @@ index 57916c0..9e0b9d0 100644
  }
  
  /*
-@@ -600,7 +607,7 @@ static int __kprobes kprobe_handler(struct pt_regs *regs)
+@@ -586,7 +593,7 @@ static int __kprobes kprobe_handler(struct pt_regs *regs)
                                setup_singlestep(p, regs, kcb, 0);
                        return 1;
                }
@@ -21630,7 +21232,7 @@ index 57916c0..9e0b9d0 100644
                /*
                 * The breakpoint instruction was removed right
                 * after we hit it.  Another cpu has removed
-@@ -651,6 +658,9 @@ static void __used __kprobes kretprobe_trampoline_holder(void)
+@@ -632,6 +639,9 @@ static void __used __kprobes kretprobe_trampoline_holder(void)
                        "       movq %rax, 152(%rsp)\n"
                        RESTORE_REGS_STRING
                        "       popfq\n"
@@ -21640,7 +21242,7 @@ index 57916c0..9e0b9d0 100644
  #else
                        "       pushf\n"
                        SAVE_REGS_STRING
-@@ -788,7 +798,7 @@ static void __kprobes
+@@ -769,7 +779,7 @@ static void __kprobes
  resume_execution(struct kprobe *p, struct pt_regs *regs, struct kprobe_ctlblk *kcb)
  {
        unsigned long *tos = stack_addr(regs);
@@ -21649,7 +21251,7 @@ index 57916c0..9e0b9d0 100644
        unsigned long orig_ip = (unsigned long)p->addr;
        kprobe_opcode_t *insn = p->ainsn.insn;
  
-@@ -970,7 +980,7 @@ kprobe_exceptions_notify(struct notifier_block *self, unsigned long val, void *d
+@@ -951,7 +961,7 @@ kprobe_exceptions_notify(struct notifier_block *self, unsigned long val, void *d
        struct die_args *args = data;
        int ret = NOTIFY_DONE;
  
@@ -21658,11 +21260,80 @@ index 57916c0..9e0b9d0 100644
                return ret;
  
        switch (val) {
+diff --git a/arch/x86/kernel/kprobes/opt.c b/arch/x86/kernel/kprobes/opt.c
+index 76dc6f0..66bdfc3 100644
+--- a/arch/x86/kernel/kprobes/opt.c
++++ b/arch/x86/kernel/kprobes/opt.c
+@@ -79,6 +79,7 @@ found:
+ /* Insert a move instruction which sets a pointer to eax/rdi (1st arg). */
+ static void __kprobes synthesize_set_arg1(kprobe_opcode_t *addr, unsigned long val)
+ {
++      pax_open_kernel();
+ #ifdef CONFIG_X86_64
+       *addr++ = 0x48;
+       *addr++ = 0xbf;
+@@ -86,6 +87,7 @@ static void __kprobes synthesize_set_arg1(kprobe_opcode_t *addr, unsigned long v
+       *addr++ = 0xb8;
+ #endif
+       *(unsigned long *)addr = val;
++      pax_close_kernel();
+ }
+ static void __used __kprobes kprobes_optinsn_template_holder(void)
+@@ -338,7 +340,7 @@ int __kprobes arch_prepare_optimized_kprobe(struct optimized_kprobe *op)
+        * Verify if the address gap is in 2GB range, because this uses
+        * a relative jump.
+        */
+-      rel = (long)op->optinsn.insn - (long)op->kp.addr + RELATIVEJUMP_SIZE;
++      rel = (long)op->optinsn.insn - ktla_ktva((long)op->kp.addr) + RELATIVEJUMP_SIZE;
+       if (abs(rel) > 0x7fffffff)
+               return -ERANGE;
+@@ -353,16 +355,18 @@ int __kprobes arch_prepare_optimized_kprobe(struct optimized_kprobe *op)
+       op->optinsn.size = ret;
+       /* Copy arch-dep-instance from template */
+-      memcpy(buf, &optprobe_template_entry, TMPL_END_IDX);
++      pax_open_kernel();
++      memcpy(buf, ktla_ktva(&optprobe_template_entry), TMPL_END_IDX);
++      pax_close_kernel();
+       /* Set probe information */
+       synthesize_set_arg1(buf + TMPL_MOVE_IDX, (unsigned long)op);
+       /* Set probe function call */
+-      synthesize_relcall(buf + TMPL_CALL_IDX, optimized_callback);
++      synthesize_relcall(ktva_ktla(buf) + TMPL_CALL_IDX, optimized_callback);
+       /* Set returning jmp instruction at the tail of out-of-line buffer */
+-      synthesize_reljump(buf + TMPL_END_IDX + op->optinsn.size,
++      synthesize_reljump(ktva_ktla(buf) + TMPL_END_IDX + op->optinsn.size,
+                          (u8 *)op->kp.addr + op->optinsn.size);
+       flush_icache_range((unsigned long) buf,
+@@ -385,7 +389,7 @@ static void __kprobes setup_optimize_kprobe(struct text_poke_param *tprm,
+                       ((long)op->kp.addr + RELATIVEJUMP_SIZE));
+       /* Backup instructions which will be replaced by jump address */
+-      memcpy(op->optinsn.copied_insn, op->kp.addr + INT3_SIZE,
++      memcpy(op->optinsn.copied_insn, ktla_ktva(op->kp.addr) + INT3_SIZE,
+              RELATIVE_ADDR_SIZE);
+       insn_buf[0] = RELATIVEJUMP_OPCODE;
+@@ -483,7 +487,7 @@ setup_detour_execution(struct kprobe *p, struct pt_regs *regs, int reenter)
+               /* This kprobe is really able to run optimized path. */
+               op = container_of(p, struct optimized_kprobe, kp);
+               /* Detour through copied instructions */
+-              regs->ip = (unsigned long)op->optinsn.insn + TMPL_END_IDX;
++              regs->ip = ktva_ktla((unsigned long)op->optinsn.insn) + TMPL_END_IDX;
+               if (!reenter)
+                       reset_current_kprobe();
+               preempt_enable_no_resched();
 diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c
-index 9c2bd8b..bb1131c 100644
+index b686a90..60d36fb 100644
 --- a/arch/x86/kernel/kvm.c
 +++ b/arch/x86/kernel/kvm.c
-@@ -452,7 +452,7 @@ static int __cpuinit kvm_cpu_notify(struct notifier_block *self,
+@@ -453,7 +453,7 @@ static int __cpuinit kvm_cpu_notify(struct notifier_block *self,
        return NOTIFY_OK;
  }
  
@@ -21771,10 +21442,10 @@ index 5b19e4d..6476a76 100644
        relocate_kernel_ptr = control_page;
        page_list[PA_CONTROL_PAGE] = __pa(control_page);
 diff --git a/arch/x86/kernel/microcode_core.c b/arch/x86/kernel/microcode_core.c
-index 3a04b22..1d2eb09 100644
+index 22db92b..d546bec 100644
 --- a/arch/x86/kernel/microcode_core.c
 +++ b/arch/x86/kernel/microcode_core.c
-@@ -512,7 +512,7 @@ mc_cpu_callback(struct notifier_block *nb, unsigned long action, void *hcpu)
+@@ -513,7 +513,7 @@ mc_cpu_callback(struct notifier_block *nb, unsigned long action, void *hcpu)
        return NOTIFY_OK;
  }
  
@@ -21784,10 +21455,10 @@ index 3a04b22..1d2eb09 100644
  };
  
 diff --git a/arch/x86/kernel/microcode_intel.c b/arch/x86/kernel/microcode_intel.c
-index 3544aed..01ddc1c 100644
+index 5fb2ceb..3ae90bb 100644
 --- a/arch/x86/kernel/microcode_intel.c
 +++ b/arch/x86/kernel/microcode_intel.c
-@@ -431,13 +431,13 @@ static enum ucode_state request_microcode_fw(int cpu, struct device *device,
+@@ -293,13 +293,13 @@ static enum ucode_state request_microcode_fw(int cpu, struct device *device,
  
  static int get_ucode_user(void *to, const void *from, size_t n)
  {
@@ -21941,10 +21612,10 @@ 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 4929502..686c291 100644
+index ce13049..e2e9c3c 100644
 --- a/arch/x86/kernel/msr.c
 +++ b/arch/x86/kernel/msr.c
-@@ -234,7 +234,7 @@ static int __cpuinit msr_class_cpu_callback(struct notifier_block *nfb,
+@@ -233,7 +233,7 @@ static int __cpuinit msr_class_cpu_callback(struct notifier_block *nfb,
        return notifier_from_errno(err);
  }
  
@@ -21954,7 +21625,7 @@ index 4929502..686c291 100644
  };
  
 diff --git a/arch/x86/kernel/nmi.c b/arch/x86/kernel/nmi.c
-index f84f5c5..f404e81 100644
+index 6030805..2d33f21 100644
 --- a/arch/x86/kernel/nmi.c
 +++ b/arch/x86/kernel/nmi.c
 @@ -105,7 +105,7 @@ static int __kprobes nmi_handle(unsigned int type, struct pt_regs *regs, bool b2
@@ -22041,7 +21712,7 @@ index 676b8c7..870ba04 100644
        .spin_is_locked = __ticket_spin_is_locked,
        .spin_is_contended = __ticket_spin_is_contended,
 diff --git a/arch/x86/kernel/paravirt.c b/arch/x86/kernel/paravirt.c
-index 17fff18..5cfa0f4 100644
+index 8bfb335..c1463c6 100644
 --- a/arch/x86/kernel/paravirt.c
 +++ b/arch/x86/kernel/paravirt.c
 @@ -55,6 +55,9 @@ u64 _paravirt_ident_64(u64 x)
@@ -22086,8 +21757,8 @@ index 17fff18..5cfa0f4 100644
  
        return insn_len;
  }
-@@ -304,7 +311,7 @@ void arch_flush_lazy_mmu_mode(void)
-       preempt_enable();
+@@ -304,7 +311,7 @@ enum paravirt_lazy_mode paravirt_get_lazy_mode(void)
+       return this_cpu_read(paravirt_lazy_mode);
  }
  
 -struct pv_info pv_info = {
@@ -22162,7 +21833,7 @@ index 17fff18..5cfa0f4 100644
  #endif
  #endif /* PAGETABLE_LEVELS >= 3 */
  
-@@ -478,6 +491,12 @@ struct pv_mmu_ops pv_mmu_ops = {
+@@ -479,6 +492,12 @@ struct pv_mmu_ops pv_mmu_ops = {
        },
  
        .set_fixmap = native_set_fixmap,
@@ -22175,6 +21846,19 @@ index 17fff18..5cfa0f4 100644
  };
  
  EXPORT_SYMBOL_GPL(pv_time_ops);
+diff --git a/arch/x86/kernel/pci-calgary_64.c b/arch/x86/kernel/pci-calgary_64.c
+index 299d493..2ccb0ee 100644
+--- a/arch/x86/kernel/pci-calgary_64.c
++++ b/arch/x86/kernel/pci-calgary_64.c
+@@ -1339,7 +1339,7 @@ static void __init get_tce_space_from_tar(void)
+                       tce_space = be64_to_cpu(readq(target));
+                       tce_space = tce_space & TAR_SW_BITS;
+-                      tce_space = tce_space & (~specified_table_size);
++                      tce_space = tce_space & (~(unsigned long)specified_table_size);
+                       info->tce_space = (u64 *)__va(tce_space);
+               }
+       }
 diff --git a/arch/x86/kernel/pci-iommu_table.c b/arch/x86/kernel/pci-iommu_table.c
 index 35ccf75..7a15747 100644
 --- a/arch/x86/kernel/pci-iommu_table.c
@@ -22202,7 +21886,7 @@ index 6c483ba..d10ce2f 100644
  
  static struct dma_map_ops swiotlb_dma_ops = {
 diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c
-index 2ed787f..f70c9f6 100644
+index 14ae100..752a4f6 100644
 --- a/arch/x86/kernel/process.c
 +++ b/arch/x86/kernel/process.c
 @@ -36,7 +36,8 @@
@@ -22252,7 +21936,7 @@ index 2ed787f..f70c9f6 100644
        flush_ptrace_hw_breakpoint(tsk);
        memset(tsk->thread.tls_array, 0, sizeof(tsk->thread.tls_array));
        drop_init_fpu(tsk);
-@@ -301,7 +305,7 @@ static void __exit_idle(void)
+@@ -295,7 +299,7 @@ static void __exit_idle(void)
  void exit_idle(void)
  {
        /* idle loop has pid 0 */
@@ -22261,16 +21945,16 @@ index 2ed787f..f70c9f6 100644
                return;
        __exit_idle();
  }
-@@ -404,7 +408,7 @@ bool set_pm_idle_to_default(void)
+@@ -398,7 +402,7 @@ bool xen_set_default_idle(void)
        return ret;
  }
+ #endif
 -void stop_this_cpu(void *dummy)
 +__noreturn void stop_this_cpu(void *dummy)
  {
        local_irq_disable();
        /*
-@@ -632,16 +636,37 @@ static int __init idle_setup(char *str)
+@@ -544,16 +548,37 @@ static int __init idle_setup(char *str)
  }
  early_param("idle", idle_setup);
  
@@ -22426,7 +22110,7 @@ index b5a8905..d9cacac 100644
  }
 -
 diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c
-index 6e68a61..955a9a5 100644
+index 0f49677..fcbf88c 100644
 --- a/arch/x86/kernel/process_64.c
 +++ b/arch/x86/kernel/process_64.c
 @@ -152,10 +152,11 @@ int copy_thread(unsigned long clone_flags, unsigned long sp,
@@ -22480,7 +22164,7 @@ index 6e68a61..955a9a5 100644
                ip = *(u64 *)(fp+8);
                if (!in_sched_functions(ip))
 diff --git a/arch/x86/kernel/ptrace.c b/arch/x86/kernel/ptrace.c
-index b629bbe..0fa615a 100644
+index 29a8120..a50b5ee 100644
 --- a/arch/x86/kernel/ptrace.c
 +++ b/arch/x86/kernel/ptrace.c
 @@ -184,14 +184,13 @@ unsigned long kernel_stack_pointer(struct pt_regs *regs)
@@ -22780,10 +22464,18 @@ index 7a6f3b3..bed145d7 100644
  
  1:
 diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
-index 8b24289..d37b58b 100644
+index fae9134..b7d4a57 100644
 --- a/arch/x86/kernel/setup.c
 +++ b/arch/x86/kernel/setup.c
-@@ -437,7 +437,7 @@ static void __init parse_setup_data(void)
+@@ -111,6 +111,7 @@
+ #include <asm/mce.h>
+ #include <asm/alternative.h>
+ #include <asm/prom.h>
++#include <asm/boot.h>
+ /*
+  * max_low_pfn_mapped: highest direct mapped pfn under 4GB
+@@ -447,7 +448,7 @@ static void __init parse_setup_data(void)
  
                switch (data->type) {
                case SETUP_E820_EXT:
@@ -22792,7 +22484,7 @@ index 8b24289..d37b58b 100644
                        break;
                case SETUP_DTB:
                        add_dtb(pa_data);
-@@ -706,7 +706,7 @@ static void __init trim_bios_range(void)
+@@ -774,7 +775,7 @@ static void __init trim_bios_range(void)
         * area (640->1Mb) as ram even though it is not.
         * take them out.
         */
@@ -22801,7 +22493,20 @@ index 8b24289..d37b58b 100644
  
        sanitize_e820_map(e820.map, ARRAY_SIZE(e820.map), &e820.nr_map);
  }
-@@ -830,14 +830,14 @@ void __init setup_arch(char **cmdline_p)
+@@ -844,8 +845,12 @@ static void __init trim_low_memory_range(void)
+ void __init setup_arch(char **cmdline_p)
+ {
++#ifdef CONFIG_X86_32
++      memblock_reserve(LOAD_PHYSICAL_ADDR, __pa_symbol(__bss_stop) - ____LOAD_PHYSICAL_ADDR);
++#else
+       memblock_reserve(__pa_symbol(_text),
+                        (unsigned long)__bss_stop - (unsigned long)_text);
++#endif
+       early_reserve_initrd();
+@@ -937,14 +942,14 @@ void __init setup_arch(char **cmdline_p)
  
        if (!boot_params.hdr.root_flags)
                root_mountflags &= ~MS_RDONLY;
@@ -22812,15 +22517,15 @@ index 8b24289..d37b58b 100644
        init_mm.end_data = (unsigned long) _edata;
        init_mm.brk = _brk_end;
  
--      code_resource.start = virt_to_phys(_text);
--      code_resource.end = virt_to_phys(_etext)-1;
--      data_resource.start = virt_to_phys(_etext);
-+      code_resource.start = virt_to_phys(ktla_ktva(_text));
-+      code_resource.end = virt_to_phys(ktla_ktva(_etext))-1;
-+      data_resource.start = virt_to_phys(_sdata);
-       data_resource.end = virt_to_phys(_edata)-1;
-       bss_resource.start = virt_to_phys(&__bss_start);
-       bss_resource.end = virt_to_phys(&__bss_stop)-1;
+-      code_resource.start = __pa_symbol(_text);
+-      code_resource.end = __pa_symbol(_etext)-1;
+-      data_resource.start = __pa_symbol(_etext);
++      code_resource.start = __pa_symbol(ktla_ktva(_text));
++      code_resource.end = __pa_symbol(ktla_ktva(_etext))-1;
++      data_resource.start = __pa_symbol(_sdata);
+       data_resource.end = __pa_symbol(_edata)-1;
+       bss_resource.start = __pa_symbol(__bss_start);
+       bss_resource.end = __pa_symbol(__bss_stop)-1;
 diff --git a/arch/x86/kernel/setup_percpu.c b/arch/x86/kernel/setup_percpu.c
 index 5cdff03..80fa283 100644
 --- a/arch/x86/kernel/setup_percpu.c
@@ -22898,7 +22603,7 @@ index 5cdff03..80fa283 100644
                 * Up to this point, the boot CPU has been using .init.data
                 * area.  Reload any changed state for the boot CPU.
 diff --git a/arch/x86/kernel/signal.c b/arch/x86/kernel/signal.c
-index d6bf1f3..3ffce5a 100644
+index 6956299..f20beae 100644
 --- a/arch/x86/kernel/signal.c
 +++ b/arch/x86/kernel/signal.c
 @@ -196,7 +196,7 @@ static unsigned long align_sigframe(unsigned long sp)
@@ -22910,7 +22615,7 @@ index d6bf1f3..3ffce5a 100644
  #else /* !CONFIG_X86_32 */
        sp = round_down(sp, 16) - 8;
  #endif
-@@ -304,9 +304,9 @@ __setup_frame(int sig, struct k_sigaction *ka, sigset_t *set,
+@@ -304,9 +304,9 @@ __setup_frame(int sig, struct ksignal *ksig, sigset_t *set,
        }
  
        if (current->mm->context.vdso)
@@ -22919,10 +22624,10 @@ index d6bf1f3..3ffce5a 100644
        else
 -              restorer = &frame->retcode;
 +              restorer = (void __user *)&frame->retcode;
-       if (ka->sa.sa_flags & SA_RESTORER)
-               restorer = ka->sa.sa_restorer;
+       if (ksig->ka.sa.sa_flags & SA_RESTORER)
+               restorer = ksig->ka.sa.sa_restorer;
  
-@@ -320,7 +320,7 @@ __setup_frame(int sig, struct k_sigaction *ka, sigset_t *set,
+@@ -320,7 +320,7 @@ __setup_frame(int sig, struct ksignal *ksig, sigset_t *set,
         * reasons and because gdb uses it as a signature to notice
         * signal handler stack frames.
         */
@@ -22931,7 +22636,7 @@ index d6bf1f3..3ffce5a 100644
  
        if (err)
                return -EFAULT;
-@@ -367,7 +367,10 @@ static int __setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
+@@ -367,7 +367,10 @@ static int __setup_rt_frame(int sig, struct ksignal *ksig,
                err |= __save_altstack(&frame->uc.uc_stack, regs->sp);
  
                /* Set up to return from userspace.  */
@@ -22939,11 +22644,11 @@ index d6bf1f3..3ffce5a 100644
 +              if (current->mm->context.vdso)
 +                      restorer = (__force void __user *)VDSO32_SYMBOL(current->mm->context.vdso, rt_sigreturn);
 +              else
-+                      restorer = (void __user *)&frame->retcode;
-               if (ka->sa.sa_flags & SA_RESTORER)
-                       restorer = ka->sa.sa_restorer;
++              restorer = (void __user *)&frame->retcode;
+               if (ksig->ka.sa.sa_flags & SA_RESTORER)
+                       restorer = ksig->ka.sa.sa_restorer;
                put_user_ex(restorer, &frame->pretcode);
-@@ -379,7 +382,7 @@ static int __setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
+@@ -379,7 +382,7 @@ static int __setup_rt_frame(int sig, struct ksignal *ksig,
                 * reasons and because gdb uses it as a signature to notice
                 * signal handler stack frames.
                 */
@@ -22951,7 +22656,30 @@ index d6bf1f3..3ffce5a 100644
 +              put_user_ex(*((u64 *)&rt_retcode), (u64 __user *)frame->retcode);
        } put_user_catch(err);
        
-       err |= copy_siginfo_to_user(&frame->info, info);
+       err |= copy_siginfo_to_user(&frame->info, &ksig->info);
+@@ -615,7 +618,12 @@ setup_rt_frame(struct ksignal *ksig, struct pt_regs *regs)
+ {
+       int usig = signr_convert(ksig->sig);
+       sigset_t *set = sigmask_to_save();
+-      compat_sigset_t *cset = (compat_sigset_t *) set;
++      sigset_t sigcopy;
++      compat_sigset_t *cset;
++
++      sigcopy = *set;
++
++      cset = (compat_sigset_t *) &sigcopy;
+       /* Set up the stack frame */
+       if (is_ia32_frame()) {
+@@ -626,7 +634,7 @@ setup_rt_frame(struct ksignal *ksig, struct pt_regs *regs)
+       } else if (is_x32_frame()) {
+               return x32_setup_rt_frame(ksig, cset, regs);
+       } else {
+-              return __setup_rt_frame(ksig->sig, ksig, set, regs);
++              return __setup_rt_frame(ksig->sig, ksig, &sigcopy, regs);
+       }
+ }
 diff --git a/arch/x86/kernel/smp.c b/arch/x86/kernel/smp.c
 index 48d2b7d..90d328a 100644
 --- a/arch/x86/kernel/smp.c
@@ -22966,7 +22694,7 @@ index 48d2b7d..90d328a 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 ed0fe38..87fc692 100644
+index 9f190a2..90a0688 100644
 --- a/arch/x86/kernel/smpboot.c
 +++ b/arch/x86/kernel/smpboot.c
 @@ -748,6 +748,7 @@ static int __cpuinit do_boot_cpu(int apicid, int cpu, struct task_struct *idle)
@@ -23304,7 +23032,7 @@ index 0000000..207bec6
 +      return addr;
 +}
 diff --git a/arch/x86/kernel/sys_x86_64.c b/arch/x86/kernel/sys_x86_64.c
-index 97ef74b..57a1882 100644
+index dbded5a..ace2781 100644
 --- a/arch/x86/kernel/sys_x86_64.c
 +++ b/arch/x86/kernel/sys_x86_64.c
 @@ -81,8 +81,8 @@ out:
@@ -23355,7 +23083,23 @@ index 97ef74b..57a1882 100644
                        return addr;
        }
  
-@@ -161,6 +165,10 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
+@@ -137,6 +141,7 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
+       info.high_limit = end;
+       info.align_mask = filp ? get_align_mask() : 0;
+       info.align_offset = pgoff << PAGE_SHIFT;
++      info.threadstack_offset = offset;
+       return vm_unmapped_area(&info);
+ }
+@@ -149,6 +154,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
+       struct mm_struct *mm = current->mm;
+       unsigned long addr = addr0;
+       struct vm_unmapped_area_info info;
++      unsigned long offset = gr_rand_threadstack_offset(mm, filp, flags);
+       /* requested length too big for entire address space */
+       if (len > TASK_SIZE)
+@@ -161,12 +167,15 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
        if (!test_thread_flag(TIF_ADDR32) && (flags & MAP_32BIT))
                goto bottomup;
  
@@ -23366,6 +23110,21 @@ index 97ef74b..57a1882 100644
        /* requesting a specific address */
        if (addr) {
                addr = PAGE_ALIGN(addr);
+               vma = find_vma(mm, addr);
+-              if (TASK_SIZE - len >= addr &&
+-                              (!vma || addr + len <= vma->vm_start))
++              if (TASK_SIZE - len >= addr && check_heap_stack_gap(vma, addr, len, offset))
+                       return addr;
+       }
+@@ -176,6 +185,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
+       info.high_limit = mm->mmap_base;
+       info.align_mask = filp ? get_align_mask() : 0;
+       info.align_offset = pgoff << PAGE_SHIFT;
++      info.threadstack_offset = offset;
+       addr = vm_unmapped_area(&info);
+       if (!(addr & ~PAGE_MASK))
+               return addr;
 diff --git a/arch/x86/kernel/tboot.c b/arch/x86/kernel/tboot.c
 index f84fe00..f41d9f1 100644
 --- a/arch/x86/kernel/tboot.c
@@ -23486,7 +23245,7 @@ index 9d9d2f9..cad418a 100644
        else
                info = infobuf;
 diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c
-index ecffca1..95c4d13 100644
+index 68bda7a..3ec7bb7 100644
 --- a/arch/x86/kernel/traps.c
 +++ b/arch/x86/kernel/traps.c
 @@ -68,12 +68,6 @@
@@ -23642,7 +23401,7 @@ index ecffca1..95c4d13 100644
                if (!fixup_exception(regs)) {
                        task->thread.error_code = error_code;
 diff --git a/arch/x86/kernel/uprobes.c b/arch/x86/kernel/uprobes.c
-index c71025b..b117501 100644
+index 0ba4cfb..4596bec 100644
 --- a/arch/x86/kernel/uprobes.c
 +++ b/arch/x86/kernel/uprobes.c
 @@ -629,7 +629,7 @@ int arch_uprobe_exception_notify(struct notifier_block *self, unsigned long val,
@@ -23667,7 +23426,7 @@ index b9242ba..50c5edd 100644
   *    verify_cpu, returns the status of longmode and SSE in register %eax.
   *            0: Success    1: Failure
 diff --git a/arch/x86/kernel/vm86_32.c b/arch/x86/kernel/vm86_32.c
-index 1dfe69c..a3df6f6 100644
+index 1cf5766..c0d9de7 100644
 --- a/arch/x86/kernel/vm86_32.c
 +++ b/arch/x86/kernel/vm86_32.c
 @@ -43,6 +43,7 @@
@@ -23687,7 +23446,7 @@ index 1dfe69c..a3df6f6 100644
        current->thread.sp0 = current->thread.saved_sp0;
        current->thread.sysenter_cs = __KERNEL_CS;
        load_sp0(tss, &current->thread);
-@@ -212,6 +213,13 @@ int sys_vm86old(struct vm86_struct __user *v86, struct pt_regs *regs)
+@@ -212,6 +213,13 @@ int sys_vm86old(struct vm86_struct __user *v86)
        struct task_struct *tsk;
        int tmp, ret = -EPERM;
  
@@ -23701,7 +23460,7 @@ index 1dfe69c..a3df6f6 100644
        tsk = current;
        if (tsk->thread.saved_sp0)
                goto out;
-@@ -242,6 +250,14 @@ int sys_vm86(unsigned long cmd, unsigned long arg, struct pt_regs *regs)
+@@ -242,6 +250,14 @@ int sys_vm86(unsigned long cmd, unsigned long arg)
        int tmp, ret;
        struct vm86plus_struct __user *v86;
  
@@ -24043,7 +23802,7 @@ index 9a907a6..f83f921 100644
                     (unsigned long)VSYSCALL_START);
  
 diff --git a/arch/x86/kernel/x8664_ksyms_64.c b/arch/x86/kernel/x8664_ksyms_64.c
-index 1330dd1..d220b99 100644
+index b014d94..6d6ca7b 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);
@@ -24056,10 +23815,10 @@ index 1330dd1..d220b99 100644
  EXPORT_SYMBOL(copy_page);
  EXPORT_SYMBOL(clear_page);
 diff --git a/arch/x86/kernel/x86_init.c b/arch/x86/kernel/x86_init.c
-index 7a3d075..6cb373d 100644
+index 45a14db..075bb9b 100644
 --- a/arch/x86/kernel/x86_init.c
 +++ b/arch/x86/kernel/x86_init.c
-@@ -88,7 +88,7 @@ struct x86_init_ops x86_init __initdata = {
+@@ -85,7 +85,7 @@ struct x86_init_ops x86_init __initdata = {
        },
  };
  
@@ -24068,7 +23827,7 @@ index 7a3d075..6cb373d 100644
        .early_percpu_clock_init        = x86_init_noop,
        .setup_percpu_clockev           = setup_secondary_APIC_clock,
  };
-@@ -96,7 +96,7 @@ struct x86_cpuinit_ops x86_cpuinit __cpuinitdata = {
+@@ -93,7 +93,7 @@ struct x86_cpuinit_ops x86_cpuinit __cpuinitdata = {
  static void default_nmi_init(void) { };
  static int default_i8042_detect(void) { return 1; };
  
@@ -24077,23 +23836,24 @@ index 7a3d075..6cb373d 100644
        .calibrate_tsc                  = native_calibrate_tsc,
        .get_wallclock                  = mach_get_cmos_time,
        .set_wallclock                  = mach_set_rtc_mmss,
-@@ -110,14 +110,14 @@ struct x86_platform_ops x86_platform = {
+@@ -107,7 +107,7 @@ struct x86_platform_ops x86_platform = {
  };
  
  EXPORT_SYMBOL_GPL(x86_platform);
 -struct x86_msi_ops x86_msi = {
 +struct x86_msi_ops x86_msi __read_only = {
-       .setup_msi_irqs = native_setup_msi_irqs,
-       .teardown_msi_irq = native_teardown_msi_irq,
-       .teardown_msi_irqs = default_teardown_msi_irqs,
-       .restore_msi_irqs = default_restore_msi_irqs,
+       .setup_msi_irqs         = native_setup_msi_irqs,
+       .compose_msi_msg        = native_compose_msi_msg,
+       .teardown_msi_irq       = native_teardown_msi_irq,
+@@ -116,7 +116,7 @@ struct x86_msi_ops x86_msi = {
+       .setup_hpet_msi         = default_setup_hpet_msi,
  };
  
 -struct x86_io_apic_ops x86_io_apic_ops = {
 +struct x86_io_apic_ops x86_io_apic_ops __read_only = {
-       .init   = native_io_apic_init_mappings,
-       .read   = native_io_apic_read,
-       .write  = native_io_apic_write,
+       .init                   = native_io_apic_init_mappings,
+       .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 ada87a3..afea76d 100644
 --- a/arch/x86/kernel/xsave.c
@@ -24166,10 +23926,10 @@ index a20ecb5..d0e2194 100644
  
  out:
 diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
-index a27e763..54bfe43 100644
+index 59622c9..f338414 100644
 --- a/arch/x86/kvm/emulate.c
 +++ b/arch/x86/kvm/emulate.c
-@@ -292,6 +292,7 @@ static void invalidate_registers(struct x86_emulate_ctxt *ctxt)
+@@ -328,6 +328,7 @@ static void invalidate_registers(struct x86_emulate_ctxt *ctxt)
  
  #define ____emulate_2op(ctxt, _op, _x, _y, _suffix, _dsttype) \
        do {                                                            \
@@ -24177,7 +23937,7 @@ index a27e763..54bfe43 100644
                __asm__ __volatile__ (                                  \
                        _PRE_EFLAGS("0", "4", "2")                      \
                        _op _suffix " %"_x"3,%1; "                      \
-@@ -306,8 +307,6 @@ static void invalidate_registers(struct x86_emulate_ctxt *ctxt)
+@@ -342,8 +343,6 @@ static void invalidate_registers(struct x86_emulate_ctxt *ctxt)
  /* Raw emulation: instruction has two explicit operands. */
  #define __emulate_2op_nobyte(ctxt,_op,_wx,_wy,_lx,_ly,_qx,_qy)                \
        do {                                                            \
@@ -24186,7 +23946,7 @@ index a27e763..54bfe43 100644
                switch ((ctxt)->dst.bytes) {                            \
                case 2:                                                 \
                        ____emulate_2op(ctxt,_op,_wx,_wy,"w",u16);      \
-@@ -323,7 +322,6 @@ static void invalidate_registers(struct x86_emulate_ctxt *ctxt)
+@@ -359,7 +358,6 @@ static void invalidate_registers(struct x86_emulate_ctxt *ctxt)
  
  #define __emulate_2op(ctxt,_op,_bx,_by,_wx,_wy,_lx,_ly,_qx,_qy)                    \
        do {                                                                 \
@@ -24195,7 +23955,7 @@ index a27e763..54bfe43 100644
                case 1:                                                      \
                        ____emulate_2op(ctxt,_op,_bx,_by,"b",u8);            \
 diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
-index 9392f52..0e56d77 100644
+index f77df1c..6f20690 100644
 --- a/arch/x86/kvm/lapic.c
 +++ b/arch/x86/kvm/lapic.c
 @@ -55,7 +55,7 @@
@@ -24208,7 +23968,7 @@ index 9392f52..0e56d77 100644
  #define APIC_LVT_NUM                  6
  /* 14 is the version for Xeon and Pentium 8.4.8*/
 diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h
-index 891eb6d..e027900 100644
+index 105dd5b..1b0ccc2 100644
 --- a/arch/x86/kvm/paging_tmpl.h
 +++ b/arch/x86/kvm/paging_tmpl.h
 @@ -208,7 +208,7 @@ retry_walk:
@@ -24221,7 +23981,7 @@ index 891eb6d..e027900 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 d29d3cd..ec9d522 100644
+index e1b1ce2..f7b4b43 100644
 --- a/arch/x86/kvm/svm.c
 +++ b/arch/x86/kvm/svm.c
 @@ -3507,7 +3507,11 @@ static void reload_tss(struct kvm_vcpu *vcpu)
@@ -24236,7 +23996,7 @@ index d29d3cd..ec9d522 100644
        load_TR_desc();
  }
  
-@@ -3881,6 +3885,10 @@ static void svm_vcpu_run(struct kvm_vcpu *vcpu)
+@@ -3901,6 +3905,10 @@ static void svm_vcpu_run(struct kvm_vcpu *vcpu)
  #endif
  #endif
  
@@ -24248,10 +24008,25 @@ index d29d3cd..ec9d522 100644
  
        local_irq_disable();
 diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
-index 9120ae1..238abc0 100644
+index 0af1807..06912bb 100644
 --- a/arch/x86/kvm/vmx.c
 +++ b/arch/x86/kvm/vmx.c
-@@ -1370,7 +1370,11 @@ static void reload_tss(void)
+@@ -1184,12 +1184,12 @@ static void vmcs_write64(unsigned long field, u64 value)
+ #endif
+ }
+-static void vmcs_clear_bits(unsigned long field, u32 mask)
++static void vmcs_clear_bits(unsigned long field, unsigned long mask)
+ {
+       vmcs_writel(field, vmcs_readl(field) & ~mask);
+ }
+-static void vmcs_set_bits(unsigned long field, u32 mask)
++static void vmcs_set_bits(unsigned long field, unsigned long mask)
+ {
+       vmcs_writel(field, vmcs_readl(field) | mask);
+ }
+@@ -1390,7 +1390,11 @@ static void reload_tss(void)
        struct desc_struct *descs;
  
        descs = (void *)gdt->address;
@@ -24263,7 +24038,7 @@ index 9120ae1..238abc0 100644
        load_TR_desc();
  }
  
-@@ -1594,6 +1598,10 @@ static void vmx_vcpu_load(struct kvm_vcpu *vcpu, int cpu)
+@@ -1614,6 +1618,10 @@ static void vmx_vcpu_load(struct kvm_vcpu *vcpu, int cpu)
                vmcs_writel(HOST_TR_BASE, kvm_read_tr_base()); /* 22.2.4 */
                vmcs_writel(HOST_GDTR_BASE, gdt->address);   /* 22.2.4 */
  
@@ -24274,7 +24049,7 @@ index 9120ae1..238abc0 100644
                rdmsrl(MSR_IA32_SYSENTER_ESP, sysenter_esp);
                vmcs_writel(HOST_IA32_SYSENTER_ESP, sysenter_esp); /* 22.2.3 */
                vmx->loaded_vmcs->cpu = cpu;
-@@ -2738,8 +2746,11 @@ static __init int hardware_setup(void)
+@@ -2779,8 +2787,11 @@ static __init int hardware_setup(void)
        if (!cpu_has_vmx_flexpriority())
                flexpriority_enabled = 0;
  
@@ -24288,7 +24063,22 @@ index 9120ae1..238abc0 100644
  
        if (enable_ept && !cpu_has_vmx_ept_2m_page())
                kvm_disable_largepages();
-@@ -3782,7 +3793,10 @@ static void vmx_set_constant_host_state(void)
+@@ -2792,10 +2803,12 @@ static __init int hardware_setup(void)
+                               !cpu_has_vmx_virtual_intr_delivery())
+               enable_apicv_reg_vid = 0;
++      pax_open_kernel();
+       if (enable_apicv_reg_vid)
+-              kvm_x86_ops->update_cr8_intercept = NULL;
++              *(void **)&kvm_x86_ops->update_cr8_intercept = NULL;
+       else
+-              kvm_x86_ops->hwapic_irr_update = NULL;
++              *(void **)&kvm_x86_ops->hwapic_irr_update = NULL;
++      pax_close_kernel();
+       if (nested)
+               nested_vmx_setup_ctls_msrs();
+@@ -3883,7 +3896,10 @@ static void vmx_set_constant_host_state(void)
  
        vmcs_writel(HOST_CR0, read_cr0() & ~X86_CR0_TS);  /* 22.2.3 */
        vmcs_writel(HOST_CR4, read_cr4());  /* 22.2.3, 22.2.5 */
@@ -24299,7 +24089,7 @@ index 9120ae1..238abc0 100644
  
        vmcs_write16(HOST_CS_SELECTOR, __KERNEL_CS);  /* 22.2.4 */
  #ifdef CONFIG_X86_64
-@@ -3803,7 +3817,7 @@ static void vmx_set_constant_host_state(void)
+@@ -3904,7 +3920,7 @@ static void vmx_set_constant_host_state(void)
        native_store_idt(&dt);
        vmcs_writel(HOST_IDTR_BASE, dt.address);   /* 22.2.4 */
  
@@ -24308,7 +24098,7 @@ index 9120ae1..238abc0 100644
  
        rdmsr(MSR_IA32_SYSENTER_CS, low32, high32);
        vmcs_write32(HOST_IA32_SYSENTER_CS, low32);
-@@ -6355,6 +6369,12 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu)
+@@ -6580,6 +6596,12 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu)
                "jmp 2f \n\t"
                "1: " __ex(ASM_VMX_VMRESUME) "\n\t"
                "2: "
@@ -24321,7 +24111,7 @@ index 9120ae1..238abc0 100644
                /* Save guest registers, load host registers, keep flags */
                "mov %0, %c[wordsize](%%" _ASM_SP ") \n\t"
                "pop %0 \n\t"
-@@ -6407,6 +6427,11 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu)
+@@ -6632,6 +6654,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))
@@ -24333,7 +24123,7 @@ index 9120ae1..238abc0 100644
              : "cc", "memory"
  #ifdef CONFIG_X86_64
                , "rax", "rbx", "rdi", "rsi"
-@@ -6420,7 +6445,7 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu)
+@@ -6645,7 +6672,7 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu)
        if (debugctlmsr)
                update_debugctlmsr(debugctlmsr);
  
@@ -24342,7 +24132,7 @@ index 9120ae1..238abc0 100644
        /*
         * The sysexit path does not restore ds/es, so we must set them to
         * a reasonable value ourselves.
-@@ -6429,8 +6454,18 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu)
+@@ -6654,8 +6681,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.
         */
@@ -24364,64 +24154,10 @@ index 9120ae1..238abc0 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 c243b81..b692af3 100644
+index e172132..c3d3e27 100644
 --- a/arch/x86/kvm/x86.c
 +++ b/arch/x86/kvm/x86.c
-@@ -1408,10 +1408,9 @@ static int kvm_guest_time_update(struct kvm_vcpu *v)
-       unsigned long flags, this_tsc_khz;
-       struct kvm_vcpu_arch *vcpu = &v->arch;
-       struct kvm_arch *ka = &v->kvm->arch;
--      void *shared_kaddr;
-       s64 kernel_ns, max_kernel_ns;
-       u64 tsc_timestamp, host_tsc;
--      struct pvclock_vcpu_time_info *guest_hv_clock;
-+      struct pvclock_vcpu_time_info guest_hv_clock;
-       u8 pvclock_flags;
-       bool use_master_clock;
-@@ -1465,7 +1464,7 @@ static int kvm_guest_time_update(struct kvm_vcpu *v)
-       local_irq_restore(flags);
--      if (!vcpu->time_page)
-+      if (!vcpu->pv_time_enabled)
-               return 0;
-       /*
-@@ -1527,12 +1526,12 @@ static int kvm_guest_time_update(struct kvm_vcpu *v)
-        */
-       vcpu->hv_clock.version += 2;
--      shared_kaddr = kmap_atomic(vcpu->time_page);
--
--      guest_hv_clock = shared_kaddr + vcpu->time_offset;
-+      if (unlikely(kvm_read_guest_cached(v->kvm, &vcpu->pv_time,
-+              &guest_hv_clock, sizeof(guest_hv_clock))))
-+              return 0;
-       /* retain PVCLOCK_GUEST_STOPPED if set in guest copy */
--      pvclock_flags = (guest_hv_clock->flags & PVCLOCK_GUEST_STOPPED);
-+      pvclock_flags = (guest_hv_clock.flags & PVCLOCK_GUEST_STOPPED);
-       if (vcpu->pvclock_set_guest_stopped_request) {
-               pvclock_flags |= PVCLOCK_GUEST_STOPPED;
-@@ -1545,12 +1544,9 @@ static int kvm_guest_time_update(struct kvm_vcpu *v)
-       vcpu->hv_clock.flags = pvclock_flags;
--      memcpy(shared_kaddr + vcpu->time_offset, &vcpu->hv_clock,
--             sizeof(vcpu->hv_clock));
--
--      kunmap_atomic(shared_kaddr);
--
--      mark_page_dirty(v->kvm, vcpu->time >> PAGE_SHIFT);
-+      kvm_write_guest_cached(v->kvm, &vcpu->pv_time,
-+                              &vcpu->hv_clock,
-+                              sizeof(vcpu->hv_clock));
-       return 0;
- }
-@@ -1692,8 +1688,8 @@ static int xen_hvm_config(struct kvm_vcpu *vcpu, u64 data)
+@@ -1686,8 +1686,8 @@ static int xen_hvm_config(struct kvm_vcpu *vcpu, u64 data)
  {
        struct kvm *kvm = vcpu->kvm;
        int lm = is_long_mode(vcpu);
@@ -24432,51 +24168,7 @@ index c243b81..b692af3 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;
-@@ -1839,10 +1835,7 @@ static int kvm_pv_enable_async_pf(struct kvm_vcpu *vcpu, u64 data)
- static void kvmclock_reset(struct kvm_vcpu *vcpu)
- {
--      if (vcpu->arch.time_page) {
--              kvm_release_page_dirty(vcpu->arch.time_page);
--              vcpu->arch.time_page = NULL;
--      }
-+      vcpu->arch.pv_time_enabled = false;
- }
- static void accumulate_steal_time(struct kvm_vcpu *vcpu)
-@@ -1948,6 +1941,7 @@ int kvm_set_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
-               break;
-       case MSR_KVM_SYSTEM_TIME_NEW:
-       case MSR_KVM_SYSTEM_TIME: {
-+              u64 gpa_offset;
-               kvmclock_reset(vcpu);
-               vcpu->arch.time = data;
-@@ -1957,14 +1951,17 @@ int kvm_set_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
-               if (!(data & 1))
-                       break;
--              /* ...but clean it before doing the actual write */
--              vcpu->arch.time_offset = data & ~(PAGE_MASK | 1);
-+              gpa_offset = data & ~(PAGE_MASK | 1);
--              vcpu->arch.time_page =
--                              gfn_to_page(vcpu->kvm, data >> PAGE_SHIFT);
-+              /* Check that the address is 32-byte aligned. */
-+              if (gpa_offset & (sizeof(struct pvclock_vcpu_time_info) - 1))
-+                      break;
--              if (is_error_page(vcpu->arch.time_page))
--                      vcpu->arch.time_page = NULL;
-+              if (kvm_gfn_to_hva_cache_init(vcpu->kvm,
-+                   &vcpu->arch.pv_time, data & ~1ULL))
-+                      vcpu->arch.pv_time_enabled = false;
-+              else
-+                      vcpu->arch.pv_time_enabled = true;
-               break;
-       }
-@@ -2571,6 +2568,8 @@ long kvm_arch_dev_ioctl(struct file *filp,
+@@ -2567,6 +2567,8 @@ long kvm_arch_dev_ioctl(struct file *filp,
                if (n < msr_list.nmsrs)
                        goto out;
                r = -EFAULT;
@@ -24485,7 +24177,7 @@ index c243b81..b692af3 100644
                if (copy_to_user(user_msr_list->indices, &msrs_to_save,
                                 num_msrs_to_save * sizeof(u32)))
                        goto out;
-@@ -2700,7 +2699,7 @@ static int kvm_vcpu_ioctl_set_lapic(struct kvm_vcpu *vcpu,
+@@ -2696,7 +2698,7 @@ static int kvm_vcpu_ioctl_set_lapic(struct kvm_vcpu *vcpu,
  static int kvm_vcpu_ioctl_interrupt(struct kvm_vcpu *vcpu,
                                    struct kvm_interrupt *irq)
  {
@@ -24494,16 +24186,7 @@ index c243b81..b692af3 100644
                return -EINVAL;
        if (irqchip_in_kernel(vcpu->kvm))
                return -ENXIO;
-@@ -2967,7 +2966,7 @@ static int kvm_vcpu_ioctl_x86_set_xcrs(struct kvm_vcpu *vcpu,
-  */
- static int kvm_set_guest_paused(struct kvm_vcpu *vcpu)
- {
--      if (!vcpu->arch.time_page)
-+      if (!vcpu->arch.pv_time_enabled)
-               return -EINVAL;
-       vcpu->arch.pvclock_set_guest_stopped_request = true;
-       kvm_make_request(KVM_REQ_CLOCK_UPDATE, vcpu);
-@@ -5213,7 +5212,7 @@ static struct notifier_block pvclock_gtod_notifier = {
+@@ -5247,7 +5249,7 @@ static struct notifier_block pvclock_gtod_notifier = {
  };
  #endif
  
@@ -24512,19 +24195,11 @@ index c243b81..b692af3 100644
  {
        int r;
        struct kvm_x86_ops *ops = (struct kvm_x86_ops *)opaque;
-@@ -6661,6 +6660,7 @@ int kvm_arch_vcpu_init(struct kvm_vcpu *vcpu)
-               goto fail_free_wbinvd_dirty_mask;
-       vcpu->arch.ia32_tsc_adjust_msr = 0x0;
-+      vcpu->arch.pv_time_enabled = false;
-       kvm_async_pf_hash_reset(vcpu);
-       kvm_pmu_init(vcpu);
 diff --git a/arch/x86/lguest/boot.c b/arch/x86/lguest/boot.c
-index df4176c..23ce092 100644
+index 7114c63..a1018fc 100644
 --- a/arch/x86/lguest/boot.c
 +++ b/arch/x86/lguest/boot.c
-@@ -1200,9 +1200,10 @@ static __init int early_put_chars(u32 vtermno, const char *buf, int count)
+@@ -1201,9 +1201,10 @@ static __init int early_put_chars(u32 vtermno, const char *buf, int count)
   * Rebooting also tells the Host we're finished, but the RESTART flag tells the
   * Launcher to reboot us.
   */
@@ -25532,7 +25207,7 @@ index a30ca15..d25fab6 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..f5f9e26 100644
+index 6a4f43c..f08b4a2 100644
 --- a/arch/x86/lib/copy_user_nocache_64.S
 +++ b/arch/x86/lib/copy_user_nocache_64.S
 @@ -8,6 +8,7 @@
@@ -25557,7 +25232,7 @@ index 6a4f43c..f5f9e26 100644
        CFI_STARTPROC
 +
 +#ifdef CONFIG_PAX_MEMORY_UDEREF
-+      mov $PAX_USER_SHADOW_BASE,%rcx
++      mov pax_user_shadow_base,%rcx
 +      cmp %rcx,%rsi
 +      jae 1f
 +      add %rcx,%rsi
@@ -25642,10 +25317,10 @@ index 25b7ae8..169fafc 100644
  }
  EXPORT_SYMBOL(csum_partial_copy_to_user);
 diff --git a/arch/x86/lib/getuser.S b/arch/x86/lib/getuser.S
-index 156b9c8..b144132 100644
+index a451235..79fb5cf 100644
 --- a/arch/x86/lib/getuser.S
 +++ b/arch/x86/lib/getuser.S
-@@ -34,17 +34,40 @@
+@@ -33,17 +33,40 @@
  #include <asm/thread_info.h>
  #include <asm/asm.h>
  #include <asm/smap.h>
@@ -25668,10 +25343,10 @@ index 156b9c8..b144132 100644
        cmp TI_addr_limit(%_ASM_DX),%_ASM_AX
        jae bad_get_user
        ASM_STAC
--1:    movzb (%_ASM_AX),%edx
+-1:    movzbl (%_ASM_AX),%edx
 +
 +#if defined(CONFIG_X86_64) && defined(CONFIG_PAX_MEMORY_UDEREF)
-+      mov $PAX_USER_SHADOW_BASE,%_ASM_DX
++      mov pax_user_shadow_base,%_ASM_DX
 +      cmp %_ASM_DX,%_ASM_AX
 +      jae 1234f
 +      add %_ASM_DX,%_ASM_AX
@@ -25680,14 +25355,14 @@ index 156b9c8..b144132 100644
 +
 +#endif
 +
-+1:    __copyuser_seg movzb (%_ASM_AX),%edx
++1:    __copyuser_seg movzbl (%_ASM_AX),%edx
        xor %eax,%eax
        ASM_CLAC
 +      pax_force_retaddr
        ret
        CFI_ENDPROC
  ENDPROC(__get_user_1)
-@@ -52,14 +75,28 @@ ENDPROC(__get_user_1)
+@@ -51,14 +74,28 @@ ENDPROC(__get_user_1)
  ENTRY(__get_user_2)
        CFI_STARTPROC
        add $1,%_ASM_AX
@@ -25701,7 +25376,7 @@ index 156b9c8..b144132 100644
 -2:    movzwl -1(%_ASM_AX),%edx
 +
 +#if defined(CONFIG_X86_64) && defined(CONFIG_PAX_MEMORY_UDEREF)
-+      mov $PAX_USER_SHADOW_BASE,%_ASM_DX
++      mov pax_user_shadow_base,%_ASM_DX
 +      cmp %_ASM_DX,%_ASM_AX
 +      jae 1234f
 +      add %_ASM_DX,%_ASM_AX
@@ -25717,7 +25392,7 @@ index 156b9c8..b144132 100644
        ret
        CFI_ENDPROC
  ENDPROC(__get_user_2)
-@@ -67,14 +104,28 @@ ENDPROC(__get_user_2)
+@@ -66,14 +103,28 @@ ENDPROC(__get_user_2)
  ENTRY(__get_user_4)
        CFI_STARTPROC
        add $3,%_ASM_AX
@@ -25728,10 +25403,10 @@ index 156b9c8..b144132 100644
        cmp TI_addr_limit(%_ASM_DX),%_ASM_AX
        jae bad_get_user
        ASM_STAC
--3:    mov -3(%_ASM_AX),%edx
+-3:    movl -3(%_ASM_AX),%edx
 +
 +#if defined(CONFIG_X86_64) && defined(CONFIG_PAX_MEMORY_UDEREF)
-+      mov $PAX_USER_SHADOW_BASE,%_ASM_DX
++      mov pax_user_shadow_base,%_ASM_DX
 +      cmp %_ASM_DX,%_ASM_AX
 +      jae 1234f
 +      add %_ASM_DX,%_ASM_AX
@@ -25740,20 +25415,20 @@ index 156b9c8..b144132 100644
 +
 +#endif
 +
-+3:    __copyuser_seg mov -3(%_ASM_AX),%edx
++3:    __copyuser_seg movl -3(%_ASM_AX),%edx
        xor %eax,%eax
        ASM_CLAC
 +      pax_force_retaddr
        ret
        CFI_ENDPROC
  ENDPROC(__get_user_4)
-@@ -87,10 +138,20 @@ ENTRY(__get_user_8)
+@@ -86,10 +137,20 @@ ENTRY(__get_user_8)
        GET_THREAD_INFO(%_ASM_DX)
        cmp TI_addr_limit(%_ASM_DX),%_ASM_AX
-       jae     bad_get_user
+       jae bad_get_user
 +
 +#ifdef CONFIG_PAX_MEMORY_UDEREF
-+      mov $PAX_USER_SHADOW_BASE,%_ASM_DX
++      mov pax_user_shadow_base,%_ASM_DX
 +      cmp %_ASM_DX,%_ASM_AX
 +      jae 1234f
 +      add %_ASM_DX,%_ASM_AX
@@ -25761,14 +25436,22 @@ index 156b9c8..b144132 100644
 +#endif
 +
        ASM_STAC
- 4:    movq -7(%_ASM_AX),%_ASM_DX
+ 4:    movq -7(%_ASM_AX),%rdx
        xor %eax,%eax
        ASM_CLAC
 +      pax_force_retaddr
        ret
+ #else
+       add $7,%_ASM_AX
+@@ -102,6 +163,7 @@ ENTRY(__get_user_8)
+ 5:    movl -3(%_ASM_AX),%ecx
+       xor %eax,%eax
+       ASM_CLAC
++      pax_force_retaddr
+       ret
+ #endif
        CFI_ENDPROC
- ENDPROC(__get_user_8)
-@@ -101,6 +162,7 @@ bad_get_user:
+@@ -113,6 +175,7 @@ bad_get_user:
        xor %edx,%edx
        mov $(-EFAULT),%_ASM_AX
        ASM_CLAC
@@ -25776,6 +25459,14 @@ index 156b9c8..b144132 100644
        ret
        CFI_ENDPROC
  END(bad_get_user)
+@@ -124,6 +187,7 @@ bad_get_user_8:
+       xor %ecx,%ecx
+       mov $(-EFAULT),%_ASM_AX
+       ASM_CLAC
++      pax_force_retaddr
+       ret
+       CFI_ENDPROC
+ END(bad_get_user_8)
 diff --git a/arch/x86/lib/insn.c b/arch/x86/lib/insn.c
 index 54fcffe..7be149e 100644
 --- a/arch/x86/lib/insn.c
@@ -26450,7 +26141,7 @@ index f6d13ee..aca5f0b 100644
  3:
        CFI_RESTORE_STATE
 diff --git a/arch/x86/lib/putuser.S b/arch/x86/lib/putuser.S
-index fc6ba17..04471c5 100644
+index fc6ba17..d4d989d 100644
 --- a/arch/x86/lib/putuser.S
 +++ b/arch/x86/lib/putuser.S
 @@ -16,7 +16,9 @@
@@ -26502,7 +26193,7 @@ index fc6ba17..04471c5 100644
 -1:    movb %al,(%_ASM_CX)
 +
 +#if defined(CONFIG_X86_64) && defined(CONFIG_PAX_MEMORY_UDEREF)
-+      mov $PAX_USER_SHADOW_BASE,%_ASM_BX
++      mov pax_user_shadow_base,%_ASM_BX
 +      cmp %_ASM_BX,%_ASM_CX
 +      jb 1234f
 +      xor %ebx,%ebx
@@ -26529,7 +26220,7 @@ index fc6ba17..04471c5 100644
 -2:    movw %ax,(%_ASM_CX)
 +
 +#if defined(CONFIG_X86_64) && defined(CONFIG_PAX_MEMORY_UDEREF)
-+      mov $PAX_USER_SHADOW_BASE,%_ASM_BX
++      mov pax_user_shadow_base,%_ASM_BX
 +      cmp %_ASM_BX,%_ASM_CX
 +      jb 1234f
 +      xor %ebx,%ebx
@@ -26556,7 +26247,7 @@ index fc6ba17..04471c5 100644
 -3:    movl %eax,(%_ASM_CX)
 +
 +#if defined(CONFIG_X86_64) && defined(CONFIG_PAX_MEMORY_UDEREF)
-+      mov $PAX_USER_SHADOW_BASE,%_ASM_BX
++      mov pax_user_shadow_base,%_ASM_BX
 +      cmp %_ASM_BX,%_ASM_CX
 +      jb 1234f
 +      xor %ebx,%ebx
@@ -26583,7 +26274,7 @@ index fc6ba17..04471c5 100644
 -4:    mov %_ASM_AX,(%_ASM_CX)
 +
 +#if defined(CONFIG_X86_64) && defined(CONFIG_PAX_MEMORY_UDEREF)
-+      mov $PAX_USER_SHADOW_BASE,%_ASM_BX
++      mov pax_user_shadow_base,%_ASM_BX
 +      cmp %_ASM_BX,%_ASM_CX
 +      jb 1234f
 +      xor %ebx,%ebx
@@ -27462,7 +27153,7 @@ index 903ec1e..c4166b2 100644
  }
  
 diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
-index fb674fd..223a693 100644
+index 0e88336..2bb9777 100644
 --- a/arch/x86/mm/fault.c
 +++ b/arch/x86/mm/fault.c
 @@ -13,12 +13,19 @@
@@ -27619,7 +27310,7 @@ index fb674fd..223a693 100644
        pgd_ref = pgd_offset_k(address);
        if (pgd_none(*pgd_ref))
                return -1;
-@@ -541,7 +612,7 @@ static int is_errata93(struct pt_regs *regs, unsigned long address)
+@@ -543,7 +614,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
@@ -27628,7 +27319,7 @@ index fb674fd..223a693 100644
                return 1;
  #endif
        return 0;
-@@ -568,7 +639,7 @@ static int is_f00f_bug(struct pt_regs *regs, unsigned long address)
+@@ -570,7 +641,7 @@ static int is_f00f_bug(struct pt_regs *regs, unsigned long address)
  }
  
  static const char nx_warning[] = KERN_CRIT
@@ -27637,7 +27328,7 @@ index fb674fd..223a693 100644
  
  static void
  show_fault_oops(struct pt_regs *regs, unsigned long error_code,
-@@ -577,15 +648,27 @@ show_fault_oops(struct pt_regs *regs, unsigned long error_code,
+@@ -579,15 +650,27 @@ show_fault_oops(struct pt_regs *regs, unsigned long error_code,
        if (!oops_may_print())
                return;
  
@@ -27667,7 +27358,7 @@ index fb674fd..223a693 100644
        printk(KERN_ALERT "BUG: unable to handle kernel ");
        if (address < PAGE_SIZE)
                printk(KERN_CONT "NULL pointer dereference");
-@@ -748,6 +831,22 @@ __bad_area_nosemaphore(struct pt_regs *regs, unsigned long error_code,
+@@ -750,6 +833,22 @@ __bad_area_nosemaphore(struct pt_regs *regs, unsigned long error_code,
                                return;
                }
  #endif
@@ -27690,7 +27381,7 @@ index fb674fd..223a693 100644
                /* Kernel addresses are always protection faults: */
                if (address >= TASK_SIZE)
                        error_code |= PF_PROT;
-@@ -833,7 +932,7 @@ do_sigbus(struct pt_regs *regs, unsigned long error_code, unsigned long address,
+@@ -835,7 +934,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",
@@ -27699,7 +27390,7 @@ index fb674fd..223a693 100644
                code = BUS_MCEERR_AR;
        }
  #endif
-@@ -896,6 +995,99 @@ static int spurious_fault_check(unsigned long error_code, pte_t *pte)
+@@ -898,6 +997,99 @@ static int spurious_fault_check(unsigned long error_code, pte_t *pte)
        return 1;
  }
  
@@ -27799,7 +27490,7 @@ index fb674fd..223a693 100644
  /*
   * Handle a spurious fault caused by a stale TLB entry.
   *
-@@ -968,6 +1160,9 @@ int show_unhandled_signals = 1;
+@@ -964,6 +1156,9 @@ int show_unhandled_signals = 1;
  static inline int
  access_error(unsigned long error_code, struct vm_area_struct *vma)
  {
@@ -27809,7 +27500,7 @@ index fb674fd..223a693 100644
        if (error_code & PF_WRITE) {
                /* write, present and write, not present: */
                if (unlikely(!(vma->vm_flags & VM_WRITE)))
-@@ -996,7 +1191,7 @@ static inline bool smap_violation(int error_code, struct pt_regs *regs)
+@@ -992,7 +1187,7 @@ static inline bool smap_violation(int error_code, struct pt_regs *regs)
        if (error_code & PF_USER)
                return false;
  
@@ -27818,7 +27509,7 @@ index fb674fd..223a693 100644
                return false;
  
        return true;
-@@ -1012,18 +1207,33 @@ __do_page_fault(struct pt_regs *regs, unsigned long error_code)
+@@ -1008,18 +1203,33 @@ __do_page_fault(struct pt_regs *regs, unsigned long error_code)
  {
        struct vm_area_struct *vma;
        struct task_struct *tsk;
@@ -27837,18 +27528,18 @@ index fb674fd..223a693 100644
 +      unsigned long address = read_cr2();
 +
 +#if defined(CONFIG_X86_64) && defined(CONFIG_PAX_MEMORY_UDEREF)
-+      if (!user_mode(regs) && address < 2 * PAX_USER_SHADOW_BASE) {
++      if (!user_mode(regs) && address < 2 * pax_user_shadow_base) {
 +              if (!search_exception_tables(regs->ip)) {
 +                      printk(KERN_ERR "PAX: please report this to pageexec@freemail.hu\n");
 +                      bad_area_nosemaphore(regs, error_code, address);
 +                      return;
 +              }
-+              if (address < PAX_USER_SHADOW_BASE) {
++              if (address < pax_user_shadow_base) {
 +                      printk(KERN_ERR "PAX: please report this to pageexec@freemail.hu\n");
 +                      printk(KERN_ERR "PAX: faulting IP: %pS\n", (void *)regs->ip);
 +                      show_trace_log_lvl(NULL, NULL, (void *)regs->sp, regs->bp, KERN_ERR);
 +              } else
-+                      address -= PAX_USER_SHADOW_BASE;
++                      address -= pax_user_shadow_base;
 +      }
 +#endif
 +
@@ -27857,7 +27548,7 @@ index fb674fd..223a693 100644
  
        /*
         * Detect and handle instructions that would cause a page fault for
-@@ -1084,7 +1294,7 @@ __do_page_fault(struct pt_regs *regs, unsigned long error_code)
+@@ -1080,7 +1290,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:
         */
@@ -27866,7 +27557,7 @@ index fb674fd..223a693 100644
                local_irq_enable();
                error_code |= PF_USER;
        } else {
-@@ -1146,6 +1356,11 @@ retry:
+@@ -1142,6 +1352,11 @@ retry:
                might_sleep();
        }
  
@@ -27878,7 +27569,7 @@ index fb674fd..223a693 100644
        vma = find_vma(mm, address);
        if (unlikely(!vma)) {
                bad_area(regs, error_code, address);
-@@ -1157,18 +1372,24 @@ retry:
+@@ -1153,18 +1368,24 @@ retry:
                bad_area(regs, error_code, address);
                return;
        }
@@ -27914,7 +27605,7 @@ index fb674fd..223a693 100644
        if (unlikely(expand_stack(vma, address))) {
                bad_area(regs, error_code, address);
                return;
-@@ -1232,3 +1453,292 @@ do_page_fault(struct pt_regs *regs, unsigned long error_code)
+@@ -1228,3 +1449,292 @@ do_page_fault(struct pt_regs *regs, unsigned long error_code)
        __do_page_fault(regs, error_code);
        exception_exit(regs);
  }
@@ -28237,10 +27928,20 @@ index 6f31ee5..8ee4164 100644
  
        return (void *)vaddr;
 diff --git a/arch/x86/mm/hugetlbpage.c b/arch/x86/mm/hugetlbpage.c
-index ae1aa71..56316db 100644
+index ae1aa71..d9bea75 100644
 --- a/arch/x86/mm/hugetlbpage.c
 +++ b/arch/x86/mm/hugetlbpage.c
-@@ -279,6 +279,12 @@ static unsigned long hugetlb_get_unmapped_area_bottomup(struct file *file,
+@@ -271,23 +271,30 @@ follow_huge_pud(struct mm_struct *mm, unsigned long address,
+ #ifdef HAVE_ARCH_HUGETLB_UNMAPPED_AREA
+ static unsigned long hugetlb_get_unmapped_area_bottomup(struct file *file,
+               unsigned long addr, unsigned long len,
+-              unsigned long pgoff, unsigned long flags)
++              unsigned long pgoff, unsigned long flags, unsigned long offset)
+ {
+       struct hstate *h = hstate_file(file);
+       struct vm_unmapped_area_info info;
+-
++      
        info.flags = 0;
        info.length = len;
        info.low_limit = TASK_UNMAPPED_BASE;
@@ -28253,7 +27954,26 @@ index ae1aa71..56316db 100644
        info.high_limit = TASK_SIZE;
        info.align_mask = PAGE_MASK & ~huge_page_mask(h);
        info.align_offset = 0;
-@@ -311,6 +317,12 @@ static unsigned long hugetlb_get_unmapped_area_topdown(struct file *file,
++      info.threadstack_offset = offset;
+       return vm_unmapped_area(&info);
+ }
+ static unsigned long hugetlb_get_unmapped_area_topdown(struct file *file,
+               unsigned long addr0, unsigned long len,
+-              unsigned long pgoff, unsigned long flags)
++              unsigned long pgoff, unsigned long flags, unsigned long offset)
+ {
+       struct hstate *h = hstate_file(file);
+       struct vm_unmapped_area_info info;
+@@ -299,6 +306,7 @@ static unsigned long hugetlb_get_unmapped_area_topdown(struct file *file,
+       info.high_limit = current->mm->mmap_base;
+       info.align_mask = PAGE_MASK & ~huge_page_mask(h);
+       info.align_offset = 0;
++      info.threadstack_offset = offset;
+       addr = vm_unmapped_area(&info);
+       /*
+@@ -311,6 +319,12 @@ static unsigned long hugetlb_get_unmapped_area_topdown(struct file *file,
                VM_BUG_ON(addr != -ENOMEM);
                info.flags = 0;
                info.low_limit = TASK_UNMAPPED_BASE;
@@ -28266,7 +27986,7 @@ index ae1aa71..56316db 100644
                info.high_limit = TASK_SIZE;
                addr = vm_unmapped_area(&info);
        }
-@@ -325,10 +337,20 @@ hugetlb_get_unmapped_area(struct file *file, unsigned long addr,
+@@ -325,10 +339,20 @@ hugetlb_get_unmapped_area(struct file *file, unsigned long addr,
        struct hstate *h = hstate_file(file);
        struct mm_struct *mm = current->mm;
        struct vm_area_struct *vma;
@@ -28288,7 +28008,7 @@ index ae1aa71..56316db 100644
                return -ENOMEM;
  
        if (flags & MAP_FIXED) {
-@@ -337,11 +359,14 @@ hugetlb_get_unmapped_area(struct file *file, unsigned long addr,
+@@ -337,19 +361,22 @@ hugetlb_get_unmapped_area(struct file *file, unsigned long addr,
                return addr;
        }
  
@@ -28305,8 +28025,18 @@ index ae1aa71..56316db 100644
                        return addr;
        }
        if (mm->get_unmapped_area == arch_get_unmapped_area)
+               return hugetlb_get_unmapped_area_bottomup(file, addr, len,
+-                              pgoff, flags);
++                              pgoff, flags, offset);
+       else
+               return hugetlb_get_unmapped_area_topdown(file, addr, len,
+-                              pgoff, flags);
++                              pgoff, flags, offset);
+ }
+ #endif /*HAVE_ARCH_HUGETLB_UNMAPPED_AREA*/
 diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c
-index d7aea41..0fc945b 100644
+index 59b7fc4..b1dd75f 100644
 --- a/arch/x86/mm/init.c
 +++ b/arch/x86/mm/init.c
 @@ -4,6 +4,7 @@
@@ -28317,25 +28047,16 @@ index d7aea41..0fc945b 100644
  
  #include <asm/cacheflush.h>
  #include <asm/e820.h>
-@@ -16,6 +17,8 @@
- #include <asm/tlb.h>
+@@ -17,6 +18,8 @@
  #include <asm/proto.h>
  #include <asm/dma.h>          /* for MAX_DMA_PFN */
+ #include <asm/microcode.h>
 +#include <asm/desc.h>
 +#include <asm/bios_ebda.h>
  
- unsigned long __initdata pgt_buf_start;
- unsigned long __meminitdata pgt_buf_end;
-@@ -44,7 +47,7 @@ static void __init find_early_table_space(struct map_range *mr, int nr_range)
- {
-       int i;
-       unsigned long puds = 0, pmds = 0, ptes = 0, tables;
--      unsigned long start = 0, good_end;
-+      unsigned long start = 0x100000, good_end;
-       phys_addr_t base;
+ #include "mm_internal.h"
  
-       for (i = 0; i < nr_range; i++) {
-@@ -321,10 +324,40 @@ unsigned long __init_refok init_memory_mapping(unsigned long start,
+@@ -464,10 +467,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.
   */
@@ -28377,7 +28098,7 @@ index d7aea41..0fc945b 100644
        if (iomem_is_exclusive(pagenr << PAGE_SHIFT))
                return 0;
        if (!page_is_ram(pagenr))
-@@ -381,8 +414,117 @@ void free_init_pages(char *what, unsigned long begin, unsigned long end)
+@@ -524,8 +557,117 @@ void free_init_pages(char *what, unsigned long begin, unsigned long end)
  #endif
  }
  
@@ -28496,11 +28217,11 @@ index d7aea41..0fc945b 100644
                        (unsigned long)(&__init_begin),
                        (unsigned long)(&__init_end));
 diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c
-index 745d66b..56bf568 100644
+index 2d19001..6a1046c 100644
 --- a/arch/x86/mm/init_32.c
 +++ b/arch/x86/mm/init_32.c
-@@ -73,36 +73,6 @@ static __init void *alloc_low_page(void)
- }
+@@ -62,33 +62,6 @@ static noinline int do_test_wp_bit(void);
+ bool __read_mostly __vmalloc_start_set = false;
  
  /*
 - * Creates a middle page table and puts a pointer to it in the
@@ -28514,10 +28235,7 @@ index 745d66b..56bf568 100644
 -
 -#ifdef CONFIG_X86_PAE
 -      if (!(pgd_val(*pgd) & _PAGE_PRESENT)) {
--              if (after_bootmem)
--                      pmd_table = (pmd_t *)alloc_bootmem_pages(PAGE_SIZE);
--              else
--                      pmd_table = (pmd_t *)alloc_low_page();
+-              pmd_table = (pmd_t *)alloc_low_page();
 -              paravirt_alloc_pmd(&init_mm, __pa(pmd_table) >> PAGE_SHIFT);
 -              set_pgd(pgd, __pgd(__pa(pmd_table) | _PAGE_PRESENT));
 -              pud = pud_offset(pgd, 0);
@@ -28536,8 +28254,8 @@ index 745d66b..56bf568 100644
   * Create a page table and place a pointer to it in a middle page
   * directory entry:
   */
-@@ -122,13 +92,28 @@ static pte_t * __init one_page_table_init(pmd_t *pmd)
-                       page_table = (pte_t *)alloc_low_page();
+@@ -98,13 +71,28 @@ static pte_t * __init one_page_table_init(pmd_t *pmd)
+               pte_t *page_table = (pte_t *)alloc_low_page();
  
                paravirt_alloc_pte(&init_mm, __pa(page_table) >> PAGE_SHIFT);
 +#if defined(CONFIG_PAX_PAGEEXEC) || defined(CONFIG_PAX_SEGMEXEC)
@@ -28565,15 +28283,15 @@ index 745d66b..56bf568 100644
  pmd_t * __init populate_extra_pmd(unsigned long vaddr)
  {
        int pgd_idx = pgd_index(vaddr);
-@@ -202,6 +187,7 @@ page_table_range_init(unsigned long start, unsigned long end, pgd_t *pgd_base)
+@@ -208,6 +196,7 @@ page_table_range_init(unsigned long start, unsigned long end, pgd_t *pgd_base)
        int pgd_idx, pmd_idx;
        unsigned long vaddr;
        pgd_t *pgd;
 +      pud_t *pud;
        pmd_t *pmd;
        pte_t *pte = NULL;
-@@ -211,8 +197,13 @@ page_table_range_init(unsigned long start, unsigned long end, pgd_t *pgd_base)
+       unsigned long count = page_table_range_init_count(start, end);
+@@ -222,8 +211,13 @@ page_table_range_init(unsigned long start, unsigned long end, pgd_t *pgd_base)
        pgd = pgd_base + pgd_idx;
  
        for ( ; (pgd_idx < PTRS_PER_PGD) && (vaddr != end); pgd++, pgd_idx++) {
@@ -28589,7 +28307,7 @@ index 745d66b..56bf568 100644
                for (; (pmd_idx < PTRS_PER_PMD) && (vaddr != end);
                                                        pmd++, pmd_idx++) {
                        pte = page_table_kmap_check(one_page_table_init(pmd),
-@@ -224,11 +215,20 @@ page_table_range_init(unsigned long start, unsigned long end, pgd_t *pgd_base)
+@@ -235,11 +229,20 @@ page_table_range_init(unsigned long start, unsigned long end, pgd_t *pgd_base)
        }
  }
  
@@ -28614,7 +28332,7 @@ index 745d66b..56bf568 100644
  }
  
  /*
-@@ -245,9 +245,10 @@ kernel_physical_mapping_init(unsigned long start,
+@@ -256,9 +259,10 @@ kernel_physical_mapping_init(unsigned long start,
        unsigned long last_map_addr = end;
        unsigned long start_pfn, end_pfn;
        pgd_t *pgd_base = swapper_pg_dir;
@@ -28626,7 +28344,7 @@ index 745d66b..56bf568 100644
        pmd_t *pmd;
        pte_t *pte;
        unsigned pages_2m, pages_4k;
-@@ -280,8 +281,13 @@ repeat:
+@@ -291,8 +295,13 @@ repeat:
        pfn = start_pfn;
        pgd_idx = pgd_index((pfn<<PAGE_SHIFT) + PAGE_OFFSET);
        pgd = pgd_base + pgd_idx;
@@ -28642,7 +28360,7 @@ index 745d66b..56bf568 100644
  
                if (pfn >= end_pfn)
                        continue;
-@@ -293,14 +299,13 @@ repeat:
+@@ -304,14 +313,13 @@ repeat:
  #endif
                for (; pmd_idx < PTRS_PER_PMD && pfn < end_pfn;
                     pmd++, pmd_idx++) {
@@ -28658,10 +28376,10 @@ index 745d66b..56bf568 100644
                                pgprot_t prot = PAGE_KERNEL_LARGE;
                                /*
                                 * first pass will use the same initial
-@@ -310,11 +315,7 @@ repeat:
-                                       __pgprot(PTE_IDENT_ATTR |
+@@ -322,11 +330,7 @@ repeat:
                                                 _PAGE_PSE);
  
+                               pfn &= PMD_MASK >> PAGE_SHIFT;
 -                              addr2 = (pfn + PTRS_PER_PTE-1) * PAGE_SIZE +
 -                                      PAGE_OFFSET + PAGE_SIZE-1;
 -
@@ -28671,7 +28389,7 @@ index 745d66b..56bf568 100644
                                        prot = PAGE_KERNEL_LARGE_EXEC;
  
                                pages_2m++;
-@@ -331,7 +332,7 @@ repeat:
+@@ -343,7 +347,7 @@ repeat:
                        pte_ofs = pte_index((pfn<<PAGE_SHIFT) + PAGE_OFFSET);
                        pte += pte_ofs;
                        for (; pte_ofs < PTRS_PER_PTE && pfn < end_pfn;
@@ -28680,7 +28398,7 @@ index 745d66b..56bf568 100644
                                pgprot_t prot = PAGE_KERNEL;
                                /*
                                 * first pass will use the same initial
-@@ -339,7 +340,7 @@ repeat:
+@@ -351,7 +355,7 @@ repeat:
                                 */
                                pgprot_t init_prot = __pgprot(PTE_IDENT_ATTR);
  
@@ -28689,16 +28407,16 @@ index 745d66b..56bf568 100644
                                        prot = PAGE_KERNEL_EXEC;
  
                                pages_4k++;
-@@ -465,7 +466,7 @@ void __init native_pagetable_init(void)
+@@ -482,7 +486,7 @@ void __init native_pagetable_init(void)
  
                pud = pud_offset(pgd, va);
                pmd = pmd_offset(pud, va);
 -              if (!pmd_present(*pmd))
-+              if (!pmd_present(*pmd) || pmd_huge(*pmd))
++              if (!pmd_present(*pmd)) // PAX TODO || pmd_large(*pmd))
                        break;
  
-               pte = pte_offset_kernel(pmd, va);
-@@ -514,12 +515,10 @@ void __init early_ioremap_page_table_range_init(void)
+               /* should not be large page here */
+@@ -540,12 +544,10 @@ void __init early_ioremap_page_table_range_init(void)
  
  static void __init pagetable_init(void)
  {
@@ -28713,7 +28431,7 @@ index 745d66b..56bf568 100644
  EXPORT_SYMBOL_GPL(__supported_pte_mask);
  
  /* user-defined highmem size */
-@@ -728,6 +727,12 @@ void __init mem_init(void)
+@@ -752,6 +754,12 @@ void __init mem_init(void)
  
        pci_iommu_alloc();
  
@@ -28726,8 +28444,8 @@ index 745d66b..56bf568 100644
  #ifdef CONFIG_FLATMEM
        BUG_ON(!mem_map);
  #endif
-@@ -754,7 +759,7 @@ void __init mem_init(void)
-                       reservedpages++;
+@@ -780,7 +788,7 @@ void __init mem_init(void)
+       after_bootmem = 1;
  
        codesize =  (unsigned long) &_etext - (unsigned long) &_text;
 -      datasize =  (unsigned long) &_edata - (unsigned long) &_etext;
@@ -28735,7 +28453,7 @@ index 745d66b..56bf568 100644
        initsize =  (unsigned long) &__init_end - (unsigned long) &__init_begin;
  
        printk(KERN_INFO "Memory: %luk/%luk available (%dk kernel code, "
-@@ -795,10 +800,10 @@ void __init mem_init(void)
+@@ -821,10 +829,10 @@ void __init mem_init(void)
                ((unsigned long)&__init_end -
                 (unsigned long)&__init_begin) >> 10,
  
@@ -28749,7 +28467,7 @@ index 745d66b..56bf568 100644
                ((unsigned long)&_etext - (unsigned long)&_text) >> 10);
  
        /*
-@@ -876,6 +881,7 @@ void set_kernel_text_rw(void)
+@@ -914,6 +922,7 @@ void set_kernel_text_rw(void)
        if (!kernel_set_to_readonly)
                return;
  
@@ -28757,7 +28475,7 @@ index 745d66b..56bf568 100644
        pr_debug("Set kernel text: %lx - %lx for read write\n",
                 start, start+size);
  
-@@ -890,6 +896,7 @@ void set_kernel_text_ro(void)
+@@ -928,6 +937,7 @@ void set_kernel_text_ro(void)
        if (!kernel_set_to_readonly)
                return;
  
@@ -28765,7 +28483,7 @@ index 745d66b..56bf568 100644
        pr_debug("Set kernel text: %lx - %lx for read only\n",
                 start, start+size);
  
-@@ -918,6 +925,7 @@ void mark_rodata_ro(void)
+@@ -956,6 +966,7 @@ void mark_rodata_ro(void)
        unsigned long start = PFN_ALIGN(_text);
        unsigned long size = PFN_ALIGN(_etext) - start;
  
@@ -28774,10 +28492,10 @@ index 745d66b..56bf568 100644
        printk(KERN_INFO "Write protecting the kernel text: %luk\n",
                size >> 10);
 diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c
-index 75c9a6a..498d677 100644
+index 474e28f..647dd12 100644
 --- a/arch/x86/mm/init_64.c
 +++ b/arch/x86/mm/init_64.c
-@@ -74,7 +74,7 @@ early_param("gbpages", parse_direct_gbpages_on);
+@@ -150,7 +150,7 @@ early_param("gbpages", parse_direct_gbpages_on);
   * around without checking the pgd every time.
   */
  
@@ -28786,7 +28504,7 @@ index 75c9a6a..498d677 100644
  EXPORT_SYMBOL_GPL(__supported_pte_mask);
  
  int force_personality32;
-@@ -107,12 +107,22 @@ void sync_global_pgds(unsigned long start, unsigned long end)
+@@ -183,12 +183,22 @@ void sync_global_pgds(unsigned long start, unsigned long end)
  
        for (address = start; address <= end; address += PGDIR_SIZE) {
                const pgd_t *pgd_ref = pgd_offset_k(address);
@@ -28809,7 +28527,7 @@ index 75c9a6a..498d677 100644
                list_for_each_entry(page, &pgd_list, lru) {
                        pgd_t *pgd;
                        spinlock_t *pgt_lock;
-@@ -121,6 +131,7 @@ void sync_global_pgds(unsigned long start, unsigned long end)
+@@ -197,6 +207,7 @@ void sync_global_pgds(unsigned long start, unsigned long end)
                        /* the pgt_lock only for Xen */
                        pgt_lock = &pgd_page_get_mm(page)->page_table_lock;
                        spin_lock(pgt_lock);
@@ -28817,7 +28535,7 @@ index 75c9a6a..498d677 100644
  
                        if (pgd_none(*pgd))
                                set_pgd(pgd, *pgd_ref);
-@@ -128,7 +139,10 @@ void sync_global_pgds(unsigned long start, unsigned long end)
+@@ -204,7 +215,10 @@ void sync_global_pgds(unsigned long start, unsigned long end)
                                BUG_ON(pgd_page_vaddr(*pgd)
                                       != pgd_page_vaddr(*pgd_ref));
  
@@ -28828,7 +28546,7 @@ index 75c9a6a..498d677 100644
                }
                spin_unlock(&pgd_lock);
        }
-@@ -161,7 +175,7 @@ static pud_t *fill_pud(pgd_t *pgd, unsigned long vaddr)
+@@ -237,7 +251,7 @@ static pud_t *fill_pud(pgd_t *pgd, unsigned long vaddr)
  {
        if (pgd_none(*pgd)) {
                pud_t *pud = (pud_t *)spp_getpage();
@@ -28837,7 +28555,7 @@ index 75c9a6a..498d677 100644
                if (pud != pud_offset(pgd, 0))
                        printk(KERN_ERR "PAGETABLE BUG #00! %p <-> %p\n",
                               pud, pud_offset(pgd, 0));
-@@ -173,7 +187,7 @@ static pmd_t *fill_pmd(pud_t *pud, unsigned long vaddr)
+@@ -249,7 +263,7 @@ static pmd_t *fill_pmd(pud_t *pud, unsigned long vaddr)
  {
        if (pud_none(*pud)) {
                pmd_t *pmd = (pmd_t *) spp_getpage();
@@ -28846,7 +28564,7 @@ index 75c9a6a..498d677 100644
                if (pmd != pmd_offset(pud, 0))
                        printk(KERN_ERR "PAGETABLE BUG #01! %p <-> %p\n",
                               pmd, pmd_offset(pud, 0));
-@@ -202,7 +216,9 @@ void set_pte_vaddr_pud(pud_t *pud_page, unsigned long vaddr, pte_t new_pte)
+@@ -278,7 +292,9 @@ void set_pte_vaddr_pud(pud_t *pud_page, unsigned long vaddr, pte_t new_pte)
        pmd = fill_pmd(pud, vaddr);
        pte = fill_pte(pmd, vaddr);
  
@@ -28856,7 +28574,7 @@ index 75c9a6a..498d677 100644
  
        /*
         * It's enough to flush this one mapping.
-@@ -261,14 +277,12 @@ static void __init __init_extra_mapping(unsigned long phys, unsigned long size,
+@@ -337,14 +353,12 @@ static void __init __init_extra_mapping(unsigned long phys, unsigned long size,
                pgd = pgd_offset_k((unsigned long)__va(phys));
                if (pgd_none(*pgd)) {
                        pud = (pud_t *) spp_getpage();
@@ -28873,43 +28591,25 @@ index 75c9a6a..498d677 100644
                }
                pmd = pmd_offset(pud, phys);
                BUG_ON(!pmd_none(*pmd));
-@@ -329,7 +343,7 @@ static __ref void *alloc_low_page(unsigned long *phys)
-       if (pfn >= pgt_buf_top)
-               panic("alloc_low_page: ran out of memory");
--      adr = early_memremap(pfn * PAGE_SIZE, PAGE_SIZE);
-+      adr = (void __force_kernel *)early_memremap(pfn * PAGE_SIZE, PAGE_SIZE);
-       clear_page(adr);
-       *phys  = pfn * PAGE_SIZE;
-       return adr;
-@@ -345,7 +359,7 @@ static __ref void *map_low_page(void *virt)
-       phys = __pa(virt);
-       left = phys & (PAGE_SIZE - 1);
--      adr = early_memremap(phys & PAGE_MASK, PAGE_SIZE);
-+      adr = (void __force_kernel *)early_memremap(phys & PAGE_MASK, PAGE_SIZE);
-       adr = (void *)(((unsigned long)adr) | left);
-       return adr;
-@@ -553,7 +567,7 @@ phys_pud_init(pud_t *pud_page, unsigned long addr, unsigned long end,
-               unmap_low_page(pmd);
+@@ -585,7 +599,7 @@ phys_pud_init(pud_t *pud_page, unsigned long addr, unsigned long end,
+                                             prot);
  
                spin_lock(&init_mm.page_table_lock);
--              pud_populate(&init_mm, pud, __va(pmd_phys));
-+              pud_populate_kernel(&init_mm, pud, __va(pmd_phys));
+-              pud_populate(&init_mm, pud, pmd);
++              pud_populate_kernel(&init_mm, pud, pmd);
                spin_unlock(&init_mm.page_table_lock);
        }
        __flush_tlb_all();
-@@ -599,7 +613,7 @@ kernel_physical_mapping_init(unsigned long start,
-               unmap_low_page(pud);
+@@ -626,7 +640,7 @@ kernel_physical_mapping_init(unsigned long start,
+                                                page_size_mask);
  
                spin_lock(&init_mm.page_table_lock);
--              pgd_populate(&init_mm, pgd, __va(pud_phys));
-+              pgd_populate_kernel(&init_mm, pgd, __va(pud_phys));
+-              pgd_populate(&init_mm, pgd, pud);
++              pgd_populate_kernel(&init_mm, pgd, pud);
                spin_unlock(&init_mm.page_table_lock);
                pgd_changed = true;
        }
-@@ -693,6 +707,12 @@ void __init mem_init(void)
+@@ -1065,6 +1079,12 @@ void __init mem_init(void)
  
        pci_iommu_alloc();
  
@@ -28922,7 +28622,7 @@ index 75c9a6a..498d677 100644
        /* clear_bss() already clear the empty_zero_page */
  
        reservedpages = 0;
-@@ -856,8 +876,8 @@ int kern_addr_valid(unsigned long addr)
+@@ -1224,8 +1244,8 @@ int kern_addr_valid(unsigned long addr)
  static struct vm_area_struct gate_vma = {
        .vm_start       = VSYSCALL_START,
        .vm_end         = VSYSCALL_START + (VSYSCALL_MAPPED_PAGES * PAGE_SIZE),
@@ -28933,7 +28633,7 @@ index 75c9a6a..498d677 100644
  };
  
  struct vm_area_struct *get_gate_vma(struct mm_struct *mm)
-@@ -891,7 +911,7 @@ int in_gate_area_no_mm(unsigned long addr)
+@@ -1259,7 +1279,7 @@ int in_gate_area_no_mm(unsigned long addr)
  
  const char *arch_vma_name(struct vm_area_struct *vma)
  {
@@ -28943,7 +28643,7 @@ index 75c9a6a..498d677 100644
        if (vma == &gate_vma)
                return "[vsyscall]";
 diff --git a/arch/x86/mm/iomap_32.c b/arch/x86/mm/iomap_32.c
-index 7b179b4..6bd1777 100644
+index 7b179b4..6bd17777 100644
 --- a/arch/x86/mm/iomap_32.c
 +++ b/arch/x86/mm/iomap_32.c
 @@ -64,7 +64,11 @@ void *kmap_atomic_prot_pfn(unsigned long pfn, pgprot_t prot)
@@ -29170,10 +28870,10 @@ index dc0b727..f612039 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 8504f36..5fc68f2 100644
+index 72fe01e..f1a8daa 100644
 --- a/arch/x86/mm/numa.c
 +++ b/arch/x86/mm/numa.c
-@@ -478,7 +478,7 @@ static bool __init numa_meminfo_cover_memory(const struct numa_meminfo *mi)
+@@ -477,7 +477,7 @@ static bool __init numa_meminfo_cover_memory(const struct numa_meminfo *mi)
        return true;
  }
  
@@ -29183,7 +28883,7 @@ index 8504f36..5fc68f2 100644
        unsigned long uninitialized_var(pfn_align);
        int i, nid;
 diff --git a/arch/x86/mm/pageattr-test.c b/arch/x86/mm/pageattr-test.c
-index b008656..773eac2 100644
+index 0e38951..4ca8458 100644
 --- a/arch/x86/mm/pageattr-test.c
 +++ b/arch/x86/mm/pageattr-test.c
 @@ -36,7 +36,7 @@ enum {
@@ -29196,7 +28896,7 @@ index b008656..773eac2 100644
  
  struct split_state {
 diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c
-index a718e0d..77419bc 100644
+index fb4e73e..43f7238 100644
 --- a/arch/x86/mm/pageattr.c
 +++ b/arch/x86/mm/pageattr.c
 @@ -261,7 +261,7 @@ static inline pgprot_t static_protections(pgprot_t prot, unsigned long address,
@@ -29222,8 +28922,8 @@ index a718e0d..77419bc 100644
         * The .rodata section needs to be read-only. Using the pfn
         * catches all aliases.
 @@ -279,6 +280,7 @@ static inline pgprot_t static_protections(pgprot_t prot, unsigned long address,
-       if (within(pfn, __pa((unsigned long)__start_rodata) >> PAGE_SHIFT,
-                  __pa((unsigned long)__end_rodata) >> PAGE_SHIFT))
+       if (within(pfn, __pa_symbol(__start_rodata) >> PAGE_SHIFT,
+                  __pa_symbol(__end_rodata) >> PAGE_SHIFT))
                pgprot_val(forbidden) |= _PAGE_RW;
 +#endif
  
@@ -29243,7 +28943,7 @@ index a718e0d..77419bc 100644
        prot = __pgprot(pgprot_val(prot) & ~pgprot_val(forbidden));
  
        return prot;
-@@ -369,23 +378,37 @@ EXPORT_SYMBOL_GPL(lookup_address);
+@@ -400,23 +409,37 @@ EXPORT_SYMBOL_GPL(slow_virt_to_phys);
  static void __set_pmd_pte(pte_t *kpte, unsigned long address, pte_t pte)
  {
        /* change init_mm */
@@ -29284,7 +28984,7 @@ index a718e0d..77419bc 100644
  
  static int
 diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.c
-index 0eb572e..92f5c1e 100644
+index 6574388..87e9bef 100644
 --- a/arch/x86/mm/pat.c
 +++ b/arch/x86/mm/pat.c
 @@ -376,7 +376,7 @@ int free_memtype(u64 start, u64 end)
@@ -29307,7 +29007,7 @@ index 0eb572e..92f5c1e 100644
                        return 0;
                }
                cursor += PAGE_SIZE;
-@@ -570,7 +570,7 @@ int kernel_map_sync_memtype(u64 base, unsigned long size, unsigned long flags)
+@@ -577,7 +577,7 @@ int kernel_map_sync_memtype(u64 base, unsigned long size, unsigned long flags)
        if (ioremap_change_attr((unsigned long)__va(base), id_sz, flags) < 0) {
                printk(KERN_INFO "%s:%d ioremap_change_attr failed %s "
                        "for [mem %#010Lx-%#010Lx]\n",
@@ -29316,7 +29016,7 @@ index 0eb572e..92f5c1e 100644
                        cattr_name(flags),
                        base, (unsigned long long)(base + size-1));
                return -EINVAL;
-@@ -605,7 +605,7 @@ static int reserve_pfn_range(u64 paddr, unsigned long size, pgprot_t *vma_prot,
+@@ -612,7 +612,7 @@ static int reserve_pfn_range(u64 paddr, unsigned long size, pgprot_t *vma_prot,
                flags = lookup_memtype(paddr);
                if (want_flags != flags) {
                        printk(KERN_WARNING "%s:%d map pfn RAM range req %s for [mem %#010Lx-%#010Lx], got %s\n",
@@ -29325,7 +29025,7 @@ index 0eb572e..92f5c1e 100644
                                cattr_name(want_flags),
                                (unsigned long long)paddr,
                                (unsigned long long)(paddr + size - 1),
-@@ -627,7 +627,7 @@ static int reserve_pfn_range(u64 paddr, unsigned long size, pgprot_t *vma_prot,
+@@ -634,7 +634,7 @@ static int reserve_pfn_range(u64 paddr, unsigned long size, pgprot_t *vma_prot,
                        free_memtype(paddr, paddr + size);
                        printk(KERN_ERR "%s:%d map pfn expected mapping type %s"
                                " for [mem %#010Lx-%#010Lx], got %s\n",
@@ -29384,10 +29084,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 e27fbf8..8b56dc9 100644
+index 17fda6a..489c74a 100644
 --- a/arch/x86/mm/pgtable.c
 +++ b/arch/x86/mm/pgtable.c
-@@ -84,10 +84,64 @@ static inline void pgd_list_del(pgd_t *pgd)
+@@ -91,10 +91,64 @@ static inline void pgd_list_del(pgd_t *pgd)
        list_del(&page->lru);
  }
  
@@ -29454,7 +29154,7 @@ index e27fbf8..8b56dc9 100644
  static void pgd_set_mm(pgd_t *pgd, struct mm_struct *mm)
  {
        BUILD_BUG_ON(sizeof(virt_to_page(pgd)->index) < sizeof(mm));
-@@ -128,6 +182,7 @@ static void pgd_dtor(pgd_t *pgd)
+@@ -135,6 +189,7 @@ static void pgd_dtor(pgd_t *pgd)
        pgd_list_del(pgd);
        spin_unlock(&pgd_lock);
  }
@@ -29462,7 +29162,7 @@ index e27fbf8..8b56dc9 100644
  
  /*
   * List of all pgd's needed for non-PAE so it can invalidate entries
-@@ -140,7 +195,7 @@ static void pgd_dtor(pgd_t *pgd)
+@@ -147,7 +202,7 @@ static void pgd_dtor(pgd_t *pgd)
   * -- nyc
   */
  
@@ -29471,7 +29171,7 @@ index e27fbf8..8b56dc9 100644
  /*
   * In PAE mode, we need to do a cr3 reload (=tlb flush) when
   * updating the top-level pagetable entries to guarantee the
-@@ -152,7 +207,7 @@ static void pgd_dtor(pgd_t *pgd)
+@@ -159,7 +214,7 @@ static void pgd_dtor(pgd_t *pgd)
   * not shared between pagetables (!SHARED_KERNEL_PMDS), we allocate
   * and initialize the kernel pmds here.
   */
@@ -29480,7 +29180,7 @@ index e27fbf8..8b56dc9 100644
  
  void pud_populate(struct mm_struct *mm, pud_t *pudp, pmd_t *pmd)
  {
-@@ -170,36 +225,38 @@ void pud_populate(struct mm_struct *mm, pud_t *pudp, pmd_t *pmd)
+@@ -177,36 +232,38 @@ void pud_populate(struct mm_struct *mm, pud_t *pudp, pmd_t *pmd)
         */
        flush_tlb_mm(mm);
  }
@@ -29530,7 +29230,7 @@ index e27fbf8..8b56dc9 100644
                return -ENOMEM;
        }
  
-@@ -212,51 +269,55 @@ static int preallocate_pmds(pmd_t *pmds[])
+@@ -219,51 +276,55 @@ static int preallocate_pmds(pmd_t *pmds[])
   * preallocate which never got a corresponding vma will need to be
   * freed manually.
   */
@@ -29603,7 +29303,7 @@ index e27fbf8..8b56dc9 100644
  
        pgd = (pgd_t *)__get_free_page(PGALLOC_GFP);
  
-@@ -265,11 +326,11 @@ pgd_t *pgd_alloc(struct mm_struct *mm)
+@@ -272,11 +333,11 @@ pgd_t *pgd_alloc(struct mm_struct *mm)
  
        mm->pgd = pgd;
  
@@ -29617,7 +29317,7 @@ index e27fbf8..8b56dc9 100644
  
        /*
         * Make sure that pre-populating the pmds is atomic with
-@@ -279,14 +340,14 @@ pgd_t *pgd_alloc(struct mm_struct *mm)
+@@ -286,14 +347,14 @@ pgd_t *pgd_alloc(struct mm_struct *mm)
        spin_lock(&pgd_lock);
  
        pgd_ctor(mm, pgd);
@@ -29635,7 +29335,7 @@ index e27fbf8..8b56dc9 100644
  out_free_pgd:
        free_page((unsigned long)pgd);
  out:
-@@ -295,7 +356,7 @@ out:
+@@ -302,7 +363,7 @@ out:
  
  void pgd_free(struct mm_struct *mm, pgd_t *pgd)
  {
@@ -29663,27 +29363,27 @@ index a69bcb8..19068ab 100644
        /*
         * It's enough to flush this one mapping.
 diff --git a/arch/x86/mm/physaddr.c b/arch/x86/mm/physaddr.c
-index d2e2735..5c6586f 100644
+index e666cbb..61788c45 100644
 --- a/arch/x86/mm/physaddr.c
 +++ b/arch/x86/mm/physaddr.c
-@@ -8,7 +8,7 @@
+@@ -10,7 +10,7 @@
  #ifdef CONFIG_X86_64
  
+ #ifdef CONFIG_DEBUG_VIRTUAL
 -unsigned long __phys_addr(unsigned long x)
 +unsigned long __intentional_overflow(-1) __phys_addr(unsigned long x)
  {
-       if (x >= __START_KERNEL_map) {
-               x -= __START_KERNEL_map;
-@@ -45,7 +45,7 @@ EXPORT_SYMBOL(__virt_addr_valid);
+       unsigned long y = x - __START_KERNEL_map;
+@@ -67,7 +67,7 @@ EXPORT_SYMBOL(__virt_addr_valid);
  #else
  
  #ifdef CONFIG_DEBUG_VIRTUAL
 -unsigned long __phys_addr(unsigned long x)
 +unsigned long __intentional_overflow(-1) __phys_addr(unsigned long x)
  {
+       unsigned long phys_addr = x - PAGE_OFFSET;
        /* VMALLOC_* aren't constants  */
-       VIRTUAL_BUG_ON(x < PAGE_OFFSET);
 diff --git a/arch/x86/mm/setup_nx.c b/arch/x86/mm/setup_nx.c
 index 410531d..0f16030 100644
 --- a/arch/x86/mm/setup_nx.c
@@ -29718,7 +29418,7 @@ index 410531d..0f16030 100644
  }
  
 diff --git a/arch/x86/mm/tlb.c b/arch/x86/mm/tlb.c
-index 13a6b29..c2fff23 100644
+index 282375f..e03a98f 100644
 --- a/arch/x86/mm/tlb.c
 +++ b/arch/x86/mm/tlb.c
 @@ -48,7 +48,11 @@ void leave_mm(int cpu)
@@ -29847,7 +29547,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 d11a470..3f9adff3 100644
+index 3cbe4538..fd756dc 100644
 --- a/arch/x86/net/bpf_jit_comp.c
 +++ b/arch/x86/net/bpf_jit_comp.c
 @@ -12,6 +12,7 @@
@@ -29979,7 +29679,7 @@ index d11a470..3f9adff3 100644
        }                                                       \
  } while (0)
  
-@@ -121,12 +215,17 @@ static inline void bpf_flush_icache(void *start, void *end)
+@@ -121,6 +215,11 @@ static inline void bpf_flush_icache(void *start, void *end)
        set_fs(old_fs);
  }
  
@@ -29991,6 +29691,8 @@ index d11a470..3f9adff3 100644
  #define CHOOSE_LOAD_FUNC(K, func) \
        ((int)K < 0 ? ((int)K >= SKF_LL_OFF ? func##_negative_offset : func) : func##_positive_offset)
  
+@@ -146,7 +245,7 @@ static int pkt_type_offset(void)
  void bpf_jit_compile(struct sk_filter *fp)
  {
 -      u8 temp[64];
@@ -29998,7 +29700,7 @@ index d11a470..3f9adff3 100644
        u8 *prog;
        unsigned int proglen, oldproglen = 0;
        int ilen, i;
-@@ -139,6 +238,9 @@ void bpf_jit_compile(struct sk_filter *fp)
+@@ -159,6 +258,9 @@ void bpf_jit_compile(struct sk_filter *fp)
        unsigned int *addrs;
        const struct sock_filter *filter = fp->insns;
        int flen = fp->len;
@@ -30008,7 +29710,7 @@ index d11a470..3f9adff3 100644
  
        if (!bpf_jit_enable)
                return;
-@@ -147,11 +249,19 @@ void bpf_jit_compile(struct sk_filter *fp)
+@@ -167,11 +269,19 @@ void bpf_jit_compile(struct sk_filter *fp)
        if (addrs == NULL)
                return;
  
@@ -30030,7 +29732,7 @@ index d11a470..3f9adff3 100644
                addrs[i] = proglen;
        }
        cleanup_addr = proglen; /* epilogue address */
-@@ -261,10 +371,8 @@ void bpf_jit_compile(struct sk_filter *fp)
+@@ -282,10 +392,8 @@ void bpf_jit_compile(struct sk_filter *fp)
                        case BPF_S_ALU_MUL_K: /* A *= K */
                                if (is_imm8(K))
                                        EMIT3(0x6b, 0xc0, K); /* imul imm8,%eax,%eax */
@@ -30043,7 +29745,7 @@ index d11a470..3f9adff3 100644
                                break;
                        case BPF_S_ALU_DIV_X: /* A /= X; */
                                seen |= SEEN_XREG;
-@@ -304,13 +412,23 @@ void bpf_jit_compile(struct sk_filter *fp)
+@@ -325,13 +433,23 @@ void bpf_jit_compile(struct sk_filter *fp)
                                break;
                        case BPF_S_ALU_MOD_K: /* A %= K; */
                                EMIT2(0x31, 0xd2);      /* xor %edx,%edx */
@@ -30067,7 +29769,7 @@ index d11a470..3f9adff3 100644
                                EMIT4(0x48, 0xc1, 0xe8, 0x20); /* shr $0x20,%rax */
                                break;
                        case BPF_S_ALU_AND_X:
-@@ -564,8 +682,7 @@ common_load_ind:           seen |= SEEN_DATAREF | SEEN_XREG;
+@@ -602,8 +720,7 @@ common_load_ind:           seen |= SEEN_DATAREF | SEEN_XREG;
                                        if (is_imm8(K)) {
                                                EMIT3(0x8d, 0x73, K); /* lea imm8(%rbx), %esi */
                                        } else {
@@ -30077,7 +29779,7 @@ index d11a470..3f9adff3 100644
                                        }
                                } else {
                                        EMIT2(0x89,0xde); /* mov %ebx,%esi */
-@@ -648,17 +765,18 @@ cond_branch:                     f_offset = addrs[i + filter[i].jf] - addrs[i];
+@@ -686,17 +803,18 @@ cond_branch:                     f_offset = addrs[i + filter[i].jf] - addrs[i];
                                break;
                        default:
                                /* hmm, too complex filter, give up with jit compiler */
@@ -30100,7 +29802,7 @@ index d11a470..3f9adff3 100644
                        }
                        proglen += ilen;
                        addrs[i] = proglen;
-@@ -679,11 +797,9 @@ cond_branch:                      f_offset = addrs[i + filter[i].jf] - addrs[i];
+@@ -717,11 +835,9 @@ cond_branch:                      f_offset = addrs[i + filter[i].jf] - addrs[i];
                        break;
                }
                if (proglen == oldproglen) {
@@ -30114,7 +29816,7 @@ index d11a470..3f9adff3 100644
                }
                oldproglen = proglen;
        }
-@@ -699,7 +815,10 @@ cond_branch:                      f_offset = addrs[i + filter[i].jf] - addrs[i];
+@@ -737,7 +853,10 @@ cond_branch:                      f_offset = addrs[i + filter[i].jf] - addrs[i];
                bpf_flush_icache(image, image + proglen);
  
                fp->bpf_func = (void *)image;
@@ -30126,7 +29828,7 @@ index d11a470..3f9adff3 100644
  out:
        kfree(addrs);
        return;
-@@ -707,18 +826,20 @@ out:
+@@ -745,18 +864,20 @@ out:
  
  static void jit_free_defer(struct work_struct *arg)
  {
@@ -30935,15 +30637,15 @@ index 3c68768..07e82b8 100644
  #endif
        load_TR_desc();                         /* This does ltr */
 diff --git a/arch/x86/realmode/init.c b/arch/x86/realmode/init.c
-index cbca565..bae7133 100644
+index a44f457..9140171 100644
 --- a/arch/x86/realmode/init.c
 +++ b/arch/x86/realmode/init.c
-@@ -62,7 +62,13 @@ void __init setup_real_mode(void)
+@@ -70,7 +70,13 @@ void __init setup_real_mode(void)
                __va(real_mode_header->trampoline_header);
  
  #ifdef CONFIG_X86_32
--      trampoline_header->start = __pa(startup_32_smp);
-+      trampoline_header->start = __pa(ktla_ktva(startup_32_smp));
+-      trampoline_header->start = __pa_symbol(startup_32_smp);
++      trampoline_header->start = __pa_symbol(ktla_ktva(startup_32_smp));
 +
 +#ifdef CONFIG_PAX_KERNEXEC
 +      trampoline_header->start -= LOAD_PHYSICAL_ADDR;
@@ -30951,8 +30653,17 @@ index cbca565..bae7133 100644
 +
 +      trampoline_header->boot_cs = __BOOT_CS;
        trampoline_header->gdt_limit = __BOOT_DS + 7;
-       trampoline_header->gdt_base = __pa(boot_gdt);
+       trampoline_header->gdt_base = __pa_symbol(boot_gdt);
  #else
+@@ -86,7 +92,7 @@ void __init setup_real_mode(void)
+       *trampoline_cr4_features = read_cr4();
+       trampoline_pgd = (u64 *) __va(real_mode_header->trampoline_pgd);
+-      trampoline_pgd[0] = init_level4_pgt[pgd_index(__PAGE_OFFSET)].pgd;
++      trampoline_pgd[0] = init_level4_pgt[pgd_index(__PAGE_OFFSET)].pgd & ~_PAGE_NX;
+       trampoline_pgd[511] = init_level4_pgt[511].pgd;
+ #endif
+ }
 diff --git a/arch/x86/realmode/rm/Makefile b/arch/x86/realmode/rm/Makefile
 index 8869287..d577672 100644
 --- a/arch/x86/realmode/rm/Makefile
@@ -31422,7 +31133,7 @@ index 431e875..cbb23f3 100644
 -}
 -__setup("vdso=", vdso_setup);
 diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
-index 2262003..f229ced 100644
+index cf95e19..17e9f50 100644
 --- a/arch/x86/xen/enlighten.c
 +++ b/arch/x86/xen/enlighten.c
 @@ -100,8 +100,6 @@ EXPORT_SYMBOL_GPL(xen_start_info);
@@ -31434,7 +31145,7 @@ index 2262003..f229ced 100644
  RESERVE_BRK(shared_info_page_brk, PAGE_SIZE);
  __read_mostly int xen_have_vector_callback;
  EXPORT_SYMBOL_GPL(xen_have_vector_callback);
-@@ -496,8 +494,7 @@ static void xen_load_gdt(const struct desc_ptr *dtr)
+@@ -511,8 +509,7 @@ static void xen_load_gdt(const struct desc_ptr *dtr)
  {
        unsigned long va = dtr->address;
        unsigned int size = dtr->size + 1;
@@ -31444,17 +31155,26 @@ index 2262003..f229ced 100644
        int f;
  
        /*
-@@ -545,8 +542,7 @@ static void __init xen_load_gdt_boot(const struct desc_ptr *dtr)
+@@ -560,8 +557,7 @@ static void __init xen_load_gdt_boot(const struct desc_ptr *dtr)
  {
        unsigned long va = dtr->address;
        unsigned int size = dtr->size + 1;
 -      unsigned pages = (size + PAGE_SIZE - 1) / PAGE_SIZE;
 -      unsigned long frames[pages];
-+      unsigned long frames[65536 / PAGE_SIZE];
++      unsigned long frames[(GDT_SIZE + PAGE_SIZE - 1) / PAGE_SIZE];
        int f;
  
        /*
-@@ -939,7 +935,7 @@ static u32 xen_safe_apic_wait_icr_idle(void)
+@@ -569,7 +565,7 @@ static void __init xen_load_gdt_boot(const struct desc_ptr *dtr)
+        * 8-byte entries, or 16 4k pages..
+        */
+-      BUG_ON(size > 65536);
++      BUG_ON(size > GDT_SIZE);
+       BUG_ON(va & ~PAGE_MASK);
+       for (f = 0; va < dtr->address + size; va += PAGE_SIZE, f++) {
+@@ -954,7 +950,7 @@ static u32 xen_safe_apic_wait_icr_idle(void)
          return 0;
  }
  
@@ -31463,7 +31183,7 @@ index 2262003..f229ced 100644
  {
        apic->read = xen_apic_read;
        apic->write = xen_apic_write;
-@@ -1245,30 +1241,30 @@ static const struct pv_apic_ops xen_apic_ops __initconst = {
+@@ -1260,30 +1256,30 @@ static const struct pv_apic_ops xen_apic_ops __initconst = {
  #endif
  };
  
@@ -31501,7 +31221,7 @@ index 2262003..f229ced 100644
  {
        if (pm_power_off)
                pm_power_off();
-@@ -1370,7 +1366,17 @@ asmlinkage void __init xen_start_kernel(void)
+@@ -1385,7 +1381,17 @@ asmlinkage void __init xen_start_kernel(void)
        __userpte_alloc_gfp &= ~__GFP_HIGHMEM;
  
        /* Work out if we support NX */
@@ -31520,23 +31240,21 @@ index 2262003..f229ced 100644
  
        xen_setup_features();
  
-@@ -1399,14 +1405,7 @@ asmlinkage void __init xen_start_kernel(void)
-               pv_mmu_ops.ptep_modify_prot_commit = xen_ptep_modify_prot_commit;
-       }
+@@ -1416,13 +1422,6 @@ asmlinkage void __init xen_start_kernel(void)
+       machine_ops = xen_machine_ops;
  
--      machine_ops = xen_machine_ops;
--
 -      /*
 -       * The only reliable way to retain the initial address of the
 -       * percpu gdt_page is to remember it here, so we can go and
 -       * mark it RW later, when the initial percpu area is freed.
 -       */
 -      xen_initial_gdt = &per_cpu(gdt_page, 0);
-+      memcpy((void *)&machine_ops, &xen_machine_ops, sizeof machine_ops);
+-
        xen_smp_init();
  
-@@ -1598,7 +1597,7 @@ static int __cpuinit xen_hvm_cpu_notify(struct notifier_block *self,
+ #ifdef CONFIG_ACPI_NUMA
+@@ -1616,7 +1615,7 @@ static int __cpuinit xen_hvm_cpu_notify(struct notifier_block *self,
        return NOTIFY_OK;
  }
  
@@ -31546,10 +31264,10 @@ index 2262003..f229ced 100644
  };
  
 diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c
-index 01de35c..0bda07b 100644
+index e006c18..b9a7d6c 100644
 --- a/arch/x86/xen/mmu.c
 +++ b/arch/x86/xen/mmu.c
-@@ -1881,6 +1881,9 @@ void __init xen_setup_kernel_pagetable(pgd_t *pgd, unsigned long max_pfn)
+@@ -1894,6 +1894,9 @@ void __init xen_setup_kernel_pagetable(pgd_t *pgd, unsigned long max_pfn)
        /* L3_k[510] -> level2_kernel_pgt
         * L3_i[511] -> level2_fixmap_pgt */
        convert_pfn_mfn(level3_kernel_pgt);
@@ -31559,7 +31277,7 @@ index 01de35c..0bda07b 100644
  
        /* We get [511][511] and have Xen's version of level2_kernel_pgt */
        l3 = m2v(pgd[pgd_index(__START_KERNEL_map)].pgd);
-@@ -1910,8 +1913,12 @@ void __init xen_setup_kernel_pagetable(pgd_t *pgd, unsigned long max_pfn)
+@@ -1923,8 +1926,12 @@ void __init xen_setup_kernel_pagetable(pgd_t *pgd, unsigned long max_pfn)
        set_page_prot(init_level4_pgt, PAGE_KERNEL_RO);
        set_page_prot(level3_ident_pgt, PAGE_KERNEL_RO);
        set_page_prot(level3_kernel_pgt, PAGE_KERNEL_RO);
@@ -31572,7 +31290,7 @@ index 01de35c..0bda07b 100644
        set_page_prot(level2_kernel_pgt, PAGE_KERNEL_RO);
        set_page_prot(level2_fixmap_pgt, PAGE_KERNEL_RO);
  
-@@ -2097,6 +2104,7 @@ static void __init xen_post_allocator_init(void)
+@@ -2110,6 +2117,7 @@ static void __init xen_post_allocator_init(void)
        pv_mmu_ops.set_pud = xen_set_pud;
  #if PAGETABLE_LEVELS == 4
        pv_mmu_ops.set_pgd = xen_set_pgd;
@@ -31580,7 +31298,7 @@ index 01de35c..0bda07b 100644
  #endif
  
        /* This will work as long as patching hasn't happened yet
-@@ -2178,6 +2186,7 @@ static const struct pv_mmu_ops xen_mmu_ops __initconst = {
+@@ -2188,6 +2196,7 @@ static const struct pv_mmu_ops xen_mmu_ops __initconst = {
        .pud_val = PV_CALLEE_SAVE(xen_pud_val),
        .make_pud = PV_CALLEE_SAVE(xen_make_pud),
        .set_pgd = xen_set_pgd_hyper,
@@ -31589,7 +31307,7 @@ index 01de35c..0bda07b 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 34bc4ce..c34aa24 100644
+index 22c800a..8915f1e 100644
 --- a/arch/x86/xen/smp.c
 +++ b/arch/x86/xen/smp.c
 @@ -229,11 +229,6 @@ static void __init xen_smp_prepare_boot_cpu(void)
@@ -31604,14 +31322,7 @@ index 34bc4ce..c34aa24 100644
        xen_filter_cpu_maps();
        xen_setup_vcpu_info_placement();
  }
-@@ -300,12 +295,12 @@ cpu_initialize_context(unsigned int cpu, struct task_struct *idle)
-       gdt = get_cpu_gdt_table(cpu);
-       ctxt->flags = VGCF_IN_KERNEL;
--      ctxt->user_regs.ds = __USER_DS;
--      ctxt->user_regs.es = __USER_DS;
-+      ctxt->user_regs.ds = __KERNEL_DS;
-+      ctxt->user_regs.es = __KERNEL_DS;
+@@ -303,7 +298,7 @@ cpu_initialize_context(unsigned int cpu, struct task_struct *idle)
        ctxt->user_regs.ss = __KERNEL_DS;
  #ifdef CONFIG_X86_32
        ctxt->user_regs.fs = __KERNEL_PERCPU;
@@ -31620,7 +31331,18 @@ index 34bc4ce..c34aa24 100644
  #else
        ctxt->gs_base_kernel = per_cpu_offset(cpu);
  #endif
-@@ -355,13 +350,12 @@ static int __cpuinit xen_cpu_up(unsigned int cpu, struct task_struct *idle)
+@@ -313,8 +308,8 @@ cpu_initialize_context(unsigned int cpu, struct task_struct *idle)
+       {
+               ctxt->user_regs.eflags = 0x1000; /* IOPL_RING1 */
+-              ctxt->user_regs.ds = __USER_DS;
+-              ctxt->user_regs.es = __USER_DS;
++              ctxt->user_regs.ds = __KERNEL_DS;
++              ctxt->user_regs.es = __KERNEL_DS;
+               xen_copy_trap_info(ctxt->trap_ctxt);
+@@ -359,13 +354,12 @@ static int __cpuinit xen_cpu_up(unsigned int cpu, struct task_struct *idle)
        int rc;
  
        per_cpu(current_task, cpu) = idle;
@@ -31636,7 +31358,7 @@ index 34bc4ce..c34aa24 100644
  #endif
        xen_setup_runstate_info(cpu);
        xen_setup_timer(cpu);
-@@ -630,7 +624,7 @@ static const struct smp_ops xen_smp_ops __initconst = {
+@@ -634,7 +628,7 @@ static const struct smp_ops xen_smp_ops __initconst = {
  
  void __init xen_smp_init(void)
  {
@@ -31824,7 +31546,7 @@ index 467c8de..f3628c5 100644
  };
  
 diff --git a/block/bsg.c b/block/bsg.c
-index ff64ae3..593560c 100644
+index 420a5a9..23834aa 100644
 --- a/block/bsg.c
 +++ b/block/bsg.c
 @@ -176,16 +176,24 @@ static int blk_fill_sgv4_hdr_rq(struct request_queue *q, struct request *rq,
@@ -31868,7 +31590,7 @@ index 7c668c8..db3521c 100644
                        err = -EFAULT;
                        goto out;
 diff --git a/block/partitions/efi.c b/block/partitions/efi.c
-index b62fb88..bdab4c4 100644
+index ff5804e..a88acad 100644
 --- a/block/partitions/efi.c
 +++ b/block/partitions/efi.c
 @@ -234,14 +234,14 @@ static gpt_entry *alloc_read_gpt_entries(struct parsed_partitions *state,
@@ -31969,61 +31691,6 @@ index 7bdd61b..afec999 100644
  
  static void cryptd_queue_worker(struct work_struct *work);
  
-diff --git a/crypto/crypto_user.c b/crypto/crypto_user.c
-index f6d9baf..dfd511f 100644
---- a/crypto/crypto_user.c
-+++ b/crypto/crypto_user.c
-@@ -30,6 +30,8 @@
- #include "internal.h"
-+#define null_terminated(x)    (strnlen(x, sizeof(x)) < sizeof(x))
-+
- static DEFINE_MUTEX(crypto_cfg_mutex);
- /* The crypto netlink socket */
-@@ -196,7 +198,10 @@ static int crypto_report(struct sk_buff *in_skb, struct nlmsghdr *in_nlh,
-       struct crypto_dump_info info;
-       int err;
--      if (!p->cru_driver_name)
-+      if (!null_terminated(p->cru_name) || !null_terminated(p->cru_driver_name))
-+              return -EINVAL;
-+
-+      if (!p->cru_driver_name[0])
-               return -EINVAL;
-       alg = crypto_alg_match(p, 1);
-@@ -260,6 +265,9 @@ static int crypto_update_alg(struct sk_buff *skb, struct nlmsghdr *nlh,
-       struct nlattr *priority = attrs[CRYPTOCFGA_PRIORITY_VAL];
-       LIST_HEAD(list);
-+      if (!null_terminated(p->cru_name) || !null_terminated(p->cru_driver_name))
-+              return -EINVAL;
-+
-       if (priority && !strlen(p->cru_driver_name))
-               return -EINVAL;
-@@ -287,6 +295,9 @@ static int crypto_del_alg(struct sk_buff *skb, struct nlmsghdr *nlh,
-       struct crypto_alg *alg;
-       struct crypto_user_alg *p = nlmsg_data(nlh);
-+      if (!null_terminated(p->cru_name) || !null_terminated(p->cru_driver_name))
-+              return -EINVAL;
-+
-       alg = crypto_alg_match(p, 1);
-       if (!alg)
-               return -ENOENT;
-@@ -368,6 +379,9 @@ static int crypto_add_alg(struct sk_buff *skb, struct nlmsghdr *nlh,
-       struct crypto_user_alg *p = nlmsg_data(nlh);
-       struct nlattr *priority = attrs[CRYPTOCFGA_PRIORITY_VAL];
-+      if (!null_terminated(p->cru_name) || !null_terminated(p->cru_driver_name))
-+              return -EINVAL;
-+
-       if (strlen(p->cru_driver_name))
-               exact = 1;
 diff --git a/drivers/acpi/apei/apei-internal.h b/drivers/acpi/apei/apei-internal.h
 index f220d64..d359ad6 100644
 --- a/drivers/acpi/apei/apei-internal.h
@@ -32038,10 +31705,10 @@ 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 e6defd8..c26a225 100644
+index fefc2ca..12a535d 100644
 --- a/drivers/acpi/apei/cper.c
 +++ b/drivers/acpi/apei/cper.c
-@@ -38,12 +38,12 @@
+@@ -39,12 +39,12 @@
   */
  u64 cper_next_record_id(void)
  {
@@ -32150,24 +31817,11 @@ index 7586544..636a2f0 100644
                err = ec_write(*off, byte_write);
                if (err)
                        return err;
-diff --git a/drivers/acpi/processor_driver.c b/drivers/acpi/processor_driver.c
-index e83311b..142b5cc 100644
---- a/drivers/acpi/processor_driver.c
-+++ b/drivers/acpi/processor_driver.c
-@@ -558,7 +558,7 @@ static int __cpuinit acpi_processor_add(struct acpi_device *device)
-               return 0;
- #endif
--      BUG_ON((pr->id >= nr_cpu_ids) || (pr->id < 0));
-+      BUG_ON(pr->id >= nr_cpu_ids);
-       /*
-        * Buggy BIOS check
 diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
-index ed9a1cc..f4a354c 100644
+index ee255c6..747c68b 100644
 --- a/drivers/acpi/processor_idle.c
 +++ b/drivers/acpi/processor_idle.c
-@@ -1005,7 +1005,7 @@ static int acpi_processor_setup_cpuidle_states(struct acpi_processor *pr)
+@@ -986,7 +986,7 @@ static int acpi_processor_setup_cpuidle_states(struct acpi_processor *pr)
  {
        int i, count = CPUIDLE_DRIVER_STATE_START;
        struct acpi_processor_cx *cx;
@@ -32177,7 +31831,7 @@ index ed9a1cc..f4a354c 100644
  
        if (!pr->flags.power_setup_done)
 diff --git a/drivers/acpi/sysfs.c b/drivers/acpi/sysfs.c
-index ea61ca9..3fdd70d 100644
+index 41c0504..f8c0836 100644
 --- a/drivers/acpi/sysfs.c
 +++ b/drivers/acpi/sysfs.c
 @@ -420,11 +420,11 @@ static u32 num_counters;
@@ -32195,7 +31849,7 @@ index ea61ca9..3fdd70d 100644
  static void delete_gpe_attr_array(void)
  {
 diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c
-index 6cd7805..07facb3 100644
+index 34c8216..f56c828 100644
 --- a/drivers/ata/libahci.c
 +++ b/drivers/ata/libahci.c
 @@ -1230,7 +1230,7 @@ int ahci_kick_engine(struct ata_port *ap)
@@ -32208,10 +31862,10 @@ index 6cd7805..07facb3 100644
                                unsigned long timeout_msec)
  {
 diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
-index 46cd3f4..0871ad0 100644
+index 63c743b..0422dc6 100644
 --- a/drivers/ata/libata-core.c
 +++ b/drivers/ata/libata-core.c
-@@ -4780,7 +4780,7 @@ void ata_qc_free(struct ata_queued_cmd *qc)
+@@ -4786,7 +4786,7 @@ void ata_qc_free(struct ata_queued_cmd *qc)
        struct ata_port *ap;
        unsigned int tag;
  
@@ -32220,7 +31874,7 @@ index 46cd3f4..0871ad0 100644
        ap = qc->ap;
  
        qc->flags = 0;
-@@ -4796,7 +4796,7 @@ void __ata_qc_complete(struct ata_queued_cmd *qc)
+@@ -4802,7 +4802,7 @@ void __ata_qc_complete(struct ata_queued_cmd *qc)
        struct ata_port *ap;
        struct ata_link *link;
  
@@ -32229,7 +31883,7 @@ index 46cd3f4..0871ad0 100644
        WARN_ON_ONCE(!(qc->flags & ATA_QCFLAG_ACTIVE));
        ap = qc->ap;
        link = qc->dev->link;
-@@ -5892,6 +5892,7 @@ static void ata_finalize_port_ops(struct ata_port_operations *ops)
+@@ -5920,6 +5920,7 @@ static void ata_finalize_port_ops(struct ata_port_operations *ops)
                return;
  
        spin_lock(&lock);
@@ -32237,7 +31891,7 @@ index 46cd3f4..0871ad0 100644
  
        for (cur = ops->inherits; cur; cur = cur->inherits) {
                void **inherit = (void **)cur;
-@@ -5905,8 +5906,9 @@ static void ata_finalize_port_ops(struct ata_port_operations *ops)
+@@ -5933,8 +5934,9 @@ static void ata_finalize_port_ops(struct ata_port_operations *ops)
                if (IS_ERR(*pp))
                        *pp = NULL;
  
@@ -32317,10 +31971,10 @@ index 77a7480..05cde58 100644
    }
    
 diff --git a/drivers/atm/atmtcp.c b/drivers/atm/atmtcp.c
-index b22d71c..d6e1049 100644
+index 0e3f8f9..765a7a5 100644
 --- a/drivers/atm/atmtcp.c
 +++ b/drivers/atm/atmtcp.c
-@@ -207,7 +207,7 @@ static int atmtcp_v_send(struct atm_vcc *vcc,struct sk_buff *skb)
+@@ -206,7 +206,7 @@ static int atmtcp_v_send(struct atm_vcc *vcc,struct sk_buff *skb)
                if (vcc->pop) vcc->pop(vcc,skb);
                else dev_kfree_skb(skb);
                if (dev_data) return 0;
@@ -32329,7 +31983,7 @@ index b22d71c..d6e1049 100644
                return -ENOLINK;
        }
        size = skb->len+sizeof(struct atmtcp_hdr);
-@@ -215,7 +215,7 @@ static int atmtcp_v_send(struct atm_vcc *vcc,struct sk_buff *skb)
+@@ -214,7 +214,7 @@ static int atmtcp_v_send(struct atm_vcc *vcc,struct sk_buff *skb)
        if (!new_skb) {
                if (vcc->pop) vcc->pop(vcc,skb);
                else dev_kfree_skb(skb);
@@ -32338,7 +31992,7 @@ index b22d71c..d6e1049 100644
                return -ENOBUFS;
        }
        hdr = (void *) skb_put(new_skb,sizeof(struct atmtcp_hdr));
-@@ -226,8 +226,8 @@ static int atmtcp_v_send(struct atm_vcc *vcc,struct sk_buff *skb)
+@@ -225,8 +225,8 @@ static int atmtcp_v_send(struct atm_vcc *vcc,struct sk_buff *skb)
        if (vcc->pop) vcc->pop(vcc,skb);
        else dev_kfree_skb(skb);
        out_vcc->push(out_vcc,new_skb);
@@ -32349,7 +32003,7 @@ index b22d71c..d6e1049 100644
        return 0;
  }
  
-@@ -301,7 +301,7 @@ static int atmtcp_c_send(struct atm_vcc *vcc,struct sk_buff *skb)
+@@ -299,7 +299,7 @@ static int atmtcp_c_send(struct atm_vcc *vcc,struct sk_buff *skb)
        out_vcc = find_vcc(dev, ntohs(hdr->vpi), ntohs(hdr->vci));
        read_unlock(&vcc_sklist_lock);
        if (!out_vcc) {
@@ -32358,7 +32012,7 @@ index b22d71c..d6e1049 100644
                goto done;
        }
        skb_pull(skb,sizeof(struct atmtcp_hdr));
-@@ -313,8 +313,8 @@ static int atmtcp_c_send(struct atm_vcc *vcc,struct sk_buff *skb)
+@@ -311,8 +311,8 @@ static int atmtcp_c_send(struct atm_vcc *vcc,struct sk_buff *skb)
        __net_timestamp(new_skb);
        skb_copy_from_linear_data(skb, skb_put(new_skb, skb->len), skb->len);
        out_vcc->push(out_vcc,new_skb);
@@ -32370,7 +32024,7 @@ index b22d71c..d6e1049 100644
        if (vcc->pop) vcc->pop(vcc,skb);
        else dev_kfree_skb(skb);
 diff --git a/drivers/atm/eni.c b/drivers/atm/eni.c
-index c1eb6fa..4c71be9 100644
+index b1955ba..b179940 100644
 --- a/drivers/atm/eni.c
 +++ b/drivers/atm/eni.c
 @@ -522,7 +522,7 @@ static int rx_aal0(struct atm_vcc *vcc)
@@ -32516,10 +32170,10 @@ index 204814e..cede831 100644
            fore200e->tx_sat++;
            DPRINTK(2, "tx queue of device %s is saturated, PDU dropped - heartbeat is %08x\n",
 diff --git a/drivers/atm/he.c b/drivers/atm/he.c
-index 72b6960..cf9167a 100644
+index d689126..e78e412 100644
 --- a/drivers/atm/he.c
 +++ b/drivers/atm/he.c
-@@ -1699,7 +1699,7 @@ he_service_rbrq(struct he_dev *he_dev, int group)
+@@ -1698,7 +1698,7 @@ he_service_rbrq(struct he_dev *he_dev, int group)
  
                if (RBRQ_HBUF_ERR(he_dev->rbrq_head)) {
                        hprintk("HBUF_ERR!  (cid 0x%x)\n", cid);
@@ -32528,7 +32182,7 @@ index 72b6960..cf9167a 100644
                        goto return_host_buffers;
                }
  
-@@ -1726,7 +1726,7 @@ he_service_rbrq(struct he_dev *he_dev, int group)
+@@ -1725,7 +1725,7 @@ he_service_rbrq(struct he_dev *he_dev, int group)
                                RBRQ_LEN_ERR(he_dev->rbrq_head)
                                                        ? "LEN_ERR" : "",
                                                        vcc->vpi, vcc->vci);
@@ -32537,7 +32191,7 @@ index 72b6960..cf9167a 100644
                        goto return_host_buffers;
                }
  
-@@ -1778,7 +1778,7 @@ he_service_rbrq(struct he_dev *he_dev, int group)
+@@ -1777,7 +1777,7 @@ he_service_rbrq(struct he_dev *he_dev, int group)
                vcc->push(vcc, skb);
                spin_lock(&he_dev->global_lock);
  
@@ -32546,7 +32200,7 @@ index 72b6960..cf9167a 100644
  
  return_host_buffers:
                ++pdus_assembled;
-@@ -2104,7 +2104,7 @@ __enqueue_tpd(struct he_dev *he_dev, struct he_tpd *tpd, unsigned cid)
+@@ -2103,7 +2103,7 @@ __enqueue_tpd(struct he_dev *he_dev, struct he_tpd *tpd, unsigned cid)
                                        tpd->vcc->pop(tpd->vcc, tpd->skb);
                                else
                                        dev_kfree_skb_any(tpd->skb);
@@ -32555,7 +32209,7 @@ index 72b6960..cf9167a 100644
                        }
                        pci_pool_free(he_dev->tpd_pool, tpd, TPD_ADDR(tpd->status));
                        return;
-@@ -2516,7 +2516,7 @@ he_send(struct atm_vcc *vcc, struct sk_buff *skb)
+@@ -2515,7 +2515,7 @@ he_send(struct atm_vcc *vcc, struct sk_buff *skb)
                        vcc->pop(vcc, skb);
                else
                        dev_kfree_skb_any(skb);
@@ -32564,7 +32218,7 @@ index 72b6960..cf9167a 100644
                return -EINVAL;
        }
  
-@@ -2527,7 +2527,7 @@ he_send(struct atm_vcc *vcc, struct sk_buff *skb)
+@@ -2526,7 +2526,7 @@ he_send(struct atm_vcc *vcc, struct sk_buff *skb)
                        vcc->pop(vcc, skb);
                else
                        dev_kfree_skb_any(skb);
@@ -32573,7 +32227,7 @@ index 72b6960..cf9167a 100644
                return -EINVAL;
        }
  #endif
-@@ -2539,7 +2539,7 @@ he_send(struct atm_vcc *vcc, struct sk_buff *skb)
+@@ -2538,7 +2538,7 @@ he_send(struct atm_vcc *vcc, struct sk_buff *skb)
                        vcc->pop(vcc, skb);
                else
                        dev_kfree_skb_any(skb);
@@ -32582,7 +32236,7 @@ index 72b6960..cf9167a 100644
                spin_unlock_irqrestore(&he_dev->global_lock, flags);
                return -ENOMEM;
        }
-@@ -2581,7 +2581,7 @@ he_send(struct atm_vcc *vcc, struct sk_buff *skb)
+@@ -2580,7 +2580,7 @@ he_send(struct atm_vcc *vcc, struct sk_buff *skb)
                                        vcc->pop(vcc, skb);
                                else
                                        dev_kfree_skb_any(skb);
@@ -32591,7 +32245,7 @@ index 72b6960..cf9167a 100644
                                spin_unlock_irqrestore(&he_dev->global_lock, flags);
                                return -ENOMEM;
                        }
-@@ -2612,7 +2612,7 @@ he_send(struct atm_vcc *vcc, struct sk_buff *skb)
+@@ -2611,7 +2611,7 @@ he_send(struct atm_vcc *vcc, struct sk_buff *skb)
        __enqueue_tpd(he_dev, tpd, cid);
        spin_unlock_irqrestore(&he_dev->global_lock, flags);
  
@@ -32939,10 +32593,10 @@ index fa7d701..1e404c7 100644
        lvcc->rx.buf.ptr = &lvcc->rx.buf.start[SERVICE_GET_END(s) * 4];
        cardvcc_write(lvcc, SERVICE_GET_END(s), vcc_rxreadptr);
 diff --git a/drivers/atm/nicstar.c b/drivers/atm/nicstar.c
-index ed1d2b7..8cffc1f 100644
+index 6587dc2..149833d 100644
 --- a/drivers/atm/nicstar.c
 +++ b/drivers/atm/nicstar.c
-@@ -1654,7 +1654,7 @@ static int ns_send(struct atm_vcc *vcc, struct sk_buff *skb)
+@@ -1641,7 +1641,7 @@ static int ns_send(struct atm_vcc *vcc, struct sk_buff *skb)
        if ((vc = (vc_map *) vcc->dev_data) == NULL) {
                printk("nicstar%d: vcc->dev_data == NULL on ns_send().\n",
                       card->index);
@@ -32951,7 +32605,7 @@ index ed1d2b7..8cffc1f 100644
                dev_kfree_skb_any(skb);
                return -EINVAL;
        }
-@@ -1662,7 +1662,7 @@ static int ns_send(struct atm_vcc *vcc, struct sk_buff *skb)
+@@ -1649,7 +1649,7 @@ static int ns_send(struct atm_vcc *vcc, struct sk_buff *skb)
        if (!vc->tx) {
                printk("nicstar%d: Trying to transmit on a non-tx VC.\n",
                       card->index);
@@ -32960,7 +32614,7 @@ index ed1d2b7..8cffc1f 100644
                dev_kfree_skb_any(skb);
                return -EINVAL;
        }
-@@ -1670,14 +1670,14 @@ static int ns_send(struct atm_vcc *vcc, struct sk_buff *skb)
+@@ -1657,14 +1657,14 @@ static int ns_send(struct atm_vcc *vcc, struct sk_buff *skb)
        if (vcc->qos.aal != ATM_AAL5 && vcc->qos.aal != ATM_AAL0) {
                printk("nicstar%d: Only AAL0 and AAL5 are supported.\n",
                       card->index);
@@ -32977,7 +32631,7 @@ index ed1d2b7..8cffc1f 100644
                dev_kfree_skb_any(skb);
                return -EINVAL;
        }
-@@ -1725,11 +1725,11 @@ static int ns_send(struct atm_vcc *vcc, struct sk_buff *skb)
+@@ -1712,11 +1712,11 @@ static int ns_send(struct atm_vcc *vcc, struct sk_buff *skb)
        }
  
        if (push_scqe(card, vc, scq, &scqe, skb) != 0) {
@@ -32991,7 +32645,7 @@ index ed1d2b7..8cffc1f 100644
  
        return 0;
  }
-@@ -2046,14 +2046,14 @@ static void dequeue_rx(ns_dev * card, ns_rsqe * rsqe)
+@@ -2033,14 +2033,14 @@ static void dequeue_rx(ns_dev * card, ns_rsqe * rsqe)
                                printk
                                    ("nicstar%d: Can't allocate buffers for aal0.\n",
                                     card->index);
@@ -33008,7 +32662,7 @@ index ed1d2b7..8cffc1f 100644
                                dev_kfree_skb_any(sb);
                                break;
                        }
-@@ -2068,7 +2068,7 @@ static void dequeue_rx(ns_dev * card, ns_rsqe * rsqe)
+@@ -2055,7 +2055,7 @@ static void dequeue_rx(ns_dev * card, ns_rsqe * rsqe)
                        ATM_SKB(sb)->vcc = vcc;
                        __net_timestamp(sb);
                        vcc->push(vcc, sb);
@@ -33017,7 +32671,7 @@ index ed1d2b7..8cffc1f 100644
                        cell += ATM_CELL_PAYLOAD;
                }
  
-@@ -2085,7 +2085,7 @@ static void dequeue_rx(ns_dev * card, ns_rsqe * rsqe)
+@@ -2072,7 +2072,7 @@ static void dequeue_rx(ns_dev * card, ns_rsqe * rsqe)
                        if (iovb == NULL) {
                                printk("nicstar%d: Out of iovec buffers.\n",
                                       card->index);
@@ -33026,7 +32680,7 @@ index ed1d2b7..8cffc1f 100644
                                recycle_rx_buf(card, skb);
                                return;
                        }
-@@ -2109,7 +2109,7 @@ static void dequeue_rx(ns_dev * card, ns_rsqe * rsqe)
+@@ -2096,7 +2096,7 @@ static void dequeue_rx(ns_dev * card, ns_rsqe * rsqe)
                   small or large buffer itself. */
        } else if (NS_PRV_IOVCNT(iovb) >= NS_MAX_IOVECS) {
                printk("nicstar%d: received too big AAL5 SDU.\n", card->index);
@@ -33035,7 +32689,7 @@ index ed1d2b7..8cffc1f 100644
                recycle_iovec_rx_bufs(card, (struct iovec *)iovb->data,
                                      NS_MAX_IOVECS);
                NS_PRV_IOVCNT(iovb) = 0;
-@@ -2129,7 +2129,7 @@ static void dequeue_rx(ns_dev * card, ns_rsqe * rsqe)
+@@ -2116,7 +2116,7 @@ static void dequeue_rx(ns_dev * card, ns_rsqe * rsqe)
                            ("nicstar%d: Expected a small buffer, and this is not one.\n",
                             card->index);
                        which_list(card, skb);
@@ -33044,7 +32698,7 @@ index ed1d2b7..8cffc1f 100644
                        recycle_rx_buf(card, skb);
                        vc->rx_iov = NULL;
                        recycle_iov_buf(card, iovb);
-@@ -2142,7 +2142,7 @@ static void dequeue_rx(ns_dev * card, ns_rsqe * rsqe)
+@@ -2129,7 +2129,7 @@ static void dequeue_rx(ns_dev * card, ns_rsqe * rsqe)
                            ("nicstar%d: Expected a large buffer, and this is not one.\n",
                             card->index);
                        which_list(card, skb);
@@ -33053,7 +32707,7 @@ index ed1d2b7..8cffc1f 100644
                        recycle_iovec_rx_bufs(card, (struct iovec *)iovb->data,
                                              NS_PRV_IOVCNT(iovb));
                        vc->rx_iov = NULL;
-@@ -2165,7 +2165,7 @@ static void dequeue_rx(ns_dev * card, ns_rsqe * rsqe)
+@@ -2152,7 +2152,7 @@ static void dequeue_rx(ns_dev * card, ns_rsqe * rsqe)
                                printk(" - PDU size mismatch.\n");
                        else
                                printk(".\n");
@@ -33062,7 +32716,7 @@ index ed1d2b7..8cffc1f 100644
                        recycle_iovec_rx_bufs(card, (struct iovec *)iovb->data,
                                              NS_PRV_IOVCNT(iovb));
                        vc->rx_iov = NULL;
-@@ -2179,7 +2179,7 @@ static void dequeue_rx(ns_dev * card, ns_rsqe * rsqe)
+@@ -2166,7 +2166,7 @@ static void dequeue_rx(ns_dev * card, ns_rsqe * rsqe)
                        /* skb points to a small buffer */
                        if (!atm_charge(vcc, skb->truesize)) {
                                push_rxbufs(card, skb);
@@ -33071,7 +32725,7 @@ index ed1d2b7..8cffc1f 100644
                        } else {
                                skb_put(skb, len);
                                dequeue_sm_buf(card, skb);
-@@ -2189,7 +2189,7 @@ static void dequeue_rx(ns_dev * card, ns_rsqe * rsqe)
+@@ -2176,7 +2176,7 @@ static void dequeue_rx(ns_dev * card, ns_rsqe * rsqe)
                                ATM_SKB(skb)->vcc = vcc;
                                __net_timestamp(skb);
                                vcc->push(vcc, skb);
@@ -33080,7 +32734,7 @@ index ed1d2b7..8cffc1f 100644
                        }
                } else if (NS_PRV_IOVCNT(iovb) == 2) {  /* One small plus one large buffer */
                        struct sk_buff *sb;
-@@ -2200,7 +2200,7 @@ static void dequeue_rx(ns_dev * card, ns_rsqe * rsqe)
+@@ -2187,7 +2187,7 @@ static void dequeue_rx(ns_dev * card, ns_rsqe * rsqe)
                        if (len <= NS_SMBUFSIZE) {
                                if (!atm_charge(vcc, sb->truesize)) {
                                        push_rxbufs(card, sb);
@@ -33089,7 +32743,7 @@ index ed1d2b7..8cffc1f 100644
                                } else {
                                        skb_put(sb, len);
                                        dequeue_sm_buf(card, sb);
-@@ -2210,7 +2210,7 @@ static void dequeue_rx(ns_dev * card, ns_rsqe * rsqe)
+@@ -2197,7 +2197,7 @@ static void dequeue_rx(ns_dev * card, ns_rsqe * rsqe)
                                        ATM_SKB(sb)->vcc = vcc;
                                        __net_timestamp(sb);
                                        vcc->push(vcc, sb);
@@ -33098,7 +32752,7 @@ index ed1d2b7..8cffc1f 100644
                                }
  
                                push_rxbufs(card, skb);
-@@ -2219,7 +2219,7 @@ static void dequeue_rx(ns_dev * card, ns_rsqe * rsqe)
+@@ -2206,7 +2206,7 @@ static void dequeue_rx(ns_dev * card, ns_rsqe * rsqe)
  
                                if (!atm_charge(vcc, skb->truesize)) {
                                        push_rxbufs(card, skb);
@@ -33107,7 +32761,7 @@ index ed1d2b7..8cffc1f 100644
                                } else {
                                        dequeue_lg_buf(card, skb);
  #ifdef NS_USE_DESTRUCTORS
-@@ -2232,7 +2232,7 @@ static void dequeue_rx(ns_dev * card, ns_rsqe * rsqe)
+@@ -2219,7 +2219,7 @@ static void dequeue_rx(ns_dev * card, ns_rsqe * rsqe)
                                        ATM_SKB(skb)->vcc = vcc;
                                        __net_timestamp(skb);
                                        vcc->push(vcc, skb);
@@ -33116,7 +32770,7 @@ index ed1d2b7..8cffc1f 100644
                                }
  
                                push_rxbufs(card, sb);
-@@ -2253,7 +2253,7 @@ static void dequeue_rx(ns_dev * card, ns_rsqe * rsqe)
+@@ -2240,7 +2240,7 @@ static void dequeue_rx(ns_dev * card, ns_rsqe * rsqe)
                                        printk
                                            ("nicstar%d: Out of huge buffers.\n",
                                             card->index);
@@ -33125,7 +32779,7 @@ index ed1d2b7..8cffc1f 100644
                                        recycle_iovec_rx_bufs(card,
                                                              (struct iovec *)
                                                              iovb->data,
-@@ -2304,7 +2304,7 @@ static void dequeue_rx(ns_dev * card, ns_rsqe * rsqe)
+@@ -2291,7 +2291,7 @@ static void dequeue_rx(ns_dev * card, ns_rsqe * rsqe)
                                        card->hbpool.count++;
                                } else
                                        dev_kfree_skb_any(hb);
@@ -33134,7 +32788,7 @@ index ed1d2b7..8cffc1f 100644
                        } else {
                                /* Copy the small buffer to the huge buffer */
                                sb = (struct sk_buff *)iov->iov_base;
-@@ -2341,7 +2341,7 @@ static void dequeue_rx(ns_dev * card, ns_rsqe * rsqe)
+@@ -2328,7 +2328,7 @@ static void dequeue_rx(ns_dev * card, ns_rsqe * rsqe)
  #endif /* NS_USE_DESTRUCTORS */
                                __net_timestamp(hb);
                                vcc->push(vcc, hb);
@@ -33144,7 +32798,7 @@ index ed1d2b7..8cffc1f 100644
                }
  
 diff --git a/drivers/atm/solos-pci.c b/drivers/atm/solos-pci.c
-index 0474a89..06ea4a1 100644
+index 32784d1..4a8434a 100644
 --- a/drivers/atm/solos-pci.c
 +++ b/drivers/atm/solos-pci.c
 @@ -838,7 +838,7 @@ void solos_bh(unsigned long card_arg)
@@ -33156,7 +32810,7 @@ index 0474a89..06ea4a1 100644
                                break;
  
                        case PKT_STATUS:
-@@ -1117,7 +1117,7 @@ static uint32_t fpga_tx(struct solos_card *card)
+@@ -1116,7 +1116,7 @@ static uint32_t fpga_tx(struct solos_card *card)
                        vcc = SKB_CB(oldskb)->vcc;
  
                        if (vcc) {
@@ -33260,7 +32914,7 @@ index 969c3c2..9b72956 100644
  }
  
 diff --git a/drivers/base/bus.c b/drivers/base/bus.c
-index 6856303..0602d70 100644
+index 519865b..e540db3 100644
 --- a/drivers/base/bus.c
 +++ b/drivers/base/bus.c
 @@ -1163,7 +1163,7 @@ int subsys_interface_register(struct subsys_interface *sif)
@@ -33282,10 +32936,10 @@ index 6856303..0602d70 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 17cf7ca..7e553e1 100644
+index 01fc5b0..d0ed716 100644
 --- a/drivers/base/devtmpfs.c
 +++ b/drivers/base/devtmpfs.c
-@@ -347,7 +347,7 @@ int devtmpfs_mount(const char *mntdir)
+@@ -348,7 +348,7 @@ int devtmpfs_mount(const char *mntdir)
        if (!thread)
                return 0;
  
@@ -33308,10 +32962,10 @@ index fac124a..66bd4ab 100644
  static ssize_t show_node_state(struct device *dev,
                               struct device_attribute *attr, char *buf)
 diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
-index acc3a8d..981c236 100644
+index 9a6b05a..2fc8fb9 100644
 --- a/drivers/base/power/domain.c
 +++ b/drivers/base/power/domain.c
-@@ -1851,7 +1851,7 @@ int pm_genpd_attach_cpuidle(struct generic_pm_domain *genpd, int state)
+@@ -1850,7 +1850,7 @@ int pm_genpd_attach_cpuidle(struct generic_pm_domain *genpd, int state)
  {
        struct cpuidle_driver *cpuidle_drv;
        struct gpd_cpu_data *cpu_data;
@@ -33320,7 +32974,7 @@ index acc3a8d..981c236 100644
        int ret = 0;
  
        if (IS_ERR_OR_NULL(genpd) || state < 0)
-@@ -1919,7 +1919,7 @@ int pm_genpd_name_attach_cpuidle(const char *name, int state)
+@@ -1918,7 +1918,7 @@ int pm_genpd_name_attach_cpuidle(const char *name, int state)
  int pm_genpd_detach_cpuidle(struct generic_pm_domain *genpd)
  {
        struct gpd_cpu_data *cpu_data;
@@ -33330,7 +32984,7 @@ index acc3a8d..981c236 100644
  
        if (IS_ERR_OR_NULL(genpd))
 diff --git a/drivers/base/power/wakeup.c b/drivers/base/power/wakeup.c
-index e6ee5e8..98ad7fc 100644
+index 79715e7..df06b3b 100644
 --- a/drivers/base/power/wakeup.c
 +++ b/drivers/base/power/wakeup.c
 @@ -29,14 +29,14 @@ bool events_check_enabled __read_mostly;
@@ -33350,7 +33004,7 @@ index e6ee5e8..98ad7fc 100644
  
        *cnt = (comb >> IN_PROGRESS_BITS);
        *inpr = comb & MAX_IN_PROGRESS;
-@@ -389,7 +389,7 @@ static void wakeup_source_activate(struct wakeup_source *ws)
+@@ -395,7 +395,7 @@ static void wakeup_source_activate(struct wakeup_source *ws)
                ws->start_prevent_time = ws->last_time;
  
        /* Increment the counter of events in progress. */
@@ -33359,7 +33013,7 @@ index e6ee5e8..98ad7fc 100644
  
        trace_wakeup_source_activate(ws->name, cec);
  }
-@@ -515,7 +515,7 @@ static void wakeup_source_deactivate(struct wakeup_source *ws)
+@@ -521,7 +521,7 @@ static void wakeup_source_deactivate(struct wakeup_source *ws)
         * Increment the counter of registered wakeup events and decrement the
         * couter of wakeup events in progress simultaneously.
         */
@@ -33391,7 +33045,7 @@ index e8d11b6..7b1b36f 100644
  }
  EXPORT_SYMBOL_GPL(unregister_syscore_ops);
 diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
-index ade58bc..867143d 100644
+index 1c1b8e5..b7fc681 100644
 --- a/drivers/block/cciss.c
 +++ b/drivers/block/cciss.c
 @@ -1196,6 +1196,8 @@ static int cciss_ioctl32_passthru(struct block_device *bdev, fmode_t mode,
@@ -33695,7 +33349,7 @@ index 6b51afa..17e1191 100644
        set_fs(KERNEL_DS);
        if (level == SOL_SOCKET)
 diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c
-index 8c13eeb..217adee 100644
+index 54d03d4..332f311 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,
@@ -33728,7 +33382,7 @@ index 8c13eeb..217adee 100644
  
        idr_destroy(&tconn->volumes);
 diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c
-index a9eccfc..f5efe87 100644
+index 2f5fffd..b22a1ae 100644
 --- a/drivers/block/drbd/drbd_receiver.c
 +++ b/drivers/block/drbd/drbd_receiver.c
 @@ -833,7 +833,7 @@ int drbd_connected(struct drbd_conf *mdev)
@@ -33799,7 +33453,7 @@ index a9eccfc..f5efe87 100644
        atomic_inc(&peer_req->epoch->active);
        spin_unlock(&tconn->epoch_lock);
  
-@@ -4346,7 +4346,7 @@ struct data_cmd {
+@@ -4345,7 +4345,7 @@ struct data_cmd {
        int expect_payload;
        size_t pkt_size;
        int (*fn)(struct drbd_tconn *, struct packet_info *);
@@ -33808,7 +33462,7 @@ index a9eccfc..f5efe87 100644
  
  static struct data_cmd drbd_cmd_handler[] = {
        [P_DATA]            = { 1, sizeof(struct p_data), receive_Data },
-@@ -4466,7 +4466,7 @@ static void conn_disconnect(struct drbd_tconn *tconn)
+@@ -4465,7 +4465,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 */
@@ -33817,7 +33471,7 @@ index a9eccfc..f5efe87 100644
        tconn->send.seen_any_write_yet = false;
  
        conn_info(tconn, "Connection closed\n");
-@@ -5222,7 +5222,7 @@ static int tconn_finish_peer_reqs(struct drbd_tconn *tconn)
+@@ -5221,7 +5221,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 *);
@@ -33827,10 +33481,10 @@ index a9eccfc..f5efe87 100644
  static struct asender_cmd asender_tbl[] = {
        [P_PING]            = { 0, got_Ping },
 diff --git a/drivers/block/loop.c b/drivers/block/loop.c
-index f74f2c0..bb668af 100644
+index dfe7583..83768bb 100644
 --- a/drivers/block/loop.c
 +++ b/drivers/block/loop.c
-@@ -226,7 +226,7 @@ static int __do_lo_send_write(struct file *file,
+@@ -231,7 +231,7 @@ static int __do_lo_send_write(struct file *file,
        mm_segment_t old_fs = get_fs();
  
        set_fs(get_ds());
@@ -33839,6 +33493,19 @@ index f74f2c0..bb668af 100644
        set_fs(old_fs);
        if (likely(bw == len))
                return 0;
+diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c
+index 2e7de7a..ed86dc0 100644
+--- a/drivers/block/pktcdvd.c
++++ b/drivers/block/pktcdvd.c
+@@ -83,7 +83,7 @@
+ #define MAX_SPEED 0xffff
+-#define ZONE(sector, pd) (((sector) + (pd)->offset) & ~((pd)->settings.size - 1))
++#define ZONE(sector, pd) (((sector) + (pd)->offset) & ~((pd)->settings.size - 1UL))
+ static DEFINE_MUTEX(pktcdvd_mutex);
+ static struct pktcdvd_device *pkt_devs[MAX_WRITERS];
 diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c
 index d620b44..587561e 100644
 --- a/drivers/cdrom/cdrom.c
@@ -33886,7 +33553,7 @@ index d59cdcb..11afddf 100644
  
  static int gdrom_bdops_open(struct block_device *bdev, fmode_t mode)
 diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig
-index 72bedad..8181ce1 100644
+index 3bb6fa3..34013fb 100644
 --- a/drivers/char/Kconfig
 +++ b/drivers/char/Kconfig
 @@ -8,7 +8,8 @@ source "drivers/tty/Kconfig"
@@ -33899,7 +33566,7 @@ index 72bedad..8181ce1 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
-@@ -581,6 +582,7 @@ config DEVPORT
+@@ -582,6 +583,7 @@ config DEVPORT
        bool
        depends on !M68K
        depends on ISA || PCI
@@ -33933,10 +33600,10 @@ index 21cb980..f15107c 100644
                    return -EINVAL;
            else
 diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c
-index fe6d4be..89f32100 100644
+index d784650..e8bfd69 100644
 --- a/drivers/char/hpet.c
 +++ b/drivers/char/hpet.c
-@@ -571,7 +571,7 @@ static inline unsigned long hpet_time_div(struct hpets *hpets,
+@@ -559,7 +559,7 @@ static inline unsigned long hpet_time_div(struct hpets *hpets,
  }
  
  static int
@@ -33980,7 +33647,7 @@ index 053201b0..8335cce 100644
        intf->proc_dir = NULL;
  
 diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
-index 1c7fdcd..4899100 100644
+index 0ac9b45..6179fb5 100644
 --- a/drivers/char/ipmi/ipmi_si_intf.c
 +++ b/drivers/char/ipmi/ipmi_si_intf.c
 @@ -275,7 +275,7 @@ struct smi_info {
@@ -34004,7 +33671,7 @@ index 1c7fdcd..4899100 100644
  
  #define SI_MAX_PARMS 4
  
-@@ -3225,7 +3225,7 @@ static int try_smi_init(struct smi_info *new_smi)
+@@ -3254,7 +3254,7 @@ static int try_smi_init(struct smi_info *new_smi)
        atomic_set(&new_smi->req_events, 0);
        new_smi->run_to_completion = 0;
        for (i = 0; i < SI_NUM_STATS; i++)
@@ -34014,7 +33681,7 @@ index 1c7fdcd..4899100 100644
        new_smi->interrupt_disabled = 1;
        atomic_set(&new_smi->stop_operation, 0);
 diff --git a/drivers/char/mem.c b/drivers/char/mem.c
-index c6fa3bc..4ca3e42 100644
+index 2c644af..b867b3e 100644
 --- a/drivers/char/mem.c
 +++ b/drivers/char/mem.c
 @@ -18,6 +18,7 @@
@@ -34101,7 +33768,7 @@ index c6fa3bc..4ca3e42 100644
        unsigned long p = *ppos;
 -      ssize_t low_count, read, sz;
 +      ssize_t low_count, read, sz, err = 0;
-       char * kbuf; /* k-addr because vread() takes vmlist_lock rwlock */
+       char *kbuf; /* k-addr because vread() takes vmlist_lock rwlock */
 -      int err = 0;
  
        read = 0;
@@ -34163,40 +33830,40 @@ index 9df78e2..01ba9ae 100644
  
        *ppos = i;
 diff --git a/drivers/char/pcmcia/synclink_cs.c b/drivers/char/pcmcia/synclink_cs.c
-index b66eaa0..2619d1b 100644
+index 5c5cc00..ac9edb7 100644
 --- a/drivers/char/pcmcia/synclink_cs.c
 +++ b/drivers/char/pcmcia/synclink_cs.c
-@@ -2348,9 +2348,9 @@ static void mgslpc_close(struct tty_struct *tty, struct file * filp)
+@@ -2345,9 +2345,9 @@ static void mgslpc_close(struct tty_struct *tty, struct file * filp)
  
        if (debug_level >= DEBUG_LEVEL_INFO)
                printk("%s(%d):mgslpc_close(%s) entry, count=%d\n",
--                       __FILE__,__LINE__, info->device_name, port->count);
-+                       __FILE__,__LINE__, info->device_name, atomic_read(&port->count));
+-                       __FILE__, __LINE__, info->device_name, port->count);
++                       __FILE__, __LINE__, info->device_name, atomic_read(&port->count));
  
 -      WARN_ON(!port->count);
 +      WARN_ON(!atomic_read(&port->count));
  
        if (tty_port_close_start(port, tty, filp) == 0)
                goto cleanup;
-@@ -2368,7 +2368,7 @@ static void mgslpc_close(struct tty_struct *tty, struct file * filp)
+@@ -2365,7 +2365,7 @@ static void mgslpc_close(struct tty_struct *tty, struct file * filp)
  cleanup:
        if (debug_level >= DEBUG_LEVEL_INFO)
-               printk("%s(%d):mgslpc_close(%s) exit, count=%d\n", __FILE__,__LINE__,
+               printk("%s(%d):mgslpc_close(%s) exit, count=%d\n", __FILE__, __LINE__,
 -                      tty->driver->name, port->count);
 +                      tty->driver->name, atomic_read(&port->count));
  }
  
  /* Wait until the transmitter is empty.
-@@ -2510,7 +2510,7 @@ static int mgslpc_open(struct tty_struct *tty, struct file * filp)
+@@ -2507,7 +2507,7 @@ static int mgslpc_open(struct tty_struct *tty, struct file * filp)
  
        if (debug_level >= DEBUG_LEVEL_INFO)
                printk("%s(%d):mgslpc_open(%s), old ref count = %d\n",
--                       __FILE__,__LINE__,tty->driver->name, port->count);
-+                       __FILE__,__LINE__,tty->driver->name, atomic_read(&port->count));
+-                       __FILE__, __LINE__, tty->driver->name, port->count);
++                       __FILE__, __LINE__, tty->driver->name, atomic_read(&port->count));
  
        /* If port is closing, signal caller to try again */
        if (tty_hung_up_p(filp) || port->flags & ASYNC_CLOSING){
-@@ -2530,11 +2530,11 @@ static int mgslpc_open(struct tty_struct *tty, struct file * filp)
+@@ -2527,11 +2527,11 @@ static int mgslpc_open(struct tty_struct *tty, struct file * filp)
                goto cleanup;
        }
        spin_lock(&port->lock);
@@ -34210,7 +33877,7 @@ index b66eaa0..2619d1b 100644
                /* 1st open on this device, init hardware */
                retval = startup(info, tty);
                if (retval < 0)
-@@ -3889,7 +3889,7 @@ static int hdlcdev_attach(struct net_device *dev, unsigned short encoding,
+@@ -3920,7 +3920,7 @@ static int hdlcdev_attach(struct net_device *dev, unsigned short encoding,
        unsigned short new_crctype;
  
        /* return error if TTY interface open */
@@ -34219,7 +33886,7 @@ index b66eaa0..2619d1b 100644
                return -EBUSY;
  
        switch (encoding)
-@@ -3992,7 +3992,7 @@ static int hdlcdev_open(struct net_device *dev)
+@@ -4024,7 +4024,7 @@ static int hdlcdev_open(struct net_device *dev)
  
        /* arbitrate between network and tty opens */
        spin_lock_irqsave(&info->netlock, flags);
@@ -34228,8 +33895,8 @@ index b66eaa0..2619d1b 100644
                printk(KERN_WARNING "%s: hdlc_open returning busy\n", dev->name);
                spin_unlock_irqrestore(&info->netlock, flags);
                return -EBUSY;
-@@ -4081,7 +4081,7 @@ static int hdlcdev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
-               printk("%s:hdlcdev_ioctl(%s)\n",__FILE__,dev->name);
+@@ -4114,7 +4114,7 @@ static int hdlcdev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
+               printk("%s:hdlcdev_ioctl(%s)\n", __FILE__, dev->name);
  
        /* return error if TTY interface open */
 -      if (info->port.count)
@@ -34238,7 +33905,7 @@ index b66eaa0..2619d1b 100644
  
        if (cmd != SIOCWANDEV)
 diff --git a/drivers/char/random.c b/drivers/char/random.c
-index 57d4b15..253207b 100644
+index 32a6c57..e7f0f7b 100644
 --- a/drivers/char/random.c
 +++ b/drivers/char/random.c
 @@ -272,8 +272,13 @@
@@ -34312,7 +33979,7 @@ index 57d4b15..253207b 100644
  
        uuid = table->data;
 diff --git a/drivers/char/sonypi.c b/drivers/char/sonypi.c
-index d780295..b29f3a8 100644
+index bf2349db..5456d53 100644
 --- a/drivers/char/sonypi.c
 +++ b/drivers/char/sonypi.c
 @@ -54,6 +54,7 @@
@@ -34353,21 +34020,8 @@ index d780295..b29f3a8 100644
        mutex_unlock(&sonypi_device.lock);
  
        return 0;
-diff --git a/drivers/char/tpm/tpm.c b/drivers/char/tpm/tpm.c
-index 93211df..c7805f7 100644
---- a/drivers/char/tpm/tpm.c
-+++ b/drivers/char/tpm/tpm.c
-@@ -410,7 +410,7 @@ static ssize_t tpm_transmit(struct tpm_chip *chip, const char *buf,
-                   chip->vendor.req_complete_val)
-                       goto out_recv;
--              if ((status == chip->vendor.req_canceled)) {
-+              if (status == chip->vendor.req_canceled) {
-                       dev_err(chip->dev, "Operation Canceled\n");
-                       rc = -ECANCELED;
-                       goto out;
 diff --git a/drivers/char/tpm/tpm_acpi.c b/drivers/char/tpm/tpm_acpi.c
-index 56051d0..11cf3b7 100644
+index 64420b3..5c40b56 100644
 --- a/drivers/char/tpm/tpm_acpi.c
 +++ b/drivers/char/tpm/tpm_acpi.c
 @@ -98,11 +98,12 @@ int read_log(struct tpm_bios_log *log)
@@ -34417,10 +34071,10 @@ index 84ddc55..1d32f1e 100644
        return 0;
  }
 diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
-index a4b7aa0..2faa0bc 100644
+index ce5f3fc..e2d3e55 100644
 --- a/drivers/char/virtio_console.c
 +++ b/drivers/char/virtio_console.c
-@@ -685,7 +685,7 @@ static ssize_t fill_readbuf(struct port *port, char *out_buf, size_t out_count,
+@@ -679,7 +679,7 @@ static ssize_t fill_readbuf(struct port *port, char *out_buf, size_t out_count,
        if (to_user) {
                ssize_t ret;
  
@@ -34429,7 +34083,7 @@ index a4b7aa0..2faa0bc 100644
                if (ret)
                        return -EFAULT;
        } else {
-@@ -784,7 +784,7 @@ static ssize_t port_fops_read(struct file *filp, char __user *ubuf,
+@@ -778,7 +778,7 @@ static ssize_t port_fops_read(struct file *filp, char __user *ubuf,
        if (!port_has_data(port) && !port->host_connected)
                return 0;
  
@@ -34438,11 +34092,24 @@ index a4b7aa0..2faa0bc 100644
  }
  
  static int wait_port_writable(struct port *port, bool nonblock)
-diff --git a/drivers/clocksource/arm_generic.c b/drivers/clocksource/arm_generic.c
-index 8ae1a61..9c00613 100644
---- a/drivers/clocksource/arm_generic.c
-+++ b/drivers/clocksource/arm_generic.c
-@@ -181,7 +181,7 @@ static int __cpuinit arch_timer_cpu_notify(struct notifier_block *self,
+diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c
+index d7ad425..3e3f81f 100644
+--- a/drivers/clocksource/arm_arch_timer.c
++++ b/drivers/clocksource/arm_arch_timer.c
+@@ -262,7 +262,7 @@ static int __cpuinit arch_timer_cpu_notify(struct notifier_block *self,
+       return NOTIFY_OK;
+ }
+-static struct notifier_block arch_timer_cpu_nb __cpuinitdata = {
++static struct notifier_block arch_timer_cpu_nb = {
+       .notifier_call = arch_timer_cpu_notify,
+ };
+diff --git a/drivers/clocksource/metag_generic.c b/drivers/clocksource/metag_generic.c
+index ade7513..069445f 100644
+--- a/drivers/clocksource/metag_generic.c
++++ b/drivers/clocksource/metag_generic.c
+@@ -169,7 +169,7 @@ static int __cpuinit arch_timer_cpu_notify(struct notifier_block *self,
        return NOTIFY_OK;
  }
  
@@ -34452,7 +34119,7 @@ index 8ae1a61..9c00613 100644
  };
  
 diff --git a/drivers/cpufreq/acpi-cpufreq.c b/drivers/cpufreq/acpi-cpufreq.c
-index 7b0d49d..134fac9 100644
+index 57a8774..545e993 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,
@@ -34478,7 +34145,7 @@ index 7b0d49d..134fac9 100644
  
        result = acpi_processor_register_performance(data->acpi_data, cpu);
        if (result)
-@@ -835,7 +838,9 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy)
+@@ -839,7 +842,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:
@@ -34489,7 +34156,7 @@ index 7b0d49d..134fac9 100644
                policy->cur = get_cur_freq_on_cpu(cpu);
                break;
        default:
-@@ -846,8 +851,11 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy)
+@@ -850,8 +855,11 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy)
        acpi_processor_notify_smm(THIS_MODULE);
  
        /* Check for APERF/MPERF support in hardware */
@@ -34504,10 +34171,10 @@ index 7b0d49d..134fac9 100644
        pr_debug("CPU%u - ACPI performance management activated.\n", cpu);
        for (i = 0; i < perf->state_count; i++)
 diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
-index 1f93dbd..305cef1 100644
+index b02824d..51e44aa 100644
 --- a/drivers/cpufreq/cpufreq.c
 +++ b/drivers/cpufreq/cpufreq.c
-@@ -1843,7 +1843,7 @@ static int __cpuinit cpufreq_cpu_callback(struct notifier_block *nfb,
+@@ -1813,7 +1813,7 @@ static int __cpuinit cpufreq_cpu_callback(struct notifier_block *nfb,
        return NOTIFY_OK;
  }
  
@@ -34516,7 +34183,7 @@ index 1f93dbd..305cef1 100644
      .notifier_call = cpufreq_cpu_callback,
  };
  
-@@ -1875,8 +1875,11 @@ int cpufreq_register_driver(struct cpufreq_driver *driver_data)
+@@ -1845,8 +1845,11 @@ int cpufreq_register_driver(struct cpufreq_driver *driver_data)
  
        pr_debug("trying to register driver %s\n", driver_data->name);
  
@@ -34531,47 +34198,22 @@ index 1f93dbd..305cef1 100644
        spin_lock_irqsave(&cpufreq_driver_lock, flags);
        if (cpufreq_driver) {
 diff --git a/drivers/cpufreq/cpufreq_governor.c b/drivers/cpufreq/cpufreq_governor.c
-index 6c5f1d3..c7e2f35e 100644
+index 5a76086..0f4d394 100644
 --- a/drivers/cpufreq/cpufreq_governor.c
 +++ b/drivers/cpufreq/cpufreq_governor.c
-@@ -243,7 +243,7 @@ int cpufreq_governor_dbs(struct dbs_data *dbs_data,
-                * governor, thus we are bound to jiffes/HZ
-                */
-               if (dbs_data->governor == GOV_CONSERVATIVE) {
--                      struct cs_ops *ops = dbs_data->gov_ops;
-+                      const struct cs_ops *ops = dbs_data->gov_ops;
-                       cpufreq_register_notifier(ops->notifier_block,
-                                       CPUFREQ_TRANSITION_NOTIFIER);
-@@ -251,7 +251,7 @@ int cpufreq_governor_dbs(struct dbs_data *dbs_data,
-                       dbs_data->min_sampling_rate = MIN_SAMPLING_RATE_RATIO *
-                               jiffies_to_usecs(10);
-               } else {
--                      struct od_ops *ops = dbs_data->gov_ops;
-+                      const struct od_ops *ops = dbs_data->gov_ops;
-                       od_tuners->io_is_busy = ops->io_busy();
-               }
-@@ -268,7 +268,7 @@ second_time:
-                       cs_dbs_info->enable = 1;
-                       cs_dbs_info->requested_freq = policy->cur;
-               } else {
--                      struct od_ops *ops = dbs_data->gov_ops;
-+                      const struct od_ops *ops = dbs_data->gov_ops;
-                       od_dbs_info->rate_mult = 1;
-                       od_dbs_info->sample_type = OD_NORMAL_SAMPLE;
-                       ops->powersave_bias_init_cpu(cpu);
-@@ -289,7 +289,7 @@ second_time:
-               mutex_destroy(&cpu_cdbs->timer_mutex);
-               dbs_data->enable--;
-               if (!dbs_data->enable) {
--                      struct cs_ops *ops = dbs_data->gov_ops;
-+                      const struct cs_ops *ops = dbs_data->gov_ops;
-                       sysfs_remove_group(cpufreq_global_kobject,
-                                       dbs_data->attr_group);
+@@ -201,8 +201,8 @@ int cpufreq_governor_dbs(struct dbs_data *dbs_data,
+ {
+       struct od_cpu_dbs_info_s *od_dbs_info = NULL;
+       struct cs_cpu_dbs_info_s *cs_dbs_info = NULL;
+-      struct cs_ops *cs_ops = NULL;
+-      struct od_ops *od_ops = NULL;
++      const struct cs_ops *cs_ops = NULL;
++      const struct od_ops *od_ops = NULL;
+       struct od_dbs_tuners *od_tuners = dbs_data->tuners;
+       struct cs_dbs_tuners *cs_tuners = dbs_data->tuners;
+       struct cpu_dbs_common_info *cpu_cdbs;
 diff --git a/drivers/cpufreq/cpufreq_governor.h b/drivers/cpufreq/cpufreq_governor.h
-index f661654..6c8e638 100644
+index cc4bd2f..ad142bc 100644
 --- a/drivers/cpufreq/cpufreq_governor.h
 +++ b/drivers/cpufreq/cpufreq_governor.h
 @@ -142,7 +142,7 @@ struct dbs_data {
@@ -34584,10 +34226,10 @@ index f661654..6c8e638 100644
  
  /* Governor specific ops, will be passed to dbs_data->gov_ops */
 diff --git a/drivers/cpufreq/cpufreq_stats.c b/drivers/cpufreq/cpufreq_stats.c
-index 9d7732b..0b1a793 100644
+index bfd6273..e39dd63 100644
 --- a/drivers/cpufreq/cpufreq_stats.c
 +++ b/drivers/cpufreq/cpufreq_stats.c
-@@ -340,7 +340,7 @@ static int __cpuinit cpufreq_stat_cpu_callback(struct notifier_block *nfb,
+@@ -365,7 +365,7 @@ static int __cpuinit cpufreq_stat_cpu_callback(struct notifier_block *nfb,
  }
  
  /* priority=1 so this will get called before cpufreq_remove_dev */
@@ -34647,10 +34289,10 @@ index 3a953d5..f5993f6 100644
        if (policy->cpu != 0)
                return -ENODEV;
 diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c
-index e1f6860..f8de20b 100644
+index eba6929..0f53baf 100644
 --- a/drivers/cpuidle/cpuidle.c
 +++ b/drivers/cpuidle/cpuidle.c
-@@ -279,7 +279,7 @@ static int poll_idle(struct cpuidle_device *dev,
+@@ -277,7 +277,7 @@ static int poll_idle(struct cpuidle_device *dev,
  
  static void poll_idle_init(struct cpuidle_driver *drv)
  {
@@ -34730,7 +34372,7 @@ index b70709b..1d8d02a 100644
  
        /* Run before NMI debug handler and KGDB */
 diff --git a/drivers/edac/edac_mc_sysfs.c b/drivers/edac/edac_mc_sysfs.c
-index 0ca1ca7..6e6f454 100644
+index 769d92e..a3dcc1e 100644
 --- a/drivers/edac/edac_mc_sysfs.c
 +++ b/drivers/edac/edac_mc_sysfs.c
 @@ -148,7 +148,7 @@ static const char *edac_caps[] = {
@@ -34742,8 +34384,29 @@ index 0ca1ca7..6e6f454 100644
  
  #define DEVICE_CHANNEL(_name, _mode, _show, _store, _var) \
        struct dev_ch_attribute dev_attr_legacy_##_name = \
+@@ -1003,14 +1003,16 @@ int edac_create_sysfs_mci_device(struct mem_ctl_info *mci)
+       }
+       if (mci->set_sdram_scrub_rate || mci->get_sdram_scrub_rate) {
++              pax_open_kernel();
+               if (mci->get_sdram_scrub_rate) {
+-                      dev_attr_sdram_scrub_rate.attr.mode |= S_IRUGO;
+-                      dev_attr_sdram_scrub_rate.show = &mci_sdram_scrub_rate_show;
++                      *(umode_t *)&dev_attr_sdram_scrub_rate.attr.mode |= S_IRUGO;
++                      *(void **)&dev_attr_sdram_scrub_rate.show = &mci_sdram_scrub_rate_show;
+               }
+               if (mci->set_sdram_scrub_rate) {
+-                      dev_attr_sdram_scrub_rate.attr.mode |= S_IWUSR;
+-                      dev_attr_sdram_scrub_rate.store = &mci_sdram_scrub_rate_store;
++                      *(umode_t *)&dev_attr_sdram_scrub_rate.attr.mode |= S_IWUSR;
++                      *(void **)&dev_attr_sdram_scrub_rate.store = &mci_sdram_scrub_rate_store;
+               }
++              pax_close_kernel();
+               err = device_create_file(&mci->dev,
+                                        &dev_attr_sdram_scrub_rate);
+               if (err) {
 diff --git a/drivers/edac/edac_pci_sysfs.c b/drivers/edac/edac_pci_sysfs.c
-index 0056c4d..23b54d9 100644
+index e8658e4..22746d6 100644
 --- a/drivers/edac/edac_pci_sysfs.c
 +++ b/drivers/edac/edac_pci_sysfs.c
 @@ -26,8 +26,8 @@ static int edac_pci_log_pe = 1;              /* log PCI parity errors */
@@ -34839,13 +34502,13 @@ index 0056c4d..23b54d9 100644
        }
  }
 diff --git a/drivers/edac/mce_amd.h b/drivers/edac/mce_amd.h
-index 6796799..99e8377 100644
+index 51b7e3a..aa8a3e8 100644
 --- a/drivers/edac/mce_amd.h
 +++ b/drivers/edac/mce_amd.h
-@@ -78,7 +78,7 @@ extern const char * const ii_msgs[];
- struct amd_decoder_ops {
+@@ -77,7 +77,7 @@ struct amd_decoder_ops {
        bool (*mc0_mce)(u16, u8);
        bool (*mc1_mce)(u16, u8);
+       bool (*mc2_mce)(u16, u8);
 -};
 +} __no_const;
  
@@ -34865,10 +34528,10 @@ index 57ea7f4..789e3c3 100644
        card->driver->update_phy_reg(card, 4,
                                     PHY_LINK_ACTIVE | PHY_CONTENDER, 0);
 diff --git a/drivers/firewire/core-cdev.c b/drivers/firewire/core-cdev.c
-index f8d2287..5aaf4db 100644
+index 27ac423..13573e8 100644
 --- a/drivers/firewire/core-cdev.c
 +++ b/drivers/firewire/core-cdev.c
-@@ -1365,8 +1365,7 @@ static int init_iso_resource(struct client *client,
+@@ -1366,8 +1366,7 @@ static int init_iso_resource(struct client *client,
        int ret;
  
        if ((request->channels == 0 && request->bandwidth == 0) ||
@@ -34879,7 +34542,7 @@ index f8d2287..5aaf4db 100644
  
        r  = kmalloc(sizeof(*r), GFP_KERNEL);
 diff --git a/drivers/firewire/core-device.c b/drivers/firewire/core-device.c
-index af3e8aa..eb2f227 100644
+index 03ce7d9..b70f5da 100644
 --- a/drivers/firewire/core-device.c
 +++ b/drivers/firewire/core-device.c
 @@ -232,7 +232,7 @@ EXPORT_SYMBOL(fw_device_enable_phys_dma);
@@ -34954,10 +34617,10 @@ index 4cd392d..4b629e1 100644
        iounmap(buf);
        return 0;
 diff --git a/drivers/firmware/efivars.c b/drivers/firmware/efivars.c
-index b07cb37..2a51037 100644
+index f4baa11..7970c3a 100644
 --- a/drivers/firmware/efivars.c
 +++ b/drivers/firmware/efivars.c
-@@ -138,7 +138,7 @@ struct efivar_attribute {
+@@ -139,7 +139,7 @@ struct efivar_attribute {
  };
  
  static struct efivars __efivars;
@@ -34966,7 +34629,7 @@ index b07cb37..2a51037 100644
  
  #define PSTORE_EFI_ATTRIBUTES \
        (EFI_VARIABLE_NON_VOLATILE | \
-@@ -1834,7 +1834,7 @@ efivar_create_sysfs_entry(struct efivars *efivars,
+@@ -1844,7 +1844,7 @@ efivar_create_sysfs_entry(struct efivars *efivars,
  static int
  create_efivars_bin_attributes(struct efivars *efivars)
  {
@@ -34991,7 +34654,7 @@ index 2a90ba6..07f3733 100644
        ret = sysfs_create_bin_file(firmware_kobj, &memconsole_bin_attr);
  
 diff --git a/drivers/gpio/gpio-ich.c b/drivers/gpio/gpio-ich.c
-index 6f2306d..af9476a 100644
+index de3c317..b7cd029 100644
 --- a/drivers/gpio/gpio-ich.c
 +++ b/drivers/gpio/gpio-ich.c
 @@ -69,7 +69,7 @@ struct ichx_desc {
@@ -35030,10 +34693,10 @@ index 7b2d378..cc947ea 100644
        dev = crtc->dev;
  
 diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
-index be174ca..7f38143 100644
+index 25f91cd..a376f55 100644
 --- a/drivers/gpu/drm/drm_drv.c
 +++ b/drivers/gpu/drm/drm_drv.c
-@@ -307,7 +307,7 @@ module_exit(drm_core_exit);
+@@ -306,7 +306,7 @@ module_exit(drm_core_exit);
  /**
   * Copy and IOCTL return string to user space
   */
@@ -35042,7 +34705,7 @@ index be174ca..7f38143 100644
  {
        int len;
  
-@@ -377,7 +377,7 @@ long drm_ioctl(struct file *filp,
+@@ -376,7 +376,7 @@ long drm_ioctl(struct file *filp,
        struct drm_file *file_priv = filp->private_data;
        struct drm_device *dev;
        struct drm_ioctl_desc *ioctl;
@@ -35051,7 +34714,7 @@ index be174ca..7f38143 100644
        unsigned int nr = DRM_IOCTL_NR(cmd);
        int retcode = -EINVAL;
        char stack_kdata[128];
-@@ -390,7 +390,7 @@ long drm_ioctl(struct file *filp,
+@@ -389,7 +389,7 @@ long drm_ioctl(struct file *filp,
                return -ENODEV;
  
        atomic_inc(&dev->ioctl_count);
@@ -35061,7 +34724,7 @@ index be174ca..7f38143 100644
  
        DRM_DEBUG("pid=%d, cmd=0x%02x, nr=0x%02x, dev 0x%lx, auth=%d\n",
 diff --git a/drivers/gpu/drm/drm_fops.c b/drivers/gpu/drm/drm_fops.c
-index 133b413..fd68225 100644
+index 429e07d..e681a2c 100644
 --- a/drivers/gpu/drm/drm_fops.c
 +++ b/drivers/gpu/drm/drm_fops.c
 @@ -71,7 +71,7 @@ static int drm_setup(struct drm_device * dev)
@@ -35073,7 +34736,7 @@ index 133b413..fd68225 100644
  
        dev->sigdata.lock = NULL;
  
-@@ -134,7 +134,7 @@ int drm_open(struct inode *inode, struct file *filp)
+@@ -135,7 +135,7 @@ int drm_open(struct inode *inode, struct file *filp)
        if (drm_device_is_unplugged(dev))
                return -ENODEV;
  
@@ -35081,8 +34744,8 @@ index 133b413..fd68225 100644
 +      if (local_inc_return(&dev->open_count) == 1)
                need_setup = 1;
        mutex_lock(&dev->struct_mutex);
-       old_mapping = dev->dev_mapping;
-@@ -149,7 +149,7 @@ int drm_open(struct inode *inode, struct file *filp)
+       old_imapping = inode->i_mapping;
+@@ -151,7 +151,7 @@ int drm_open(struct inode *inode, struct file *filp)
        retcode = drm_open_helper(inode, filp, dev);
        if (retcode)
                goto err_undo;
@@ -35091,7 +34754,7 @@ index 133b413..fd68225 100644
        if (need_setup) {
                retcode = drm_setup(dev);
                if (retcode)
-@@ -164,7 +164,7 @@ err_undo:
+@@ -166,7 +166,7 @@ err_undo:
        iput(container_of(dev->dev_mapping, struct inode, i_data));
        dev->dev_mapping = old_mapping;
        mutex_unlock(&dev->struct_mutex);
@@ -35100,7 +34763,7 @@ index 133b413..fd68225 100644
        return retcode;
  }
  EXPORT_SYMBOL(drm_open);
-@@ -438,7 +438,7 @@ int drm_release(struct inode *inode, struct file *filp)
+@@ -441,7 +441,7 @@ int drm_release(struct inode *inode, struct file *filp)
  
        mutex_lock(&drm_global_mutex);
  
@@ -35109,7 +34772,7 @@ index 133b413..fd68225 100644
  
        if (dev->driver->preclose)
                dev->driver->preclose(dev, file_priv);
-@@ -447,10 +447,10 @@ int drm_release(struct inode *inode, struct file *filp)
+@@ -450,10 +450,10 @@ int drm_release(struct inode *inode, struct file *filp)
         * Begin inline drm_release
         */
  
@@ -35122,7 +34785,7 @@ index 133b413..fd68225 100644
  
        /* Release any auth tokens that might point to this file_priv,
           (do that under the drm_global_mutex) */
-@@ -547,8 +547,8 @@ int drm_release(struct inode *inode, struct file *filp)
+@@ -550,8 +550,8 @@ int drm_release(struct inode *inode, struct file *filp)
         * End inline drm_release
         */
  
@@ -35326,10 +34989,10 @@ index d752c96..fe08455 100644
        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 200e104..59facda 100644
+index 7d30802..42c6cbb 100644
 --- a/drivers/gpu/drm/drm_stub.c
 +++ b/drivers/gpu/drm/drm_stub.c
-@@ -516,7 +516,7 @@ void drm_unplug_dev(struct drm_device *dev)
+@@ -501,7 +501,7 @@ void drm_unplug_dev(struct drm_device *dev)
  
        drm_device_set_unplugged(dev);
  
@@ -35380,10 +35043,10 @@ index 6e0acad..93c8289 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 261efc8e..27af8a5 100644
+index 7299ea4..5314487 100644
 --- a/drivers/gpu/drm/i915/i915_debugfs.c
 +++ b/drivers/gpu/drm/i915/i915_debugfs.c
-@@ -496,7 +496,7 @@ static int i915_interrupt_info(struct seq_file *m, void *data)
+@@ -499,7 +499,7 @@ static int i915_interrupt_info(struct seq_file *m, void *data)
                           I915_READ(GTIMR));
        }
        seq_printf(m, "Interrupts received: %d\n",
@@ -35393,10 +35056,10 @@ index 261efc8e..27af8a5 100644
                if (IS_GEN6(dev) || IS_GEN7(dev)) {
                        seq_printf(m,
 diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
-index 99daa89..84ebd44 100644
+index 4fa6beb..f930fec 100644
 --- a/drivers/gpu/drm/i915/i915_dma.c
 +++ b/drivers/gpu/drm/i915/i915_dma.c
-@@ -1253,7 +1253,7 @@ static bool i915_switcheroo_can_switch(struct pci_dev *pdev)
+@@ -1259,7 +1259,7 @@ static bool i915_switcheroo_can_switch(struct pci_dev *pdev)
        bool can_switch;
  
        spin_lock(&dev->count_lock);
@@ -35406,10 +35069,10 @@ index 99daa89..84ebd44 100644
        return can_switch;
  }
 diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
-index 7339a4b..445aaba 100644
+index ef99b1c..09ce7fb 100644
 --- a/drivers/gpu/drm/i915/i915_drv.h
 +++ b/drivers/gpu/drm/i915/i915_drv.h
-@@ -656,7 +656,7 @@ typedef struct drm_i915_private {
+@@ -893,7 +893,7 @@ typedef struct drm_i915_private {
        drm_dma_handle_t *status_page_dmah;
        struct resource mch_res;
  
@@ -35418,16 +35081,7 @@ index 7339a4b..445aaba 100644
  
        /* protects the irq masks */
        spinlock_t irq_lock;
-@@ -1102,7 +1102,7 @@ struct drm_i915_gem_object {
-        * will be page flipped away on the next vblank.  When it
-        * reaches 0, dev_priv->pending_flip_queue will be woken up.
-        */
--      atomic_t pending_flip;
-+      atomic_unchecked_t pending_flip;
- };
- #define to_gem_object(obj) (&((struct drm_i915_gem_object *)(obj))->base)
-@@ -1633,7 +1633,7 @@ extern struct i2c_adapter *intel_gmbus_get_adapter(
+@@ -1775,7 +1775,7 @@ extern struct i2c_adapter *intel_gmbus_get_adapter(
                struct drm_i915_private *dev_priv, unsigned port);
  extern void intel_gmbus_set_speed(struct i2c_adapter *adapter, int speed);
  extern void intel_gmbus_force_bit(struct i2c_adapter *adapter, bool force_bit);
@@ -35437,19 +35091,10 @@ index 7339a4b..445aaba 100644
        return container_of(adapter, struct intel_gmbus, adapter)->force_bit;
  }
 diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
-index 7adf5a7..e24fb51 100644
+index 9a48e1a..f0cbc3e 100644
 --- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
 +++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
-@@ -672,7 +672,7 @@ i915_gem_execbuffer_move_to_gpu(struct intel_ring_buffer *ring,
-                       i915_gem_clflush_object(obj);
-               if (obj->base.pending_write_domain)
--                      flips |= atomic_read(&obj->pending_flip);
-+                      flips |= atomic_read_unchecked(&obj->pending_flip);
-               flush_domains |= obj->base.write_domain;
-       }
-@@ -703,9 +703,9 @@ i915_gem_check_execbuffer(struct drm_i915_gem_execbuffer2 *exec)
+@@ -729,9 +729,9 @@ i915_gem_check_execbuffer(struct drm_i915_gem_execbuffer2 *exec)
  
  static int
  validate_exec_list(struct drm_i915_gem_exec_object2 *exec,
@@ -35461,7 +35106,7 @@ index 7adf5a7..e24fb51 100644
        int relocs_total = 0;
        int relocs_max = INT_MAX / sizeof(struct drm_i915_gem_relocation_entry);
  
-@@ -1202,7 +1202,7 @@ i915_gem_execbuffer2(struct drm_device *dev, void *data,
+@@ -1195,7 +1195,7 @@ i915_gem_execbuffer2(struct drm_device *dev, void *data,
                return -ENOMEM;
        }
        ret = copy_from_user(exec2_list,
@@ -35506,19 +35151,19 @@ 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 fe84338..a863190 100644
+index 3c7bb04..182e049 100644
 --- a/drivers/gpu/drm/i915/i915_irq.c
 +++ b/drivers/gpu/drm/i915/i915_irq.c
-@@ -535,7 +535,7 @@ static irqreturn_t valleyview_irq_handler(int irq, void *arg)
+@@ -549,7 +549,7 @@ static irqreturn_t valleyview_irq_handler(int irq, void *arg)
+       int pipe;
        u32 pipe_stats[I915_MAX_PIPES];
-       bool blc_event;
  
 -      atomic_inc(&dev_priv->irq_received);
 +      atomic_inc_unchecked(&dev_priv->irq_received);
  
        while (true) {
                iir = I915_READ(VLV_IIR);
-@@ -688,7 +688,7 @@ static irqreturn_t ivybridge_irq_handler(int irq, void *arg)
+@@ -705,7 +705,7 @@ static irqreturn_t ivybridge_irq_handler(int irq, void *arg)
        irqreturn_t ret = IRQ_NONE;
        int i;
  
@@ -35527,16 +35172,16 @@ index fe84338..a863190 100644
  
        /* disable master interrupt before clearing iir  */
        de_ier = I915_READ(DEIER);
-@@ -760,7 +760,7 @@ static irqreturn_t ironlake_irq_handler(int irq, void *arg)
+@@ -791,7 +791,7 @@ static irqreturn_t ironlake_irq_handler(int irq, void *arg)
        int ret = IRQ_NONE;
-       u32 de_iir, gt_iir, de_ier, pch_iir, pm_iir;
+       u32 de_iir, gt_iir, de_ier, pm_iir, sde_ier;
  
 -      atomic_inc(&dev_priv->irq_received);
 +      atomic_inc_unchecked(&dev_priv->irq_received);
  
        /* disable master interrupt before clearing iir  */
        de_ier = I915_READ(DEIER);
-@@ -1787,7 +1787,7 @@ static void ironlake_irq_preinstall(struct drm_device *dev)
+@@ -1886,7 +1886,7 @@ static void ironlake_irq_preinstall(struct drm_device *dev)
  {
        drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
  
@@ -35545,7 +35190,7 @@ index fe84338..a863190 100644
  
        I915_WRITE(HWSTAM, 0xeffe);
  
-@@ -1813,7 +1813,7 @@ static void valleyview_irq_preinstall(struct drm_device *dev)
+@@ -1912,7 +1912,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;
  
@@ -35554,7 +35199,7 @@ index fe84338..a863190 100644
  
        /* VLV magic */
        I915_WRITE(VLV_IMR, 0);
-@@ -2108,7 +2108,7 @@ static void i8xx_irq_preinstall(struct drm_device * dev)
+@@ -2208,7 +2208,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;
  
@@ -35563,7 +35208,7 @@ index fe84338..a863190 100644
  
        for_each_pipe(pipe)
                I915_WRITE(PIPESTAT(pipe), 0);
-@@ -2159,7 +2159,7 @@ static irqreturn_t i8xx_irq_handler(int irq, void *arg)
+@@ -2259,7 +2259,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;
  
@@ -35572,7 +35217,7 @@ index fe84338..a863190 100644
  
        iir = I915_READ16(IIR);
        if (iir == 0)
-@@ -2244,7 +2244,7 @@ static void i915_irq_preinstall(struct drm_device * dev)
+@@ -2344,7 +2344,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;
  
@@ -35581,7 +35226,7 @@ index fe84338..a863190 100644
  
        if (I915_HAS_HOTPLUG(dev)) {
                I915_WRITE(PORT_HOTPLUG_EN, 0);
-@@ -2339,7 +2339,7 @@ static irqreturn_t i915_irq_handler(int irq, void *arg)
+@@ -2448,7 +2448,7 @@ static irqreturn_t i915_irq_handler(int irq, void *arg)
        };
        int pipe, ret = IRQ_NONE;
  
@@ -35590,7 +35235,7 @@ index fe84338..a863190 100644
  
        iir = I915_READ(IIR);
        do {
-@@ -2465,7 +2465,7 @@ static void i965_irq_preinstall(struct drm_device * dev)
+@@ -2574,7 +2574,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;
  
@@ -35599,7 +35244,7 @@ index fe84338..a863190 100644
  
        I915_WRITE(PORT_HOTPLUG_EN, 0);
        I915_WRITE(PORT_HOTPLUG_STAT, I915_READ(PORT_HOTPLUG_STAT));
-@@ -2572,7 +2572,7 @@ static irqreturn_t i965_irq_handler(int irq, void *arg)
+@@ -2690,7 +2690,7 @@ static irqreturn_t i965_irq_handler(int irq, void *arg)
        int irq_received;
        int ret = IRQ_NONE, pipe;
  
@@ -35609,47 +35254,10 @@ index fe84338..a863190 100644
        iir = I915_READ(IIR);
  
 diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
-index e6e4df7..6a9a1bd 100644
+index c2d173a..f4357cc 100644
 --- a/drivers/gpu/drm/i915/intel_display.c
 +++ b/drivers/gpu/drm/i915/intel_display.c
-@@ -2255,7 +2255,7 @@ intel_finish_fb(struct drm_framebuffer *old_fb)
-       wait_event(dev_priv->pending_flip_queue,
-                  atomic_read(&dev_priv->mm.wedged) ||
--                 atomic_read(&obj->pending_flip) == 0);
-+                 atomic_read_unchecked(&obj->pending_flip) == 0);
-       /* Big Hammer, we also need to ensure that any pending
-        * MI_WAIT_FOR_EVENT inside a user batch buffer on the
-@@ -7122,8 +7122,7 @@ static void do_intel_finish_page_flip(struct drm_device *dev,
-       obj = work->old_fb_obj;
--      atomic_clear_mask(1 << intel_crtc->plane,
--                        &obj->pending_flip.counter);
-+      atomic_clear_mask_unchecked(1 << intel_crtc->plane, &obj->pending_flip);
-       wake_up(&dev_priv->pending_flip_queue);
-       queue_work(dev_priv->wq, &work->work);
-@@ -7486,7 +7485,7 @@ static int intel_crtc_page_flip(struct drm_crtc *crtc,
-       /* Block clients from rendering to the new back buffer until
-        * the flip occurs and the object is no longer visible.
-        */
--      atomic_add(1 << intel_crtc->plane, &work->old_fb_obj->pending_flip);
-+      atomic_add_unchecked(1 << intel_crtc->plane, &work->old_fb_obj->pending_flip);
-       atomic_inc(&intel_crtc->unpin_work_count);
-       ret = dev_priv->display.queue_flip(dev, crtc, fb, obj);
-@@ -7504,7 +7503,7 @@ static int intel_crtc_page_flip(struct drm_crtc *crtc,
- cleanup_pending:
-       atomic_dec(&intel_crtc->unpin_work_count);
-       crtc->fb = old_fb;
--      atomic_sub(1 << intel_crtc->plane, &work->old_fb_obj->pending_flip);
-+      atomic_sub_unchecked(1 << intel_crtc->plane, &work->old_fb_obj->pending_flip);
-       drm_gem_object_unreference(&work->old_fb_obj->base);
-       drm_gem_object_unreference(&obj->base);
-       mutex_unlock(&dev->struct_mutex);
-@@ -8846,13 +8845,13 @@ struct intel_quirk {
+@@ -8722,13 +8722,13 @@ struct intel_quirk {
        int subsystem_vendor;
        int subsystem_device;
        void (*hook)(struct drm_device *dev);
@@ -35665,22 +35273,12 @@ index e6e4df7..6a9a1bd 100644
  
  static int intel_dmi_reverse_brightness(const struct dmi_system_id *id)
  {
-@@ -8860,18 +8859,20 @@ static int intel_dmi_reverse_brightness(const struct dmi_system_id *id)
+@@ -8736,18 +8736,20 @@ static int intel_dmi_reverse_brightness(const struct dmi_system_id *id)
        return 1;
  }
  
+-static const struct intel_dmi_quirk intel_dmi_quirks[] = {
 +static const struct dmi_system_id intel_dmi_quirks_table[] = {
-+      {
-+              .callback = intel_dmi_reverse_brightness,
-+              .ident = "NCR Corporation",
-+              .matches = {DMI_MATCH(DMI_SYS_VENDOR, "NCR Corporation"),
-+                          DMI_MATCH(DMI_PRODUCT_NAME, ""),
-+              },
-+      },
-+      { }  /* terminating entry */
-+};
-+
- static const struct intel_dmi_quirk intel_dmi_quirks[] = {
        {
 -              .dmi_id_list = &(const struct dmi_system_id[]) {
 -                      {
@@ -35691,7 +35289,17 @@ index e6e4df7..6a9a1bd 100644
 -                              },
 -                      },
 -                      { }  /* terminating entry */
--              },
++              .callback = intel_dmi_reverse_brightness,
++              .ident = "NCR Corporation",
++              .matches = {DMI_MATCH(DMI_SYS_VENDOR, "NCR Corporation"),
++                          DMI_MATCH(DMI_PRODUCT_NAME, ""),
+               },
++      },
++      { }  /* terminating entry */
++};
++
++static const struct intel_dmi_quirk intel_dmi_quirks[] = {
++      {
 +              .dmi_id_list = &intel_dmi_quirks_table,
                .hook = quirk_invert_brightness,
        },
@@ -35788,10 +35396,10 @@ 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 865eddf..62c4cc3 100644
+index 50a6dd0..ea66ed8 100644
 --- a/drivers/gpu/drm/nouveau/nouveau_bios.c
 +++ b/drivers/gpu/drm/nouveau/nouveau_bios.c
-@@ -1015,7 +1015,7 @@ static int parse_bit_tmds_tbl_entry(struct drm_device *dev, struct nvbios *bios,
+@@ -965,7 +965,7 @@ static int parse_bit_tmds_tbl_entry(struct drm_device *dev, struct nvbios *bios,
  struct bit_table {
        const char id;
        int (* const parse_fn)(struct drm_device *, struct nvbios *, struct bit_entry *);
@@ -35801,10 +35409,10 @@ index 865eddf..62c4cc3 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 aa89eb9..d45d38b 100644
+index 9c39baf..30a22be 100644
 --- a/drivers/gpu/drm/nouveau/nouveau_drm.h
 +++ b/drivers/gpu/drm/nouveau/nouveau_drm.h
-@@ -80,7 +80,7 @@ struct nouveau_drm {
+@@ -81,7 +81,7 @@ struct nouveau_drm {
                struct drm_global_reference mem_global_ref;
                struct ttm_bo_global_ref bo_global_ref;
                struct ttm_bo_device bdev;
@@ -35813,32 +35421,28 @@ index aa89eb9..d45d38b 100644
                int (*move)(struct nouveau_channel *,
                            struct ttm_buffer_object *,
                            struct ttm_mem_reg *, struct ttm_mem_reg *);
-diff --git a/drivers/gpu/drm/nouveau/nouveau_fence.h b/drivers/gpu/drm/nouveau/nouveau_fence.h
-index cdb83ac..27f0a16 100644
---- a/drivers/gpu/drm/nouveau/nouveau_fence.h
-+++ b/drivers/gpu/drm/nouveau/nouveau_fence.h
-@@ -43,7 +43,7 @@ struct nouveau_fence_priv {
-       int  (*sync)(struct nouveau_fence *, struct nouveau_channel *,
-                    struct nouveau_channel *);
-       u32  (*read)(struct nouveau_channel *);
--};
-+} __no_const;
- #define nouveau_fence(drm) ((struct nouveau_fence_priv *)(drm)->fence)
 diff --git a/drivers/gpu/drm/nouveau/nouveau_gem.c b/drivers/gpu/drm/nouveau/nouveau_gem.c
-index 8bf695c..9fbc90a 100644
+index b4b4d0c..b7edc15 100644
 --- a/drivers/gpu/drm/nouveau/nouveau_gem.c
 +++ b/drivers/gpu/drm/nouveau/nouveau_gem.c
-@@ -321,7 +321,7 @@ validate_init(struct nouveau_channel *chan, struct drm_file *file_priv,
-       int trycnt = 0;
+@@ -322,7 +322,7 @@ validate_init(struct nouveau_channel *chan, struct drm_file *file_priv,
        int ret, i;
+       struct nouveau_bo *res_bo = NULL;
  
 -      sequence = atomic_add_return(1, &drm->ttm.validate_sequence);
 +      sequence = atomic_add_return_unchecked(1, &drm->ttm.validate_sequence);
  retry:
        if (++trycnt > 100000) {
-               NV_ERROR(drm, "%s failed and gave up.\n", __func__);
+               NV_ERROR(cli, "%s failed and gave up.\n", __func__);
+@@ -359,7 +359,7 @@ retry:
+               if (ret) {
+                       validate_fini(op, NULL);
+                       if (unlikely(ret == -EAGAIN)) {
+-                              sequence = atomic_add_return(1, &drm->ttm.validate_sequence);
++                              sequence = atomic_add_return_unchecked(1, &drm->ttm.validate_sequence);
+                               ret = ttm_bo_reserve_slowpath(&nvbo->bo, true,
+                                                             sequence);
+                               if (!ret)
 diff --git a/drivers/gpu/drm/nouveau/nouveau_ioc32.c b/drivers/gpu/drm/nouveau/nouveau_ioc32.c
 index 08214bc..9208577 100644
 --- a/drivers/gpu/drm/nouveau/nouveau_ioc32.c
@@ -35995,10 +35599,10 @@ index 5a82b6b..9e69c73 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 0d6562b..a154330 100644
+index 44b8034..cc722fd 100644
 --- a/drivers/gpu/drm/radeon/radeon_device.c
 +++ b/drivers/gpu/drm/radeon/radeon_device.c
-@@ -969,7 +969,7 @@ static bool radeon_switcheroo_can_switch(struct pci_dev *pdev)
+@@ -977,7 +977,7 @@ static bool radeon_switcheroo_can_switch(struct pci_dev *pdev)
        bool can_switch;
  
        spin_lock(&dev->count_lock);
@@ -36008,10 +35612,10 @@ index 0d6562b..a154330 100644
        return can_switch;
  }
 diff --git a/drivers/gpu/drm/radeon/radeon_drv.h b/drivers/gpu/drm/radeon/radeon_drv.h
-index e7fdf16..f4f6490 100644
+index b369d42..8dd04eb 100644
 --- a/drivers/gpu/drm/radeon/radeon_drv.h
 +++ b/drivers/gpu/drm/radeon/radeon_drv.h
-@@ -255,7 +255,7 @@ typedef struct drm_radeon_private {
+@@ -258,7 +258,7 @@ typedef struct drm_radeon_private {
  
        /* SW interrupt */
        wait_queue_head_t swi_queue;
@@ -36065,10 +35669,10 @@ index c180df8..5fd8186 100644
  
        return ret;
 diff --git a/drivers/gpu/drm/radeon/radeon_irq.c b/drivers/gpu/drm/radeon/radeon_irq.c
-index e771033..a0bc6b3 100644
+index 8d68e97..9dcfed8 100644
 --- a/drivers/gpu/drm/radeon/radeon_irq.c
 +++ b/drivers/gpu/drm/radeon/radeon_irq.c
-@@ -224,8 +224,8 @@ static int radeon_emit_irq(struct drm_device * dev)
+@@ -226,8 +226,8 @@ static int radeon_emit_irq(struct drm_device * dev)
        unsigned int ret;
        RING_LOCALS;
  
@@ -36079,7 +35683,7 @@ index e771033..a0bc6b3 100644
  
        BEGIN_RING(4);
        OUT_RING_REG(RADEON_LAST_SWI_REG, ret);
-@@ -351,7 +351,7 @@ int radeon_driver_irq_postinstall(struct drm_device *dev)
+@@ -353,7 +353,7 @@ int radeon_driver_irq_postinstall(struct drm_device *dev)
        drm_radeon_private_t *dev_priv =
            (drm_radeon_private_t *) dev->dev_private;
  
@@ -36089,10 +35693,10 @@ index e771033..a0bc6b3 100644
  
        dev->max_vblank_count = 0x001fffff;
 diff --git a/drivers/gpu/drm/radeon/radeon_state.c b/drivers/gpu/drm/radeon/radeon_state.c
-index 8e9057b..af6dacb 100644
+index 4d20910..6726b6d 100644
 --- a/drivers/gpu/drm/radeon/radeon_state.c
 +++ b/drivers/gpu/drm/radeon/radeon_state.c
-@@ -2166,7 +2166,7 @@ static int radeon_cp_clear(struct drm_device *dev, void *data, struct drm_file *
+@@ -2168,7 +2168,7 @@ static int radeon_cp_clear(struct drm_device *dev, void *data, struct drm_file *
        if (sarea_priv->nbox > RADEON_NR_SAREA_CLIPRECTS)
                sarea_priv->nbox = RADEON_NR_SAREA_CLIPRECTS;
  
@@ -36101,7 +35705,7 @@ index 8e9057b..af6dacb 100644
                               sarea_priv->nbox * sizeof(depth_boxes[0])))
                return -EFAULT;
  
-@@ -3029,7 +3029,7 @@ static int radeon_cp_getparam(struct drm_device *dev, void *data, struct drm_fil
+@@ -3031,7 +3031,7 @@ static int radeon_cp_getparam(struct drm_device *dev, void *data, struct drm_fil
  {
        drm_radeon_private_t *dev_priv = dev->dev_private;
        drm_radeon_getparam_t *param = data;
@@ -36216,7 +35820,7 @@ index bd2a3b4..122d9ad 100644
        int shrink_pages = sc->nr_to_scan;
  
 diff --git a/drivers/gpu/drm/udl/udl_fb.c b/drivers/gpu/drm/udl/udl_fb.c
-index 1eb060c..188b1fc 100644
+index 9f4be3d..cbc9fcc 100644
 --- a/drivers/gpu/drm/udl/udl_fb.c
 +++ b/drivers/gpu/drm/udl/udl_fb.c
 @@ -367,7 +367,6 @@ static int udl_fb_release(struct fb_info *info, int user)
@@ -36399,7 +36003,7 @@ index 4640adb..e1384ed 100644
  
        for (;;) {
 diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_marker.c b/drivers/gpu/drm/vmwgfx/vmwgfx_marker.c
-index 8a8725c..afed796 100644
+index 8a8725c2..afed796 100644
 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_marker.c
 +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_marker.c
 @@ -151,7 +151,7 @@ int vmw_wait_lag(struct vmw_private *dev_priv,
@@ -36412,10 +36016,10 @@ index 8a8725c..afed796 100644
                        marker = list_first_entry(&queue->head,
                                                 struct vmw_marker, head);
 diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
-index ceb3040..6160c5c 100644
+index e6dbf09..3dd2540 100644
 --- a/drivers/hid/hid-core.c
 +++ b/drivers/hid/hid-core.c
-@@ -2242,7 +2242,7 @@ EXPORT_SYMBOL_GPL(hid_ignore);
+@@ -2268,7 +2268,7 @@ EXPORT_SYMBOL_GPL(hid_ignore);
  
  int hid_add_device(struct hid_device *hdev)
  {
@@ -36424,7 +36028,7 @@ index ceb3040..6160c5c 100644
        int ret;
  
        if (WARN_ON(hdev->status & HID_STAT_ADDED))
-@@ -2276,7 +2276,7 @@ int hid_add_device(struct hid_device *hdev)
+@@ -2302,7 +2302,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,
@@ -36434,7 +36038,7 @@ index ceb3040..6160c5c 100644
        hid_debug_register(hdev, dev_name(&hdev->dev));
        ret = device_add(&hdev->dev);
 diff --git a/drivers/hid/hid-wiimote-debug.c b/drivers/hid/hid-wiimote-debug.c
-index eec3291..8ed706b 100644
+index 90124ff..3761764 100644
 --- a/drivers/hid/hid-wiimote-debug.c
 +++ b/drivers/hid/hid-wiimote-debug.c
 @@ -66,7 +66,7 @@ static ssize_t wiidebug_eeprom_read(struct file *f, char __user *u, size_t s,
@@ -36447,7 +36051,7 @@ index eec3291..8ed706b 100644
  
        *off += size;
 diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c
-index 773a2f2..7ce08bc 100644
+index 0b122f8..b1d8160 100644
 --- a/drivers/hv/channel.c
 +++ b/drivers/hv/channel.c
 @@ -394,8 +394,8 @@ int vmbus_establish_gpadl(struct vmbus_channel *channel, void *kbuffer,
@@ -36462,10 +36066,10 @@ index 773a2f2..7ce08bc 100644
        ret = create_gpadl_header(kbuffer, size, &msginfo, &msgcount);
        if (ret)
 diff --git a/drivers/hv/hv.c b/drivers/hv/hv.c
-index 3648f8f..30ef30d 100644
+index 7311589..861e9ef 100644
 --- a/drivers/hv/hv.c
 +++ b/drivers/hv/hv.c
-@@ -111,7 +111,7 @@ static u64 do_hypercall(u64 control, void *input, void *output)
+@@ -112,7 +112,7 @@ static u64 do_hypercall(u64 control, void *input, void *output)
        u64 output_address = (output) ? virt_to_phys(output) : 0;
        u32 output_address_hi = output_address >> 32;
        u32 output_address_lo = output_address & 0xFFFFFFFF;
@@ -36475,10 +36079,10 @@ index 3648f8f..30ef30d 100644
        __asm__ __volatile__ ("call *%8" : "=d"(hv_status_hi),
                              "=a"(hv_status_lo) : "d" (control_hi),
 diff --git a/drivers/hv/hyperv_vmbus.h b/drivers/hv/hyperv_vmbus.h
-index d8d1fad..b91caf7 100644
+index 12f2f9e..679603c 100644
 --- a/drivers/hv/hyperv_vmbus.h
 +++ b/drivers/hv/hyperv_vmbus.h
-@@ -594,7 +594,7 @@ enum vmbus_connect_state {
+@@ -591,7 +591,7 @@ enum vmbus_connect_state {
  struct vmbus_connection {
        enum vmbus_connect_state conn_state;
  
@@ -36488,10 +36092,10 @@ index d8d1fad..b91caf7 100644
        /*
         * Represents channel interrupts. Each bit position represents a
 diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c
-index 8e1a9ec..4687821 100644
+index bf421e0..ce2c897 100644
 --- a/drivers/hv/vmbus_drv.c
 +++ b/drivers/hv/vmbus_drv.c
-@@ -629,10 +629,10 @@ int vmbus_device_register(struct hv_device *child_device_obj)
+@@ -668,10 +668,10 @@ int vmbus_device_register(struct hv_device *child_device_obj)
  {
        int ret = 0;
  
@@ -36505,7 +36109,7 @@ index 8e1a9ec..4687821 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 1672e2a..4a6297c 100644
+index 6351aba..dc4aaf4 100644
 --- a/drivers/hwmon/acpi_power_meter.c
 +++ b/drivers/hwmon/acpi_power_meter.c
 @@ -117,7 +117,7 @@ struct sensor_template {
@@ -36540,7 +36144,7 @@ index b41baff..4953e4d 100644
  
        for (grp = groups; grp->format; grp++) {
 diff --git a/drivers/hwmon/asus_atk0110.c b/drivers/hwmon/asus_atk0110.c
-index 56dbcfb..9874bf1 100644
+index b25c643..a13460d 100644
 --- a/drivers/hwmon/asus_atk0110.c
 +++ b/drivers/hwmon/asus_atk0110.c
 @@ -152,10 +152,10 @@ MODULE_DEVICE_TABLE(acpi, atk_ids);
@@ -36568,10 +36172,10 @@ index 56dbcfb..9874bf1 100644
  {
        sysfs_attr_init(&attr->attr);
 diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c
-index d64923d..72591e8 100644
+index 3f1e297..a6cafb5 100644
 --- a/drivers/hwmon/coretemp.c
 +++ b/drivers/hwmon/coretemp.c
-@@ -790,7 +790,7 @@ static int __cpuinit coretemp_cpu_callback(struct notifier_block *nfb,
+@@ -791,7 +791,7 @@ static int __cpuinit coretemp_cpu_callback(struct notifier_block *nfb,
        return NOTIFY_OK;
  }
  
@@ -36594,35 +36198,71 @@ index a14f634..2916ee2 100644
  
        /* Set up read-only sensors */
 diff --git a/drivers/hwmon/pmbus/pmbus_core.c b/drivers/hwmon/pmbus/pmbus_core.c
-index 7d19b1b..8fdaaac 100644
+index 9add6092..ee7ba3f 100644
 --- a/drivers/hwmon/pmbus/pmbus_core.c
 +++ b/drivers/hwmon/pmbus/pmbus_core.c
-@@ -811,7 +811,7 @@ static ssize_t pmbus_show_label(struct device *dev,
+@@ -781,7 +781,7 @@ static int pmbus_add_attribute(struct pmbus_data *data, struct attribute *attr)
+       return 0;
+ }
  
- #define PMBUS_ADD_ATTR(data, _name, _idx, _mode, _type, _show, _set)  \
- do {                                                                  \
--      struct sensor_device_attribute *a                               \
-+      sensor_device_attribute_no_const *a                             \
-           = &data->_type##s[data->num_##_type##s].attribute;          \
-       BUG_ON(data->num_attributes >= data->max_attributes);           \
-       sysfs_attr_init(&a->dev_attr.attr);                             \
+-static void pmbus_dev_attr_init(struct device_attribute *dev_attr,
++static void pmbus_dev_attr_init(device_attribute_no_const *dev_attr,
+                               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,
+       dev_attr->store = store;
+ }
+-static void pmbus_attr_init(struct sensor_device_attribute *a,
++static void pmbus_attr_init(sensor_device_attribute_no_const *a,
+                           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,
+                            u16 reg, u8 mask)
+ {
+       struct pmbus_boolean *boolean;
+-      struct sensor_device_attribute *a;
++      sensor_device_attribute_no_const *a;
+       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,
+                                            bool update, bool readonly)
+ {
+       struct pmbus_sensor *sensor;
+-      struct device_attribute *a;
++      device_attribute_no_const *a;
+       sensor = devm_kzalloc(data->dev, sizeof(*sensor), GFP_KERNEL);
+       if (!sensor)
+@@ -876,7 +876,7 @@ static int pmbus_add_label(struct pmbus_data *data,
+                          const char *lstring, int index)
+ {
+       struct pmbus_label *label;
+-      struct device_attribute *a;
++      device_attribute_no_const *a;
+       label = devm_kzalloc(data->dev, sizeof(*label), GFP_KERNEL);
+       if (!label)
 diff --git a/drivers/hwmon/sht15.c b/drivers/hwmon/sht15.c
-index 8047fed..1e956f0 100644
+index 2507f90..1645765 100644
 --- a/drivers/hwmon/sht15.c
 +++ b/drivers/hwmon/sht15.c
 @@ -169,7 +169,7 @@ struct sht15_data {
-       int                             supply_uV;
-       bool                            supply_uV_valid;
+       int                             supply_uv;
+       bool                            supply_uv_valid;
        struct work_struct              update_supply_work;
 -      atomic_t                        interrupt_handled;
 +      atomic_unchecked_t              interrupt_handled;
  };
  
  /**
-@@ -512,13 +512,13 @@ static int sht15_measurement(struct sht15_data *data,
+@@ -542,13 +542,13 @@ static int sht15_measurement(struct sht15_data *data,
+       ret = gpio_direction_input(data->pdata->gpio_data);
+       if (ret)
                return ret;
-       gpio_direction_input(data->pdata->gpio_data);
 -      atomic_set(&data->interrupt_handled, 0);
 +      atomic_set_unchecked(&data->interrupt_handled, 0);
  
@@ -36635,7 +36275,7 @@ index 8047fed..1e956f0 100644
                        schedule_work(&data->read_work);
        }
        ret = wait_event_timeout(data->wait_queue,
-@@ -785,7 +785,7 @@ static irqreturn_t sht15_interrupt_fired(int irq, void *d)
+@@ -820,7 +820,7 @@ static irqreturn_t sht15_interrupt_fired(int irq, void *d)
  
        /* First disable the interrupt */
        disable_irq_nosync(irq);
@@ -36644,7 +36284,7 @@ index 8047fed..1e956f0 100644
        /* Then schedule a reading work struct */
        if (data->state != SHT15_READING_NOTHING)
                schedule_work(&data->read_work);
-@@ -807,11 +807,11 @@ static void sht15_bh_read_data(struct work_struct *work_s)
+@@ -842,11 +842,11 @@ static void sht15_bh_read_data(struct work_struct *work_s)
                 * If not, then start the interrupt again - care here as could
                 * have gone low in meantime so verify it hasn't!
                 */
@@ -36724,7 +36364,7 @@ index 8848f16..f8e6dd8 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 394fea2..c833880 100644
+index 784b97c..c9ceadf 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]
@@ -36736,7 +36376,7 @@ index 394fea2..c833880 100644
  };
  
  struct cm_counter_attribute {
-@@ -1394,7 +1394,7 @@ static void cm_dup_req_handler(struct cm_work *work,
+@@ -1395,7 +1395,7 @@ static void cm_dup_req_handler(struct cm_work *work,
        struct ib_mad_send_buf *msg = NULL;
        int ret;
  
@@ -36745,7 +36385,7 @@ index 394fea2..c833880 100644
                        counter[CM_REQ_COUNTER]);
  
        /* Quick state check to discard duplicate REQs. */
-@@ -1778,7 +1778,7 @@ static void cm_dup_rep_handler(struct cm_work *work)
+@@ -1779,7 +1779,7 @@ static void cm_dup_rep_handler(struct cm_work *work)
        if (!cm_id_priv)
                return;
  
@@ -36754,7 +36394,7 @@ index 394fea2..c833880 100644
                        counter[CM_REP_COUNTER]);
        ret = cm_alloc_response_msg(work->port, work->mad_recv_wc, &msg);
        if (ret)
-@@ -1945,7 +1945,7 @@ static int cm_rtu_handler(struct cm_work *work)
+@@ -1946,7 +1946,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);
@@ -36763,7 +36403,7 @@ index 394fea2..c833880 100644
                                counter[CM_RTU_COUNTER]);
                goto out;
        }
-@@ -2128,7 +2128,7 @@ static int cm_dreq_handler(struct cm_work *work)
+@@ -2129,7 +2129,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) {
@@ -36772,7 +36412,7 @@ index 394fea2..c833880 100644
                                counter[CM_DREQ_COUNTER]);
                cm_issue_drep(work->port, work->mad_recv_wc);
                return -EINVAL;
-@@ -2153,7 +2153,7 @@ static int cm_dreq_handler(struct cm_work *work)
+@@ -2154,7 +2154,7 @@ static int cm_dreq_handler(struct cm_work *work)
        case IB_CM_MRA_REP_RCVD:
                break;
        case IB_CM_TIMEWAIT:
@@ -36781,7 +36421,7 @@ index 394fea2..c833880 100644
                                counter[CM_DREQ_COUNTER]);
                if (cm_alloc_response_msg(work->port, work->mad_recv_wc, &msg))
                        goto unlock;
-@@ -2167,7 +2167,7 @@ static int cm_dreq_handler(struct cm_work *work)
+@@ -2168,7 +2168,7 @@ static int cm_dreq_handler(struct cm_work *work)
                        cm_free_msg(msg);
                goto deref;
        case IB_CM_DREQ_RCVD:
@@ -36790,7 +36430,7 @@ index 394fea2..c833880 100644
                                counter[CM_DREQ_COUNTER]);
                goto unlock;
        default:
-@@ -2534,7 +2534,7 @@ static int cm_mra_handler(struct cm_work *work)
+@@ -2535,7 +2535,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)
@@ -36799,7 +36439,7 @@ index 394fea2..c833880 100644
                                                counter_group[CM_RECV_DUPLICATES].
                                                counter[CM_MRA_COUNTER]);
                        goto out;
-@@ -2543,7 +2543,7 @@ static int cm_mra_handler(struct cm_work *work)
+@@ -2544,7 +2544,7 @@ static int cm_mra_handler(struct cm_work *work)
                break;
        case IB_CM_MRA_REQ_RCVD:
        case IB_CM_MRA_REP_RCVD:
@@ -36808,7 +36448,7 @@ index 394fea2..c833880 100644
                                counter[CM_MRA_COUNTER]);
                /* fall through */
        default:
-@@ -2705,7 +2705,7 @@ static int cm_lap_handler(struct cm_work *work)
+@@ -2706,7 +2706,7 @@ static int cm_lap_handler(struct cm_work *work)
        case IB_CM_LAP_IDLE:
                break;
        case IB_CM_MRA_LAP_SENT:
@@ -36817,7 +36457,7 @@ index 394fea2..c833880 100644
                                counter[CM_LAP_COUNTER]);
                if (cm_alloc_response_msg(work->port, work->mad_recv_wc, &msg))
                        goto unlock;
-@@ -2721,7 +2721,7 @@ static int cm_lap_handler(struct cm_work *work)
+@@ -2722,7 +2722,7 @@ static int cm_lap_handler(struct cm_work *work)
                        cm_free_msg(msg);
                goto deref;
        case IB_CM_LAP_RCVD:
@@ -36826,7 +36466,7 @@ index 394fea2..c833880 100644
                                counter[CM_LAP_COUNTER]);
                goto unlock;
        default:
-@@ -3005,7 +3005,7 @@ static int cm_sidr_req_handler(struct cm_work *work)
+@@ -3006,7 +3006,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);
@@ -36835,7 +36475,7 @@ index 394fea2..c833880 100644
                                counter[CM_SIDR_REQ_COUNTER]);
                goto out; /* Duplicate message. */
        }
-@@ -3217,10 +3217,10 @@ static void cm_send_handler(struct ib_mad_agent *mad_agent,
+@@ -3218,10 +3218,10 @@ static void cm_send_handler(struct ib_mad_agent *mad_agent,
        if (!msg->context[0] && (attr_index != CM_REJ_COUNTER))
                msg->retries = 1;
  
@@ -36848,7 +36488,7 @@ index 394fea2..c833880 100644
                                &port->counter_group[CM_XMIT_RETRIES].
                                counter[attr_index]);
  
-@@ -3430,7 +3430,7 @@ static void cm_recv_handler(struct ib_mad_agent *mad_agent,
+@@ -3431,7 +3431,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);
@@ -36857,7 +36497,7 @@ index 394fea2..c833880 100644
                        counter[attr_id - CM_ATTR_ID_OFFSET]);
  
        work = kmalloc(sizeof *work + sizeof(struct ib_sa_path_rec) * paths,
-@@ -3635,7 +3635,7 @@ static ssize_t cm_show_counter(struct kobject *obj, struct attribute *attr,
+@@ -3636,7 +3636,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",
@@ -36867,7 +36507,7 @@ index 394fea2..c833880 100644
  
  static const struct sysfs_ops cm_counter_ops = {
 diff --git a/drivers/infiniband/core/fmr_pool.c b/drivers/infiniband/core/fmr_pool.c
-index 176c8f9..2627b62 100644
+index 9f5ad7c..588cd84 100644
 --- a/drivers/infiniband/core/fmr_pool.c
 +++ b/drivers/infiniband/core/fmr_pool.c
 @@ -98,8 +98,8 @@ struct ib_fmr_pool {
@@ -36881,7 +36521,7 @@ index 176c8f9..2627b62 100644
  
        wait_queue_head_t         force_wait;
  };
-@@ -180,10 +180,10 @@ static int ib_fmr_cleanup_thread(void *pool_ptr)
+@@ -179,10 +179,10 @@ static int ib_fmr_cleanup_thread(void *pool_ptr)
        struct ib_fmr_pool *pool = pool_ptr;
  
        do {
@@ -36894,7 +36534,7 @@ index 176c8f9..2627b62 100644
                        wake_up_interruptible(&pool->force_wait);
  
                        if (pool->flush_function)
-@@ -191,7 +191,7 @@ static int ib_fmr_cleanup_thread(void *pool_ptr)
+@@ -190,7 +190,7 @@ static int ib_fmr_cleanup_thread(void *pool_ptr)
                }
  
                set_current_state(TASK_INTERRUPTIBLE);
@@ -36903,7 +36543,7 @@ index 176c8f9..2627b62 100644
                    !kthread_should_stop())
                        schedule();
                __set_current_state(TASK_RUNNING);
-@@ -283,8 +283,8 @@ struct ib_fmr_pool *ib_create_fmr_pool(struct ib_pd             *pd,
+@@ -282,8 +282,8 @@ struct ib_fmr_pool *ib_create_fmr_pool(struct ib_pd             *pd,
        pool->dirty_watermark = params->dirty_watermark;
        pool->dirty_len       = 0;
        spin_lock_init(&pool->pool_lock);
@@ -36914,7 +36554,7 @@ index 176c8f9..2627b62 100644
        init_waitqueue_head(&pool->force_wait);
  
        pool->thread = kthread_run(ib_fmr_cleanup_thread,
-@@ -412,11 +412,11 @@ int ib_flush_fmr_pool(struct ib_fmr_pool *pool)
+@@ -411,11 +411,11 @@ int ib_flush_fmr_pool(struct ib_fmr_pool *pool)
        }
        spin_unlock_irq(&pool->pool_lock);
  
@@ -36928,7 +36568,7 @@ index 176c8f9..2627b62 100644
                return -EINTR;
  
        return 0;
-@@ -526,7 +526,7 @@ int ib_fmr_pool_unmap(struct ib_pool_fmr *fmr)
+@@ -525,7 +525,7 @@ int ib_fmr_pool_unmap(struct ib_pool_fmr *fmr)
                } else {
                        list_add_tail(&fmr->list, &pool->dirty_list);
                        if (++pool->dirty_len >= pool->dirty_watermark) {
@@ -36938,7 +36578,7 @@ index 176c8f9..2627b62 100644
                        }
                }
 diff --git a/drivers/infiniband/hw/cxgb4/mem.c b/drivers/infiniband/hw/cxgb4/mem.c
-index afd8179..598063f 100644
+index 903a92d..9262548 100644
 --- a/drivers/infiniband/hw/cxgb4/mem.c
 +++ b/drivers/infiniband/hw/cxgb4/mem.c
 @@ -122,7 +122,7 @@ static int write_tpt_entry(struct c4iw_rdev *rdev, u32 reset_tpt_entry,
@@ -37040,7 +36680,7 @@ index ed9a989..e0c5871 100644
  {
        struct mthca_mailbox *mailbox;
 diff --git a/drivers/infiniband/hw/nes/nes.c b/drivers/infiniband/hw/nes/nes.c
-index 5b152a3..c1f3e83 100644
+index 4291410..d2ab1fb 100644
 --- a/drivers/infiniband/hw/nes/nes.c
 +++ b/drivers/infiniband/hw/nes/nes.c
 @@ -98,7 +98,7 @@ MODULE_PARM_DESC(limit_maxrdreqsz, "Limit max read request size to 256 Bytes");
@@ -37052,7 +36692,7 @@ index 5b152a3..c1f3e83 100644
  
  static unsigned int ee_flsh_adapter;
  static unsigned int sysfs_nonidx_addr;
-@@ -267,7 +267,7 @@ static void nes_cqp_rem_ref_callback(struct nes_device *nesdev, struct nes_cqp_r
+@@ -269,7 +269,7 @@ static void nes_cqp_rem_ref_callback(struct nes_device *nesdev, struct nes_cqp_r
        struct nes_qp *nesqp = cqp_request->cqp_callback_pointer;
        struct nes_adapter *nesadapter = nesdev->nesadapter;
  
@@ -37121,7 +36761,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 22ea67e..dcbe3bc 100644
+index 24b9f1a..00fd004 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;
@@ -37354,7 +36994,7 @@ index 4166452..fc952c3 100644
                        }
  
 diff --git a/drivers/infiniband/hw/nes/nes_nic.c b/drivers/infiniband/hw/nes/nes_nic.c
-index 9542e16..a008c40 100644
+index 85cf4d1..05d8e71 100644
 --- a/drivers/infiniband/hw/nes/nes_nic.c
 +++ b/drivers/infiniband/hw/nes/nes_nic.c
 @@ -1273,39 +1273,39 @@ static void nes_netdev_get_ethtool_stats(struct net_device *netdev,
@@ -37418,7 +37058,7 @@ index 9542e16..a008c40 100644
  
  /**
 diff --git a/drivers/infiniband/hw/nes/nes_verbs.c b/drivers/infiniband/hw/nes/nes_verbs.c
-index 07e4fba..685f041 100644
+index 8f67fe2..8960859 100644
 --- a/drivers/infiniband/hw/nes/nes_verbs.c
 +++ b/drivers/infiniband/hw/nes/nes_verbs.c
 @@ -46,9 +46,9 @@
@@ -37434,7 +37074,7 @@ index 07e4fba..685f041 100644
  
  static void nes_unregister_ofa_device(struct nes_ib_device *nesibdev);
  
-@@ -1131,7 +1131,7 @@ static struct ib_qp *nes_create_qp(struct ib_pd *ibpd,
+@@ -1134,7 +1134,7 @@ static struct ib_qp *nes_create_qp(struct ib_pd *ibpd,
        if (init_attr->create_flags)
                return ERR_PTR(-EINVAL);
  
@@ -37443,7 +37083,7 @@ index 07e4fba..685f041 100644
        switch (init_attr->qp_type) {
                case IB_QPT_RC:
                        if (nes_drv_opt & NES_DRV_OPT_NO_INLINE_DATA) {
-@@ -1462,7 +1462,7 @@ static int nes_destroy_qp(struct ib_qp *ibqp)
+@@ -1465,7 +1465,7 @@ static int nes_destroy_qp(struct ib_qp *ibqp)
        struct iw_cm_event cm_event;
        int ret = 0;
  
@@ -37542,10 +37182,10 @@ index d6cbfe9..6225402 100644
        snprintf(led->name, sizeof(led->name), "xpad%ld", led_no);
        led->xpad = xpad;
 diff --git a/drivers/input/mouse/psmouse.h b/drivers/input/mouse/psmouse.h
-index fe1df23..5b710f3 100644
+index 2f0b39d..7370f13 100644
 --- a/drivers/input/mouse/psmouse.h
 +++ b/drivers/input/mouse/psmouse.h
-@@ -115,7 +115,7 @@ struct psmouse_attribute {
+@@ -116,7 +116,7 @@ struct psmouse_attribute {
        ssize_t (*set)(struct psmouse *psmouse, void *data,
                        const char *buf, size_t count);
        bool protect;
@@ -37568,7 +37208,7 @@ index 4c842c3..590b0bf 100644
  
        return count;
 diff --git a/drivers/input/serio/serio.c b/drivers/input/serio/serio.c
-index 25fc597..558bf3b 100644
+index 25fc597..558bf3b3 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)
@@ -37590,7 +37230,7 @@ index 25fc597..558bf3b 100644
        serio->dev.release = serio_release_port;
        serio->dev.groups = serio_device_attr_groups;
 diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
-index ddbdaca..be18a78 100644
+index b972d43..8943713 100644
 --- a/drivers/iommu/iommu.c
 +++ b/drivers/iommu/iommu.c
 @@ -554,7 +554,7 @@ static struct notifier_block iommu_bus_nb = {
@@ -37602,6 +37242,49 @@ index ddbdaca..be18a78 100644
  }
  
  /**
+diff --git a/drivers/iommu/irq_remapping.c b/drivers/iommu/irq_remapping.c
+index 7c11ff3..5b2d7a7 100644
+--- a/drivers/iommu/irq_remapping.c
++++ b/drivers/iommu/irq_remapping.c
+@@ -369,10 +369,12 @@ static void ir_print_prefix(struct irq_data *data, struct seq_file *p)
+ void irq_remap_modify_chip_defaults(struct irq_chip *chip)
+ {
+-      chip->irq_print_chip = ir_print_prefix;
+-      chip->irq_ack = ir_ack_apic_edge;
+-      chip->irq_eoi = ir_ack_apic_level;
+-      chip->irq_set_affinity = x86_io_apic_ops.set_affinity;
++      pax_open_kernel();
++      *(void **)&chip->irq_print_chip = ir_print_prefix;
++      *(void **)&chip->irq_ack = ir_ack_apic_edge;
++      *(void **)&chip->irq_eoi = ir_ack_apic_level;
++      *(void **)&chip->irq_set_affinity = x86_io_apic_ops.set_affinity;
++      pax_close_kernel();
+ }
+ 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 fc6aebf..762c5f5 100644
+--- a/drivers/irqchip/irq-gic.c
++++ b/drivers/irqchip/irq-gic.c
+@@ -83,7 +83,7 @@ static u8 gic_cpu_map[NR_GIC_CPU_IF] __read_mostly;
+  * Supported arch specific GIC irq extension.
+  * Default make them NULL.
+  */
+-struct irq_chip gic_arch_extn = {
++irq_chip_no_const gic_arch_extn = {
+       .irq_eoi        = NULL,
+       .irq_mask       = NULL,
+       .irq_unmask     = NULL,
+@@ -332,7 +332,7 @@ static void gic_handle_cascade_irq(unsigned int irq, struct irq_desc *desc)
+       chained_irq_exit(chip, desc);
+ }
+-static struct irq_chip gic_chip = {
++static irq_chip_no_const gic_chip __read_only = {
+       .name                   = "GIC",
+       .irq_mask               = gic_mask_irq,
+       .irq_unmask             = gic_unmask_irq,
 diff --git a/drivers/isdn/capi/capi.c b/drivers/isdn/capi/capi.c
 index 89562a8..218999b 100644
 --- a/drivers/isdn/capi/capi.c
@@ -37644,10 +37327,10 @@ index 89562a8..218999b 100644
                capimsg_setu32(skb->data, 12, (u32)(long)skb->data);/* Data32 */
                capimsg_setu16(skb->data, 16, len);     /* Data length */
 diff --git a/drivers/isdn/gigaset/interface.c b/drivers/isdn/gigaset/interface.c
-index 67abf3f..076b3a6 100644
+index e2b5396..c5486dc 100644
 --- a/drivers/isdn/gigaset/interface.c
 +++ b/drivers/isdn/gigaset/interface.c
-@@ -160,9 +160,9 @@ static int if_open(struct tty_struct *tty, struct file *filp)
+@@ -130,9 +130,9 @@ static int if_open(struct tty_struct *tty, struct file *filp)
        }
        tty->driver_data = cs;
  
@@ -37657,9 +37340,9 @@ index 67abf3f..076b3a6 100644
 -      if (cs->port.count == 1) {
 +      if (atomic_read(&cs->port.count) == 1) {
                tty_port_tty_set(&cs->port, tty);
-               tty->low_latency = 1;
+               cs->port.low_latency = 1;
        }
-@@ -186,9 +186,9 @@ static void if_close(struct tty_struct *tty, struct file *filp)
+@@ -156,9 +156,9 @@ static void if_close(struct tty_struct *tty, struct file *filp)
  
        if (!cs->connected)
                gig_dbg(DEBUG_IF, "not connected");     /* nothing to do */
@@ -37694,10 +37377,10 @@ index 821f7ac..28d4030 100644
                } else {
                        memcpy(buf, dp, left);
 diff --git a/drivers/isdn/i4l/isdn_tty.c b/drivers/isdn/i4l/isdn_tty.c
-index e09dc8a..15e2efb 100644
+index ebaebdf..acd4405 100644
 --- a/drivers/isdn/i4l/isdn_tty.c
 +++ b/drivers/isdn/i4l/isdn_tty.c
-@@ -1513,9 +1513,9 @@ isdn_tty_open(struct tty_struct *tty, struct file *filp)
+@@ -1511,9 +1511,9 @@ isdn_tty_open(struct tty_struct *tty, struct file *filp)
  
  #ifdef ISDN_DEBUG_MODEM_OPEN
        printk(KERN_DEBUG "isdn_tty_open %s, count = %d\n", tty->name,
@@ -37709,7 +37392,7 @@ index e09dc8a..15e2efb 100644
        port->tty = tty;
        /*
         * Start up serial port
-@@ -1559,7 +1559,7 @@ isdn_tty_close(struct tty_struct *tty, struct file *filp)
+@@ -1557,7 +1557,7 @@ isdn_tty_close(struct tty_struct *tty, struct file *filp)
  #endif
                return;
        }
@@ -37718,7 +37401,7 @@ index e09dc8a..15e2efb 100644
                /*
                 * Uh, oh.  tty->count is 1, which means that the tty
                 * structure will be freed.  Info->count should always
-@@ -1568,15 +1568,15 @@ isdn_tty_close(struct tty_struct *tty, struct file *filp)
+@@ -1566,15 +1566,15 @@ isdn_tty_close(struct tty_struct *tty, struct file *filp)
                 * serial port won't be shutdown.
                 */
                printk(KERN_ERR "isdn_tty_close: bad port count; tty->count is 1, "
@@ -37740,7 +37423,7 @@ index e09dc8a..15e2efb 100644
  #ifdef ISDN_DEBUG_MODEM_OPEN
                printk(KERN_DEBUG "isdn_tty_close after info->count != 0\n");
  #endif
-@@ -1630,7 +1630,7 @@ isdn_tty_hangup(struct tty_struct *tty)
+@@ -1628,7 +1628,7 @@ isdn_tty_hangup(struct tty_struct *tty)
        if (isdn_tty_paranoia_check(info, tty->name, "isdn_tty_hangup"))
                return;
        isdn_tty_shutdown(info);
@@ -37749,7 +37432,7 @@ index e09dc8a..15e2efb 100644
        port->flags &= ~ASYNC_NORMAL_ACTIVE;
        port->tty = NULL;
        wake_up_interruptible(&port->open_wait);
-@@ -1975,7 +1975,7 @@ isdn_tty_find_icall(int di, int ch, setup_parm *setup)
+@@ -1973,7 +1973,7 @@ isdn_tty_find_icall(int di, int ch, setup_parm *setup)
        for (i = 0; i < ISDN_MAX_CHANNELS; i++) {
                modem_info *info = &dev->mdm.info[i];
  
@@ -37785,10 +37468,10 @@ index 6a8405d..0bd1c7e 100644
                .callback = clevo_mail_led_dmi_callback,
                .ident = "Clevo D410J",
 diff --git a/drivers/leds/leds-ss4200.c b/drivers/leds/leds-ss4200.c
-index ec9b287..65c9bf4 100644
+index 64e204e..c6bf189 100644
 --- a/drivers/leds/leds-ss4200.c
 +++ b/drivers/leds/leds-ss4200.c
-@@ -92,7 +92,7 @@ MODULE_PARM_DESC(nodetect, "Skip DMI-based hardware detection");
+@@ -91,7 +91,7 @@ MODULE_PARM_DESC(nodetect, "Skip DMI-based hardware detection");
   * detected as working, but in reality it is not) as low as
   * possible.
   */
@@ -37949,7 +37632,7 @@ index 40634b0..4f5855e 100644
  // Every interrupt can come to us here
  // But we must truly tell each apart.
 diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c
-index 7155945..4bcc562 100644
+index 4fd9d6a..834fa03 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)
@@ -37962,10 +37645,10 @@ index 7155945..4bcc562 100644
  
        seq_printf(seq, "\n");
 diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c
-index eee353d..74504c4 100644
+index aa04f02..2a1309e 100644
 --- a/drivers/md/dm-ioctl.c
 +++ b/drivers/md/dm-ioctl.c
-@@ -1632,7 +1632,7 @@ static int validate_params(uint cmd, struct dm_ioctl *param)
+@@ -1694,7 +1694,7 @@ static int validate_params(uint cmd, struct dm_ioctl *param)
            cmd == DM_LIST_VERSIONS_CMD)
                return 0;
  
@@ -37975,7 +37658,7 @@ index eee353d..74504c4 100644
                        DMWARN("name not supplied when creating device");
                        return -EINVAL;
 diff --git a/drivers/md/dm-raid1.c b/drivers/md/dm-raid1.c
-index 7f24190..0e18099 100644
+index d053098..05cc375 100644
 --- a/drivers/md/dm-raid1.c
 +++ b/drivers/md/dm-raid1.c
 @@ -40,7 +40,7 @@ enum dm_raid1_error {
@@ -37987,7 +37670,7 @@ index 7f24190..0e18099 100644
        unsigned long error_type;
        struct dm_dev *dev;
        sector_t offset;
-@@ -183,7 +183,7 @@ static struct mirror *get_valid_mirror(struct mirror_set *ms)
+@@ -186,7 +186,7 @@ static struct mirror *get_valid_mirror(struct mirror_set *ms)
        struct mirror *m;
  
        for (m = ms->mirror; m < ms->mirror + ms->nr_mirrors; m++)
@@ -37996,7 +37679,7 @@ index 7f24190..0e18099 100644
                        return m;
  
        return NULL;
-@@ -215,7 +215,7 @@ static void fail_mirror(struct mirror *m, enum dm_raid1_error error_type)
+@@ -218,7 +218,7 @@ static void fail_mirror(struct mirror *m, enum dm_raid1_error error_type)
         * simple way to tell if a device has encountered
         * errors.
         */
@@ -38005,7 +37688,7 @@ index 7f24190..0e18099 100644
  
        if (test_and_set_bit(error_type, &m->error_type))
                return;
-@@ -406,7 +406,7 @@ static struct mirror *choose_mirror(struct mirror_set *ms, sector_t sector)
+@@ -409,7 +409,7 @@ static struct mirror *choose_mirror(struct mirror_set *ms, sector_t sector)
        struct mirror *m = get_default_mirror(ms);
  
        do {
@@ -38014,7 +37697,7 @@ index 7f24190..0e18099 100644
                        return m;
  
                if (m-- == ms->mirror)
-@@ -420,7 +420,7 @@ static int default_ok(struct mirror *m)
+@@ -423,7 +423,7 @@ static int default_ok(struct mirror *m)
  {
        struct mirror *default_mirror = get_default_mirror(m->ms);
  
@@ -38023,7 +37706,7 @@ index 7f24190..0e18099 100644
  }
  
  static int mirror_available(struct mirror_set *ms, struct bio *bio)
-@@ -557,7 +557,7 @@ static void do_reads(struct mirror_set *ms, struct bio_list *reads)
+@@ -560,7 +560,7 @@ static void do_reads(struct mirror_set *ms, struct bio_list *reads)
                 */
                if (likely(region_in_sync(ms, region, 1)))
                        m = choose_mirror(ms, bio->bi_sector);
@@ -38032,7 +37715,7 @@ index 7f24190..0e18099 100644
                        m = NULL;
  
                if (likely(m))
-@@ -924,7 +924,7 @@ static int get_mirror(struct mirror_set *ms, struct dm_target *ti,
+@@ -927,7 +927,7 @@ static int get_mirror(struct mirror_set *ms, struct dm_target *ti,
        }
  
        ms->mirror[mirror].ms = ms;
@@ -38041,7 +37724,7 @@ index 7f24190..0e18099 100644
        ms->mirror[mirror].error_type = 0;
        ms->mirror[mirror].offset = offset;
  
-@@ -1337,7 +1337,7 @@ static void mirror_resume(struct dm_target *ti)
+@@ -1340,7 +1340,7 @@ static void mirror_resume(struct dm_target *ti)
   */
  static char device_status_char(struct mirror *m)
  {
@@ -38051,7 +37734,7 @@ index 7f24190..0e18099 100644
  
        return (test_bit(DM_RAID1_FLUSH_ERROR, &(m->error_type))) ? 'F' :
 diff --git a/drivers/md/dm-stripe.c b/drivers/md/dm-stripe.c
-index aaecefa..23b3026 100644
+index 7b8b2b9..9c7d145 100644
 --- a/drivers/md/dm-stripe.c
 +++ b/drivers/md/dm-stripe.c
 @@ -20,7 +20,7 @@ struct stripe {
@@ -38063,7 +37746,7 @@ index aaecefa..23b3026 100644
  };
  
  struct stripe_c {
-@@ -184,7 +184,7 @@ static int stripe_ctr(struct dm_target *ti, unsigned int argc, char **argv)
+@@ -185,7 +185,7 @@ static int stripe_ctr(struct dm_target *ti, unsigned int argc, char **argv)
                        kfree(sc);
                        return r;
                }
@@ -38072,7 +37755,7 @@ index aaecefa..23b3026 100644
        }
  
        ti->private = sc;
-@@ -325,7 +325,7 @@ static void stripe_status(struct dm_target *ti, status_type_t type,
+@@ -326,7 +326,7 @@ static void stripe_status(struct dm_target *ti, status_type_t type,
                DMEMIT("%d ", sc->stripes);
                for (i = 0; i < sc->stripes; i++)  {
                        DMEMIT("%s ", sc->stripe[i].dev->name);
@@ -38081,7 +37764,7 @@ index aaecefa..23b3026 100644
                                'D' : 'A';
                }
                buffer[i] = '\0';
-@@ -370,8 +370,8 @@ static int stripe_end_io(struct dm_target *ti, struct bio *bio, int error)
+@@ -371,8 +371,8 @@ static int stripe_end_io(struct dm_target *ti, struct bio *bio, int error)
         */
        for (i = 0; i < sc->stripes; i++)
                if (!strcmp(sc->stripe[i].dev->name, major_minor)) {
@@ -38093,10 +37776,10 @@ index aaecefa..23b3026 100644
                                schedule_work(&sc->trigger_event);
                }
 diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c
-index daf25d0..d74f49f 100644
+index 1ff252a..ee384c1 100644
 --- a/drivers/md/dm-table.c
 +++ b/drivers/md/dm-table.c
-@@ -390,7 +390,7 @@ static int device_area_is_invalid(struct dm_target *ti, struct dm_dev *dev,
+@@ -389,7 +389,7 @@ static int device_area_is_invalid(struct dm_target *ti, struct dm_dev *dev,
        if (!dev_size)
                return 0;
  
@@ -38106,7 +37789,7 @@ index daf25d0..d74f49f 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 4d6e853..a234157 100644
+index 00cee02..b89a29d 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)
@@ -38128,10 +37811,10 @@ index 4d6e853..a234157 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 0d8f086..f5a91d5 100644
+index 9a0bdad..4df9543 100644
 --- a/drivers/md/dm.c
 +++ b/drivers/md/dm.c
-@@ -170,9 +170,9 @@ struct mapped_device {
+@@ -169,9 +169,9 @@ struct mapped_device {
        /*
         * Event handling.
         */
@@ -38143,7 +37826,7 @@ index 0d8f086..f5a91d5 100644
        struct list_head uevent_list;
        spinlock_t uevent_lock; /* Protect access to uevent_list */
  
-@@ -1872,8 +1872,8 @@ static struct mapped_device *alloc_dev(int minor)
+@@ -1879,8 +1879,8 @@ static struct mapped_device *alloc_dev(int minor)
        rwlock_init(&md->map_lock);
        atomic_set(&md->holders, 1);
        atomic_set(&md->open_count, 0);
@@ -38154,7 +37837,7 @@ index 0d8f086..f5a91d5 100644
        INIT_LIST_HEAD(&md->uevent_list);
        spin_lock_init(&md->uevent_lock);
  
-@@ -2026,7 +2026,7 @@ static void event_callback(void *context)
+@@ -2028,7 +2028,7 @@ static void event_callback(void *context)
  
        dm_send_uevents(&uevents, &disk_to_dev(md->disk)->kobj);
  
@@ -38163,7 +37846,7 @@ index 0d8f086..f5a91d5 100644
        wake_up(&md->eventq);
  }
  
-@@ -2683,18 +2683,18 @@ int dm_kobject_uevent(struct mapped_device *md, enum kobject_action action,
+@@ -2685,18 +2685,18 @@ int dm_kobject_uevent(struct mapped_device *md, enum kobject_action action,
  
  uint32_t dm_next_uevent_seq(struct mapped_device *md)
  {
@@ -38186,7 +37869,7 @@ index 0d8f086..f5a91d5 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 f363135..9b38815 100644
+index a4a93b9..4747b63 100644
 --- a/drivers/md/md.c
 +++ b/drivers/md/md.c
 @@ -240,10 +240,10 @@ EXPORT_SYMBOL_GPL(md_trim_bio);
@@ -38258,7 +37941,7 @@ index f363135..9b38815 100644
  
        INIT_LIST_HEAD(&rdev->same_set);
        init_waitqueue_head(&rdev->blocked_wait);
-@@ -6987,7 +6987,7 @@ static int md_seq_show(struct seq_file *seq, void *v)
+@@ -6994,7 +6994,7 @@ static int md_seq_show(struct seq_file *seq, void *v)
  
                spin_unlock(&pers_lock);
                seq_printf(seq, "\n");
@@ -38267,7 +37950,7 @@ index f363135..9b38815 100644
                return 0;
        }
        if (v == (void*)2) {
-@@ -7090,7 +7090,7 @@ static int md_seq_open(struct inode *inode, struct file *file)
+@@ -7097,7 +7097,7 @@ static int md_seq_open(struct inode *inode, struct file *file)
                return error;
  
        seq = file->private_data;
@@ -38276,7 +37959,7 @@ index f363135..9b38815 100644
        return error;
  }
  
-@@ -7104,7 +7104,7 @@ static unsigned int mdstat_poll(struct file *filp, poll_table *wait)
+@@ -7111,7 +7111,7 @@ static unsigned int mdstat_poll(struct file *filp, poll_table *wait)
        /* always allow read */
        mask = POLLIN | POLLRDNORM;
  
@@ -38285,7 +37968,7 @@ index f363135..9b38815 100644
                mask |= POLLERR | POLLPRI;
        return mask;
  }
-@@ -7148,7 +7148,7 @@ static int is_mddev_idle(struct mddev *mddev, int init)
+@@ -7155,7 +7155,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]) -
@@ -38295,7 +37978,7 @@ index f363135..9b38815 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 eca59c3..7c42285 100644
+index d90fb1a..4174a2b 100644
 --- a/drivers/md/md.h
 +++ b/drivers/md/md.h
 @@ -94,13 +94,13 @@ struct md_rdev {
@@ -38336,10 +38019,10 @@ index 1cbfc6b..56e1dbb 100644
  /*----------------------------------------------------------------*/
  
 diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
-index 75b1f89..00ba344 100644
+index 6af167f..40c25a1 100644
 --- a/drivers/md/raid1.c
 +++ b/drivers/md/raid1.c
-@@ -1819,7 +1819,7 @@ static int fix_sync_read_error(struct r1bio *r1_bio)
+@@ -1826,7 +1826,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)
@@ -38348,7 +38031,7 @@ index 75b1f89..00ba344 100644
                }
                sectors -= s;
                sect += s;
-@@ -2041,7 +2041,7 @@ static void fix_read_error(struct r1conf *conf, int read_disk,
+@@ -2048,7 +2048,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)) {
@@ -38358,10 +38041,10 @@ index 75b1f89..00ba344 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 8d925dc..11d674f 100644
+index 46c14e5..4db5966 100644
 --- a/drivers/md/raid10.c
 +++ b/drivers/md/raid10.c
-@@ -1878,7 +1878,7 @@ static void end_sync_read(struct bio *bio, int error)
+@@ -1932,7 +1932,7 @@ static void end_sync_read(struct bio *bio, int error)
                /* The write handler will notice the lack of
                 * R10BIO_Uptodate and record any errors etc
                 */
@@ -38370,7 +38053,7 @@ index 8d925dc..11d674f 100644
                           &conf->mirrors[d].rdev->corrected_errors);
  
        /* for reconstruct, we always reschedule after a read.
-@@ -2227,7 +2227,7 @@ static void check_decay_read_errors(struct mddev *mddev, struct md_rdev *rdev)
+@@ -2281,7 +2281,7 @@ static void check_decay_read_errors(struct mddev *mddev, struct md_rdev *rdev)
  {
        struct timespec cur_time_mon;
        unsigned long hours_since_last;
@@ -38379,7 +38062,7 @@ index 8d925dc..11d674f 100644
  
        ktime_get_ts(&cur_time_mon);
  
-@@ -2249,9 +2249,9 @@ static void check_decay_read_errors(struct mddev *mddev, struct md_rdev *rdev)
+@@ -2303,9 +2303,9 @@ static void check_decay_read_errors(struct mddev *mddev, struct md_rdev *rdev)
         * overflowing the shift of read_errors by hours_since_last.
         */
        if (hours_since_last >= 8 * sizeof(read_errors))
@@ -38391,7 +38074,7 @@ index 8d925dc..11d674f 100644
  }
  
  static int r10_sync_page_io(struct md_rdev *rdev, sector_t sector,
-@@ -2305,8 +2305,8 @@ static void fix_read_error(struct r10conf *conf, struct mddev *mddev, struct r10
+@@ -2359,8 +2359,8 @@ static void fix_read_error(struct r10conf *conf, struct mddev *mddev, struct r10
                return;
  
        check_decay_read_errors(mddev, rdev);
@@ -38402,7 +38085,7 @@ index 8d925dc..11d674f 100644
                char b[BDEVNAME_SIZE];
                bdevname(rdev->bdev, b);
  
-@@ -2314,7 +2314,7 @@ static void fix_read_error(struct r10conf *conf, struct mddev *mddev, struct r10
+@@ -2368,7 +2368,7 @@ static void fix_read_error(struct r10conf *conf, struct mddev *mddev, struct r10
                       "md/raid10:%s: %s: Raid device exceeded "
                       "read_error threshold [cur %d:max %d]\n",
                       mdname(mddev), b,
@@ -38411,7 +38094,7 @@ index 8d925dc..11d674f 100644
                printk(KERN_NOTICE
                       "md/raid10:%s: %s: Failing raid device\n",
                       mdname(mddev), b);
-@@ -2469,7 +2469,7 @@ static void fix_read_error(struct r10conf *conf, struct mddev *mddev, struct r10
+@@ -2523,7 +2523,7 @@ static void fix_read_error(struct r10conf *conf, struct mddev *mddev, struct r10
                                               sect +
                                               choose_data_offset(r10_bio, rdev)),
                                       bdevname(rdev->bdev, b));
@@ -38421,10 +38104,10 @@ index 8d925dc..11d674f 100644
  
                        rdev_dec_pending(rdev, mddev);
 diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
-index 94ce78e..df99e24 100644
+index f4e87bf..0d4ad3f 100644
 --- a/drivers/md/raid5.c
 +++ b/drivers/md/raid5.c
-@@ -1800,21 +1800,21 @@ static void raid5_end_read_request(struct bio * bi, int error)
+@@ -1763,21 +1763,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));
@@ -38450,7 +38133,7 @@ index 94ce78e..df99e24 100644
                if (test_bit(R5_ReadRepl, &sh->dev[i].flags))
                        printk_ratelimited(
                                KERN_WARNING
-@@ -1842,7 +1842,7 @@ static void raid5_end_read_request(struct bio * bi, int error)
+@@ -1805,7 +1805,7 @@ static void raid5_end_read_request(struct bio * bi, int error)
                                mdname(conf->mddev),
                                (unsigned long long)s,
                                bdn);
@@ -38460,7 +38143,7 @@ index 94ce78e..df99e24 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 d33101a..6b13069 100644
+index 401ef64..836e563 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,
@@ -38473,7 +38156,7 @@ index d33101a..6b13069 100644
        int minor;
        int id;
 diff --git a/drivers/media/dvb-frontends/dib3000.h b/drivers/media/dvb-frontends/dib3000.h
-index 404f63a..4796533 100644
+index 9b6c3bb..baeb5c7 100644
 --- a/drivers/media/dvb-frontends/dib3000.h
 +++ b/drivers/media/dvb-frontends/dib3000.h
 @@ -39,7 +39,7 @@ struct dib_fe_xfer_ops
@@ -38483,7 +38166,7 @@ index 404f63a..4796533 100644
 -};
 +} __no_const;
  
- #if defined(CONFIG_DVB_DIB3000MB) || (defined(CONFIG_DVB_DIB3000MB_MODULE) && defined(MODULE))
+ #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 bc78354..42c9459 100644
@@ -38503,7 +38186,7 @@ index bc78354..42c9459 100644
  module_param_array(video_nr, int, NULL, 0444);
  module_param_array(vbi_nr,   int, NULL, 0444);
 diff --git a/drivers/media/platform/omap/omap_vout.c b/drivers/media/platform/omap/omap_vout.c
-index 8e9a668..78d6310 100644
+index 96c4a17..1305a79 100644
 --- a/drivers/media/platform/omap/omap_vout.c
 +++ b/drivers/media/platform/omap/omap_vout.c
 @@ -63,7 +63,6 @@ enum omap_vout_channels {
@@ -38539,10 +38222,10 @@ index 8e9a668..78d6310 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 b671e20..34088b7 100644
+index 04e6490..2df65bf 100644
 --- a/drivers/media/platform/s5p-tv/mixer.h
 +++ b/drivers/media/platform/s5p-tv/mixer.h
-@@ -155,7 +155,7 @@ struct mxr_layer {
+@@ -156,7 +156,7 @@ struct mxr_layer {
        /** layer index (unique identifier) */
        int idx;
        /** callbacks for layer methods */
@@ -38565,7 +38248,7 @@ index b93a21f..2535195 100644
                .buffer_set = mxr_graph_buffer_set,
                .stream_set = mxr_graph_stream_set,
 diff --git a/drivers/media/platform/s5p-tv/mixer_reg.c b/drivers/media/platform/s5p-tv/mixer_reg.c
-index 3b1670a..595c939 100644
+index b713403..53cb5ad 100644
 --- a/drivers/media/platform/s5p-tv/mixer_reg.c
 +++ b/drivers/media/platform/s5p-tv/mixer_reg.c
 @@ -276,7 +276,7 @@ static void mxr_irq_layer_handle(struct mxr_layer *layer)
@@ -38578,10 +38261,10 @@ index 3b1670a..595c939 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 1f3b743..e839271 100644
+index 82142a2..6de47e8 100644
 --- a/drivers/media/platform/s5p-tv/mixer_video.c
 +++ b/drivers/media/platform/s5p-tv/mixer_video.c
-@@ -208,7 +208,7 @@ static void mxr_layer_default_geo(struct mxr_layer *layer)
+@@ -209,7 +209,7 @@ static void mxr_layer_default_geo(struct mxr_layer *layer)
        layer->geo.src.height = layer->geo.src.full_height;
  
        mxr_geometry_dump(mdev, &layer->geo);
@@ -38590,7 +38273,7 @@ index 1f3b743..e839271 100644
        mxr_geometry_dump(mdev, &layer->geo);
  }
  
-@@ -226,7 +226,7 @@ static void mxr_layer_update_output(struct mxr_layer *layer)
+@@ -227,7 +227,7 @@ static void mxr_layer_update_output(struct mxr_layer *layer)
        layer->geo.dst.full_width = mbus_fmt.width;
        layer->geo.dst.full_height = mbus_fmt.height;
        layer->geo.dst.field = mbus_fmt.field;
@@ -38599,7 +38282,7 @@ index 1f3b743..e839271 100644
  
        mxr_geometry_dump(mdev, &layer->geo);
  }
-@@ -332,7 +332,7 @@ static int mxr_s_fmt(struct file *file, void *priv,
+@@ -333,7 +333,7 @@ static int mxr_s_fmt(struct file *file, void *priv,
        /* set source size to highest accepted value */
        geo->src.full_width = max(geo->dst.full_width, pix->width);
        geo->src.full_height = max(geo->dst.full_height, pix->height);
@@ -38608,7 +38291,7 @@ index 1f3b743..e839271 100644
        mxr_geometry_dump(mdev, &layer->geo);
        /* set cropping to total visible screen */
        geo->src.width = pix->width;
-@@ -340,12 +340,12 @@ static int mxr_s_fmt(struct file *file, void *priv,
+@@ -341,12 +341,12 @@ static int mxr_s_fmt(struct file *file, void *priv,
        geo->src.x_offset = 0;
        geo->src.y_offset = 0;
        /* assure consistency of geometry */
@@ -38623,7 +38306,7 @@ index 1f3b743..e839271 100644
        mxr_geometry_dump(mdev, &layer->geo);
  
        /* returning results */
-@@ -472,7 +472,7 @@ static int mxr_s_selection(struct file *file, void *fh,
+@@ -473,7 +473,7 @@ static int mxr_s_selection(struct file *file, void *fh,
                target->width = s->r.width;
                target->height = s->r.height;
  
@@ -38632,7 +38315,7 @@ index 1f3b743..e839271 100644
  
                /* retrieve update selection rectangle */
                res.left = target->x_offset;
-@@ -937,13 +937,13 @@ static int start_streaming(struct vb2_queue *vq, unsigned int count)
+@@ -938,13 +938,13 @@ static int start_streaming(struct vb2_queue *vq, unsigned int count)
        mxr_output_get(mdev);
  
        mxr_layer_update_output(layer);
@@ -38648,7 +38331,7 @@ index 1f3b743..e839271 100644
        mxr_streamer_get(mdev);
  
        return 0;
-@@ -1013,7 +1013,7 @@ static int stop_streaming(struct vb2_queue *vq)
+@@ -1014,7 +1014,7 @@ static int stop_streaming(struct vb2_queue *vq)
        spin_unlock_irqrestore(&layer->enq_slock, flags);
  
        /* disabling layer in hardware */
@@ -38657,7 +38340,7 @@ index 1f3b743..e839271 100644
        /* remove one streamer */
        mxr_streamer_put(mdev);
        /* allow changes in output configuration */
-@@ -1052,8 +1052,8 @@ void mxr_base_layer_unregister(struct mxr_layer *layer)
+@@ -1053,8 +1053,8 @@ void mxr_base_layer_unregister(struct mxr_layer *layer)
  
  void mxr_layer_release(struct mxr_layer *layer)
  {
@@ -38668,7 +38351,7 @@ index 1f3b743..e839271 100644
  }
  
  void mxr_base_layer_release(struct mxr_layer *layer)
-@@ -1079,7 +1079,7 @@ struct mxr_layer *mxr_base_layer_create(struct mxr_device *mdev,
+@@ -1080,7 +1080,7 @@ struct mxr_layer *mxr_base_layer_create(struct mxr_device *mdev,
  
        layer->mdev = mdev;
        layer->idx = idx;
@@ -38726,10 +38409,10 @@ index 3940bb0..fb3952a 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 9382895..ac8093c 100644
+index 9578a67..31aa652 100644
 --- a/drivers/media/usb/dvb-usb/dw2102.c
 +++ b/drivers/media/usb/dvb-usb/dw2102.c
-@@ -95,7 +95,7 @@ struct su3000_state {
+@@ -115,7 +115,7 @@ struct su3000_state {
  
  struct s6x0_state {
        int (*old_set_voltage)(struct dvb_frontend *f, fe_sec_voltage_t v);
@@ -38761,27 +38444,6 @@ index aa6e7c7..4cd8061 100644
        const struct v4l2_ioctl_info *info;
        void *fh = file->private_data;
        struct v4l2_fh *vfh = NULL;
-diff --git a/drivers/memstick/host/r592.c b/drivers/memstick/host/r592.c
-index 29b2172..a7c5b31 100644
---- a/drivers/memstick/host/r592.c
-+++ b/drivers/memstick/host/r592.c
-@@ -454,7 +454,7 @@ static int r592_transfer_fifo_pio(struct r592_device *dev)
- /* Executes one TPC (data is read/written from small or large fifo) */
- static void r592_execute_tpc(struct r592_device *dev)
- {
--      bool is_write = dev->req->tpc >= MS_TPC_SET_RW_REG_ADRS;
-+      bool is_write;
-       int len, error;
-       u32 status, reg;
-@@ -463,6 +463,7 @@ static void r592_execute_tpc(struct r592_device *dev)
-               return;
-       }
-+      is_write = dev->req->tpc >= MS_TPC_SET_RW_REG_ADRS;
-       len = dev->req->long_data ?
-               dev->req->sg.length : dev->req->data_len;
 diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c
 index fb69baa..3aeea2e 100644
 --- a/drivers/message/fusion/mptbase.c
@@ -39114,10 +38776,10 @@ index 277a8db..0e0b754 100644
        for (i = irq_base; i < irq_end; i++) {
                irq_set_chip_and_handler(i, &twl6030_irq_chip,
 diff --git a/drivers/misc/c2port/core.c b/drivers/misc/c2port/core.c
-index f428d86..274c368 100644
+index f32550a..e3e52a2 100644
 --- a/drivers/misc/c2port/core.c
 +++ b/drivers/misc/c2port/core.c
-@@ -924,7 +924,9 @@ struct c2port_device *c2port_device_register(char *name,
+@@ -920,7 +920,9 @@ struct c2port_device *c2port_device_register(char *name,
        mutex_init(&c2dev->mutex);
  
        /* Create binary file */
@@ -39129,10 +38791,10 @@ index f428d86..274c368 100644
        if (unlikely(ret))
                goto error_device_create_bin_file;
 diff --git a/drivers/misc/kgdbts.c b/drivers/misc/kgdbts.c
-index 3aa9a96..59cf685 100644
+index 36f5d52..32311c3 100644
 --- a/drivers/misc/kgdbts.c
 +++ b/drivers/misc/kgdbts.c
-@@ -832,7 +832,7 @@ static void run_plant_and_detach_test(int is_early)
+@@ -834,7 +834,7 @@ static void run_plant_and_detach_test(int is_early)
        char before[BREAK_INSTR_SIZE];
        char after[BREAK_INSTR_SIZE];
  
@@ -39141,7 +38803,7 @@ index 3aa9a96..59cf685 100644
          BREAK_INSTR_SIZE);
        init_simple_test();
        ts.tst = plant_and_detach_test;
-@@ -840,7 +840,7 @@ static void run_plant_and_detach_test(int is_early)
+@@ -842,7 +842,7 @@ static void run_plant_and_detach_test(int is_early)
        /* Activate test with initial breakpoint */
        if (!is_early)
                kgdb_breakpoint();
@@ -39483,7 +39145,7 @@ index d971817..33bdca5 100644
  
                break;
 diff --git a/drivers/mmc/core/mmc_ops.c b/drivers/mmc/core/mmc_ops.c
-index 6d8f701..35b6369 100644
+index 49f04bc..65660c2 100644
 --- a/drivers/mmc/core/mmc_ops.c
 +++ b/drivers/mmc/core/mmc_ops.c
 @@ -247,7 +247,7 @@ mmc_send_cxd_data(struct mmc_card *card, struct mmc_host *host,
@@ -39507,10 +39169,10 @@ index 53b8fd9..615b462 100644
 +} __do_const;
  #endif /* _DW_MMC_H_ */
 diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c
-index 82a8de1..3c56ccb 100644
+index 7363efe..681558e 100644
 --- a/drivers/mmc/host/sdhci-s3c.c
 +++ b/drivers/mmc/host/sdhci-s3c.c
-@@ -721,9 +721,11 @@ static int sdhci_s3c_probe(struct platform_device *pdev)
+@@ -720,9 +720,11 @@ static int sdhci_s3c_probe(struct platform_device *pdev)
         * we can use overriding functions instead of default.
         */
        if (host->quirks & SDHCI_QUIRK_NONSTANDARD_CLOCK) {
@@ -39576,10 +39238,10 @@ index 8dd6ba5..419cc1d 100644
        struct sm_sysfs_attribute *vendor_attribute;
  
 diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
-index 27cdf1f..8c37357 100644
+index dbbea0e..3f4a0b1 100644
 --- a/drivers/net/bonding/bond_main.c
 +++ b/drivers/net/bonding/bond_main.c
-@@ -4859,7 +4859,7 @@ static unsigned int bond_get_num_tx_queues(void)
+@@ -4822,7 +4822,7 @@ static unsigned int bond_get_num_tx_queues(void)
        return tx_queues;
  }
  
@@ -39588,7 +39250,7 @@ index 27cdf1f..8c37357 100644
        .kind                   = "bond",
        .priv_size              = sizeof(struct bonding),
        .setup                  = bond_setup,
-@@ -4975,8 +4975,8 @@ static void __exit bonding_exit(void)
+@@ -4947,8 +4947,8 @@ static void __exit bonding_exit(void)
  
        bond_destroy_debugfs();
  
@@ -39599,7 +39261,7 @@ index 27cdf1f..8c37357 100644
  #ifdef CONFIG_NET_POLL_CONTROLLER
        /*
 diff --git a/drivers/net/ethernet/8390/ax88796.c b/drivers/net/ethernet/8390/ax88796.c
-index 70dba5d..11a0919 100644
+index e1d2643..7f4133b 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)
@@ -39616,10 +39278,10 @@ index 70dba5d..11a0919 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 0991534..8098e92 100644
+index aee7671..3ca2651 100644
 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
 +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
-@@ -1094,7 +1094,7 @@ static inline u8 bnx2x_get_path_func_num(struct bnx2x *bp)
+@@ -1093,7 +1093,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 */
@@ -39628,84 +39290,11 @@ index 0991534..8098e92 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_dcb.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c
-index 10bc093..a2fb42a 100644
---- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c
-+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c
-@@ -2136,12 +2136,12 @@ static u8 bnx2x_dcbnl_get_cap(struct net_device *netdev, int capid, u8 *cap)
-                       break;
-               default:
-                       BNX2X_ERR("Non valid capability ID\n");
--                      rval = -EINVAL;
-+                      rval = 1;
-                       break;
-               }
-       } else {
-               DP(BNX2X_MSG_DCB, "DCB disabled\n");
--              rval = -EINVAL;
-+              rval = 1;
-       }
-       DP(BNX2X_MSG_DCB, "capid %d:%x\n", capid, *cap);
-@@ -2167,12 +2167,12 @@ static int bnx2x_dcbnl_get_numtcs(struct net_device *netdev, int tcid, u8 *num)
-                       break;
-               default:
-                       BNX2X_ERR("Non valid TC-ID\n");
--                      rval = -EINVAL;
-+                      rval = 1;
-                       break;
-               }
-       } else {
-               DP(BNX2X_MSG_DCB, "DCB disabled\n");
--              rval = -EINVAL;
-+              rval = 1;
-       }
-       return rval;
-@@ -2185,7 +2185,7 @@ static int bnx2x_dcbnl_set_numtcs(struct net_device *netdev, int tcid, u8 num)
-       return -EINVAL;
- }
--static u8  bnx2x_dcbnl_get_pfc_state(struct net_device *netdev)
-+static u8 bnx2x_dcbnl_get_pfc_state(struct net_device *netdev)
- {
-       struct bnx2x *bp = netdev_priv(netdev);
-       DP(BNX2X_MSG_DCB, "state = %d\n", bp->dcbx_local_feat.pfc.enabled);
-@@ -2387,12 +2387,12 @@ static u8 bnx2x_dcbnl_get_featcfg(struct net_device *netdev, int featid,
-                       break;
-               default:
-                       BNX2X_ERR("Non valid featrue-ID\n");
--                      rval = -EINVAL;
-+                      rval = 1;
-                       break;
-               }
-       } else {
-               DP(BNX2X_MSG_DCB, "DCB disabled\n");
--              rval = -EINVAL;
-+              rval = 1;
-       }
-       return rval;
-@@ -2428,12 +2428,12 @@ static u8 bnx2x_dcbnl_set_featcfg(struct net_device *netdev, int featid,
-                       break;
-               default:
-                       BNX2X_ERR("Non valid featrue-ID\n");
--                      rval = -EINVAL;
-+                      rval = 1;
-                       break;
-               }
-       } else {
-               DP(BNX2X_MSG_DCB, "dcbnl call not valid\n");
--              rval = -EINVAL;
-+              rval = 1;
-       }
-       return rval;
 diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c
-index 09b625e..15b16fe 100644
+index 7306416..5fb7fb5 100644
 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c
 +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c
-@@ -2375,15 +2375,14 @@ int bnx2x_config_rx_mode(struct bnx2x *bp,
+@@ -2381,15 +2381,14 @@ int bnx2x_config_rx_mode(struct bnx2x *bp,
        return rc;
  }
  
@@ -39727,10 +39316,10 @@ index 09b625e..15b16fe 100644
  }
  
 diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h
-index adbd91b..58ec94a 100644
+index ff90760..08d8aed 100644
 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h
 +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h
-@@ -1293,8 +1293,7 @@ int bnx2x_vlan_mac_move(struct bnx2x *bp,
+@@ -1306,8 +1306,7 @@ int bnx2x_vlan_mac_move(struct bnx2x *bp,
  
  /********************* RX MODE ****************/
  
@@ -39741,10 +39330,10 @@ index adbd91b..58ec94a 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 d330e81..ce1fb9a 100644
+index 8d7d4c2..95f7681 100644
 --- a/drivers/net/ethernet/broadcom/tg3.h
 +++ b/drivers/net/ethernet/broadcom/tg3.h
-@@ -146,6 +146,7 @@
+@@ -147,6 +147,7 @@
  #define  CHIPREV_ID_5750_A0            0x4000
  #define  CHIPREV_ID_5750_A1            0x4001
  #define  CHIPREV_ID_5750_A3            0x4003
@@ -39788,7 +39377,7 @@ index 4c83003..2a2a5b9 100644
        break;
      }
 diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
-index 4d6f3c5..6169e60 100644
+index 2886c9b..db71673 100644
 --- a/drivers/net/ethernet/emulex/benet/be_main.c
 +++ b/drivers/net/ethernet/emulex/benet/be_main.c
 @@ -455,7 +455,7 @@ static void accumulate_16bit_val(u32 *acc, u16 val)
@@ -39801,7 +39390,7 @@ index 4d6f3c5..6169e60 100644
  
  void be_parse_stats(struct be_adapter *adapter)
 diff --git a/drivers/net/ethernet/faraday/ftgmac100.c b/drivers/net/ethernet/faraday/ftgmac100.c
-index 74d749e..eefb1bd 100644
+index 7c361d1..57e3ff1 100644
 --- a/drivers/net/ethernet/faraday/ftgmac100.c
 +++ b/drivers/net/ethernet/faraday/ftgmac100.c
 @@ -31,6 +31,8 @@
@@ -39814,7 +39403,7 @@ index 74d749e..eefb1bd 100644
  
  #include "ftgmac100.h"
 diff --git a/drivers/net/ethernet/faraday/ftmac100.c b/drivers/net/ethernet/faraday/ftmac100.c
-index b901a01..1ff32ee 100644
+index b5ea8fb..bd25e9a 100644
 --- a/drivers/net/ethernet/faraday/ftmac100.c
 +++ b/drivers/net/ethernet/faraday/ftmac100.c
 @@ -31,6 +31,8 @@
@@ -39827,10 +39416,10 @@ index b901a01..1ff32ee 100644
  #include "ftmac100.h"
  
 diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
-index bb9256a..56d8752 100644
+index 331987d..3be1135 100644
 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
 +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
-@@ -806,7 +806,7 @@ void ixgbe_ptp_start_cyclecounter(struct ixgbe_adapter *adapter)
+@@ -776,7 +776,7 @@ void ixgbe_ptp_start_cyclecounter(struct ixgbe_adapter *adapter)
        }
  
        /* update the base incval used to calculate frequency adjustment */
@@ -39839,19 +39428,6 @@ index bb9256a..56d8752 100644
        smp_mb();
  
        /* need lock to prevent incorrect read while modifying cyclecounter */
-diff --git a/drivers/net/ethernet/lantiq_etop.c b/drivers/net/ethernet/lantiq_etop.c
-index c124e67..db9b897 100644
---- a/drivers/net/ethernet/lantiq_etop.c
-+++ b/drivers/net/ethernet/lantiq_etop.c
-@@ -769,7 +769,7 @@ ltq_etop_probe(struct platform_device *pdev)
-       return 0;
- err_free:
--      kfree(dev);
-+      free_netdev(dev);
- err_out:
-       return err;
- }
 diff --git a/drivers/net/ethernet/neterion/vxge/vxge-config.c b/drivers/net/ethernet/neterion/vxge/vxge-config.c
 index fbe5363..266b4e3 100644
 --- a/drivers/net/ethernet/neterion/vxge/vxge-config.c
@@ -39877,11 +39453,55 @@ index fbe5363..266b4e3 100644
        fifo->mempool =
                __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 5c033f2..7bbb0d8 100644
+--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c
++++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c
+@@ -1894,7 +1894,9 @@ int qlcnic_83xx_config_default_opmode(struct qlcnic_adapter *adapter)
+       op_mode = QLCRDX(ahw, QLC_83XX_DRV_OP_MODE);
+       if (op_mode == QLC_83XX_DEFAULT_OPMODE) {
+-              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;
+diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_vnic.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_vnic.c
+index b0c3de9..fc5857e 100644
+--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_vnic.c
++++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_vnic.c
+@@ -200,15 +200,21 @@ int qlcnic_83xx_config_vnic_opmode(struct qlcnic_adapter *adapter)
+       if (priv_level == QLCNIC_NON_PRIV_FUNC) {
+               ahw->op_mode = QLCNIC_NON_PRIV_FUNC;
+               ahw->idc.state_entry = qlcnic_83xx_idc_ready_state_entry;
+-              nic_ops->init_driver = qlcnic_83xx_init_non_privileged_vnic;
++              pax_open_kernel();
++              *(void **)&nic_ops->init_driver = qlcnic_83xx_init_non_privileged_vnic;
++              pax_close_kernel();
+       } else if (priv_level == QLCNIC_PRIV_FUNC) {
+               ahw->op_mode = QLCNIC_PRIV_FUNC;
+               ahw->idc.state_entry = qlcnic_83xx_idc_vnic_pf_entry;
+-              nic_ops->init_driver = qlcnic_83xx_init_privileged_vnic;
++              pax_open_kernel();
++              *(void **)&nic_ops->init_driver = qlcnic_83xx_init_privileged_vnic;
++              pax_close_kernel();
+       } else if (priv_level == QLCNIC_MGMT_FUNC) {
+               ahw->op_mode = QLCNIC_MGMT_FUNC;
+               ahw->idc.state_entry = qlcnic_83xx_idc_ready_state_entry;
+-              nic_ops->init_driver = qlcnic_83xx_init_mgmt_vnic;
++              pax_open_kernel();
++              *(void **)&nic_ops->init_driver = qlcnic_83xx_init_mgmt_vnic;
++              pax_close_kernel();
+       } else {
+               return -EIO;
+       }
 diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
-index 998974f..ecd26db 100644
+index 15ba8c4..3f56838 100644
 --- a/drivers/net/ethernet/realtek/r8169.c
 +++ b/drivers/net/ethernet/realtek/r8169.c
-@@ -741,22 +741,22 @@ struct rtl8169_private {
+@@ -740,22 +740,22 @@ struct rtl8169_private {
        struct mdio_ops {
                void (*write)(struct rtl8169_private *, int, int);
                int (*read)(struct rtl8169_private *, int);
@@ -39922,7 +39542,7 @@ index 3f93624..cf01144 100644
                           MC_CMD_PTP_IN_SYNCHRONIZE_LEN);
  
 diff --git a/drivers/net/ethernet/stmicro/stmmac/mmc_core.c b/drivers/net/ethernet/stmicro/stmmac/mmc_core.c
-index 0c74a70..3bc6f68 100644
+index 50617c5..b13724c 100644
 --- a/drivers/net/ethernet/stmicro/stmmac/mmc_core.c
 +++ b/drivers/net/ethernet/stmicro/stmmac/mmc_core.c
 @@ -140,8 +140,8 @@ void dwmac_mmc_ctrl(void __iomem *ioaddr, unsigned int mode)
@@ -39950,10 +39570,10 @@ index e6fe0d8..2b7d752 100644
        spinlock_t request_lock;
        struct list_head req_list;
 diff --git a/drivers/net/hyperv/rndis_filter.c b/drivers/net/hyperv/rndis_filter.c
-index 2b657d4..9903bc0 100644
+index 0775f0a..d4fb316 100644
 --- a/drivers/net/hyperv/rndis_filter.c
 +++ b/drivers/net/hyperv/rndis_filter.c
-@@ -107,7 +107,7 @@ static struct rndis_request *get_rndis_request(struct rndis_device *dev,
+@@ -104,7 +104,7 @@ static struct rndis_request *get_rndis_request(struct rndis_device *dev,
         * template
         */
        set = &rndis_msg->msg.set_req;
@@ -39962,7 +39582,7 @@ index 2b657d4..9903bc0 100644
  
        /* Add to the request list */
        spin_lock_irqsave(&dev->request_lock, flags);
-@@ -758,7 +758,7 @@ static void rndis_filter_halt_device(struct rndis_device *dev)
+@@ -752,7 +752,7 @@ static void rndis_filter_halt_device(struct rndis_device *dev)
  
        /* Setup the rndis set */
        halt = &request->request_msg.msg.halt_req;
@@ -39972,10 +39592,10 @@ index 2b657d4..9903bc0 100644
        /* Ignore return since this msg is optional. */
        rndis_filter_send_request(dev, request);
 diff --git a/drivers/net/ieee802154/fakehard.c b/drivers/net/ieee802154/fakehard.c
-index 1e9cb0b..7839125 100644
+index 8f1c256..a2991d1 100644
 --- a/drivers/net/ieee802154/fakehard.c
 +++ b/drivers/net/ieee802154/fakehard.c
-@@ -386,7 +386,7 @@ static int ieee802154fake_probe(struct platform_device *pdev)
+@@ -385,7 +385,7 @@ static int ieee802154fake_probe(struct platform_device *pdev)
        phy->transmit_power = 0xbf;
  
        dev->netdev_ops = &fake_ops;
@@ -39985,10 +39605,10 @@ index 1e9cb0b..7839125 100644
        priv = netdev_priv(dev);
        priv->phy = phy;
 diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c
-index e5cb723..1fc0461 100644
+index 011062e..ada88e9 100644
 --- a/drivers/net/macvlan.c
 +++ b/drivers/net/macvlan.c
-@@ -852,13 +852,15 @@ static const struct nla_policy macvlan_policy[IFLA_MACVLAN_MAX + 1] = {
+@@ -892,13 +892,15 @@ static const struct nla_policy macvlan_policy[IFLA_MACVLAN_MAX + 1] = {
  int macvlan_link_register(struct rtnl_link_ops *ops)
  {
        /* common fields */
@@ -40011,7 +39631,7 @@ index e5cb723..1fc0461 100644
  
        return rtnl_link_register(ops);
  };
-@@ -914,7 +916,7 @@ static int macvlan_device_event(struct notifier_block *unused,
+@@ -954,7 +956,7 @@ static int macvlan_device_event(struct notifier_block *unused,
        return NOTIFY_DONE;
  }
  
@@ -40021,10 +39641,10 @@ index e5cb723..1fc0461 100644
  };
  
 diff --git a/drivers/net/macvtap.c b/drivers/net/macvtap.c
-index 0f0f9ce..0ca5819 100644
+index a449439..1e468fe 100644
 --- a/drivers/net/macvtap.c
 +++ b/drivers/net/macvtap.c
-@@ -1100,7 +1100,7 @@ static int macvtap_device_event(struct notifier_block *unused,
+@@ -1090,7 +1090,7 @@ static int macvtap_device_event(struct notifier_block *unused,
        return NOTIFY_DONE;
  }
  
@@ -40046,7 +39666,7 @@ index daec9b0..6428fcb 100644
  }
  EXPORT_SYMBOL(free_mdio_bitbang);
 diff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_generic.c
-index 508570e..f706dc7 100644
+index 72ff14b..11d442d 100644
 --- a/drivers/net/ppp/ppp_generic.c
 +++ b/drivers/net/ppp/ppp_generic.c
 @@ -999,7 +999,6 @@ ppp_net_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
@@ -40067,11 +39687,24 @@ index 508570e..f706dc7 100644
                        break;
                err = 0;
                break;
+diff --git a/drivers/net/slip/slhc.c b/drivers/net/slip/slhc.c
+index 1252d9c..80e660b 100644
+--- a/drivers/net/slip/slhc.c
++++ b/drivers/net/slip/slhc.c
+@@ -488,7 +488,7 @@ slhc_uncompress(struct slcompress *comp, unsigned char *icp, int isize)
+       register struct tcphdr *thp;
+       register struct iphdr *ip;
+       register struct cstate *cs;
+-      int len, hdrlen;
++      long len, hdrlen;
+       unsigned char *cp = icp;
+       /* 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 8efe47a..a8075c5 100644
+index bf34192..fba3500 100644
 --- a/drivers/net/team/team.c
 +++ b/drivers/net/team/team.c
-@@ -2603,7 +2603,7 @@ static int team_device_event(struct notifier_block *unused,
+@@ -2668,7 +2668,7 @@ static int team_device_event(struct notifier_block *unused,
        return NOTIFY_DONE;
  }
  
@@ -40081,10 +39714,10 @@ index 8efe47a..a8075c5 100644
  };
  
 diff --git a/drivers/net/tun.c b/drivers/net/tun.c
-index cb95fe5..a5bdab5 100644
+index 755fa9e..631fdce 100644
 --- a/drivers/net/tun.c
 +++ b/drivers/net/tun.c
-@@ -1838,7 +1838,7 @@ unlock:
+@@ -1841,7 +1841,7 @@ unlock:
  }
  
  static long __tun_chr_ioctl(struct file *file, unsigned int cmd,
@@ -40093,7 +39726,7 @@ index cb95fe5..a5bdab5 100644
  {
        struct tun_file *tfile = file->private_data;
        struct tun_struct *tun;
-@@ -1850,6 +1850,9 @@ static long __tun_chr_ioctl(struct file *file, unsigned int cmd,
+@@ -1853,6 +1853,9 @@ static long __tun_chr_ioctl(struct file *file, unsigned int cmd,
        int vnet_hdr_sz;
        int ret;
  
@@ -40104,7 +39737,7 @@ index cb95fe5..a5bdab5 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 cd8ccb2..cff5144 100644
+index e2dd324..be92fcf 100644
 --- a/drivers/net/usb/hso.c
 +++ b/drivers/net/usb/hso.c
 @@ -71,7 +71,7 @@
@@ -40185,7 +39818,7 @@ index cd8ccb2..cff5144 100644
                                        /* Setup and send a ctrl req read on
                                         * port i */
                                        if (!serial->rx_urb_filled[0]) {
-@@ -3079,7 +3078,7 @@ static int hso_resume(struct usb_interface *iface)
+@@ -3066,7 +3065,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)) {
@@ -40195,10 +39828,10 @@ index cd8ccb2..cff5144 100644
                                    hso_start_serial_device(serial_table[i], GFP_NOIO);
                                hso_kick_transmit(dev2ser(serial_table[i]));
 diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
-index 6993bfa..9053a34 100644
+index 7cee7a3..1eb9f3b 100644
 --- a/drivers/net/vxlan.c
 +++ b/drivers/net/vxlan.c
-@@ -1428,7 +1428,7 @@ nla_put_failure:
+@@ -1443,7 +1443,7 @@ nla_put_failure:
        return -EMSGSIZE;
  }
  
@@ -40208,7 +39841,7 @@ index 6993bfa..9053a34 100644
        .maxtype        = IFLA_VXLAN_MAX,
        .policy         = vxlan_policy,
 diff --git a/drivers/net/wireless/at76c50x-usb.c b/drivers/net/wireless/at76c50x-usb.c
-index 77fa428..996b355 100644
+index 5ac5f7a..5f82012 100644
 --- a/drivers/net/wireless/at76c50x-usb.c
 +++ b/drivers/net/wireless/at76c50x-usb.c
 @@ -353,7 +353,7 @@ static int at76_dfu_get_state(struct usb_device *udev, u8 *state)
@@ -40426,10 +40059,10 @@ index 301bf72..3f5654f 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 9d26fc5..60d9f14 100644
+index 784e81c..349e01e 100644
 --- a/drivers/net/wireless/ath/ath9k/hw.h
 +++ b/drivers/net/wireless/ath/ath9k/hw.h
-@@ -658,7 +658,7 @@ struct ath_hw_private_ops {
+@@ -653,7 +653,7 @@ struct ath_hw_private_ops {
  
        /* ANI */
        void (*ani_cache_ini_regs)(struct ath_hw *ah);
@@ -40437,21 +40070,21 @@ index 9d26fc5..60d9f14 100644
 +} __no_const;
  
  /**
-  * struct ath_hw_ops - callbacks used by hardware code and driver code
-@@ -688,7 +688,7 @@ struct ath_hw_ops {
-       void (*antdiv_comb_conf_set)(struct ath_hw *ah,
-                       struct ath_hw_antcomb_conf *antconf);
-       void (*antctrl_shared_chain_lnadiv)(struct ath_hw *hw, bool enable);
+  * struct ath_spec_scan - parameters for Atheros spectral scan
+@@ -722,7 +722,7 @@ struct ath_hw_ops {
+                                    struct ath_spec_scan *param);
+       void (*spectral_scan_trigger)(struct ath_hw *ah);
+       void (*spectral_scan_wait)(struct ath_hw *ah);
 -};
 +} __no_const;
  
  struct ath_nf_limits {
        s16 max;
 diff --git a/drivers/net/wireless/iwlegacy/3945-mac.c b/drivers/net/wireless/iwlegacy/3945-mac.c
-index 3726cd6..b655808 100644
+index c353b5f..62aaca2 100644
 --- a/drivers/net/wireless/iwlegacy/3945-mac.c
 +++ b/drivers/net/wireless/iwlegacy/3945-mac.c
-@@ -3615,7 +3615,9 @@ il3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
+@@ -3639,7 +3639,9 @@ il3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
         */
        if (il3945_mod_params.disable_hw_scan) {
                D_INFO("Disabling hw_scan\n");
@@ -40463,7 +40096,7 @@ index 3726cd6..b655808 100644
  
        D_INFO("*** LOAD DRIVER ***\n");
 diff --git a/drivers/net/wireless/iwlwifi/dvm/debugfs.c b/drivers/net/wireless/iwlwifi/dvm/debugfs.c
-index 5b9533e..7733880 100644
+index 81d4071..f2071ea 100644
 --- a/drivers/net/wireless/iwlwifi/dvm/debugfs.c
 +++ b/drivers/net/wireless/iwlwifi/dvm/debugfs.c
 @@ -203,7 +203,7 @@ static ssize_t iwl_dbgfs_sram_write(struct file *file,
@@ -40584,10 +40217,10 @@ index 5b9533e..7733880 100644
        memset(buf, 0, sizeof(buf));
        buf_size = min(count, sizeof(buf) - 1);
 diff --git a/drivers/net/wireless/iwlwifi/pcie/trans.c b/drivers/net/wireless/iwlwifi/pcie/trans.c
-index 35708b9..31f7754 100644
+index 12c4f31..484d948 100644
 --- a/drivers/net/wireless/iwlwifi/pcie/trans.c
 +++ b/drivers/net/wireless/iwlwifi/pcie/trans.c
-@@ -1100,7 +1100,7 @@ static ssize_t iwl_dbgfs_interrupt_write(struct file *file,
+@@ -1328,7 +1328,7 @@ static ssize_t iwl_dbgfs_interrupt_write(struct file *file,
        struct isr_statistics *isr_stats = &trans_pcie->isr_stats;
  
        char buf[8];
@@ -40596,7 +40229,7 @@ index 35708b9..31f7754 100644
        u32 reset_flag;
  
        memset(buf, 0, sizeof(buf));
-@@ -1121,7 +1121,7 @@ static ssize_t iwl_dbgfs_csr_write(struct file *file,
+@@ -1349,7 +1349,7 @@ static ssize_t iwl_dbgfs_csr_write(struct file *file,
  {
        struct iwl_trans *trans = file->private_data;
        char buf[8];
@@ -40606,10 +40239,10 @@ index 35708b9..31f7754 100644
  
        memset(buf, 0, sizeof(buf));
 diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
-index ff90855..e46d223 100644
+index cffdf4f..7cefb69 100644
 --- a/drivers/net/wireless/mac80211_hwsim.c
 +++ b/drivers/net/wireless/mac80211_hwsim.c
-@@ -2062,25 +2062,19 @@ static int __init init_mac80211_hwsim(void)
+@@ -2144,25 +2144,19 @@ static int __init init_mac80211_hwsim(void)
  
        if (channels > 1) {
                hwsim_if_comb.num_different_channels = channels;
@@ -40648,22 +40281,8 @@ index ff90855..e46d223 100644
        }
  
        spin_lock_init(&hwsim_radio_lock);
-diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c
-index cdb11b3..3eca710 100644
---- a/drivers/net/wireless/mwifiex/cfg80211.c
-+++ b/drivers/net/wireless/mwifiex/cfg80211.c
-@@ -1846,7 +1846,8 @@ mwifiex_cfg80211_scan(struct wiphy *wiphy,
-               }
-       }
--      for (i = 0; i < request->n_channels; i++) {
-+      for (i = 0; i < min_t(u32, request->n_channels,
-+                            MWIFIEX_USER_SCAN_CHAN_MAX); i++) {
-               chan = request->channels[i];
-               priv->user_scan_cfg->chan_list[i].chan_number = chan->hw_value;
-               priv->user_scan_cfg->chan_list[i].radio_type = chan->band;
 diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c
-index abe1d03..fb02c22 100644
+index 525fd75..6c9f791 100644
 --- a/drivers/net/wireless/rndis_wlan.c
 +++ b/drivers/net/wireless/rndis_wlan.c
 @@ -1238,7 +1238,7 @@ static int set_rts_threshold(struct usbnet *usbdev, u32 rts_threshold)
@@ -40676,10 +40295,10 @@ index abe1d03..fb02c22 100644
  
        tmp = cpu_to_le32(rts_threshold);
 diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h
-index 0751b35..246ba3e 100644
+index 086abb4..8279c30 100644
 --- a/drivers/net/wireless/rt2x00/rt2x00.h
 +++ b/drivers/net/wireless/rt2x00/rt2x00.h
-@@ -398,7 +398,7 @@ struct rt2x00_intf {
+@@ -396,7 +396,7 @@ struct rt2x00_intf {
         * for hardware which doesn't support hardware
         * sequence counting.
         */
@@ -40689,10 +40308,10 @@ index 0751b35..246ba3e 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 e488b94..14b6a0c 100644
+index 4d91795..62fccff 100644
 --- a/drivers/net/wireless/rt2x00/rt2x00queue.c
 +++ b/drivers/net/wireless/rt2x00/rt2x00queue.c
-@@ -240,9 +240,9 @@ static void rt2x00queue_create_tx_descriptor_seq(struct rt2x00_dev *rt2x00dev,
+@@ -251,9 +251,9 @@ static void rt2x00queue_create_tx_descriptor_seq(struct rt2x00_dev *rt2x00dev,
         * sequence counter given by mac80211.
         */
        if (test_bit(ENTRY_TXD_FIRST_FRAGMENT, &txdesc->flags))
@@ -40731,10 +40350,10 @@ index e57ee48..541cf6c 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 e5f5f8f..fdf15b7 100644
+index 09694e3..24ccec7 100644
 --- a/drivers/net/wireless/ti/wl12xx/main.c
 +++ b/drivers/net/wireless/ti/wl12xx/main.c
-@@ -644,7 +644,9 @@ static int wl12xx_identify_chip(struct wl1271 *wl)
+@@ -656,7 +656,9 @@ static int wl12xx_identify_chip(struct wl1271 *wl)
                       sizeof(wl->conf.mem));
  
                /* read data preparation is only needed by wl127x */
@@ -40743,9 +40362,9 @@ index e5f5f8f..fdf15b7 100644
 +              *(void **)&wl->ops->prepare_read = wl127x_prepare_read;
 +              pax_close_kernel();
  
-               wlcore_set_min_fw_ver(wl, WL127X_CHIP_VER, WL127X_IFTYPE_VER,
-                                     WL127X_MAJOR_VER, WL127X_SUBTYPE_VER,
-@@ -665,7 +667,9 @@ static int wl12xx_identify_chip(struct wl1271 *wl)
+               wlcore_set_min_fw_ver(wl, WL127X_CHIP_VER,
+                             WL127X_IFTYPE_SR_VER,  WL127X_MAJOR_SR_VER,
+@@ -681,7 +683,9 @@ static int wl12xx_identify_chip(struct wl1271 *wl)
                       sizeof(wl->conf.mem));
  
                /* read data preparation is only needed by wl127x */
@@ -40754,13 +40373,13 @@ index e5f5f8f..fdf15b7 100644
 +              *(void **)&wl->ops->prepare_read = wl127x_prepare_read;
 +              pax_close_kernel();
  
-               wlcore_set_min_fw_ver(wl, WL127X_CHIP_VER, WL127X_IFTYPE_VER,
-                                     WL127X_MAJOR_VER, WL127X_SUBTYPE_VER,
+               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 8d8c1f8..e754844 100644
+index da3ef1b..4790b95 100644
 --- a/drivers/net/wireless/ti/wl18xx/main.c
 +++ b/drivers/net/wireless/ti/wl18xx/main.c
-@@ -1489,8 +1489,10 @@ static int wl18xx_setup(struct wl1271 *wl)
+@@ -1664,8 +1664,10 @@ static int wl18xx_setup(struct wl1271 *wl)
        }
  
        if (!checksum_param) {
@@ -40774,10 +40393,10 @@ index 8d8c1f8..e754844 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 ef2b171..bb513a6 100644
+index 7ef0b4a..ff65c28 100644
 --- a/drivers/net/wireless/zd1211rw/zd_usb.c
 +++ b/drivers/net/wireless/zd1211rw/zd_usb.c
-@@ -387,7 +387,7 @@ static inline void handle_regs_int(struct urb *urb)
+@@ -386,7 +386,7 @@ static inline void handle_regs_int(struct urb *urb)
  {
        struct zd_usb *usb = urb->context;
        struct zd_usb_interrupt *intr = &usb->intr;
@@ -40907,10 +40526,10 @@ index 38b6fc0..b5cbfce 100644
  
  extern struct oprofile_stat_struct oprofile_stats;
 diff --git a/drivers/oprofile/oprofilefs.c b/drivers/oprofile/oprofilefs.c
-index 849357c..b83c1e0 100644
+index 7c12d9c..558bf3bb 100644
 --- a/drivers/oprofile/oprofilefs.c
 +++ b/drivers/oprofile/oprofilefs.c
-@@ -185,7 +185,7 @@ static const struct file_operations atomic_ro_fops = {
+@@ -190,7 +190,7 @@ static const struct file_operations atomic_ro_fops = {
  
  
  int oprofilefs_create_ro_atomic(struct super_block *sb, struct dentry *root,
@@ -41081,7 +40700,7 @@ index 202f4a9..8ee47d0 100644
        mutex_lock(&pci_hp_mutex);
        /*
 diff --git a/drivers/pci/hotplug/pciehp_core.c b/drivers/pci/hotplug/pciehp_core.c
-index 939bd1d..a1459c9 100644
+index 7d72c5e..edce02c 100644
 --- a/drivers/pci/hotplug/pciehp_core.c
 +++ b/drivers/pci/hotplug/pciehp_core.c
 @@ -91,7 +91,7 @@ static int init_slot(struct controller *ctrl)
@@ -41125,10 +40744,10 @@ index 9c6e9bb..2916736 100644
        if (!sysfs_initialized)
                return -EACCES;
 diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h
-index e851829..a1a7196 100644
+index 7346ee6..41520eb 100644
 --- a/drivers/pci/pci.h
 +++ b/drivers/pci/pci.h
-@@ -98,7 +98,7 @@ struct pci_vpd_ops {
+@@ -93,7 +93,7 @@ struct pci_vpd_ops {
  struct pci_vpd {
        unsigned int len;
        const struct pci_vpd_ops *ops;
@@ -41138,7 +40757,7 @@ index e851829..a1a7196 100644
  
  extern int pci_vpd_pci22_init(struct pci_dev *dev);
 diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c
-index 8474b6a..ee81993 100644
+index d320df6..ca9a8f6 100644
 --- a/drivers/pci/pcie/aspm.c
 +++ b/drivers/pci/pcie/aspm.c
 @@ -27,9 +27,9 @@
@@ -41155,7 +40774,7 @@ index 8474b6a..ee81993 100644
  #define ASPM_STATE_ALL                (ASPM_STATE_L0S | ASPM_STATE_L1)
  
 diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
-index 6186f03..1a78714 100644
+index 5427787..8df273b 100644
 --- a/drivers/pci/probe.c
 +++ b/drivers/pci/probe.c
 @@ -173,7 +173,7 @@ int __pci_read_base(struct pci_dev *dev, enum pci_bar_type type,
@@ -41168,7 +40787,7 @@ index 6186f03..1a78714 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 9b8505c..f00870a 100644
+index 0b00947..64f7c0a 100644
 --- a/drivers/pci/proc.c
 +++ b/drivers/pci/proc.c
 @@ -465,7 +465,16 @@ static const struct file_operations proc_bus_pci_dev_operations = {
@@ -41188,36 +40807,49 @@ index 9b8505c..f00870a 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
+index 3e5b4497..dcdfb70 100644
+--- a/drivers/platform/x86/chromeos_laptop.c
++++ b/drivers/platform/x86/chromeos_laptop.c
+@@ -301,7 +301,7 @@ static int __init setup_tsl2563_als(const struct dmi_system_id *id)
+       return 0;
+ }
+-static struct dmi_system_id __initdata chromeos_laptop_dmi_table[] = {
++static struct dmi_system_id __initconst chromeos_laptop_dmi_table[] = {
+       {
+               .ident = "Samsung Series 5 550 - Touchpad",
+               .matches = {
 diff --git a/drivers/platform/x86/msi-laptop.c b/drivers/platform/x86/msi-laptop.c
-index 2111dbb..79e434b 100644
+index 6b22938..bc9700e 100644
 --- a/drivers/platform/x86/msi-laptop.c
 +++ b/drivers/platform/x86/msi-laptop.c
-@@ -820,12 +820,14 @@ static int __init load_scm_model_init(struct platform_device *sdev)
-       int result;
-       /* allow userland write sysfs file  */
--      dev_attr_bluetooth.store = store_bluetooth;
--      dev_attr_wlan.store = store_wlan;
--      dev_attr_threeg.store = store_threeg;
--      dev_attr_bluetooth.attr.mode |= S_IWUSR;
--      dev_attr_wlan.attr.mode |= S_IWUSR;
--      dev_attr_threeg.attr.mode |= S_IWUSR;
-+      pax_open_kernel();
-+      *(void **)&dev_attr_bluetooth.store = store_bluetooth;
-+      *(void **)&dev_attr_wlan.store = store_wlan;
-+      *(void **)&dev_attr_threeg.store = store_threeg;
-+      *(umode_t *)&dev_attr_bluetooth.attr.mode |= S_IWUSR;
-+      *(umode_t *)&dev_attr_wlan.attr.mode |= S_IWUSR;
-+      *(umode_t *)&dev_attr_threeg.attr.mode |= S_IWUSR;
-+      pax_close_kernel();
+@@ -1000,12 +1000,14 @@ static int __init load_scm_model_init(struct platform_device *sdev)
+       if (!quirks->ec_read_only) {
+               /* allow userland write sysfs file  */
+-              dev_attr_bluetooth.store = store_bluetooth;
+-              dev_attr_wlan.store = store_wlan;
+-              dev_attr_threeg.store = store_threeg;
+-              dev_attr_bluetooth.attr.mode |= S_IWUSR;
+-              dev_attr_wlan.attr.mode |= S_IWUSR;
+-              dev_attr_threeg.attr.mode |= S_IWUSR;
++              pax_open_kernel();
++              *(void **)&dev_attr_bluetooth.store = store_bluetooth;
++              *(void **)&dev_attr_wlan.store = store_wlan;
++              *(void **)&dev_attr_threeg.store = store_threeg;
++              *(umode_t *)&dev_attr_bluetooth.attr.mode |= S_IWUSR;
++              *(umode_t *)&dev_attr_wlan.attr.mode |= S_IWUSR;
++              *(umode_t *)&dev_attr_threeg.attr.mode |= S_IWUSR;
++              pax_close_kernel();
+       }
  
        /* disable hardware control by fn key */
-       result = ec_read(MSI_STANDARD_EC_SCM_LOAD_ADDRESS, &data);
 diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c
-index 0fe987f..6f3d5c3 100644
+index 14d4dce..b129917 100644
 --- a/drivers/platform/x86/sony-laptop.c
 +++ b/drivers/platform/x86/sony-laptop.c
-@@ -2356,7 +2356,7 @@ static void sony_nc_lid_resume_cleanup(struct platform_device *pd)
+@@ -2465,7 +2465,7 @@ static void sony_nc_gfx_switch_cleanup(struct platform_device *pd)
  }
  
  /* High speed charging function */
@@ -41227,10 +40859,10 @@ index 0fe987f..6f3d5c3 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 f946ca7..f25c833 100644
+index edec135..59a24a3 100644
 --- a/drivers/platform/x86/thinkpad_acpi.c
 +++ b/drivers/platform/x86/thinkpad_acpi.c
-@@ -2097,7 +2097,7 @@ static int hotkey_mask_get(void)
+@@ -2093,7 +2093,7 @@ static int hotkey_mask_get(void)
        return 0;
  }
  
@@ -41239,7 +40871,7 @@ index f946ca7..f25c833 100644
  {
        /* log only what the user can fix... */
        const u32 wantedmask = hotkey_driver_mask &
-@@ -2328,11 +2328,6 @@ static void hotkey_read_nvram(struct tp_nvram_state *n, const u32 m)
+@@ -2324,11 +2324,6 @@ static void hotkey_read_nvram(struct tp_nvram_state *n, const u32 m)
        }
  }
  
@@ -41251,7 +40883,7 @@ index f946ca7..f25c833 100644
  #define TPACPI_COMPARE_KEY(__scancode, __member) \
        do { \
                if ((event_mask & (1 << __scancode)) && \
-@@ -2346,36 +2341,42 @@ static void hotkey_compare_and_issue_event(struct tp_nvram_state *oldn,
+@@ -2342,36 +2337,42 @@ static void hotkey_compare_and_issue_event(struct tp_nvram_state *oldn,
                        tpacpi_hotkey_send_key(__scancode); \
        } while (0)
  
@@ -41318,7 +40950,7 @@ index f946ca7..f25c833 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);
-@@ -2409,7 +2410,7 @@ static void hotkey_compare_and_issue_event(struct tp_nvram_state *oldn,
+@@ -2405,7 +2406,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 */
@@ -41327,7 +40959,7 @@ index f946ca7..f25c833 100644
                        TPACPI_MAY_SEND_KEY(TP_ACPI_HOTKEYSCAN_MUTE);
                }
        } else {
-@@ -2419,7 +2420,7 @@ static void hotkey_compare_and_issue_event(struct tp_nvram_state *oldn,
+@@ -2415,7 +2416,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) {
@@ -41336,7 +40968,7 @@ index f946ca7..f25c833 100644
                } else if (oldn->volume_toggle != newn->volume_toggle) {
                        /* repeated vol up/down keypress at end of scale ? */
                        if (newn->volume_level == 0)
-@@ -2432,7 +2433,8 @@ static void hotkey_compare_and_issue_event(struct tp_nvram_state *oldn,
+@@ -2428,7 +2429,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,
@@ -41346,7 +40978,7 @@ index f946ca7..f25c833 100644
        } else if (oldn->brightness_toggle != newn->brightness_toggle) {
                /* repeated key presses that didn't change state */
                if (newn->brightness_level == 0)
-@@ -2441,10 +2443,10 @@ static void hotkey_compare_and_issue_event(struct tp_nvram_state *oldn,
+@@ -2437,10 +2439,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);
        }
@@ -41485,7 +41117,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 8a7cfb3..72e6e9b 100644
+index 5deac43..608c5ff 100644
 --- a/drivers/power/power_supply_core.c
 +++ b/drivers/power/power_supply_core.c
 @@ -24,7 +24,10 @@
@@ -41510,10 +41142,10 @@ index 8a7cfb3..72e6e9b 100644
        return 0;
  }
 diff --git a/drivers/power/power_supply_sysfs.c b/drivers/power/power_supply_sysfs.c
-index 40fa3b7..d9c2e0e 100644
+index 29178f7..c65f324 100644
 --- a/drivers/power/power_supply_sysfs.c
 +++ b/drivers/power/power_supply_sysfs.c
-@@ -229,17 +229,15 @@ static struct attribute_group power_supply_attr_group = {
+@@ -230,17 +230,15 @@ static struct attribute_group power_supply_attr_group = {
        .is_visible = power_supply_attr_is_visible,
  };
  
@@ -41570,10 +41202,10 @@ index 9a8ea91..c483dd9 100644
  
        max->enable_external_control = pdata->enable_ext_control;
 diff --git a/drivers/regulator/mc13892-regulator.c b/drivers/regulator/mc13892-regulator.c
-index 0d84b1f..c2da6ac 100644
+index 9891aec..beb3083 100644
 --- a/drivers/regulator/mc13892-regulator.c
 +++ b/drivers/regulator/mc13892-regulator.c
-@@ -540,10 +540,12 @@ static int mc13892_regulator_probe(struct platform_device *pdev)
+@@ -583,10 +583,12 @@ static int mc13892_regulator_probe(struct platform_device *pdev)
        }
        mc13xxx_unlock(mc13892);
  
@@ -41587,9 +41219,9 @@ index 0d84b1f..c2da6ac 100644
 +      pax_close_kernel();
  
        mc13xxx_data = mc13xxx_parse_regulators_dt(pdev, mc13892_regulators,
-                                       ARRAY_SIZE(mc13892_regulators));
+                                       ARRAY_SIZE(mc13892_regulators),
 diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c
-index 16630aa..6afc992 100644
+index cc5bea9..689f7d9 100644
 --- a/drivers/rtc/rtc-cmos.c
 +++ b/drivers/rtc/rtc-cmos.c
 @@ -724,7 +724,9 @@ cmos_do_probe(struct device *dev, struct resource *ports, int rtc_irq)
@@ -41604,10 +41236,10 @@ index 16630aa..6afc992 100644
        if (retval < 0) {
                dev_dbg(dev, "can't create nvram file? %d\n", retval);
 diff --git a/drivers/rtc/rtc-dev.c b/drivers/rtc/rtc-dev.c
-index 9a86b4b..3a383dc 100644
+index d049393..bb20be0 100644
 --- a/drivers/rtc/rtc-dev.c
 +++ b/drivers/rtc/rtc-dev.c
-@@ -14,6 +14,7 @@
+@@ -16,6 +16,7 @@
  #include <linux/module.h>
  #include <linux/rtc.h>
  #include <linux/sched.h>
@@ -41615,7 +41247,7 @@ index 9a86b4b..3a383dc 100644
  #include "rtc-core.h"
  
  static dev_t rtc_devt;
-@@ -345,6 +346,8 @@ static long rtc_dev_ioctl(struct file *file,
+@@ -347,6 +348,8 @@ static long rtc_dev_ioctl(struct file *file,
                if (copy_from_user(&tm, uarg, sizeof(tm)))
                        return -EFAULT;
  
@@ -41625,7 +41257,7 @@ index 9a86b4b..3a383dc 100644
  
        case RTC_PIE_ON:
 diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c
-index e0d0ba4..3c65868 100644
+index 970a236..3613169 100644
 --- a/drivers/rtc/rtc-ds1307.c
 +++ b/drivers/rtc/rtc-ds1307.c
 @@ -106,7 +106,7 @@ struct ds1307 {
@@ -41688,7 +41320,7 @@ index 23a90e7..9cf04ee 100644
  /*
   * Queue element to wait for room in request queue. FIFO order is
 diff --git a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c
-index 593085a..47aa999 100644
+index df0c3c7..b00e1d0 100644
 --- a/drivers/scsi/hosts.c
 +++ b/drivers/scsi/hosts.c
 @@ -42,7 +42,7 @@
@@ -41710,7 +41342,7 @@ index 593085a..47aa999 100644
  
        /* These three are default values which can be overridden */
 diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
-index 4f33806..afd6f60 100644
+index 7f4f790..b75b92a 100644
 --- a/drivers/scsi/hpsa.c
 +++ b/drivers/scsi/hpsa.c
 @@ -554,7 +554,7 @@ static inline u32 next_command(struct ctlr_info *h, u8 q)
@@ -41722,7 +41354,7 @@ index 4f33806..afd6f60 100644
  
        if ((rq->head[rq->current_entry] & 1) == rq->wraparound) {
                a = rq->head[rq->current_entry];
-@@ -3374,7 +3374,7 @@ static void start_io(struct ctlr_info *h)
+@@ -3422,7 +3422,7 @@ static void start_io(struct ctlr_info *h)
        while (!list_empty(&h->reqQ)) {
                c = list_entry(h->reqQ.next, struct CommandList, list);
                /* can't do anything if fifo is full */
@@ -41731,7 +41363,7 @@ index 4f33806..afd6f60 100644
                        dev_warn(&h->pdev->dev, "fifo full\n");
                        break;
                }
-@@ -3396,7 +3396,7 @@ static void start_io(struct ctlr_info *h)
+@@ -3444,7 +3444,7 @@ static void start_io(struct ctlr_info *h)
  
                /* Tell the controller execute command */
                spin_unlock_irqrestore(&h->lock, flags);
@@ -41740,7 +41372,7 @@ index 4f33806..afd6f60 100644
                spin_lock_irqsave(&h->lock, flags);
        }
        spin_unlock_irqrestore(&h->lock, flags);
-@@ -3404,17 +3404,17 @@ static void start_io(struct ctlr_info *h)
+@@ -3452,17 +3452,17 @@ static void start_io(struct ctlr_info *h)
  
  static inline unsigned long get_next_completion(struct ctlr_info *h, u8 q)
  {
@@ -41761,7 +41393,7 @@ index 4f33806..afd6f60 100644
                (h->interrupts_enabled == 0);
  }
  
-@@ -4316,7 +4316,7 @@ static int hpsa_pci_init(struct ctlr_info *h)
+@@ -4364,7 +4364,7 @@ static int hpsa_pci_init(struct ctlr_info *h)
        if (prod_index < 0)
                return -ENODEV;
        h->product_name = products[prod_index].product_name;
@@ -41770,7 +41402,7 @@ index 4f33806..afd6f60 100644
  
        pci_disable_link_state(h->pdev, PCIE_LINK_STATE_L0S |
                               PCIE_LINK_STATE_L1 | PCIE_LINK_STATE_CLKPM);
-@@ -4598,7 +4598,7 @@ static void controller_lockup_detected(struct ctlr_info *h)
+@@ -4646,7 +4646,7 @@ static void controller_lockup_detected(struct ctlr_info *h)
  
        assert_spin_locked(&lockup_detector_lock);
        remove_ctlr_from_lockup_detector_list(h);
@@ -41779,7 +41411,7 @@ index 4f33806..afd6f60 100644
        spin_lock_irqsave(&h->lock, flags);
        h->lockup_detected = readl(h->vaddr + SA5_SCRATCHPAD_OFFSET);
        spin_unlock_irqrestore(&h->lock, flags);
-@@ -4775,7 +4775,7 @@ reinit_after_soft_reset:
+@@ -4823,7 +4823,7 @@ reinit_after_soft_reset:
        }
  
        /* make sure the board interrupts are off */
@@ -41788,7 +41420,7 @@ index 4f33806..afd6f60 100644
  
        if (hpsa_request_irq(h, do_hpsa_intr_msi, do_hpsa_intr_intx))
                goto clean2;
-@@ -4809,7 +4809,7 @@ reinit_after_soft_reset:
+@@ -4857,7 +4857,7 @@ reinit_after_soft_reset:
                 * fake ones to scoop up any residual completions.
                 */
                spin_lock_irqsave(&h->lock, flags);
@@ -41797,7 +41429,7 @@ index 4f33806..afd6f60 100644
                spin_unlock_irqrestore(&h->lock, flags);
                free_irqs(h);
                rc = hpsa_request_irq(h, hpsa_msix_discard_completions,
-@@ -4828,9 +4828,9 @@ reinit_after_soft_reset:
+@@ -4876,9 +4876,9 @@ reinit_after_soft_reset:
                dev_info(&h->pdev->dev, "Board READY.\n");
                dev_info(&h->pdev->dev,
                        "Waiting for stale completions to drain.\n");
@@ -41809,7 +41441,7 @@ index 4f33806..afd6f60 100644
  
                rc = controller_reset_failed(h->cfgtable);
                if (rc)
-@@ -4851,7 +4851,7 @@ reinit_after_soft_reset:
+@@ -4899,7 +4899,7 @@ reinit_after_soft_reset:
        }
  
        /* Turn the interrupts on so we can service requests */
@@ -41818,7 +41450,7 @@ index 4f33806..afd6f60 100644
  
        hpsa_hba_inquiry(h);
        hpsa_register_scsi(h);  /* hook ourselves into SCSI subsystem */
-@@ -4903,7 +4903,7 @@ static void hpsa_shutdown(struct pci_dev *pdev)
+@@ -4954,7 +4954,7 @@ static void hpsa_shutdown(struct pci_dev *pdev)
         * To write all data in the battery backed cache to disks
         */
        hpsa_flush_cache(h);
@@ -41827,7 +41459,7 @@ index 4f33806..afd6f60 100644
        hpsa_free_irqs_and_disable_msix(h);
  }
  
-@@ -5071,7 +5071,7 @@ static void hpsa_enter_performant_mode(struct ctlr_info *h, u32 use_short_tags)
+@@ -5122,7 +5122,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 */
@@ -42008,7 +41640,7 @@ index bdb81cd..d3c7c2c 100644
        .qc_issue               = sas_ata_qc_issue,
        .qc_fill_rtf            = sas_ata_qc_fill_rtf,
 diff --git a/drivers/scsi/lpfc/lpfc.h b/drivers/scsi/lpfc/lpfc.h
-index df4c13a..a51e90c 100644
+index 7706c99..3b4fc0c 100644
 --- a/drivers/scsi/lpfc/lpfc.h
 +++ b/drivers/scsi/lpfc/lpfc.h
 @@ -424,7 +424,7 @@ struct lpfc_vport {
@@ -42020,7 +41652,7 @@ index df4c13a..a51e90c 100644
  #endif
        uint8_t stat_data_enabled;
        uint8_t stat_data_blocked;
-@@ -842,8 +842,8 @@ struct lpfc_hba {
+@@ -853,8 +853,8 @@ struct lpfc_hba {
        struct timer_list fabric_block_timer;
        unsigned long bit_flags;
  #define       FABRIC_COMANDS_BLOCKED  0
@@ -42031,7 +41663,7 @@ index df4c13a..a51e90c 100644
        unsigned long last_rsrc_error_time;
        unsigned long last_ramp_down_time;
        unsigned long last_ramp_up_time;
-@@ -879,7 +879,7 @@ struct lpfc_hba {
+@@ -890,7 +890,7 @@ struct lpfc_hba {
  
        struct dentry *debug_slow_ring_trc;
        struct lpfc_debugfs_trc *slow_ring_trc;
@@ -42124,10 +41756,10 @@ index f63f5ff..de29189 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 89ad558..76956c4 100644
+index 314b4f6..7005d10 100644
 --- a/drivers/scsi/lpfc/lpfc_init.c
 +++ b/drivers/scsi/lpfc/lpfc_init.c
-@@ -10618,8 +10618,10 @@ lpfc_init(void)
+@@ -10551,8 +10551,10 @@ lpfc_init(void)
                        "misc_register returned with status %d", error);
  
        if (lpfc_enable_npiv) {
@@ -42141,10 +41773,10 @@ index 89ad558..76956c4 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 60e5a17..ff7a793 100644
+index 98af07c..7625fb5 100644
 --- a/drivers/scsi/lpfc/lpfc_scsi.c
 +++ b/drivers/scsi/lpfc/lpfc_scsi.c
-@@ -305,7 +305,7 @@ lpfc_rampdown_queue_depth(struct lpfc_hba *phba)
+@@ -325,7 +325,7 @@ lpfc_rampdown_queue_depth(struct lpfc_hba *phba)
        uint32_t evt_posted;
  
        spin_lock_irqsave(&phba->hbalock, flags);
@@ -42153,7 +41785,7 @@ index 60e5a17..ff7a793 100644
        phba->last_rsrc_error_time = jiffies;
  
        if ((phba->last_ramp_down_time + QUEUE_RAMP_DOWN_INTERVAL) > jiffies) {
-@@ -346,7 +346,7 @@ lpfc_rampup_queue_depth(struct lpfc_vport  *vport,
+@@ -366,7 +366,7 @@ lpfc_rampup_queue_depth(struct lpfc_vport  *vport,
        unsigned long flags;
        struct lpfc_hba *phba = vport->phba;
        uint32_t evt_posted;
@@ -42162,7 +41794,7 @@ index 60e5a17..ff7a793 100644
  
        if (vport->cfg_lun_queue_depth <= queue_depth)
                return;
-@@ -390,8 +390,8 @@ lpfc_ramp_down_queue_handler(struct lpfc_hba *phba)
+@@ -410,8 +410,8 @@ lpfc_ramp_down_queue_handler(struct lpfc_hba *phba)
        unsigned long num_rsrc_err, num_cmd_success;
        int i;
  
@@ -42173,7 +41805,7 @@ index 60e5a17..ff7a793 100644
  
        /*
         * The error and success command counters are global per
-@@ -419,8 +419,8 @@ lpfc_ramp_down_queue_handler(struct lpfc_hba *phba)
+@@ -439,8 +439,8 @@ lpfc_ramp_down_queue_handler(struct lpfc_hba *phba)
                        }
                }
        lpfc_destroy_vport_work_array(phba, vports);
@@ -42184,7 +41816,7 @@ index 60e5a17..ff7a793 100644
  }
  
  /**
-@@ -454,8 +454,8 @@ lpfc_ramp_up_queue_handler(struct lpfc_hba *phba)
+@@ -474,8 +474,8 @@ lpfc_ramp_up_queue_handler(struct lpfc_hba *phba)
                        }
                }
        lpfc_destroy_vport_work_array(phba, vports);
@@ -42303,10 +41935,10 @@ index e1d150f..6c6df44 100644
        /* To indicate add/delete/modify during CCN */
        u8 change_detected;
 diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c
-index 83d7984..a27d947 100644
+index b3db9dc..c3b1756 100644
 --- a/drivers/scsi/qla2xxx/qla_attr.c
 +++ b/drivers/scsi/qla2xxx/qla_attr.c
-@@ -1969,7 +1969,7 @@ qla24xx_vport_disable(struct fc_vport *fc_vport, bool disable)
+@@ -1971,7 +1971,7 @@ qla24xx_vport_disable(struct fc_vport *fc_vport, bool disable)
        return 0;
  }
  
@@ -42315,7 +41947,7 @@ index 83d7984..a27d947 100644
  
        .show_host_node_name = 1,
        .show_host_port_name = 1,
-@@ -2016,7 +2016,7 @@ struct fc_function_template qla2xxx_transport_functions = {
+@@ -2018,7 +2018,7 @@ struct fc_function_template qla2xxx_transport_functions = {
        .bsg_timeout = qla24xx_bsg_timeout,
  };
  
@@ -42325,10 +41957,10 @@ index 83d7984..a27d947 100644
        .show_host_node_name = 1,
        .show_host_port_name = 1,
 diff --git a/drivers/scsi/qla2xxx/qla_gbl.h b/drivers/scsi/qla2xxx/qla_gbl.h
-index 2411d1a..4673766 100644
+index b310fa9..b9b3944 100644
 --- a/drivers/scsi/qla2xxx/qla_gbl.h
 +++ b/drivers/scsi/qla2xxx/qla_gbl.h
-@@ -515,8 +515,8 @@ extern void qla2x00_get_sym_node_name(scsi_qla_host_t *, uint8_t *);
+@@ -523,8 +523,8 @@ extern void qla2x00_get_sym_node_name(scsi_qla_host_t *, uint8_t *);
  struct device_attribute;
  extern struct device_attribute *qla2x00_host_attrs[];
  struct fc_function_template;
@@ -42340,10 +41972,10 @@ index 2411d1a..4673766 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 10d23f8..a7d5d4c 100644
+index 2c6dd3d..e5ecd82 100644
 --- a/drivers/scsi/qla2xxx/qla_os.c
 +++ b/drivers/scsi/qla2xxx/qla_os.c
-@@ -1472,8 +1472,10 @@ qla2x00_config_dma_addressing(struct qla_hw_data *ha)
+@@ -1554,8 +1554,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;
@@ -42357,10 +41989,10 @@ index 10d23f8..a7d5d4c 100644
                }
        }
 diff --git a/drivers/scsi/qla4xxx/ql4_def.h b/drivers/scsi/qla4xxx/ql4_def.h
-index 329d553..f20d31d 100644
+index 129f5dd..ade53e8 100644
 --- a/drivers/scsi/qla4xxx/ql4_def.h
 +++ b/drivers/scsi/qla4xxx/ql4_def.h
-@@ -273,7 +273,7 @@ struct ddb_entry {
+@@ -275,7 +275,7 @@ struct ddb_entry {
                                           * (4000 only) */
        atomic_t relogin_timer;           /* Max Time to wait for
                                           * relogin to complete */
@@ -42370,10 +42002,10 @@ index 329d553..f20d31d 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 4cec123..7c1329f 100644
+index 6142729..b6a85c9 100644
 --- a/drivers/scsi/qla4xxx/ql4_os.c
 +++ b/drivers/scsi/qla4xxx/ql4_os.c
-@@ -2621,12 +2621,12 @@ static void qla4xxx_check_relogin_flash_ddb(struct iscsi_cls_session *cls_sess)
+@@ -2622,12 +2622,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 */
@@ -42388,7 +42020,7 @@ index 4cec123..7c1329f 100644
                                ddb_entry->default_time2wait + 4));
                        set_bit(DPC_RELOGIN_DEVICE, &ha->dpc_flags);
                        atomic_set(&ddb_entry->retry_relogin_timer,
-@@ -4738,7 +4738,7 @@ static void qla4xxx_setup_flash_ddb_entry(struct scsi_qla_host *ha,
+@@ -4742,7 +4742,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);
@@ -42411,10 +42043,10 @@ index 2c0d0ec..4e8681a 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 f1bf5af..f67e943 100644
+index c31187d..0ead8c3 100644
 --- a/drivers/scsi/scsi_lib.c
 +++ b/drivers/scsi/scsi_lib.c
-@@ -1454,7 +1454,7 @@ static void scsi_kill_request(struct request *req, struct request_queue *q)
+@@ -1459,7 +1459,7 @@ static void scsi_kill_request(struct request *req, struct request_queue *q)
        shost = sdev->host;
        scsi_init_cmd_errh(cmd);
        cmd->result = DID_NO_CONNECT << 16;
@@ -42423,7 +42055,7 @@ index f1bf5af..f67e943 100644
  
        /*
         * SCSI request completion path will do scsi_device_unbusy(),
-@@ -1480,9 +1480,9 @@ static void scsi_softirq_done(struct request *rq)
+@@ -1485,9 +1485,9 @@ static void scsi_softirq_done(struct request *rq)
  
        INIT_LIST_HEAD(&cmd->eh_entry);
  
@@ -42502,7 +42134,7 @@ index e894ca7..de9d7660 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 31969f2..2b348f0 100644
+index 0a74b97..fa8d648 100644
 --- a/drivers/scsi/scsi_transport_iscsi.c
 +++ b/drivers/scsi/scsi_transport_iscsi.c
 @@ -79,7 +79,7 @@ struct iscsi_internal {
@@ -42523,7 +42155,7 @@ index 31969f2..2b348f0 100644
  
        if (target_id == ISCSI_MAX_TARGET) {
                id = ida_simple_get(&iscsi_sess_ida, 0, 0, GFP_KERNEL);
-@@ -2943,7 +2943,7 @@ static __init int iscsi_transport_init(void)
+@@ -2955,7 +2955,7 @@ static __init int iscsi_transport_init(void)
        printk(KERN_INFO "Loading iSCSI transport class v%s.\n",
                ISCSI_TRANSPORT_VERSION);
  
@@ -42564,10 +42196,10 @@ index f379c7f..e8fc69c 100644
  
        transport_setup_device(&rport->dev);
 diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
-index 7992635..609faf8 100644
+index 82910cc..7c350ad 100644
 --- a/drivers/scsi/sd.c
 +++ b/drivers/scsi/sd.c
-@@ -2909,7 +2909,7 @@ static int sd_probe(struct device *dev)
+@@ -2929,7 +2929,7 @@ static int sd_probe(struct device *dev)
        sdkp->disk = gd;
        sdkp->index = index;
        atomic_set(&sdkp->openers, 0);
@@ -42577,7 +42209,7 @@ index 7992635..609faf8 100644
        if (!sdp->request_queue->rq_timeout) {
                if (sdp->type != TYPE_MOD)
 diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c
-index be2c9a6..275525c 100644
+index 9f0c465..47194ee 100644
 --- a/drivers/scsi/sg.c
 +++ b/drivers/scsi/sg.c
 @@ -1101,7 +1101,7 @@ sg_ioctl(struct file *filp, unsigned int cmd_in, unsigned long arg)
@@ -42590,10 +42222,10 @@ index be2c9a6..275525c 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 19ee901..6e8c2ef 100644
+index 004b10f..7c98d51 100644
 --- a/drivers/spi/spi.c
 +++ b/drivers/spi/spi.c
-@@ -1616,7 +1616,7 @@ int spi_bus_unlock(struct spi_master *master)
+@@ -1620,7 +1620,7 @@ int spi_bus_unlock(struct spi_master *master)
  EXPORT_SYMBOL_GPL(spi_bus_unlock);
  
  /* portable code must never pass more than 32 bytes */
@@ -42603,12 +42235,12 @@ index 19ee901..6e8c2ef 100644
  static u8     *buf;
  
 diff --git a/drivers/staging/iio/iio_hwmon.c b/drivers/staging/iio/iio_hwmon.c
-index c7a5f97..71ecd35 100644
+index 93af756..a4bc5bf 100644
 --- a/drivers/staging/iio/iio_hwmon.c
 +++ b/drivers/staging/iio/iio_hwmon.c
-@@ -72,7 +72,7 @@ static void iio_hwmon_free_attrs(struct iio_hwmon_state *st)
- static int iio_hwmon_probe(struct platform_device *pdev)
+@@ -67,7 +67,7 @@ static int iio_hwmon_probe(struct platform_device *pdev)
  {
+       struct device *dev = &pdev->dev;
        struct iio_hwmon_state *st;
 -      struct sensor_device_attribute *a;
 +      sensor_device_attribute_no_const *a;
@@ -42648,7 +42280,7 @@ index 34afc16..ffe44dd 100644
                                dev_kfree_skb_irq(skb);
                        }
 diff --git a/drivers/staging/octeon/ethernet.c b/drivers/staging/octeon/ethernet.c
-index ef32dc1..a159d68 100644
+index c3a90e7..023619a 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)
@@ -42667,227 +42299,6 @@ index ef32dc1..a159d68 100644
  #endif
        }
  
-diff --git a/drivers/staging/ramster/tmem.c b/drivers/staging/ramster/tmem.c
-index a2b7e03..aaf3630 100644
---- a/drivers/staging/ramster/tmem.c
-+++ b/drivers/staging/ramster/tmem.c
-@@ -50,25 +50,25 @@
-  * A tmem host implementation must use this function to register callbacks
-  * for memory allocation.
-  */
--static struct tmem_hostops tmem_hostops;
-+static struct tmem_hostops *tmem_hostops;
- static void tmem_objnode_tree_init(void);
- void tmem_register_hostops(struct tmem_hostops *m)
- {
-       tmem_objnode_tree_init();
--      tmem_hostops = *m;
-+      tmem_hostops = m;
- }
- /*
-  * A tmem host implementation must use this function to register
-  * callbacks for a page-accessible memory (PAM) implementation.
-  */
--static struct tmem_pamops tmem_pamops;
-+static struct tmem_pamops *tmem_pamops;
- void tmem_register_pamops(struct tmem_pamops *m)
- {
--      tmem_pamops = *m;
-+      tmem_pamops = m;
- }
- /*
-@@ -174,7 +174,7 @@ static void tmem_obj_init(struct tmem_obj *obj, struct tmem_hashbucket *hb,
-       obj->pampd_count = 0;
- #ifdef CONFIG_RAMSTER
-       if (tmem_pamops.new_obj != NULL)
--              (*tmem_pamops.new_obj)(obj);
-+              (tmem_pamops->new_obj)(obj);
- #endif
-       SET_SENTINEL(obj, OBJ);
-@@ -210,7 +210,7 @@ static void tmem_pool_flush(struct tmem_pool *pool, bool destroy)
-                       rbnode = rb_next(rbnode);
-                       tmem_pampd_destroy_all_in_obj(obj, true);
-                       tmem_obj_free(obj, hb);
--                      (*tmem_hostops.obj_free)(obj, pool);
-+                      (tmem_hostops->obj_free)(obj, pool);
-               }
-               spin_unlock(&hb->lock);
-       }
-@@ -261,7 +261,7 @@ static struct tmem_objnode *tmem_objnode_alloc(struct tmem_obj *obj)
-       ASSERT_SENTINEL(obj, OBJ);
-       BUG_ON(obj->pool == NULL);
-       ASSERT_SENTINEL(obj->pool, POOL);
--      objnode = (*tmem_hostops.objnode_alloc)(obj->pool);
-+      objnode = (tmem_hostops->objnode_alloc)(obj->pool);
-       if (unlikely(objnode == NULL))
-               goto out;
-       objnode->obj = obj;
-@@ -290,7 +290,7 @@ static void tmem_objnode_free(struct tmem_objnode *objnode)
-       ASSERT_SENTINEL(pool, POOL);
-       objnode->obj->objnode_count--;
-       objnode->obj = NULL;
--      (*tmem_hostops.objnode_free)(objnode, pool);
-+      (tmem_hostops->objnode_free)(objnode, pool);
- }
- /*
-@@ -348,7 +348,7 @@ static void *tmem_pampd_replace_in_obj(struct tmem_obj *obj, uint32_t index,
-               void *old_pampd = *(void **)slot;
-               *(void **)slot = new_pampd;
-               if (!no_free)
--                      (*tmem_pamops.free)(old_pampd, obj->pool,
-+                      (tmem_pamops->free)(old_pampd, obj->pool,
-                                               NULL, 0, false);
-               ret = new_pampd;
-       }
-@@ -505,7 +505,7 @@ static void tmem_objnode_node_destroy(struct tmem_obj *obj,
-               if (objnode->slots[i]) {
-                       if (ht == 1) {
-                               obj->pampd_count--;
--                              (*tmem_pamops.free)(objnode->slots[i],
-+                              (tmem_pamops->free)(objnode->slots[i],
-                                               obj->pool, NULL, 0, true);
-                               objnode->slots[i] = NULL;
-                               continue;
-@@ -524,7 +524,7 @@ static void tmem_pampd_destroy_all_in_obj(struct tmem_obj *obj,
-               return;
-       if (obj->objnode_tree_height == 0) {
-               obj->pampd_count--;
--              (*tmem_pamops.free)(obj->objnode_tree_root,
-+              (tmem_pamops->free)(obj->objnode_tree_root,
-                                       obj->pool, NULL, 0, true);
-       } else {
-               tmem_objnode_node_destroy(obj, obj->objnode_tree_root,
-@@ -535,7 +535,7 @@ static void tmem_pampd_destroy_all_in_obj(struct tmem_obj *obj,
-       obj->objnode_tree_root = NULL;
- #ifdef CONFIG_RAMSTER
-       if (tmem_pamops.free_obj != NULL)
--              (*tmem_pamops.free_obj)(obj->pool, obj, pool_destroy);
-+              (tmem_pamops->free_obj)(obj->pool, obj, pool_destroy);
- #endif
- }
-@@ -574,7 +574,7 @@ int tmem_put(struct tmem_pool *pool, struct tmem_oid *oidp, uint32_t index,
-                       /* if found, is a dup put, flush the old one */
-                       pampd_del = tmem_pampd_delete_from_obj(obj, index);
-                       BUG_ON(pampd_del != pampd);
--                      (*tmem_pamops.free)(pampd, pool, oidp, index, true);
-+                      (tmem_pamops->free)(pampd, pool, oidp, index, true);
-                       if (obj->pampd_count == 0) {
-                               objnew = obj;
-                               objfound = NULL;
-@@ -582,7 +582,7 @@ int tmem_put(struct tmem_pool *pool, struct tmem_oid *oidp, uint32_t index,
-                       pampd = NULL;
-               }
-       } else {
--              obj = objnew = (*tmem_hostops.obj_alloc)(pool);
-+              obj = objnew = (tmem_hostops->obj_alloc)(pool);
-               if (unlikely(obj == NULL)) {
-                       ret = -ENOMEM;
-                       goto out;
-@@ -597,16 +597,16 @@ int tmem_put(struct tmem_pool *pool, struct tmem_oid *oidp, uint32_t index,
-       if (unlikely(ret == -ENOMEM))
-               /* may have partially built objnode tree ("stump") */
-               goto delete_and_free;
--      (*tmem_pamops.create_finish)(pampd, is_ephemeral(pool));
-+      (tmem_pamops->create_finish)(pampd, is_ephemeral(pool));
-       goto out;
- delete_and_free:
-       (void)tmem_pampd_delete_from_obj(obj, index);
-       if (pampd)
--              (*tmem_pamops.free)(pampd, pool, NULL, 0, true);
-+              (tmem_pamops->free)(pampd, pool, NULL, 0, true);
-       if (objnew) {
-               tmem_obj_free(objnew, hb);
--              (*tmem_hostops.obj_free)(objnew, pool);
-+              (tmem_hostops->obj_free)(objnew, pool);
-       }
- out:
-       spin_unlock(&hb->lock);
-@@ -651,7 +651,7 @@ void tmem_localify_finish(struct tmem_obj *obj, uint32_t index,
-       if (pampd != NULL) {
-               BUG_ON(obj == NULL);
-               (void)tmem_pampd_replace_in_obj(obj, index, pampd, 1);
--              (*tmem_pamops.create_finish)(pampd, is_ephemeral(obj->pool));
-+              (tmem_pamops->create_finish)(pampd, is_ephemeral(obj->pool));
-       } else if (delete) {
-               BUG_ON(obj == NULL);
-               (void)tmem_pampd_delete_from_obj(obj, index);
-@@ -671,7 +671,7 @@ static int tmem_repatriate(void **ppampd, struct tmem_hashbucket *hb,
-       int ret = 0;
-       if (!is_ephemeral(pool))
--              new_pampd = (*tmem_pamops.repatriate_preload)(
-+              new_pampd = (tmem_pamops->repatriate_preload)(
-                               old_pampd, pool, oidp, index, &intransit);
-       if (intransit)
-               ret = -EAGAIN;
-@@ -680,7 +680,7 @@ static int tmem_repatriate(void **ppampd, struct tmem_hashbucket *hb,
-       /* must release the hb->lock else repatriate can't sleep */
-       spin_unlock(&hb->lock);
-       if (!intransit)
--              ret = (*tmem_pamops.repatriate)(old_pampd, new_pampd, pool,
-+              ret = (tmem_pamops->repatriate)(old_pampd, new_pampd, pool,
-                                               oidp, index, free, data);
-       if (ret == -EAGAIN) {
-               /* rare I think, but should cond_resched()??? */
-@@ -714,7 +714,7 @@ int tmem_replace(struct tmem_pool *pool, struct tmem_oid *oidp,
-       new_pampd = tmem_pampd_replace_in_obj(obj, index, new_pampd, 0);
-       /* if we bug here, pamops wasn't properly set up for ramster */
-       BUG_ON(tmem_pamops.replace_in_obj == NULL);
--      ret = (*tmem_pamops.replace_in_obj)(new_pampd, obj);
-+      ret = (tmem_pamops->replace_in_obj)(new_pampd, obj);
- out:
-       spin_unlock(&hb->lock);
-       return ret;
-@@ -776,15 +776,15 @@ int tmem_get(struct tmem_pool *pool, struct tmem_oid *oidp, uint32_t index,
-       if (free) {
-               if (obj->pampd_count == 0) {
-                       tmem_obj_free(obj, hb);
--                      (*tmem_hostops.obj_free)(obj, pool);
-+                      (tmem_hostops->obj_free)(obj, pool);
-                       obj = NULL;
-               }
-       }
-       if (free)
--              ret = (*tmem_pamops.get_data_and_free)(
-+              ret = (tmem_pamops->get_data_and_free)(
-                               data, sizep, raw, pampd, pool, oidp, index);
-       else
--              ret = (*tmem_pamops.get_data)(
-+              ret = (tmem_pamops->get_data)(
-                               data, sizep, raw, pampd, pool, oidp, index);
-       if (ret < 0)
-               goto out;
-@@ -816,10 +816,10 @@ int tmem_flush_page(struct tmem_pool *pool,
-       pampd = tmem_pampd_delete_from_obj(obj, index);
-       if (pampd == NULL)
-               goto out;
--      (*tmem_pamops.free)(pampd, pool, oidp, index, true);
-+      (tmem_pamops->free)(pampd, pool, oidp, index, true);
-       if (obj->pampd_count == 0) {
-               tmem_obj_free(obj, hb);
--              (*tmem_hostops.obj_free)(obj, pool);
-+              (tmem_hostops->obj_free)(obj, pool);
-       }
-       ret = 0;
-@@ -844,7 +844,7 @@ int tmem_flush_object(struct tmem_pool *pool, struct tmem_oid *oidp)
-               goto out;
-       tmem_pampd_destroy_all_in_obj(obj, false);
-       tmem_obj_free(obj, hb);
--      (*tmem_hostops.obj_free)(obj, pool);
-+      (tmem_hostops->obj_free)(obj, pool);
-       ret = 0;
- out:
 diff --git a/drivers/staging/rtl8712/rtl871x_io.h b/drivers/staging/rtl8712/rtl871x_io.h
 index dc23395..cf7e9b1 100644
 --- a/drivers/staging/rtl8712/rtl871x_io.h
@@ -42928,19 +42339,19 @@ index 5dddc4d..34fcb2f 100644
        /*
         * NOTE:
 diff --git a/drivers/staging/usbip/vhci_hcd.c b/drivers/staging/usbip/vhci_hcd.c
-index c3aa219..bf8b3de 100644
+index f1ca084..7b5c0c3 100644
 --- a/drivers/staging/usbip/vhci_hcd.c
 +++ b/drivers/staging/usbip/vhci_hcd.c
-@@ -451,7 +451,7 @@ static void vhci_tx_urb(struct urb *urb)
-               return;
-       }
+@@ -441,7 +441,7 @@ static void vhci_tx_urb(struct urb *urb)
+       spin_lock(&vdev->priv_lock);
  
 -      priv->seqnum = atomic_inc_return(&the_controller->seqnum);
 +      priv->seqnum = atomic_inc_return_unchecked(&the_controller->seqnum);
        if (priv->seqnum == 0xffff)
                dev_info(&urb->dev->dev, "seqnum max\n");
  
-@@ -703,7 +703,7 @@ static int vhci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status)
+@@ -687,7 +687,7 @@ static int vhci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status)
                        return -ENOMEM;
                }
  
@@ -42949,7 +42360,7 @@ index c3aa219..bf8b3de 100644
                if (unlink->seqnum == 0xffff)
                        pr_info("seqnum max\n");
  
-@@ -907,7 +907,7 @@ static int vhci_start(struct usb_hcd *hcd)
+@@ -891,7 +891,7 @@ static int vhci_start(struct usb_hcd *hcd)
                vdev->rhport = rhport;
        }
  
@@ -42959,10 +42370,10 @@ index c3aa219..bf8b3de 100644
  
        hcd->power_budget = 0; /* no limit */
 diff --git a/drivers/staging/usbip/vhci_rx.c b/drivers/staging/usbip/vhci_rx.c
-index ba5f1c0..11d8122 100644
+index faf8e60..c46f8ab 100644
 --- a/drivers/staging/usbip/vhci_rx.c
 +++ b/drivers/staging/usbip/vhci_rx.c
-@@ -77,7 +77,7 @@ static void vhci_recv_ret_submit(struct vhci_device *vdev,
+@@ -76,7 +76,7 @@ static void vhci_recv_ret_submit(struct vhci_device *vdev,
        if (!urb) {
                pr_err("cannot find a urb of seqnum %u\n", pdu->base.seqnum);
                pr_info("max seqnum %d\n",
@@ -43002,7 +42413,7 @@ index 5f13890..36a044b 100644
  
        pDevice->apdev->type = ARPHRD_IEEE80211;
 diff --git a/drivers/staging/vt6656/hostap.c b/drivers/staging/vt6656/hostap.c
-index 26a7d0e..897b083 100644
+index bc5e9da..dacd556 100644
 --- a/drivers/staging/vt6656/hostap.c
 +++ b/drivers/staging/vt6656/hostap.c
 @@ -60,14 +60,13 @@ static int          msglevel                =MSG_LEVEL_INFO;
@@ -43011,18 +42422,18 @@ index 26a7d0e..897b083 100644
  
 +static net_device_ops_no_const apdev_netdev_ops;
 +
- static int hostap_enable_hostapd(PSDevice pDevice, int rtnl_locked)
+ static int hostap_enable_hostapd(struct vnt_private *pDevice, int rtnl_locked)
  {
-     PSDevice apdev_priv;
+       struct vnt_private *apdev_priv;
        struct net_device *dev = pDevice->dev;
        int ret;
 -      const struct net_device_ops apdev_netdev_ops = {
--              .ndo_start_xmit         = pDevice->tx_80211,
+-              .ndo_start_xmit = pDevice->tx_80211,
 -      };
  
      DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%s: Enabling hostapd mode\n", dev->name);
  
-@@ -79,6 +78,8 @@ static int hostap_enable_hostapd(PSDevice pDevice, int rtnl_locked)
+@@ -79,6 +78,8 @@ static int hostap_enable_hostapd(struct vnt_private *pDevice, int rtnl_locked)
      *apdev_priv = *pDevice;
        memcpy(pDevice->apdev->dev_addr, dev->dev_addr, ETH_ALEN);
  
@@ -43032,10 +42443,10 @@ index 26a7d0e..897b083 100644
  
        pDevice->apdev->type = ARPHRD_IEEE80211;
 diff --git a/drivers/staging/zcache/tmem.c b/drivers/staging/zcache/tmem.c
-index 56c8e60..1920c63 100644
+index a2b7e03..9ff4bbd 100644
 --- a/drivers/staging/zcache/tmem.c
 +++ b/drivers/staging/zcache/tmem.c
-@@ -39,7 +39,7 @@
+@@ -50,7 +50,7 @@
   * A tmem host implementation must use this function to register callbacks
   * for memory allocation.
   */
@@ -43044,9 +42455,9 @@ index 56c8e60..1920c63 100644
  
  static void tmem_objnode_tree_init(void);
  
-@@ -53,7 +53,7 @@ void tmem_register_hostops(struct tmem_hostops *m)
+@@ -64,7 +64,7 @@ void tmem_register_hostops(struct tmem_hostops *m)
   * A tmem host implementation must use this function to register
-  * callbacks for a page-accessible memory (PAM) implementation
+  * callbacks for a page-accessible memory (PAM) implementation.
   */
 -static struct tmem_pamops tmem_pamops;
 +static tmem_pamops_no_const tmem_pamops;
@@ -43054,18 +42465,18 @@ index 56c8e60..1920c63 100644
  void tmem_register_pamops(struct tmem_pamops *m)
  {
 diff --git a/drivers/staging/zcache/tmem.h b/drivers/staging/zcache/tmem.h
-index 0d4aa82..f7832d4 100644
+index adbe5a8..d387359 100644
 --- a/drivers/staging/zcache/tmem.h
 +++ b/drivers/staging/zcache/tmem.h
-@@ -180,6 +180,7 @@ struct tmem_pamops {
-       void (*new_obj)(struct tmem_obj *);
+@@ -226,6 +226,7 @@ struct tmem_pamops {
        int (*replace_in_obj)(void *, struct tmem_obj *);
+ #endif
  };
 +typedef struct tmem_pamops __no_const tmem_pamops_no_const;
  extern void tmem_register_pamops(struct tmem_pamops *m);
  
  /* memory allocation methods provided by the host implementation */
-@@ -189,6 +190,7 @@ struct tmem_hostops {
+@@ -235,6 +236,7 @@ struct tmem_hostops {
        struct tmem_objnode *(*objnode_alloc)(struct tmem_pool *);
        void (*objnode_free)(struct tmem_objnode *, struct tmem_pool *);
  };
@@ -43074,10 +42485,10 @@ index 0d4aa82..f7832d4 100644
  
  /* core tmem accessor functions */
 diff --git a/drivers/target/target_core_device.c b/drivers/target/target_core_device.c
-index 96f4981..4daaa7e 100644
+index 2e4d655..fd72e68 100644
 --- a/drivers/target/target_core_device.c
 +++ b/drivers/target/target_core_device.c
-@@ -1370,7 +1370,7 @@ struct se_device *target_alloc_device(struct se_hba *hba, const char *name)
+@@ -1414,7 +1414,7 @@ struct se_device *target_alloc_device(struct se_hba *hba, const char *name)
        spin_lock_init(&dev->se_port_lock);
        spin_lock_init(&dev->se_tmr_lock);
        spin_lock_init(&dev->qf_cmd_lock);
@@ -43087,10 +42498,10 @@ index 96f4981..4daaa7e 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 fcf880f..a4d1e8f 100644
+index 0d46276..f327cab5 100644
 --- a/drivers/target/target_core_transport.c
 +++ b/drivers/target/target_core_transport.c
-@@ -1077,7 +1077,7 @@ transport_check_alloc_task_attr(struct se_cmd *cmd)
+@@ -1080,7 +1080,7 @@ transport_check_alloc_task_attr(struct se_cmd *cmd)
         * Used to determine when ORDERED commands should go from
         * Dormant to Active status.
         */
@@ -43100,10 +42511,10 @@ index fcf880f..a4d1e8f 100644
        pr_debug("Allocated se_ordered_id: %u for Task Attr: 0x%02x on %s\n",
                        cmd->se_ordered_id, cmd->sam_task_attr,
 diff --git a/drivers/tty/cyclades.c b/drivers/tty/cyclades.c
-index b09c8d1f..c4225c0 100644
+index 345bd0e..61d5375 100644
 --- a/drivers/tty/cyclades.c
 +++ b/drivers/tty/cyclades.c
-@@ -1589,10 +1589,10 @@ static int cy_open(struct tty_struct *tty, struct file *filp)
+@@ -1576,10 +1576,10 @@ static int cy_open(struct tty_struct *tty, struct file *filp)
        printk(KERN_DEBUG "cyc:cy_open ttyC%d, count = %d\n", info->line,
                        info->port.count);
  #endif
@@ -43116,7 +42527,7 @@ index b09c8d1f..c4225c0 100644
  #endif
  
        /*
-@@ -3991,7 +3991,7 @@ static int cyclades_proc_show(struct seq_file *m, void *v)
+@@ -3978,7 +3978,7 @@ static int cyclades_proc_show(struct seq_file *m, void *v)
                for (j = 0; j < cy_card[i].nports; j++) {
                        info = &cy_card[i].ports[j];
  
@@ -43126,7 +42537,7 @@ index b09c8d1f..c4225c0 100644
                                struct tty_struct *tty;
                                struct tty_ldisc *ld;
 diff --git a/drivers/tty/hvc/hvc_console.c b/drivers/tty/hvc/hvc_console.c
-index 13ee53b..418d164 100644
+index eb255e8..f637a57 100644
 --- a/drivers/tty/hvc/hvc_console.c
 +++ b/drivers/tty/hvc/hvc_console.c
 @@ -338,7 +338,7 @@ static int hvc_open(struct tty_struct *tty, struct file * filp)
@@ -43184,7 +42595,7 @@ index 13ee53b..418d164 100644
  
        spin_lock_irqsave(&hp->lock, flags);
 diff --git a/drivers/tty/hvc/hvcs.c b/drivers/tty/hvc/hvcs.c
-index 8776357..b2d4afd 100644
+index 81e939e..95ead10 100644
 --- a/drivers/tty/hvc/hvcs.c
 +++ b/drivers/tty/hvc/hvcs.c
 @@ -83,6 +83,7 @@
@@ -43204,7 +42615,7 @@ index 8776357..b2d4afd 100644
                spin_unlock_irqrestore(&hvcsd->lock, flags);
                printk(KERN_INFO "HVCS: vterm state unchanged.  "
                                "The hvcs device node is still in use.\n");
-@@ -1132,7 +1133,7 @@ static int hvcs_install(struct tty_driver *driver, struct tty_struct *tty)
+@@ -1127,7 +1128,7 @@ static int hvcs_install(struct tty_driver *driver, struct tty_struct *tty)
                }
        }
  
@@ -43213,7 +42624,7 @@ index 8776357..b2d4afd 100644
        hvcsd->port.tty = tty;
        tty->driver_data = hvcsd;
  
-@@ -1185,7 +1186,7 @@ static int hvcs_open(struct tty_struct *tty, struct file *filp)
+@@ -1180,7 +1181,7 @@ static int hvcs_open(struct tty_struct *tty, struct file *filp)
        unsigned long flags;
  
        spin_lock_irqsave(&hvcsd->lock, flags);
@@ -43222,7 +42633,7 @@ index 8776357..b2d4afd 100644
        hvcsd->todo_mask |= HVCS_SCHED_READ;
        spin_unlock_irqrestore(&hvcsd->lock, flags);
  
-@@ -1221,7 +1222,7 @@ static void hvcs_close(struct tty_struct *tty, struct file *filp)
+@@ -1216,7 +1217,7 @@ static void hvcs_close(struct tty_struct *tty, struct file *filp)
        hvcsd = tty->driver_data;
  
        spin_lock_irqsave(&hvcsd->lock, flags);
@@ -43231,7 +42642,7 @@ index 8776357..b2d4afd 100644
  
                vio_disable_interrupts(hvcsd->vdev);
  
-@@ -1246,10 +1247,10 @@ static void hvcs_close(struct tty_struct *tty, struct file *filp)
+@@ -1241,10 +1242,10 @@ static void hvcs_close(struct tty_struct *tty, struct file *filp)
  
                free_irq(irq, hvcsd);
                return;
@@ -43244,7 +42655,7 @@ index 8776357..b2d4afd 100644
        }
  
        spin_unlock_irqrestore(&hvcsd->lock, flags);
-@@ -1271,7 +1272,7 @@ static void hvcs_hangup(struct tty_struct * tty)
+@@ -1266,7 +1267,7 @@ static void hvcs_hangup(struct tty_struct * tty)
  
        spin_lock_irqsave(&hvcsd->lock, flags);
        /* Preserve this so that we know how many kref refs to put */
@@ -43253,7 +42664,7 @@ index 8776357..b2d4afd 100644
  
        /*
         * Don't kref put inside the spinlock because the destruction
-@@ -1286,7 +1287,7 @@ static void hvcs_hangup(struct tty_struct * tty)
+@@ -1281,7 +1282,7 @@ static void hvcs_hangup(struct tty_struct * tty)
        tty->driver_data = NULL;
        hvcsd->port.tty = NULL;
  
@@ -43262,7 +42673,7 @@ index 8776357..b2d4afd 100644
  
        /* This will drop any buffered data on the floor which is OK in a hangup
         * scenario. */
-@@ -1357,7 +1358,7 @@ static int hvcs_write(struct tty_struct *tty,
+@@ -1352,7 +1353,7 @@ static int hvcs_write(struct tty_struct *tty,
         * the middle of a write operation?  This is a crummy place to do this
         * but we want to keep it all in the spinlock.
         */
@@ -43271,7 +42682,7 @@ index 8776357..b2d4afd 100644
                spin_unlock_irqrestore(&hvcsd->lock, flags);
                return -ENODEV;
        }
-@@ -1431,7 +1432,7 @@ static int hvcs_write_room(struct tty_struct *tty)
+@@ -1426,7 +1427,7 @@ static int hvcs_write_room(struct tty_struct *tty)
  {
        struct hvcs_struct *hvcsd = tty->driver_data;
  
@@ -43281,7 +42692,7 @@ index 8776357..b2d4afd 100644
  
        return HVCS_BUFF_LEN - hvcsd->chars_in_buffer;
 diff --git a/drivers/tty/ipwireless/tty.c b/drivers/tty/ipwireless/tty.c
-index 2cde13d..645d78f 100644
+index 8fd72ff..34a0bed 100644
 --- a/drivers/tty/ipwireless/tty.c
 +++ b/drivers/tty/ipwireless/tty.c
 @@ -29,6 +29,7 @@
@@ -43325,16 +42736,16 @@ index 2cde13d..645d78f 100644
                mutex_unlock(&tty->ipw_tty_mutex);
                return;
        }
-@@ -170,7 +169,7 @@ void ipwireless_tty_received(struct ipw_tty *tty, unsigned char *data,
-               return;
-       }
+@@ -164,7 +163,7 @@ void ipwireless_tty_received(struct ipw_tty *tty, unsigned char *data,
+       mutex_lock(&tty->ipw_tty_mutex);
  
 -      if (!tty->port.count) {
 +      if (!atomic_read(&tty->port.count)) {
                mutex_unlock(&tty->ipw_tty_mutex);
                return;
        }
-@@ -212,7 +211,7 @@ static int ipw_write(struct tty_struct *linux_tty,
+@@ -206,7 +205,7 @@ static int ipw_write(struct tty_struct *linux_tty,
                return -ENODEV;
  
        mutex_lock(&tty->ipw_tty_mutex);
@@ -43343,7 +42754,7 @@ index 2cde13d..645d78f 100644
                mutex_unlock(&tty->ipw_tty_mutex);
                return -EINVAL;
        }
-@@ -252,7 +251,7 @@ static int ipw_write_room(struct tty_struct *linux_tty)
+@@ -246,7 +245,7 @@ static int ipw_write_room(struct tty_struct *linux_tty)
        if (!tty)
                return -ENODEV;
  
@@ -43352,7 +42763,7 @@ index 2cde13d..645d78f 100644
                return -EINVAL;
  
        room = IPWIRELESS_TX_QUEUE_SIZE - tty->tx_bytes_queued;
-@@ -294,7 +293,7 @@ static int ipw_chars_in_buffer(struct tty_struct *linux_tty)
+@@ -288,7 +287,7 @@ static int ipw_chars_in_buffer(struct tty_struct *linux_tty)
        if (!tty)
                return 0;
  
@@ -43361,7 +42772,7 @@ index 2cde13d..645d78f 100644
                return 0;
  
        return tty->tx_bytes_queued;
-@@ -375,7 +374,7 @@ static int ipw_tiocmget(struct tty_struct *linux_tty)
+@@ -369,7 +368,7 @@ static int ipw_tiocmget(struct tty_struct *linux_tty)
        if (!tty)
                return -ENODEV;
  
@@ -43370,7 +42781,7 @@ index 2cde13d..645d78f 100644
                return -EINVAL;
  
        return get_control_lines(tty);
-@@ -391,7 +390,7 @@ ipw_tiocmset(struct tty_struct *linux_tty,
+@@ -385,7 +384,7 @@ ipw_tiocmset(struct tty_struct *linux_tty,
        if (!tty)
                return -ENODEV;
  
@@ -43379,7 +42790,7 @@ index 2cde13d..645d78f 100644
                return -EINVAL;
  
        return set_control_lines(tty, set, clear);
-@@ -405,7 +404,7 @@ static int ipw_ioctl(struct tty_struct *linux_tty,
+@@ -399,7 +398,7 @@ static int ipw_ioctl(struct tty_struct *linux_tty,
        if (!tty)
                return -ENODEV;
  
@@ -43388,7 +42799,7 @@ index 2cde13d..645d78f 100644
                return -EINVAL;
  
        /* FIXME: Exactly how is the tty object locked here .. */
-@@ -561,7 +560,7 @@ void ipwireless_tty_free(struct ipw_tty *tty)
+@@ -555,7 +554,7 @@ void ipwireless_tty_free(struct ipw_tty *tty)
                                 * are gone */
                                mutex_lock(&ttyj->ipw_tty_mutex);
                        }
@@ -43398,7 +42809,7 @@ index 2cde13d..645d78f 100644
                        ipwireless_disassociate_network_ttys(network,
                                                             ttyj->channel_idx);
 diff --git a/drivers/tty/moxa.c b/drivers/tty/moxa.c
-index f9d2850..b006f04 100644
+index adeac25..787a0a1 100644
 --- a/drivers/tty/moxa.c
 +++ b/drivers/tty/moxa.c
 @@ -1193,7 +1193,7 @@ static int moxa_open(struct tty_struct *tty, struct file *filp)
@@ -43411,7 +42822,7 @@ index f9d2850..b006f04 100644
        tty_port_tty_set(&ch->port, tty);
        mutex_lock(&ch->port.mutex);
 diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c
-index bfd6771..e0d93c4 100644
+index 4a43ef5d7..aa71f27 100644
 --- a/drivers/tty/n_gsm.c
 +++ b/drivers/tty/n_gsm.c
 @@ -1636,7 +1636,7 @@ static struct gsm_dlci *gsm_dlci_alloc(struct gsm_mux *gsm, int addr)
@@ -43433,10 +42844,10 @@ index bfd6771..e0d93c4 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 19083ef..6e34e97 100644
+index 05e72be..67f6a0f 100644
 --- a/drivers/tty/n_tty.c
 +++ b/drivers/tty/n_tty.c
-@@ -2196,6 +2196,7 @@ void n_tty_inherit_ops(struct tty_ldisc_ops *ops)
+@@ -2197,6 +2197,7 @@ void n_tty_inherit_ops(struct tty_ldisc_ops *ops)
  {
        *ops = tty_ldisc_N_TTY;
        ops->owner = NULL;
@@ -43446,10 +42857,10 @@ index 19083ef..6e34e97 100644
  }
  EXPORT_SYMBOL_GPL(n_tty_inherit_ops);
 diff --git a/drivers/tty/pty.c b/drivers/tty/pty.c
-index ac35c90..c47deac 100644
+index 125e0fd..8c50690 100644
 --- a/drivers/tty/pty.c
 +++ b/drivers/tty/pty.c
-@@ -790,8 +790,10 @@ static void __init unix98_pty_init(void)
+@@ -800,8 +800,10 @@ static void __init unix98_pty_init(void)
                panic("Couldn't register Unix98 pts driver");
  
        /* Now create the /dev/ptmx special device */
@@ -43462,10 +42873,10 @@ index ac35c90..c47deac 100644
        cdev_init(&ptmx_cdev, &ptmx_fops);
        if (cdev_add(&ptmx_cdev, MKDEV(TTYAUX_MAJOR, 2), 1) ||
 diff --git a/drivers/tty/rocket.c b/drivers/tty/rocket.c
-index e42009a..566a036 100644
+index 1d27003..959f452 100644
 --- a/drivers/tty/rocket.c
 +++ b/drivers/tty/rocket.c
-@@ -925,7 +925,7 @@ static int rp_open(struct tty_struct *tty, struct file *filp)
+@@ -923,7 +923,7 @@ static int rp_open(struct tty_struct *tty, struct file *filp)
        tty->driver_data = info;
        tty_port_tty_set(port, tty);
  
@@ -43474,7 +42885,7 @@ index e42009a..566a036 100644
                atomic_inc(&rp_num_ports_open);
  
  #ifdef ROCKET_DEBUG_OPEN
-@@ -934,7 +934,7 @@ static int rp_open(struct tty_struct *tty, struct file *filp)
+@@ -932,7 +932,7 @@ static int rp_open(struct tty_struct *tty, struct file *filp)
  #endif
        }
  #ifdef ROCKET_DEBUG_OPEN
@@ -43483,7 +42894,7 @@ index e42009a..566a036 100644
  #endif
  
        /*
-@@ -1529,7 +1529,7 @@ static void rp_hangup(struct tty_struct *tty)
+@@ -1527,7 +1527,7 @@ static void rp_hangup(struct tty_struct *tty)
                spin_unlock_irqrestore(&info->port.lock, flags);
                return;
        }
@@ -43599,10 +43010,10 @@ index 1002054..dd644a8 100644
  /* This is only available if kgdboc is a built in for early debugging */
  static int __init kgdboc_early_init(char *opt)
 diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c
-index e514b3a..c73d614 100644
+index 2769a38..f3dbe48 100644
 --- a/drivers/tty/serial/samsung.c
 +++ b/drivers/tty/serial/samsung.c
-@@ -453,11 +453,16 @@ static void s3c24xx_serial_shutdown(struct uart_port *port)
+@@ -451,11 +451,16 @@ static void s3c24xx_serial_shutdown(struct uart_port *port)
        }
  }
  
@@ -43619,7 +43030,7 @@ index e514b3a..c73d614 100644
        dbg("s3c24xx_serial_startup: port=%p (%08lx,%p)\n",
            port->mapbase, port->membase);
  
-@@ -1122,10 +1127,6 @@ static int s3c24xx_serial_init_port(struct s3c24xx_uart_port *ourport,
+@@ -1120,10 +1125,6 @@ static int s3c24xx_serial_init_port(struct s3c24xx_uart_port *ourport,
        /* setup info for port */
        port->dev       = &platdev->dev;
  
@@ -43631,10 +43042,10 @@ index e514b3a..c73d614 100644
  
        if (cfg->uart_flags & UPF_CONS_FLOW) {
 diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
-index 2c7230a..2104f16 100644
+index 8fbb6d2..822a9e6 100644
 --- a/drivers/tty/serial/serial_core.c
 +++ b/drivers/tty/serial/serial_core.c
-@@ -1455,7 +1455,7 @@ static void uart_hangup(struct tty_struct *tty)
+@@ -1454,7 +1454,7 @@ static void uart_hangup(struct tty_struct *tty)
                uart_flush_buffer(tty);
                uart_shutdown(tty, state);
                spin_lock_irqsave(&port->lock, flags);
@@ -43643,7 +43054,7 @@ index 2c7230a..2104f16 100644
                clear_bit(ASYNCB_NORMAL_ACTIVE, &port->flags);
                spin_unlock_irqrestore(&port->lock, flags);
                tty_port_tty_set(port, NULL);
-@@ -1551,7 +1551,7 @@ static int uart_open(struct tty_struct *tty, struct file *filp)
+@@ -1550,7 +1550,7 @@ static int uart_open(struct tty_struct *tty, struct file *filp)
                goto end;
        }
  
@@ -43658,7 +43069,7 @@ index 2c7230a..2104f16 100644
         */
 -      if (port->count == 1)
 +      if (atomic_read(&port->count) == 1)
-               uart_change_pm(state, 0);
+               uart_change_pm(state, UART_PM_STATE_ON);
  
        /*
 @@ -1596,7 +1596,7 @@ static int uart_open(struct tty_struct *tty, struct file *filp)
@@ -43671,10 +43082,10 @@ index 2c7230a..2104f16 100644
        goto end;
  }
 diff --git a/drivers/tty/synclink.c b/drivers/tty/synclink.c
-index 9e071f6..f30ae69 100644
+index 8983276..72a4090 100644
 --- a/drivers/tty/synclink.c
 +++ b/drivers/tty/synclink.c
-@@ -3095,7 +3095,7 @@ static void mgsl_close(struct tty_struct *tty, struct file * filp)
+@@ -3093,7 +3093,7 @@ static void mgsl_close(struct tty_struct *tty, struct file * filp)
        
        if (debug_level >= DEBUG_LEVEL_INFO)
                printk("%s(%d):mgsl_close(%s) entry, count=%d\n",
@@ -43683,7 +43094,7 @@ index 9e071f6..f30ae69 100644
  
        if (tty_port_close_start(&info->port, tty, filp) == 0)                   
                goto cleanup;
-@@ -3113,7 +3113,7 @@ static void mgsl_close(struct tty_struct *tty, struct file * filp)
+@@ -3111,7 +3111,7 @@ static void mgsl_close(struct tty_struct *tty, struct file * filp)
  cleanup:                      
        if (debug_level >= DEBUG_LEVEL_INFO)
                printk("%s(%d):mgsl_close(%s) exit, count=%d\n", __FILE__,__LINE__,
@@ -43692,7 +43103,7 @@ index 9e071f6..f30ae69 100644
                        
  }     /* end of mgsl_close() */
  
-@@ -3212,8 +3212,8 @@ static void mgsl_hangup(struct tty_struct *tty)
+@@ -3210,8 +3210,8 @@ static void mgsl_hangup(struct tty_struct *tty)
  
        mgsl_flush_buffer(tty);
        shutdown(info);
@@ -43703,7 +43114,7 @@ index 9e071f6..f30ae69 100644
        info->port.flags &= ~ASYNC_NORMAL_ACTIVE;
        info->port.tty = NULL;
  
-@@ -3302,12 +3302,12 @@ static int block_til_ready(struct tty_struct *tty, struct file * filp,
+@@ -3300,12 +3300,12 @@ static int block_til_ready(struct tty_struct *tty, struct file * filp,
        
        if (debug_level >= DEBUG_LEVEL_INFO)
                printk("%s(%d):block_til_ready before block on %s count=%d\n",
@@ -43718,7 +43129,7 @@ index 9e071f6..f30ae69 100644
        }
        spin_unlock_irqrestore(&info->irq_spinlock, flags);
        port->blocked_open++;
-@@ -3336,7 +3336,7 @@ static int block_til_ready(struct tty_struct *tty, struct file * filp,
+@@ -3334,7 +3334,7 @@ static int block_til_ready(struct tty_struct *tty, struct file * filp,
                
                if (debug_level >= DEBUG_LEVEL_INFO)
                        printk("%s(%d):block_til_ready blocking on %s count=%d\n",
@@ -43727,7 +43138,7 @@ index 9e071f6..f30ae69 100644
                                 
                tty_unlock(tty);
                schedule();
-@@ -3348,12 +3348,12 @@ static int block_til_ready(struct tty_struct *tty, struct file * filp,
+@@ -3346,12 +3346,12 @@ static int block_til_ready(struct tty_struct *tty, struct file * filp,
        
        /* FIXME: Racy on hangup during close wait */
        if (extra_count)
@@ -43742,7 +43153,7 @@ index 9e071f6..f30ae69 100644
                         
        if (!retval)
                port->flags |= ASYNC_NORMAL_ACTIVE;
-@@ -3405,7 +3405,7 @@ static int mgsl_open(struct tty_struct *tty, struct file * filp)
+@@ -3403,7 +3403,7 @@ static int mgsl_open(struct tty_struct *tty, struct file * filp)
                
        if (debug_level >= DEBUG_LEVEL_INFO)
                printk("%s(%d):mgsl_open(%s), old ref count = %d\n",
@@ -43751,7 +43162,7 @@ index 9e071f6..f30ae69 100644
  
        /* If port is closing, signal caller to try again */
        if (tty_hung_up_p(filp) || info->port.flags & ASYNC_CLOSING){
-@@ -3424,10 +3424,10 @@ static int mgsl_open(struct tty_struct *tty, struct file * filp)
+@@ -3422,10 +3422,10 @@ static int mgsl_open(struct tty_struct *tty, struct file * filp)
                spin_unlock_irqrestore(&info->netlock, flags);
                goto cleanup;
        }
@@ -43764,7 +43175,7 @@ index 9e071f6..f30ae69 100644
                /* 1st open on this device, init hardware */
                retval = startup(info);
                if (retval < 0)
-@@ -3451,8 +3451,8 @@ cleanup:
+@@ -3449,8 +3449,8 @@ cleanup:
        if (retval) {
                if (tty->count == 1)
                        info->port.tty = NULL; /* tty layer will release tty struct */
@@ -43775,7 +43186,7 @@ index 9e071f6..f30ae69 100644
        }
        
        return retval;
-@@ -7662,7 +7662,7 @@ static int hdlcdev_attach(struct net_device *dev, unsigned short encoding,
+@@ -7668,7 +7668,7 @@ static int hdlcdev_attach(struct net_device *dev, unsigned short encoding,
        unsigned short new_crctype;
  
        /* return error if TTY interface open */
@@ -43784,7 +43195,7 @@ index 9e071f6..f30ae69 100644
                return -EBUSY;
  
        switch (encoding)
-@@ -7757,7 +7757,7 @@ static int hdlcdev_open(struct net_device *dev)
+@@ -7763,7 +7763,7 @@ static int hdlcdev_open(struct net_device *dev)
  
        /* arbitrate between network and tty opens */
        spin_lock_irqsave(&info->netlock, flags);
@@ -43793,7 +43204,7 @@ index 9e071f6..f30ae69 100644
                printk(KERN_WARNING "%s: hdlc_open returning busy\n", dev->name);
                spin_unlock_irqrestore(&info->netlock, flags);
                return -EBUSY;
-@@ -7843,7 +7843,7 @@ static int hdlcdev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
+@@ -7849,7 +7849,7 @@ static int hdlcdev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
                printk("%s:hdlcdev_ioctl(%s)\n",__FILE__,dev->name);
  
        /* return error if TTY interface open */
@@ -43803,10 +43214,10 @@ index 9e071f6..f30ae69 100644
  
        if (cmd != SIOCWANDEV)
 diff --git a/drivers/tty/synclink_gt.c b/drivers/tty/synclink_gt.c
-index aba1e59..877ac33 100644
+index aa9eece..d8baaec 100644
 --- a/drivers/tty/synclink_gt.c
 +++ b/drivers/tty/synclink_gt.c
-@@ -671,7 +671,7 @@ static int open(struct tty_struct *tty, struct file *filp)
+@@ -670,7 +670,7 @@ static int open(struct tty_struct *tty, struct file *filp)
        tty->driver_data = info;
        info->port.tty = tty;
  
@@ -43815,7 +43226,7 @@ index aba1e59..877ac33 100644
  
        /* If port is closing, signal caller to try again */
        if (tty_hung_up_p(filp) || info->port.flags & ASYNC_CLOSING){
-@@ -692,10 +692,10 @@ static int open(struct tty_struct *tty, struct file *filp)
+@@ -691,10 +691,10 @@ static int open(struct tty_struct *tty, struct file *filp)
                mutex_unlock(&info->port.mutex);
                goto cleanup;
        }
@@ -43828,7 +43239,7 @@ index aba1e59..877ac33 100644
                /* 1st open on this device, init hardware */
                retval = startup(info);
                if (retval < 0) {
-@@ -716,8 +716,8 @@ cleanup:
+@@ -715,8 +715,8 @@ cleanup:
        if (retval) {
                if (tty->count == 1)
                        info->port.tty = NULL; /* tty layer will release tty struct */
@@ -43839,7 +43250,7 @@ index aba1e59..877ac33 100644
        }
  
        DBGINFO(("%s open rc=%d\n", info->device_name, retval));
-@@ -730,7 +730,7 @@ static void close(struct tty_struct *tty, struct file *filp)
+@@ -729,7 +729,7 @@ static void close(struct tty_struct *tty, struct file *filp)
  
        if (sanity_check(info, tty->name, "close"))
                return;
@@ -43848,7 +43259,7 @@ index aba1e59..877ac33 100644
  
        if (tty_port_close_start(&info->port, tty, filp) == 0)
                goto cleanup;
-@@ -747,7 +747,7 @@ static void close(struct tty_struct *tty, struct file *filp)
+@@ -746,7 +746,7 @@ static void close(struct tty_struct *tty, struct file *filp)
        tty_port_close_end(&info->port, tty);
        info->port.tty = NULL;
  cleanup:
@@ -43857,7 +43268,7 @@ index aba1e59..877ac33 100644
  }
  
  static void hangup(struct tty_struct *tty)
-@@ -765,7 +765,7 @@ static void hangup(struct tty_struct *tty)
+@@ -764,7 +764,7 @@ static void hangup(struct tty_struct *tty)
        shutdown(info);
  
        spin_lock_irqsave(&info->port.lock, flags);
@@ -43866,7 +43277,7 @@ index aba1e59..877ac33 100644
        info->port.flags &= ~ASYNC_NORMAL_ACTIVE;
        info->port.tty = NULL;
        spin_unlock_irqrestore(&info->port.lock, flags);
-@@ -1450,7 +1450,7 @@ static int hdlcdev_attach(struct net_device *dev, unsigned short encoding,
+@@ -1449,7 +1449,7 @@ static int hdlcdev_attach(struct net_device *dev, unsigned short encoding,
        unsigned short new_crctype;
  
        /* return error if TTY interface open */
@@ -43875,7 +43286,7 @@ index aba1e59..877ac33 100644
                return -EBUSY;
  
        DBGINFO(("%s hdlcdev_attach\n", info->device_name));
-@@ -1545,7 +1545,7 @@ static int hdlcdev_open(struct net_device *dev)
+@@ -1544,7 +1544,7 @@ static int hdlcdev_open(struct net_device *dev)
  
        /* arbitrate between network and tty opens */
        spin_lock_irqsave(&info->netlock, flags);
@@ -43884,7 +43295,7 @@ index aba1e59..877ac33 100644
                DBGINFO(("%s hdlc_open busy\n", dev->name));
                spin_unlock_irqrestore(&info->netlock, flags);
                return -EBUSY;
-@@ -1630,7 +1630,7 @@ static int hdlcdev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
+@@ -1629,7 +1629,7 @@ static int hdlcdev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
        DBGINFO(("%s hdlcdev_ioctl\n", dev->name));
  
        /* return error if TTY interface open */
@@ -43893,7 +43304,7 @@ index aba1e59..877ac33 100644
                return -EBUSY;
  
        if (cmd != SIOCWANDEV)
-@@ -2419,7 +2419,7 @@ static irqreturn_t slgt_interrupt(int dummy, void *dev_id)
+@@ -2413,7 +2413,7 @@ static irqreturn_t slgt_interrupt(int dummy, void *dev_id)
                if (port == NULL)
                        continue;
                spin_lock(&port->lock);
@@ -43902,7 +43313,7 @@ index aba1e59..877ac33 100644
                    port->pending_bh && !port->bh_running &&
                    !port->bh_requested) {
                        DBGISR(("%s bh queued\n", port->device_name));
-@@ -3308,7 +3308,7 @@ static int block_til_ready(struct tty_struct *tty, struct file *filp,
+@@ -3302,7 +3302,7 @@ static int block_til_ready(struct tty_struct *tty, struct file *filp,
        spin_lock_irqsave(&info->lock, flags);
        if (!tty_hung_up_p(filp)) {
                extra_count = true;
@@ -43911,7 +43322,7 @@ index aba1e59..877ac33 100644
        }
        spin_unlock_irqrestore(&info->lock, flags);
        port->blocked_open++;
-@@ -3345,7 +3345,7 @@ static int block_til_ready(struct tty_struct *tty, struct file *filp,
+@@ -3339,7 +3339,7 @@ static int block_til_ready(struct tty_struct *tty, struct file *filp,
        remove_wait_queue(&port->open_wait, &wait);
  
        if (extra_count)
@@ -43921,10 +43332,10 @@ index aba1e59..877ac33 100644
  
        if (!retval)
 diff --git a/drivers/tty/synclinkmp.c b/drivers/tty/synclinkmp.c
-index fd43fb6..34704ad 100644
+index 6d5780c..aa4d8cd 100644
 --- a/drivers/tty/synclinkmp.c
 +++ b/drivers/tty/synclinkmp.c
-@@ -751,7 +751,7 @@ static int open(struct tty_struct *tty, struct file *filp)
+@@ -750,7 +750,7 @@ static int open(struct tty_struct *tty, struct file *filp)
  
        if (debug_level >= DEBUG_LEVEL_INFO)
                printk("%s(%d):%s open(), old ref count = %d\n",
@@ -43933,7 +43344,7 @@ index fd43fb6..34704ad 100644
  
        /* If port is closing, signal caller to try again */
        if (tty_hung_up_p(filp) || info->port.flags & ASYNC_CLOSING){
-@@ -770,10 +770,10 @@ static int open(struct tty_struct *tty, struct file *filp)
+@@ -769,10 +769,10 @@ static int open(struct tty_struct *tty, struct file *filp)
                spin_unlock_irqrestore(&info->netlock, flags);
                goto cleanup;
        }
@@ -43946,7 +43357,7 @@ index fd43fb6..34704ad 100644
                /* 1st open on this device, init hardware */
                retval = startup(info);
                if (retval < 0)
-@@ -797,8 +797,8 @@ cleanup:
+@@ -796,8 +796,8 @@ cleanup:
        if (retval) {
                if (tty->count == 1)
                        info->port.tty = NULL; /* tty layer will release tty struct */
@@ -43957,7 +43368,7 @@ index fd43fb6..34704ad 100644
        }
  
        return retval;
-@@ -816,7 +816,7 @@ static void close(struct tty_struct *tty, struct file *filp)
+@@ -815,7 +815,7 @@ static void close(struct tty_struct *tty, struct file *filp)
  
        if (debug_level >= DEBUG_LEVEL_INFO)
                printk("%s(%d):%s close() entry, count=%d\n",
@@ -43966,7 +43377,7 @@ index fd43fb6..34704ad 100644
  
        if (tty_port_close_start(&info->port, tty, filp) == 0)
                goto cleanup;
-@@ -835,7 +835,7 @@ static void close(struct tty_struct *tty, struct file *filp)
+@@ -834,7 +834,7 @@ static void close(struct tty_struct *tty, struct file *filp)
  cleanup:
        if (debug_level >= DEBUG_LEVEL_INFO)
                printk("%s(%d):%s close() exit, count=%d\n", __FILE__,__LINE__,
@@ -43975,7 +43386,7 @@ index fd43fb6..34704ad 100644
  }
  
  /* Called by tty_hangup() when a hangup is signaled.
-@@ -858,7 +858,7 @@ static void hangup(struct tty_struct *tty)
+@@ -857,7 +857,7 @@ static void hangup(struct tty_struct *tty)
        shutdown(info);
  
        spin_lock_irqsave(&info->port.lock, flags);
@@ -43984,7 +43395,7 @@ index fd43fb6..34704ad 100644
        info->port.flags &= ~ASYNC_NORMAL_ACTIVE;
        info->port.tty = NULL;
        spin_unlock_irqrestore(&info->port.lock, flags);
-@@ -1566,7 +1566,7 @@ static int hdlcdev_attach(struct net_device *dev, unsigned short encoding,
+@@ -1565,7 +1565,7 @@ static int hdlcdev_attach(struct net_device *dev, unsigned short encoding,
        unsigned short new_crctype;
  
        /* return error if TTY interface open */
@@ -43993,7 +43404,7 @@ index fd43fb6..34704ad 100644
                return -EBUSY;
  
        switch (encoding)
-@@ -1661,7 +1661,7 @@ static int hdlcdev_open(struct net_device *dev)
+@@ -1660,7 +1660,7 @@ static int hdlcdev_open(struct net_device *dev)
  
        /* arbitrate between network and tty opens */
        spin_lock_irqsave(&info->netlock, flags);
@@ -44002,7 +43413,7 @@ index fd43fb6..34704ad 100644
                printk(KERN_WARNING "%s: hdlc_open returning busy\n", dev->name);
                spin_unlock_irqrestore(&info->netlock, flags);
                return -EBUSY;
-@@ -1747,7 +1747,7 @@ static int hdlcdev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
+@@ -1746,7 +1746,7 @@ static int hdlcdev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
                printk("%s:hdlcdev_ioctl(%s)\n",__FILE__,dev->name);
  
        /* return error if TTY interface open */
@@ -44011,7 +43422,7 @@ index fd43fb6..34704ad 100644
                return -EBUSY;
  
        if (cmd != SIOCWANDEV)
-@@ -2632,7 +2632,7 @@ static irqreturn_t synclinkmp_interrupt(int dummy, void *dev_id)
+@@ -2620,7 +2620,7 @@ static irqreturn_t synclinkmp_interrupt(int dummy, void *dev_id)
                 * do not request bottom half processing if the
                 * device is not open in a normal mode.
                 */
@@ -44020,7 +43431,7 @@ index fd43fb6..34704ad 100644
                     port->pending_bh && !port->bh_running &&
                     !port->bh_requested ) {
                        if ( debug_level >= DEBUG_LEVEL_ISR )
-@@ -3330,12 +3330,12 @@ static int block_til_ready(struct tty_struct *tty, struct file *filp,
+@@ -3318,12 +3318,12 @@ static int block_til_ready(struct tty_struct *tty, struct file *filp,
  
        if (debug_level >= DEBUG_LEVEL_INFO)
                printk("%s(%d):%s block_til_ready() before block, count=%d\n",
@@ -44035,7 +43446,7 @@ index fd43fb6..34704ad 100644
        }
        spin_unlock_irqrestore(&info->lock, flags);
        port->blocked_open++;
-@@ -3364,7 +3364,7 @@ static int block_til_ready(struct tty_struct *tty, struct file *filp,
+@@ -3352,7 +3352,7 @@ static int block_til_ready(struct tty_struct *tty, struct file *filp,
  
                if (debug_level >= DEBUG_LEVEL_INFO)
                        printk("%s(%d):%s block_til_ready() count=%d\n",
@@ -44044,7 +43455,7 @@ index fd43fb6..34704ad 100644
  
                tty_unlock(tty);
                schedule();
-@@ -3375,12 +3375,12 @@ static int block_til_ready(struct tty_struct *tty, struct file *filp,
+@@ -3363,12 +3363,12 @@ static int block_til_ready(struct tty_struct *tty, struct file *filp,
        remove_wait_queue(&port->open_wait, &wait);
  
        if (extra_count)
@@ -44060,10 +43471,10 @@ index fd43fb6..34704ad 100644
        if (!retval)
                port->flags |= ASYNC_NORMAL_ACTIVE;
 diff --git a/drivers/tty/sysrq.c b/drivers/tty/sysrq.c
-index b3c4a25..723916f 100644
+index 3687f0c..6b9b808 100644
 --- a/drivers/tty/sysrq.c
 +++ b/drivers/tty/sysrq.c
-@@ -867,7 +867,7 @@ EXPORT_SYMBOL(unregister_sysrq_key);
+@@ -995,7 +995,7 @@ EXPORT_SYMBOL(unregister_sysrq_key);
  static ssize_t write_sysrq_trigger(struct file *file, const char __user *buf,
                                   size_t count, loff_t *ppos)
  {
@@ -44073,10 +43484,10 @@ index b3c4a25..723916f 100644
  
                if (get_user(c, buf))
 diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
-index da9fde8..c07975f 100644
+index a9cd0b9..47b9336 100644
 --- a/drivers/tty/tty_io.c
 +++ b/drivers/tty/tty_io.c
-@@ -3391,7 +3391,7 @@ EXPORT_SYMBOL_GPL(get_current_tty);
+@@ -3398,7 +3398,7 @@ EXPORT_SYMBOL_GPL(get_current_tty);
  
  void tty_default_fops(struct file_operations *fops)
  {
@@ -44086,7 +43497,7 @@ index da9fde8..c07975f 100644
  
  /*
 diff --git a/drivers/tty/tty_ldisc.c b/drivers/tty/tty_ldisc.c
-index c578229..45aa9ee 100644
+index d794087..e4f49e5 100644
 --- a/drivers/tty/tty_ldisc.c
 +++ b/drivers/tty/tty_ldisc.c
 @@ -56,7 +56,7 @@ static void put_ldisc(struct tty_ldisc *ld)
@@ -44098,7 +43509,7 @@ index c578229..45aa9ee 100644
                module_put(ldo->owner);
                raw_spin_unlock_irqrestore(&tty_ldisc_lock, flags);
  
-@@ -91,7 +91,7 @@ int tty_register_ldisc(int disc, struct tty_ldisc_ops *new_ldisc)
+@@ -93,7 +93,7 @@ int tty_register_ldisc(int disc, struct tty_ldisc_ops *new_ldisc)
        raw_spin_lock_irqsave(&tty_ldisc_lock, flags);
        tty_ldiscs[disc] = new_ldisc;
        new_ldisc->num = disc;
@@ -44107,7 +43518,7 @@ index c578229..45aa9ee 100644
        raw_spin_unlock_irqrestore(&tty_ldisc_lock, flags);
  
        return ret;
-@@ -119,7 +119,7 @@ int tty_unregister_ldisc(int disc)
+@@ -121,7 +121,7 @@ int tty_unregister_ldisc(int disc)
                return -EINVAL;
  
        raw_spin_lock_irqsave(&tty_ldisc_lock, flags);
@@ -44116,7 +43527,7 @@ index c578229..45aa9ee 100644
                ret = -EBUSY;
        else
                tty_ldiscs[disc] = NULL;
-@@ -140,7 +140,7 @@ static struct tty_ldisc_ops *get_ldops(int disc)
+@@ -142,7 +142,7 @@ static struct tty_ldisc_ops *get_ldops(int disc)
        if (ldops) {
                ret = ERR_PTR(-EAGAIN);
                if (try_module_get(ldops->owner)) {
@@ -44125,7 +43536,7 @@ index c578229..45aa9ee 100644
                        ret = ldops;
                }
        }
-@@ -153,7 +153,7 @@ static void put_ldops(struct tty_ldisc_ops *ldops)
+@@ -155,7 +155,7 @@ static void put_ldops(struct tty_ldisc_ops *ldops)
        unsigned long flags;
  
        raw_spin_lock_irqsave(&tty_ldisc_lock, flags);
@@ -44202,10 +43613,10 @@ index b7ff59d..7c6105e 100644
        tty_port_tty_set(port, tty);
  
 diff --git a/drivers/tty/vt/keyboard.c b/drivers/tty/vt/keyboard.c
-index 681765b..d3ccdf2 100644
+index a9af1b9a..1e08e7f 100644
 --- a/drivers/tty/vt/keyboard.c
 +++ b/drivers/tty/vt/keyboard.c
-@@ -660,6 +660,16 @@ static void k_spec(struct vc_data *vc, unsigned char value, char up_flag)
+@@ -647,6 +647,16 @@ static void k_spec(struct vc_data *vc, unsigned char value, char up_flag)
             kbd->kbdmode == VC_OFF) &&
             value != KVAL(K_SAK))
                return;         /* SAK is allowed even in raw mode */
@@ -44222,7 +43633,7 @@ index 681765b..d3ccdf2 100644
        fn_handler[value](vc);
  }
  
-@@ -1808,9 +1818,6 @@ int vt_do_kdsk_ioctl(int cmd, struct kbentry __user *user_kbe, int perm,
+@@ -1795,9 +1805,6 @@ int vt_do_kdsk_ioctl(int cmd, struct kbentry __user *user_kbe, int perm,
        if (copy_from_user(&tmp, user_kbe, sizeof(struct kbentry)))
                return -EFAULT;
  
@@ -44232,7 +43643,7 @@ index 681765b..d3ccdf2 100644
        switch (cmd) {
        case KDGKBENT:
                /* Ensure another thread doesn't free it under us */
-@@ -1825,6 +1832,9 @@ int vt_do_kdsk_ioctl(int cmd, struct kbentry __user *user_kbe, int perm,
+@@ -1812,6 +1819,9 @@ int vt_do_kdsk_ioctl(int cmd, struct kbentry __user *user_kbe, int perm,
                spin_unlock_irqrestore(&kbd_event_lock, flags);
                return put_user(val, &user_kbe->kb_value);
        case KDSKBENT:
@@ -44242,7 +43653,7 @@ index 681765b..d3ccdf2 100644
                if (!perm)
                        return -EPERM;
                if (!i && v == K_NOSUCHMAP) {
-@@ -1915,9 +1925,6 @@ int vt_do_kdgkb_ioctl(int cmd, struct kbsentry __user *user_kdgkb, int perm)
+@@ -1902,9 +1912,6 @@ int vt_do_kdgkb_ioctl(int cmd, struct kbsentry __user *user_kdgkb, int perm)
        int i, j, k;
        int ret;
  
@@ -44252,7 +43663,7 @@ index 681765b..d3ccdf2 100644
        kbs = kmalloc(sizeof(*kbs), GFP_KERNEL);
        if (!kbs) {
                ret = -ENOMEM;
-@@ -1951,6 +1958,9 @@ int vt_do_kdgkb_ioctl(int cmd, struct kbsentry __user *user_kdgkb, int perm)
+@@ -1938,6 +1945,9 @@ int vt_do_kdgkb_ioctl(int cmd, struct kbsentry __user *user_kdgkb, int perm)
                kfree(kbs);
                return ((p && *p) ? -EOVERFLOW : 0);
        case KDSKBSENT:
@@ -44263,7 +43674,7 @@ index 681765b..d3ccdf2 100644
                        ret = -EPERM;
                        goto reterr;
 diff --git a/drivers/uio/uio.c b/drivers/uio/uio.c
-index 5110f36..8dc0a74 100644
+index c8b9262..7e824e6 100644
 --- a/drivers/uio/uio.c
 +++ b/drivers/uio/uio.c
 @@ -25,6 +25,7 @@
@@ -44296,7 +43707,7 @@ index 5110f36..8dc0a74 100644
  }
  
  static struct device_attribute uio_class_attributes[] = {
-@@ -408,7 +409,7 @@ void uio_event_notify(struct uio_info *info)
+@@ -397,7 +398,7 @@ void uio_event_notify(struct uio_info *info)
  {
        struct uio_device *idev = info->uio_dev;
  
@@ -44305,7 +43716,7 @@ index 5110f36..8dc0a74 100644
        wake_up_interruptible(&idev->wait);
        kill_fasync(&idev->async_queue, SIGIO, POLL_IN);
  }
-@@ -461,7 +462,7 @@ static int uio_open(struct inode *inode, struct file *filep)
+@@ -450,7 +451,7 @@ static int uio_open(struct inode *inode, struct file *filep)
        }
  
        listener->dev = idev;
@@ -44314,7 +43725,7 @@ index 5110f36..8dc0a74 100644
        filep->private_data = listener;
  
        if (idev->info->open) {
-@@ -512,7 +513,7 @@ static unsigned int uio_poll(struct file *filep, poll_table *wait)
+@@ -501,7 +502,7 @@ static unsigned int uio_poll(struct file *filep, poll_table *wait)
                return -EIO;
  
        poll_wait(filep, &idev->wait, wait);
@@ -44323,7 +43734,7 @@ index 5110f36..8dc0a74 100644
                return POLLIN | POLLRDNORM;
        return 0;
  }
-@@ -537,7 +538,7 @@ static ssize_t uio_read(struct file *filep, char __user *buf,
+@@ -526,7 +527,7 @@ static ssize_t uio_read(struct file *filep, char __user *buf,
        do {
                set_current_state(TASK_INTERRUPTIBLE);
  
@@ -44332,7 +43743,7 @@ index 5110f36..8dc0a74 100644
                if (event_count != listener->event_count) {
                        if (copy_to_user(buf, &event_count, count))
                                retval = -EFAULT;
-@@ -606,13 +607,13 @@ static int uio_find_mem_index(struct vm_area_struct *vma)
+@@ -595,13 +596,13 @@ static int uio_find_mem_index(struct vm_area_struct *vma)
  static void uio_vma_open(struct vm_area_struct *vma)
  {
        struct uio_device *idev = vma->vm_private_data;
@@ -44348,7 +43759,7 @@ index 5110f36..8dc0a74 100644
  }
  
  static int uio_vma_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
-@@ -819,7 +820,7 @@ int __uio_register_device(struct module *owner,
+@@ -808,7 +809,7 @@ int __uio_register_device(struct module *owner,
        idev->owner = owner;
        idev->info = info;
        init_waitqueue_head(&idev->wait);
@@ -44454,7 +43865,7 @@ index 35f10bf..6a38a0b 100644
        if (!left--) {
                if (instance->disconnected)
 diff --git a/drivers/usb/core/devices.c b/drivers/usb/core/devices.c
-index cbacea9..246cccd 100644
+index 2a3bbdf..91d72cf 100644
 --- a/drivers/usb/core/devices.c
 +++ b/drivers/usb/core/devices.c
 @@ -126,7 +126,7 @@ static const char format_endpt[] =
@@ -44475,7 +43886,7 @@ index cbacea9..246cccd 100644
        wake_up(&device_event.wait);
  }
  
-@@ -645,7 +645,7 @@ static unsigned int usb_device_poll(struct file *file,
+@@ -652,7 +652,7 @@ static unsigned int usb_device_poll(struct file *file,
  
        poll_wait(file, &device_event.wait, wait);
  
@@ -44485,10 +43896,10 @@ index cbacea9..246cccd 100644
                file->f_version = event_count;
                return POLLIN | POLLRDNORM;
 diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
-index 8e64adf..9a33a3c 100644
+index f9ec44c..eb5779f 100644
 --- a/drivers/usb/core/hcd.c
 +++ b/drivers/usb/core/hcd.c
-@@ -1522,7 +1522,7 @@ int usb_hcd_submit_urb (struct urb *urb, gfp_t mem_flags)
+@@ -1526,7 +1526,7 @@ int usb_hcd_submit_urb (struct urb *urb, gfp_t mem_flags)
         */
        usb_get_urb(urb);
        atomic_inc(&urb->use_count);
@@ -44497,7 +43908,7 @@ index 8e64adf..9a33a3c 100644
        usbmon_urb_submit(&hcd->self, urb);
  
        /* NOTE requirements on root-hub callers (usbfs and the hub
-@@ -1549,7 +1549,7 @@ int usb_hcd_submit_urb (struct urb *urb, gfp_t mem_flags)
+@@ -1553,7 +1553,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);
@@ -44507,7 +43918,7 @@ index 8e64adf..9a33a3c 100644
                        wake_up(&usb_kill_urb_queue);
                usb_put_urb(urb);
 diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c
-index 131f736..99004c3 100644
+index 444d30e..f15c850 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,
@@ -44520,10 +43931,10 @@ index 131f736..99004c3 100644
                    __u16 size, int timeout)
  {
 diff --git a/drivers/usb/core/sysfs.c b/drivers/usb/core/sysfs.c
-index 818e4a0..0fc9589 100644
+index 3f81a3d..a3aa993 100644
 --- a/drivers/usb/core/sysfs.c
 +++ b/drivers/usb/core/sysfs.c
-@@ -226,7 +226,7 @@ show_urbnum(struct device *dev, struct device_attribute *attr, char *buf)
+@@ -239,7 +239,7 @@ show_urbnum(struct device *dev, struct device_attribute *attr, char *buf)
        struct usb_device *udev;
  
        udev = to_usb_device(dev);
@@ -44587,10 +43998,10 @@ index 5e29dde..eca992f 100644
        return 0;
  }
 diff --git a/drivers/usb/gadget/u_serial.c b/drivers/usb/gadget/u_serial.c
-index 598dcc1..032dd4f 100644
+index b369292..9f3ba40 100644
 --- a/drivers/usb/gadget/u_serial.c
 +++ b/drivers/usb/gadget/u_serial.c
-@@ -735,9 +735,9 @@ static int gs_open(struct tty_struct *tty, struct file *file)
+@@ -733,9 +733,9 @@ static int gs_open(struct tty_struct *tty, struct file *file)
                        spin_lock_irq(&port->port_lock);
  
                        /* already open?  Great. */
@@ -44602,7 +44013,7 @@ index 598dcc1..032dd4f 100644
  
                        /* currently opening/closing? wait ... */
                        } else if (port->openclose) {
-@@ -796,7 +796,7 @@ static int gs_open(struct tty_struct *tty, struct file *file)
+@@ -794,7 +794,7 @@ static int gs_open(struct tty_struct *tty, struct file *file)
        tty->driver_data = port;
        port->port.tty = tty;
  
@@ -44611,7 +44022,7 @@ index 598dcc1..032dd4f 100644
        port->openclose = false;
  
        /* if connected, start the I/O stream */
-@@ -838,11 +838,11 @@ static void gs_close(struct tty_struct *tty, struct file *file)
+@@ -836,11 +836,11 @@ static void gs_close(struct tty_struct *tty, struct file *file)
  
        spin_lock_irq(&port->port_lock);
  
@@ -44626,7 +44037,7 @@ index 598dcc1..032dd4f 100644
                goto exit;
        }
  
-@@ -852,7 +852,7 @@ static void gs_close(struct tty_struct *tty, struct file *file)
+@@ -850,7 +850,7 @@ static void gs_close(struct tty_struct *tty, struct file *file)
         * and sleep if necessary
         */
        port->openclose = true;
@@ -44635,7 +44046,7 @@ index 598dcc1..032dd4f 100644
  
        gser = port->port_usb;
        if (gser && gser->disconnect)
-@@ -1159,7 +1159,7 @@ static int gs_closed(struct gs_port *port)
+@@ -1066,7 +1066,7 @@ static int gs_closed(struct gs_port *port)
        int cond;
  
        spin_lock_irq(&port->port_lock);
@@ -44644,7 +44055,7 @@ index 598dcc1..032dd4f 100644
        spin_unlock_irq(&port->port_lock);
        return cond;
  }
-@@ -1273,7 +1273,7 @@ int gserial_connect(struct gserial *gser, u8 port_num)
+@@ -1209,7 +1209,7 @@ int gserial_connect(struct gserial *gser, u8 port_num)
        /* if it's already open, start I/O ... and notify the serial
         * protocol about open/close status (connect/disconnect).
         */
@@ -44653,7 +44064,7 @@ index 598dcc1..032dd4f 100644
                pr_debug("gserial_connect: start ttyGS%d\n", port->port_num);
                gs_start_io(port);
                if (gser->connect)
-@@ -1320,7 +1320,7 @@ void gserial_disconnect(struct gserial *gser)
+@@ -1256,7 +1256,7 @@ void gserial_disconnect(struct gserial *gser)
  
        port->port_usb = NULL;
        gser->ioport = NULL;
@@ -44662,7 +44073,7 @@ index 598dcc1..032dd4f 100644
                wake_up_interruptible(&port->drain_wait);
                if (port->port.tty)
                        tty_hangup(port->port.tty);
-@@ -1336,7 +1336,7 @@ void gserial_disconnect(struct gserial *gser)
+@@ -1272,7 +1272,7 @@ void gserial_disconnect(struct gserial *gser)
  
        /* finally, free any unused/unusable I/O buffers */
        spin_lock_irqsave(&port->port_lock, flags);
@@ -44751,7 +44162,7 @@ index d6bea3e..60b250e 100644
  
  /**
 diff --git a/drivers/usb/wusbcore/wa-xfer.c b/drivers/usb/wusbcore/wa-xfer.c
-index 57c01ab..8a05959 100644
+index 6ef94bc..1b41265 100644
 --- a/drivers/usb/wusbcore/wa-xfer.c
 +++ b/drivers/usb/wusbcore/wa-xfer.c
 @@ -296,7 +296,7 @@ out:
@@ -44834,7 +44245,7 @@ index 6c5ed6b..b727c88 100644
                .ident = "Sahara Touch-iT",
                .matches = {
 diff --git a/drivers/video/fb_defio.c b/drivers/video/fb_defio.c
-index 88cad6b..dd746c7 100644
+index 900aa4e..6d49418 100644
 --- a/drivers/video/fb_defio.c
 +++ b/drivers/video/fb_defio.c
 @@ -206,7 +206,9 @@ void fb_deferred_io_init(struct fb_info *info)
@@ -44872,7 +44283,7 @@ index 5c3960d..15cf8fc 100644
                goto out1;
        }
 diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
-index dc61c12..e29796e 100644
+index 86291dc..7cc5962 100644
 --- a/drivers/video/fbmem.c
 +++ b/drivers/video/fbmem.c
 @@ -428,7 +428,7 @@ static void fb_do_show_logo(struct fb_info *info, struct fb_image *image,
@@ -47853,7 +47264,7 @@ index 86d449e..8e04dc5 100644
        return count;
  }
 diff --git a/drivers/video/uvesafb.c b/drivers/video/uvesafb.c
-index b75db01..ad2f34a 100644
+index d428445..79a78df 100644
 --- a/drivers/video/uvesafb.c
 +++ b/drivers/video/uvesafb.c
 @@ -19,6 +19,7 @@
@@ -48118,10 +47529,10 @@ index fef20db..d28b1ab 100644
                return -ENOMEM;
        return 0;
 diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c
-index 890bed5..17ae73e 100644
+index d86edc8..40ff2fb 100644
 --- a/fs/9p/vfs_inode.c
 +++ b/fs/9p/vfs_inode.c
-@@ -1329,7 +1329,7 @@ static void *v9fs_vfs_follow_link(struct dentry *dentry, struct nameidata *nd)
+@@ -1314,7 +1314,7 @@ static void *v9fs_vfs_follow_link(struct dentry *dentry, struct nameidata *nd)
  void
  v9fs_vfs_put_link(struct dentry *dentry, struct nameidata *nd, void *p)
  {
@@ -48144,7 +47555,7 @@ index 0efd152..b5802ad 100644
          A.out (Assembler.OUTput) is a set of formats for libraries and
          executables used in the earliest versions of UNIX.  Linux used
 diff --git a/fs/aio.c b/fs/aio.c
-index 71f613c..9d01f1f 100644
+index 1dc8786..d3b29e8 100644
 --- a/fs/aio.c
 +++ b/fs/aio.c
 @@ -111,7 +111,7 @@ static int aio_setup_ring(struct kioctx *ctx)
@@ -48156,7 +47567,7 @@ index 71f613c..9d01f1f 100644
                return -EINVAL;
  
        nr_events = (PAGE_SIZE * nr_pages - sizeof(struct aio_ring)) / sizeof(struct io_event);
-@@ -1373,18 +1373,19 @@ static ssize_t aio_fsync(struct kiocb *iocb)
+@@ -1375,18 +1375,19 @@ static ssize_t aio_fsync(struct kiocb *iocb)
  static ssize_t aio_setup_vectored_rw(int type, struct kiocb *kiocb, bool compat)
  {
        ssize_t ret;
@@ -48178,7 +47589,7 @@ index 71f613c..9d01f1f 100644
                                &kiocb->ki_iovec);
        if (ret < 0)
                goto out;
-@@ -1393,6 +1394,10 @@ static ssize_t aio_setup_vectored_rw(int type, struct kiocb *kiocb, bool compat)
+@@ -1395,6 +1396,10 @@ static ssize_t aio_setup_vectored_rw(int type, struct kiocb *kiocb, bool compat)
        if (ret < 0)
                goto out;
  
@@ -48202,10 +47613,10 @@ index 1449adb..a2038c2 100644
                        goto out_sig;
                if (offset > inode->i_sb->s_maxbytes)
 diff --git a/fs/autofs4/waitq.c b/fs/autofs4/waitq.c
-index 03bc1d3..6205356 100644
+index 3db70da..7aeec5b 100644
 --- a/fs/autofs4/waitq.c
 +++ b/fs/autofs4/waitq.c
-@@ -61,7 +61,7 @@ static int autofs4_write(struct autofs_sb_info *sbi,
+@@ -59,7 +59,7 @@ static int autofs4_write(struct autofs_sb_info *sbi,
  {
        unsigned long sigpipe, flags;
        mm_segment_t fs;
@@ -48214,7 +47625,7 @@ index 03bc1d3..6205356 100644
        ssize_t wr = 0;
  
        sigpipe = sigismember(&current->pending.signal, SIGPIPE);
-@@ -348,6 +348,10 @@ static int validate_request(struct autofs_wait_queue **wait,
+@@ -346,6 +346,10 @@ static int validate_request(struct autofs_wait_queue **wait,
        return 1;
  }
  
@@ -48225,7 +47636,7 @@ index 03bc1d3..6205356 100644
  int autofs4_wait(struct autofs_sb_info *sbi, struct dentry *dentry,
                enum autofs_notify notify)
  {
-@@ -381,7 +385,12 @@ int autofs4_wait(struct autofs_sb_info *sbi, struct dentry *dentry,
+@@ -379,7 +383,12 @@ int autofs4_wait(struct autofs_sb_info *sbi, struct dentry *dentry,
  
        /* If this is a direct mount request create a dummy name */
        if (IS_ROOT(dentry) && autofs_type_trigger(sbi->type))
@@ -48261,7 +47672,7 @@ index 2722387..c8dd2a7 100644
  {
        if (BEFS_SB(sb)->byte_order == BEFS_BYTESEX_LE)
 diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c
-index 2b3bda8..6a2d4be 100644
+index 8615ee8..388ed68 100644
 --- a/fs/befs/linuxvfs.c
 +++ b/fs/befs/linuxvfs.c
 @@ -510,7 +510,7 @@ static void befs_put_link(struct dentry *dentry, struct nameidata *nd, void *p)
@@ -48274,7 +47685,7 @@ index 2b3bda8..6a2d4be 100644
                        kfree(link);
        }
 diff --git a/fs/binfmt_aout.c b/fs/binfmt_aout.c
-index 6043567..16a9239 100644
+index bbc8f88..7c7ac97 100644
 --- a/fs/binfmt_aout.c
 +++ b/fs/binfmt_aout.c
 @@ -16,6 +16,7 @@
@@ -48354,18 +47765,18 @@ index 6043567..16a9239 100644
                                fd_offset + ex.a_text);
                if (error != N_DATADDR(ex)) {
 diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
-index 0c42cdb..b62581e9 100644
+index 86af964..8a1da7e 100644
 --- a/fs/binfmt_elf.c
 +++ b/fs/binfmt_elf.c
-@@ -33,6 +33,7 @@
- #include <linux/elf.h>
+@@ -34,6 +34,7 @@
  #include <linux/utsname.h>
  #include <linux/coredump.h>
+ #include <linux/sched.h>
 +#include <linux/xattr.h>
  #include <asm/uaccess.h>
  #include <asm/param.h>
  #include <asm/page.h>
-@@ -59,6 +60,10 @@ static int elf_core_dump(struct coredump_params *cprm);
+@@ -60,6 +61,10 @@ static int elf_core_dump(struct coredump_params *cprm);
  #define elf_core_dump NULL
  #endif
  
@@ -48376,7 +47787,7 @@ index 0c42cdb..b62581e9 100644
  #if ELF_EXEC_PAGESIZE > PAGE_SIZE
  #define ELF_MIN_ALIGN ELF_EXEC_PAGESIZE
  #else
-@@ -78,6 +83,11 @@ static struct linux_binfmt elf_format = {
+@@ -79,6 +84,11 @@ static struct linux_binfmt elf_format = {
        .load_binary    = load_elf_binary,
        .load_shlib     = load_elf_library,
        .core_dump      = elf_core_dump,
@@ -48388,7 +47799,7 @@ index 0c42cdb..b62581e9 100644
        .min_coredump   = ELF_EXEC_PAGESIZE,
  };
  
-@@ -85,6 +95,8 @@ static struct linux_binfmt elf_format = {
+@@ -86,6 +96,8 @@ static struct linux_binfmt elf_format = {
  
  static int set_brk(unsigned long start, unsigned long end)
  {
@@ -48397,7 +47808,7 @@ index 0c42cdb..b62581e9 100644
        start = ELF_PAGEALIGN(start);
        end = ELF_PAGEALIGN(end);
        if (end > start) {
-@@ -93,7 +105,7 @@ static int set_brk(unsigned long start, unsigned long end)
+@@ -94,7 +106,7 @@ static int set_brk(unsigned long start, unsigned long end)
                if (BAD_ADDR(addr))
                        return addr;
        }
@@ -48406,7 +47817,7 @@ index 0c42cdb..b62581e9 100644
        return 0;
  }
  
-@@ -154,12 +166,13 @@ create_elf_tables(struct linux_binprm *bprm, struct elfhdr *exec,
+@@ -155,12 +167,13 @@ create_elf_tables(struct linux_binprm *bprm, struct elfhdr *exec,
        elf_addr_t __user *u_rand_bytes;
        const char *k_platform = ELF_PLATFORM;
        const char *k_base_platform = ELF_BASE_PLATFORM;
@@ -48421,7 +47832,7 @@ index 0c42cdb..b62581e9 100644
  
        /*
         * In some cases (e.g. Hyper-Threading), we want to avoid L1
-@@ -201,8 +214,12 @@ create_elf_tables(struct linux_binprm *bprm, struct elfhdr *exec,
+@@ -202,8 +215,12 @@ create_elf_tables(struct linux_binprm *bprm, struct elfhdr *exec,
         * Generate 16 random bytes for userspace PRNG seeding.
         */
        get_random_bytes(k_rand_bytes, sizeof(k_rand_bytes));
@@ -48436,7 +47847,7 @@ index 0c42cdb..b62581e9 100644
        if (__copy_to_user(u_rand_bytes, k_rand_bytes, sizeof(k_rand_bytes)))
                return -EFAULT;
  
-@@ -314,9 +331,11 @@ create_elf_tables(struct linux_binprm *bprm, struct elfhdr *exec,
+@@ -315,9 +332,11 @@ create_elf_tables(struct linux_binprm *bprm, struct elfhdr *exec,
                return -EFAULT;
        current->mm->env_end = p;
  
@@ -48449,7 +47860,7 @@ index 0c42cdb..b62581e9 100644
                return -EFAULT;
        return 0;
  }
-@@ -380,15 +399,14 @@ static unsigned long total_mapping_size(struct elf_phdr *cmds, int nr)
+@@ -385,15 +404,14 @@ static unsigned long total_mapping_size(struct elf_phdr *cmds, int nr)
     an ELF header */
  
  static unsigned long load_elf_interp(struct elfhdr *interp_elf_ex,
@@ -48468,7 +47879,7 @@ index 0c42cdb..b62581e9 100644
        unsigned long total_size;
        int retval, i, size;
  
-@@ -434,6 +452,11 @@ static unsigned long load_elf_interp(struct elfhdr *interp_elf_ex,
+@@ -439,6 +457,11 @@ static unsigned long load_elf_interp(struct elfhdr *interp_elf_ex,
                goto out_close;
        }
  
@@ -48480,7 +47891,7 @@ index 0c42cdb..b62581e9 100644
        eppnt = elf_phdata;
        for (i = 0; i < interp_elf_ex->e_phnum; i++, eppnt++) {
                if (eppnt->p_type == PT_LOAD) {
-@@ -457,8 +480,6 @@ static unsigned long load_elf_interp(struct elfhdr *interp_elf_ex,
+@@ -462,8 +485,6 @@ static unsigned long load_elf_interp(struct elfhdr *interp_elf_ex,
                        map_addr = elf_map(interpreter, load_addr + vaddr,
                                        eppnt, elf_prot, elf_type, total_size);
                        total_size = 0;
@@ -48489,7 +47900,7 @@ index 0c42cdb..b62581e9 100644
                        error = map_addr;
                        if (BAD_ADDR(map_addr))
                                goto out_close;
-@@ -477,8 +498,8 @@ static unsigned long load_elf_interp(struct elfhdr *interp_elf_ex,
+@@ -482,8 +503,8 @@ static unsigned long load_elf_interp(struct elfhdr *interp_elf_ex,
                        k = load_addr + eppnt->p_vaddr;
                        if (BAD_ADDR(k) ||
                            eppnt->p_filesz > eppnt->p_memsz ||
@@ -48500,7 +47911,7 @@ index 0c42cdb..b62581e9 100644
                                error = -ENOMEM;
                                goto out_close;
                        }
-@@ -530,6 +551,315 @@ out:
+@@ -535,6 +556,315 @@ out:
        return error;
  }
  
@@ -48730,11 +48141,11 @@ index 0c42cdb..b62581e9 100644
 +
 +#ifdef CONFIG_PAX_XATTR_PAX_FLAGS
 +      ssize_t xattr_size, i;
-+      unsigned char xattr_value[5];
++      unsigned char xattr_value[sizeof("pemrs") - 1];
 +      unsigned long pax_flags_hardmode = 0UL, pax_flags_softmode = 0UL;
 +
-+      xattr_size = vfs_getxattr(file->f_path.dentry, XATTR_NAME_PAX_FLAGS, xattr_value, sizeof xattr_value);
-+      if (xattr_size <= 0 || xattr_size > 5)
++      xattr_size = pax_getxattr(file->f_path.dentry, xattr_value, sizeof xattr_value);
++      if (xattr_size <= 0 || xattr_size > sizeof xattr_value)
 +              return ~0UL;
 +
 +      for (i = 0; i < xattr_size; i++)
@@ -48816,7 +48227,7 @@ index 0c42cdb..b62581e9 100644
  /*
   * These are the functions used to load ELF style executables and shared
   * libraries.  There is no binary dependent code anywhere else.
-@@ -546,6 +876,11 @@ static unsigned long randomize_stack_top(unsigned long stack_top)
+@@ -551,6 +881,11 @@ static unsigned long randomize_stack_top(unsigned long stack_top)
  {
        unsigned int random_variable = 0;
  
@@ -48828,7 +48239,7 @@ index 0c42cdb..b62581e9 100644
        if ((current->flags & PF_RANDOMIZE) &&
                !(current->personality & ADDR_NO_RANDOMIZE)) {
                random_variable = get_random_int() & STACK_RND_MASK;
-@@ -564,7 +899,7 @@ static int load_elf_binary(struct linux_binprm *bprm)
+@@ -569,7 +904,7 @@ static int load_elf_binary(struct linux_binprm *bprm)
        unsigned long load_addr = 0, load_bias = 0;
        int load_addr_set = 0;
        char * elf_interpreter = NULL;
@@ -48837,7 +48248,7 @@ index 0c42cdb..b62581e9 100644
        struct elf_phdr *elf_ppnt, *elf_phdata;
        unsigned long elf_bss, elf_brk;
        int retval, i;
-@@ -574,12 +909,12 @@ static int load_elf_binary(struct linux_binprm *bprm)
+@@ -579,12 +914,12 @@ static int load_elf_binary(struct linux_binprm *bprm)
        unsigned long start_code, end_code, start_data, end_data;
        unsigned long reloc_func_desc __maybe_unused = 0;
        int executable_stack = EXSTACK_DEFAULT;
@@ -48851,7 +48262,7 @@ index 0c42cdb..b62581e9 100644
  
        loc = kmalloc(sizeof(*loc), GFP_KERNEL);
        if (!loc) {
-@@ -715,11 +1050,81 @@ static int load_elf_binary(struct linux_binprm *bprm)
+@@ -720,11 +1055,81 @@ static int load_elf_binary(struct linux_binprm *bprm)
                goto out_free_dentry;
  
        /* OK, This is the point of no return */
@@ -48934,7 +48345,7 @@ index 0c42cdb..b62581e9 100644
        if (elf_read_implies_exec(loc->elf_ex, executable_stack))
                current->personality |= READ_IMPLIES_EXEC;
  
-@@ -810,6 +1215,20 @@ static int load_elf_binary(struct linux_binprm *bprm)
+@@ -815,6 +1220,20 @@ static int load_elf_binary(struct linux_binprm *bprm)
  #else
                        load_bias = ELF_PAGESTART(ELF_ET_DYN_BASE - vaddr);
  #endif
@@ -48955,7 +48366,7 @@ index 0c42cdb..b62581e9 100644
                }
  
                error = elf_map(bprm->file, load_bias + vaddr, elf_ppnt,
-@@ -842,9 +1261,9 @@ static int load_elf_binary(struct linux_binprm *bprm)
+@@ -847,9 +1266,9 @@ static int load_elf_binary(struct linux_binprm *bprm)
                 * allowed task size. Note that p_filesz must always be
                 * <= p_memsz so it is only necessary to check p_memsz.
                 */
@@ -48968,7 +48379,7 @@ index 0c42cdb..b62581e9 100644
                        /* set_brk can never work. Avoid overflows. */
                        send_sig(SIGKILL, current, 0);
                        retval = -EINVAL;
-@@ -883,17 +1302,44 @@ static int load_elf_binary(struct linux_binprm *bprm)
+@@ -888,17 +1307,45 @@ static int load_elf_binary(struct linux_binprm *bprm)
                goto out_free_dentry;
        }
        if (likely(elf_bss != elf_brk) && unlikely(padzero(elf_bss))) {
@@ -48984,7 +48395,8 @@ index 0c42cdb..b62581e9 100644
  
 +#ifdef CONFIG_PAX_RANDMMAP
 +      if (current->mm->pax_flags & MF_PAX_RANDMMAP) {
-+              unsigned long start, size, flags, vm_flags;
++              unsigned long start, size, flags;
++              vm_flags_t vm_flags;
 +
 +              start = ELF_PAGEALIGN(elf_brk);
 +              size = PAGE_SIZE + ((pax_get_random_long() & ((1UL << 22) - 1UL)) << 4);
@@ -48997,7 +48409,7 @@ index 0c42cdb..b62581e9 100644
 +              if (!IS_ERR_VALUE(start) && !find_vma_intersection(current->mm, start, start + size + PAGE_SIZE)) {
 +//                    if (current->personality & ADDR_NO_RANDOMIZE)
 +//                            vm_flags |= VM_READ | VM_MAYREAD;
-+                      start = mmap_region(NULL, start, PAGE_ALIGN(size), flags, vm_flags, 0);
++                      start = mmap_region(NULL, start, PAGE_ALIGN(size), vm_flags, 0);
 +                      retval = IS_ERR_VALUE(start) ? start : 0;
 +              }
 +              up_write(&current->mm->mmap_sem);
@@ -49019,7 +48431,7 @@ index 0c42cdb..b62581e9 100644
                                            load_bias);
                if (!IS_ERR((void *)elf_entry)) {
                        /*
-@@ -1115,7 +1561,7 @@ static bool always_dump_vma(struct vm_area_struct *vma)
+@@ -1120,7 +1567,7 @@ static bool always_dump_vma(struct vm_area_struct *vma)
   * Decide what to dump of a segment, part, all or none.
   */
  static unsigned long vma_dump_size(struct vm_area_struct *vma,
@@ -49028,7 +48440,7 @@ index 0c42cdb..b62581e9 100644
  {
  #define FILTER(type)  (mm_flags & (1UL << MMF_DUMP_##type))
  
-@@ -1152,7 +1598,7 @@ static unsigned long vma_dump_size(struct vm_area_struct *vma,
+@@ -1158,7 +1605,7 @@ static unsigned long vma_dump_size(struct vm_area_struct *vma,
        if (vma->vm_file == NULL)
                return 0;
  
@@ -49037,7 +48449,7 @@ index 0c42cdb..b62581e9 100644
                goto whole;
  
        /*
-@@ -1374,9 +1820,9 @@ static void fill_auxv_note(struct memelfnote *note, struct mm_struct *mm)
+@@ -1383,9 +1830,9 @@ static void fill_auxv_note(struct memelfnote *note, struct mm_struct *mm)
  {
        elf_addr_t *auxv = (elf_addr_t *) mm->saved_auxv;
        int i = 0;
@@ -49049,7 +48461,7 @@ index 0c42cdb..b62581e9 100644
        fill_note(note, "CORE", NT_AUXV, i * sizeof(elf_addr_t), auxv);
  }
  
-@@ -2006,14 +2452,14 @@ static void fill_extnum_info(struct elfhdr *elf, struct elf_shdr *shdr4extnum,
+@@ -2015,14 +2462,14 @@ static void fill_extnum_info(struct elfhdr *elf, struct elf_shdr *shdr4extnum,
  }
  
  static size_t elf_core_vma_data_size(struct vm_area_struct *gate_vma,
@@ -49066,7 +48478,7 @@ index 0c42cdb..b62581e9 100644
        return size;
  }
  
-@@ -2107,7 +2553,7 @@ static int elf_core_dump(struct coredump_params *cprm)
+@@ -2116,7 +2563,7 @@ static int elf_core_dump(struct coredump_params *cprm)
  
        dataoff = offset = roundup(offset, ELF_EXEC_PAGESIZE);
  
@@ -49075,7 +48487,7 @@ index 0c42cdb..b62581e9 100644
        offset += elf_core_extra_data_size();
        e_shoff = offset;
  
-@@ -2121,10 +2567,12 @@ static int elf_core_dump(struct coredump_params *cprm)
+@@ -2130,10 +2577,12 @@ static int elf_core_dump(struct coredump_params *cprm)
        offset = dataoff;
  
        size += sizeof(*elf);
@@ -49088,7 +48500,7 @@ index 0c42cdb..b62581e9 100644
        if (size > cprm->limit
            || !dump_write(cprm->file, phdr4note, sizeof(*phdr4note)))
                goto end_coredump;
-@@ -2138,7 +2586,7 @@ static int elf_core_dump(struct coredump_params *cprm)
+@@ -2147,7 +2596,7 @@ static int elf_core_dump(struct coredump_params *cprm)
                phdr.p_offset = offset;
                phdr.p_vaddr = vma->vm_start;
                phdr.p_paddr = 0;
@@ -49097,7 +48509,7 @@ index 0c42cdb..b62581e9 100644
                phdr.p_memsz = vma->vm_end - vma->vm_start;
                offset += phdr.p_filesz;
                phdr.p_flags = vma->vm_flags & VM_READ ? PF_R : 0;
-@@ -2149,6 +2597,7 @@ static int elf_core_dump(struct coredump_params *cprm)
+@@ -2158,6 +2607,7 @@ static int elf_core_dump(struct coredump_params *cprm)
                phdr.p_align = ELF_EXEC_PAGESIZE;
  
                size += sizeof(phdr);
@@ -49105,7 +48517,7 @@ index 0c42cdb..b62581e9 100644
                if (size > cprm->limit
                    || !dump_write(cprm->file, &phdr, sizeof(phdr)))
                        goto end_coredump;
-@@ -2173,7 +2622,7 @@ static int elf_core_dump(struct coredump_params *cprm)
+@@ -2182,7 +2632,7 @@ static int elf_core_dump(struct coredump_params *cprm)
                unsigned long addr;
                unsigned long end;
  
@@ -49114,7 +48526,7 @@ index 0c42cdb..b62581e9 100644
  
                for (addr = vma->vm_start; addr < end; addr += PAGE_SIZE) {
                        struct page *page;
-@@ -2182,6 +2631,7 @@ static int elf_core_dump(struct coredump_params *cprm)
+@@ -2191,6 +2641,7 @@ static int elf_core_dump(struct coredump_params *cprm)
                        page = get_dump_page(addr);
                        if (page) {
                                void *kaddr = kmap(page);
@@ -49122,7 +48534,7 @@ index 0c42cdb..b62581e9 100644
                                stop = ((size += PAGE_SIZE) > cprm->limit) ||
                                        !dump_write(cprm->file, kaddr,
                                                    PAGE_SIZE);
-@@ -2199,6 +2649,7 @@ static int elf_core_dump(struct coredump_params *cprm)
+@@ -2208,6 +2659,7 @@ static int elf_core_dump(struct coredump_params *cprm)
  
        if (e_phnum == PN_XNUM) {
                size += sizeof(*shdr4extnum);
@@ -49130,7 +48542,7 @@ index 0c42cdb..b62581e9 100644
                if (size > cprm->limit
                    || !dump_write(cprm->file, shdr4extnum,
                                   sizeof(*shdr4extnum)))
-@@ -2219,6 +2670,97 @@ out:
+@@ -2228,6 +2680,97 @@ out:
  
  #endif                /* CONFIG_ELF_CORE */
  
@@ -49229,7 +48641,7 @@ index 0c42cdb..b62581e9 100644
  {
        register_binfmt(&elf_format);
 diff --git a/fs/binfmt_flat.c b/fs/binfmt_flat.c
-index b563719..3868998 100644
+index 2036d21..b0430d0 100644
 --- a/fs/binfmt_flat.c
 +++ b/fs/binfmt_flat.c
 @@ -562,7 +562,9 @@ static int load_flat_file(struct linux_binprm * bprm,
@@ -49296,7 +48708,7 @@ index b96fc6c..431d628 100644
        __bio_for_each_segment(bvec, bio, i, 0) {
                char *addr = page_address(bvec->bv_page);
 diff --git a/fs/block_dev.c b/fs/block_dev.c
-index 883dc49..f27794a 100644
+index aae187a..fd790ba 100644
 --- a/fs/block_dev.c
 +++ b/fs/block_dev.c
 @@ -652,7 +652,7 @@ static bool bd_may_claim(struct block_device *bdev, struct block_device *whole,
@@ -49309,7 +48721,7 @@ index 883dc49..f27794a 100644
        else if (whole->bd_holder != NULL)
                return false;    /* is a partition of a held device */
 diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c
-index ce1c169..1ef484f 100644
+index ca9d8f1..8c0142d 100644
 --- a/fs/btrfs/ctree.c
 +++ b/fs/btrfs/ctree.c
 @@ -1036,9 +1036,12 @@ static noinline int __btrfs_cow_block(struct btrfs_trans_handle *trans,
@@ -49328,39 +48740,11 @@ index ce1c169..1ef484f 100644
                        parent_start = 0;
  
                WARN_ON(trans->transid != btrfs_header_generation(parent));
-diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
-index 7c4e6cc..27bd5c2 100644
---- a/fs/btrfs/inode.c
-+++ b/fs/btrfs/inode.c
-@@ -7314,7 +7314,7 @@ fail:
-       return -ENOMEM;
- }
--static int btrfs_getattr(struct vfsmount *mnt,
-+int btrfs_getattr(struct vfsmount *mnt,
-                        struct dentry *dentry, struct kstat *stat)
- {
-       struct inode *inode = dentry->d_inode;
-@@ -7328,6 +7328,14 @@ static int btrfs_getattr(struct vfsmount *mnt,
-       return 0;
- }
-+EXPORT_SYMBOL(btrfs_getattr);
-+
-+dev_t get_btrfs_dev_from_inode(struct inode *inode)
-+{
-+      return BTRFS_I(inode)->root->anon_dev;
-+}
-+EXPORT_SYMBOL(get_btrfs_dev_from_inode);
-+
- /*
-  * If a file is moved, it will inherit the cow and compression flags of the new
-  * directory.
 diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
-index 338f259..b657640 100644
+index 2c02310..a0c895e 100644
 --- a/fs/btrfs/ioctl.c
 +++ b/fs/btrfs/ioctl.c
-@@ -3033,9 +3033,12 @@ long btrfs_ioctl_space_info(struct btrfs_root *root, void __user *arg)
+@@ -3077,9 +3077,12 @@ long btrfs_ioctl_space_info(struct btrfs_root *root, void __user *arg)
        for (i = 0; i < num_types; i++) {
                struct btrfs_space_info *tmp;
  
@@ -49373,7 +48757,7 @@ index 338f259..b657640 100644
                info = NULL;
                rcu_read_lock();
                list_for_each_entry_rcu(tmp, &root->fs_info->space_info,
-@@ -3057,10 +3060,7 @@ long btrfs_ioctl_space_info(struct btrfs_root *root, void __user *arg)
+@@ -3101,10 +3104,7 @@ long btrfs_ioctl_space_info(struct btrfs_root *root, void __user *arg)
                                memcpy(dest, &space, sizeof(space));
                                dest++;
                                space_args.total_spaces++;
@@ -49384,24 +48768,11 @@ index 338f259..b657640 100644
                }
                up_read(&info->groups_sem);
        }
-diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c
-index 300e09a..9fe4539 100644
---- a/fs/btrfs/relocation.c
-+++ b/fs/btrfs/relocation.c
-@@ -1269,7 +1269,7 @@ static int __update_reloc_root(struct btrfs_root *root, int del)
-       }
-       spin_unlock(&rc->reloc_root_tree.lock);
--      BUG_ON((struct btrfs_root *)node->data != root);
-+      BUG_ON(!node || (struct btrfs_root *)node->data != root);
-       if (!del) {
-               spin_lock(&rc->reloc_root_tree.lock);
 diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
-index d8982e9..29a85fa 100644
+index f6b8859..54fe8c5 100644
 --- a/fs/btrfs/super.c
 +++ b/fs/btrfs/super.c
-@@ -267,7 +267,7 @@ void __btrfs_abort_transaction(struct btrfs_trans_handle *trans,
+@@ -266,7 +266,7 @@ void __btrfs_abort_transaction(struct btrfs_trans_handle *trans,
                             function, line, errstr);
                return;
        }
@@ -49565,7 +48936,7 @@ index 4809922..aab2c39 100644
                        kunmap(page);
                        if (ret != len)
 diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c
-index 8c1aabe..bbf856a 100644
+index 6d797f4..0ace2e5 100644
 --- a/fs/ceph/dir.c
 +++ b/fs/ceph/dir.c
 @@ -243,7 +243,7 @@ static int ceph_readdir(struct file *filp, void *dirent, filldir_t filldir)
@@ -49622,10 +48993,10 @@ index d9ea6ed..1e6c8ac 100644
                                        server->ops->print_stats(m, tcon);
                        }
 diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
-index b9db388..9a73d6d 100644
+index 345fc89..b2acae5 100644
 --- a/fs/cifs/cifsfs.c
 +++ b/fs/cifs/cifsfs.c
-@@ -1026,7 +1026,7 @@ cifs_init_request_bufs(void)
+@@ -1033,7 +1033,7 @@ cifs_init_request_bufs(void)
  /*    cERROR(1, "CIFSMaxBufSize %d 0x%x",CIFSMaxBufSize,CIFSMaxBufSize); */
        cifs_req_cachep = kmem_cache_create("cifs_request",
                                            CIFSMaxBufSize + max_hdr_size, 0,
@@ -49634,7 +49005,7 @@ index b9db388..9a73d6d 100644
        if (cifs_req_cachep == NULL)
                return -ENOMEM;
  
-@@ -1053,7 +1053,7 @@ cifs_init_request_bufs(void)
+@@ -1060,7 +1060,7 @@ cifs_init_request_bufs(void)
        efficient to alloc 1 per page off the slab compared to 17K (5page)
        alloc of large cifs buffers even when page debugging is on */
        cifs_sm_req_cachep = kmem_cache_create("cifs_small_rq",
@@ -49643,7 +49014,7 @@ index b9db388..9a73d6d 100644
                        NULL);
        if (cifs_sm_req_cachep == NULL) {
                mempool_destroy(cifs_req_poolp);
-@@ -1138,8 +1138,8 @@ init_cifs(void)
+@@ -1145,8 +1145,8 @@ init_cifs(void)
        atomic_set(&bufAllocCount, 0);
        atomic_set(&smBufAllocCount, 0);
  #ifdef CONFIG_CIFS_STATS2
@@ -49655,7 +49026,7 @@ index b9db388..9a73d6d 100644
  
        atomic_set(&midCount, 0);
 diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h
-index e6899ce..d6b2920 100644
+index 4f07f6f..55de8ce 100644
 --- a/fs/cifs/cifsglob.h
 +++ b/fs/cifs/cifsglob.h
 @@ -751,35 +751,35 @@ struct cifs_tcon {
@@ -49739,7 +49110,7 @@ index e6899ce..d6b2920 100644
  GLOBAL_EXTERN atomic_t smBufAllocCount;
  GLOBAL_EXTERN atomic_t midCount;
 diff --git a/fs/cifs/link.c b/fs/cifs/link.c
-index 51dc2fb..1e12a33 100644
+index 9f6c4c4..8de307a 100644
 --- a/fs/cifs/link.c
 +++ b/fs/cifs/link.c
 @@ -616,7 +616,7 @@ symlink_exit:
@@ -49752,7 +49123,7 @@ index 51dc2fb..1e12a33 100644
                kfree(p);
  }
 diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c
-index 3a00c0d..42d901c 100644
+index 1b15bf8..1ce489e 100644
 --- a/fs/cifs/misc.c
 +++ b/fs/cifs/misc.c
 @@ -169,7 +169,7 @@ cifs_buf_get(void)
@@ -50019,7 +49390,7 @@ index 41d9d07..dbb4772 100644
  
        req->FileIndex = cpu_to_le32(index);
 diff --git a/fs/coda/cache.c b/fs/coda/cache.c
-index 958ae0e..505c9d0 100644
+index 1da168c..8bc7ff6 100644
 --- a/fs/coda/cache.c
 +++ b/fs/coda/cache.c
 @@ -24,7 +24,7 @@
@@ -50037,7 +49408,7 @@ index 958ae0e..505c9d0 100644
        spin_lock(&cii->c_lock);
 -      cii->c_cached_epoch = atomic_read(&permission_epoch);
 +      cii->c_cached_epoch = atomic_read_unchecked(&permission_epoch);
-       if (cii->c_uid != current_fsuid()) {
+       if (!uid_eq(cii->c_uid, current_fsuid())) {
                cii->c_uid = current_fsuid();
                  cii->c_cached_perm = mask;
 @@ -46,14 +46,14 @@ void coda_cache_clear_inode(struct inode *inode)
@@ -50060,14 +49431,14 @@ index 958ae0e..505c9d0 100644
 @@ -66,7 +66,7 @@ int coda_cache_check(struct inode *inode, int mask)
        spin_lock(&cii->c_lock);
        hit = (mask & cii->c_cached_perm) == mask &&
-           cii->c_uid == current_fsuid() &&
+           uid_eq(cii->c_uid, current_fsuid()) &&
 -          cii->c_cached_epoch == atomic_read(&permission_epoch);
 +          cii->c_cached_epoch == atomic_read_unchecked(&permission_epoch);
        spin_unlock(&cii->c_lock);
  
        return hit;
 diff --git a/fs/compat.c b/fs/compat.c
-index a06dcbc..dacb6d3 100644
+index d487985..c9e04b1 100644
 --- a/fs/compat.c
 +++ b/fs/compat.c
 @@ -54,7 +54,7 @@
@@ -50205,7 +49576,7 @@ index a81147e..20bf2b5 100644
  
  /*
 diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c
-index e2f57a0..3c78771 100644
+index 3ced75f..1eeca06 100644
 --- a/fs/compat_ioctl.c
 +++ b/fs/compat_ioctl.c
 @@ -623,7 +623,7 @@ static int serial_struct_ioctl(unsigned fd, unsigned cmd,
@@ -50238,24 +49609,10 @@ index e2f57a0..3c78771 100644
                return 1;
        if (a < b)
 diff --git a/fs/configfs/dir.c b/fs/configfs/dir.c
-index 712b10f..c33c4ca 100644
+index 7aabc6a..34c1197 100644
 --- a/fs/configfs/dir.c
 +++ b/fs/configfs/dir.c
-@@ -1037,10 +1037,11 @@ static int configfs_dump(struct configfs_dirent *sd, int level)
- static int configfs_depend_prep(struct dentry *origin,
-                               struct config_item *target)
- {
--      struct configfs_dirent *child_sd, *sd = origin->d_fsdata;
-+      struct configfs_dirent *child_sd, *sd;
-       int ret = 0;
--      BUG_ON(!origin || !sd);
-+      BUG_ON(!origin || !origin->d_fsdata);
-+      sd = origin->d_fsdata;
-       if (sd->s_element == target)  /* Boo-yah */
-               goto out;
-@@ -1564,7 +1565,8 @@ static int configfs_readdir(struct file * filp, void * dirent, filldir_t filldir
+@@ -1565,7 +1565,8 @@ static int configfs_readdir(struct file * filp, void * dirent, filldir_t filldir
                        }
                        for (p=q->next; p!= &parent_sd->s_children; p=p->next) {
                                struct configfs_dirent *next;
@@ -50265,7 +49622,7 @@ index 712b10f..c33c4ca 100644
                                int len;
                                struct inode *inode = NULL;
  
-@@ -1574,7 +1576,12 @@ static int configfs_readdir(struct file * filp, void * dirent, filldir_t filldir
+@@ -1575,7 +1576,12 @@ static int configfs_readdir(struct file * filp, void * dirent, filldir_t filldir
                                        continue;
  
                                name = configfs_get_name(next);
@@ -50280,7 +49637,7 @@ index 712b10f..c33c4ca 100644
                                /*
                                 * We'll have a dentry and an inode for
 diff --git a/fs/coredump.c b/fs/coredump.c
-index 1774932..5812106 100644
+index c647965..a77bff3 100644
 --- a/fs/coredump.c
 +++ b/fs/coredump.c
 @@ -52,7 +52,7 @@ struct core_name {
@@ -50311,7 +49668,7 @@ index 1774932..5812106 100644
        cn->used = 0;
  
 @@ -414,17 +414,17 @@ static void wait_for_dump_helpers(struct file *file)
-       pipe = file->f_path.dentry->d_inode->i_pipe;
+       pipe = file_inode(file)->i_pipe;
  
        pipe_lock(pipe);
 -      pipe->readers++;
@@ -50401,10 +49758,10 @@ index 1774932..5812106 100644
  EXPORT_SYMBOL(dump_write);
  
 diff --git a/fs/dcache.c b/fs/dcache.c
-index c3bbf85..5b71101 100644
+index e689268..f36956e 100644
 --- a/fs/dcache.c
 +++ b/fs/dcache.c
-@@ -3139,7 +3139,7 @@ void __init vfs_caches_init(unsigned long mempages)
+@@ -3100,7 +3100,7 @@ void __init vfs_caches_init(unsigned long mempages)
        mempages -= reserve;
  
        names_cachep = kmem_cache_create("names_cache", PATH_MAX, 0,
@@ -50414,7 +49771,7 @@ index c3bbf85..5b71101 100644
        dcache_init();
        inode_init();
 diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c
-index a5f12b7..4ee8a6f 100644
+index 4888cb3..e0f7cf8 100644
 --- a/fs/debugfs/inode.c
 +++ b/fs/debugfs/inode.c
 @@ -415,7 +415,11 @@ EXPORT_SYMBOL_GPL(debugfs_create_file);
@@ -50430,7 +49787,7 @@ index a5f12b7..4ee8a6f 100644
  }
  EXPORT_SYMBOL_GPL(debugfs_create_dir);
 diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c
-index cc7709e..7e7211f 100644
+index 5eab400..810a3f5 100644
 --- a/fs/ecryptfs/inode.c
 +++ b/fs/ecryptfs/inode.c
 @@ -674,7 +674,7 @@ static int ecryptfs_readlink_lower(struct dentry *dentry, char **buf,
@@ -50452,10 +49809,10 @@ index cc7709e..7e7211f 100644
                /* Free the char* */
                kfree(buf);
 diff --git a/fs/ecryptfs/miscdev.c b/fs/ecryptfs/miscdev.c
-index 412e6ed..4292d22 100644
+index e4141f2..d8263e8 100644
 --- a/fs/ecryptfs/miscdev.c
 +++ b/fs/ecryptfs/miscdev.c
-@@ -315,7 +315,7 @@ check_list:
+@@ -304,7 +304,7 @@ check_list:
                goto out_unlock_msg_ctx;
        i = PKT_TYPE_SIZE + PKT_CTR_SIZE;
        if (msg_ctx->msg) {
@@ -50465,19 +49822,10 @@ index 412e6ed..4292d22 100644
                i += packet_length_size;
                if (copy_to_user(&buf[i], msg_ctx->msg, msg_ctx->msg_size))
 diff --git a/fs/ecryptfs/read_write.c b/fs/ecryptfs/read_write.c
-index b2a34a1..162fa69 100644
+index 6a16053..2155147 100644
 --- a/fs/ecryptfs/read_write.c
 +++ b/fs/ecryptfs/read_write.c
-@@ -48,7 +48,7 @@ int ecryptfs_write_lower(struct inode *ecryptfs_inode, char *data,
-               return -EIO;
-       fs_save = get_fs();
-       set_fs(get_ds());
--      rc = vfs_write(lower_file, data, size, &offset);
-+      rc = vfs_write(lower_file, (const char __force_user *)data, size, &offset);
-       set_fs(fs_save);
-       mark_inode_dirty_sync(ecryptfs_inode);
-       return rc;
-@@ -244,7 +244,7 @@ int ecryptfs_read_lower(char *data, loff_t offset, size_t size,
+@@ -240,7 +240,7 @@ int ecryptfs_read_lower(char *data, loff_t offset, size_t size,
                return -EIO;
        fs_save = get_fs();
        set_fs(get_ds());
@@ -50487,10 +49835,10 @@ index b2a34a1..162fa69 100644
        return rc;
  }
 diff --git a/fs/exec.c b/fs/exec.c
-index 20df02c..1b1d946 100644
+index 6d56ff2..b56586d 100644
 --- a/fs/exec.c
 +++ b/fs/exec.c
-@@ -55,6 +55,17 @@
+@@ -55,8 +55,20 @@
  #include <linux/pipe_fs_i.h>
  #include <linux/oom.h>
  #include <linux/compat.h>
@@ -50507,8 +49855,11 @@ index 20df02c..1b1d946 100644
 +#include <trace/events/fs.h>
  
  #include <asm/uaccess.h>
++#include <asm/sections.h>
  #include <asm/mmu_context.h>
-@@ -66,6 +77,18 @@
+ #include <asm/tlb.h>
+@@ -66,6 +78,18 @@
  
  #include <trace/events/sched.h>
  
@@ -50527,7 +49878,7 @@ index 20df02c..1b1d946 100644
  int suid_dumpable = 0;
  
  static LIST_HEAD(formats);
-@@ -75,8 +98,8 @@ void __register_binfmt(struct linux_binfmt * fmt, int insert)
+@@ -75,8 +99,8 @@ void __register_binfmt(struct linux_binfmt * fmt, int insert)
  {
        BUG_ON(!fmt);
        write_lock(&binfmt_lock);
@@ -50538,7 +49889,7 @@ index 20df02c..1b1d946 100644
        write_unlock(&binfmt_lock);
  }
  
-@@ -85,7 +108,7 @@ EXPORT_SYMBOL(__register_binfmt);
+@@ -85,7 +109,7 @@ EXPORT_SYMBOL(__register_binfmt);
  void unregister_binfmt(struct linux_binfmt * fmt)
  {
        write_lock(&binfmt_lock);
@@ -50547,7 +49898,7 @@ index 20df02c..1b1d946 100644
        write_unlock(&binfmt_lock);
  }
  
-@@ -180,18 +203,10 @@ static struct page *get_arg_page(struct linux_binprm *bprm, unsigned long pos,
+@@ -180,18 +204,10 @@ static struct page *get_arg_page(struct linux_binprm *bprm, unsigned long pos,
                int write)
  {
        struct page *page;
@@ -50569,7 +49920,7 @@ index 20df02c..1b1d946 100644
                return NULL;
  
        if (write) {
-@@ -207,6 +222,17 @@ static struct page *get_arg_page(struct linux_binprm *bprm, unsigned long pos,
+@@ -207,6 +223,17 @@ static struct page *get_arg_page(struct linux_binprm *bprm, unsigned long pos,
                if (size <= ARG_MAX)
                        return page;
  
@@ -50587,7 +49938,7 @@ index 20df02c..1b1d946 100644
                /*
                 * Limit to 1/4-th the stack size for the argv+env strings.
                 * This ensures that:
-@@ -266,6 +292,11 @@ static int __bprm_mm_init(struct linux_binprm *bprm)
+@@ -266,6 +293,11 @@ static int __bprm_mm_init(struct linux_binprm *bprm)
        vma->vm_end = STACK_TOP_MAX;
        vma->vm_start = vma->vm_end - PAGE_SIZE;
        vma->vm_flags = VM_STACK_FLAGS | VM_STACK_INCOMPLETE_SETUP;
@@ -50599,7 +49950,7 @@ index 20df02c..1b1d946 100644
        vma->vm_page_prot = vm_get_page_prot(vma->vm_flags);
        INIT_LIST_HEAD(&vma->anon_vma_chain);
  
-@@ -276,6 +307,12 @@ static int __bprm_mm_init(struct linux_binprm *bprm)
+@@ -276,6 +308,12 @@ static int __bprm_mm_init(struct linux_binprm *bprm)
        mm->stack_vm = mm->total_vm = 1;
        up_write(&mm->mmap_sem);
        bprm->p = vma->vm_end - sizeof(void *);
@@ -50612,7 +49963,7 @@ index 20df02c..1b1d946 100644
        return 0;
  err:
        up_write(&mm->mmap_sem);
-@@ -396,7 +433,7 @@ struct user_arg_ptr {
+@@ -396,7 +434,7 @@ struct user_arg_ptr {
        } ptr;
  };
  
@@ -50621,7 +49972,7 @@ index 20df02c..1b1d946 100644
  {
        const char __user *native;
  
-@@ -405,14 +442,14 @@ static const char __user *get_user_arg_ptr(struct user_arg_ptr argv, int nr)
+@@ -405,14 +443,14 @@ static const char __user *get_user_arg_ptr(struct user_arg_ptr argv, int nr)
                compat_uptr_t compat;
  
                if (get_user(compat, argv.ptr.compat + nr))
@@ -50638,7 +49989,7 @@ index 20df02c..1b1d946 100644
  
        return native;
  }
-@@ -431,7 +468,7 @@ static int count(struct user_arg_ptr argv, int max)
+@@ -431,7 +469,7 @@ static int count(struct user_arg_ptr argv, int max)
                        if (!p)
                                break;
  
@@ -50647,7 +49998,7 @@ index 20df02c..1b1d946 100644
                                return -EFAULT;
  
                        if (i >= max)
-@@ -466,7 +503,7 @@ static int copy_strings(int argc, struct user_arg_ptr argv,
+@@ -466,7 +504,7 @@ static int copy_strings(int argc, struct user_arg_ptr argv,
  
                ret = -EFAULT;
                str = get_user_arg_ptr(argv, argc);
@@ -50656,7 +50007,7 @@ index 20df02c..1b1d946 100644
                        goto out;
  
                len = strnlen_user(str, MAX_ARG_STRLEN);
-@@ -548,7 +585,7 @@ int copy_strings_kernel(int argc, const char *const *__argv,
+@@ -548,7 +586,7 @@ int copy_strings_kernel(int argc, const char *const *__argv,
        int r;
        mm_segment_t oldfs = get_fs();
        struct user_arg_ptr argv = {
@@ -50665,7 +50016,7 @@ index 20df02c..1b1d946 100644
        };
  
        set_fs(KERNEL_DS);
-@@ -583,7 +620,8 @@ static int shift_arg_pages(struct vm_area_struct *vma, unsigned long shift)
+@@ -583,7 +621,8 @@ static int shift_arg_pages(struct vm_area_struct *vma, unsigned long shift)
        unsigned long new_end = old_end - shift;
        struct mmu_gather tlb;
  
@@ -50675,7 +50026,7 @@ index 20df02c..1b1d946 100644
  
        /*
         * ensure there are no vmas between where we want to go
-@@ -592,6 +630,10 @@ static int shift_arg_pages(struct vm_area_struct *vma, unsigned long shift)
+@@ -592,6 +631,10 @@ static int shift_arg_pages(struct vm_area_struct *vma, unsigned long shift)
        if (vma != find_vma(mm, new_start))
                return -EFAULT;
  
@@ -50686,7 +50037,7 @@ index 20df02c..1b1d946 100644
        /*
         * cover the whole range: [new_start, old_end)
         */
-@@ -672,10 +714,6 @@ int setup_arg_pages(struct linux_binprm *bprm,
+@@ -672,10 +715,6 @@ int setup_arg_pages(struct linux_binprm *bprm,
        stack_top = arch_align_stack(stack_top);
        stack_top = PAGE_ALIGN(stack_top);
  
@@ -50697,7 +50048,7 @@ index 20df02c..1b1d946 100644
        stack_shift = vma->vm_end - stack_top;
  
        bprm->p -= stack_shift;
-@@ -687,8 +725,28 @@ int setup_arg_pages(struct linux_binprm *bprm,
+@@ -687,8 +726,28 @@ int setup_arg_pages(struct linux_binprm *bprm,
        bprm->exec -= stack_shift;
  
        down_write(&mm->mmap_sem);
@@ -50726,7 +50077,7 @@ index 20df02c..1b1d946 100644
        /*
         * Adjust stack execute permissions; explicitly enable for
         * EXSTACK_ENABLE_X, disable for EXSTACK_DISABLE_X and leave alone
-@@ -707,13 +765,6 @@ int setup_arg_pages(struct linux_binprm *bprm,
+@@ -707,13 +766,6 @@ int setup_arg_pages(struct linux_binprm *bprm,
                goto out_unlock;
        BUG_ON(prev != vma);
  
@@ -50740,25 +50091,25 @@ index 20df02c..1b1d946 100644
        /* mprotect_fixup is overkill to remove the temporary stack flags */
        vma->vm_flags &= ~VM_STACK_INCOMPLETE_SETUP;
  
-@@ -737,6 +788,27 @@ int setup_arg_pages(struct linux_binprm *bprm,
+@@ -737,6 +789,27 @@ int setup_arg_pages(struct linux_binprm *bprm,
  #endif
        current->mm->start_stack = bprm->p;
        ret = expand_stack(vma, stack_base);
 +
 +#if !defined(CONFIG_STACK_GROWSUP) && defined(CONFIG_PAX_RANDMMAP)
 +      if (!ret && (mm->pax_flags & MF_PAX_RANDMMAP) && STACK_TOP <= 0xFFFFFFFFU && STACK_TOP > vma->vm_end) {
-+              unsigned long size, flags, vm_flags;
++              unsigned long size;
++              vm_flags_t vm_flags;
 +
 +              size = STACK_TOP - vma->vm_end;
-+              flags = MAP_FIXED | MAP_PRIVATE;
 +              vm_flags = VM_NONE | VM_DONTEXPAND | VM_DONTDUMP;
 +
-+              ret = vma->vm_end != mmap_region(NULL, vma->vm_end, size, flags, vm_flags, 0);
++              ret = vma->vm_end != mmap_region(NULL, vma->vm_end, size, vm_flags, 0);
 +
 +#ifdef CONFIG_X86
 +              if (!ret) {
 +                      size = mmap_min_addr + ((mm->delta_mmap ^ mm->delta_stack) & (0xFFUL << PAGE_SHIFT));
-+                      ret = 0 != mmap_region(NULL, 0, PAGE_ALIGN(size), flags, vm_flags, 0);
++                      ret = 0 != mmap_region(NULL, 0, PAGE_ALIGN(size), vm_flags, 0);
 +              }
 +#endif
 +
@@ -50768,7 +50119,7 @@ index 20df02c..1b1d946 100644
        if (ret)
                ret = -EFAULT;
  
-@@ -772,6 +844,8 @@ struct file *open_exec(const char *name)
+@@ -772,6 +845,8 @@ struct file *open_exec(const char *name)
  
        fsnotify_open(file);
  
@@ -50777,7 +50128,7 @@ index 20df02c..1b1d946 100644
        err = deny_write_access(file);
        if (err)
                goto exit;
-@@ -795,7 +869,7 @@ int kernel_read(struct file *file, loff_t offset,
+@@ -795,7 +870,7 @@ int kernel_read(struct file *file, loff_t offset,
        old_fs = get_fs();
        set_fs(get_ds());
        /* The cast to a user pointer is valid due to the set_fs() */
@@ -50786,7 +50137,7 @@ index 20df02c..1b1d946 100644
        set_fs(old_fs);
        return result;
  }
-@@ -1247,7 +1321,7 @@ static int check_unsafe_exec(struct linux_binprm *bprm)
+@@ -1250,7 +1325,7 @@ static int check_unsafe_exec(struct linux_binprm *bprm)
        }
        rcu_read_unlock();
  
@@ -50795,7 +50146,7 @@ index 20df02c..1b1d946 100644
                bprm->unsafe |= LSM_UNSAFE_SHARE;
        } else {
                res = -EAGAIN;
-@@ -1447,6 +1521,31 @@ int search_binary_handler(struct linux_binprm *bprm)
+@@ -1450,6 +1525,31 @@ int search_binary_handler(struct linux_binprm *bprm)
  
  EXPORT_SYMBOL(search_binary_handler);
  
@@ -50827,7 +50178,7 @@ index 20df02c..1b1d946 100644
  /*
   * sys_execve() executes a new program.
   */
-@@ -1454,6 +1553,11 @@ static int do_execve_common(const char *filename,
+@@ -1457,6 +1557,11 @@ static int do_execve_common(const char *filename,
                                struct user_arg_ptr argv,
                                struct user_arg_ptr envp)
  {
@@ -50839,7 +50190,7 @@ index 20df02c..1b1d946 100644
        struct linux_binprm *bprm;
        struct file *file;
        struct files_struct *displaced;
-@@ -1461,6 +1565,8 @@ static int do_execve_common(const char *filename,
+@@ -1464,6 +1569,8 @@ static int do_execve_common(const char *filename,
        int retval;
        const struct cred *cred = current_cred();
  
@@ -50848,7 +50199,7 @@ index 20df02c..1b1d946 100644
        /*
         * We move the actual failure in case of RLIMIT_NPROC excess from
         * set*uid() to execve() because too many poorly written programs
-@@ -1501,12 +1607,27 @@ static int do_execve_common(const char *filename,
+@@ -1504,12 +1611,27 @@ static int do_execve_common(const char *filename,
        if (IS_ERR(file))
                goto out_unmark;
  
@@ -50868,7 +50219,7 @@ index 20df02c..1b1d946 100644
 +              goto out_file;
 +      }
 +
-+      if (!gr_acl_handle_execve(file->f_dentry, file->f_vfsmnt)) {
++      if (!gr_acl_handle_execve(file->f_path.dentry, file->f_path.mnt)) {
 +              retval = -EACCES;
 +              goto out_file;
 +      }
@@ -50876,7 +50227,7 @@ index 20df02c..1b1d946 100644
        retval = bprm_mm_init(bprm);
        if (retval)
                goto out_file;
-@@ -1523,24 +1644,65 @@ static int do_execve_common(const char *filename,
+@@ -1526,24 +1648,65 @@ static int do_execve_common(const char *filename,
        if (retval < 0)
                goto out;
  
@@ -50906,7 +50257,7 @@ index 20df02c..1b1d946 100644
 +              goto out_fail;
 +      }
 +
-+      retval = gr_set_proc_label(file->f_dentry, file->f_vfsmnt,
++      retval = gr_set_proc_label(file->f_path.dentry, file->f_path.mnt,
 +                                      bprm->unsafe);
 +      if (retval < 0)
 +              goto out_fail;
@@ -50927,7 +50278,7 @@ index 20df02c..1b1d946 100644
 -              goto out;
 +              goto out_fail;
 +
-+      gr_log_chroot_exec(file->f_dentry, file->f_vfsmnt);
++      gr_log_chroot_exec(file->f_path.dentry, file->f_path.mnt);
 +
 +      gr_handle_exec_args(bprm, argv);
  
@@ -50946,7 +50297,7 @@ index 20df02c..1b1d946 100644
        current->fs->in_exec = 0;
        current->in_execve = 0;
        acct_update_integrals(current);
-@@ -1549,6 +1711,14 @@ static int do_execve_common(const char *filename,
+@@ -1552,6 +1715,14 @@ static int do_execve_common(const char *filename,
                put_files_struct(displaced);
        return retval;
  
@@ -50961,7 +50312,7 @@ index 20df02c..1b1d946 100644
  out:
        if (bprm->mm) {
                acct_arg_size(bprm, 0);
-@@ -1697,3 +1867,253 @@ asmlinkage long compat_sys_execve(const char __user * filename,
+@@ -1700,3 +1871,283 @@ asmlinkage long compat_sys_execve(const char __user * filename,
        return error;
  }
  #endif
@@ -51173,6 +50524,29 @@ index 20df02c..1b1d946 100644
 +}
 +#endif
 +
++#ifdef CONFIG_PAX_USERCOPY
++static inline bool check_kernel_text_object(unsigned long low, unsigned long high)
++{
++#if defined(CONFIG_X86_32) && defined(CONFIG_PAX_KERNEXEC)
++      unsigned long textlow = ktla_ktva((unsigned long)_stext);
++#ifdef CONFIG_MODULES
++      unsigned long texthigh = (unsigned long)MODULES_EXEC_VADDR;
++#else
++      unsigned long texthigh = ktla_ktva((unsigned long)_etext);
++#endif
++
++#else
++      unsigned long textlow = _stext;
++      unsigned long texthigh = _etext;        
++#endif
++
++      if (high <= textlow || low > texthigh)
++              return false;
++      else
++              return true;
++}
++#endif
++
 +void __check_object_size(const void *ptr, unsigned long n, bool to_user)
 +{
 +
@@ -51184,9 +50558,16 @@ index 20df02c..1b1d946 100644
 +
 +      type = check_heap_object(ptr, n);
 +      if (!type) {
-+              if (check_stack_object(ptr, n) != -1)
++              int ret = check_stack_object(ptr, n);
++              if (ret == 1 || ret == 2)
 +                      return;
-+              type = "<process stack>";
++              if (ret == 0) {
++                      if (check_kernel_text_object((unsigned long)ptr, (unsigned long)ptr + n))
++                              type = "<kernel text>";
++                      else
++                              return;
++              } else
++                      type = "<process stack>";
 +      }
 +
 +      pax_report_usercopy(ptr, n, to_user, type);
@@ -51216,10 +50597,10 @@ index 20df02c..1b1d946 100644
 +EXPORT_SYMBOL(report_size_overflow);
 +#endif
 diff --git a/fs/ext2/balloc.c b/fs/ext2/balloc.c
-index 2616d0e..2ffdec9 100644
+index 9f9992b..8b59411 100644
 --- a/fs/ext2/balloc.c
 +++ b/fs/ext2/balloc.c
-@@ -1190,10 +1190,10 @@ static int ext2_has_free_blocks(struct ext2_sb_info *sbi)
+@@ -1184,10 +1184,10 @@ static int ext2_has_free_blocks(struct ext2_sb_info *sbi)
  
        free_blocks = percpu_counter_read_positive(&sbi->s_freeblocks_counter);
        root_blocks = le32_to_cpu(sbi->s_es->s_r_blocks_count);
@@ -51265,10 +50646,10 @@ index 92e68b3..115d987 100644
                if (free_clusters >= (nclusters + dirty_clusters))
                        return 1;
 diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
-index bbcd6a0..2824592 100644
+index 3b83cd6..0f34dcd 100644
 --- a/fs/ext4/ext4.h
 +++ b/fs/ext4/ext4.h
-@@ -1265,19 +1265,19 @@ struct ext4_sb_info {
+@@ -1254,19 +1254,19 @@ struct ext4_sb_info {
        unsigned long s_mb_last_start;
  
        /* stats for buddy allocator */
@@ -51299,10 +50680,10 @@ index bbcd6a0..2824592 100644
  
        /* locality groups */
 diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
-index 82f8c2d..ce7c889 100644
+index f3190ab..84ffb21 100644
 --- a/fs/ext4/mballoc.c
 +++ b/fs/ext4/mballoc.c
-@@ -1747,7 +1747,7 @@ void ext4_mb_simple_scan_group(struct ext4_allocation_context *ac,
+@@ -1754,7 +1754,7 @@ void ext4_mb_simple_scan_group(struct ext4_allocation_context *ac,
                BUG_ON(ac->ac_b_ex.fe_len != ac->ac_g_ex.fe_len);
  
                if (EXT4_SB(sb)->s_mb_stats)
@@ -51311,7 +50692,7 @@ index 82f8c2d..ce7c889 100644
  
                break;
        }
-@@ -2044,7 +2044,7 @@ repeat:
+@@ -2059,7 +2059,7 @@ repeat:
                        ac->ac_status = AC_STATUS_CONTINUE;
                        ac->ac_flags |= EXT4_MB_HINT_FIRST;
                        cr = 3;
@@ -51320,7 +50701,7 @@ index 82f8c2d..ce7c889 100644
                        goto repeat;
                }
        }
-@@ -2552,25 +2552,25 @@ int ext4_mb_release(struct super_block *sb)
+@@ -2567,25 +2567,25 @@ int ext4_mb_release(struct super_block *sb)
        if (sbi->s_mb_stats) {
                ext4_msg(sb, KERN_INFO,
                       "mballoc: %u blocks %u reqs (%u success)",
@@ -51356,7 +50737,7 @@ index 82f8c2d..ce7c889 100644
        }
  
        free_percpu(sbi->s_locality_groups);
-@@ -3060,16 +3060,16 @@ static void ext4_mb_collect_stats(struct ext4_allocation_context *ac)
+@@ -3039,16 +3039,16 @@ static void ext4_mb_collect_stats(struct ext4_allocation_context *ac)
        struct ext4_sb_info *sbi = EXT4_SB(ac->ac_sb);
  
        if (sbi->s_mb_stats && ac->ac_g_ex.fe_len > 1) {
@@ -51379,7 +50760,7 @@ index 82f8c2d..ce7c889 100644
        }
  
        if (ac->ac_op == EXT4_MB_HISTORY_ALLOC)
-@@ -3469,7 +3469,7 @@ ext4_mb_new_inode_pa(struct ext4_allocation_context *ac)
+@@ -3448,7 +3448,7 @@ ext4_mb_new_inode_pa(struct ext4_allocation_context *ac)
        trace_ext4_mb_new_inode_pa(ac, pa);
  
        ext4_mb_use_inode_pa(ac, pa);
@@ -51388,7 +50769,7 @@ index 82f8c2d..ce7c889 100644
  
        ei = EXT4_I(ac->ac_inode);
        grp = ext4_get_group_info(sb, ac->ac_b_ex.fe_group);
-@@ -3529,7 +3529,7 @@ ext4_mb_new_group_pa(struct ext4_allocation_context *ac)
+@@ -3508,7 +3508,7 @@ ext4_mb_new_group_pa(struct ext4_allocation_context *ac)
        trace_ext4_mb_new_group_pa(ac, pa);
  
        ext4_mb_use_group_pa(ac, pa);
@@ -51397,7 +50778,7 @@ index 82f8c2d..ce7c889 100644
  
        grp = ext4_get_group_info(sb, ac->ac_b_ex.fe_group);
        lg = ac->ac_lg;
-@@ -3618,7 +3618,7 @@ ext4_mb_release_inode_pa(struct ext4_buddy *e4b, struct buffer_head *bitmap_bh,
+@@ -3597,7 +3597,7 @@ ext4_mb_release_inode_pa(struct ext4_buddy *e4b, struct buffer_head *bitmap_bh,
                 * from the bitmap and continue.
                 */
        }
@@ -51406,7 +50787,7 @@ index 82f8c2d..ce7c889 100644
  
        return err;
  }
-@@ -3636,7 +3636,7 @@ ext4_mb_release_group_pa(struct ext4_buddy *e4b,
+@@ -3615,7 +3615,7 @@ ext4_mb_release_group_pa(struct ext4_buddy *e4b,
        ext4_get_group_no_and_offset(sb, pa->pa_pstart, &group, &bit);
        BUG_ON(group != e4b->bd_group && pa->pa_len != 0);
        mb_free_blocks(pa->pa_inode, e4b, bit, pa->pa_len);
@@ -51416,10 +50797,10 @@ index 82f8c2d..ce7c889 100644
  
        return 0;
 diff --git a/fs/ext4/super.c b/fs/ext4/super.c
-index 24c767d..893aa55 100644
+index febbe0e..782c4fd 100644
 --- a/fs/ext4/super.c
 +++ b/fs/ext4/super.c
-@@ -2429,7 +2429,7 @@ struct ext4_attr {
+@@ -2380,7 +2380,7 @@ struct ext4_attr {
        ssize_t (*store)(struct ext4_attr *, struct ext4_sb_info *,
                         const char *, size_t);
        int offset;
@@ -51429,7 +50810,7 @@ index 24c767d..893aa55 100644
  static int parse_strtoul(const char *buf,
                unsigned long max, unsigned long *value)
 diff --git a/fs/fcntl.c b/fs/fcntl.c
-index 71a600a..20d87b1 100644
+index 6599222..e7bf0de 100644
 --- a/fs/fcntl.c
 +++ b/fs/fcntl.c
 @@ -107,6 +107,11 @@ int __f_setown(struct file *filp, struct pid *pid, enum pid_type type,
@@ -51533,7 +50914,7 @@ index cf6f434..3d7942c 100644
  
  err_nocleanup:
 diff --git a/fs/file.c b/fs/file.c
-index 2b3570b..c57924b 100644
+index 3906d95..5fe379b 100644
 --- a/fs/file.c
 +++ b/fs/file.c
 @@ -16,6 +16,7 @@
@@ -51569,24 +50950,23 @@ index 2b3570b..c57924b 100644
                return -EINVAL;
        err = alloc_fd(from, flags);
 diff --git a/fs/filesystems.c b/fs/filesystems.c
-index da165f6..3671bdb 100644
+index 92567d9..fcd8cbf 100644
 --- a/fs/filesystems.c
 +++ b/fs/filesystems.c
-@@ -273,7 +273,12 @@ struct file_system_type *get_fs_type(const char *name)
+@@ -273,7 +273,11 @@ struct file_system_type *get_fs_type(const char *name)
        int len = dot ? dot - name : strlen(name);
  
        fs = __get_fs_type(name, len);
-+      
 +#ifdef CONFIG_GRKERNSEC_MODHARDEN
-+      if (!fs && (___request_module(true, "grsec_modharden_fs", "%.*s", len, name) == 0))
++      if (!fs && (___request_module(true, "grsec_modharden_fs", "fs-%.*s", len, name) == 0))
 +#else
-       if (!fs && (request_module("%.*s", len, name) == 0))
+       if (!fs && (request_module("fs-%.*s", len, name) == 0))
 +#endif
                fs = __get_fs_type(name, len);
  
        if (dot && fs && !(fs->fs_flags & FS_HAS_SUBTYPE)) {
 diff --git a/fs/fs_struct.c b/fs/fs_struct.c
-index fe6ca58..65318cf 100644
+index d8ac61d..79a36f0 100644
 --- a/fs/fs_struct.c
 +++ b/fs/fs_struct.c
 @@ -4,6 +4,7 @@
@@ -51597,7 +50977,7 @@ index fe6ca58..65318cf 100644
  #include "internal.h"
  
  /*
-@@ -19,6 +20,7 @@ void set_fs_root(struct fs_struct *fs, struct path *path)
+@@ -19,6 +20,7 @@ void set_fs_root(struct fs_struct *fs, const struct path *path)
        write_seqcount_begin(&fs->seq);
        old_root = fs->root;
        fs->root = *path;
@@ -51605,38 +50985,18 @@ index fe6ca58..65318cf 100644
        write_seqcount_end(&fs->seq);
        spin_unlock(&fs->lock);
        if (old_root.dentry)
-@@ -53,6 +55,21 @@ static inline int replace_path(struct path *p, const struct path *old, const str
-       return 1;
- }
-+static inline int replace_root_path(struct task_struct *task, struct path *p, const struct path *old, struct path *new)
-+{
-+      if (likely(p->dentry != old->dentry || p->mnt != old->mnt))
-+              return 0;
-+      *p = *new;
-+
-+      /* This function is only called from pivot_root().  Leave our
-+         gr_chroot_dentry and is_chrooted flags as-is, so that a
-+         pivoted root isn't treated as a chroot
-+      */
-+      //gr_set_chroot_entries(task, new);
-+
-+      return 1;
-+}
-+
- void chroot_fs_refs(struct path *old_root, struct path *new_root)
- {
-       struct task_struct *g, *p;
-@@ -67,7 +84,7 @@ void chroot_fs_refs(struct path *old_root, struct path *new_root)
+@@ -67,6 +69,10 @@ void chroot_fs_refs(const struct path *old_root, const struct path *new_root)
                        int hits = 0;
                        spin_lock(&fs->lock);
                        write_seqcount_begin(&fs->seq);
--                      hits += replace_path(&fs->root, old_root, new_root);
-+                      hits += replace_root_path(p, &fs->root, old_root, new_root);
++                      /* this root replacement is only done by pivot_root,
++                         leave grsec's chroot tagging alone for this task
++                         so that a pivoted root isn't treated as a chroot
++                      */
+                       hits += replace_path(&fs->root, old_root, new_root);
                        hits += replace_path(&fs->pwd, old_root, new_root);
                        write_seqcount_end(&fs->seq);
-                       while (hits--) {
-@@ -99,7 +116,8 @@ void exit_fs(struct task_struct *tsk)
+@@ -99,7 +105,8 @@ void exit_fs(struct task_struct *tsk)
                task_lock(tsk);
                spin_lock(&fs->lock);
                tsk->fs = NULL;
@@ -51646,7 +51006,7 @@ index fe6ca58..65318cf 100644
                spin_unlock(&fs->lock);
                task_unlock(tsk);
                if (kill)
-@@ -112,7 +130,7 @@ struct fs_struct *copy_fs_struct(struct fs_struct *old)
+@@ -112,7 +119,7 @@ struct fs_struct *copy_fs_struct(struct fs_struct *old)
        struct fs_struct *fs = kmem_cache_alloc(fs_cachep, GFP_KERNEL);
        /* We don't need to lock fs - think why ;-) */
        if (fs) {
@@ -51655,7 +51015,7 @@ index fe6ca58..65318cf 100644
                fs->in_exec = 0;
                spin_lock_init(&fs->lock);
                seqcount_init(&fs->seq);
-@@ -121,6 +139,9 @@ struct fs_struct *copy_fs_struct(struct fs_struct *old)
+@@ -121,6 +128,9 @@ struct fs_struct *copy_fs_struct(struct fs_struct *old)
                spin_lock(&old->lock);
                fs->root = old->root;
                path_get(&fs->root);
@@ -51665,7 +51025,7 @@ index fe6ca58..65318cf 100644
                fs->pwd = old->pwd;
                path_get(&fs->pwd);
                spin_unlock(&old->lock);
-@@ -139,8 +160,9 @@ int unshare_fs_struct(void)
+@@ -139,8 +149,9 @@ int unshare_fs_struct(void)
  
        task_lock(current);
        spin_lock(&fs->lock);
@@ -51676,7 +51036,7 @@ index fe6ca58..65318cf 100644
        spin_unlock(&fs->lock);
        task_unlock(current);
  
-@@ -153,13 +175,13 @@ EXPORT_SYMBOL_GPL(unshare_fs_struct);
+@@ -153,13 +164,13 @@ EXPORT_SYMBOL_GPL(unshare_fs_struct);
  
  int current_umask(void)
  {
@@ -51693,7 +51053,7 @@ index fe6ca58..65318cf 100644
        .seq            = SEQCNT_ZERO,
        .umask          = 0022,
 diff --git a/fs/fscache/cookie.c b/fs/fscache/cookie.c
-index 8dcb114..b1072e2 100644
+index e2cba1f..17a25bb 100644
 --- a/fs/fscache/cookie.c
 +++ b/fs/fscache/cookie.c
 @@ -68,11 +68,11 @@ struct fscache_cookie *__fscache_acquire_cookie(
@@ -51761,7 +51121,7 @@ index 8dcb114..b1072e2 100644
                _leave(" = -ENOMEDIUM [no cache]");
                return -ENOMEDIUM;
        }
-@@ -256,12 +256,12 @@ static int fscache_alloc_object(struct fscache_cache *cache,
+@@ -255,12 +255,12 @@ static int fscache_alloc_object(struct fscache_cache *cache,
        object = cache->ops->alloc_object(cache, cookie);
        fscache_stat_d(&fscache_n_cop_alloc_object);
        if (IS_ERR(object)) {
@@ -51776,7 +51136,7 @@ index 8dcb114..b1072e2 100644
  
        object->debug_id = atomic_inc_return(&fscache_object_debug_id);
  
-@@ -378,7 +378,7 @@ void __fscache_invalidate(struct fscache_cookie *cookie)
+@@ -376,7 +376,7 @@ void __fscache_invalidate(struct fscache_cookie *cookie)
  
        _enter("{%s}", cookie->def->name);
  
@@ -51785,9 +51145,9 @@ index 8dcb114..b1072e2 100644
  
        /* Only permit invalidation of data files.  Invalidating an index will
         * require the caller to release all its attachments to the tree rooted
-@@ -437,10 +437,10 @@ void __fscache_update_cookie(struct fscache_cookie *cookie)
+@@ -434,10 +434,10 @@ void __fscache_update_cookie(struct fscache_cookie *cookie)
+ {
        struct fscache_object *object;
-       struct hlist_node *_p;
  
 -      fscache_stat(&fscache_n_updates);
 +      fscache_stat_unchecked(&fscache_n_updates);
@@ -51798,7 +51158,7 @@ index 8dcb114..b1072e2 100644
                _leave(" [no cookie]");
                return;
        }
-@@ -474,12 +474,12 @@ void __fscache_relinquish_cookie(struct fscache_cookie *cookie, int retire)
+@@ -471,12 +471,12 @@ void __fscache_relinquish_cookie(struct fscache_cookie *cookie, int retire)
        struct fscache_object *object;
        unsigned long event;
  
@@ -51814,7 +51174,7 @@ index 8dcb114..b1072e2 100644
                _leave(" [no cookie]");
                return;
        }
-@@ -495,7 +495,7 @@ void __fscache_relinquish_cookie(struct fscache_cookie *cookie, int retire)
+@@ -492,7 +492,7 @@ void __fscache_relinquish_cookie(struct fscache_cookie *cookie, int retire)
  
        /* wait for the cookie to finish being instantiated (or to fail) */
        if (test_bit(FSCACHE_COOKIE_CREATING, &cookie->flags)) {
@@ -52683,7 +52043,7 @@ index ff000e5..c44ec6d 100644
  
        _debug("- mark %p{%lx}", page, page->index);
 diff --git a/fs/fscache/stats.c b/fs/fscache/stats.c
-index 8179e8b..5072cc7 100644
+index 40d13c7..ddf52b9 100644
 --- a/fs/fscache/stats.c
 +++ b/fs/fscache/stats.c
 @@ -18,99 +18,99 @@
@@ -53065,10 +52425,10 @@ index 8179e8b..5072cc7 100644
        seq_printf(m, "CacheOp: alo=%d luo=%d luc=%d gro=%d\n",
                   atomic_read(&fscache_n_cop_alloc_object),
 diff --git a/fs/fuse/cuse.c b/fs/fuse/cuse.c
-index e397b67..b0d8709 100644
+index 6f96a8d..6019bb9 100644
 --- a/fs/fuse/cuse.c
 +++ b/fs/fuse/cuse.c
-@@ -593,10 +593,12 @@ static int __init cuse_init(void)
+@@ -597,10 +597,12 @@ static int __init cuse_init(void)
                INIT_LIST_HEAD(&cuse_conntbl[i]);
  
        /* inherit and extend fuse_dev_operations */
@@ -53086,10 +52446,10 @@ index e397b67..b0d8709 100644
        cuse_class = class_create(THIS_MODULE, "cuse");
        if (IS_ERR(cuse_class))
 diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c
-index e83351a..41e3c9c 100644
+index 11dfa0c..6f64416 100644
 --- a/fs/fuse/dev.c
 +++ b/fs/fuse/dev.c
-@@ -1236,7 +1236,7 @@ static ssize_t fuse_dev_splice_read(struct file *in, loff_t *ppos,
+@@ -1294,7 +1294,7 @@ static ssize_t fuse_dev_splice_read(struct file *in, loff_t *ppos,
        ret = 0;
        pipe_lock(pipe);
  
@@ -53099,10 +52459,10 @@ index e83351a..41e3c9c 100644
                if (!ret)
                        ret = -EPIPE;
 diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c
-index 315e1f8..91f890c 100644
+index ff15522..092a0f6 100644
 --- a/fs/fuse/dir.c
 +++ b/fs/fuse/dir.c
-@@ -1233,7 +1233,7 @@ static char *read_link(struct dentry *dentry)
+@@ -1409,7 +1409,7 @@ static char *read_link(struct dentry *dentry)
        return link;
  }
  
@@ -53112,10 +52472,10 @@ index 315e1f8..91f890c 100644
        if (!IS_ERR(link))
                free_page((unsigned long) link);
 diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c
-index 2b6f569..fcb4d1f 100644
+index cc00bd1..3edb692 100644
 --- a/fs/gfs2/inode.c
 +++ b/fs/gfs2/inode.c
-@@ -1499,7 +1499,7 @@ out:
+@@ -1500,7 +1500,7 @@ out:
  
  static void gfs2_put_link(struct dentry *dentry, struct nameidata *nd, void *p)
  {
@@ -53125,7 +52485,7 @@ index 2b6f569..fcb4d1f 100644
                kfree(s);
  }
 diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c
-index 78bde32..767e906 100644
+index a3f868a..bb308ae 100644
 --- a/fs/hugetlbfs/inode.c
 +++ b/fs/hugetlbfs/inode.c
 @@ -152,6 +152,7 @@ hugetlb_get_unmapped_area(struct file *file, unsigned long addr,
@@ -53165,9 +52525,9 @@ index 78bde32..767e906 100644
        info.high_limit = TASK_SIZE;
        info.align_mask = PAGE_MASK & ~huge_page_mask(h);
        info.align_offset = 0;
-@@ -897,7 +907,7 @@ static struct file_system_type hugetlbfs_fs_type = {
-       .kill_sb        = kill_litter_super,
+@@ -898,7 +908,7 @@ static struct file_system_type hugetlbfs_fs_type = {
  };
+ MODULE_ALIAS_FS("hugetlbfs");
  
 -static struct vfsmount *hugetlbfs_vfsmount[HUGE_MAX_HSTATE];
 +struct vfsmount *hugetlbfs_vfsmount[HUGE_MAX_HSTATE];
@@ -53175,10 +52535,10 @@ index 78bde32..767e906 100644
  static int can_do_hugetlb_shm(void)
  {
 diff --git a/fs/inode.c b/fs/inode.c
-index 14084b7..29af1d9 100644
+index a898b3d..9b5a214 100644
 --- a/fs/inode.c
 +++ b/fs/inode.c
-@@ -880,8 +880,8 @@ unsigned int get_next_ino(void)
+@@ -878,8 +878,8 @@ unsigned int get_next_ino(void)
  
  #ifdef CONFIG_SMP
        if (unlikely((res & (LAST_INO_BATCH-1)) == 0)) {
@@ -53218,28 +52578,10 @@ index a6597d6..41b30ec 100644
  
  /*
 diff --git a/fs/jfs/super.c b/fs/jfs/super.c
-index 1a543be..a4e1363 100644
+index 2003e83..40db287 100644
 --- a/fs/jfs/super.c
 +++ b/fs/jfs/super.c
-@@ -225,7 +225,7 @@ static const match_table_t tokens = {
- static int parse_options(char *options, struct super_block *sb, s64 *newLVSize,
-                        int *flag)
- {
--      void *nls_map = (void *)-1;     /* -1: no change;  NULL: none */
-+      const void *nls_map = (const void *)-1; /* -1: no change;  NULL: none */
-       char *p;
-       struct jfs_sb_info *sbi = JFS_SBI(sb);
-@@ -253,7 +253,7 @@ static int parse_options(char *options, struct super_block *sb, s64 *newLVSize,
-                       /* Don't do anything ;-) */
-                       break;
-               case Opt_iocharset:
--                      if (nls_map && nls_map != (void *) -1)
-+                      if (nls_map && nls_map != (const void *) -1)
-                               unload_nls(nls_map);
-                       if (!strcmp(args[0].from, "none"))
-                               nls_map = NULL;
-@@ -855,7 +855,7 @@ static int __init init_jfs_fs(void)
+@@ -856,7 +856,7 @@ static int __init init_jfs_fs(void)
  
        jfs_inode_cachep =
            kmem_cache_create("jfs_ip", sizeof(struct jfs_inode_info), 0,
@@ -53277,7 +52619,7 @@ index 916da8c..1588998 100644
                                            next->d_inode->i_ino, 
                                            dt_type(next->d_inode)) < 0)
 diff --git a/fs/lockd/clntproc.c b/fs/lockd/clntproc.c
-index 52e5120..808936e 100644
+index 9760ecb..9b838ef 100644
 --- a/fs/lockd/clntproc.c
 +++ b/fs/lockd/clntproc.c
 @@ -36,11 +36,11 @@ static const struct rpc_call_ops nlmclnt_cancel_ops;
@@ -53295,7 +52637,7 @@ index 52e5120..808936e 100644
        memcpy(c->data, &cookie, 4);
        c->len=4;
 diff --git a/fs/locks.c b/fs/locks.c
-index a94e331..060bce3 100644
+index cb424a4..850e4dd 100644
 --- a/fs/locks.c
 +++ b/fs/locks.c
 @@ -2064,16 +2064,16 @@ void locks_remove_flock(struct file *filp)
@@ -53320,7 +52662,7 @@ index a94e331..060bce3 100644
  
        lock_flocks();
 diff --git a/fs/namei.c b/fs/namei.c
-index ec97aef..e67718d 100644
+index 85e40d1..b66744e 100644
 --- a/fs/namei.c
 +++ b/fs/namei.c
 @@ -319,16 +319,32 @@ int generic_permission(struct inode *inode, int mask)
@@ -53374,7 +52716,7 @@ index ec97aef..e67718d 100644
        return -EACCES;
  }
  
-@@ -824,7 +832,7 @@ follow_link(struct path *link, struct nameidata *nd, void **p)
+@@ -820,7 +828,7 @@ follow_link(struct path *link, struct nameidata *nd, void **p)
  {
        struct dentry *dentry = link->dentry;
        int error;
@@ -53383,7 +52725,7 @@ index ec97aef..e67718d 100644
  
        BUG_ON(nd->flags & LOOKUP_RCU);
  
-@@ -845,6 +853,12 @@ follow_link(struct path *link, struct nameidata *nd, void **p)
+@@ -841,6 +849,12 @@ follow_link(struct path *link, struct nameidata *nd, void **p)
        if (error)
                goto out_put_nd_path;
  
@@ -53396,16 +52738,16 @@ index ec97aef..e67718d 100644
        nd->last_type = LAST_BIND;
        *p = dentry->d_inode->i_op->follow_link(dentry, nd);
        error = PTR_ERR(*p);
-@@ -1594,6 +1608,8 @@ static inline int nested_symlink(struct path *path, struct nameidata *nd)
+@@ -1588,6 +1602,8 @@ static inline int nested_symlink(struct path *path, struct nameidata *nd)
+               if (res)
                        break;
-               res = walk_component(nd, path, &nd->last,
-                                    nd->last_type, LOOKUP_FOLLOW);
+               res = walk_component(nd, path, LOOKUP_FOLLOW);
 +              if (res >= 0 && gr_handle_symlink_owner(&link, nd->inode))
 +                      res = -EACCES;
                put_link(nd, &link, cookie);
        } while (res > 0);
  
-@@ -1692,7 +1708,7 @@ EXPORT_SYMBOL(full_name_hash);
+@@ -1686,7 +1702,7 @@ EXPORT_SYMBOL(full_name_hash);
  static inline unsigned long hash_name(const char *name, unsigned int *hashp)
  {
        unsigned long a, b, adata, bdata, mask, hash, len;
@@ -53414,7 +52756,7 @@ index ec97aef..e67718d 100644
  
        hash = a = 0;
        len = -sizeof(unsigned long);
-@@ -1977,6 +1993,8 @@ static int path_lookupat(int dfd, const char *name,
+@@ -1968,6 +1984,8 @@ static int path_lookupat(int dfd, const char *name,
                        if (err)
                                break;
                        err = lookup_last(nd, &path);
@@ -53423,7 +52765,7 @@ index ec97aef..e67718d 100644
                        put_link(nd, &link, cookie);
                }
        }
-@@ -1984,6 +2002,13 @@ static int path_lookupat(int dfd, const char *name,
+@@ -1975,6 +1993,13 @@ static int path_lookupat(int dfd, const char *name,
        if (!err)
                err = complete_walk(nd);
  
@@ -53437,7 +52779,7 @@ index ec97aef..e67718d 100644
        if (!err && nd->flags & LOOKUP_DIRECTORY) {
                if (!nd->inode->i_op->lookup) {
                        path_put(&nd->path);
-@@ -2011,8 +2036,15 @@ static int filename_lookup(int dfd, struct filename *name,
+@@ -2002,8 +2027,15 @@ static int filename_lookup(int dfd, struct filename *name,
                retval = path_lookupat(dfd, name->name,
                                                flags | LOOKUP_REVAL, nd);
  
@@ -53454,7 +52796,7 @@ index ec97aef..e67718d 100644
        return retval;
  }
  
-@@ -2390,6 +2422,13 @@ static int may_open(struct path *path, int acc_mode, int flag)
+@@ -2381,6 +2413,13 @@ static int may_open(struct path *path, int acc_mode, int flag)
        if (flag & O_NOATIME && !inode_owner_or_capable(inode))
                return -EPERM;
  
@@ -53468,7 +52810,7 @@ index ec97aef..e67718d 100644
        return 0;
  }
  
-@@ -2611,7 +2650,7 @@ looked_up:
+@@ -2602,7 +2641,7 @@ looked_up:
   * cleared otherwise prior to returning.
   */
  static int lookup_open(struct nameidata *nd, struct path *path,
@@ -53477,7 +52819,7 @@ index ec97aef..e67718d 100644
                        const struct open_flags *op,
                        bool got_write, int *opened)
  {
-@@ -2646,6 +2685,17 @@ static int lookup_open(struct nameidata *nd, struct path *path,
+@@ -2637,6 +2676,17 @@ static int lookup_open(struct nameidata *nd, struct path *path,
        /* Negative dentry, just create the file */
        if (!dentry->d_inode && (op->open_flag & O_CREAT)) {
                umode_t mode = op->mode;
@@ -53495,7 +52837,7 @@ index ec97aef..e67718d 100644
                if (!IS_POSIXACL(dir->d_inode))
                        mode &= ~current_umask();
                /*
-@@ -2667,6 +2717,8 @@ static int lookup_open(struct nameidata *nd, struct path *path,
+@@ -2658,6 +2708,8 @@ static int lookup_open(struct nameidata *nd, struct path *path,
                                   nd->flags & LOOKUP_EXCL);
                if (error)
                        goto out_dput;
@@ -53504,7 +52846,7 @@ index ec97aef..e67718d 100644
        }
  out_no_open:
        path->dentry = dentry;
-@@ -2681,7 +2733,7 @@ out_dput:
+@@ -2672,7 +2724,7 @@ out_dput:
  /*
   * Handle the last step of open()
   */
@@ -53513,7 +52855,7 @@ index ec97aef..e67718d 100644
                   struct file *file, const struct open_flags *op,
                   int *opened, struct filename *name)
  {
-@@ -2710,16 +2762,32 @@ static int do_last(struct nameidata *nd, struct path *path,
+@@ -2701,16 +2753,32 @@ static int do_last(struct nameidata *nd, struct path *path,
                error = complete_walk(nd);
                if (error)
                        return error;
@@ -53546,7 +52888,7 @@ index ec97aef..e67718d 100644
                audit_inode(name, dir, 0);
                goto finish_open;
        }
-@@ -2768,7 +2836,7 @@ retry_lookup:
+@@ -2759,7 +2827,7 @@ retry_lookup:
                 */
        }
        mutex_lock(&dir->d_inode->i_mutex);
@@ -53555,7 +52897,7 @@ index ec97aef..e67718d 100644
        mutex_unlock(&dir->d_inode->i_mutex);
  
        if (error <= 0) {
-@@ -2792,11 +2860,28 @@ retry_lookup:
+@@ -2783,11 +2851,28 @@ retry_lookup:
                goto finish_open_created;
        }
  
@@ -53585,7 +52927,7 @@ index ec97aef..e67718d 100644
  
        /*
         * If atomic_open() acquired write access it is dropped now due to
-@@ -2837,6 +2922,11 @@ finish_lookup:
+@@ -2828,6 +2913,11 @@ finish_lookup:
                        }
                }
                BUG_ON(inode != path->dentry->d_inode);
@@ -53597,7 +52939,7 @@ index ec97aef..e67718d 100644
                return 1;
        }
  
-@@ -2846,7 +2936,6 @@ finish_lookup:
+@@ -2837,7 +2927,6 @@ finish_lookup:
                save_parent.dentry = nd->path.dentry;
                save_parent.mnt = mntget(path->mnt);
                nd->path.dentry = path->dentry;
@@ -53605,7 +52947,7 @@ index ec97aef..e67718d 100644
        }
        nd->inode = inode;
        /* Why this, you ask?  _Now_ we might have grown LOOKUP_JUMPED... */
-@@ -2855,6 +2944,16 @@ finish_lookup:
+@@ -2846,6 +2935,16 @@ finish_lookup:
                path_put(&save_parent);
                return error;
        }
@@ -53622,7 +52964,7 @@ index ec97aef..e67718d 100644
        error = -EISDIR;
        if ((open_flag & O_CREAT) && S_ISDIR(nd->inode->i_mode))
                goto out;
-@@ -2953,7 +3052,7 @@ static struct file *path_openat(int dfd, struct filename *pathname,
+@@ -2944,7 +3043,7 @@ static struct file *path_openat(int dfd, struct filename *pathname,
        if (unlikely(error))
                goto out;
  
@@ -53631,7 +52973,7 @@ index ec97aef..e67718d 100644
        while (unlikely(error > 0)) { /* trailing symlink */
                struct path link = path;
                void *cookie;
-@@ -2971,7 +3070,7 @@ static struct file *path_openat(int dfd, struct filename *pathname,
+@@ -2962,7 +3061,7 @@ static struct file *path_openat(int dfd, struct filename *pathname,
                error = follow_link(&link, nd, &cookie);
                if (unlikely(error))
                        break;
@@ -53640,7 +52982,7 @@ index ec97aef..e67718d 100644
                put_link(nd, &link, cookie);
        }
  out:
-@@ -3071,8 +3170,12 @@ struct dentry *kern_path_create(int dfd, const char *pathname,
+@@ -3062,8 +3161,12 @@ struct dentry *kern_path_create(int dfd, const char *pathname,
                goto unlock;
  
        error = -EEXIST;
@@ -53654,7 +52996,7 @@ index ec97aef..e67718d 100644
        /*
         * Special case - lookup gave negative, but... we had foo/bar/
         * From the vfs_mknod() POV we just have a negative dentry -
-@@ -3124,6 +3227,20 @@ struct dentry *user_path_create(int dfd, const char __user *pathname,
+@@ -3115,6 +3218,20 @@ struct dentry *user_path_create(int dfd, const char __user *pathname,
  }
  EXPORT_SYMBOL(user_path_create);
  
@@ -53675,7 +53017,7 @@ index ec97aef..e67718d 100644
  int vfs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, dev_t dev)
  {
        int error = may_create(dir, dentry);
-@@ -3186,6 +3303,17 @@ retry:
+@@ -3177,6 +3294,17 @@ retry:
  
        if (!IS_POSIXACL(path.dentry->d_inode))
                mode &= ~current_umask();
@@ -53693,7 +53035,7 @@ index ec97aef..e67718d 100644
        error = security_path_mknod(&path, dentry, mode, dev);
        if (error)
                goto out;
-@@ -3202,6 +3330,8 @@ retry:
+@@ -3193,6 +3321,8 @@ retry:
                        break;
        }
  out:
@@ -53702,7 +53044,7 @@ index ec97aef..e67718d 100644
        done_path_create(&path, dentry);
        if (retry_estale(error, lookup_flags)) {
                lookup_flags |= LOOKUP_REVAL;
-@@ -3254,9 +3384,16 @@ retry:
+@@ -3245,9 +3375,16 @@ retry:
  
        if (!IS_POSIXACL(path.dentry->d_inode))
                mode &= ~current_umask();
@@ -53719,7 +53061,7 @@ index ec97aef..e67718d 100644
        done_path_create(&path, dentry);
        if (retry_estale(error, lookup_flags)) {
                lookup_flags |= LOOKUP_REVAL;
-@@ -3337,6 +3474,8 @@ static long do_rmdir(int dfd, const char __user *pathname)
+@@ -3328,6 +3465,8 @@ static long do_rmdir(int dfd, const char __user *pathname)
        struct filename *name;
        struct dentry *dentry;
        struct nameidata nd;
@@ -53728,7 +53070,7 @@ index ec97aef..e67718d 100644
        unsigned int lookup_flags = 0;
  retry:
        name = user_path_parent(dfd, pathname, &nd, lookup_flags);
-@@ -3369,10 +3508,21 @@ retry:
+@@ -3360,10 +3499,21 @@ retry:
                error = -ENOENT;
                goto exit3;
        }
@@ -53750,7 +53092,7 @@ index ec97aef..e67718d 100644
  exit3:
        dput(dentry);
  exit2:
-@@ -3438,6 +3588,8 @@ static long do_unlinkat(int dfd, const char __user *pathname)
+@@ -3429,6 +3579,8 @@ static long do_unlinkat(int dfd, const char __user *pathname)
        struct dentry *dentry;
        struct nameidata nd;
        struct inode *inode = NULL;
@@ -53759,7 +53101,7 @@ index ec97aef..e67718d 100644
        unsigned int lookup_flags = 0;
  retry:
        name = user_path_parent(dfd, pathname, &nd, lookup_flags);
-@@ -3464,10 +3616,22 @@ retry:
+@@ -3455,10 +3607,22 @@ retry:
                if (!inode)
                        goto slashes;
                ihold(inode);
@@ -53782,7 +53124,7 @@ index ec97aef..e67718d 100644
  exit2:
                dput(dentry);
        }
-@@ -3545,9 +3709,17 @@ retry:
+@@ -3536,9 +3700,17 @@ retry:
        if (IS_ERR(dentry))
                goto out_putname;
  
@@ -53800,7 +53142,7 @@ index ec97aef..e67718d 100644
        done_path_create(&path, dentry);
        if (retry_estale(error, lookup_flags)) {
                lookup_flags |= LOOKUP_REVAL;
-@@ -3621,6 +3793,7 @@ SYSCALL_DEFINE5(linkat, int, olddfd, const char __user *, oldname,
+@@ -3612,6 +3784,7 @@ SYSCALL_DEFINE5(linkat, int, olddfd, const char __user *, oldname,
  {
        struct dentry *new_dentry;
        struct path old_path, new_path;
@@ -53808,7 +53150,7 @@ index ec97aef..e67718d 100644
        int how = 0;
        int error;
  
-@@ -3644,7 +3817,7 @@ retry:
+@@ -3635,7 +3808,7 @@ retry:
        if (error)
                return error;
  
@@ -53817,7 +53159,7 @@ index ec97aef..e67718d 100644
                                        (how & LOOKUP_REVAL));
        error = PTR_ERR(new_dentry);
        if (IS_ERR(new_dentry))
-@@ -3656,11 +3829,28 @@ retry:
+@@ -3647,11 +3820,28 @@ retry:
        error = may_linkat(&old_path);
        if (unlikely(error))
                goto out_dput;
@@ -53846,7 +53188,7 @@ index ec97aef..e67718d 100644
        done_path_create(&new_path, new_dentry);
        if (retry_estale(error, how)) {
                how |= LOOKUP_REVAL;
-@@ -3906,12 +4096,21 @@ retry:
+@@ -3897,12 +4087,21 @@ retry:
        if (new_dentry == trap)
                goto exit5;
  
@@ -53868,7 +53210,7 @@ index ec97aef..e67718d 100644
  exit5:
        dput(new_dentry);
  exit4:
-@@ -3943,6 +4142,8 @@ SYSCALL_DEFINE2(rename, const char __user *, oldname, const char __user *, newna
+@@ -3934,6 +4133,8 @@ SYSCALL_DEFINE2(rename, const char __user *, oldname, const char __user *, newna
  
  int vfs_readlink(struct dentry *dentry, char __user *buffer, int buflen, const char *link)
  {
@@ -53877,7 +53219,7 @@ index ec97aef..e67718d 100644
        int len;
  
        len = PTR_ERR(link);
-@@ -3952,7 +4153,14 @@ int vfs_readlink(struct dentry *dentry, char __user *buffer, int buflen, const c
+@@ -3943,7 +4144,14 @@ int vfs_readlink(struct dentry *dentry, char __user *buffer, int buflen, const c
        len = strlen(link);
        if (len > (unsigned) buflen)
                len = buflen;
@@ -53894,7 +53236,7 @@ index ec97aef..e67718d 100644
  out:
        return len;
 diff --git a/fs/namespace.c b/fs/namespace.c
-index 5dd7709..0002ebe 100644
+index e945b81..1dd8104 100644
 --- a/fs/namespace.c
 +++ b/fs/namespace.c
 @@ -1219,6 +1219,9 @@ static int do_umount(struct mount *mnt, int flags)
@@ -53917,7 +53259,7 @@ index 5dd7709..0002ebe 100644
        return retval;
  }
  
-@@ -2294,6 +2300,16 @@ long do_mount(const char *dev_name, const char *dir_name,
+@@ -2267,6 +2273,16 @@ long do_mount(const char *dev_name, const char *dir_name,
                   MS_NOATIME | MS_NODIRATIME | MS_RELATIME| MS_KERNMOUNT |
                   MS_STRICTATIME);
  
@@ -53934,7 +53276,7 @@ index 5dd7709..0002ebe 100644
        if (flags & MS_REMOUNT)
                retval = do_remount(&path, flags & ~MS_REMOUNT, mnt_flags,
                                    data_page);
-@@ -2308,6 +2324,9 @@ long do_mount(const char *dev_name, const char *dir_name,
+@@ -2281,6 +2297,9 @@ long do_mount(const char *dev_name, const char *dir_name,
                                      dev_name, data_page);
  dput_out:
        path_put(&path);
@@ -53944,7 +53286,7 @@ index 5dd7709..0002ebe 100644
        return retval;
  }
  
-@@ -2594,6 +2613,11 @@ SYSCALL_DEFINE2(pivot_root, const char __user *, new_root,
+@@ -2567,6 +2586,11 @@ SYSCALL_DEFINE2(pivot_root, const char __user *, new_root,
        if (error)
                goto out2;
  
@@ -53956,7 +53298,7 @@ index 5dd7709..0002ebe 100644
        get_fs_root(current->fs, &root);
        error = lock_mount(&old);
        if (error)
-@@ -2842,7 +2866,7 @@ static int mntns_install(struct nsproxy *nsproxy, void *ns)
+@@ -2815,7 +2839,7 @@ static int mntns_install(struct nsproxy *nsproxy, void *ns)
            !nsown_capable(CAP_SYS_ADMIN))
                return -EPERM;
  
@@ -53979,10 +53321,10 @@ index 59461c9..b17c57e 100644
  static struct callback_op callback_ops[];
  
 diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
-index ebeb94c..ff35337 100644
+index 1f94167..79c4ce4 100644
 --- a/fs/nfs/inode.c
 +++ b/fs/nfs/inode.c
-@@ -1042,16 +1042,16 @@ static int nfs_size_need_update(const struct inode *inode, const struct nfs_fatt
+@@ -1041,16 +1041,16 @@ static int nfs_size_need_update(const struct inode *inode, const struct nfs_fatt
        return nfs_size_to_loff_t(fattr->size) > i_size_read(inode);
  }
  
@@ -54003,10 +53345,10 @@ index ebeb94c..ff35337 100644
  
  void nfs_fattr_init(struct nfs_fattr *fattr)
 diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
-index 9d1c5db..1e13db8 100644
+index d401d01..10b3e62 100644
 --- a/fs/nfsd/nfs4proc.c
 +++ b/fs/nfsd/nfs4proc.c
-@@ -1097,7 +1097,7 @@ struct nfsd4_operation {
+@@ -1109,7 +1109,7 @@ struct nfsd4_operation {
        nfsd4op_rsize op_rsize_bop;
        stateid_getter op_get_currentstateid;
        stateid_setter op_set_currentstateid;
@@ -54016,10 +53358,10 @@ index 9d1c5db..1e13db8 100644
  static struct nfsd4_operation nfsd4_ops[];
  
 diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
-index d1dd710..32ac0e8 100644
+index 6eb0dc5..29067a9 100644
 --- a/fs/nfsd/nfs4xdr.c
 +++ b/fs/nfsd/nfs4xdr.c
-@@ -1456,7 +1456,7 @@ nfsd4_decode_notsupp(struct nfsd4_compoundargs *argp, void *p)
+@@ -1457,7 +1457,7 @@ nfsd4_decode_notsupp(struct nfsd4_compoundargs *argp, void *p)
  
  typedef __be32(*nfsd4_dec)(struct nfsd4_compoundargs *argp, void *);
  
@@ -54028,7 +53370,7 @@ index d1dd710..32ac0e8 100644
        [OP_ACCESS]             = (nfsd4_dec)nfsd4_decode_access,
        [OP_CLOSE]              = (nfsd4_dec)nfsd4_decode_close,
        [OP_COMMIT]             = (nfsd4_dec)nfsd4_decode_commit,
-@@ -1496,7 +1496,7 @@ static nfsd4_dec nfsd4_dec_ops[] = {
+@@ -1497,7 +1497,7 @@ static nfsd4_dec nfsd4_dec_ops[] = {
        [OP_RELEASE_LOCKOWNER]  = (nfsd4_dec)nfsd4_decode_release_lockowner,
  };
  
@@ -54037,7 +53379,7 @@ index d1dd710..32ac0e8 100644
        [OP_ACCESS]             = (nfsd4_dec)nfsd4_decode_access,
        [OP_CLOSE]              = (nfsd4_dec)nfsd4_decode_close,
        [OP_COMMIT]             = (nfsd4_dec)nfsd4_decode_commit,
-@@ -1558,7 +1558,7 @@ static nfsd4_dec nfsd41_dec_ops[] = {
+@@ -1559,7 +1559,7 @@ static nfsd4_dec nfsd41_dec_ops[] = {
  };
  
  struct nfsd4_minorversion_ops {
@@ -54046,8 +53388,31 @@ index d1dd710..32ac0e8 100644
        int nops;
  };
  
+diff --git a/fs/nfsd/nfscache.c b/fs/nfsd/nfscache.c
+index ca05f6d..411a576 100644
+--- a/fs/nfsd/nfscache.c
++++ b/fs/nfsd/nfscache.c
+@@ -461,13 +461,15 @@ nfsd_cache_update(struct svc_rqst *rqstp, int cachetype, __be32 *statp)
+ {
+       struct svc_cacherep *rp = rqstp->rq_cacherep;
+       struct kvec     *resv = &rqstp->rq_res.head[0], *cachv;
+-      int             len;
++      long            len;
+       if (!rp)
+               return;
+-      len = resv->iov_len - ((char*)statp - (char*)resv->iov_base);
+-      len >>= 2;
++      if (statp) {
++              len = resv->iov_len - ((char*)statp - (char*)resv->iov_base);
++              len >>= 2;
++      }
+       /* Don't cache excessive amounts of data and XDR failures */
+       if (!statp || len > (256 >> 2)) {
 diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c
-index 69c6413..c0408d2 100644
+index 2b2e239..c915b48 100644
 --- a/fs/nfsd/vfs.c
 +++ b/fs/nfsd/vfs.c
 @@ -939,7 +939,7 @@ nfsd_vfs_read(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file *file,
@@ -54161,7 +53526,7 @@ index e7bc1d7..06bd4bb 100644
        }
  
 diff --git a/fs/notify/fanotify/fanotify_user.c b/fs/notify/fanotify/fanotify_user.c
-index 9ff4a5e..deb1f0f 100644
+index 5d84442..bf24453 100644
 --- a/fs/notify/fanotify/fanotify_user.c
 +++ b/fs/notify/fanotify/fanotify_user.c
 @@ -251,8 +251,8 @@ static ssize_t copy_event_to_user(struct fsnotify_group *group,
@@ -54198,7 +53563,7 @@ index 7b51b05..5ea5ef6 100644
  EXPORT_SYMBOL_GPL(fsnotify_get_cookie);
  
 diff --git a/fs/ntfs/dir.c b/fs/ntfs/dir.c
-index 99e3610..02c1068 100644
+index aa411c3..c260a84 100644
 --- a/fs/ntfs/dir.c
 +++ b/fs/ntfs/dir.c
 @@ -1329,7 +1329,7 @@ find_next_index_buffer:
@@ -54224,10 +53589,10 @@ index 5b2d4f0..c6de396 100644
 -const struct inode_operations ntfs_empty_inode_ops = {};
 +const struct inode_operations ntfs_empty_inode_ops __read_only;
 diff --git a/fs/ocfs2/localalloc.c b/fs/ocfs2/localalloc.c
-index a9f78c7..ed8a381 100644
+index aebeacd..0dcdd26 100644
 --- a/fs/ocfs2/localalloc.c
 +++ b/fs/ocfs2/localalloc.c
-@@ -1279,7 +1279,7 @@ static int ocfs2_local_alloc_slide_window(struct ocfs2_super *osb,
+@@ -1278,7 +1278,7 @@ static int ocfs2_local_alloc_slide_window(struct ocfs2_super *osb,
                goto bail;
        }
  
@@ -54316,7 +53681,7 @@ index b7e74b5..19c6536 100644
                }
        }
 diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c
-index 0e91ec2..f4b3fc6 100644
+index 01b8516..579c4df 100644
 --- a/fs/ocfs2/super.c
 +++ b/fs/ocfs2/super.c
 @@ -301,11 +301,11 @@ static int ocfs2_osb_dump(struct ocfs2_super *osb, char *buf, int len)
@@ -54336,7 +53701,7 @@ index 0e91ec2..f4b3fc6 100644
  
        out += snprintf(buf + out, len - out,
                        "%10s => State: %u  Descriptor: %llu  Size: %u bits  "
-@@ -2121,11 +2121,11 @@ static int ocfs2_initialize_super(struct super_block *sb,
+@@ -2122,11 +2122,11 @@ static int ocfs2_initialize_super(struct super_block *sb,
        spin_lock_init(&osb->osb_xattr_lock);
        ocfs2_init_steal_slots(osb);
  
@@ -54354,19 +53719,19 @@ index 0e91ec2..f4b3fc6 100644
        /* Copy the blockcheck stats from the superblock probe */
        osb->osb_ecc_stats = *stats;
 diff --git a/fs/open.c b/fs/open.c
-index 9b33c0c..2ffcca2 100644
+index 6835446..eadf09f 100644
 --- a/fs/open.c
 +++ b/fs/open.c
-@@ -31,6 +31,8 @@
- #include <linux/ima.h>
+@@ -32,6 +32,8 @@
  #include <linux/dnotify.h>
+ #include <linux/compat.h>
  
 +#define CREATE_TRACE_POINTS
 +#include <trace/events/fs.h>
  #include "internal.h"
  
  int do_truncate(struct dentry *dentry, loff_t length, unsigned int time_attrs,
-@@ -101,6 +103,8 @@ long vfs_truncate(struct path *path, loff_t length)
+@@ -102,6 +104,8 @@ long vfs_truncate(struct path *path, loff_t length)
        error = locks_verify_truncate(inode, NULL, length);
        if (!error)
                error = security_path_truncate(path);
@@ -54375,7 +53740,7 @@ index 9b33c0c..2ffcca2 100644
        if (!error)
                error = do_truncate(path->dentry, length, 0, NULL);
  
-@@ -178,6 +182,8 @@ static long do_sys_ftruncate(unsigned int fd, loff_t length, int small)
+@@ -186,6 +190,8 @@ static long do_sys_ftruncate(unsigned int fd, loff_t length, int small)
        error = locks_verify_truncate(inode, f.file, length);
        if (!error)
                error = security_path_truncate(&f.file->f_path);
@@ -54384,7 +53749,7 @@ index 9b33c0c..2ffcca2 100644
        if (!error)
                error = do_truncate(dentry, length, ATTR_MTIME|ATTR_CTIME, f.file);
        sb_end_write(inode->i_sb);
-@@ -373,6 +379,9 @@ retry:
+@@ -388,6 +394,9 @@ retry:
        if (__mnt_is_readonly(path.mnt))
                res = -EROFS;
  
@@ -54394,7 +53759,7 @@ index 9b33c0c..2ffcca2 100644
  out_path_release:
        path_put(&path);
        if (retry_estale(res, lookup_flags)) {
-@@ -404,6 +413,8 @@ retry:
+@@ -419,6 +428,8 @@ retry:
        if (error)
                goto dput_and_out;
  
@@ -54403,7 +53768,7 @@ index 9b33c0c..2ffcca2 100644
        set_fs_pwd(current->fs, &path);
  
  dput_and_out:
-@@ -433,6 +444,13 @@ SYSCALL_DEFINE1(fchdir, unsigned int, fd)
+@@ -448,6 +459,13 @@ SYSCALL_DEFINE1(fchdir, unsigned int, fd)
                goto out_putf;
  
        error = inode_permission(inode, MAY_EXEC | MAY_CHDIR);
@@ -54417,7 +53782,7 @@ index 9b33c0c..2ffcca2 100644
        if (!error)
                set_fs_pwd(current->fs, &f.file->f_path);
  out_putf:
-@@ -462,7 +480,13 @@ retry:
+@@ -477,7 +495,13 @@ retry:
        if (error)
                goto dput_and_out;
  
@@ -54431,7 +53796,7 @@ index 9b33c0c..2ffcca2 100644
        error = 0;
  dput_and_out:
        path_put(&path);
-@@ -484,6 +508,16 @@ static int chmod_common(struct path *path, umode_t mode)
+@@ -499,6 +523,16 @@ static int chmod_common(struct path *path, umode_t mode)
        if (error)
                return error;
        mutex_lock(&inode->i_mutex);
@@ -54448,7 +53813,7 @@ index 9b33c0c..2ffcca2 100644
        error = security_path_chmod(path, mode);
        if (error)
                goto out_unlock;
-@@ -544,6 +578,9 @@ static int chown_common(struct path *path, uid_t user, gid_t group)
+@@ -559,6 +593,9 @@ static int chown_common(struct path *path, uid_t user, gid_t group)
        uid = make_kuid(current_user_ns(), user);
        gid = make_kgid(current_user_ns(), group);
  
@@ -54458,7 +53823,7 @@ index 9b33c0c..2ffcca2 100644
        newattrs.ia_valid =  ATTR_CTIME;
        if (user != (uid_t) -1) {
                if (!uid_valid(uid))
-@@ -960,6 +997,7 @@ long do_sys_open(int dfd, const char __user *filename, int flags, umode_t mode)
+@@ -974,6 +1011,7 @@ long do_sys_open(int dfd, const char __user *filename, int flags, umode_t mode)
                        } else {
                                fsnotify_open(f);
                                fd_install(fd, f);
@@ -54467,7 +53832,7 @@ index 9b33c0c..2ffcca2 100644
                }
                putname(tmp);
 diff --git a/fs/pipe.c b/fs/pipe.c
-index 8e2e73f..1ef1048 100644
+index 2234f3f..f9083a1 100644
 --- a/fs/pipe.c
 +++ b/fs/pipe.c
 @@ -438,9 +438,9 @@ redo:
@@ -54625,7 +53990,7 @@ index 15af622..0e9f4467 100644
        help
          Various /proc files exist to monitor process memory utilization:
 diff --git a/fs/proc/array.c b/fs/proc/array.c
-index 6a91e6f..e54dbc14 100644
+index cbd0f1b..adec3f0 100644
 --- a/fs/proc/array.c
 +++ b/fs/proc/array.c
 @@ -60,6 +60,7 @@
@@ -54636,7 +54001,7 @@ index 6a91e6f..e54dbc14 100644
  #include <linux/proc_fs.h>
  #include <linux/ioport.h>
  #include <linux/uaccess.h>
-@@ -362,6 +363,21 @@ static void task_cpus_allowed(struct seq_file *m, struct task_struct *task)
+@@ -363,6 +364,21 @@ static void task_cpus_allowed(struct seq_file *m, struct task_struct *task)
        seq_putc(m, '\n');
  }
  
@@ -54658,7 +54023,7 @@ index 6a91e6f..e54dbc14 100644
  int proc_pid_status(struct seq_file *m, struct pid_namespace *ns,
                        struct pid *pid, struct task_struct *task)
  {
-@@ -380,9 +396,24 @@ int proc_pid_status(struct seq_file *m, struct pid_namespace *ns,
+@@ -381,9 +397,24 @@ int proc_pid_status(struct seq_file *m, struct pid_namespace *ns,
        task_cpus_allowed(m, task);
        cpuset_task_status_allowed(m, task);
        task_context_switch_counts(m, task);
@@ -54683,7 +54048,7 @@ index 6a91e6f..e54dbc14 100644
  static int do_task_stat(struct seq_file *m, struct pid_namespace *ns,
                        struct pid *pid, struct task_struct *task, int whole)
  {
-@@ -404,6 +435,13 @@ static int do_task_stat(struct seq_file *m, struct pid_namespace *ns,
+@@ -405,6 +436,13 @@ static int do_task_stat(struct seq_file *m, struct pid_namespace *ns,
        char tcomm[sizeof(task->comm)];
        unsigned long flags;
  
@@ -54697,8 +54062,8 @@ index 6a91e6f..e54dbc14 100644
        state = *get_task_state(task);
        vsize = eip = esp = 0;
        permitted = ptrace_may_access(task, PTRACE_MODE_READ | PTRACE_MODE_NOAUDIT);
-@@ -475,6 +513,19 @@ static int do_task_stat(struct seq_file *m, struct pid_namespace *ns,
-               gtime = task->gtime;
+@@ -476,6 +514,19 @@ static int do_task_stat(struct seq_file *m, struct pid_namespace *ns,
+               gtime = task_gtime(task);
        }
  
 +#ifdef CONFIG_GRKERNSEC_PROC_MEMMAP
@@ -54717,7 +54082,7 @@ index 6a91e6f..e54dbc14 100644
        /* scale priority and nice values from timeslices to -20..20 */
        /* to make it look like a "normal" Unix priority/nice value  */
        priority = task_prio(task);
-@@ -511,9 +562,15 @@ static int do_task_stat(struct seq_file *m, struct pid_namespace *ns,
+@@ -512,9 +563,15 @@ static int do_task_stat(struct seq_file *m, struct pid_namespace *ns,
        seq_put_decimal_ull(m, ' ', vsize);
        seq_put_decimal_ull(m, ' ', mm ? get_mm_rss(mm) : 0);
        seq_put_decimal_ull(m, ' ', rsslim);
@@ -54733,7 +54098,7 @@ index 6a91e6f..e54dbc14 100644
        seq_put_decimal_ull(m, ' ', esp);
        seq_put_decimal_ull(m, ' ', eip);
        /* The signal information here is obsolete.
-@@ -535,7 +592,11 @@ static int do_task_stat(struct seq_file *m, struct pid_namespace *ns,
+@@ -536,7 +593,11 @@ static int do_task_stat(struct seq_file *m, struct pid_namespace *ns,
        seq_put_decimal_ull(m, ' ', cputime_to_clock_t(gtime));
        seq_put_decimal_ll(m, ' ', cputime_to_clock_t(cgtime));
  
@@ -54746,7 +54111,7 @@ index 6a91e6f..e54dbc14 100644
                seq_put_decimal_ull(m, ' ', mm->start_data);
                seq_put_decimal_ull(m, ' ', mm->end_data);
                seq_put_decimal_ull(m, ' ', mm->start_brk);
-@@ -573,8 +634,15 @@ int proc_pid_statm(struct seq_file *m, struct pid_namespace *ns,
+@@ -574,8 +635,15 @@ int proc_pid_statm(struct seq_file *m, struct pid_namespace *ns,
                        struct pid *pid, struct task_struct *task)
  {
        unsigned long size = 0, resident = 0, shared = 0, text = 0, data = 0;
@@ -54763,7 +54128,7 @@ index 6a91e6f..e54dbc14 100644
        if (mm) {
                size = task_statm(mm, &shared, &text, &data, &resident);
                mmput(mm);
-@@ -597,6 +665,13 @@ int proc_pid_statm(struct seq_file *m, struct pid_namespace *ns,
+@@ -598,6 +666,13 @@ int proc_pid_statm(struct seq_file *m, struct pid_namespace *ns,
        return 0;
  }
  
@@ -54778,10 +54143,10 @@ index 6a91e6f..e54dbc14 100644
  static struct pid *
  get_children_pid(struct inode *inode, struct pid *pid_prev, loff_t pos)
 diff --git a/fs/proc/base.c b/fs/proc/base.c
-index 9b43ff77..0fa9564 100644
+index 69078c7..3e12a75 100644
 --- a/fs/proc/base.c
 +++ b/fs/proc/base.c
-@@ -111,6 +111,14 @@ struct pid_entry {
+@@ -112,6 +112,14 @@ struct pid_entry {
        union proc_op op;
  };
  
@@ -54796,7 +54161,7 @@ index 9b43ff77..0fa9564 100644
  #define NOD(NAME, MODE, IOP, FOP, OP) {                       \
        .name = (NAME),                                 \
        .len  = sizeof(NAME) - 1,                       \
-@@ -208,6 +216,9 @@ static int proc_pid_cmdline(struct task_struct *task, char * buffer)
+@@ -209,6 +217,9 @@ static int proc_pid_cmdline(struct task_struct *task, char * buffer)
        if (!mm->arg_end)
                goto out_mm;    /* Shh! No looking before we're done */
  
@@ -54806,7 +54171,7 @@ index 9b43ff77..0fa9564 100644
        len = mm->arg_end - mm->arg_start;
   
        if (len > PAGE_SIZE)
-@@ -235,12 +246,28 @@ out:
+@@ -236,12 +247,28 @@ out:
        return res;
  }
  
@@ -54835,7 +54200,7 @@ index 9b43ff77..0fa9564 100644
                do {
                        nwords += 2;
                } while (mm->saved_auxv[nwords - 2] != 0); /* AT_NULL */
-@@ -254,7 +281,7 @@ static int proc_pid_auxv(struct task_struct *task, char *buffer)
+@@ -255,7 +282,7 @@ static int proc_pid_auxv(struct task_struct *task, char *buffer)
  }
  
  
@@ -54844,7 +54209,7 @@ index 9b43ff77..0fa9564 100644
  /*
   * Provides a wchan file via kallsyms in a proper one-value-per-file format.
   * Returns the resolved symbol.  If that fails, simply return the address.
-@@ -293,7 +320,7 @@ static void unlock_trace(struct task_struct *task)
+@@ -294,7 +321,7 @@ static void unlock_trace(struct task_struct *task)
        mutex_unlock(&task->signal->cred_guard_mutex);
  }
  
@@ -54853,7 +54218,7 @@ index 9b43ff77..0fa9564 100644
  
  #define MAX_STACK_TRACE_DEPTH 64
  
-@@ -485,7 +512,7 @@ static int proc_pid_limits(struct task_struct *task, char *buffer)
+@@ -486,7 +513,7 @@ static int proc_pid_limits(struct task_struct *task, char *buffer)
        return count;
  }
  
@@ -54862,7 +54227,7 @@ index 9b43ff77..0fa9564 100644
  static int proc_pid_syscall(struct task_struct *task, char *buffer)
  {
        long nr;
-@@ -514,7 +541,7 @@ static int proc_pid_syscall(struct task_struct *task, char *buffer)
+@@ -515,7 +542,7 @@ static int proc_pid_syscall(struct task_struct *task, char *buffer)
  /************************************************************************/
  
  /* permission checks */
@@ -54871,7 +54236,7 @@ index 9b43ff77..0fa9564 100644
  {
        struct task_struct *task;
        int allowed = 0;
-@@ -524,7 +551,10 @@ static int proc_fd_access_allowed(struct inode *inode)
+@@ -525,7 +552,10 @@ static int proc_fd_access_allowed(struct inode *inode)
         */
        task = get_proc_task(inode);
        if (task) {
@@ -54883,7 +54248,7 @@ index 9b43ff77..0fa9564 100644
                put_task_struct(task);
        }
        return allowed;
-@@ -555,10 +585,35 @@ static bool has_pid_permissions(struct pid_namespace *pid,
+@@ -556,10 +586,35 @@ static bool has_pid_permissions(struct pid_namespace *pid,
                                 struct task_struct *task,
                                 int hide_pid_min)
  {
@@ -54919,7 +54284,7 @@ index 9b43ff77..0fa9564 100644
        return ptrace_may_access(task, PTRACE_MODE_READ);
  }
  
-@@ -576,7 +631,11 @@ static int proc_pid_permission(struct inode *inode, int mask)
+@@ -577,7 +632,11 @@ static int proc_pid_permission(struct inode *inode, int mask)
        put_task_struct(task);
  
        if (!has_perms) {
@@ -54931,7 +54296,7 @@ index 9b43ff77..0fa9564 100644
                        /*
                         * Let's make getdents(), stat(), and open()
                         * consistent with each other.  If a process
-@@ -674,6 +733,11 @@ static int __mem_open(struct inode *inode, struct file *file, unsigned int mode)
+@@ -675,6 +734,11 @@ static int __mem_open(struct inode *inode, struct file *file, unsigned int mode)
        if (!task)
                return -ESRCH;
  
@@ -54943,7 +54308,7 @@ index 9b43ff77..0fa9564 100644
        mm = mm_access(task, mode);
        put_task_struct(task);
  
-@@ -689,6 +753,10 @@ static int __mem_open(struct inode *inode, struct file *file, unsigned int mode)
+@@ -690,6 +754,10 @@ static int __mem_open(struct inode *inode, struct file *file, unsigned int mode)
  
        file->private_data = mm;
  
@@ -54954,7 +54319,7 @@ index 9b43ff77..0fa9564 100644
        return 0;
  }
  
-@@ -710,6 +778,17 @@ static ssize_t mem_rw(struct file *file, char __user *buf,
+@@ -711,6 +779,17 @@ static ssize_t mem_rw(struct file *file, char __user *buf,
        ssize_t copied;
        char *page;
  
@@ -54972,7 +54337,7 @@ index 9b43ff77..0fa9564 100644
        if (!mm)
                return 0;
  
-@@ -722,7 +801,7 @@ static ssize_t mem_rw(struct file *file, char __user *buf,
+@@ -723,7 +802,7 @@ static ssize_t mem_rw(struct file *file, char __user *buf,
                goto free;
  
        while (count > 0) {
@@ -54981,7 +54346,7 @@ index 9b43ff77..0fa9564 100644
  
                if (write && copy_from_user(page, buf, this_len)) {
                        copied = -EFAULT;
-@@ -814,6 +893,13 @@ static ssize_t environ_read(struct file *file, char __user *buf,
+@@ -815,6 +894,13 @@ static ssize_t environ_read(struct file *file, char __user *buf,
        if (!mm)
                return 0;
  
@@ -54995,7 +54360,7 @@ index 9b43ff77..0fa9564 100644
        page = (char *)__get_free_page(GFP_TEMPORARY);
        if (!page)
                return -ENOMEM;
-@@ -823,7 +909,7 @@ static ssize_t environ_read(struct file *file, char __user *buf,
+@@ -824,7 +910,7 @@ static ssize_t environ_read(struct file *file, char __user *buf,
                goto free;
        while (count > 0) {
                size_t this_len, max_len;
@@ -55004,7 +54369,7 @@ index 9b43ff77..0fa9564 100644
  
                if (src >= (mm->env_end - mm->env_start))
                        break;
-@@ -1429,7 +1515,7 @@ static void *proc_pid_follow_link(struct dentry *dentry, struct nameidata *nd)
+@@ -1430,7 +1516,7 @@ static void *proc_pid_follow_link(struct dentry *dentry, struct nameidata *nd)
        int error = -EACCES;
  
        /* Are we allowed to snoop on the tasks file descriptors? */
@@ -55013,7 +54378,7 @@ index 9b43ff77..0fa9564 100644
                goto out;
  
        error = PROC_I(inode)->op.proc_get_link(dentry, &path);
-@@ -1473,8 +1559,18 @@ static int proc_pid_readlink(struct dentry * dentry, char __user * buffer, int b
+@@ -1474,8 +1560,18 @@ static int proc_pid_readlink(struct dentry * dentry, char __user * buffer, int b
        struct path path;
  
        /* Are we allowed to snoop on the tasks file descriptors? */
@@ -55034,7 +54399,7 @@ index 9b43ff77..0fa9564 100644
  
        error = PROC_I(inode)->op.proc_get_link(dentry, &path);
        if (error)
-@@ -1524,7 +1620,11 @@ struct inode *proc_pid_make_inode(struct super_block * sb, struct task_struct *t
+@@ -1525,7 +1621,11 @@ struct inode *proc_pid_make_inode(struct super_block * sb, struct task_struct *t
                rcu_read_lock();
                cred = __task_cred(task);
                inode->i_uid = cred->euid;
@@ -55046,7 +54411,7 @@ index 9b43ff77..0fa9564 100644
                rcu_read_unlock();
        }
        security_task_to_inode(task, inode);
-@@ -1560,10 +1660,19 @@ int pid_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat)
+@@ -1561,10 +1661,19 @@ int pid_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat)
                        return -ENOENT;
                }
                if ((inode->i_mode == (S_IFDIR|S_IRUGO|S_IXUGO)) ||
@@ -55066,7 +54431,7 @@ index 9b43ff77..0fa9564 100644
                }
        }
        rcu_read_unlock();
-@@ -1601,11 +1710,20 @@ int pid_revalidate(struct dentry *dentry, unsigned int flags)
+@@ -1602,11 +1711,20 @@ int pid_revalidate(struct dentry *dentry, unsigned int flags)
  
        if (task) {
                if ((inode->i_mode == (S_IFDIR|S_IRUGO|S_IXUGO)) ||
@@ -55087,7 +54452,7 @@ index 9b43ff77..0fa9564 100644
                        rcu_read_unlock();
                } else {
                        inode->i_uid = GLOBAL_ROOT_UID;
-@@ -2058,6 +2176,9 @@ static struct dentry *proc_pident_lookup(struct inode *dir,
+@@ -2059,6 +2177,9 @@ static struct dentry *proc_pident_lookup(struct inode *dir,
        if (!task)
                goto out_no_task;
  
@@ -55097,7 +54462,7 @@ index 9b43ff77..0fa9564 100644
        /*
         * Yes, it does not scale. And it should not. Don't add
         * new entries into /proc/<tgid>/ without very good reasons.
-@@ -2102,6 +2223,9 @@ static int proc_pident_readdir(struct file *filp,
+@@ -2103,6 +2224,9 @@ static int proc_pident_readdir(struct file *filp,
        if (!task)
                goto out_no_task;
  
@@ -55107,7 +54472,7 @@ index 9b43ff77..0fa9564 100644
        ret = 0;
        i = filp->f_pos;
        switch (i) {
-@@ -2515,7 +2639,7 @@ static const struct pid_entry tgid_base_stuff[] = {
+@@ -2516,7 +2640,7 @@ static const struct pid_entry tgid_base_stuff[] = {
        REG("autogroup",  S_IRUGO|S_IWUSR, proc_pid_sched_autogroup_operations),
  #endif
        REG("comm",      S_IRUGO|S_IWUSR, proc_pid_set_comm_operations),
@@ -55116,7 +54481,7 @@ index 9b43ff77..0fa9564 100644
        INF("syscall",    S_IRUGO, proc_pid_syscall),
  #endif
        INF("cmdline",    S_IRUGO, proc_pid_cmdline),
-@@ -2540,10 +2664,10 @@ static const struct pid_entry tgid_base_stuff[] = {
+@@ -2541,10 +2665,10 @@ static const struct pid_entry tgid_base_stuff[] = {
  #ifdef CONFIG_SECURITY
        DIR("attr",       S_IRUGO|S_IXUGO, proc_attr_dir_inode_operations, proc_attr_dir_operations),
  #endif
@@ -55129,7 +54494,7 @@ index 9b43ff77..0fa9564 100644
        ONE("stack",      S_IRUGO, proc_pid_stack),
  #endif
  #ifdef CONFIG_SCHEDSTATS
-@@ -2577,6 +2701,9 @@ static const struct pid_entry tgid_base_stuff[] = {
+@@ -2578,6 +2702,9 @@ static const struct pid_entry tgid_base_stuff[] = {
  #ifdef CONFIG_HARDWALL
        INF("hardwall",   S_IRUGO, proc_pid_hardwall),
  #endif
@@ -55139,7 +54504,7 @@ index 9b43ff77..0fa9564 100644
  #ifdef CONFIG_USER_NS
        REG("uid_map",    S_IRUGO|S_IWUSR, proc_uid_map_operations),
        REG("gid_map",    S_IRUGO|S_IWUSR, proc_gid_map_operations),
-@@ -2705,7 +2832,14 @@ static struct dentry *proc_pid_instantiate(struct inode *dir,
+@@ -2707,7 +2834,14 @@ static struct dentry *proc_pid_instantiate(struct inode *dir,
        if (!inode)
                goto out;
  
@@ -55154,7 +54519,7 @@ index 9b43ff77..0fa9564 100644
        inode->i_op = &proc_tgid_base_inode_operations;
        inode->i_fop = &proc_tgid_base_operations;
        inode->i_flags|=S_IMMUTABLE;
-@@ -2743,7 +2877,11 @@ struct dentry *proc_pid_lookup(struct inode *dir, struct dentry * dentry, unsign
+@@ -2745,7 +2879,11 @@ struct dentry *proc_pid_lookup(struct inode *dir, struct dentry * dentry, unsign
        if (!task)
                goto out;
  
@@ -55166,7 +54531,7 @@ index 9b43ff77..0fa9564 100644
        put_task_struct(task);
  out:
        return result;
-@@ -2806,6 +2944,8 @@ static int proc_pid_fill_cache(struct file *filp, void *dirent, filldir_t filldi
+@@ -2808,6 +2946,8 @@ static int proc_pid_fill_cache(struct file *filp, void *dirent, filldir_t filldi
  static int fake_filldir(void *buf, const char *name, int namelen,
                        loff_t offset, u64 ino, unsigned d_type)
  {
@@ -55175,7 +54540,7 @@ index 9b43ff77..0fa9564 100644
        return 0;
  }
  
-@@ -2857,7 +2997,7 @@ static const struct pid_entry tid_base_stuff[] = {
+@@ -2859,7 +2999,7 @@ static const struct pid_entry tid_base_stuff[] = {
        REG("sched",     S_IRUGO|S_IWUSR, proc_pid_sched_operations),
  #endif
        REG("comm",      S_IRUGO|S_IWUSR, proc_pid_set_comm_operations),
@@ -55184,7 +54549,7 @@ index 9b43ff77..0fa9564 100644
        INF("syscall",   S_IRUGO, proc_pid_syscall),
  #endif
        INF("cmdline",   S_IRUGO, proc_pid_cmdline),
-@@ -2884,10 +3024,10 @@ static const struct pid_entry tid_base_stuff[] = {
+@@ -2886,10 +3026,10 @@ static const struct pid_entry tid_base_stuff[] = {
  #ifdef CONFIG_SECURITY
        DIR("attr",      S_IRUGO|S_IXUGO, proc_attr_dir_inode_operations, proc_attr_dir_operations),
  #endif
@@ -55268,10 +54633,10 @@ index d7a4a28..0201742 100644
  }
  
 diff --git a/fs/proc/inode.c b/fs/proc/inode.c
-index 0ac1e1b..0497e58 100644
+index 869116c..820cb27 100644
 --- a/fs/proc/inode.c
 +++ b/fs/proc/inode.c
-@@ -21,11 +21,17 @@
+@@ -22,11 +22,17 @@
  #include <linux/seq_file.h>
  #include <linux/slab.h>
  #include <linux/mount.h>
@@ -55289,7 +54654,7 @@ index 0ac1e1b..0497e58 100644
  static void proc_evict_inode(struct inode *inode)
  {
        struct proc_dir_entry *de;
-@@ -53,6 +59,13 @@ static void proc_evict_inode(struct inode *inode)
+@@ -54,6 +60,13 @@ static void proc_evict_inode(struct inode *inode)
        ns = PROC_I(inode)->ns;
        if (ns_ops && ns)
                ns_ops->put(ns);
@@ -55303,7 +54668,7 @@ index 0ac1e1b..0497e58 100644
  }
  
  static struct kmem_cache * proc_inode_cachep;
-@@ -455,7 +468,11 @@ struct inode *proc_get_inode(struct super_block *sb, struct proc_dir_entry *de)
+@@ -456,7 +469,11 @@ struct inode *proc_get_inode(struct super_block *sb, struct proc_dir_entry *de)
                if (de->mode) {
                        inode->i_mode = de->mode;
                        inode->i_uid = de->uid;
@@ -55316,10 +54681,10 @@ index 0ac1e1b..0497e58 100644
                if (de->size)
                        inode->i_size = de->size;
 diff --git a/fs/proc/internal.h b/fs/proc/internal.h
-index 252544c..04395b9 100644
+index 85ff3a4..a512bd8 100644
 --- a/fs/proc/internal.h
 +++ b/fs/proc/internal.h
-@@ -55,6 +55,9 @@ extern int proc_pid_status(struct seq_file *m, struct pid_namespace *ns,
+@@ -56,6 +56,9 @@ extern int proc_pid_status(struct seq_file *m, struct pid_namespace *ns,
                                struct pid *pid, struct task_struct *task);
  extern int proc_pid_statm(struct seq_file *m, struct pid_namespace *ns,
                                struct pid *pid, struct task_struct *task);
@@ -55330,10 +54695,10 @@ index 252544c..04395b9 100644
  
  extern const struct file_operations proc_tid_children_operations;
 diff --git a/fs/proc/kcore.c b/fs/proc/kcore.c
-index e96d4f1..8b116ed 100644
+index eda6f01..006ae24 100644
 --- a/fs/proc/kcore.c
 +++ b/fs/proc/kcore.c
-@@ -480,9 +480,10 @@ read_kcore(struct file *file, char __user *buffer, size_t buflen, loff_t *fpos)
+@@ -481,9 +481,10 @@ read_kcore(struct file *file, char __user *buffer, size_t buflen, loff_t *fpos)
         * the addresses in the elf_phdr on our list.
         */
        start = kc_offset_to_vaddr(*fpos - elf_buflen);
@@ -55346,7 +54711,7 @@ index e96d4f1..8b116ed 100644
        while (buflen) {
                struct kcore_list *m;
  
-@@ -511,20 +512,23 @@ read_kcore(struct file *file, char __user *buffer, size_t buflen, loff_t *fpos)
+@@ -512,20 +513,23 @@ read_kcore(struct file *file, char __user *buffer, size_t buflen, loff_t *fpos)
                        kfree(elf_buf);
                } else {
                        if (kern_addr_valid(start)) {
@@ -55381,7 +54746,7 @@ index e96d4f1..8b116ed 100644
                        } else {
                                if (clear_user(buffer, tsz))
                                        return -EFAULT;
-@@ -544,6 +548,9 @@ read_kcore(struct file *file, char __user *buffer, size_t buflen, loff_t *fpos)
+@@ -545,6 +549,9 @@ read_kcore(struct file *file, char __user *buffer, size_t buflen, loff_t *fpos)
  
  static int open_kcore(struct inode *inode, struct file *filp)
  {
@@ -55392,20 +54757,20 @@ index e96d4f1..8b116ed 100644
                return -EPERM;
        if (kcore_need_update)
 diff --git a/fs/proc/meminfo.c b/fs/proc/meminfo.c
-index 80e4645..53e5fcf 100644
+index 1efaaa1..834e49a 100644
 --- a/fs/proc/meminfo.c
 +++ b/fs/proc/meminfo.c
 @@ -158,7 +158,7 @@ static int meminfo_proc_show(struct seq_file *m, void *v)
                vmi.used >> 10,
                vmi.largest_chunk >> 10
  #ifdef CONFIG_MEMORY_FAILURE
--              ,atomic_long_read(&mce_bad_pages) << (PAGE_SHIFT - 10)
-+              ,atomic_long_read_unchecked(&mce_bad_pages) << (PAGE_SHIFT - 10)
+-              ,atomic_long_read(&num_poisoned_pages) << (PAGE_SHIFT - 10)
++              ,atomic_long_read_unchecked(&num_poisoned_pages) << (PAGE_SHIFT - 10)
  #endif
  #ifdef CONFIG_TRANSPARENT_HUGEPAGE
                ,K(global_page_state(NR_ANON_TRANSPARENT_HUGEPAGES) *
 diff --git a/fs/proc/nommu.c b/fs/proc/nommu.c
-index b1822dd..df622cb 100644
+index ccfd99b..1b7e255 100644
 --- a/fs/proc/nommu.c
 +++ b/fs/proc/nommu.c
 @@ -66,7 +66,7 @@ static int nommu_region_show(struct seq_file *m, struct vm_region *region)
@@ -55418,7 +54783,7 @@ index b1822dd..df622cb 100644
  
        seq_putc(m, '\n');
 diff --git a/fs/proc/proc_net.c b/fs/proc/proc_net.c
-index fe72cd0..21b52ff 100644
+index b4ac657..0842bd2 100644
 --- a/fs/proc/proc_net.c
 +++ b/fs/proc/proc_net.c
 @@ -23,6 +23,7 @@
@@ -55448,10 +54813,10 @@ index fe72cd0..21b52ff 100644
        rcu_read_lock();
        task = pid_task(proc_pid(dir), PIDTYPE_PID);
 diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c
-index 1827d88..43b0279 100644
+index ac05f33..1e6dc7e 100644
 --- a/fs/proc/proc_sysctl.c
 +++ b/fs/proc/proc_sysctl.c
-@@ -12,11 +12,15 @@
+@@ -13,11 +13,15 @@
  #include <linux/module.h>
  #include "internal.h"
  
@@ -55469,7 +54834,7 @@ index 1827d88..43b0279 100644
  
  void proc_sys_poll_notify(struct ctl_table_poll *poll)
  {
-@@ -466,6 +470,9 @@ static struct dentry *proc_sys_lookup(struct inode *dir, struct dentry *dentry,
+@@ -467,6 +471,9 @@ static struct dentry *proc_sys_lookup(struct inode *dir, struct dentry *dentry,
  
        err = NULL;
        d_set_d_op(dentry, &proc_sys_dentry_operations);
@@ -55479,15 +54844,15 @@ index 1827d88..43b0279 100644
        d_add(dentry, inode);
  
  out:
-@@ -481,6 +488,7 @@ static ssize_t proc_sys_call_handler(struct file *filp, void __user *buf,
-       struct inode *inode = filp->f_path.dentry->d_inode;
+@@ -482,6 +489,7 @@ static ssize_t proc_sys_call_handler(struct file *filp, void __user *buf,
+       struct inode *inode = file_inode(filp);
        struct ctl_table_header *head = grab_header(inode);
        struct ctl_table *table = PROC_I(inode)->sysctl_entry;
 +      int op = write ? MAY_WRITE : MAY_READ;
        ssize_t error;
        size_t res;
  
-@@ -492,7 +500,7 @@ static ssize_t proc_sys_call_handler(struct file *filp, void __user *buf,
+@@ -493,7 +501,7 @@ static ssize_t proc_sys_call_handler(struct file *filp, void __user *buf,
         * and won't be until we finish.
         */
        error = -EPERM;
@@ -55496,7 +54861,7 @@ index 1827d88..43b0279 100644
                goto out;
  
        /* if that can happen at all, it should be -EINVAL, not -EISDIR */
-@@ -500,6 +508,22 @@ static ssize_t proc_sys_call_handler(struct file *filp, void __user *buf,
+@@ -501,6 +509,22 @@ static ssize_t proc_sys_call_handler(struct file *filp, void __user *buf,
        if (!table->proc_handler)
                goto out;
  
@@ -55519,7 +54884,7 @@ index 1827d88..43b0279 100644
        /* careful: calling conventions are nasty here */
        res = count;
        error = table->proc_handler(table, write, buf, &res, ppos);
-@@ -597,6 +621,9 @@ static int proc_sys_fill_cache(struct file *filp, void *dirent,
+@@ -598,6 +622,9 @@ static int proc_sys_fill_cache(struct file *filp, void *dirent,
                                return -ENOMEM;
                        } else {
                                d_set_d_op(child, &proc_sys_dentry_operations);
@@ -55529,7 +54894,7 @@ index 1827d88..43b0279 100644
                                d_add(child, inode);
                        }
                } else {
-@@ -640,6 +667,9 @@ static int scan(struct ctl_table_header *head, ctl_table *table,
+@@ -641,6 +668,9 @@ static int scan(struct ctl_table_header *head, ctl_table *table,
        if ((*pos)++ < file->f_pos)
                return 0;
  
@@ -55539,7 +54904,7 @@ index 1827d88..43b0279 100644
        if (unlikely(S_ISLNK(table->mode)))
                res = proc_sys_link_fill_cache(file, dirent, filldir, head, table);
        else
-@@ -750,6 +780,9 @@ static int proc_sys_getattr(struct vfsmount *mnt, struct dentry *dentry, struct
+@@ -751,6 +781,9 @@ static int proc_sys_getattr(struct vfsmount *mnt, struct dentry *dentry, struct
        if (IS_ERR(head))
                return PTR_ERR(head);
  
@@ -55549,7 +54914,7 @@ index 1827d88..43b0279 100644
        generic_fillattr(inode, stat);
        if (table)
                stat->mode = (stat->mode & S_IFMT) | table->mode;
-@@ -772,13 +805,13 @@ static const struct file_operations proc_sys_dir_file_operations = {
+@@ -773,13 +806,13 @@ static const struct file_operations proc_sys_dir_file_operations = {
        .llseek         = generic_file_llseek,
  };
  
@@ -55565,7 +54930,7 @@ index 1827d88..43b0279 100644
        .lookup         = proc_sys_lookup,
        .permission     = proc_sys_permission,
        .setattr        = proc_sys_setattr,
-@@ -854,7 +887,7 @@ static struct ctl_dir *find_subdir(struct ctl_dir *dir,
+@@ -855,7 +888,7 @@ static struct ctl_dir *find_subdir(struct ctl_dir *dir,
  static struct ctl_dir *new_dir(struct ctl_table_set *set,
                               const char *name, int namelen)
  {
@@ -55574,7 +54939,7 @@ index 1827d88..43b0279 100644
        struct ctl_dir *new;
        struct ctl_node *node;
        char *new_name;
-@@ -866,7 +899,7 @@ static struct ctl_dir *new_dir(struct ctl_table_set *set,
+@@ -867,7 +900,7 @@ static struct ctl_dir *new_dir(struct ctl_table_set *set,
                return NULL;
  
        node = (struct ctl_node *)(new + 1);
@@ -55583,7 +54948,7 @@ index 1827d88..43b0279 100644
        new_name = (char *)(table + 2);
        memcpy(new_name, name, namelen);
        new_name[namelen] = '\0';
-@@ -1035,7 +1068,8 @@ static int sysctl_check_table(const char *path, struct ctl_table *table)
+@@ -1036,7 +1069,8 @@ static int sysctl_check_table(const char *path, struct ctl_table *table)
  static struct ctl_table_header *new_links(struct ctl_dir *dir, struct ctl_table *table,
        struct ctl_table_root *link_root)
  {
@@ -55593,7 +54958,7 @@ index 1827d88..43b0279 100644
        struct ctl_table_header *links;
        struct ctl_node *node;
        char *link_name;
-@@ -1058,7 +1092,7 @@ static struct ctl_table_header *new_links(struct ctl_dir *dir, struct ctl_table
+@@ -1059,7 +1093,7 @@ static struct ctl_table_header *new_links(struct ctl_dir *dir, struct ctl_table
                return NULL;
  
        node = (struct ctl_node *)(links + 1);
@@ -55602,7 +54967,7 @@ index 1827d88..43b0279 100644
        link_name = (char *)&link_table[nr_entries + 1];
  
        for (link = link_table, entry = table; entry->procname; link++, entry++) {
-@@ -1306,8 +1340,8 @@ static int register_leaf_sysctl_tables(const char *path, char *pos,
+@@ -1307,8 +1341,8 @@ static int register_leaf_sysctl_tables(const char *path, char *pos,
        struct ctl_table_header ***subheader, struct ctl_table_set *set,
        struct ctl_table *table)
  {
@@ -55613,7 +54978,7 @@ index 1827d88..43b0279 100644
        int nr_files = 0;
        int nr_dirs = 0;
        int err = -ENOMEM;
-@@ -1319,10 +1353,9 @@ static int register_leaf_sysctl_tables(const char *path, char *pos,
+@@ -1320,10 +1354,9 @@ static int register_leaf_sysctl_tables(const char *path, char *pos,
                        nr_files++;
        }
  
@@ -55625,7 +54990,7 @@ index 1827d88..43b0279 100644
                files = kzalloc(sizeof(struct ctl_table) * (nr_files + 1),
                                GFP_KERNEL);
                if (!files)
-@@ -1340,7 +1373,7 @@ static int register_leaf_sysctl_tables(const char *path, char *pos,
+@@ -1341,7 +1374,7 @@ static int register_leaf_sysctl_tables(const char *path, char *pos,
        /* Register everything except a directory full of subdirectories */
        if (nr_files || !nr_dirs) {
                struct ctl_table_header *header;
@@ -55668,7 +55033,7 @@ index aa5cc3b..c91a5d0 100644
                kfree(s);
  }
 diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
-index ca5ce7f..02c1cf0 100644
+index 3e636d8..83e3b71 100644
 --- a/fs/proc/task_mmu.c
 +++ b/fs/proc/task_mmu.c
 @@ -11,12 +11,19 @@
@@ -55867,7 +55232,7 @@ index ca5ce7f..02c1cf0 100644
                seq_printf(m, " heap");
        } else {
 diff --git a/fs/proc/task_nommu.c b/fs/proc/task_nommu.c
-index 1ccfa53..0848f95 100644
+index 56123a6..5a2f6ec 100644
 --- a/fs/proc/task_nommu.c
 +++ b/fs/proc/task_nommu.c
 @@ -51,7 +51,7 @@ void task_mem(struct seq_file *m, struct mm_struct *mm)
@@ -55933,7 +55298,7 @@ index 16e8abb..2dcf914 100644
        if (!msg_head) {
                printk(KERN_ERR
 diff --git a/fs/readdir.c b/fs/readdir.c
-index 5e69ef5..e5d9099 100644
+index fee38e0..12fdf47 100644
 --- a/fs/readdir.c
 +++ b/fs/readdir.c
 @@ -17,6 +17,7 @@
@@ -56048,7 +55413,7 @@ index 2b7882b..1c5ef48 100644
  
        /* balance leaf returns 0 except if combining L R and S into
 diff --git a/fs/reiserfs/procfs.c b/fs/reiserfs/procfs.c
-index e60e870..f40ac16 100644
+index 9cc0740a..46bf953 100644
 --- a/fs/reiserfs/procfs.c
 +++ b/fs/reiserfs/procfs.c
 @@ -112,7 +112,7 @@ static int show_super(struct seq_file *m, struct super_block *sb)
@@ -56082,23 +55447,8 @@ index 157e474..65a6114 100644
  #define FILESYSTEM_CHANGED_TB(tb)  (get_generation((tb)->tb_sb) != (tb)->fs_gen)
  #define __fs_changed(gen,s) (gen != get_generation (s))
  #define fs_changed(gen,s)             \
-diff --git a/fs/reiserfs/xattr.c b/fs/reiserfs/xattr.c
-index c196369..4cce1d9 100644
---- a/fs/reiserfs/xattr.c
-+++ b/fs/reiserfs/xattr.c
-@@ -187,8 +187,8 @@ fill_with_dentries(void *buf, const char *name, int namelen, loff_t offset,
-       if (dbuf->count == ARRAY_SIZE(dbuf->dentries))
-               return -ENOSPC;
--      if (name[0] == '.' && (name[1] == '\0' ||
--                             (name[1] == '.' && name[2] == '\0')))
-+      if (name[0] == '.' && (namelen < 2 ||
-+                             (namelen == 2 && name[1] == '.')))
-               return 0;
-       dentry = lookup_one_len(name, dbuf->xadir, namelen);
 diff --git a/fs/select.c b/fs/select.c
-index 2ef72d9..f213b17 100644
+index 8c1c96c..a0f9b6d 100644
 --- a/fs/select.c
 +++ b/fs/select.c
 @@ -20,6 +20,7 @@
@@ -56109,7 +55459,7 @@ index 2ef72d9..f213b17 100644
  #include <linux/personality.h> /* for STICKY_TIMEOUTS */
  #include <linux/file.h>
  #include <linux/fdtable.h>
-@@ -826,6 +827,7 @@ int do_sys_poll(struct pollfd __user *ufds, unsigned int nfds,
+@@ -827,6 +828,7 @@ int do_sys_poll(struct pollfd __user *ufds, unsigned int nfds,
        struct poll_list *walk = head;
        unsigned long todo = nfds;
  
@@ -56118,7 +55468,7 @@ index 2ef72d9..f213b17 100644
                return -EINVAL;
  
 diff --git a/fs/seq_file.c b/fs/seq_file.c
-index f2bc3df..239d4f6 100644
+index 38bb59f..a304f9d 100644
 --- a/fs/seq_file.c
 +++ b/fs/seq_file.c
 @@ -10,6 +10,7 @@
@@ -56185,10 +55535,10 @@ index f2bc3df..239d4f6 100644
  
        if (op) {
 diff --git a/fs/splice.c b/fs/splice.c
-index 6909d89..5b2e8f9 100644
+index 29e394e..b13c247 100644
 --- a/fs/splice.c
 +++ b/fs/splice.c
-@@ -194,7 +194,7 @@ ssize_t splice_to_pipe(struct pipe_inode_info *pipe,
+@@ -195,7 +195,7 @@ ssize_t splice_to_pipe(struct pipe_inode_info *pipe,
        pipe_lock(pipe);
  
        for (;;) {
@@ -56197,7 +55547,7 @@ index 6909d89..5b2e8f9 100644
                        send_sig(SIGPIPE, current, 0);
                        if (!ret)
                                ret = -EPIPE;
-@@ -248,9 +248,9 @@ ssize_t splice_to_pipe(struct pipe_inode_info *pipe,
+@@ -249,9 +249,9 @@ ssize_t splice_to_pipe(struct pipe_inode_info *pipe,
                        do_wakeup = 0;
                }
  
@@ -56209,7 +55559,7 @@ index 6909d89..5b2e8f9 100644
        }
  
        pipe_unlock(pipe);
-@@ -563,7 +563,7 @@ static ssize_t kernel_readv(struct file *file, const struct iovec *vec,
+@@ -564,7 +564,7 @@ static ssize_t kernel_readv(struct file *file, const struct iovec *vec,
        old_fs = get_fs();
        set_fs(get_ds());
        /* The cast to a user pointer is valid due to the set_fs() */
@@ -56218,16 +55568,16 @@ index 6909d89..5b2e8f9 100644
        set_fs(old_fs);
  
        return res;
-@@ -578,7 +578,7 @@ static ssize_t kernel_write(struct file *file, const char *buf, size_t count,
+@@ -579,7 +579,7 @@ ssize_t kernel_write(struct file *file, const char *buf, size_t count,
        old_fs = get_fs();
        set_fs(get_ds());
        /* The cast to a user pointer is valid due to the set_fs() */
--      res = vfs_write(file, (const char __user *)buf, count, &pos);
+-      res = vfs_write(file, (__force const char __user *)buf, count, &pos);
 +      res = vfs_write(file, (const char __force_user *)buf, count, &pos);
        set_fs(old_fs);
  
        return res;
-@@ -630,7 +630,7 @@ ssize_t default_file_splice_read(struct file *in, loff_t *ppos,
+@@ -632,7 +632,7 @@ ssize_t default_file_splice_read(struct file *in, loff_t *ppos,
                        goto err;
  
                this_len = min_t(size_t, len, PAGE_CACHE_SIZE - offset);
@@ -56236,7 +55586,7 @@ index 6909d89..5b2e8f9 100644
                vec[i].iov_len = this_len;
                spd.pages[i] = page;
                spd.nr_pages++;
-@@ -851,10 +851,10 @@ EXPORT_SYMBOL(splice_from_pipe_feed);
+@@ -853,10 +853,10 @@ EXPORT_SYMBOL(splice_from_pipe_feed);
  int splice_from_pipe_next(struct pipe_inode_info *pipe, struct splice_desc *sd)
  {
        while (!pipe->nrbufs) {
@@ -56249,7 +55599,7 @@ index 6909d89..5b2e8f9 100644
                        return 0;
  
                if (sd->flags & SPLICE_F_NONBLOCK)
-@@ -1189,7 +1189,7 @@ ssize_t splice_direct_to_actor(struct file *in, struct splice_desc *sd,
+@@ -1192,7 +1192,7 @@ ssize_t splice_direct_to_actor(struct file *in, struct splice_desc *sd,
                 * out of the pipe right after the splice_to_pipe(). So set
                 * PIPE_READERS appropriately.
                 */
@@ -56258,7 +55608,7 @@ index 6909d89..5b2e8f9 100644
  
                current->splice_pipe = pipe;
        }
-@@ -1738,9 +1738,9 @@ static int ipipe_prep(struct pipe_inode_info *pipe, unsigned int flags)
+@@ -1741,9 +1741,9 @@ static int ipipe_prep(struct pipe_inode_info *pipe, unsigned int flags)
                        ret = -ERESTARTSYS;
                        break;
                }
@@ -56270,7 +55620,7 @@ index 6909d89..5b2e8f9 100644
                        if (flags & SPLICE_F_NONBLOCK) {
                                ret = -EAGAIN;
                                break;
-@@ -1772,7 +1772,7 @@ static int opipe_prep(struct pipe_inode_info *pipe, unsigned int flags)
+@@ -1775,7 +1775,7 @@ static int opipe_prep(struct pipe_inode_info *pipe, unsigned int flags)
        pipe_lock(pipe);
  
        while (pipe->nrbufs >= pipe->buffers) {
@@ -56279,7 +55629,7 @@ index 6909d89..5b2e8f9 100644
                        send_sig(SIGPIPE, current, 0);
                        ret = -EPIPE;
                        break;
-@@ -1785,9 +1785,9 @@ static int opipe_prep(struct pipe_inode_info *pipe, unsigned int flags)
+@@ -1788,9 +1788,9 @@ static int opipe_prep(struct pipe_inode_info *pipe, unsigned int flags)
                        ret = -ERESTARTSYS;
                        break;
                }
@@ -56291,7 +55641,7 @@ index 6909d89..5b2e8f9 100644
        }
  
        pipe_unlock(pipe);
-@@ -1823,14 +1823,14 @@ retry:
+@@ -1826,14 +1826,14 @@ retry:
        pipe_double_lock(ipipe, opipe);
  
        do {
@@ -56308,7 +55658,7 @@ index 6909d89..5b2e8f9 100644
                        break;
  
                /*
-@@ -1927,7 +1927,7 @@ static int link_pipe(struct pipe_inode_info *ipipe,
+@@ -1930,7 +1930,7 @@ static int link_pipe(struct pipe_inode_info *ipipe,
        pipe_double_lock(ipipe, opipe);
  
        do {
@@ -56317,7 +55667,7 @@ index 6909d89..5b2e8f9 100644
                        send_sig(SIGPIPE, current, 0);
                        if (!ret)
                                ret = -EPIPE;
-@@ -1972,7 +1972,7 @@ static int link_pipe(struct pipe_inode_info *ipipe,
+@@ -1975,7 +1975,7 @@ static int link_pipe(struct pipe_inode_info *ipipe,
         * return EAGAIN if we have the potential of some data in the
         * future, otherwise just return 0
         */
@@ -56327,7 +55677,7 @@ index 6909d89..5b2e8f9 100644
  
        pipe_unlock(ipipe);
 diff --git a/fs/stat.c b/fs/stat.c
-index 14f4545..9b7f55b 100644
+index 04ce1ac..a13dd1e 100644
 --- a/fs/stat.c
 +++ b/fs/stat.c
 @@ -28,8 +28,13 @@ void generic_fillattr(struct inode *inode, struct kstat *stat)
@@ -56346,14 +55696,14 @@ index 14f4545..9b7f55b 100644
        stat->ctime = inode->i_ctime;
        stat->blksize = (1 << inode->i_blkbits);
        stat->blocks = inode->i_blocks;
-@@ -46,8 +51,14 @@ int vfs_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat)
+@@ -46,8 +51,14 @@ int vfs_getattr(struct path *path, struct kstat *stat)
        if (retval)
                return retval;
  
 -      if (inode->i_op->getattr)
--              return inode->i_op->getattr(mnt, dentry, stat);
+-              return inode->i_op->getattr(path->mnt, path->dentry, stat);
 +      if (inode->i_op->getattr) {
-+              retval = inode->i_op->getattr(mnt, dentry, stat);
++              retval = inode->i_op->getattr(path->mnt, path->dentry, stat);
 +              if (!retval && is_sidechannel_device(inode) && !capable_nolog(CAP_MKNOD)) {
 +                      stat->atime = stat->ctime;
 +                      stat->mtime = stat->ctime;
@@ -56364,7 +55714,7 @@ index 14f4545..9b7f55b 100644
        generic_fillattr(inode, stat);
        return 0;
 diff --git a/fs/sysfs/bin.c b/fs/sysfs/bin.c
-index 614b2b5..4d321e6 100644
+index 15c68f9..36a8b3e 100644
 --- a/fs/sysfs/bin.c
 +++ b/fs/sysfs/bin.c
 @@ -235,13 +235,13 @@ static int bin_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf)
@@ -56385,7 +55735,7 @@ index 614b2b5..4d321e6 100644
        if (!bb->vm_ops)
                return -EINVAL;
 diff --git a/fs/sysfs/dir.c b/fs/sysfs/dir.c
-index 1f8c823..ed57cfe 100644
+index 6f31590..3c87c8a 100644
 --- a/fs/sysfs/dir.c
 +++ b/fs/sysfs/dir.c
 @@ -40,7 +40,7 @@ static DEFINE_IDA(sysfs_ino_ida);
@@ -56466,10 +55816,10 @@ index 602f56d..6853db8 100644
        }
  
 diff --git a/fs/sysfs/symlink.c b/fs/sysfs/symlink.c
-index 3c9eb56..9dea5be 100644
+index 8c940df..25b733e 100644
 --- a/fs/sysfs/symlink.c
 +++ b/fs/sysfs/symlink.c
-@@ -286,7 +286,7 @@ static void *sysfs_follow_link(struct dentry *dentry, struct nameidata *nd)
+@@ -305,7 +305,7 @@ static void *sysfs_follow_link(struct dentry *dentry, struct nameidata *nd)
  
  static void sysfs_put_link(struct dentry *dentry, struct nameidata *nd, void *cookie)
  {
@@ -56565,10 +55915,38 @@ index f4fb7ec..3fe03c0 100644
        error = notify_change(path->dentry, &newattrs);
        mutex_unlock(&inode->i_mutex);
 diff --git a/fs/xattr.c b/fs/xattr.c
-index 3377dff..4feded6 100644
+index 3377dff..4d074d9 100644
 --- a/fs/xattr.c
 +++ b/fs/xattr.c
-@@ -319,7 +319,7 @@ EXPORT_SYMBOL_GPL(vfs_removexattr);
+@@ -227,6 +227,27 @@ int vfs_xattr_cmp(struct dentry *dentry, const char *xattr_name,
+       return rc;
+ }
++#ifdef CONFIG_PAX_XATTR_PAX_FLAGS
++ssize_t
++pax_getxattr(struct dentry *dentry, void *value, size_t size)
++{
++      struct inode *inode = dentry->d_inode;
++      ssize_t error;
++
++      error = inode_permission(inode, MAY_EXEC);
++      if (error)
++              return error;
++
++      if (inode->i_op->getxattr)
++              error = inode->i_op->getxattr(dentry, XATTR_NAME_PAX_FLAGS, value, size);
++      else
++              error = -EOPNOTSUPP;
++
++      return error;
++}
++EXPORT_SYMBOL(pax_getxattr);
++#endif
++
+ ssize_t
+ vfs_getxattr(struct dentry *dentry, const char *name, void *value, size_t size)
+ {
+@@ -319,7 +340,7 @@ EXPORT_SYMBOL_GPL(vfs_removexattr);
   * Extended attribute SET operations
   */
  static long
@@ -56577,7 +55955,7 @@ index 3377dff..4feded6 100644
         size_t size, int flags)
  {
        int error;
-@@ -355,7 +355,12 @@ setxattr(struct dentry *d, const char __user *name, const void __user *value,
+@@ -355,7 +376,12 @@ setxattr(struct dentry *d, const char __user *name, const void __user *value,
                        posix_acl_fix_xattr_from_user(kvalue, size);
        }
  
@@ -56591,7 +55969,7 @@ index 3377dff..4feded6 100644
  out:
        if (vvalue)
                vfree(vvalue);
-@@ -377,7 +382,7 @@ retry:
+@@ -377,7 +403,7 @@ retry:
                return error;
        error = mnt_want_write(path.mnt);
        if (!error) {
@@ -56600,7 +55978,7 @@ index 3377dff..4feded6 100644
                mnt_drop_write(path.mnt);
        }
        path_put(&path);
-@@ -401,7 +406,7 @@ retry:
+@@ -401,7 +427,7 @@ retry:
                return error;
        error = mnt_want_write(path.mnt);
        if (!error) {
@@ -56609,7 +55987,7 @@ index 3377dff..4feded6 100644
                mnt_drop_write(path.mnt);
        }
        path_put(&path);
-@@ -416,16 +421,14 @@ SYSCALL_DEFINE5(fsetxattr, int, fd, const char __user *, name,
+@@ -416,16 +442,14 @@ SYSCALL_DEFINE5(fsetxattr, int, fd, const char __user *, name,
                const void __user *,value, size_t, size, int, flags)
  {
        struct fd f = fdget(fd);
@@ -56644,7 +56022,7 @@ index 9fbea87..6b19972 100644
        struct posix_acl *acl;
        struct posix_acl_entry *acl_e;
 diff --git a/fs/xfs/xfs_bmap.c b/fs/xfs/xfs_bmap.c
-index 572a858..12a9b0d 100644
+index b44af92..06073da 100644
 --- a/fs/xfs/xfs_bmap.c
 +++ b/fs/xfs/xfs_bmap.c
 @@ -192,7 +192,7 @@ xfs_bmap_validate_ret(
@@ -56678,7 +56056,7 @@ index 1b9fc3e..e1bdde0 100644
                        *offset = off & 0x7fffffff;
                        return 0;
 diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c
-index c1c3ef8..0952438 100644
+index d681e34..2a3f5ab 100644
 --- a/fs/xfs/xfs_ioctl.c
 +++ b/fs/xfs/xfs_ioctl.c
 @@ -127,7 +127,7 @@ xfs_find_handle(
@@ -56705,10 +56083,10 @@ index d82efaa..0904a8e 100644
                kfree(s);
 diff --git a/grsecurity/Kconfig b/grsecurity/Kconfig
 new file mode 100644
-index 0000000..92247e4
+index 0000000..7174794
 --- /dev/null
 +++ b/grsecurity/Kconfig
-@@ -0,0 +1,1021 @@
+@@ -0,0 +1,1031 @@
 +#
 +# grecurity configuration
 +#
@@ -56797,7 +56175,7 @@ index 0000000..92247e4
 +config GRKERNSEC_RAND_THREADSTACK
 +      bool "Insert random gaps between thread stacks"
 +      default y if GRKERNSEC_CONFIG_AUTO
-+      depends on PAX_RANDMMAP && !PPC
++      depends on PAX_RANDMMAP && !PPC && BROKEN
 +      help
 +        If you say Y here, a random-sized gap will be enforced between allocated
 +        thread stacks.  Glibc's NPTL and other threading libraries that
@@ -57273,6 +56651,16 @@ index 0000000..92247e4
 +        tasks.  If the sysctl option is enabled, a sysctl option with
 +        name "chroot_caps" is created.
 +
++config GRKERNSEC_CHROOT_INITRD
++      bool "Exempt initrd tasks from restrictions"
++      default y if GRKERNSEC_CONFIG_AUTO
++      depends on GRKERNSEC_CHROOT && BLK_DEV_RAM
++      help
++        If you say Y here, tasks started prior to init will be exempted from
++        grsecurity's chroot restrictions.  This option is mainly meant to
++        resolve Plymouth's performing privileged operations unnecessarily
++        in a chroot.
++
 +endmenu
 +menu "Kernel Auditing"
 +depends on GRKERNSEC
@@ -57776,10 +57164,10 @@ index 0000000..1b9afa9
 +endif
 diff --git a/grsecurity/gracl.c b/grsecurity/gracl.c
 new file mode 100644
-index 0000000..b306b36
+index 0000000..1248ee0
 --- /dev/null
 +++ b/grsecurity/gracl.c
-@@ -0,0 +1,4071 @@
+@@ -0,0 +1,4073 @@
 +#include <linux/kernel.h>
 +#include <linux/module.h>
 +#include <linux/sched.h>
@@ -57808,6 +57196,13 @@ index 0000000..b306b36
 +#include <linux/lglock.h>
 +#include <linux/hugetlb.h>
 +#include <linux/posix-timers.h>
++#if defined(CONFIG_BTRFS_FS) || defined(CONFIG_BTRFS_FS_MODULE)
++#include <linux/magic.h>
++#include <linux/pagemap.h>
++#include "../fs/btrfs/async-thread.h"
++#include "../fs/btrfs/ctree.h"
++#include "../fs/btrfs/btrfs_inode.h"
++#endif
 +#include "../fs/mount.h"
 +
 +#include <asm/uaccess.h>
@@ -57881,19 +57276,14 @@ index 0000000..b306b36
 +      return (gr_status & GR_READY);
 +}
 +
-+#ifdef CONFIG_BTRFS_FS
-+extern dev_t get_btrfs_dev_from_inode(struct inode *inode);
-+extern int btrfs_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat);
-+#endif
-+
 +static inline dev_t __get_dev(const struct dentry *dentry)
 +{
-+#ifdef CONFIG_BTRFS_FS
-+      if (dentry->d_inode->i_op && dentry->d_inode->i_op->getattr == &btrfs_getattr)
-+              return get_btrfs_dev_from_inode(dentry->d_inode);
++#if defined(CONFIG_BTRFS_FS) || defined(CONFIG_BTRFS_FS_MODULE)
++      if (dentry->d_sb->s_magic == BTRFS_SUPER_MAGIC)
++              return BTRFS_I(dentry->d_inode)->root->anon_dev;
 +      else
 +#endif
-+              return dentry->d_inode->i_sb->s_dev;
++              return dentry->d_sb->s_dev;
 +}
 +
 +dev_t gr_get_dev_from_dentry(struct dentry *dentry)
@@ -63197,10 +62587,10 @@ index 0000000..39645c9
 +}
 diff --git a/grsecurity/gracl_segv.c b/grsecurity/gracl_segv.c
 new file mode 100644
-index 0000000..cb1e5ab
+index 0000000..4dcc92a
 --- /dev/null
 +++ b/grsecurity/gracl_segv.c
-@@ -0,0 +1,303 @@
+@@ -0,0 +1,305 @@
 +#include <linux/kernel.h>
 +#include <linux/mm.h>
 +#include <asm/uaccess.h>
@@ -63218,6 +62608,13 @@ index 0000000..cb1e5ab
 +#include <linux/gracl.h>
 +#include <linux/grsecurity.h>
 +#include <linux/grinternal.h>
++#if defined(CONFIG_BTRFS_FS) || defined(CONFIG_BTRFS_FS_MODULE)
++#include <linux/magic.h>
++#include <linux/pagemap.h>
++#include "../fs/btrfs/async-thread.h"
++#include "../fs/btrfs/ctree.h"
++#include "../fs/btrfs/btrfs_inode.h"
++#endif
 +
 +static struct crash_uid *uid_set;
 +static unsigned short uid_used;
@@ -63227,19 +62624,14 @@ index 0000000..cb1e5ab
 +      lookup_acl_subj_label(const ino_t inode, const dev_t dev,
 +                            struct acl_role_label *role);
 +
-+#ifdef CONFIG_BTRFS_FS
-+extern dev_t get_btrfs_dev_from_inode(struct inode *inode);
-+extern int btrfs_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat);
-+#endif
-+
 +static inline dev_t __get_dev(const struct dentry *dentry)
 +{
-+#ifdef CONFIG_BTRFS_FS
-+      if (dentry->d_inode->i_op && dentry->d_inode->i_op->getattr == &btrfs_getattr)
-+              return get_btrfs_dev_from_inode(dentry->d_inode);
++#if defined(CONFIG_BTRFS_FS) || defined(CONFIG_BTRFS_FS_MODULE)
++      if (dentry->d_sb->s_magic == BTRFS_SUPER_MAGIC)
++              return BTRFS_I(dentry->d_inode)->root->anon_dev;
 +      else
 +#endif
-+              return dentry->d_inode->i_sb->s_dev;
++              return dentry->d_sb->s_dev;
 +}
 +
 +int
@@ -63577,10 +62969,10 @@ index 0000000..bc0be01
 +}
 diff --git a/grsecurity/grsec_chroot.c b/grsecurity/grsec_chroot.c
 new file mode 100644
-index 0000000..6d2de57
+index 0000000..bd6e105
 --- /dev/null
 +++ b/grsecurity/grsec_chroot.c
-@@ -0,0 +1,357 @@
+@@ -0,0 +1,370 @@
 +#include <linux/kernel.h>
 +#include <linux/module.h>
 +#include <linux/sched.h>
@@ -63592,14 +62984,27 @@ index 0000000..6d2de57
 +#include <linux/grsecurity.h>
 +#include <linux/grinternal.h>
 +
-+void gr_set_chroot_entries(struct task_struct *task, struct path *path)
++#ifdef CONFIG_GRKERNSEC_CHROOT_INITRD
++static int gr_init_ran;
++#endif
++
++void gr_set_chroot_entries(struct task_struct *task, const struct path *path)
 +{
 +#ifdef CONFIG_GRKERNSEC
 +      if (task_pid_nr(task) > 1 && path->dentry != init_task.fs->root.dentry &&
-+                           path->dentry != task->nsproxy->mnt_ns->root->mnt.mnt_root)
++                           path->dentry != task->nsproxy->mnt_ns->root->mnt.mnt_root
++#ifdef CONFIG_GRKERNSEC_CHROOT_INITRD
++                           && gr_init_ran
++#endif
++         )
 +              task->gr_is_chrooted = 1;
-+      else
++      else {
++#ifdef CONFIG_GRKERNSEC_CHROOT_INITRD
++              if (task_pid_nr(task) == 1 && !gr_init_ran)
++                      gr_init_ran = 1;
++#endif
 +              task->gr_is_chrooted = 0;
++      }
 +
 +      task->gr_chroot_dentry = path->dentry;
 +#endif
@@ -63914,7 +63319,7 @@ index 0000000..6d2de57
 +}
 +
 +void
-+gr_handle_chroot_chdir(struct path *path)
++gr_handle_chroot_chdir(const struct path *path)
 +{
 +#ifdef CONFIG_GRKERNSEC_CHROOT_CHDIR
 +      if (grsec_enable_chroot_chdir)
@@ -63940,7 +63345,7 @@ index 0000000..6d2de57
 +}
 diff --git a/grsecurity/grsec_disabled.c b/grsecurity/grsec_disabled.c
 new file mode 100644
-index 0000000..207d409
+index 0000000..ce65ceb
 --- /dev/null
 +++ b/grsecurity/grsec_disabled.c
 @@ -0,0 +1,434 @@
@@ -64365,7 +63770,7 @@ index 0000000..207d409
 +
 +dev_t gr_get_dev_from_dentry(struct dentry *dentry)
 +{
-+      return dentry->d_inode->i_sb->s_dev;
++      return dentry->d_sb->s_dev;
 +}
 +
 +void gr_put_exec_file(struct task_struct *task)
@@ -66989,10 +66394,10 @@ index b7babf0..04ad282 100644
 +
  #endif  /*  _ASM_GENERIC_ATOMIC_LONG_H  */
 diff --git a/include/asm-generic/atomic.h b/include/asm-generic/atomic.h
-index 1ced641..c896ee8 100644
+index 33bd2de..f31bff97 100644
 --- a/include/asm-generic/atomic.h
 +++ b/include/asm-generic/atomic.h
-@@ -159,7 +159,7 @@ static inline int __atomic_add_unless(atomic_t *v, int a, int u)
+@@ -153,7 +153,7 @@ static inline int __atomic_add_unless(atomic_t *v, int a, int u)
   * Atomically clears the bits set in @mask from @v
   */
  #ifndef atomic_clear_mask
@@ -67197,7 +66602,7 @@ index 810431d..0ec4804f 100644
   * (puds are folded into pgds so this doesn't get actually called,
   * but the define is needed for a generic inline function.)
 diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h
-index 5cf680a..4b74d62 100644
+index a59ff51..2594a70 100644
 --- a/include/asm-generic/pgtable.h
 +++ b/include/asm-generic/pgtable.h
 @@ -688,6 +688,14 @@ static inline pmd_t pmd_mknuma(pmd_t pmd)
@@ -67216,10 +66621,10 @@ index 5cf680a..4b74d62 100644
  
  #endif /* !__ASSEMBLY__ */
 diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
-index d1ea7ce..b1ebf2a 100644
+index afa12c7..99d4da0 100644
 --- a/include/asm-generic/vmlinux.lds.h
 +++ b/include/asm-generic/vmlinux.lds.h
-@@ -218,6 +218,7 @@
+@@ -245,6 +245,7 @@
        .rodata           : AT(ADDR(.rodata) - LOAD_OFFSET) {           \
                VMLINUX_SYMBOL(__start_rodata) = .;                     \
                *(.rodata) *(.rodata.*)                                 \
@@ -67227,7 +66632,7 @@ index d1ea7ce..b1ebf2a 100644
                *(__vermagic)           /* Kernel version magic */      \
                . = ALIGN(8);                                           \
                VMLINUX_SYMBOL(__start___tracepoints_ptrs) = .;         \
-@@ -725,17 +726,18 @@
+@@ -755,17 +756,18 @@
   * section in the linker script will go there too.  @phdr should have
   * a leading colon.
   *
@@ -67264,7 +66669,7 @@ index 418d270..bfd2794 100644
  struct crypto_instance {
        struct crypto_alg alg;
 diff --git a/include/drm/drmP.h b/include/drm/drmP.h
-index fad21c9..ab858bc 100644
+index f1ce786..086a7a5 100644
 --- a/include/drm/drmP.h
 +++ b/include/drm/drmP.h
 @@ -72,6 +72,7 @@
@@ -67275,7 +66680,7 @@ index fad21c9..ab858bc 100644
  #include <drm/drm.h>
  #include <drm/drm_sarea.h>
  
-@@ -293,10 +294,12 @@ do {                                                                             \
+@@ -296,10 +297,12 @@ do {                                                                             \
   * \param cmd command.
   * \param arg argument.
   */
@@ -67290,7 +66695,7 @@ index fad21c9..ab858bc 100644
                               unsigned long arg);
  
  #define DRM_IOCTL_NR(n)                _IOC_NR(n)
-@@ -311,9 +314,9 @@ typedef int drm_ioctl_compat_t(struct file *filp, unsigned int cmd,
+@@ -314,9 +317,9 @@ typedef int drm_ioctl_compat_t(struct file *filp, unsigned int cmd,
  struct drm_ioctl_desc {
        unsigned int cmd;
        int flags;
@@ -67302,7 +66707,7 @@ index fad21c9..ab858bc 100644
  
  /**
   * Creates a driver or general drm_ioctl_desc array entry for the given
-@@ -995,7 +998,7 @@ struct drm_info_list {
+@@ -1014,7 +1017,7 @@ struct drm_info_list {
        int (*show)(struct seq_file*, void*); /** show callback */
        u32 driver_features; /**< Required driver features for this entry */
        void *data;
@@ -67311,7 +66716,7 @@ index fad21c9..ab858bc 100644
  
  /**
   * debugfs node structure. This structure represents a debugfs file.
-@@ -1068,7 +1071,7 @@ struct drm_device {
+@@ -1087,7 +1090,7 @@ struct drm_device {
  
        /** \name Usage Counters */
        /*@{ */
@@ -67320,7 +66725,7 @@ index fad21c9..ab858bc 100644
        atomic_t ioctl_count;           /**< Outstanding IOCTLs pending */
        atomic_t vma_count;             /**< Outstanding vma areas open */
        int buf_use;                    /**< Buffers in use -- cannot alloc */
-@@ -1079,7 +1082,7 @@ struct drm_device {
+@@ -1098,7 +1101,7 @@ struct drm_device {
        /*@{ */
        unsigned long counters;
        enum drm_stat_type types[15];
@@ -67391,7 +66796,7 @@ index c1da539..1dcec55 100644
  struct atmphy_ops {
        int (*start)(struct atm_dev *dev);
 diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h
-index 0530b98..96a8ac0 100644
+index c3a0914..ec5d48a 100644
 --- a/include/linux/binfmts.h
 +++ b/include/linux/binfmts.h
 @@ -73,8 +73,9 @@ struct linux_binfmt {
@@ -67406,10 +66811,10 @@ index 0530b98..96a8ac0 100644
  extern void __register_binfmt(struct linux_binfmt *fmt, int insert);
  
 diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
-index f94bc83..62b9cfe 100644
+index 33f358f..7f2c27f 100644
 --- a/include/linux/blkdev.h
 +++ b/include/linux/blkdev.h
-@@ -1498,7 +1498,7 @@ struct block_device_operations {
+@@ -1499,7 +1499,7 @@ struct block_device_operations {
        /* this callback is with swap_lock and sometimes page table lock held */
        void (*swap_slot_free_notify) (struct block_device *, unsigned long);
        struct module *owner;
@@ -67447,13 +66852,13 @@ index 4c57065..4307975 100644
  #define ____cacheline_aligned __attribute__((__aligned__(SMP_CACHE_BYTES)))
  #endif
 diff --git a/include/linux/capability.h b/include/linux/capability.h
-index 98503b7..cc36d18 100644
+index d9a4f7f4..19f77d6 100644
 --- a/include/linux/capability.h
 +++ b/include/linux/capability.h
-@@ -211,8 +211,13 @@ extern bool capable(int cap);
- extern bool ns_capable(struct user_namespace *ns, int cap);
+@@ -213,8 +213,13 @@ extern bool ns_capable(struct user_namespace *ns, int cap);
  extern bool nsown_capable(int cap);
  extern bool inode_capable(const struct inode *inode, int cap);
+ extern bool file_ns_capable(const struct file *file, struct user_namespace *ns, int cap);
 +extern bool capable_nolog(int cap);
 +extern bool ns_capable_nolog(struct user_namespace *ns, int cap);
 +extern bool inode_capable_nolog(const struct inode *inode, int cap);
@@ -67490,10 +66895,10 @@ index 42e55de..1cd0e66 100644
  extern struct cleancache_ops
        cleancache_register_ops(struct cleancache_ops *ops);
 diff --git a/include/linux/compat.h b/include/linux/compat.h
-index dec7e2d..45db13f 100644
+index 377cd8c..2479845 100644
 --- a/include/linux/compat.h
 +++ b/include/linux/compat.h
-@@ -311,14 +311,14 @@ long compat_sys_msgsnd(int first, int second, int third, void __user *uptr);
+@@ -332,14 +332,14 @@ long compat_sys_msgsnd(int first, int second, int third, void __user *uptr);
  long compat_sys_msgrcv(int first, int second, int msgtyp, int third,
                int version, void __user *uptr);
  long compat_sys_shmat(int first, int second, compat_uptr_t third, int version,
@@ -67510,7 +66915,7 @@ index dec7e2d..45db13f 100644
  #endif
  long compat_sys_msgctl(int first, int second, void __user *uptr);
  long compat_sys_shmctl(int first, int second, void __user *uptr);
-@@ -414,7 +414,7 @@ extern int compat_ptrace_request(struct task_struct *child,
+@@ -442,7 +442,7 @@ extern int compat_ptrace_request(struct task_struct *child,
  extern long compat_arch_ptrace(struct task_struct *child, compat_long_t request,
                               compat_ulong_t addr, compat_ulong_t data);
  asmlinkage long compat_sys_ptrace(compat_long_t request, compat_long_t pid,
@@ -67520,13 +66925,21 @@ index dec7e2d..45db13f 100644
  /*
   * epoll (fs/eventpoll.c) compat bits follow ...
 diff --git a/include/linux/compiler-gcc4.h b/include/linux/compiler-gcc4.h
-index 662fd1b..e801992 100644
+index 68b162d..660f5f0 100644
 --- a/include/linux/compiler-gcc4.h
 +++ b/include/linux/compiler-gcc4.h
-@@ -34,6 +34,21 @@
- #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
+@@ -39,9 +39,29 @@
+ # define __compiletime_warning(message) __attribute__((warning(message)))
+ # define __compiletime_error(message) __attribute__((error(message)))
+ #endif /* __CHECKER__ */
++
++#define __alloc_size(...)     __attribute((alloc_size(__VA_ARGS__)))
++#define __bos(ptr, arg)               __builtin_object_size((ptr), (arg))
++#define __bos0(ptr)           __bos((ptr), 0)
++#define __bos1(ptr)           __bos((ptr), 1)
+ #endif /* GCC_VERSION >= 40300 */
  
- #if __GNUC_MINOR__ >= 5
+ #if GCC_VERSION >= 40500
 +
 +#ifdef CONSTIFY_PLUGIN
 +#define __no_const __attribute__((no_const))
@@ -67545,20 +66958,8 @@ index 662fd1b..e801992 100644
  /*
   * Mark a position in code as unreachable.  This can be used to
   * suppress control flow warnings after asm blocks that transfer
-@@ -49,6 +64,11 @@
- #define __noclone     __attribute__((__noclone__))
- #endif
-+
-+#define __alloc_size(...)     __attribute((alloc_size(__VA_ARGS__)))
-+#define __bos(ptr, arg)               __builtin_object_size((ptr), (arg))
-+#define __bos0(ptr)           __bos((ptr), 0)
-+#define __bos1(ptr)           __bos((ptr), 1)
- #endif
- #if __GNUC_MINOR__ >= 6
 diff --git a/include/linux/compiler.h b/include/linux/compiler.h
-index dd852b7..1ad5fba 100644
+index 10b8f23..5e0b083 100644
 --- a/include/linux/compiler.h
 +++ b/include/linux/compiler.h
 @@ -5,11 +5,14 @@
@@ -67676,7 +67077,7 @@ index dd852b7..1ad5fba 100644
  /* Simple shorthand for a section definition */
  #ifndef __section
  # define __section(S) __attribute__ ((__section__(#S)))
-@@ -323,6 +381,7 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect);
+@@ -349,6 +407,7 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect);
   * use is to mediate communication between process-level code and irq/NMI
   * handlers, all running on the same CPU.
   */
@@ -67686,17 +67087,19 @@ index dd852b7..1ad5fba 100644
  
  #endif /* __LINUX_COMPILER_H */
 diff --git a/include/linux/completion.h b/include/linux/completion.h
-index 51494e6..0fd1b61 100644
+index 33f0280..35c6568 100644
 --- a/include/linux/completion.h
 +++ b/include/linux/completion.h
-@@ -78,13 +78,13 @@ static inline void init_completion(struct completion *x)
+@@ -79,15 +79,15 @@ static inline void init_completion(struct completion *x)
  extern void wait_for_completion(struct completion *);
+ extern void wait_for_completion_io(struct completion *);
  extern int wait_for_completion_interruptible(struct completion *x);
 -extern int wait_for_completion_killable(struct completion *x);
 +extern int wait_for_completion_killable(struct completion *x) __intentional_overflow(-1);
  extern unsigned long wait_for_completion_timeout(struct completion *x,
                                                   unsigned long timeout);
+ extern unsigned long wait_for_completion_io_timeout(struct completion *x,
+                                                   unsigned long timeout);
  extern long wait_for_completion_interruptible_timeout(
 -      struct completion *x, unsigned long timeout);
 +      struct completion *x, unsigned long timeout) __intentional_overflow(-1);
@@ -67733,10 +67136,10 @@ index ce7a074..01ab8ac 100644
        register_cpu_notifier(&fn##_nb);                        \
  }
 diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
-index a55b88e..fba90c5 100644
+index a22944c..4e695fe 100644
 --- a/include/linux/cpufreq.h
 +++ b/include/linux/cpufreq.h
-@@ -240,7 +240,7 @@ struct cpufreq_driver {
+@@ -252,7 +252,7 @@ struct cpufreq_driver {
        int     (*suspend)      (struct cpufreq_policy *policy);
        int     (*resume)       (struct cpufreq_policy *policy);
        struct freq_attr        **attr;
@@ -67745,7 +67148,7 @@ index a55b88e..fba90c5 100644
  
  /* flags */
  
-@@ -299,6 +299,7 @@ struct global_attr {
+@@ -311,6 +311,7 @@ struct global_attr {
        ssize_t (*store)(struct kobject *a, struct attribute *b,
                         const char *c, size_t count);
  };
@@ -67754,10 +67157,10 @@ index a55b88e..fba90c5 100644
  #define define_one_global_ro(_name)           \
  static struct global_attr _name =             \
 diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h
-index 24cd1037..20a63aae 100644
+index 480c14d..552896f 100644
 --- a/include/linux/cpuidle.h
 +++ b/include/linux/cpuidle.h
-@@ -54,7 +54,8 @@ struct cpuidle_state {
+@@ -52,7 +52,8 @@ struct cpuidle_state {
                        int index);
  
        int (*enter_dead) (struct cpuidle_device *dev, int index);
@@ -67767,7 +67170,7 @@ index 24cd1037..20a63aae 100644
  
  /* Idle State Flags */
  #define CPUIDLE_FLAG_TIME_VALID       (0x01) /* is residency time measurable? */
-@@ -216,7 +217,7 @@ struct cpuidle_governor {
+@@ -194,7 +195,7 @@ struct cpuidle_governor {
        void (*reflect)         (struct cpuidle_device *dev, int index);
  
        struct module           *owner;
@@ -67898,7 +67301,7 @@ index 7925bf0..d5143d2 100644
  
  #define large_malloc(a) vmalloc(a)
 diff --git a/include/linux/devfreq.h b/include/linux/devfreq.h
-index e83ef39..33e0eb3 100644
+index fe8c447..bdc1f33 100644
 --- a/include/linux/devfreq.h
 +++ b/include/linux/devfreq.h
 @@ -114,7 +114,7 @@ struct devfreq_governor {
@@ -67911,10 +67314,10 @@ index e83ef39..33e0eb3 100644
  /**
   * struct devfreq - Device devfreq structure
 diff --git a/include/linux/device.h b/include/linux/device.h
-index 43dcda9..7a1fb65 100644
+index 9d6464e..8a5cc92 100644
 --- a/include/linux/device.h
 +++ b/include/linux/device.h
-@@ -294,7 +294,7 @@ struct subsys_interface {
+@@ -295,7 +295,7 @@ struct subsys_interface {
        struct list_head node;
        int (*add_dev)(struct device *dev, struct subsys_interface *sif);
        int (*remove_dev)(struct device *dev, struct subsys_interface *sif);
@@ -67923,7 +67326,7 @@ index 43dcda9..7a1fb65 100644
  
  int subsys_interface_register(struct subsys_interface *sif);
  void subsys_interface_unregister(struct subsys_interface *sif);
-@@ -474,7 +474,7 @@ struct device_type {
+@@ -475,7 +475,7 @@ struct device_type {
        void (*release)(struct device *dev);
  
        const struct dev_pm_ops *pm;
@@ -67932,7 +67335,7 @@ index 43dcda9..7a1fb65 100644
  
  /* interface for exporting device attributes */
  struct device_attribute {
-@@ -484,11 +484,12 @@ struct device_attribute {
+@@ -485,11 +485,12 @@ struct device_attribute {
        ssize_t (*store)(struct device *dev, struct device_attribute *attr,
                         const char *buf, size_t count);
  };
@@ -67960,10 +67363,10 @@ index 94af418..b1ca7a2 100644
  #define DMA_BIT_MASK(n)       (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
  
 diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
-index d3201e4..8281e63 100644
+index 91ac8da..a841318 100644
 --- a/include/linux/dmaengine.h
 +++ b/include/linux/dmaengine.h
-@@ -1018,9 +1018,9 @@ struct dma_pinned_list {
+@@ -1034,9 +1034,9 @@ struct dma_pinned_list {
  struct dma_pinned_list *dma_pin_iovec_pages(struct iovec *iov, size_t len);
  void dma_unpin_iovec_pages(struct dma_pinned_list* pinned_list);
  
@@ -67976,22 +67379,22 @@ index d3201e4..8281e63 100644
        unsigned int offset, size_t len);
  
 diff --git a/include/linux/efi.h b/include/linux/efi.h
-index 7a9498a..155713d 100644
+index 3d7df3d..301f024 100644
 --- a/include/linux/efi.h
 +++ b/include/linux/efi.h
-@@ -733,6 +733,7 @@ struct efivar_operations {
+@@ -740,6 +740,7 @@ struct efivar_operations {
        efi_set_variable_t *set_variable;
-       efi_query_variable_info_t *query_variable_info;
+       efi_query_variable_store_t *query_variable_store;
  };
 +typedef struct efivar_operations __no_const efivar_operations_no_const;
  
  struct efivars {
        /*
 diff --git a/include/linux/elf.h b/include/linux/elf.h
-index 8c9048e..16a4665 100644
+index 40a3c0e..4c45a38 100644
 --- a/include/linux/elf.h
 +++ b/include/linux/elf.h
-@@ -20,6 +20,7 @@ extern Elf32_Dyn _DYNAMIC [];
+@@ -24,6 +24,7 @@ extern Elf32_Dyn _DYNAMIC [];
  #define elf_note      elf32_note
  #define elf_addr_t    Elf32_Off
  #define Elf_Half      Elf32_Half
@@ -67999,7 +67402,7 @@ index 8c9048e..16a4665 100644
  
  #else
  
-@@ -30,6 +31,7 @@ extern Elf64_Dyn _DYNAMIC [];
+@@ -34,6 +35,7 @@ extern Elf64_Dyn _DYNAMIC [];
  #define elf_note      elf64_note
  #define elf_addr_t    Elf64_Off
  #define Elf_Half      Elf64_Half
@@ -68040,10 +67443,10 @@ index fcb51c8..bdafcf6 100644
  
  /**
 diff --git a/include/linux/fb.h b/include/linux/fb.h
-index c7a9571..02eeffe 100644
+index 58b9860..58e5516 100644
 --- a/include/linux/fb.h
 +++ b/include/linux/fb.h
-@@ -302,7 +302,7 @@ struct fb_ops {
+@@ -304,7 +304,7 @@ struct fb_ops {
        /* called at KDB enter and leave time to prepare the console */
        int (*fb_debug_enter)(struct fb_info *info);
        int (*fb_debug_leave)(struct fb_info *info);
@@ -68088,7 +67491,7 @@ index 3044254..9767f41 100644
  extern bool frontswap_enabled;
  extern struct frontswap_ops
 diff --git a/include/linux/fs.h b/include/linux/fs.h
-index 7617ee0..b575199 100644
+index 2c28271..8d3d74c 100644
 --- a/include/linux/fs.h
 +++ b/include/linux/fs.h
 @@ -1541,7 +1541,8 @@ struct file_operations {
@@ -68101,7 +67504,7 @@ index 7617ee0..b575199 100644
  
  struct inode_operations {
        struct dentry * (*lookup) (struct inode *,struct dentry *, unsigned int);
-@@ -2665,4 +2666,14 @@ static inline void inode_has_no_xattr(struct inode *inode)
+@@ -2672,4 +2673,14 @@ static inline void inode_has_no_xattr(struct inode *inode)
                inode->i_flags |= S_NOSEC;
  }
  
@@ -68117,7 +67520,7 @@ index 7617ee0..b575199 100644
 +
  #endif /* _LINUX_FS_H */
 diff --git a/include/linux/fs_struct.h b/include/linux/fs_struct.h
-index 324f931..f292b65 100644
+index 2b93a9a..855d94a 100644
 --- a/include/linux/fs_struct.h
 +++ b/include/linux/fs_struct.h
 @@ -6,7 +6,7 @@
@@ -68165,7 +67568,7 @@ index 7a08623..4c07b0f 100644
  /*
   * fscache cached network filesystem type
 diff --git a/include/linux/fsnotify.h b/include/linux/fsnotify.h
-index 0fbfb46..508eb0d 100644
+index a78680a..87bd73e 100644
 --- a/include/linux/fsnotify.h
 +++ b/include/linux/fsnotify.h
 @@ -195,6 +195,9 @@ static inline void fsnotify_access(struct file *file)
@@ -68198,20 +67601,20 @@ index 0fbfb46..508eb0d 100644
  
  /*
 diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h
-index a3d4895..ddd2a50 100644
+index 13a54d0..c6ce2a7 100644
 --- a/include/linux/ftrace_event.h
 +++ b/include/linux/ftrace_event.h
-@@ -272,7 +272,7 @@ extern int trace_define_field(struct ftrace_event_call *call, const char *type,
+@@ -274,7 +274,7 @@ extern int trace_define_field(struct ftrace_event_call *call, const char *type,
  extern int trace_add_event_call(struct ftrace_event_call *call);
  extern void trace_remove_event_call(struct ftrace_event_call *call);
  
--#define is_signed_type(type)  (((type)(-1)) < 0)
+-#define is_signed_type(type)  (((type)(-1)) < (type)0)
 +#define is_signed_type(type)  (((type)(-1)) < (type)1)
  
  int trace_set_clr_event(const char *system, const char *event, int set);
  
 diff --git a/include/linux/genhd.h b/include/linux/genhd.h
-index 79b8bba..86b539e 100644
+index 9f3c275..911b591 100644
 --- a/include/linux/genhd.h
 +++ b/include/linux/genhd.h
 @@ -194,7 +194,7 @@ struct gendisk {
@@ -68768,7 +68171,7 @@ index 0000000..be66033
 +#endif
 diff --git a/include/linux/grinternal.h b/include/linux/grinternal.h
 new file mode 100644
-index 0000000..9bb6662
+index 0000000..5402bce
 --- /dev/null
 +++ b/include/linux/grinternal.h
 @@ -0,0 +1,215 @@
@@ -68867,19 +68270,19 @@ index 0000000..9bb6662
 +
 +#define gr_task_fullpath(tsk) ((tsk)->exec_file ? \
 +                      gr_to_filename2((tsk)->exec_file->f_path.dentry, \
-+                      (tsk)->exec_file->f_vfsmnt) : "/")
++                      (tsk)->exec_file->f_path.mnt) : "/")
 +
 +#define gr_parent_task_fullpath(tsk) ((tsk)->real_parent->exec_file ? \
 +                      gr_to_filename3((tsk)->real_parent->exec_file->f_path.dentry, \
-+                      (tsk)->real_parent->exec_file->f_vfsmnt) : "/")
++                      (tsk)->real_parent->exec_file->f_path.mnt) : "/")
 +
 +#define gr_task_fullpath0(tsk) ((tsk)->exec_file ? \
 +                      gr_to_filename((tsk)->exec_file->f_path.dentry, \
-+                      (tsk)->exec_file->f_vfsmnt) : "/")
++                      (tsk)->exec_file->f_path.mnt) : "/")
 +
 +#define gr_parent_task_fullpath0(tsk) ((tsk)->real_parent->exec_file ? \
 +                      gr_to_filename1((tsk)->real_parent->exec_file->f_path.dentry, \
-+                      (tsk)->real_parent->exec_file->f_vfsmnt) : "/")
++                      (tsk)->real_parent->exec_file->f_path.mnt) : "/")
 +
 +#define proc_is_chrooted(tsk_a)  ((tsk_a)->gr_is_chrooted)
 +
@@ -69106,7 +68509,7 @@ index 0000000..2bd4c8d
 +#define GR_BRUTE_DAEMON_MSG "bruteforce prevention initiated for the next 30 minutes or until service restarted, stalling each fork 30 seconds.  Please investigate the crash report for "
 diff --git a/include/linux/grsecurity.h b/include/linux/grsecurity.h
 new file mode 100644
-index 0000000..8da63a4
+index 0000000..d7ef0ac
 --- /dev/null
 +++ b/include/linux/grsecurity.h
 @@ -0,0 +1,242 @@
@@ -69154,7 +68557,7 @@ index 0000000..8da63a4
 +int gr_chroot_fchdir(struct dentry *u_dentry, struct vfsmount *u_mnt);
 +int gr_handle_chroot_chroot(const struct dentry *dentry,
 +                                 const struct vfsmount *mnt);
-+void gr_handle_chroot_chdir(struct path *path);
++void gr_handle_chroot_chdir(const struct path *path);
 +int gr_handle_chroot_chmod(const struct dentry *dentry,
 +                                const struct vfsmount *mnt, const int mode);
 +int gr_handle_chroot_mknod(const struct dentry *dentry,
@@ -69174,7 +68577,7 @@ index 0000000..8da63a4
 +
 +int gr_tpe_allow(const struct file *file);
 +
-+void gr_set_chroot_entries(struct task_struct *task, struct path *path);
++void gr_set_chroot_entries(struct task_struct *task, const struct path *path);
 +void gr_clear_chroot_entries(struct task_struct *task);
 +
 +void gr_log_forkfail(const int retval);
@@ -69378,7 +68781,7 @@ index 0000000..e7ffaaf
 +
 +#endif
 diff --git a/include/linux/highmem.h b/include/linux/highmem.h
-index ef788b5..ac41b7b 100644
+index 7fb31da..08b5114 100644
 --- a/include/linux/highmem.h
 +++ b/include/linux/highmem.h
 @@ -189,6 +189,18 @@ static inline void clear_highpage(struct page *page)
@@ -69462,7 +68865,7 @@ index aff7ad8..3942bbd 100644
  extern int register_pppox_proto(int proto_num, const struct pppox_proto *pp);
  extern void unregister_pppox_proto(int proto_num);
 diff --git a/include/linux/init.h b/include/linux/init.h
-index 10ed4f4..8e8490d 100644
+index 8618147..0821126 100644
 --- a/include/linux/init.h
 +++ b/include/linux/init.h
 @@ -39,9 +39,36 @@
@@ -69522,10 +68925,10 @@ index 10ed4f4..8e8490d 100644
  #define __meminitconst   __constsection(.meminit.rodata)
  #define __memexit        __section(.memexit.text) __exitused __cold notrace
 diff --git a/include/linux/init_task.h b/include/linux/init_task.h
-index 6d087c5..401cab8 100644
+index 5cd0f09..c9f67cc 100644
 --- a/include/linux/init_task.h
 +++ b/include/linux/init_task.h
-@@ -143,6 +143,12 @@ extern struct task_group root_task_group;
+@@ -154,6 +154,12 @@ extern struct task_group root_task_group;
  
  #define INIT_TASK_COMM "swapper"
  
@@ -69538,7 +68941,7 @@ index 6d087c5..401cab8 100644
  /*
   *  INIT_TASK is used to set up the first task table, touch at
   * your own risk!. Base=0, limit=0x1fffff (=2MB)
-@@ -182,6 +188,7 @@ extern struct task_group root_task_group;
+@@ -193,6 +199,7 @@ extern struct task_group root_task_group;
        RCU_POINTER_INITIALIZER(cred, &init_cred),                      \
        .comm           = INIT_TASK_COMM,                               \
        .thread         = INIT_THREAD,                                  \
@@ -69576,20 +68979,33 @@ index 5fa5afe..ac55b25 100644
  extern void __raise_softirq_irqoff(unsigned int nr);
  
 diff --git a/include/linux/iommu.h b/include/linux/iommu.h
-index f3b99e1..9b73cee 100644
+index ba3b8a9..7e14ed8 100644
 --- a/include/linux/iommu.h
 +++ b/include/linux/iommu.h
-@@ -101,7 +101,7 @@ struct iommu_ops {
-       int (*domain_set_attr)(struct iommu_domain *domain,
-                              enum iommu_attr attr, void *data);
+@@ -113,7 +113,7 @@ struct iommu_ops {
+       u32 (*domain_get_windows)(struct iommu_domain *domain);
        unsigned long pgsize_bitmap;
 -};
 +} __do_const;
  
  #define IOMMU_GROUP_NOTIFY_ADD_DEVICE         1 /* Device added */
  #define IOMMU_GROUP_NOTIFY_DEL_DEVICE         2 /* Pre Device removed */
+diff --git a/include/linux/ioport.h b/include/linux/ioport.h
+index 85ac9b9b..e5759ab 100644
+--- a/include/linux/ioport.h
++++ b/include/linux/ioport.h
+@@ -161,7 +161,7 @@ struct resource *lookup_resource(struct resource *root, resource_size_t start);
+ int adjust_resource(struct resource *res, resource_size_t start,
+                   resource_size_t size);
+ resource_size_t resource_alignment(struct resource *res);
+-static inline resource_size_t resource_size(const struct resource *res)
++static inline resource_size_t __intentional_overflow(-1) resource_size(const struct resource *res)
+ {
+       return res->end - res->start + 1;
+ }
 diff --git a/include/linux/irq.h b/include/linux/irq.h
-index fdf2c4a..5332486 100644
+index bc4e066..50468a9 100644
 --- a/include/linux/irq.h
 +++ b/include/linux/irq.h
 @@ -328,7 +328,8 @@ struct irq_chip {
@@ -69602,6 +69018,23 @@ index fdf2c4a..5332486 100644
  
  /*
   * irq_chip specific flags
+diff --git a/include/linux/irqchip/arm-gic.h b/include/linux/irqchip/arm-gic.h
+index 3fd8e42..a73e966 100644
+--- a/include/linux/irqchip/arm-gic.h
++++ b/include/linux/irqchip/arm-gic.h
+@@ -59,9 +59,11 @@
+ #ifndef __ASSEMBLY__
++#include <linux/irq.h>
++
+ struct device_node;
+-extern struct irq_chip gic_arch_extn;
++extern irq_chip_no_const gic_arch_extn;
+ void gic_init_bases(unsigned int, int, void __iomem *, void __iomem *,
+                   u32 offset, struct device_node *);
 diff --git a/include/linux/kallsyms.h b/include/linux/kallsyms.h
 index 6883e19..06992b1 100644
 --- a/include/linux/kallsyms.h
@@ -69648,10 +69081,10 @@ index 518a53a..5e28358 100644
  extern struct key_type key_type_keyring;
  
 diff --git a/include/linux/kgdb.h b/include/linux/kgdb.h
-index 4dff0c6..1ca9b72 100644
+index c6e091b..a940adf 100644
 --- a/include/linux/kgdb.h
 +++ b/include/linux/kgdb.h
-@@ -53,7 +53,7 @@ extern int kgdb_connected;
+@@ -52,7 +52,7 @@ extern int kgdb_connected;
  extern int kgdb_io_module_registered;
  
  extern atomic_t                       kgdb_setting_breakpoint;
@@ -69660,7 +69093,7 @@ index 4dff0c6..1ca9b72 100644
  
  extern struct task_struct     *kgdb_usethread;
  extern struct task_struct     *kgdb_contthread;
-@@ -255,7 +255,7 @@ struct kgdb_arch {
+@@ -254,7 +254,7 @@ struct kgdb_arch {
        void    (*correct_hw_break)(void);
  
        void    (*enable_nmi)(bool on);
@@ -69669,7 +69102,7 @@ index 4dff0c6..1ca9b72 100644
  
  /**
   * struct kgdb_io - Describe the interface for an I/O driver to talk with KGDB.
-@@ -280,7 +280,7 @@ struct kgdb_io {
+@@ -279,7 +279,7 @@ struct kgdb_io {
        void                    (*pre_exception) (void);
        void                    (*post_exception) (void);
        int                     is_console;
@@ -69726,10 +69159,10 @@ index f66b065..c2c29b4 100644
  int kobj_ns_type_register(const struct kobj_ns_type_operations *ops);
  int kobj_ns_type_registered(enum kobj_ns_type type);
 diff --git a/include/linux/kref.h b/include/linux/kref.h
-index 4972e6e..de4d19b 100644
+index 7419c02..aa2f02d 100644
 --- a/include/linux/kref.h
 +++ b/include/linux/kref.h
-@@ -64,7 +64,7 @@ static inline void kref_get(struct kref *kref)
+@@ -65,7 +65,7 @@ static inline void kref_get(struct kref *kref)
  static inline int kref_sub(struct kref *kref, unsigned int count,
             void (*release)(struct kref *kref))
  {
@@ -69739,10 +69172,10 @@ index 4972e6e..de4d19b 100644
        if (atomic_sub_and_test((int) count, &kref->refcount)) {
                release(kref);
 diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
-index 2c497ab..afe32f5 100644
+index c139582..0b5b102 100644
 --- a/include/linux/kvm_host.h
 +++ b/include/linux/kvm_host.h
-@@ -418,7 +418,7 @@ void kvm_vcpu_uninit(struct kvm_vcpu *vcpu);
+@@ -424,7 +424,7 @@ void kvm_vcpu_uninit(struct kvm_vcpu *vcpu);
  int __must_check vcpu_load(struct kvm_vcpu *vcpu);
  void vcpu_put(struct kvm_vcpu *vcpu);
  
@@ -69751,7 +69184,7 @@ index 2c497ab..afe32f5 100644
                  struct module *module);
  void kvm_exit(void);
  
-@@ -574,7 +574,7 @@ int kvm_arch_vcpu_ioctl_set_guest_debug(struct kvm_vcpu *vcpu,
+@@ -582,7 +582,7 @@ int kvm_arch_vcpu_ioctl_set_guest_debug(struct kvm_vcpu *vcpu,
                                        struct kvm_guest_debug *dbg);
  int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run);
  
@@ -69761,10 +69194,10 @@ index 2c497ab..afe32f5 100644
  
  int kvm_arch_vcpu_init(struct kvm_vcpu *vcpu);
 diff --git a/include/linux/libata.h b/include/linux/libata.h
-index 649e5f8..ead5194 100644
+index eae7a05..2cdd875 100644
 --- a/include/linux/libata.h
 +++ b/include/linux/libata.h
-@@ -915,7 +915,7 @@ struct ata_port_operations {
+@@ -919,7 +919,7 @@ struct ata_port_operations {
         * fields must be pointers.
         */
        const struct ata_port_operations        *inherits;
@@ -69774,7 +69207,7 @@ index 649e5f8..ead5194 100644
  struct ata_port_info {
        unsigned long           flags;
 diff --git a/include/linux/list.h b/include/linux/list.h
-index cc6d2aa..c10ee83 100644
+index 6a1f8df..eaec1ff 100644
 --- a/include/linux/list.h
 +++ b/include/linux/list.h
 @@ -112,6 +112,19 @@ extern void __list_del_entry(struct list_head *entry);
@@ -69838,7 +69271,7 @@ index b8ba855..0148090 100644
        u32 remainder;
        return div_u64_rem(dividend, divisor, &remainder);
 diff --git a/include/linux/mm.h b/include/linux/mm.h
-index 66e2f7c..b916b9a 100644
+index e2091b8..821db54 100644
 --- a/include/linux/mm.h
 +++ b/include/linux/mm.h
 @@ -101,6 +101,11 @@ extern unsigned int kobjsize(const void *objp);
@@ -69853,7 +69286,7 @@ index 66e2f7c..b916b9a 100644
  #define VM_DONTDUMP   0x04000000      /* Do not include in the core dump */
  
  #define VM_MIXEDMAP   0x10000000      /* Can contain "struct page" and pure PFN pages */
-@@ -200,8 +205,8 @@ struct vm_operations_struct {
+@@ -202,8 +207,8 @@ struct vm_operations_struct {
        /* called by access_process_vm when get_user_pages() fails, typically
         * for use by special VMAs that can switch between memory and hardware
         */
@@ -69864,7 +69297,7 @@ index 66e2f7c..b916b9a 100644
  #ifdef CONFIG_NUMA
        /*
         * set_policy() op must add a reference to any non-NULL @new mempolicy
-@@ -231,6 +236,7 @@ struct vm_operations_struct {
+@@ -233,6 +238,7 @@ struct vm_operations_struct {
        int (*remap_pages)(struct vm_area_struct *vma, unsigned long addr,
                           unsigned long size, pgoff_t pgoff);
  };
@@ -69872,7 +69305,7 @@ index 66e2f7c..b916b9a 100644
  
  struct mmu_gather;
  struct inode;
-@@ -995,8 +1001,8 @@ int follow_pfn(struct vm_area_struct *vma, unsigned long address,
+@@ -970,8 +976,8 @@ int follow_pfn(struct vm_area_struct *vma, unsigned long address,
        unsigned long *pfn);
  int follow_phys(struct vm_area_struct *vma, unsigned long address,
                unsigned int flags, unsigned long *prot, resource_size_t *phys);
@@ -69883,22 +69316,20 @@ index 66e2f7c..b916b9a 100644
  
  static inline void unmap_shared_mapping_range(struct address_space *mapping,
                loff_t const holebegin, loff_t const holelen)
-@@ -1035,10 +1041,10 @@ static inline int fixup_user_fault(struct task_struct *tsk,
+@@ -1010,9 +1016,9 @@ static inline int fixup_user_fault(struct task_struct *tsk,
  }
  #endif
  
--extern int make_pages_present(unsigned long addr, unsigned long end);
 -extern int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, int len, int write);
 -extern int access_remote_vm(struct mm_struct *mm, unsigned long addr,
 -              void *buf, int len, int write);
-+extern ssize_t make_pages_present(unsigned long addr, unsigned long end);
 +extern ssize_t access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, size_t len, int write);
 +extern ssize_t access_remote_vm(struct mm_struct *mm, unsigned long addr,
 +              void *buf, size_t len, int write);
  
int __get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
-                    unsigned long start, int len, unsigned int foll_flags,
-@@ -1068,34 +1074,6 @@ int set_page_dirty(struct page *page);
long __get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
+                     unsigned long start, unsigned long nr_pages,
+@@ -1043,34 +1049,6 @@ int set_page_dirty(struct page *page);
  int set_page_dirty_lock(struct page *page);
  int clear_page_dirty_for_io(struct page *page);
  
@@ -69933,7 +69364,7 @@ index 66e2f7c..b916b9a 100644
  extern pid_t
  vm_is_stack(struct task_struct *task, struct vm_area_struct *vma, int in_group);
  
-@@ -1198,6 +1176,15 @@ static inline void sync_mm_rss(struct mm_struct *mm)
+@@ -1173,6 +1151,15 @@ static inline void sync_mm_rss(struct mm_struct *mm)
  }
  #endif
  
@@ -69949,7 +69380,7 @@ index 66e2f7c..b916b9a 100644
  int vma_wants_writenotify(struct vm_area_struct *vma);
  
  extern pte_t *__get_locked_pte(struct mm_struct *mm, unsigned long addr,
-@@ -1216,8 +1203,15 @@ static inline int __pud_alloc(struct mm_struct *mm, pgd_t *pgd,
+@@ -1191,8 +1178,15 @@ static inline int __pud_alloc(struct mm_struct *mm, pgd_t *pgd,
  {
        return 0;
  }
@@ -69965,7 +69396,7 @@ index 66e2f7c..b916b9a 100644
  #endif
  
  #ifdef __PAGETABLE_PMD_FOLDED
-@@ -1226,8 +1220,15 @@ static inline int __pmd_alloc(struct mm_struct *mm, pud_t *pud,
+@@ -1201,8 +1195,15 @@ static inline int __pmd_alloc(struct mm_struct *mm, pud_t *pud,
  {
        return 0;
  }
@@ -69981,7 +69412,7 @@ index 66e2f7c..b916b9a 100644
  #endif
  
  int __pte_alloc(struct mm_struct *mm, struct vm_area_struct *vma,
-@@ -1245,11 +1246,23 @@ static inline pud_t *pud_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long a
+@@ -1220,11 +1221,23 @@ static inline pud_t *pud_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long a
                NULL: pud_offset(pgd, address);
  }
  
@@ -70005,15 +69436,23 @@ index 66e2f7c..b916b9a 100644
  #endif /* CONFIG_MMU && !__ARCH_HAS_4LEVEL_HACK */
  
  #if USE_SPLIT_PTLOCKS
-@@ -1479,6 +1492,7 @@ extern unsigned long do_mmap_pgoff(struct file *, unsigned long,
-         unsigned long, unsigned long,
-         unsigned long, unsigned long);
+@@ -1455,6 +1468,7 @@ extern unsigned long do_mmap_pgoff(struct file *file, unsigned long addr,
+       unsigned long len, unsigned long prot, unsigned long flags,
+       unsigned long pgoff, unsigned long *populate);
  extern int do_munmap(struct mm_struct *, unsigned long, size_t);
 +extern int __do_munmap(struct mm_struct *, unsigned long, size_t);
  
- /* These take the mm semaphore themselves */
- extern unsigned long vm_brk(unsigned long, unsigned long);
-@@ -1573,6 +1587,10 @@ extern struct vm_area_struct * find_vma(struct mm_struct * mm, unsigned long add
+ #ifdef CONFIG_MMU
+ extern int __mm_populate(unsigned long addr, unsigned long len,
+@@ -1483,6 +1497,7 @@ struct vm_unmapped_area_info {
+       unsigned long high_limit;
+       unsigned long align_mask;
+       unsigned long align_offset;
++      unsigned long threadstack_offset;
+ };
+ extern unsigned long unmapped_area(struct vm_unmapped_area_info *info);
+@@ -1561,6 +1576,10 @@ extern struct vm_area_struct * find_vma(struct mm_struct * mm, unsigned long add
  extern struct vm_area_struct * find_vma_prev(struct mm_struct * mm, unsigned long addr,
                                             struct vm_area_struct **pprev);
  
@@ -70024,7 +69463,7 @@ index 66e2f7c..b916b9a 100644
  /* Look up the first VMA which intersects the interval start_addr..end_addr-1,
     NULL if none.  Assume start_addr < end_addr. */
  static inline struct vm_area_struct * find_vma_intersection(struct mm_struct * mm, unsigned long start_addr, unsigned long end_addr)
-@@ -1601,15 +1619,6 @@ static inline struct vm_area_struct *find_exact_vma(struct mm_struct *mm,
+@@ -1589,15 +1608,6 @@ static inline struct vm_area_struct *find_exact_vma(struct mm_struct *mm,
        return vma;
  }
  
@@ -70040,7 +69479,7 @@ index 66e2f7c..b916b9a 100644
  #ifdef CONFIG_ARCH_USES_NUMA_PROT_NONE
  unsigned long change_prot_numa(struct vm_area_struct *vma,
                        unsigned long start, unsigned long end);
-@@ -1649,6 +1658,11 @@ void vm_stat_account(struct mm_struct *, unsigned long, struct file *, long);
+@@ -1649,6 +1659,11 @@ void vm_stat_account(struct mm_struct *, unsigned long, struct file *, long);
  static inline void vm_stat_account(struct mm_struct *mm,
                        unsigned long flags, struct file *file, long pages)
  {
@@ -70052,16 +69491,16 @@ index 66e2f7c..b916b9a 100644
        mm->total_vm += pages;
  }
  #endif /* CONFIG_PROC_FS */
-@@ -1721,7 +1735,7 @@ extern int unpoison_memory(unsigned long pfn);
+@@ -1725,7 +1740,7 @@ extern int unpoison_memory(unsigned long pfn);
  extern int sysctl_memory_failure_early_kill;
  extern int sysctl_memory_failure_recovery;
  extern void shake_page(struct page *p, int access);
--extern atomic_long_t mce_bad_pages;
-+extern atomic_long_unchecked_t mce_bad_pages;
+-extern atomic_long_t num_poisoned_pages;
++extern atomic_long_unchecked_t num_poisoned_pages;
  extern int soft_offline_page(struct page *page, int flags);
  
  extern void dump_page(struct page *page);
-@@ -1752,5 +1766,11 @@ static inline unsigned int debug_guardpage_minorder(void) { return 0; }
+@@ -1756,5 +1771,11 @@ static inline unsigned int debug_guardpage_minorder(void) { return 0; }
  static inline bool page_is_guard(struct page *page) { return false; }
  #endif /* CONFIG_DEBUG_PAGEALLOC */
  
@@ -70074,10 +69513,10 @@ index 66e2f7c..b916b9a 100644
  #endif /* __KERNEL__ */
  #endif /* _LINUX_MM_H */
 diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
-index f8f5162..3aaf20f 100644
+index ace9a5f..81bdb59 100644
 --- a/include/linux/mm_types.h
 +++ b/include/linux/mm_types.h
-@@ -288,6 +288,8 @@ struct vm_area_struct {
+@@ -289,6 +289,8 @@ struct vm_area_struct {
  #ifdef CONFIG_NUMA
        struct mempolicy *vm_policy;    /* NUMA policy for the VMA */
  #endif
@@ -70086,7 +69525,7 @@ index f8f5162..3aaf20f 100644
  };
  
  struct core_thread {
-@@ -436,6 +438,24 @@ struct mm_struct {
+@@ -437,6 +439,24 @@ struct mm_struct {
        int first_nid;
  #endif
        struct uprobes_state uprobes_state;
@@ -70134,10 +69573,10 @@ index c5d5278..f0b68c8 100644
  }
  
 diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
-index 73b64a3..6562925 100644
+index c74092e..b663967 100644
 --- a/include/linux/mmzone.h
 +++ b/include/linux/mmzone.h
-@@ -412,7 +412,7 @@ struct zone {
+@@ -396,7 +396,7 @@ struct zone {
        unsigned long           flags;             /* zone flags, see below */
  
        /* Zone statistics */
@@ -70147,7 +69586,7 @@ index 73b64a3..6562925 100644
        /*
         * The target ratio of ACTIVE_ANON to INACTIVE_ANON pages on
 diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h
-index fed3def..c933f99 100644
+index 779cf7c..e6768240 100644
 --- a/include/linux/mod_devicetable.h
 +++ b/include/linux/mod_devicetable.h
 @@ -12,7 +12,7 @@
@@ -70159,7 +69598,7 @@ index fed3def..c933f99 100644
  
  struct pci_device_id {
        __u32 vendor, device;           /* Vendor and device ID or PCI_ANY_ID*/
-@@ -139,7 +139,7 @@ struct usb_device_id {
+@@ -138,7 +138,7 @@ struct usb_device_id {
  #define USB_DEVICE_ID_MATCH_INT_PROTOCOL      0x0200
  #define USB_DEVICE_ID_MATCH_INT_NUMBER                0x0400
  
@@ -70168,7 +69607,7 @@ index fed3def..c933f99 100644
  #define HID_BUS_ANY                           0xffff
  #define HID_GROUP_ANY                         0x0000
  
-@@ -498,7 +498,7 @@ struct dmi_system_id {
+@@ -464,7 +464,7 @@ struct dmi_system_id {
        const char *ident;
        struct dmi_strmatch matches[4];
        void *driver_data;
@@ -70178,7 +69617,7 @@ index fed3def..c933f99 100644
   * struct dmi_device_id appears during expansion of
   * "MODULE_DEVICE_TABLE(dmi, x)". Compiler doesn't look inside it
 diff --git a/include/linux/module.h b/include/linux/module.h
-index 1375ee3..ced8177 100644
+index ead1b57..81a3b6c 100644
 --- a/include/linux/module.h
 +++ b/include/linux/module.h
 @@ -17,9 +17,11 @@
@@ -70268,34 +69707,34 @@ index 1375ee3..ced8177 100644
 +      return ((void *)addr >= start && (void *)addr < start + size);
 +}
 +
-+static inline int within_module_core_rx(unsigned long addr, struct module *mod)
++static inline int within_module_core_rx(unsigned long addr, const struct module *mod)
 +{
 +      return within_module_range(addr, mod->module_core_rx, mod->core_size_rx);
 +}
 +
-+static inline int within_module_core_rw(unsigned long addr, struct module *mod)
++static inline int within_module_core_rw(unsigned long addr, const struct module *mod)
 +{
 +      return within_module_range(addr, mod->module_core_rw, mod->core_size_rw);
 +}
 +
-+static inline int within_module_init_rx(unsigned long addr, struct module *mod)
++static inline int within_module_init_rx(unsigned long addr, const struct module *mod)
 +{
 +      return within_module_range(addr, mod->module_init_rx, mod->init_size_rx);
 +}
 +
-+static inline int within_module_init_rw(unsigned long addr, struct module *mod)
++static inline int within_module_init_rw(unsigned long addr, const struct module *mod)
 +{
 +      return within_module_range(addr, mod->module_init_rw, mod->init_size_rw);
 +}
 +
- static inline int within_module_core(unsigned long addr, struct module *mod)
+ static inline int within_module_core(unsigned long addr, const struct module *mod)
  {
 -      return (unsigned long)mod->module_core <= addr &&
 -             addr < (unsigned long)mod->module_core + mod->core_size;
 +      return within_module_core_rx(addr, mod) || within_module_core_rw(addr, mod);
  }
  
- static inline int within_module_init(unsigned long addr, struct module *mod)
+ static inline int within_module_init(unsigned long addr, const struct module *mod)
  {
 -      return (unsigned long)mod->module_init <= addr &&
 -             addr < (unsigned long)mod->module_init + mod->init_size;
@@ -70413,18 +69852,18 @@ index aa16731..514b875 100644
  struct iovec;
  struct kvec;
 diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
-index 9ef07d0..130a5d9 100644
+index 6151e90..2e0afb0 100644
 --- a/include/linux/netdevice.h
 +++ b/include/linux/netdevice.h
-@@ -1012,6 +1012,7 @@ struct net_device_ops {
-                                                     u32 pid, u32 seq,
-                                                     struct net_device *dev);
+@@ -1028,6 +1028,7 @@ struct net_device_ops {
+       int                     (*ndo_change_carrier)(struct net_device *dev,
+                                                     bool new_carrier);
  };
 +typedef struct net_device_ops __no_const net_device_ops_no_const;
  
  /*
   *    The DEVICE structure.
-@@ -1078,7 +1079,7 @@ struct net_device {
+@@ -1094,7 +1095,7 @@ struct net_device {
        int                     iflink;
  
        struct net_device_stats stats;
@@ -70460,7 +69899,7 @@ index 7958e84..ed74d7a 100644
  /* The core set type structure */
  struct ip_set_type {
 diff --git a/include/linux/netfilter/nfnetlink.h b/include/linux/netfilter/nfnetlink.h
-index 4966dde..7d8ce06 100644
+index ecbb8e4..8a1c4e1 100644
 --- a/include/linux/netfilter/nfnetlink.h
 +++ b/include/linux/netfilter/nfnetlink.h
 @@ -16,7 +16,7 @@ struct nfnl_callback {
@@ -70545,10 +69984,10 @@ index 45fc162..01a4068 100644
  /**
   * struct hotplug_slot_info - used to notify the hotplug pci core of the state of the slot
 diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
-index a280650..2b67b91 100644
+index 1d795df..727aa7b 100644
 --- a/include/linux/perf_event.h
 +++ b/include/linux/perf_event.h
-@@ -328,8 +328,8 @@ struct perf_event {
+@@ -333,8 +333,8 @@ struct perf_event {
  
        enum perf_event_active_state    state;
        unsigned int                    attach_state;
@@ -70559,7 +69998,7 @@ index a280650..2b67b91 100644
  
        /*
         * These are the total time in nanoseconds that the event
-@@ -380,8 +380,8 @@ struct perf_event {
+@@ -385,8 +385,8 @@ struct perf_event {
         * These accumulate total time (in nanoseconds) that children
         * events have been enabled and running, respectively.
         */
@@ -70570,7 +70009,37 @@ index a280650..2b67b91 100644
  
        /*
         * Protect attach/detach and child_list:
-@@ -807,7 +807,7 @@ static inline void perf_restore_debug_store(void)                  { }
+@@ -704,7 +704,7 @@ static inline void perf_callchain_store(struct perf_callchain_entry *entry, u64
+               entry->ip[entry->nr++] = ip;
+ }
+-extern int sysctl_perf_event_paranoid;
++extern int sysctl_perf_event_legitimately_concerned;
+ extern int sysctl_perf_event_mlock;
+ extern int sysctl_perf_event_sample_rate;
+@@ -714,17 +714,17 @@ extern int perf_proc_update_handler(struct ctl_table *table, int write,
+ static inline bool perf_paranoid_tracepoint_raw(void)
+ {
+-      return sysctl_perf_event_paranoid > -1;
++      return sysctl_perf_event_legitimately_concerned > -1;
+ }
+ static inline bool perf_paranoid_cpu(void)
+ {
+-      return sysctl_perf_event_paranoid > 0;
++      return sysctl_perf_event_legitimately_concerned > 0;
+ }
+ static inline bool perf_paranoid_kernel(void)
+ {
+-      return sysctl_perf_event_paranoid > 1;
++      return sysctl_perf_event_legitimately_concerned > 1;
+ }
+ extern void perf_event_init(void);
+@@ -812,7 +812,7 @@ static inline void perf_restore_debug_store(void)                  { }
   */
  #define perf_cpu_notifier(fn)                                         \
  do {                                                                  \
@@ -70579,6 +70048,15 @@ index a280650..2b67b91 100644
                { .notifier_call = fn, .priority = CPU_PRI_PERF };      \
        unsigned long cpu = smp_processor_id();                         \
        unsigned long flags;                                            \
+@@ -831,7 +831,7 @@ do {                                                                       \
+ struct perf_pmu_events_attr {
+       struct device_attribute attr;
+       u64 id;
+-};
++} __do_const;
+ #define PMU_EVENT_ATTR(_name, _var, _id, _show)                               \
+ static struct perf_pmu_events_attr _var = {                           \
 diff --git a/include/linux/pipe_fs_i.h b/include/linux/pipe_fs_i.h
 index ad1a427..6419649 100644
 --- a/include/linux/pipe_fs_i.h
@@ -70636,10 +70114,10 @@ index 7c1d252..c5c773e 100644
  
  struct generic_pm_domain {
 diff --git a/include/linux/pm_runtime.h b/include/linux/pm_runtime.h
-index f271860..6b3bec5 100644
+index 7d7e09e..8671ef8 100644
 --- a/include/linux/pm_runtime.h
 +++ b/include/linux/pm_runtime.h
-@@ -97,7 +97,7 @@ static inline bool pm_runtime_callbacks_present(struct device *dev)
+@@ -104,7 +104,7 @@ static inline bool pm_runtime_callbacks_present(struct device *dev)
  
  static inline void pm_runtime_mark_last_busy(struct device *dev)
  {
@@ -70703,31 +70181,31 @@ index 4ea1d37..80f4b33 100644
  /*
   * The return value from decompress routine is the length of the
 diff --git a/include/linux/printk.h b/include/linux/printk.h
-index 9afc01e..92c32e8 100644
+index 822171f..12b30e8 100644
 --- a/include/linux/printk.h
 +++ b/include/linux/printk.h
-@@ -101,6 +101,8 @@ void early_printk(const char *fmt, ...);
- extern int printk_needs_cpu(int cpu);
extern void printk_tick(void);
+@@ -98,6 +98,8 @@ int no_printk(const char *fmt, ...)
+ extern asmlinkage __printf(1, 2)
void early_printk(const char *fmt, ...);
  
 +extern int kptr_restrict;
 +
  #ifdef CONFIG_PRINTK
  asmlinkage __printf(5, 0)
  int vprintk_emit(int facility, int level,
-@@ -135,7 +137,6 @@ extern bool printk_timed_ratelimit(unsigned long *caller_jiffies,
+@@ -132,7 +134,6 @@ extern bool printk_timed_ratelimit(unsigned long *caller_jiffies,
  
  extern int printk_delay_msec;
  extern int dmesg_restrict;
 -extern int kptr_restrict;
  
void log_buf_kexec_setup(void);
- void __init setup_log_buf(int early);
extern void wake_up_klogd(void);
 diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h
-index 32676b3..e46f2c0 100644
+index 94dfb2a..88b9d3b 100644
 --- a/include/linux/proc_fs.h
 +++ b/include/linux/proc_fs.h
-@@ -159,6 +159,18 @@ static inline struct proc_dir_entry *proc_create(const char *name, umode_t mode,
+@@ -165,6 +165,18 @@ static inline struct proc_dir_entry *proc_create(const char *name, umode_t mode,
        return proc_create_data(name, mode, parent, proc_fops, NULL);
  }
  
@@ -70746,7 +70224,7 @@ index 32676b3..e46f2c0 100644
  static inline struct proc_dir_entry *create_proc_read_entry(const char *name,
        umode_t mode, struct proc_dir_entry *base, 
        read_proc_t *read_proc, void * data)
-@@ -268,7 +280,7 @@ struct proc_ns_operations {
+@@ -266,7 +278,7 @@ struct proc_ns_operations {
        void (*put)(void *ns);
        int (*install)(struct nsproxy *nsproxy, void *ns);
        unsigned int (*inum)(void *ns);
@@ -70756,7 +70234,7 @@ index 32676b3..e46f2c0 100644
  extern const struct proc_ns_operations utsns_operations;
  extern const struct proc_ns_operations ipcns_operations;
 diff --git a/include/linux/random.h b/include/linux/random.h
-index d984608..d6f0042 100644
+index 347ce55..880f97c 100644
 --- a/include/linux/random.h
 +++ b/include/linux/random.h
 @@ -39,6 +39,11 @@ void prandom_seed(u32 seed);
@@ -70772,7 +70250,7 @@ index d984608..d6f0042 100644
   * Handle minimum values for seeds
   */
 diff --git a/include/linux/rculist.h b/include/linux/rculist.h
-index c92dd28..08f4eab 100644
+index 8089e35..3a0d59a 100644
 --- a/include/linux/rculist.h
 +++ b/include/linux/rculist.h
 @@ -44,6 +44,9 @@ extern void __list_add_rcu(struct list_head *new,
@@ -70899,7 +70377,7 @@ index a3e7842..d973ca6 100644
  #define RIO_RESOURCE_MEM      0x00000100
  #define RIO_RESOURCE_DOORBELL 0x00000200
 diff --git a/include/linux/rmap.h b/include/linux/rmap.h
-index c20635c..2f5def4 100644
+index 6dacb93..6174423 100644
 --- a/include/linux/rmap.h
 +++ b/include/linux/rmap.h
 @@ -145,8 +145,8 @@ static inline void anon_vma_unlock_read(struct anon_vma *anon_vma)
@@ -70914,10 +70392,10 @@ index c20635c..2f5def4 100644
  static inline void anon_vma_merge(struct vm_area_struct *vma,
                                  struct vm_area_struct *next)
 diff --git a/include/linux/sched.h b/include/linux/sched.h
-index d211247..eac6c2c 100644
+index be4e742..7f9d593 100644
 --- a/include/linux/sched.h
 +++ b/include/linux/sched.h
-@@ -61,6 +61,7 @@ struct bio_list;
+@@ -62,6 +62,7 @@ struct bio_list;
  struct fs_struct;
  struct perf_event_context;
  struct blk_plug;
@@ -70925,7 +70403,7 @@ index d211247..eac6c2c 100644
  
  /*
   * List of flags we want to share for kernel threads,
-@@ -327,7 +328,7 @@ extern char __sched_text_start[], __sched_text_end[];
+@@ -315,7 +316,7 @@ extern char __sched_text_start[], __sched_text_end[];
  extern int in_sched_functions(unsigned long addr);
  
  #define       MAX_SCHEDULE_TIMEOUT    LONG_MAX
@@ -70934,12 +70412,7 @@ index d211247..eac6c2c 100644
  extern signed long schedule_timeout_interruptible(signed long timeout);
  extern signed long schedule_timeout_killable(signed long timeout);
  extern signed long schedule_timeout_uninterruptible(signed long timeout);
-@@ -354,10 +355,23 @@ struct user_namespace;
- #define DEFAULT_MAX_MAP_COUNT (USHRT_MAX - MAPCOUNT_ELF_CORE_MARGIN)
- extern int sysctl_max_map_count;
-+extern unsigned long sysctl_heap_stack_gap;
+@@ -329,6 +330,18 @@ struct user_namespace;
  #include <linux/aio.h>
  
  #ifdef CONFIG_MMU
@@ -70958,7 +70431,7 @@ index d211247..eac6c2c 100644
  extern void arch_pick_mmap_layout(struct mm_struct *mm);
  extern unsigned long
  arch_get_unmapped_area(struct file *, unsigned long, unsigned long,
-@@ -639,6 +653,17 @@ struct signal_struct {
+@@ -605,6 +618,17 @@ struct signal_struct {
  #ifdef CONFIG_TASKSTATS
        struct taskstats *stats;
  #endif
@@ -70976,7 +70449,7 @@ index d211247..eac6c2c 100644
  #ifdef CONFIG_AUDIT
        unsigned audit_tty;
        struct tty_audit_buf *tty_audit_buf;
-@@ -717,6 +742,11 @@ struct user_struct {
+@@ -683,6 +707,11 @@ struct user_struct {
        struct key *session_keyring;    /* UID's default session keyring */
  #endif
  
@@ -70988,7 +70461,7 @@ index d211247..eac6c2c 100644
        /* Hash table maintenance information */
        struct hlist_node uidhash_node;
        kuid_t uid;
-@@ -1116,7 +1146,7 @@ struct sched_class {
+@@ -1082,7 +1111,7 @@ struct sched_class {
  #ifdef CONFIG_FAIR_GROUP_SCHED
        void (*task_move_group) (struct task_struct *p, int on_rq);
  #endif
@@ -70997,7 +70470,7 @@ index d211247..eac6c2c 100644
  
  struct load_weight {
        unsigned long weight, inv_weight;
-@@ -1360,8 +1390,8 @@ struct task_struct {
+@@ -1323,8 +1352,8 @@ struct task_struct {
        struct list_head thread_group;
  
        struct completion *vfork_done;          /* for vfork() */
@@ -71008,7 +70481,7 @@ index d211247..eac6c2c 100644
  
        cputime_t utime, stime, utimescaled, stimescaled;
        cputime_t gtime;
-@@ -1377,11 +1407,6 @@ struct task_struct {
+@@ -1349,11 +1378,6 @@ struct task_struct {
        struct task_cputime cputime_expires;
        struct list_head cpu_timers[3];
  
@@ -71020,7 +70493,7 @@ index d211247..eac6c2c 100644
        char comm[TASK_COMM_LEN]; /* executable name excluding path
                                     - access with [gs]et_task_comm (which lock
                                       it with task_lock())
-@@ -1398,6 +1423,10 @@ struct task_struct {
+@@ -1370,6 +1394,10 @@ struct task_struct {
  #endif
  /* CPU-specific state of this task */
        struct thread_struct thread;
@@ -71031,7 +70504,7 @@ index d211247..eac6c2c 100644
  /* filesystem information */
        struct fs_struct *fs;
  /* open file information */
-@@ -1471,6 +1500,10 @@ struct task_struct {
+@@ -1443,6 +1471,10 @@ struct task_struct {
        gfp_t lockdep_reclaim_gfp;
  #endif
  
@@ -71042,7 +70515,7 @@ index d211247..eac6c2c 100644
  /* journalling filesystem info */
        void *journal_info;
  
-@@ -1509,6 +1542,10 @@ struct task_struct {
+@@ -1481,6 +1513,10 @@ struct task_struct {
        /* cg_list protected by css_set_lock and tsk->alloc_lock */
        struct list_head cg_list;
  #endif
@@ -71053,7 +70526,7 @@ index d211247..eac6c2c 100644
  #ifdef CONFIG_FUTEX
        struct robust_list_head __user *robust_list;
  #ifdef CONFIG_COMPAT
-@@ -1605,8 +1642,74 @@ struct task_struct {
+@@ -1577,8 +1613,74 @@ struct task_struct {
  #ifdef CONFIG_UPROBES
        struct uprobe_task *utask;
  #endif
@@ -71128,7 +70601,7 @@ index d211247..eac6c2c 100644
  /* Future-safe accessor for struct task_struct's cpus_allowed. */
  #define tsk_cpus_allowed(tsk) (&(tsk)->cpus_allowed)
  
-@@ -1696,7 +1799,7 @@ struct pid_namespace;
+@@ -1637,7 +1739,7 @@ struct pid_namespace;
  pid_t __task_pid_nr_ns(struct task_struct *task, enum pid_type type,
                        struct pid_namespace *ns);
  
@@ -71137,7 +70610,7 @@ index d211247..eac6c2c 100644
  {
        return tsk->pid;
  }
-@@ -2155,7 +2258,9 @@ void yield(void);
+@@ -2073,7 +2175,9 @@ void yield(void);
  extern struct exec_domain     default_exec_domain;
  
  union thread_union {
@@ -71147,7 +70620,7 @@ index d211247..eac6c2c 100644
        unsigned long stack[THREAD_SIZE/sizeof(long)];
  };
  
-@@ -2188,6 +2293,7 @@ extern struct pid_namespace init_pid_ns;
+@@ -2106,6 +2210,7 @@ extern struct pid_namespace init_pid_ns;
   */
  
  extern struct task_struct *find_task_by_vpid(pid_t nr);
@@ -71155,7 +70628,7 @@ index d211247..eac6c2c 100644
  extern struct task_struct *find_task_by_pid_ns(pid_t nr,
                struct pid_namespace *ns);
  
-@@ -2344,7 +2450,7 @@ extern void __cleanup_sighand(struct sighand_struct *);
+@@ -2272,7 +2377,7 @@ extern void __cleanup_sighand(struct sighand_struct *);
  extern void exit_itimers(struct signal_struct *);
  extern void flush_itimer_signals(void);
  
@@ -71164,7 +70637,7 @@ index d211247..eac6c2c 100644
  
  extern int allow_signal(int);
  extern int disallow_signal(int);
-@@ -2545,9 +2651,9 @@ static inline unsigned long *end_of_stack(struct task_struct *p)
+@@ -2463,9 +2568,9 @@ static inline unsigned long *end_of_stack(struct task_struct *p)
  
  #endif
  
@@ -71176,8 +70649,20 @@ index d211247..eac6c2c 100644
  
        return (obj >= stack) && (obj < (stack + THREAD_SIZE));
  }
+diff --git a/include/linux/sched/sysctl.h b/include/linux/sched/sysctl.h
+index bf8086b..962b035 100644
+--- a/include/linux/sched/sysctl.h
++++ b/include/linux/sched/sysctl.h
+@@ -30,6 +30,7 @@ enum { sysctl_hung_task_timeout_secs = 0 };
+ #define DEFAULT_MAX_MAP_COUNT (USHRT_MAX - MAPCOUNT_ELF_CORE_MARGIN)
+ extern int sysctl_max_map_count;
++extern unsigned long sysctl_heap_stack_gap;
+ extern unsigned int sysctl_sched_latency;
+ extern unsigned int sysctl_sched_min_granularity;
 diff --git a/include/linux/security.h b/include/linux/security.h
-index eee7478..290f7ba 100644
+index 032c366..2c1c2dc2 100644
 --- a/include/linux/security.h
 +++ b/include/linux/security.h
 @@ -26,6 +26,7 @@
@@ -71226,10 +70711,10 @@ index 429c199..4d42e38 100644
  
  /* shm_mode upper byte flags */
 diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
-index 98399e2..7c74c41 100644
+index b8292d8..96db310 100644
 --- a/include/linux/skbuff.h
 +++ b/include/linux/skbuff.h
-@@ -590,7 +590,7 @@ extern bool skb_try_coalesce(struct sk_buff *to, struct sk_buff *from,
+@@ -599,7 +599,7 @@ extern bool skb_try_coalesce(struct sk_buff *to, struct sk_buff *from,
  extern struct sk_buff *__alloc_skb(unsigned int size,
                                   gfp_t priority, int flags, int node);
  extern struct sk_buff *build_skb(void *data, unsigned int frag_size);
@@ -71238,7 +70723,7 @@ index 98399e2..7c74c41 100644
                                        gfp_t priority)
  {
        return __alloc_skb(size, priority, 0, NUMA_NO_NODE);
-@@ -700,7 +700,7 @@ static inline struct skb_shared_hwtstamps *skb_hwtstamps(struct sk_buff *skb)
+@@ -709,7 +709,7 @@ static inline struct skb_shared_hwtstamps *skb_hwtstamps(struct sk_buff *skb)
   */
  static inline int skb_queue_empty(const struct sk_buff_head *list)
  {
@@ -71247,7 +70732,7 @@ index 98399e2..7c74c41 100644
  }
  
  /**
-@@ -713,7 +713,7 @@ static inline int skb_queue_empty(const struct sk_buff_head *list)
+@@ -722,7 +722,7 @@ static inline int skb_queue_empty(const struct sk_buff_head *list)
  static inline bool skb_queue_is_last(const struct sk_buff_head *list,
                                     const struct sk_buff *skb)
  {
@@ -71256,7 +70741,7 @@ index 98399e2..7c74c41 100644
  }
  
  /**
-@@ -726,7 +726,7 @@ static inline bool skb_queue_is_last(const struct sk_buff_head *list,
+@@ -735,7 +735,7 @@ static inline bool skb_queue_is_last(const struct sk_buff_head *list,
  static inline bool skb_queue_is_first(const struct sk_buff_head *list,
                                      const struct sk_buff *skb)
  {
@@ -71265,7 +70750,7 @@ index 98399e2..7c74c41 100644
  }
  
  /**
-@@ -1727,7 +1727,7 @@ static inline int pskb_network_may_pull(struct sk_buff *skb, unsigned int len)
+@@ -1756,7 +1756,7 @@ static inline int pskb_network_may_pull(struct sk_buff *skb, unsigned int len)
   * NET_IP_ALIGN(2) + ethernet_header(14) + IP_header(20/40) + ports(8)
   */
  #ifndef NET_SKB_PAD
@@ -71274,7 +70759,7 @@ index 98399e2..7c74c41 100644
  #endif
  
  extern int ___pskb_trim(struct sk_buff *skb, unsigned int len);
-@@ -2305,7 +2305,7 @@ extern struct sk_buff *skb_recv_datagram(struct sock *sk, unsigned flags,
+@@ -2351,7 +2351,7 @@ extern struct sk_buff *skb_recv_datagram(struct sock *sk, unsigned flags,
                                         int noblock, int *err);
  extern unsigned int    datagram_poll(struct file *file, struct socket *sock,
                                     struct poll_table_struct *wait);
@@ -71283,7 +70768,7 @@ index 98399e2..7c74c41 100644
                                               int offset, struct iovec *to,
                                               int size);
  extern int           skb_copy_and_csum_datagram_iovec(struct sk_buff *skb,
-@@ -2595,6 +2595,9 @@ static inline void nf_reset(struct sk_buff *skb)
+@@ -2641,6 +2641,9 @@ static inline void nf_reset(struct sk_buff *skb)
        nf_bridge_put(skb->nf_bridge);
        skb->nf_bridge = NULL;
  #endif
@@ -71292,7 +70777,7 @@ index 98399e2..7c74c41 100644
 +#endif
  }
  
- /* Note: This doesn't put any conntrack and bridge info in dst. */
+ static inline void nf_reset_trace(struct sk_buff *skb)
 diff --git a/include/linux/slab.h b/include/linux/slab.h
 index 5d168d7..720bff3 100644
 --- a/include/linux/slab.h
@@ -71560,20 +71045,11 @@ index 680f9a3..f13aeb0 100644
        __SONET_ITEMS
  #undef __HANDLE_ITEM
  };
-diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h
-index 34206b8..3db7f1c 100644
---- a/include/linux/sunrpc/clnt.h
-+++ b/include/linux/sunrpc/clnt.h
-@@ -96,7 +96,7 @@ struct rpc_procinfo {
-       unsigned int            p_timer;        /* Which RTT timer to use */
-       u32                     p_statidx;      /* Which procedure to account */
-       const char *            p_name;         /* name of procedure */
--};
-+} __do_const;
- #ifdef __KERNEL__
-@@ -176,9 +176,9 @@ static inline unsigned short rpc_get_port(const struct sockaddr *sap)
+diff --git a/include/linux/sunrpc/addr.h b/include/linux/sunrpc/addr.h
+index 07d8e53..dc934c9 100644
+--- a/include/linux/sunrpc/addr.h
++++ b/include/linux/sunrpc/addr.h
+@@ -23,9 +23,9 @@ static inline unsigned short rpc_get_port(const struct sockaddr *sap)
  {
        switch (sap->sa_family) {
        case AF_INET:
@@ -71585,7 +71061,7 @@ index 34206b8..3db7f1c 100644
        }
        return 0;
  }
-@@ -211,7 +211,7 @@ static inline bool __rpc_cmp_addr4(const struct sockaddr *sap1,
+@@ -58,7 +58,7 @@ static inline bool __rpc_cmp_addr4(const struct sockaddr *sap1,
  static inline bool __rpc_copy_addr4(struct sockaddr *dst,
                                    const struct sockaddr *src)
  {
@@ -71594,7 +71070,7 @@ index 34206b8..3db7f1c 100644
        struct sockaddr_in *dsin = (struct sockaddr_in *) dst;
  
        dsin->sin_family = ssin->sin_family;
-@@ -314,7 +314,7 @@ static inline u32 rpc_get_scope_id(const struct sockaddr *sa)
+@@ -164,7 +164,7 @@ static inline u32 rpc_get_scope_id(const struct sockaddr *sa)
        if (sa->sa_family != AF_INET6)
                return 0;
  
@@ -71602,12 +71078,25 @@ index 34206b8..3db7f1c 100644
 +      return ((const struct sockaddr_in6 *) sa)->sin6_scope_id;
  }
  
- #endif /* __KERNEL__ */
+ #endif /* _LINUX_SUNRPC_ADDR_H */
+diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h
+index 2cf4ffa..470d140 100644
+--- a/include/linux/sunrpc/clnt.h
++++ b/include/linux/sunrpc/clnt.h
+@@ -96,7 +96,7 @@ struct rpc_procinfo {
+       unsigned int            p_timer;        /* Which RTT timer to use */
+       u32                     p_statidx;      /* Which procedure to account */
+       const char *            p_name;         /* name of procedure */
+-};
++} __do_const;
+ #ifdef __KERNEL__
 diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h
-index 676ddf5..4c519a1 100644
+index 1f0216b..6a4fa50 100644
 --- a/include/linux/sunrpc/svc.h
 +++ b/include/linux/sunrpc/svc.h
-@@ -410,7 +410,7 @@ struct svc_procedure {
+@@ -411,7 +411,7 @@ struct svc_procedure {
        unsigned int            pc_count;       /* call count */
        unsigned int            pc_cachetype;   /* cache info (NFS) */
        unsigned int            pc_xdrressize;  /* maximum size of XDR reply */
@@ -71646,7 +71135,7 @@ index 0b8e3e6..33e0a01 100644
  #define RPCRDMA_VERSION 1
  
 diff --git a/include/linux/sunrpc/svcauth.h b/include/linux/sunrpc/svcauth.h
-index dd74084a..7f509d5 100644
+index ff374ab..7fd2ecb 100644
 --- a/include/linux/sunrpc/svcauth.h
 +++ b/include/linux/sunrpc/svcauth.h
 @@ -109,7 +109,7 @@ struct auth_ops {
@@ -71659,10 +71148,10 @@ index dd74084a..7f509d5 100644
  #define       SVC_GARBAGE     1
  #define       SVC_SYSERR      2
 diff --git a/include/linux/swiotlb.h b/include/linux/swiotlb.h
-index 071d62c..4ccc7ac 100644
+index a5ffd32..0935dea 100644
 --- a/include/linux/swiotlb.h
 +++ b/include/linux/swiotlb.h
-@@ -59,7 +59,8 @@ extern void
+@@ -60,7 +60,8 @@ extern void
  
  extern void
  swiotlb_free_coherent(struct device *hwdev, size_t size,
@@ -71673,10 +71162,10 @@ index 071d62c..4ccc7ac 100644
  extern dma_addr_t swiotlb_map_page(struct device *dev, struct page *page,
                                   unsigned long offset, size_t size,
 diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
-index 45e2db2..1635156a 100644
+index 313a8e0..1da8fc6 100644
 --- a/include/linux/syscalls.h
 +++ b/include/linux/syscalls.h
-@@ -615,7 +615,7 @@ asmlinkage long sys_getsockname(int, struct sockaddr __user *, int __user *);
+@@ -634,7 +634,7 @@ asmlinkage long sys_getsockname(int, struct sockaddr __user *, int __user *);
  asmlinkage long sys_getpeername(int, struct sockaddr __user *, int __user *);
  asmlinkage long sys_send(int, void __user *, size_t, unsigned);
  asmlinkage long sys_sendto(int, void __user *, size_t, unsigned,
@@ -71730,7 +71219,7 @@ index 14a8ff2..af52bad 100644
  struct ctl_node {
        struct rb_node node;
 diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h
-index 381f06d..dc16cc7 100644
+index e2cee22..3ddb921 100644
 --- a/include/linux/sysfs.h
 +++ b/include/linux/sysfs.h
 @@ -31,7 +31,8 @@ struct attribute {
@@ -71806,7 +71295,7 @@ index e7e0473..7989295 100644
  
  #endif /* _LINUX_THREAD_INFO_H */
 diff --git a/include/linux/tty.h b/include/linux/tty.h
-index 8db1b56..c16a040 100644
+index c75d886..04cb148 100644
 --- a/include/linux/tty.h
 +++ b/include/linux/tty.h
 @@ -194,7 +194,7 @@ struct tty_port {
@@ -71818,7 +71307,7 @@ index 8db1b56..c16a040 100644
        wait_queue_head_t       open_wait;      /* Open waiters */
        wait_queue_head_t       close_wait;     /* Close waiters */
        wait_queue_head_t       delta_msr_wait; /* Modem status change */
-@@ -490,7 +490,7 @@ extern int tty_port_open(struct tty_port *port,
+@@ -515,7 +515,7 @@ extern int tty_port_open(struct tty_port *port,
                                struct tty_struct *tty, struct file *filp);
  static inline int tty_port_users(struct tty_port *port)
  {
@@ -71828,10 +71317,10 @@ index 8db1b56..c16a040 100644
  
  extern int tty_register_ldisc(int disc, struct tty_ldisc_ops *new_ldisc);
 diff --git a/include/linux/tty_driver.h b/include/linux/tty_driver.h
-index dd976cf..e272742 100644
+index 756a609..b302dd6 100644
 --- a/include/linux/tty_driver.h
 +++ b/include/linux/tty_driver.h
-@@ -284,7 +284,7 @@ struct tty_operations {
+@@ -285,7 +285,7 @@ struct tty_operations {
        void (*poll_put_char)(struct tty_driver *driver, int line, char ch);
  #endif
        const struct file_operations *proc_fops;
@@ -71841,10 +71330,10 @@ index dd976cf..e272742 100644
  struct tty_driver {
        int     magic;          /* magic number for this structure */
 diff --git a/include/linux/tty_ldisc.h b/include/linux/tty_ldisc.h
-index fb79dd8d..07d4773 100644
+index 455a0d7..bf97ff5 100644
 --- a/include/linux/tty_ldisc.h
 +++ b/include/linux/tty_ldisc.h
-@@ -149,7 +149,7 @@ struct tty_ldisc_ops {
+@@ -146,7 +146,7 @@ struct tty_ldisc_ops {
  
        struct  module *owner;
        
@@ -72003,42 +71492,6 @@ index c5d36c6..108f4f9 100644
  
  /*
   * callback functions for platform
-diff --git a/include/linux/user_namespace.h b/include/linux/user_namespace.h
-index 5209cfe..b6b215f 100644
---- a/include/linux/user_namespace.h
-+++ b/include/linux/user_namespace.h
-@@ -21,7 +21,7 @@ struct user_namespace {
-       struct uid_gid_map      uid_map;
-       struct uid_gid_map      gid_map;
-       struct uid_gid_map      projid_map;
--      struct kref             kref;
-+      atomic_t                count;
-       struct user_namespace   *parent;
-       kuid_t                  owner;
-       kgid_t                  group;
-@@ -37,18 +37,18 @@ extern struct user_namespace init_user_ns;
- static inline struct user_namespace *get_user_ns(struct user_namespace *ns)
- {
-       if (ns)
--              kref_get(&ns->kref);
-+              atomic_inc(&ns->count);
-       return ns;
- }
- extern int create_user_ns(struct cred *new);
- extern int unshare_userns(unsigned long unshare_flags, struct cred **new_cred);
--extern void free_user_ns(struct kref *kref);
-+extern void free_user_ns(struct user_namespace *ns);
- static inline void put_user_ns(struct user_namespace *ns)
- {
--      if (ns)
--              kref_put(&ns->kref, free_user_ns);
-+      if (ns && atomic_dec_and_test(&ns->count))
-+              free_user_ns(ns);
- }
- struct seq_operations;
 diff --git a/include/linux/vermagic.h b/include/linux/vermagic.h
 index 6f8fbcf..8259001 100644
 --- a/include/linux/vermagic.h
@@ -72117,7 +71570,7 @@ index 6071e91..ca6a489 100644
  /*
   *    Internals.  Dont't use..
 diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h
-index a13291f..af51fa3 100644
+index 5fd71a7..e5ef9a9 100644
 --- a/include/linux/vmstat.h
 +++ b/include/linux/vmstat.h
 @@ -95,18 +95,18 @@ static inline void vm_events_fold_cpu(int cpu)
@@ -72184,7 +71637,7 @@ index a13291f..af51fa3 100644
  
  static inline void __dec_zone_page_state(struct page *page,
 diff --git a/include/linux/xattr.h b/include/linux/xattr.h
-index fdbafc6..b7ffd47 100644
+index fdbafc6..49dfe4f 100644
 --- a/include/linux/xattr.h
 +++ b/include/linux/xattr.h
 @@ -28,7 +28,7 @@ struct xattr_handler {
@@ -72196,6 +71649,16 @@ index fdbafc6..b7ffd47 100644
  
  struct xattr {
        char *name;
+@@ -37,6 +37,9 @@ struct xattr {
+ };
+ ssize_t xattr_getsecurity(struct inode *, const char *, void *, size_t);
++#ifdef CONFIG_PAX_XATTR_PAX_FLAGS
++ssize_t pax_getxattr(struct dentry *, void *, size_t);
++#endif
+ ssize_t vfs_getxattr(struct dentry *, const char *, void *, size_t);
+ ssize_t vfs_listxattr(struct dentry *d, char *list, size_t size);
+ int __vfs_setxattr_noperm(struct dentry *, const char *, const void *, size_t, int);
 diff --git a/include/linux/zlib.h b/include/linux/zlib.h
 index 9c5a6b4..09c9438 100644
 --- a/include/linux/zlib.h
@@ -72256,10 +71719,10 @@ index adcbb20..62c2559 100644
  void v9fs_register_trans(struct p9_trans_module *m);
  void v9fs_unregister_trans(struct p9_trans_module *m);
 diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h
-index 7588ef4..e62d35f 100644
+index cdd3302..76f8ede 100644
 --- a/include/net/bluetooth/l2cap.h
 +++ b/include/net/bluetooth/l2cap.h
-@@ -552,7 +552,7 @@ struct l2cap_ops {
+@@ -551,7 +551,7 @@ struct l2cap_ops {
        void                    (*defer) (struct l2cap_chan *chan);
        struct sk_buff          *(*alloc_skb) (struct l2cap_chan *chan,
                                               unsigned long len, int nb);
@@ -72318,7 +71781,7 @@ index bdfbe68..4402ebe 100644
  extern int genl_register_family(struct genl_family *family);
  extern int genl_register_family_with_ops(struct genl_family *family,
 diff --git a/include/net/gro_cells.h b/include/net/gro_cells.h
-index e5062c9..48a9a4b 100644
+index 734d9b5..48a9a4b 100644
 --- a/include/net/gro_cells.h
 +++ b/include/net/gro_cells.h
 @@ -29,7 +29,7 @@ static inline void gro_cells_receive(struct gro_cells *gcells, struct sk_buff *s
@@ -72330,17 +71793,6 @@ index e5062c9..48a9a4b 100644
                kfree_skb(skb);
                return;
        }
-@@ -73,8 +73,8 @@ static inline int gro_cells_init(struct gro_cells *gcells, struct net_device *de
-       int i;
-       gcells->gro_cells_mask = roundup_pow_of_two(netif_get_num_default_rss_queues()) - 1;
--      gcells->cells = kcalloc(sizeof(struct gro_cell),
--                              gcells->gro_cells_mask + 1,
-+      gcells->cells = kcalloc(gcells->gro_cells_mask + 1,
-+                              sizeof(struct gro_cell),
-                               GFP_KERNEL);
-       if (!gcells->cells)
-               return -ENOMEM;
 diff --git a/include/net/inet_connection_sock.h b/include/net/inet_connection_sock.h
 index 1832927..ce39aea 100644
 --- a/include/net/inet_connection_sock.h
@@ -72410,7 +71862,7 @@ index e49db91..76a81de 100644
         fib_info_update_nh_saddr((net), &FIB_RES_NH(res)))
  #define FIB_RES_GW(res)                       (FIB_RES_NH(res).nh_gw)
 diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h
-index 68c69d5..bdab192 100644
+index fce8e6b..3ca4916 100644
 --- a/include/net/ip_vs.h
 +++ b/include/net/ip_vs.h
 @@ -599,7 +599,7 @@ struct ip_vs_conn {
@@ -72431,7 +71883,7 @@ index 68c69d5..bdab192 100644
        atomic_t                weight;         /* server weight */
  
        atomic_t                refcnt;         /* reference counter */
-@@ -980,11 +980,11 @@ struct netns_ipvs {
+@@ -981,11 +981,11 @@ struct netns_ipvs {
        /* ip_vs_lblc */
        int                     sysctl_lblc_expiration;
        struct ctl_table_header *lblc_ctl_header;
@@ -72458,10 +71910,10 @@ index 80ffde3..968b0f4 100644
  #include <net/irda/irias_object.h>
  #include <net/irda/ircomm_core.h>
 diff --git a/include/net/iucv/af_iucv.h b/include/net/iucv/af_iucv.h
-index cc7c197..9f2da2a 100644
+index 714cc9a..ea05f3e 100644
 --- a/include/net/iucv/af_iucv.h
 +++ b/include/net/iucv/af_iucv.h
-@@ -141,7 +141,7 @@ struct iucv_sock {
+@@ -149,7 +149,7 @@ struct iucv_skb_cb {
  struct iucv_sock_list {
        struct hlist_head head;
        rwlock_t          lock;
@@ -72538,10 +71990,10 @@ index 567c681..cd73ac0 100644
  struct llc_sap_state {
        u8                         curr_state;
 diff --git a/include/net/mac80211.h b/include/net/mac80211.h
-index ee50c5e..1bc3b1a 100644
+index f7eba13..91ed983 100644
 --- a/include/net/mac80211.h
 +++ b/include/net/mac80211.h
-@@ -3996,7 +3996,7 @@ struct rate_control_ops {
+@@ -4119,7 +4119,7 @@ struct rate_control_ops {
        void (*add_sta_debugfs)(void *priv, void *priv_sta,
                                struct dentry *dir);
        void (*remove_sta_debugfs)(void *priv, void *priv_sta);
@@ -72551,7 +72003,7 @@ index ee50c5e..1bc3b1a 100644
  static inline int rate_supported(struct ieee80211_sta *sta,
                                 enum ieee80211_band band,
 diff --git a/include/net/neighbour.h b/include/net/neighbour.h
-index 0dab173..1b76af0 100644
+index 7e748ad..5c6229b 100644
 --- a/include/net/neighbour.h
 +++ b/include/net/neighbour.h
 @@ -123,7 +123,7 @@ struct neigh_ops {
@@ -72639,7 +72091,7 @@ index 9690b0f..87aded7 100644
  
  /**
 diff --git a/include/net/netns/conntrack.h b/include/net/netns/conntrack.h
-index 923cb20..deae816 100644
+index c9c0c53..53f24c3 100644
 --- a/include/net/netns/conntrack.h
 +++ b/include/net/netns/conntrack.h
 @@ -12,10 +12,10 @@ struct nf_conntrack_ecache;
@@ -72665,10 +72117,10 @@ index 923cb20..deae816 100644
  };
  
 diff --git a/include/net/netns/ipv4.h b/include/net/netns/ipv4.h
-index 2ae2b83..dbdc85e 100644
+index 2ba9de8..47bd6c7 100644
 --- a/include/net/netns/ipv4.h
 +++ b/include/net/netns/ipv4.h
-@@ -64,7 +64,7 @@ struct netns_ipv4 {
+@@ -67,7 +67,7 @@ struct netns_ipv4 {
        kgid_t sysctl_ping_group_range[2];
        long sysctl_tcp_mem[3];
  
@@ -72713,7 +72165,7 @@ index 5a15fab..d799ea7 100644
  extern int    __rtnl_link_register(struct rtnl_link_ops *ops);
  extern void   __rtnl_link_unregister(struct rtnl_link_ops *ops);
 diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h
-index 7fdf298..197e9f7 100644
+index df85a0c..19ac300 100644
 --- a/include/net/sctp/sctp.h
 +++ b/include/net/sctp/sctp.h
 @@ -330,9 +330,9 @@ do {                                                                       \
@@ -72752,7 +72204,7 @@ index 2a82d13..62a31c2 100644
  
  /* Get the size of a DATA chunk payload. */
 diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
-index fdeb85a..1329d95 100644
+index 0e0f9d2..cd05ebb 100644
 --- a/include/net/sctp/structs.h
 +++ b/include/net/sctp/structs.h
 @@ -517,7 +517,7 @@ struct sctp_pf {
@@ -72764,11 +72216,23 @@ index fdeb85a..1329d95 100644
  
  
  /* Structure to track chunk fragments that have been acked, but peer
+diff --git a/include/net/secure_seq.h b/include/net/secure_seq.h
+index c2e542b..6ca975b 100644
+--- a/include/net/secure_seq.h
++++ b/include/net/secure_seq.h
+@@ -3,6 +3,7 @@
+ #include <linux/types.h>
++extern void net_secret_init(void);
+ extern __u32 secure_ip_id(__be32 daddr);
+ extern __u32 secure_ipv6_id(const __be32 daddr[4]);
+ extern u32 secure_ipv4_port_ephemeral(__be32 saddr, __be32 daddr, __be16 dport);
 diff --git a/include/net/sock.h b/include/net/sock.h
-index 25afaa0..8bb0070 100644
+index 0be480a..586232f 100644
 --- a/include/net/sock.h
 +++ b/include/net/sock.h
-@@ -322,7 +322,7 @@ struct sock {
+@@ -325,7 +325,7 @@ struct sock {
  #ifdef CONFIG_RPS
        __u32                   sk_rxhash;
  #endif
@@ -72777,7 +72241,7 @@ index 25afaa0..8bb0070 100644
        int                     sk_rcvbuf;
  
        struct sk_filter __rcu  *sk_filter;
-@@ -1781,7 +1781,7 @@ static inline void sk_nocaps_add(struct sock *sk, netdev_features_t flags)
+@@ -1796,7 +1796,7 @@ static inline void sk_nocaps_add(struct sock *sk, netdev_features_t flags)
  }
  
  static inline int skb_do_copy_data_nocache(struct sock *sk, struct sk_buff *skb,
@@ -72786,7 +72250,7 @@ index 25afaa0..8bb0070 100644
                                           int copy, int offset)
  {
        if (skb->ip_summed == CHECKSUM_NONE) {
-@@ -2040,7 +2040,7 @@ static inline void sk_stream_moderate_sndbuf(struct sock *sk)
+@@ -2055,7 +2055,7 @@ static inline void sk_stream_moderate_sndbuf(struct sock *sk)
        }
  }
  
@@ -72796,10 +72260,10 @@ index 25afaa0..8bb0070 100644
  /**
   * sk_page_frag - return an appropriate page_frag
 diff --git a/include/net/tcp.h b/include/net/tcp.h
-index aed42c7..43890c6 100644
+index a345480..3c65cf4 100644
 --- a/include/net/tcp.h
 +++ b/include/net/tcp.h
-@@ -530,7 +530,7 @@ extern void tcp_retransmit_timer(struct sock *sk);
+@@ -529,7 +529,7 @@ extern void tcp_retransmit_timer(struct sock *sk);
  extern void tcp_xmit_retransmit_queue(struct sock *);
  extern void tcp_simple_retransmit(struct sock *);
  extern int tcp_trim_head(struct sock *, struct sk_buff *, u32);
@@ -72808,7 +72272,7 @@ index aed42c7..43890c6 100644
  
  extern void tcp_send_probe0(struct sock *);
  extern void tcp_send_partial(struct sock *);
-@@ -701,8 +701,8 @@ struct tcp_skb_cb {
+@@ -700,8 +700,8 @@ struct tcp_skb_cb {
                struct inet6_skb_parm   h6;
  #endif
        } header;       /* For incoming frames          */
@@ -72819,7 +72283,7 @@ index aed42c7..43890c6 100644
        __u32           when;           /* used to compute rtt's        */
        __u8            tcp_flags;      /* TCP header flags. (tcp[13])  */
  
-@@ -716,7 +716,7 @@ struct tcp_skb_cb {
+@@ -715,7 +715,7 @@ struct tcp_skb_cb {
  
        __u8            ip_dsfield;     /* IPv4 tos or IPv6 dsfield     */
        /* 1 byte hole */
@@ -72829,7 +72293,7 @@ index aed42c7..43890c6 100644
  
  #define TCP_SKB_CB(__skb)     ((struct tcp_skb_cb *)&((__skb)->cb[0]))
 diff --git a/include/net/xfrm.h b/include/net/xfrm.h
-index 63445ed..d6fc34f 100644
+index 24c8886..e6fb816 100644
 --- a/include/net/xfrm.h
 +++ b/include/net/xfrm.h
 @@ -304,7 +304,7 @@ struct xfrm_policy_afinfo {
@@ -72859,7 +72323,7 @@ index 63445ed..d6fc34f 100644
  
  /* Flags for xfrm_mode. */
  enum {
-@@ -514,7 +514,7 @@ struct xfrm_policy {
+@@ -520,7 +520,7 @@ struct xfrm_policy {
        struct timer_list       timer;
  
        struct flow_cache_object flo;
@@ -72882,7 +72346,7 @@ index 1a046b1..ee0bef0 100644
  /**
   * iw_create_cm_id - Create an IW CM identifier.
 diff --git a/include/scsi/libfc.h b/include/scsi/libfc.h
-index 399162b..b337f1a 100644
+index e1379b4..67eafbe 100644
 --- a/include/scsi/libfc.h
 +++ b/include/scsi/libfc.h
 @@ -762,6 +762,7 @@ struct libfc_function_template {
@@ -72903,10 +72367,10 @@ index 399162b..b337f1a 100644
        u8                             qfull;
        enum fc_lport_state            state;
 diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h
-index e65c62e..aa2e5a2 100644
+index a7f9cba..b1f44d0 100644
 --- a/include/scsi/scsi_device.h
 +++ b/include/scsi/scsi_device.h
-@@ -170,9 +170,9 @@ struct scsi_device {
+@@ -171,9 +171,9 @@ struct scsi_device {
        unsigned int max_device_blocked; /* what device_blocked counts down from  */
  #define SCSI_DEFAULT_DEVICE_BLOCKED   3
  
@@ -72933,8 +72397,21 @@ index b797e8f..8e2c3aa 100644
  
  
  /**
+diff --git a/include/sound/compress_driver.h b/include/sound/compress_driver.h
+index ff6c741..393815f 100644
+--- a/include/sound/compress_driver.h
++++ b/include/sound/compress_driver.h
+@@ -130,7 +130,7 @@ struct snd_compr_ops {
+                       struct snd_compr_caps *caps);
+       int (*get_codec_caps) (struct snd_compr_stream *stream,
+                       struct snd_compr_codec_caps *codec);
+-};
++} __no_const;
+ /**
+  * struct snd_compr: Compressed device
 diff --git a/include/sound/soc.h b/include/sound/soc.h
-index bc56738..a4be132 100644
+index a6a059c..2243336 100644
 --- a/include/sound/soc.h
 +++ b/include/sound/soc.h
 @@ -771,7 +771,7 @@ struct snd_soc_codec_driver {
@@ -72956,10 +72433,10 @@ index bc56738..a4be132 100644
  struct snd_soc_platform {
        const char *name;
 diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h
-index 663e34a..91b306a 100644
+index c4af592..20c52d2 100644
 --- a/include/target/target_core_base.h
 +++ b/include/target/target_core_base.h
-@@ -654,7 +654,7 @@ struct se_device {
+@@ -657,7 +657,7 @@ struct se_device {
        spinlock_t              stats_lock;
        /* Active commands on this virtual SE device */
        atomic_t                simple_cmds;
@@ -73139,7 +72616,7 @@ index d876736..ccce5c0 100644
  #define __cpu_to_le64s(x) do { (void)(x); } while (0)
  #define __le64_to_cpus(x) do { (void)(x); } while (0)
 diff --git a/include/uapi/linux/elf.h b/include/uapi/linux/elf.h
-index 126a817..d522bd1 100644
+index 8072d35..e77aeb8 100644
 --- a/include/uapi/linux/elf.h
 +++ b/include/uapi/linux/elf.h
 @@ -37,6 +37,17 @@ typedef __s64       Elf64_Sxword;
@@ -73273,10 +72750,10 @@ index 6d67213..8dab561 100644
  /* CTL_VM names: */
  enum
 diff --git a/include/uapi/linux/xattr.h b/include/uapi/linux/xattr.h
-index 26607bd..588b65f 100644
+index e4629b9..6958086 100644
 --- a/include/uapi/linux/xattr.h
 +++ b/include/uapi/linux/xattr.h
-@@ -60,5 +60,9 @@
+@@ -63,5 +63,9 @@
  #define XATTR_POSIX_ACL_DEFAULT  "posix_acl_default"
  #define XATTR_NAME_POSIX_ACL_DEFAULT XATTR_SYSTEM_PREFIX XATTR_POSIX_ACL_DEFAULT
  
@@ -73306,10 +72783,10 @@ index f9466fa..f4e2b81 100644
  
  #define NR_USB_REQUEST_I2C_SUB_IO 0x02
 diff --git a/include/video/uvesafb.h b/include/video/uvesafb.h
-index 0993a22..32ba2fe 100644
+index 1a91850..28573f8 100644
 --- a/include/video/uvesafb.h
 +++ b/include/video/uvesafb.h
-@@ -177,6 +177,7 @@ struct uvesafb_par {
+@@ -122,6 +122,7 @@ struct uvesafb_par {
        u8 ypan;                        /* 0 - nothing, 1 - ypan, 2 - ywrap */
        u8 pmi_setpal;                  /* PMI for palette changes */
        u16 *pmi_base;                  /* protected mode interface location */
@@ -73318,10 +72795,10 @@ index 0993a22..32ba2fe 100644
        void *pmi_pal;
        u8 *vbe_state_orig;             /*
 diff --git a/init/Kconfig b/init/Kconfig
-index be8b7f5..1eeca9b 100644
+index 5341d72..153f24f 100644
 --- a/init/Kconfig
 +++ b/init/Kconfig
-@@ -990,6 +990,7 @@ endif # CGROUPS
+@@ -984,6 +984,7 @@ endif # CGROUPS
  
  config CHECKPOINT_RESTORE
        bool "Checkpoint/restore support" if EXPERT
@@ -73329,7 +72806,7 @@ index be8b7f5..1eeca9b 100644
        default n
        help
          Enables additional kernel features in a sake of checkpoint/restore.
-@@ -1468,7 +1469,7 @@ config SLUB_DEBUG
+@@ -1471,7 +1472,7 @@ config SLUB_DEBUG
  
  config COMPAT_BRK
        bool "Disable heap randomization"
@@ -73338,7 +72815,7 @@ index be8b7f5..1eeca9b 100644
        help
          Randomizing heap placement makes heap exploits harder, but it
          also breaks ancient binaries (including anything libc5 based).
-@@ -1711,7 +1712,7 @@ config INIT_ALL_POSSIBLE
+@@ -1734,7 +1735,7 @@ config INIT_ALL_POSSIBLE
  config STOP_MACHINE
        bool
        default y
@@ -73362,7 +72839,7 @@ index 7bc47ee..6da2dc7 100644
  ifneq ($(CONFIG_BLK_DEV_INITRD),y)
  obj-y                          += noinitramfs.o
 diff --git a/init/do_mounts.c b/init/do_mounts.c
-index 1d1b634..a1c810f 100644
+index a2b49f2..03a0e17c 100644
 --- a/init/do_mounts.c
 +++ b/init/do_mounts.c
 @@ -355,11 +355,11 @@ static void __init get_fs_names(char *page)
@@ -73443,7 +72920,7 @@ index f5b978a..69dbfe8 100644
        if (!S_ISBLK(stat.st_mode))
                return 0;
 diff --git a/init/do_mounts_initrd.c b/init/do_mounts_initrd.c
-index f9acf71..1e19144 100644
+index a32ec1c..ac08811 100644
 --- a/init/do_mounts_initrd.c
 +++ b/init/do_mounts_initrd.c
 @@ -58,8 +58,8 @@ static void __init handle_initrd(void)
@@ -73455,9 +72932,9 @@ index f9acf71..1e19144 100644
 +      sys_mkdir((const char __force_user *)"/old", 0700);
 +      sys_chdir((const char __force_user *)"/old");
  
-       /*
-        * In case that a resume from disk is carried out by linuxrc or one of
-@@ -73,31 +73,31 @@ static void __init handle_initrd(void)
+       /* try loading default modules from initrd */
+       load_default_modules();
+@@ -76,31 +76,31 @@ static void __init handle_initrd(void)
        current->flags &= ~PF_FREEZER_SKIP;
  
        /* move initrd to rootfs' /old */
@@ -73496,7 +72973,7 @@ index f9acf71..1e19144 100644
                printk(KERN_NOTICE "Trying to free ramdisk memory ... ");
                if (fd < 0) {
                        error = fd;
-@@ -120,11 +120,11 @@ int __init initrd_load(void)
+@@ -123,11 +123,11 @@ int __init initrd_load(void)
                 * mounted in the normal path.
                 */
                if (rd_load_image("/initrd.image") && ROOT_DEV != Root_RAM0) {
@@ -73542,10 +73019,10 @@ index 8cb6db5..d729f50 100644
                sys_ioctl(fd, RAID_AUTORUN, raid_autopart);
                sys_close(fd);
 diff --git a/init/init_task.c b/init/init_task.c
-index 8b2f399..f0797c9 100644
+index ba0a7f36..2bcf1d5 100644
 --- a/init/init_task.c
 +++ b/init/init_task.c
-@@ -20,5 +20,9 @@ EXPORT_SYMBOL(init_task);
+@@ -22,5 +22,9 @@ EXPORT_SYMBOL(init_task);
   * Initial thread structure. Alignment of this is handled by a special
   * linker map entry.
   */
@@ -73556,7 +73033,7 @@ index 8b2f399..f0797c9 100644
        { INIT_THREAD_INFO(init_task) };
 +#endif
 diff --git a/init/initramfs.c b/init/initramfs.c
-index 84c6bf1..8899338 100644
+index a67ef9d..3d88592 100644
 --- a/init/initramfs.c
 +++ b/init/initramfs.c
 @@ -84,7 +84,7 @@ static void __init free_hash(void)
@@ -73668,10 +73145,10 @@ index 84c6bf1..8899338 100644
        next_state = Reset;
        return 0;
 diff --git a/init/main.c b/init/main.c
-index cee4b5c..360e10a 100644
+index 63534a1..8abcaf1 100644
 --- a/init/main.c
 +++ b/init/main.c
-@@ -96,6 +96,8 @@ static inline void mark_rodata_ro(void) { }
+@@ -98,6 +98,8 @@ static inline void mark_rodata_ro(void) { }
  extern void tc_init(void);
  #endif
  
@@ -73680,7 +73157,7 @@ index cee4b5c..360e10a 100644
  /*
   * Debug helper: via this flag we know that we are in 'early bootup code'
   * where only the boot processor is running with IRQ disabled.  This means
-@@ -149,6 +151,61 @@ static int __init set_reset_devices(char *str)
+@@ -151,6 +153,64 @@ static int __init set_reset_devices(char *str)
  
  __setup("reset_devices", set_reset_devices);
  
@@ -73695,6 +73172,8 @@ index cee4b5c..360e10a 100644
 +#endif
 +
 +#if defined(CONFIG_X86_64) && defined(CONFIG_PAX_MEMORY_UDEREF)
++unsigned long pax_user_shadow_base __read_only = 1UL << TASK_SIZE_MAX_SHIFT;
++EXPORT_SYMBOL(pax_user_shadow_base);
 +extern char pax_enter_kernel_user[];
 +extern char pax_exit_kernel_user[];
 +extern pgdval_t clone_pgd_mask;
@@ -73721,6 +73200,7 @@ index cee4b5c..360e10a 100644
 +      memcpy(pax_enter_kernel_user, (unsigned char []){0xc3}, 1);
 +      memcpy(pax_exit_kernel_user, (unsigned char []){0xc3}, 1);
 +      clone_pgd_mask = ~(pgdval_t)0UL;
++      pax_user_shadow_base = 0UL;
 +#endif
 +
 +      return 0;
@@ -73742,7 +73222,7 @@ index cee4b5c..360e10a 100644
  static const char * argv_init[MAX_INIT_ARGS+2] = { "init", NULL, };
  const char * envp_init[MAX_INIT_ENVS+2] = { "HOME=/", "TERM=linux", NULL, };
  static const char *panic_later, *panic_param;
-@@ -681,6 +738,7 @@ int __init_or_module do_one_initcall(initcall_t fn)
+@@ -683,6 +743,7 @@ int __init_or_module do_one_initcall(initcall_t fn)
  {
        int count = preempt_count();
        int ret;
@@ -73750,7 +73230,7 @@ index cee4b5c..360e10a 100644
  
        if (initcall_debug)
                ret = do_one_initcall_debug(fn);
-@@ -693,15 +751,15 @@ int __init_or_module do_one_initcall(initcall_t fn)
+@@ -695,15 +756,15 @@ int __init_or_module do_one_initcall(initcall_t fn)
                sprintf(msgbuf, "error code %d ", ret);
  
        if (preempt_count() != count) {
@@ -73770,7 +73250,7 @@ index cee4b5c..360e10a 100644
        }
  
        return ret;
-@@ -755,8 +813,14 @@ static void __init do_initcall_level(int level)
+@@ -757,8 +818,14 @@ static void __init do_initcall_level(int level)
                   level, level,
                   &repair_env_string);
  
@@ -73786,7 +73266,7 @@ index cee4b5c..360e10a 100644
  }
  
  static void __init do_initcalls(void)
-@@ -790,8 +854,14 @@ static void __init do_pre_smp_initcalls(void)
+@@ -792,8 +859,14 @@ static void __init do_pre_smp_initcalls(void)
  {
        initcall_t *fn;
  
@@ -73801,8 +73281,8 @@ index cee4b5c..360e10a 100644
 +      }
  }
  
- static int run_init_process(const char *init_filename)
-@@ -877,7 +947,7 @@ static noinline void __init kernel_init_freeable(void)
+ /*
+@@ -890,7 +963,7 @@ static noinline void __init kernel_init_freeable(void)
        do_basic_setup();
  
        /* Open the /dev/console on the rootfs, this should never fail */
@@ -73811,7 +73291,7 @@ index cee4b5c..360e10a 100644
                printk(KERN_WARNING "Warning: unable to open an initial console.\n");
  
        (void) sys_dup(0);
-@@ -890,11 +960,13 @@ static noinline void __init kernel_init_freeable(void)
+@@ -903,11 +976,13 @@ static noinline void __init kernel_init_freeable(void)
        if (!ramdisk_execute_command)
                ramdisk_execute_command = "/init";
  
@@ -73889,7 +73369,7 @@ index 383d638..943fdbb 100644
        mq_table.data = get_mq(table);
  
 diff --git a/ipc/mqueue.c b/ipc/mqueue.c
-index f3f40dc..ffe5a3a 100644
+index e4e47f6..a85e0ad 100644
 --- a/ipc/mqueue.c
 +++ b/ipc/mqueue.c
 @@ -278,6 +278,7 @@ static struct inode *mqueue_get_inode(struct super_block *sb,
@@ -73901,7 +73381,7 @@ index f3f40dc..ffe5a3a 100644
                if (u->mq_bytes + mq_bytes < u->mq_bytes ||
                    u->mq_bytes + mq_bytes > rlimit(RLIMIT_MSGQUEUE)) {
 diff --git a/ipc/msg.c b/ipc/msg.c
-index 31cd1bf..9778e0f8 100644
+index fede1d0..9778e0f8 100644
 --- a/ipc/msg.c
 +++ b/ipc/msg.c
 @@ -309,18 +309,19 @@ static inline int msg_security(struct kern_ipc_perm *ipcp, int msgflg)
@@ -73929,14 +73409,6 @@ index 31cd1bf..9778e0f8 100644
        msg_params.key = key;
        msg_params.flg = msgflg;
  
-@@ -872,6 +873,7 @@ long do_msgrcv(int msqid, void __user *buf, size_t bufsz, long msgtyp,
-                                                       goto out_unlock;
-                                               break;
-                                       }
-+                                      msg = ERR_PTR(-EAGAIN);
-                               } else
-                                       break;
-                               msg_counter++;
 diff --git a/ipc/sem.c b/ipc/sem.c
 index 58d31f1..cce7a55 100644
 --- a/ipc/sem.c
@@ -73970,7 +73442,7 @@ index 58d31f1..cce7a55 100644
        sem_params.flg = semflg;
        sem_params.u.nsems = nsems;
 diff --git a/ipc/shm.c b/ipc/shm.c
-index 4fa6d8f..55cff14 100644
+index 7e199fa..180a1ca 100644
 --- a/ipc/shm.c
 +++ b/ipc/shm.c
 @@ -69,6 +69,14 @@ static void shm_destroy (struct ipc_namespace *ns, struct shmid_kernel *shp);
@@ -73988,7 +73460,7 @@ index 4fa6d8f..55cff14 100644
  void shm_init_ns(struct ipc_namespace *ns)
  {
        ns->shm_ctlmax = SHMMAX;
-@@ -521,6 +529,14 @@ static int newseg(struct ipc_namespace *ns, struct ipc_params *params)
+@@ -531,6 +539,14 @@ static int newseg(struct ipc_namespace *ns, struct ipc_params *params)
        shp->shm_lprid = 0;
        shp->shm_atim = shp->shm_dtim = 0;
        shp->shm_ctim = get_seconds();
@@ -74003,7 +73475,7 @@ index 4fa6d8f..55cff14 100644
        shp->shm_segsz = size;
        shp->shm_nattch = 0;
        shp->shm_file = file;
-@@ -572,18 +588,19 @@ static inline int shm_more_checks(struct kern_ipc_perm *ipcp,
+@@ -582,18 +598,19 @@ static inline int shm_more_checks(struct kern_ipc_perm *ipcp,
        return 0;
  }
  
@@ -74028,7 +73500,7 @@ index 4fa6d8f..55cff14 100644
        shm_params.key = key;
        shm_params.flg = shmflg;
        shm_params.u.size = size;
-@@ -1004,6 +1021,12 @@ long do_shmat(int shmid, char __user *shmaddr, int shmflg, ulong *raddr,
+@@ -1014,6 +1031,12 @@ long do_shmat(int shmid, char __user *shmaddr, int shmflg, ulong *raddr,
                f_mode = FMODE_READ | FMODE_WRITE;
        }
        if (shmflg & SHM_EXEC) {
@@ -74041,7 +73513,7 @@ index 4fa6d8f..55cff14 100644
                prot |= PROT_EXEC;
                acc_mode |= S_IXUGO;
        }
-@@ -1027,9 +1050,21 @@ long do_shmat(int shmid, char __user *shmaddr, int shmflg, ulong *raddr,
+@@ -1037,9 +1060,21 @@ long do_shmat(int shmid, char __user *shmaddr, int shmflg, ulong *raddr,
        if (err)
                goto out_unlock;
  
@@ -74064,7 +73536,7 @@ index 4fa6d8f..55cff14 100644
        shm_unlock(shp);
  
 diff --git a/kernel/acct.c b/kernel/acct.c
-index 051e071..15e0920 100644
+index b9bd7f0..1762b4a 100644
 --- a/kernel/acct.c
 +++ b/kernel/acct.c
 @@ -550,7 +550,7 @@ static void do_acct_process(struct bsd_acct_struct *acct,
@@ -74117,10 +73589,10 @@ index d596e53..dbef3c3 100644
                audit_send_reply(NETLINK_CB(skb).portid, seq, AUDIT_GET, 0, 0,
                                 &status_set, sizeof(status_set));
 diff --git a/kernel/auditsc.c b/kernel/auditsc.c
-index a371f85..da826c1 100644
+index c4b72b0..8654c4e 100644
 --- a/kernel/auditsc.c
 +++ b/kernel/auditsc.c
-@@ -2292,7 +2292,7 @@ int auditsc_get_stamp(struct audit_context *ctx,
+@@ -2295,7 +2295,7 @@ int auditsc_get_stamp(struct audit_context *ctx,
  }
  
  /* global counter which is incremented every time something logs in */
@@ -74129,7 +73601,7 @@ index a371f85..da826c1 100644
  
  /**
   * audit_set_loginuid - set current task's audit_context loginuid
-@@ -2316,7 +2316,7 @@ int audit_set_loginuid(kuid_t loginuid)
+@@ -2319,7 +2319,7 @@ int audit_set_loginuid(kuid_t loginuid)
                return -EPERM;
  #endif  /* CONFIG_AUDIT_LOGINUID_IMMUTABLE */
  
@@ -74139,7 +73611,7 @@ index a371f85..da826c1 100644
                struct audit_buffer *ab;
  
 diff --git a/kernel/capability.c b/kernel/capability.c
-index 493d972..f87dfbd 100644
+index f6c2ce5..982c0f9 100644
 --- a/kernel/capability.c
 +++ b/kernel/capability.c
 @@ -202,6 +202,9 @@ SYSCALL_DEFINE2(capget, cap_user_header_t, header, cap_user_data_t, dataptr)
@@ -74208,9 +73680,9 @@ index 493d972..f87dfbd 100644
 +EXPORT_SYMBOL(ns_capable_nolog);
 +
  /**
-  * capable - Determine if the current task has a superior capability in effect
-  * @cap: The capability to be tested for
-@@ -408,6 +427,12 @@ bool capable(int cap)
+  * file_ns_capable - Determine if the file's opener had a capability in effect
+  * @file:  The file we want to check
+@@ -432,6 +451,12 @@ bool capable(int cap)
  }
  EXPORT_SYMBOL(capable);
  
@@ -74223,7 +73695,7 @@ index 493d972..f87dfbd 100644
  /**
   * nsown_capable - Check superior capability to one's own user_ns
   * @cap: The capability in question
-@@ -440,3 +465,10 @@ bool inode_capable(const struct inode *inode, int cap)
+@@ -464,3 +489,10 @@ bool inode_capable(const struct inode *inode, int cap)
  
        return ns_capable(ns, cap) && kuid_has_mapping(ns, inode->i_uid);
  }
@@ -74235,10 +73707,10 @@ index 493d972..f87dfbd 100644
 +      return ns_capable_nolog(ns, cap) && kuid_has_mapping(ns, inode->i_uid);
 +}
 diff --git a/kernel/cgroup.c b/kernel/cgroup.c
-index 1e23664..570a83d 100644
+index ba1f977..f840d9c 100644
 --- a/kernel/cgroup.c
 +++ b/kernel/cgroup.c
-@@ -5543,7 +5543,7 @@ static int cgroup_css_links_read(struct cgroup *cont,
+@@ -5569,7 +5569,7 @@ static int cgroup_css_links_read(struct cgroup *cont,
                struct css_set *cg = link->cg;
                struct task_struct *task;
                int count = 0;
@@ -74248,7 +73720,7 @@ index 1e23664..570a83d 100644
                        if (count++ > MAX_TASKS_SHOWN_PER_CSS) {
                                seq_puts(seq, "  ...\n");
 diff --git a/kernel/compat.c b/kernel/compat.c
-index 36700e9..73d770c 100644
+index 19971d8..02fe2df 100644
 --- a/kernel/compat.c
 +++ b/kernel/compat.c
 @@ -13,6 +13,7 @@
@@ -74572,10 +74044,10 @@ index e0573a4..3874e41 100644
  
  /**
 diff --git a/kernel/debug/debug_core.c b/kernel/debug/debug_core.c
-index 9a61738..c5c8f3a 100644
+index c26278f..e323fb8 100644
 --- a/kernel/debug/debug_core.c
 +++ b/kernel/debug/debug_core.c
-@@ -122,7 +122,7 @@ static DEFINE_RAW_SPINLOCK(dbg_slave_lock);
+@@ -123,7 +123,7 @@ static DEFINE_RAW_SPINLOCK(dbg_slave_lock);
   */
  static atomic_t                       masters_in_kgdb;
  static atomic_t                       slaves_in_kgdb;
@@ -74584,7 +74056,7 @@ index 9a61738..c5c8f3a 100644
  atomic_t                      kgdb_setting_breakpoint;
  
  struct task_struct            *kgdb_usethread;
-@@ -132,7 +132,7 @@ int                                kgdb_single_step;
+@@ -133,7 +133,7 @@ int                                kgdb_single_step;
  static pid_t                  kgdb_sstep_pid;
  
  /* to keep track of the CPU which is doing the single stepping*/
@@ -74593,7 +74065,7 @@ index 9a61738..c5c8f3a 100644
  
  /*
   * If you are debugging a problem where roundup (the collection of
-@@ -540,7 +540,7 @@ return_normal:
+@@ -541,7 +541,7 @@ return_normal:
         * kernel will only try for the value of sstep_tries before
         * giving up and continuing on.
         */
@@ -74602,7 +74074,7 @@ index 9a61738..c5c8f3a 100644
            (kgdb_info[cpu].task &&
             kgdb_info[cpu].task->pid != kgdb_sstep_pid) && --sstep_tries) {
                atomic_set(&kgdb_active, -1);
-@@ -634,8 +634,8 @@ cpu_master_loop:
+@@ -635,8 +635,8 @@ cpu_master_loop:
        }
  
  kgdb_restore:
@@ -74613,7 +74085,7 @@ index 9a61738..c5c8f3a 100644
                if (kgdb_info[sstep_cpu].task)
                        kgdb_sstep_pid = kgdb_info[sstep_cpu].task->pid;
                else
-@@ -887,18 +887,18 @@ static void kgdb_unregister_callbacks(void)
+@@ -888,18 +888,18 @@ static void kgdb_unregister_callbacks(void)
  static void kgdb_tasklet_bpt(unsigned long ing)
  {
        kgdb_breakpoint();
@@ -74636,7 +74108,7 @@ index 9a61738..c5c8f3a 100644
  }
  EXPORT_SYMBOL_GPL(kgdb_schedule_breakpoint);
 diff --git a/kernel/debug/kdb/kdb_main.c b/kernel/debug/kdb/kdb_main.c
-index 8875254..7cf4928 100644
+index 00eb8f7..d7e3244 100644
 --- a/kernel/debug/kdb/kdb_main.c
 +++ b/kernel/debug/kdb/kdb_main.c
 @@ -1974,7 +1974,7 @@ static int kdb_lsmod(int argc, const char **argv)
@@ -74658,10 +74130,23 @@ index 8875254..7cf4928 100644
  #ifdef CONFIG_MODULE_UNLOAD
                {
 diff --git a/kernel/events/core.c b/kernel/events/core.c
-index 7b6646a..3cb1135 100644
+index 9fcb094..5c06aeb 100644
 --- a/kernel/events/core.c
 +++ b/kernel/events/core.c
-@@ -182,7 +182,7 @@ int perf_proc_update_handler(struct ctl_table *table, int write,
+@@ -155,7 +155,11 @@ static struct srcu_struct pmus_srcu;
+  *   1 - disallow cpu events for unpriv
+  *   2 - disallow kernel profiling for unpriv
+  */
+-int sysctl_perf_event_paranoid __read_mostly = 1;
++#ifdef CONFIG_GRKERNSEC_HIDESYM
++int sysctl_perf_event_legitimately_concerned __read_mostly = 2;
++#else
++int sysctl_perf_event_legitimately_concerned __read_mostly = 1;
++#endif
+ /* Minimum for 512 kiB + 1 user control page */
+ int sysctl_perf_event_mlock __read_mostly = 512 + (PAGE_SIZE / 1024); /* 'free' kiB per user */
+@@ -182,7 +186,7 @@ int perf_proc_update_handler(struct ctl_table *table, int write,
        return 0;
  }
  
@@ -74670,7 +74155,7 @@ index 7b6646a..3cb1135 100644
  
  static void cpu_ctx_sched_out(struct perf_cpu_context *cpuctx,
                              enum event_type_t event_type);
-@@ -2677,7 +2677,7 @@ static void __perf_event_read(void *info)
+@@ -2677,7 +2681,7 @@ static void __perf_event_read(void *info)
  
  static inline u64 perf_event_count(struct perf_event *event)
  {
@@ -74679,7 +74164,7 @@ index 7b6646a..3cb1135 100644
  }
  
  static u64 perf_event_read(struct perf_event *event)
-@@ -3007,9 +3007,9 @@ u64 perf_event_read_value(struct perf_event *event, u64 *enabled, u64 *running)
+@@ -3007,9 +3011,9 @@ u64 perf_event_read_value(struct perf_event *event, u64 *enabled, u64 *running)
        mutex_lock(&event->child_mutex);
        total += perf_event_read(event);
        *enabled += event->total_time_enabled +
@@ -74691,7 +74176,7 @@ index 7b6646a..3cb1135 100644
  
        list_for_each_entry(child, &event->child_list, child_list) {
                total += perf_event_read(child);
-@@ -3412,10 +3412,10 @@ void perf_event_update_userpage(struct perf_event *event)
+@@ -3412,10 +3416,10 @@ void perf_event_update_userpage(struct perf_event *event)
                userpg->offset -= local64_read(&event->hw.prev_count);
  
        userpg->time_enabled = enabled +
@@ -74704,7 +74189,7 @@ index 7b6646a..3cb1135 100644
  
        arch_perf_update_userpage(userpg, now);
  
-@@ -3974,11 +3974,11 @@ static void perf_output_read_one(struct perf_output_handle *handle,
+@@ -3974,11 +3978,11 @@ static void perf_output_read_one(struct perf_output_handle *handle,
        values[n++] = perf_event_count(event);
        if (read_format & PERF_FORMAT_TOTAL_TIME_ENABLED) {
                values[n++] = enabled +
@@ -74718,7 +74203,7 @@ index 7b6646a..3cb1135 100644
        }
        if (read_format & PERF_FORMAT_ID)
                values[n++] = primary_event_id(event);
-@@ -4721,12 +4721,12 @@ static void perf_event_mmap_event(struct perf_mmap_event *mmap_event)
+@@ -4726,12 +4730,12 @@ static void perf_event_mmap_event(struct perf_mmap_event *mmap_event)
                 * need to add enough zero bytes after the string to handle
                 * the 64bit alignment we do later.
                 */
@@ -74733,7 +74218,7 @@ index 7b6646a..3cb1135 100644
                if (IS_ERR(name)) {
                        name = strncpy(tmp, "//toolong", sizeof(tmp));
                        goto got_name;
-@@ -6165,7 +6165,7 @@ perf_event_alloc(struct perf_event_attr *attr, int cpu,
+@@ -6167,7 +6171,7 @@ perf_event_alloc(struct perf_event_attr *attr, int cpu,
        event->parent           = parent_event;
  
        event->ns               = get_pid_ns(task_active_pid_ns(current));
@@ -74742,7 +74227,7 @@ index 7b6646a..3cb1135 100644
  
        event->state            = PERF_EVENT_STATE_INACTIVE;
  
-@@ -6790,10 +6790,10 @@ static void sync_child_event(struct perf_event *child_event,
+@@ -6795,10 +6799,10 @@ static void sync_child_event(struct perf_event *child_event,
        /*
         * Add back the child's count to the parent's count:
         */
@@ -74757,10 +74242,10 @@ index 7b6646a..3cb1135 100644
  
        /*
 diff --git a/kernel/exit.c b/kernel/exit.c
-index b4df219..f13c02d 100644
+index 60bc027..ca6d727 100644
 --- a/kernel/exit.c
 +++ b/kernel/exit.c
-@@ -170,6 +170,10 @@ void release_task(struct task_struct * p)
+@@ -172,6 +172,10 @@ void release_task(struct task_struct * p)
        struct task_struct *leader;
        int zap_leader;
  repeat:
@@ -74771,7 +74256,7 @@ index b4df219..f13c02d 100644
        /* don't need to get the RCU readlock here - the process is dead and
         * can't be modifying its own credentials. But shut RCU-lockdep up */
        rcu_read_lock();
-@@ -338,7 +342,7 @@ int allow_signal(int sig)
+@@ -340,7 +344,7 @@ int allow_signal(int sig)
         * know it'll be handled, so that they don't get converted to
         * SIGKILL or just silently dropped.
         */
@@ -74780,7 +74265,7 @@ index b4df219..f13c02d 100644
        recalc_sigpending();
        spin_unlock_irq(&current->sighand->siglock);
        return 0;
-@@ -708,6 +712,8 @@ void do_exit(long code)
+@@ -710,6 +714,8 @@ void do_exit(long code)
        struct task_struct *tsk = current;
        int group_dead;
  
@@ -74789,7 +74274,7 @@ index b4df219..f13c02d 100644
        profile_task_exit(tsk);
  
        WARN_ON(blk_needs_flush_plug(tsk));
-@@ -724,7 +730,6 @@ void do_exit(long code)
+@@ -726,7 +732,6 @@ void do_exit(long code)
         * mm_release()->clear_child_tid() from writing to a user-controlled
         * kernel address.
         */
@@ -74797,7 +74282,7 @@ index b4df219..f13c02d 100644
  
        ptrace_event(PTRACE_EVENT_EXIT, code);
  
-@@ -783,6 +788,9 @@ void do_exit(long code)
+@@ -785,6 +790,9 @@ void do_exit(long code)
        tsk->exit_code = code;
        taskstats_exit(tsk, group_dead);
  
@@ -74807,7 +74292,7 @@ index b4df219..f13c02d 100644
        exit_mm(tsk);
  
        if (group_dead)
-@@ -903,7 +911,7 @@ SYSCALL_DEFINE1(exit, int, error_code)
+@@ -905,7 +913,7 @@ SYSCALL_DEFINE1(exit, int, error_code)
   * Take down every thread in the group.  This is called by fatal signals
   * as well as by sys_exit_group (below).
   */
@@ -74817,7 +74302,7 @@ index b4df219..f13c02d 100644
  {
        struct signal_struct *sig = current->signal;
 diff --git a/kernel/fork.c b/kernel/fork.c
-index 5630e52..0cee608 100644
+index 1766d32..c0e44e2 100644
 --- a/kernel/fork.c
 +++ b/kernel/fork.c
 @@ -318,7 +318,7 @@ static struct task_struct *dup_task_struct(struct task_struct *orig)
@@ -74865,7 +74350,7 @@ index 5630e52..0cee608 100644
 +      tmp->vm_mirror = NULL;
 +      file = tmp->vm_file;
 +      if (file) {
-+              struct inode *inode = file->f_path.dentry->d_inode;
++              struct inode *inode = file_inode(file);
 +              struct address_space *mapping = file->f_mapping;
 +
 +              get_file(file);
@@ -74960,7 +74445,7 @@ index 5630e52..0cee608 100644
 -              tmp->vm_next = tmp->vm_prev = NULL;
 -              file = tmp->vm_file;
 -              if (file) {
--                      struct inode *inode = file->f_path.dentry->d_inode;
+-                      struct inode *inode = file_inode(file);
 -                      struct address_space *mapping = file->f_mapping;
 -
 -                      get_file(file);
@@ -75076,7 +74561,7 @@ index 5630e52..0cee608 100644
        if (atomic_read(&p->real_cred->user->processes) >=
                        task_rlimit(p, RLIMIT_NPROC)) {
                if (!capable(CAP_SYS_ADMIN) && !capable(CAP_SYS_RESOURCE) &&
-@@ -1435,6 +1488,11 @@ static struct task_struct *copy_process(unsigned long clone_flags,
+@@ -1441,6 +1494,11 @@ static struct task_struct *copy_process(unsigned long clone_flags,
                goto bad_fork_free_pid;
        }
  
@@ -75088,7 +74573,7 @@ index 5630e52..0cee608 100644
        if (clone_flags & CLONE_THREAD) {
                current->signal->nr_threads++;
                atomic_inc(&current->signal->live);
-@@ -1518,6 +1576,8 @@ bad_fork_cleanup_count:
+@@ -1524,6 +1582,8 @@ bad_fork_cleanup_count:
  bad_fork_free:
        free_task(p);
  fork_out:
@@ -75097,7 +74582,7 @@ index 5630e52..0cee608 100644
        return ERR_PTR(retval);
  }
  
-@@ -1568,6 +1628,23 @@ long do_fork(unsigned long clone_flags,
+@@ -1574,6 +1634,23 @@ long do_fork(unsigned long clone_flags,
                        return -EINVAL;
        }
  
@@ -75121,7 +74606,7 @@ index 5630e52..0cee608 100644
        /*
         * Determine whether and which event to report to ptracer.  When
         * called from kernel_thread or CLONE_UNTRACED is explicitly
-@@ -1602,6 +1679,8 @@ long do_fork(unsigned long clone_flags,
+@@ -1608,6 +1685,8 @@ long do_fork(unsigned long clone_flags,
                if (clone_flags & CLONE_PARENT_SETTID)
                        put_user(nr, parent_tidptr);
  
@@ -75130,7 +74615,7 @@ index 5630e52..0cee608 100644
                if (clone_flags & CLONE_VFORK) {
                        p->vfork_done = &vfork;
                        init_completion(&vfork);
-@@ -1755,7 +1834,7 @@ static int unshare_fs(unsigned long unshare_flags, struct fs_struct **new_fsp)
+@@ -1761,7 +1840,7 @@ static int unshare_fs(unsigned long unshare_flags, struct fs_struct **new_fsp)
                return 0;
  
        /* don't need lock here; in the worst case we'll do useless copy */
@@ -75139,7 +74624,7 @@ index 5630e52..0cee608 100644
                return 0;
  
        *new_fsp = copy_fs_struct(fs);
-@@ -1869,7 +1948,8 @@ SYSCALL_DEFINE1(unshare, unsigned long, unshare_flags)
+@@ -1873,7 +1952,8 @@ SYSCALL_DEFINE1(unshare, unsigned long, unshare_flags)
                        fs = current->fs;
                        spin_lock(&fs->lock);
                        current->fs = new_fs;
@@ -75150,7 +74635,7 @@ index 5630e52..0cee608 100644
                        else
                                new_fs = fs;
 diff --git a/kernel/futex.c b/kernel/futex.c
-index 8879430..31696f1 100644
+index b26dcfc..39e266a 100644
 --- a/kernel/futex.c
 +++ b/kernel/futex.c
 @@ -54,6 +54,7 @@
@@ -75161,7 +74646,7 @@ index 8879430..31696f1 100644
  #include <linux/signal.h>
  #include <linux/export.h>
  #include <linux/magic.h>
-@@ -239,6 +240,11 @@ get_futex_key(u32 __user *uaddr, int fshared, union futex_key *key, int rw)
+@@ -241,6 +242,11 @@ get_futex_key(u32 __user *uaddr, int fshared, union futex_key *key, int rw)
        struct page *page, *page_head;
        int err, ro = 0;
  
@@ -75173,7 +74658,7 @@ index 8879430..31696f1 100644
        /*
         * The futex address must be "naturally" aligned.
         */
-@@ -2731,6 +2737,7 @@ static int __init futex_init(void)
+@@ -2732,6 +2738,7 @@ static int __init futex_init(void)
  {
        u32 curval;
        int i;
@@ -75181,7 +74666,7 @@ index 8879430..31696f1 100644
  
        /*
         * This will fail and we want it. Some arch implementations do
-@@ -2742,8 +2749,11 @@ static int __init futex_init(void)
+@@ -2743,8 +2750,11 @@ static int __init futex_init(void)
         * implementation, the non-functional ones will return
         * -ENOSYS.
         */
@@ -75194,10 +74679,10 @@ index 8879430..31696f1 100644
        for (i = 0; i < ARRAY_SIZE(futex_queues); i++) {
                plist_head_init(&futex_queues[i].chain);
 diff --git a/kernel/futex_compat.c b/kernel/futex_compat.c
-index a9642d5..51eb98c 100644
+index f9f44fd..29885e4 100644
 --- a/kernel/futex_compat.c
 +++ b/kernel/futex_compat.c
-@@ -31,7 +31,7 @@ fetch_robust_entry(compat_uptr_t *uentry, struct robust_list __user **entry,
+@@ -32,7 +32,7 @@ fetch_robust_entry(compat_uptr_t *uentry, struct robust_list __user **entry,
        return 0;
  }
  
@@ -75232,10 +74717,10 @@ index 9b22d03..6295b62 100644
                                prev->next = info->next;
                        else
 diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c
-index cdd5607..c3fc919 100644
+index 7ef5556..8247f11 100644
 --- a/kernel/hrtimer.c
 +++ b/kernel/hrtimer.c
-@@ -1407,7 +1407,7 @@ void hrtimer_peek_ahead_timers(void)
+@@ -1416,7 +1416,7 @@ void hrtimer_peek_ahead_timers(void)
        local_irq_restore(flags);
  }
  
@@ -75244,7 +74729,7 @@ index cdd5607..c3fc919 100644
  {
        struct hrtimer_cpu_base *cpu_base = &__get_cpu_var(hrtimer_bases);
  
-@@ -1751,7 +1751,7 @@ static int __cpuinit hrtimer_cpu_notify(struct notifier_block *self,
+@@ -1758,7 +1758,7 @@ static int __cpuinit hrtimer_cpu_notify(struct notifier_block *self,
        return NOTIFY_OK;
  }
  
@@ -75253,6 +74738,27 @@ index cdd5607..c3fc919 100644
        .notifier_call = hrtimer_cpu_notify,
  };
  
+diff --git a/kernel/irq_work.c b/kernel/irq_work.c
+index 55fcce6..0e4cf34 100644
+--- a/kernel/irq_work.c
++++ b/kernel/irq_work.c
+@@ -189,12 +189,13 @@ static int irq_work_cpu_notify(struct notifier_block *self,
+       return NOTIFY_OK;
+ }
+-static struct notifier_block cpu_notify;
++static struct notifier_block cpu_notify = {
++      .notifier_call = irq_work_cpu_notify,
++      .priority = 0,
++};
+ static __init int irq_work_init_cpu_notifier(void)
+ {
+-      cpu_notify.notifier_call = irq_work_cpu_notify;
+-      cpu_notify.priority = 0;
+       register_cpu_notifier(&cpu_notify);
+       return 0;
+ }
 diff --git a/kernel/jump_label.c b/kernel/jump_label.c
 index 60f48fa..7f3a770 100644
 --- a/kernel/jump_label.c
@@ -75418,10 +74924,10 @@ index e30ac0f..3528cac 100644
  
        /*
 diff --git a/kernel/kexec.c b/kernel/kexec.c
-index 5e4bd78..00c5b91 100644
+index ffd4e11..c3ff6bf 100644
 --- a/kernel/kexec.c
 +++ b/kernel/kexec.c
-@@ -1045,7 +1045,8 @@ asmlinkage long compat_sys_kexec_load(unsigned long entry,
+@@ -1048,7 +1048,8 @@ asmlinkage long compat_sys_kexec_load(unsigned long entry,
                                unsigned long flags)
  {
        struct compat_kexec_segment in;
@@ -75432,10 +74938,10 @@ index 5e4bd78..00c5b91 100644
  
        /* Don't allow clients that don't understand the native
 diff --git a/kernel/kmod.c b/kernel/kmod.c
-index 0023a87..9c0c068 100644
+index 8985c87..f539dbe 100644
 --- a/kernel/kmod.c
 +++ b/kernel/kmod.c
-@@ -74,7 +74,7 @@ static void free_modprobe_argv(struct subprocess_info *info)
+@@ -75,7 +75,7 @@ static void free_modprobe_argv(struct subprocess_info *info)
        kfree(info->argv);
  }
  
@@ -75444,7 +74950,7 @@ index 0023a87..9c0c068 100644
  {
        static char *envp[] = {
                "HOME=/",
-@@ -83,7 +83,7 @@ static int call_modprobe(char *module_name, int wait)
+@@ -84,7 +84,7 @@ static int call_modprobe(char *module_name, int wait)
                NULL
        };
  
@@ -75453,7 +74959,7 @@ index 0023a87..9c0c068 100644
        if (!argv)
                goto out;
  
-@@ -95,7 +95,8 @@ static int call_modprobe(char *module_name, int wait)
+@@ -96,7 +96,8 @@ static int call_modprobe(char *module_name, int wait)
        argv[1] = "-q";
        argv[2] = "--";
        argv[3] = module_name;  /* check free_modprobe_argv() */
@@ -75463,7 +74969,7 @@ index 0023a87..9c0c068 100644
  
        return call_usermodehelper_fns(modprobe_path, argv, envp,
                wait | UMH_KILLABLE, NULL, free_modprobe_argv, NULL);
-@@ -120,9 +121,8 @@ out:
+@@ -121,9 +122,8 @@ out:
   * If module auto-loading support is disabled then this function
   * becomes a no-operation.
   */
@@ -75474,9 +74980,9 @@ index 0023a87..9c0c068 100644
        char module_name[MODULE_NAME_LEN];
        unsigned int max_modprobes;
        int ret;
-@@ -130,9 +130,7 @@ int __request_module(bool wait, const char *fmt, ...)
#define MAX_KMOD_CONCURRENT 50        /* Completely arbitrary value - KAO */
-       static int kmod_loop_msg;
+@@ -139,9 +139,7 @@ int __request_module(bool wait, const char *fmt, ...)
       */
+       WARN_ON_ONCE(wait && current_is_async());
  
 -      va_start(args, fmt);
 -      ret = vsnprintf(module_name, MODULE_NAME_LEN, fmt, args);
@@ -75485,7 +74991,7 @@ index 0023a87..9c0c068 100644
        if (ret >= MODULE_NAME_LEN)
                return -ENAMETOOLONG;
  
-@@ -140,6 +138,20 @@ int __request_module(bool wait, const char *fmt, ...)
+@@ -149,6 +147,20 @@ int __request_module(bool wait, const char *fmt, ...)
        if (ret)
                return ret;
  
@@ -75506,7 +75012,7 @@ index 0023a87..9c0c068 100644
        /* If modprobe needs a service that is in a module, we get a recursive
         * loop.  Limit the number of running kmod threads to max_threads/2 or
         * MAX_KMOD_CONCURRENT, whichever is the smaller.  A cleaner method
-@@ -168,11 +180,52 @@ int __request_module(bool wait, const char *fmt, ...)
+@@ -177,11 +189,52 @@ int __request_module(bool wait, const char *fmt, ...)
  
        trace_module_request(module_name, wait, _RET_IP_);
  
@@ -75560,7 +75066,7 @@ index 0023a87..9c0c068 100644
  EXPORT_SYMBOL(__request_module);
  #endif /* CONFIG_MODULES */
  
-@@ -283,7 +336,7 @@ static int wait_for_helper(void *data)
+@@ -292,7 +345,7 @@ static int wait_for_helper(void *data)
                 *
                 * Thus the __user pointer cast is valid here.
                 */
@@ -75569,7 +75075,7 @@ index 0023a87..9c0c068 100644
  
                /*
                 * If ret is 0, either ____call_usermodehelper failed and the
-@@ -635,7 +688,7 @@ EXPORT_SYMBOL(call_usermodehelper_fns);
+@@ -649,7 +702,7 @@ EXPORT_SYMBOL(call_usermodehelper_fns);
  static int proc_cap_handler(struct ctl_table *table, int write,
                         void __user *buffer, size_t *lenp, loff_t *ppos)
  {
@@ -75579,7 +75085,7 @@ index 0023a87..9c0c068 100644
        kernel_cap_t new_cap;
        int err, i;
 diff --git a/kernel/kprobes.c b/kernel/kprobes.c
-index 098f396..fe85ff1 100644
+index 3fed7f0..a3f95ed 100644
 --- a/kernel/kprobes.c
 +++ b/kernel/kprobes.c
 @@ -185,7 +185,7 @@ static kprobe_opcode_t __kprobes *__get_insn_slot(struct kprobe_insn_cache *c)
@@ -75600,7 +75106,7 @@ index 098f396..fe85ff1 100644
                        kfree(kip);
                }
                return 1;
-@@ -2063,7 +2063,7 @@ static int __init init_kprobes(void)
+@@ -2073,7 +2073,7 @@ static int __init init_kprobes(void)
  {
        int i, err = 0;
        unsigned long offset = 0, size = 0;
@@ -75609,7 +75115,7 @@ index 098f396..fe85ff1 100644
        const char *symbol_name;
        void *addr;
        struct kprobe_blackpoint *kb;
-@@ -2148,11 +2148,11 @@ static void __kprobes report_probe(struct seq_file *pi, struct kprobe *p,
+@@ -2158,11 +2158,11 @@ static void __kprobes report_probe(struct seq_file *pi, struct kprobe *p,
                kprobe_type = "k";
  
        if (sym)
@@ -75623,7 +75129,7 @@ index 098f396..fe85ff1 100644
                        p->addr, kprobe_type, p->addr);
  
        if (!pp)
-@@ -2190,7 +2190,7 @@ static int __kprobes show_kprobe_addr(struct seq_file *pi, void *v)
+@@ -2199,7 +2199,7 @@ static int __kprobes show_kprobe_addr(struct seq_file *pi, void *v)
        const char *sym = NULL;
        unsigned int i = *(loff_t *) v;
        unsigned long offset = 0;
@@ -75655,7 +75161,7 @@ index 6ada93c..dce7d5d 100644
                .name = "notes",
                .mode = S_IRUGO,
 diff --git a/kernel/lockdep.c b/kernel/lockdep.c
-index 7981e5b..7f2105c 100644
+index 8a0efac..56f1e2d 100644
 --- a/kernel/lockdep.c
 +++ b/kernel/lockdep.c
 @@ -590,6 +590,10 @@ static int static_obj(void *obj)
@@ -75736,7 +75242,7 @@ index b2c71c5..7b88d63 100644
                seq_printf(m, "%40s %14lu %29s %pS\n",
                           name, stats->contending_point[i],
 diff --git a/kernel/module.c b/kernel/module.c
-index eab0827..f488603 100644
+index 0925c9a..6b044ac 100644
 --- a/kernel/module.c
 +++ b/kernel/module.c
 @@ -61,6 +61,7 @@
@@ -75757,7 +75263,7 @@ index eab0827..f488603 100644
  
  int register_module_notifier(struct notifier_block * nb)
  {
-@@ -322,7 +324,7 @@ bool each_symbol_section(bool (*fn)(const struct symsearch *arr,
+@@ -323,7 +325,7 @@ bool each_symbol_section(bool (*fn)(const struct symsearch *arr,
                return true;
  
        list_for_each_entry_rcu(mod, &modules, list) {
@@ -75766,7 +75272,7 @@ index eab0827..f488603 100644
                        { mod->syms, mod->syms + mod->num_syms, mod->crcs,
                          NOT_GPL_ONLY, false },
                        { mod->gpl_syms, mod->gpl_syms + mod->num_gpl_syms,
-@@ -347,7 +349,7 @@ bool each_symbol_section(bool (*fn)(const struct symsearch *arr,
+@@ -348,7 +350,7 @@ bool each_symbol_section(bool (*fn)(const struct symsearch *arr,
                if (mod->state == MODULE_STATE_UNFORMED)
                        continue;
  
@@ -75775,7 +75281,7 @@ index eab0827..f488603 100644
                        return true;
        }
        return false;
-@@ -484,7 +486,7 @@ static inline void __percpu *mod_percpu(struct module *mod)
+@@ -485,7 +487,7 @@ static inline void __percpu *mod_percpu(struct module *mod)
  static int percpu_modalloc(struct module *mod,
                           unsigned long size, unsigned long align)
  {
@@ -75784,7 +75290,7 @@ index eab0827..f488603 100644
                printk(KERN_WARNING "%s: per-cpu alignment %li > %li\n",
                       mod->name, align, PAGE_SIZE);
                align = PAGE_SIZE;
-@@ -1088,7 +1090,7 @@ struct module_attribute module_uevent =
+@@ -1089,7 +1091,7 @@ struct module_attribute module_uevent =
  static ssize_t show_coresize(struct module_attribute *mattr,
                             struct module_kobject *mk, char *buffer)
  {
@@ -75793,7 +75299,7 @@ index eab0827..f488603 100644
  }
  
  static struct module_attribute modinfo_coresize =
-@@ -1097,7 +1099,7 @@ static struct module_attribute modinfo_coresize =
+@@ -1098,7 +1100,7 @@ static struct module_attribute modinfo_coresize =
  static ssize_t show_initsize(struct module_attribute *mattr,
                             struct module_kobject *mk, char *buffer)
  {
@@ -75802,7 +75308,7 @@ index eab0827..f488603 100644
  }
  
  static struct module_attribute modinfo_initsize =
-@@ -1311,7 +1313,7 @@ resolve_symbol_wait(struct module *mod,
+@@ -1312,7 +1314,7 @@ resolve_symbol_wait(struct module *mod,
   */
  #ifdef CONFIG_SYSFS
  
@@ -75811,7 +75317,7 @@ index eab0827..f488603 100644
  static inline bool sect_empty(const Elf_Shdr *sect)
  {
        return !(sect->sh_flags & SHF_ALLOC) || sect->sh_size == 0;
-@@ -1451,7 +1453,7 @@ static void add_notes_attrs(struct module *mod, const struct load_info *info)
+@@ -1452,7 +1454,7 @@ static void add_notes_attrs(struct module *mod, const struct load_info *info)
  {
        unsigned int notes, loaded, i;
        struct module_notes_attrs *notes_attrs;
@@ -75820,7 +75326,7 @@ index eab0827..f488603 100644
  
        /* failed to create section attributes, so can't create notes */
        if (!mod->sect_attrs)
-@@ -1563,7 +1565,7 @@ static void del_usage_links(struct module *mod)
+@@ -1564,7 +1566,7 @@ static void del_usage_links(struct module *mod)
  static int module_add_modinfo_attrs(struct module *mod)
  {
        struct module_attribute *attr;
@@ -75829,7 +75335,7 @@ index eab0827..f488603 100644
        int error = 0;
        int i;
  
-@@ -1777,21 +1779,21 @@ static void set_section_ro_nx(void *base,
+@@ -1778,21 +1780,21 @@ static void set_section_ro_nx(void *base,
  
  static void unset_module_core_ro_nx(struct module *mod)
  {
@@ -75859,7 +75365,7 @@ index eab0827..f488603 100644
                set_memory_rw);
  }
  
-@@ -1804,14 +1806,14 @@ void set_all_modules_text_rw(void)
+@@ -1805,14 +1807,14 @@ void set_all_modules_text_rw(void)
        list_for_each_entry_rcu(mod, &modules, list) {
                if (mod->state == MODULE_STATE_UNFORMED)
                        continue;
@@ -75880,7 +75386,7 @@ index eab0827..f488603 100644
                                                set_memory_rw);
                }
        }
-@@ -1827,14 +1829,14 @@ void set_all_modules_text_ro(void)
+@@ -1828,14 +1830,14 @@ void set_all_modules_text_ro(void)
        list_for_each_entry_rcu(mod, &modules, list) {
                if (mod->state == MODULE_STATE_UNFORMED)
                        continue;
@@ -75901,7 +75407,7 @@ index eab0827..f488603 100644
                                                set_memory_ro);
                }
        }
-@@ -1880,16 +1882,19 @@ static void free_module(struct module *mod)
+@@ -1881,16 +1883,19 @@ static void free_module(struct module *mod)
  
        /* This may be NULL, but that's OK */
        unset_module_init_ro_nx(mod);
@@ -75924,7 +75430,7 @@ index eab0827..f488603 100644
  
  #ifdef CONFIG_MPU
        update_protections(current->mm);
-@@ -1959,9 +1964,31 @@ static int simplify_symbols(struct module *mod, const struct load_info *info)
+@@ -1960,9 +1965,31 @@ static int simplify_symbols(struct module *mod, const struct load_info *info)
        int ret = 0;
        const struct kernel_symbol *ksym;
  
@@ -75956,7 +75462,7 @@ index eab0827..f488603 100644
                switch (sym[i].st_shndx) {
                case SHN_COMMON:
                        /* We compiled with -fno-common.  These are not
-@@ -1982,7 +2009,9 @@ static int simplify_symbols(struct module *mod, const struct load_info *info)
+@@ -1983,7 +2010,9 @@ static int simplify_symbols(struct module *mod, const struct load_info *info)
                        ksym = resolve_symbol_wait(mod, info, name);
                        /* Ok if resolved.  */
                        if (ksym && !IS_ERR(ksym)) {
@@ -75966,7 +75472,7 @@ index eab0827..f488603 100644
                                break;
                        }
  
-@@ -2001,11 +2030,20 @@ static int simplify_symbols(struct module *mod, const struct load_info *info)
+@@ -2002,11 +2031,20 @@ static int simplify_symbols(struct module *mod, const struct load_info *info)
                                secbase = (unsigned long)mod_percpu(mod);
                        else
                                secbase = info->sechdrs[sym[i].st_shndx].sh_addr;
@@ -75987,7 +75493,7 @@ index eab0827..f488603 100644
        return ret;
  }
  
-@@ -2089,22 +2127,12 @@ static void layout_sections(struct module *mod, struct load_info *info)
+@@ -2090,22 +2128,12 @@ static void layout_sections(struct module *mod, struct load_info *info)
                            || s->sh_entsize != ~0UL
                            || strstarts(sname, ".init"))
                                continue;
@@ -76014,7 +75520,7 @@ index eab0827..f488603 100644
        }
  
        pr_debug("Init section allocation order:\n");
-@@ -2118,23 +2146,13 @@ static void layout_sections(struct module *mod, struct load_info *info)
+@@ -2119,23 +2147,13 @@ static void layout_sections(struct module *mod, struct load_info *info)
                            || s->sh_entsize != ~0UL
                            || !strstarts(sname, ".init"))
                                continue;
@@ -76043,7 +75549,7 @@ index eab0827..f488603 100644
        }
  }
  
-@@ -2306,7 +2324,7 @@ static void layout_symtab(struct module *mod, struct load_info *info)
+@@ -2308,7 +2326,7 @@ static void layout_symtab(struct module *mod, struct load_info *info)
  
        /* Put symbol section at end of init part of module. */
        symsect->sh_flags |= SHF_ALLOC;
@@ -76052,7 +75558,7 @@ index eab0827..f488603 100644
                                         info->index.sym) | INIT_OFFSET_MASK;
        pr_debug("\t%s\n", info->secstrings + symsect->sh_name);
  
-@@ -2323,13 +2341,13 @@ static void layout_symtab(struct module *mod, struct load_info *info)
+@@ -2325,13 +2343,13 @@ static void layout_symtab(struct module *mod, struct load_info *info)
        }
  
        /* Append room for core symbols at end of core part. */
@@ -76070,7 +75576,7 @@ index eab0827..f488603 100644
                                         info->index.str) | INIT_OFFSET_MASK;
        pr_debug("\t%s\n", info->secstrings + strsect->sh_name);
  }
-@@ -2347,12 +2365,14 @@ static void add_kallsyms(struct module *mod, const struct load_info *info)
+@@ -2349,12 +2367,14 @@ static void add_kallsyms(struct module *mod, const struct load_info *info)
        /* Make sure we get permanent strtab: don't use info->strtab. */
        mod->strtab = (void *)info->sechdrs[info->index.str].sh_addr;
  
@@ -76087,7 +75593,7 @@ index eab0827..f488603 100644
        src = mod->symtab;
        for (ndst = i = 0; i < mod->num_symtab; i++) {
                if (i == 0 ||
-@@ -2364,6 +2384,8 @@ static void add_kallsyms(struct module *mod, const struct load_info *info)
+@@ -2366,6 +2386,8 @@ static void add_kallsyms(struct module *mod, const struct load_info *info)
                }
        }
        mod->core_num_syms = ndst;
@@ -76096,7 +75602,7 @@ index eab0827..f488603 100644
  }
  #else
  static inline void layout_symtab(struct module *mod, struct load_info *info)
-@@ -2397,17 +2419,33 @@ void * __weak module_alloc(unsigned long size)
+@@ -2399,17 +2421,33 @@ void * __weak module_alloc(unsigned long size)
        return vmalloc_exec(size);
  }
  
@@ -76135,7 +75641,7 @@ index eab0827..f488603 100644
                mutex_unlock(&module_mutex);
        }
        return ret;
-@@ -2683,8 +2721,14 @@ static struct module *setup_load_info(struct load_info *info, int flags)
+@@ -2685,8 +2723,14 @@ static struct module *setup_load_info(struct load_info *info, int flags)
  static int check_modinfo(struct module *mod, struct load_info *info, int flags)
  {
        const char *modmagic = get_modinfo(info, "vermagic");
@@ -76150,7 +75656,7 @@ index eab0827..f488603 100644
        if (flags & MODULE_INIT_IGNORE_VERMAGIC)
                modmagic = NULL;
  
-@@ -2710,7 +2754,7 @@ static int check_modinfo(struct module *mod, struct load_info *info, int flags)
+@@ -2712,7 +2756,7 @@ static int check_modinfo(struct module *mod, struct load_info *info, int flags)
        }
  
        /* Set up license info based on the info section */
@@ -76159,7 +75665,7 @@ index eab0827..f488603 100644
  
        return 0;
  }
-@@ -2804,7 +2848,7 @@ static int move_module(struct module *mod, struct load_info *info)
+@@ -2806,7 +2850,7 @@ static int move_module(struct module *mod, struct load_info *info)
        void *ptr;
  
        /* Do the allocs. */
@@ -76168,7 +75674,7 @@ index eab0827..f488603 100644
        /*
         * The pointer to this block is stored in the module structure
         * which is inside the block. Just mark it as not being a
-@@ -2814,11 +2858,11 @@ static int move_module(struct module *mod, struct load_info *info)
+@@ -2816,11 +2860,11 @@ static int move_module(struct module *mod, struct load_info *info)
        if (!ptr)
                return -ENOMEM;
  
@@ -76184,7 +75690,7 @@ index eab0827..f488603 100644
                /*
                 * The pointer to this block is stored in the module structure
                 * which is inside the block. This block doesn't need to be
-@@ -2827,13 +2871,45 @@ static int move_module(struct module *mod, struct load_info *info)
+@@ -2829,13 +2873,45 @@ static int move_module(struct module *mod, struct load_info *info)
                 */
                kmemleak_ignore(ptr);
                if (!ptr) {
@@ -76234,7 +75740,7 @@ index eab0827..f488603 100644
  
        /* Transfer each section which specifies SHF_ALLOC */
        pr_debug("final section addresses:\n");
-@@ -2844,16 +2920,45 @@ static int move_module(struct module *mod, struct load_info *info)
+@@ -2846,16 +2922,45 @@ static int move_module(struct module *mod, struct load_info *info)
                if (!(shdr->sh_flags & SHF_ALLOC))
                        continue;
  
@@ -76287,7 +75793,7 @@ index eab0827..f488603 100644
                pr_debug("\t0x%lx %s\n",
                         (long)shdr->sh_addr, info->secstrings + shdr->sh_name);
        }
-@@ -2908,12 +3013,12 @@ static void flush_module_icache(const struct module *mod)
+@@ -2912,12 +3017,12 @@ static void flush_module_icache(const struct module *mod)
         * Do it before processing of module parameters, so the module
         * can provide parameter accessor functions of its own.
         */
@@ -76306,7 +75812,7 @@ index eab0827..f488603 100644
  
        set_fs(old_fs);
  }
-@@ -2983,8 +3088,10 @@ out:
+@@ -2987,8 +3092,10 @@ out:
  static void module_deallocate(struct module *mod, struct load_info *info)
  {
        percpu_modfree(mod);
@@ -76319,7 +75825,7 @@ index eab0827..f488603 100644
  }
  
  int __weak module_finalize(const Elf_Ehdr *hdr,
-@@ -2997,7 +3104,9 @@ int __weak module_finalize(const Elf_Ehdr *hdr,
+@@ -3001,7 +3108,9 @@ int __weak module_finalize(const Elf_Ehdr *hdr,
  static int post_relocation(struct module *mod, const struct load_info *info)
  {
        /* Sort exception table now relocations are done. */
@@ -76329,7 +75835,7 @@ index eab0827..f488603 100644
  
        /* Copy relocated percpu area over. */
        percpu_modcopy(mod, (void *)info->sechdrs[info->index.pcpu].sh_addr,
-@@ -3051,16 +3160,16 @@ static int do_init_module(struct module *mod)
+@@ -3055,16 +3164,16 @@ static int do_init_module(struct module *mod)
                        MODULE_STATE_COMING, mod);
  
        /* Set RO and NX regions for core */
@@ -76354,7 +75860,7 @@ index eab0827..f488603 100644
  
        do_mod_ctors(mod);
        /* Start the module */
-@@ -3122,11 +3231,12 @@ static int do_init_module(struct module *mod)
+@@ -3126,11 +3235,12 @@ static int do_init_module(struct module *mod)
        mod->strtab = mod->core_strtab;
  #endif
        unset_module_init_ro_nx(mod);
@@ -76372,7 +75878,7 @@ index eab0827..f488603 100644
        mutex_unlock(&module_mutex);
        wake_up_all(&module_wq);
  
-@@ -3209,9 +3319,38 @@ again:
+@@ -3257,9 +3367,38 @@ static int load_module(struct load_info *info, const char __user *uargs,
        if (err)
                goto free_unload;
  
@@ -76411,7 +75917,7 @@ index eab0827..f488603 100644
        /* Fix up syms, so that st_value is a pointer to location. */
        err = simplify_symbols(mod, info);
        if (err < 0)
-@@ -3227,13 +3366,6 @@ again:
+@@ -3275,13 +3414,6 @@ static int load_module(struct load_info *info, const char __user *uargs,
  
        flush_module_icache(mod);
  
@@ -76424,9 +75930,9 @@ index eab0827..f488603 100644
 -
        dynamic_debug_setup(info->debug, info->num_debug);
  
-       mutex_lock(&module_mutex);
-@@ -3278,11 +3410,10 @@ again:
-       mutex_unlock(&module_mutex);
+       /* Finally it's fully formed, ready to start executing. */
+@@ -3316,11 +3448,10 @@ static int load_module(struct load_info *info, const char __user *uargs,
+  ddebug_cleanup:
        dynamic_debug_remove(info->debug);
        synchronize_sched();
 -      kfree(mod->args);
@@ -76438,7 +75944,7 @@ index eab0827..f488603 100644
   free_unload:
        module_unload_free(mod);
   unlink_mod:
-@@ -3365,10 +3496,16 @@ static const char *get_ksymbol(struct module *mod,
+@@ -3403,10 +3534,16 @@ static const char *get_ksymbol(struct module *mod,
        unsigned long nextval;
  
        /* At worse, next value is at end of module */
@@ -76458,7 +75964,7 @@ index eab0827..f488603 100644
  
        /* Scan for closest preceding symbol, and next symbol. (ELF
           starts real symbols at 1). */
-@@ -3621,7 +3758,7 @@ static int m_show(struct seq_file *m, void *p)
+@@ -3659,7 +3796,7 @@ static int m_show(struct seq_file *m, void *p)
                return 0;
  
        seq_printf(m, "%s %u",
@@ -76467,7 +75973,7 @@ index eab0827..f488603 100644
        print_unload_info(m, mod);
  
        /* Informative for users. */
-@@ -3630,7 +3767,7 @@ static int m_show(struct seq_file *m, void *p)
+@@ -3668,7 +3805,7 @@ static int m_show(struct seq_file *m, void *p)
                   mod->state == MODULE_STATE_COMING ? "Loading":
                   "Live");
        /* Used by oprofile and other similar tools. */
@@ -76476,7 +75982,7 @@ index eab0827..f488603 100644
  
        /* Taints info */
        if (mod->taints)
-@@ -3666,7 +3803,17 @@ static const struct file_operations proc_modules_operations = {
+@@ -3704,7 +3841,17 @@ static const struct file_operations proc_modules_operations = {
  
  static int __init proc_modules_init(void)
  {
@@ -76494,7 +76000,7 @@ index eab0827..f488603 100644
        return 0;
  }
  module_init(proc_modules_init);
-@@ -3727,14 +3874,14 @@ struct module *__module_address(unsigned long addr)
+@@ -3765,14 +3912,14 @@ struct module *__module_address(unsigned long addr)
  {
        struct module *mod;
  
@@ -76512,7 +76018,7 @@ index eab0827..f488603 100644
                        return mod;
        }
        return NULL;
-@@ -3769,11 +3916,20 @@ bool is_module_text_address(unsigned long addr)
+@@ -3807,11 +3954,20 @@ bool is_module_text_address(unsigned long addr)
   */
  struct module *__module_text_address(unsigned long addr)
  {
@@ -76585,10 +76091,10 @@ index 0799fd3..d06ae3b 100644
  extern void debug_mutex_init(struct mutex *lock, const char *name,
                             struct lock_class_key *key);
 diff --git a/kernel/mutex.c b/kernel/mutex.c
-index a307cc9..27fd2e9 100644
+index 52f2301..73f7528 100644
 --- a/kernel/mutex.c
 +++ b/kernel/mutex.c
-@@ -198,7 +198,7 @@ __mutex_lock_common(struct mutex *lock, long state, unsigned int subclass,
+@@ -199,7 +199,7 @@ __mutex_lock_common(struct mutex *lock, long state, unsigned int subclass,
        spin_lock_mutex(&lock->wait_lock, flags);
  
        debug_mutex_lock_common(lock, &waiter);
@@ -76597,7 +76103,7 @@ index a307cc9..27fd2e9 100644
  
        /* add waiting tasks to the end of the waitqueue (FIFO): */
        list_add_tail(&waiter.list, &lock->wait_list);
-@@ -227,8 +227,7 @@ __mutex_lock_common(struct mutex *lock, long state, unsigned int subclass,
+@@ -228,8 +228,7 @@ __mutex_lock_common(struct mutex *lock, long state, unsigned int subclass,
                 * TASK_UNINTERRUPTIBLE case.)
                 */
                if (unlikely(signal_pending_state(state, task))) {
@@ -76607,7 +76113,7 @@ index a307cc9..27fd2e9 100644
                        mutex_release(&lock->dep_map, 1, ip);
                        spin_unlock_mutex(&lock->wait_lock, flags);
  
-@@ -247,7 +246,7 @@ __mutex_lock_common(struct mutex *lock, long state, unsigned int subclass,
+@@ -248,7 +247,7 @@ __mutex_lock_common(struct mutex *lock, long state, unsigned int subclass,
  done:
        lock_acquired(&lock->dep_map, ip);
        /* got the lock - rejoice! */
@@ -76673,10 +76179,10 @@ index 2d5cc4c..d9ea600 100644
        return -ENOENT;
  }
 diff --git a/kernel/panic.c b/kernel/panic.c
-index e1b2822..5edc1d9 100644
+index 7c57cc9..28f1b3f 100644
 --- a/kernel/panic.c
 +++ b/kernel/panic.c
-@@ -410,7 +410,7 @@ static void warn_slowpath_common(const char *file, int line, void *caller,
+@@ -403,7 +403,7 @@ static void warn_slowpath_common(const char *file, int line, void *caller,
        const char *board;
  
        printk(KERN_WARNING "------------[ cut here ]------------\n");
@@ -76685,7 +76191,7 @@ index e1b2822..5edc1d9 100644
        board = dmi_get_system_info(DMI_PRODUCT_NAME);
        if (board)
                printk(KERN_WARNING "Hardware name: %s\n", board);
-@@ -465,7 +465,8 @@ EXPORT_SYMBOL(warn_slowpath_null);
+@@ -459,7 +459,8 @@ EXPORT_SYMBOL(warn_slowpath_null);
   */
  void __stack_chk_fail(void)
  {
@@ -76696,7 +76202,7 @@ index e1b2822..5edc1d9 100644
  }
  EXPORT_SYMBOL(__stack_chk_fail);
 diff --git a/kernel/pid.c b/kernel/pid.c
-index f2c6a68..4922d97 100644
+index 047dc62..418d74b 100644
 --- a/kernel/pid.c
 +++ b/kernel/pid.c
 @@ -33,6 +33,7 @@
@@ -76716,7 +76222,7 @@ index f2c6a68..4922d97 100644
  
  int pid_max_min = RESERVED_PIDS + 1;
  int pid_max_max = PID_MAX_LIMIT;
-@@ -441,10 +442,18 @@ EXPORT_SYMBOL(pid_task);
+@@ -440,10 +441,18 @@ EXPORT_SYMBOL(pid_task);
   */
  struct task_struct *find_task_by_pid_ns(pid_t nr, struct pid_namespace *ns)
  {
@@ -76736,7 +76242,7 @@ index f2c6a68..4922d97 100644
  }
  
  struct task_struct *find_task_by_vpid(pid_t vnr)
-@@ -452,6 +461,14 @@ struct task_struct *find_task_by_vpid(pid_t vnr)
+@@ -451,6 +460,14 @@ struct task_struct *find_task_by_vpid(pid_t vnr)
        return find_task_by_pid_ns(vnr, task_active_pid_ns(current));
  }
  
@@ -76765,10 +76271,10 @@ index bea15bd..789f3d0 100644
        if (write && !ns_capable(pid_ns->user_ns, CAP_SYS_ADMIN))
                return -EPERM;
 diff --git a/kernel/posix-cpu-timers.c b/kernel/posix-cpu-timers.c
-index 942ca27..111e609 100644
+index 8fd709c..542bf4b 100644
 --- a/kernel/posix-cpu-timers.c
 +++ b/kernel/posix-cpu-timers.c
-@@ -1576,14 +1576,14 @@ struct k_clock clock_posix_cpu = {
+@@ -1592,14 +1592,14 @@ struct k_clock clock_posix_cpu = {
  
  static __init int init_posix_cpu_timers(void)
  {
@@ -76786,7 +76292,7 @@ index 942ca27..111e609 100644
                .clock_get      = thread_cpu_clock_get,
                .timer_create   = thread_cpu_timer_create,
 diff --git a/kernel/posix-timers.c b/kernel/posix-timers.c
-index e885be1..380fe76 100644
+index 6edbb2c..334f085 100644
 --- a/kernel/posix-timers.c
 +++ b/kernel/posix-timers.c
 @@ -43,6 +43,7 @@
@@ -76869,7 +76375,7 @@ index e885be1..380fe76 100644
  }
  
  static int common_timer_create(struct k_itimer *new_timer)
-@@ -966,6 +967,13 @@ SYSCALL_DEFINE2(clock_settime, const clockid_t, which_clock,
+@@ -964,6 +965,13 @@ SYSCALL_DEFINE2(clock_settime, const clockid_t, which_clock,
        if (copy_from_user(&new_tp, tp, sizeof (*tp)))
                return -EFAULT;
  
@@ -76884,7 +76390,7 @@ index e885be1..380fe76 100644
  }
  
 diff --git a/kernel/power/process.c b/kernel/power/process.c
-index d5a258b..4271191 100644
+index 98088e0..aaf95c0 100644
 --- a/kernel/power/process.c
 +++ b/kernel/power/process.c
 @@ -33,6 +33,7 @@ static int try_to_freeze_tasks(bool user_only)
@@ -76927,10 +76433,10 @@ index d5a258b..4271191 100644
  
                if (pm_wakeup_pending()) {
 diff --git a/kernel/printk.c b/kernel/printk.c
-index 267ce78..2487112 100644
+index abbdd9e..f294251 100644
 --- a/kernel/printk.c
 +++ b/kernel/printk.c
-@@ -609,11 +609,17 @@ static unsigned int devkmsg_poll(struct file *file, poll_table *wait)
+@@ -615,11 +615,17 @@ static unsigned int devkmsg_poll(struct file *file, poll_table *wait)
        return ret;
  }
  
@@ -76948,7 +76454,7 @@ index 267ce78..2487112 100644
        /* write-only does not need any file context */
        if ((file->f_flags & O_ACCMODE) == O_WRONLY)
                return 0;
-@@ -822,7 +828,7 @@ static int syslog_action_restricted(int type)
+@@ -828,7 +834,7 @@ static int syslog_action_restricted(int type)
        if (dmesg_restrict)
                return 1;
        /* Unless restricted, we allow "read all" and "get buffer size" for everybody */
@@ -76957,7 +76463,7 @@ index 267ce78..2487112 100644
  }
  
  static int check_syslog_permissions(int type, bool from_file)
-@@ -834,6 +840,11 @@ static int check_syslog_permissions(int type, bool from_file)
+@@ -840,6 +846,11 @@ static int check_syslog_permissions(int type, bool from_file)
        if (from_file && type != SYSLOG_ACTION_OPEN)
                return 0;
  
@@ -76970,19 +76476,19 @@ index 267ce78..2487112 100644
                if (capable(CAP_SYSLOG))
                        return 0;
 diff --git a/kernel/profile.c b/kernel/profile.c
-index 1f39181..86093471 100644
+index dc3384e..0de5b49 100644
 --- a/kernel/profile.c
 +++ b/kernel/profile.c
-@@ -40,7 +40,7 @@ struct profile_hit {
- /* Oprofile timer tick hook */
- static int (*timer_hook)(struct pt_regs *) __read_mostly;
+@@ -37,7 +37,7 @@ struct profile_hit {
+ #define NR_PROFILE_HIT                (PAGE_SIZE/sizeof(struct profile_hit))
+ #define NR_PROFILE_GRP                (NR_PROFILE_HIT/PROFILE_GRPSZ)
  
 -static atomic_t *prof_buffer;
 +static atomic_unchecked_t *prof_buffer;
  static unsigned long prof_len, prof_shift;
  
  int prof_on __read_mostly;
-@@ -282,7 +282,7 @@ static void profile_flip_buffers(void)
+@@ -260,7 +260,7 @@ static void profile_flip_buffers(void)
                                        hits[i].pc = 0;
                                continue;
                        }
@@ -76991,7 +76497,7 @@ index 1f39181..86093471 100644
                        hits[i].hits = hits[i].pc = 0;
                }
        }
-@@ -343,9 +343,9 @@ static void do_profile_hits(int type, void *__pc, unsigned int nr_hits)
+@@ -321,9 +321,9 @@ static void do_profile_hits(int type, void *__pc, unsigned int nr_hits)
         * Add the current hit(s) and flush the write-queue out
         * to the global buffer:
         */
@@ -77003,7 +76509,7 @@ index 1f39181..86093471 100644
                hits[i].pc = hits[i].hits = 0;
        }
  out:
-@@ -420,7 +420,7 @@ static void do_profile_hits(int type, void *__pc, unsigned int nr_hits)
+@@ -398,7 +398,7 @@ static void do_profile_hits(int type, void *__pc, unsigned int nr_hits)
  {
        unsigned long pc;
        pc = ((unsigned long)__pc - (unsigned long)_stext) >> prof_shift;
@@ -77012,7 +76518,7 @@ index 1f39181..86093471 100644
  }
  #endif /* !CONFIG_SMP */
  
-@@ -518,7 +518,7 @@ read_profile(struct file *file, char __user *buf, size_t count, loff_t *ppos)
+@@ -494,7 +494,7 @@ read_profile(struct file *file, char __user *buf, size_t count, loff_t *ppos)
                        return -EFAULT;
                buf++; p++; count--; read++;
        }
@@ -77021,7 +76527,7 @@ index 1f39181..86093471 100644
        if (copy_to_user(buf, (void *)pnt, count))
                return -EFAULT;
        read += count;
-@@ -549,7 +549,7 @@ static ssize_t write_profile(struct file *file, const char __user *buf,
+@@ -525,7 +525,7 @@ static ssize_t write_profile(struct file *file, const char __user *buf,
        }
  #endif
        profile_discard_flip_buffers();
@@ -77031,7 +76537,7 @@ index 1f39181..86093471 100644
  }
  
 diff --git a/kernel/ptrace.c b/kernel/ptrace.c
-index 6cbeaae..cfe7ff0 100644
+index acbd284..00bb0c9 100644
 --- a/kernel/ptrace.c
 +++ b/kernel/ptrace.c
 @@ -324,7 +324,7 @@ static int ptrace_attach(struct task_struct *task, long request,
@@ -77052,7 +76558,7 @@ index 6cbeaae..cfe7ff0 100644
                        return -EFAULT;
                copied += retval;
                src += retval;
-@@ -720,7 +720,7 @@ int ptrace_request(struct task_struct *child, long request,
+@@ -726,7 +726,7 @@ int ptrace_request(struct task_struct *child, long request,
        bool seized = child->ptrace & PT_SEIZED;
        int ret = -EIO;
        siginfo_t siginfo, *si;
@@ -77061,7 +76567,7 @@ index 6cbeaae..cfe7ff0 100644
        unsigned long __user *datalp = datavp;
        unsigned long flags;
  
-@@ -922,14 +922,21 @@ SYSCALL_DEFINE4(ptrace, long, request, long, pid, unsigned long, addr,
+@@ -928,14 +928,21 @@ SYSCALL_DEFINE4(ptrace, long, request, long, pid, unsigned long, addr,
                goto out;
        }
  
@@ -77084,7 +76590,7 @@ index 6cbeaae..cfe7ff0 100644
                goto out_put_task_struct;
        }
  
-@@ -957,7 +964,7 @@ int generic_ptrace_peekdata(struct task_struct *tsk, unsigned long addr,
+@@ -963,7 +970,7 @@ int generic_ptrace_peekdata(struct task_struct *tsk, unsigned long addr,
        copied = access_process_vm(tsk, addr, &tmp, sizeof(tmp), 0);
        if (copied != sizeof(tmp))
                return -EIO;
@@ -77093,7 +76599,7 @@ index 6cbeaae..cfe7ff0 100644
  }
  
  int generic_ptrace_pokedata(struct task_struct *tsk, unsigned long addr,
-@@ -1051,7 +1058,7 @@ int compat_ptrace_request(struct task_struct *child, compat_long_t request,
+@@ -1057,7 +1064,7 @@ int compat_ptrace_request(struct task_struct *child, compat_long_t request,
  }
  
  asmlinkage long compat_sys_ptrace(compat_long_t request, compat_long_t pid,
@@ -77102,7 +76608,7 @@ index 6cbeaae..cfe7ff0 100644
  {
        struct task_struct *child;
        long ret;
-@@ -1067,14 +1074,21 @@ asmlinkage long compat_sys_ptrace(compat_long_t request, compat_long_t pid,
+@@ -1073,14 +1080,21 @@ asmlinkage long compat_sys_ptrace(compat_long_t request, compat_long_t pid,
                goto out;
        }
  
@@ -77125,8 +76631,25 @@ index 6cbeaae..cfe7ff0 100644
                goto out_put_task_struct;
        }
  
+diff --git a/kernel/rcupdate.c b/kernel/rcupdate.c
+index 48ab703..07561d4 100644
+--- a/kernel/rcupdate.c
++++ b/kernel/rcupdate.c
+@@ -439,10 +439,10 @@ int rcu_jiffies_till_stall_check(void)
+        * for CONFIG_RCU_CPU_STALL_TIMEOUT.
+        */
+       if (till_stall_check < 3) {
+-              ACCESS_ONCE(rcu_cpu_stall_timeout) = 3;
++              ACCESS_ONCE_RW(rcu_cpu_stall_timeout) = 3;
+               till_stall_check = 3;
+       } else if (till_stall_check > 300) {
+-              ACCESS_ONCE(rcu_cpu_stall_timeout) = 300;
++              ACCESS_ONCE_RW(rcu_cpu_stall_timeout) = 300;
+               till_stall_check = 300;
+       }
+       return till_stall_check * HZ + RCU_STALL_DELAY_DELTA;
 diff --git a/kernel/rcutiny.c b/kernel/rcutiny.c
-index e7dce58..ad0d7b7 100644
+index a0714a5..2ab5e34 100644
 --- a/kernel/rcutiny.c
 +++ b/kernel/rcutiny.c
 @@ -46,7 +46,7 @@
@@ -77138,7 +76661,7 @@ index e7dce58..ad0d7b7 100644
  static void __call_rcu(struct rcu_head *head,
                       void (*func)(struct rcu_head *rcu),
                       struct rcu_ctrlblk *rcp);
-@@ -310,7 +310,7 @@ static void __rcu_process_callbacks(struct rcu_ctrlblk *rcp)
+@@ -312,7 +312,7 @@ static void __rcu_process_callbacks(struct rcu_ctrlblk *rcp)
                                      rcu_is_callbacks_kthread()));
  }
  
@@ -77148,10 +76671,10 @@ index e7dce58..ad0d7b7 100644
        __rcu_process_callbacks(&rcu_sched_ctrlblk);
        __rcu_process_callbacks(&rcu_bh_ctrlblk);
 diff --git a/kernel/rcutiny_plugin.h b/kernel/rcutiny_plugin.h
-index f85016a..91cb03b 100644
+index 8a23300..4255818 100644
 --- a/kernel/rcutiny_plugin.h
 +++ b/kernel/rcutiny_plugin.h
-@@ -896,7 +896,7 @@ static int rcu_kthread(void *arg)
+@@ -945,7 +945,7 @@ static int rcu_kthread(void *arg)
                have_rcu_kthread_work = morework;
                local_irq_restore(flags);
                if (work)
@@ -77161,10 +76684,10 @@ index f85016a..91cb03b 100644
        }
  
 diff --git a/kernel/rcutorture.c b/kernel/rcutorture.c
-index 31dea01..ad91ffb 100644
+index e1f3a8c..42c94a2 100644
 --- a/kernel/rcutorture.c
 +++ b/kernel/rcutorture.c
-@@ -163,12 +163,12 @@ static DEFINE_PER_CPU(long [RCU_TORTURE_PIPE_LEN + 1], rcu_torture_count) =
+@@ -164,12 +164,12 @@ static DEFINE_PER_CPU(long [RCU_TORTURE_PIPE_LEN + 1], rcu_torture_count) =
        { 0 };
  static DEFINE_PER_CPU(long [RCU_TORTURE_PIPE_LEN + 1], rcu_torture_batch) =
        { 0 };
@@ -77183,7 +76706,7 @@ index 31dea01..ad91ffb 100644
  static long n_rcu_torture_barrier_error;
  static long n_rcu_torture_boost_ktrerror;
  static long n_rcu_torture_boost_rterror;
-@@ -272,11 +272,11 @@ rcu_torture_alloc(void)
+@@ -287,11 +287,11 @@ rcu_torture_alloc(void)
  
        spin_lock_bh(&rcu_torture_lock);
        if (list_empty(&rcu_torture_freelist)) {
@@ -77197,7 +76720,7 @@ index 31dea01..ad91ffb 100644
        p = rcu_torture_freelist.next;
        list_del_init(p);
        spin_unlock_bh(&rcu_torture_lock);
-@@ -289,7 +289,7 @@ rcu_torture_alloc(void)
+@@ -304,7 +304,7 @@ rcu_torture_alloc(void)
  static void
  rcu_torture_free(struct rcu_torture *p)
  {
@@ -77206,7 +76729,7 @@ index 31dea01..ad91ffb 100644
        spin_lock_bh(&rcu_torture_lock);
        list_add_tail(&p->rtort_free, &rcu_torture_freelist);
        spin_unlock_bh(&rcu_torture_lock);
-@@ -409,7 +409,7 @@ rcu_torture_cb(struct rcu_head *p)
+@@ -424,7 +424,7 @@ rcu_torture_cb(struct rcu_head *p)
        i = rp->rtort_pipe_count;
        if (i > RCU_TORTURE_PIPE_LEN)
                i = RCU_TORTURE_PIPE_LEN;
@@ -77215,7 +76738,7 @@ index 31dea01..ad91ffb 100644
        if (++rp->rtort_pipe_count >= RCU_TORTURE_PIPE_LEN) {
                rp->rtort_mbtest = 0;
                rcu_torture_free(rp);
-@@ -457,7 +457,7 @@ static void rcu_sync_torture_deferred_free(struct rcu_torture *p)
+@@ -472,7 +472,7 @@ static void rcu_sync_torture_deferred_free(struct rcu_torture *p)
                i = rp->rtort_pipe_count;
                if (i > RCU_TORTURE_PIPE_LEN)
                        i = RCU_TORTURE_PIPE_LEN;
@@ -77224,7 +76747,7 @@ index 31dea01..ad91ffb 100644
                if (++rp->rtort_pipe_count >= RCU_TORTURE_PIPE_LEN) {
                        rp->rtort_mbtest = 0;
                        list_del(&rp->rtort_free);
-@@ -975,7 +975,7 @@ rcu_torture_writer(void *arg)
+@@ -990,7 +990,7 @@ rcu_torture_writer(void *arg)
                        i = old_rp->rtort_pipe_count;
                        if (i > RCU_TORTURE_PIPE_LEN)
                                i = RCU_TORTURE_PIPE_LEN;
@@ -77233,25 +76756,25 @@ index 31dea01..ad91ffb 100644
                        old_rp->rtort_pipe_count++;
                        cur_ops->deferred_free(old_rp);
                }
-@@ -1060,7 +1060,7 @@ static void rcu_torture_timer(unsigned long unused)
+@@ -1076,7 +1076,7 @@ static void rcu_torture_timer(unsigned long unused)
+               return;
        }
-       do_trace_rcu_torture_read(cur_ops->name, &p->rtort_rcu);
        if (p->rtort_mbtest == 0)
 -              atomic_inc(&n_rcu_torture_mberror);
 +              atomic_inc_unchecked(&n_rcu_torture_mberror);
        spin_lock(&rand_lock);
        cur_ops->read_delay(&rand);
        n_rcu_torture_timers++;
-@@ -1124,7 +1124,7 @@ rcu_torture_reader(void *arg)
+@@ -1146,7 +1146,7 @@ rcu_torture_reader(void *arg)
+                       continue;
                }
-               do_trace_rcu_torture_read(cur_ops->name, &p->rtort_rcu);
                if (p->rtort_mbtest == 0)
 -                      atomic_inc(&n_rcu_torture_mberror);
 +                      atomic_inc_unchecked(&n_rcu_torture_mberror);
                cur_ops->read_delay(&rand);
                preempt_disable();
                pipe_count = p->rtort_pipe_count;
-@@ -1183,11 +1183,11 @@ rcu_torture_printk(char *page)
+@@ -1209,11 +1209,11 @@ rcu_torture_printk(char *page)
                       rcu_torture_current,
                       rcu_torture_current_version,
                       list_empty(&rcu_torture_freelist),
@@ -77267,7 +76790,7 @@ index 31dea01..ad91ffb 100644
                       n_rcu_torture_boost_ktrerror,
                       n_rcu_torture_boost_rterror);
        cnt += sprintf(&page[cnt], "rtbf: %ld rtb: %ld nt: %ld ",
-@@ -1206,14 +1206,14 @@ rcu_torture_printk(char *page)
+@@ -1232,14 +1232,14 @@ rcu_torture_printk(char *page)
                       n_barrier_attempts,
                       n_rcu_torture_barrier_error);
        cnt += sprintf(&page[cnt], "\n%s%s ", torture_type, TORTURE_FLAG);
@@ -77284,7 +76807,7 @@ index 31dea01..ad91ffb 100644
                WARN_ON_ONCE(1);
        }
        cnt += sprintf(&page[cnt], "Reader Pipe: ");
-@@ -1227,7 +1227,7 @@ rcu_torture_printk(char *page)
+@@ -1253,7 +1253,7 @@ rcu_torture_printk(char *page)
        cnt += sprintf(&page[cnt], "Free-Block Circulation: ");
        for (i = 0; i < RCU_TORTURE_PIPE_LEN + 1; i++) {
                cnt += sprintf(&page[cnt], " %d",
@@ -77293,7 +76816,7 @@ index 31dea01..ad91ffb 100644
        }
        cnt += sprintf(&page[cnt], "\n");
        if (cur_ops->stats)
-@@ -1920,7 +1920,7 @@ rcu_torture_cleanup(void)
+@@ -1962,7 +1962,7 @@ rcu_torture_cleanup(void)
  
        rcu_torture_stats_print();  /* -After- the stats thread is stopped! */
  
@@ -77302,7 +76825,7 @@ index 31dea01..ad91ffb 100644
                rcu_torture_print_module_parms(cur_ops, "End of test: FAILURE");
        else if (n_online_successes != n_online_attempts ||
                 n_offline_successes != n_offline_attempts)
-@@ -1989,18 +1989,18 @@ rcu_torture_init(void)
+@@ -2031,18 +2031,18 @@ rcu_torture_init(void)
  
        rcu_torture_current = NULL;
        rcu_torture_current_version = 0;
@@ -77328,10 +76851,10 @@ index 31dea01..ad91ffb 100644
                for (i = 0; i < RCU_TORTURE_PIPE_LEN + 1; i++) {
                        per_cpu(rcu_torture_count, cpu)[i] = 0;
 diff --git a/kernel/rcutree.c b/kernel/rcutree.c
-index e441b77..dd54f17 100644
+index 5b8ad82..17274d1 100644
 --- a/kernel/rcutree.c
 +++ b/kernel/rcutree.c
-@@ -349,9 +349,9 @@ static void rcu_eqs_enter_common(struct rcu_dynticks *rdtp, long long oldval,
+@@ -353,9 +353,9 @@ static void rcu_eqs_enter_common(struct rcu_dynticks *rdtp, long long oldval,
        rcu_prepare_for_idle(smp_processor_id());
        /* CPUs seeing atomic_inc() must see prior RCU read-side crit sects */
        smp_mb__before_atomic_inc();  /* See above. */
@@ -77343,7 +76866,7 @@ index e441b77..dd54f17 100644
  
        /*
         * It is illegal to enter an extended quiescent state while
-@@ -487,10 +487,10 @@ static void rcu_eqs_exit_common(struct rcu_dynticks *rdtp, long long oldval,
+@@ -491,10 +491,10 @@ static void rcu_eqs_exit_common(struct rcu_dynticks *rdtp, long long oldval,
                               int user)
  {
        smp_mb__before_atomic_inc();  /* Force ordering w/previous sojourn. */
@@ -77356,7 +76879,7 @@ index e441b77..dd54f17 100644
        rcu_cleanup_after_idle(smp_processor_id());
        trace_rcu_dyntick("End", oldval, rdtp->dynticks_nesting);
        if (!user && !is_idle_task(current)) {
-@@ -629,14 +629,14 @@ void rcu_nmi_enter(void)
+@@ -633,14 +633,14 @@ void rcu_nmi_enter(void)
        struct rcu_dynticks *rdtp = &__get_cpu_var(rcu_dynticks);
  
        if (rdtp->dynticks_nmi_nesting == 0 &&
@@ -77374,7 +76897,7 @@ index e441b77..dd54f17 100644
  }
  
  /**
-@@ -655,9 +655,9 @@ void rcu_nmi_exit(void)
+@@ -659,9 +659,9 @@ void rcu_nmi_exit(void)
                return;
        /* CPUs seeing atomic_inc() must see prior RCU read-side crit sects */
        smp_mb__before_atomic_inc();  /* See above. */
@@ -77386,7 +76909,7 @@ index e441b77..dd54f17 100644
  }
  
  /**
-@@ -671,7 +671,7 @@ int rcu_is_cpu_idle(void)
+@@ -675,7 +675,7 @@ int rcu_is_cpu_idle(void)
        int ret;
  
        preempt_disable();
@@ -77395,7 +76918,7 @@ index e441b77..dd54f17 100644
        preempt_enable();
        return ret;
  }
-@@ -739,7 +739,7 @@ int rcu_is_cpu_rrupt_from_idle(void)
+@@ -743,7 +743,7 @@ static int rcu_is_cpu_rrupt_from_idle(void)
   */
  static int dyntick_save_progress_counter(struct rcu_data *rdp)
  {
@@ -77404,7 +76927,7 @@ index e441b77..dd54f17 100644
        return (rdp->dynticks_snap & 0x1) == 0;
  }
  
-@@ -754,7 +754,7 @@ static int rcu_implicit_dynticks_qs(struct rcu_data *rdp)
+@@ -758,7 +758,7 @@ static int rcu_implicit_dynticks_qs(struct rcu_data *rdp)
        unsigned int curr;
        unsigned int snap;
  
@@ -77413,20 +76936,7 @@ index e441b77..dd54f17 100644
        snap = (unsigned int)rdp->dynticks_snap;
  
        /*
-@@ -802,10 +802,10 @@ static int jiffies_till_stall_check(void)
-        * for CONFIG_RCU_CPU_STALL_TIMEOUT.
-        */
-       if (till_stall_check < 3) {
--              ACCESS_ONCE(rcu_cpu_stall_timeout) = 3;
-+              ACCESS_ONCE_RW(rcu_cpu_stall_timeout) = 3;
-               till_stall_check = 3;
-       } else if (till_stall_check > 300) {
--              ACCESS_ONCE(rcu_cpu_stall_timeout) = 300;
-+              ACCESS_ONCE_RW(rcu_cpu_stall_timeout) = 300;
-               till_stall_check = 300;
-       }
-       return till_stall_check * HZ + RCU_STALL_DELAY_DELTA;
-@@ -1592,7 +1592,7 @@ rcu_send_cbs_to_orphanage(int cpu, struct rcu_state *rsp,
+@@ -1698,7 +1698,7 @@ rcu_send_cbs_to_orphanage(int cpu, struct rcu_state *rsp,
                rsp->qlen += rdp->qlen;
                rdp->n_cbs_orphaned += rdp->qlen;
                rdp->qlen_lazy = 0;
@@ -77435,7 +76945,7 @@ index e441b77..dd54f17 100644
        }
  
        /*
-@@ -1838,7 +1838,7 @@ static void rcu_do_batch(struct rcu_state *rsp, struct rcu_data *rdp)
+@@ -1944,7 +1944,7 @@ static void rcu_do_batch(struct rcu_state *rsp, struct rcu_data *rdp)
        }
        smp_mb(); /* List handling before counting for rcu_barrier(). */
        rdp->qlen_lazy -= count_lazy;
@@ -77444,7 +76954,7 @@ index e441b77..dd54f17 100644
        rdp->n_cbs_invoked += count;
  
        /* Reinstate batch limit if we have worked down the excess. */
-@@ -2031,7 +2031,7 @@ __rcu_process_callbacks(struct rcu_state *rsp)
+@@ -2137,7 +2137,7 @@ __rcu_process_callbacks(struct rcu_state *rsp)
  /*
   * Do RCU core processing for the current CPU.
   */
@@ -77453,7 +76963,7 @@ index e441b77..dd54f17 100644
  {
        struct rcu_state *rsp;
  
-@@ -2154,7 +2154,7 @@ __call_rcu(struct rcu_head *head, void (*func)(struct rcu_head *rcu),
+@@ -2260,7 +2260,7 @@ __call_rcu(struct rcu_head *head, void (*func)(struct rcu_head *rcu),
                local_irq_restore(flags);
                return;
        }
@@ -77462,7 +76972,7 @@ index e441b77..dd54f17 100644
        if (lazy)
                rdp->qlen_lazy++;
        else
-@@ -2363,11 +2363,11 @@ void synchronize_sched_expedited(void)
+@@ -2469,11 +2469,11 @@ void synchronize_sched_expedited(void)
         * counter wrap on a 32-bit system.  Quite a few more CPUs would of
         * course be required on a 64-bit system.
         */
@@ -77476,7 +76986,7 @@ index e441b77..dd54f17 100644
                return;
        }
  
-@@ -2375,7 +2375,7 @@ void synchronize_sched_expedited(void)
+@@ -2481,7 +2481,7 @@ void synchronize_sched_expedited(void)
         * Take a ticket.  Note that atomic_inc_return() implies a
         * full memory barrier.
         */
@@ -77485,7 +76995,7 @@ index e441b77..dd54f17 100644
        firstsnap = snap;
        get_online_cpus();
        WARN_ON_ONCE(cpu_is_offline(raw_smp_processor_id()));
-@@ -2388,14 +2388,14 @@ void synchronize_sched_expedited(void)
+@@ -2494,14 +2494,14 @@ void synchronize_sched_expedited(void)
                             synchronize_sched_expedited_cpu_stop,
                             NULL) == -EAGAIN) {
                put_online_cpus();
@@ -77502,7 +77012,7 @@ index e441b77..dd54f17 100644
                        return;
                }
  
-@@ -2404,7 +2404,7 @@ void synchronize_sched_expedited(void)
+@@ -2510,7 +2510,7 @@ void synchronize_sched_expedited(void)
                        udelay(trycount * num_online_cpus());
                } else {
                        wait_rcu_gp(call_rcu_sched);
@@ -77511,7 +77021,7 @@ index e441b77..dd54f17 100644
                        return;
                }
  
-@@ -2413,7 +2413,7 @@ void synchronize_sched_expedited(void)
+@@ -2519,7 +2519,7 @@ void synchronize_sched_expedited(void)
                if (ULONG_CMP_GE((ulong)s, (ulong)firstsnap)) {
                        /* ensure test happens before caller kfree */
                        smp_mb__before_atomic_inc(); /* ^^^ */
@@ -77520,7 +77030,7 @@ index e441b77..dd54f17 100644
                        return;
                }
  
-@@ -2425,10 +2425,10 @@ void synchronize_sched_expedited(void)
+@@ -2531,10 +2531,10 @@ void synchronize_sched_expedited(void)
                 * period works for us.
                 */
                get_online_cpus();
@@ -77533,7 +77043,7 @@ index e441b77..dd54f17 100644
  
        /*
         * Everyone up to our most recent fetch is covered by our grace
-@@ -2437,16 +2437,16 @@ void synchronize_sched_expedited(void)
+@@ -2543,16 +2543,16 @@ void synchronize_sched_expedited(void)
         * than we did already did their update.
         */
        do {
@@ -77553,7 +77063,7 @@ index e441b77..dd54f17 100644
  
        put_online_cpus();
  }
-@@ -2620,7 +2620,7 @@ static void _rcu_barrier(struct rcu_state *rsp)
+@@ -2726,7 +2726,7 @@ static void _rcu_barrier(struct rcu_state *rsp)
         * ACCESS_ONCE() to prevent the compiler from speculating
         * the increment to precede the early-exit check.
         */
@@ -77562,7 +77072,7 @@ index e441b77..dd54f17 100644
        WARN_ON_ONCE((rsp->n_barrier_done & 0x1) != 1);
        _rcu_barrier_trace(rsp, "Inc1", -1, rsp->n_barrier_done);
        smp_mb(); /* Order ->n_barrier_done increment with below mechanism. */
-@@ -2670,7 +2670,7 @@ static void _rcu_barrier(struct rcu_state *rsp)
+@@ -2776,7 +2776,7 @@ static void _rcu_barrier(struct rcu_state *rsp)
  
        /* Increment ->n_barrier_done to prevent duplicate work. */
        smp_mb(); /* Keep increment after above mechanism. */
@@ -77571,7 +77081,7 @@ index e441b77..dd54f17 100644
        WARN_ON_ONCE((rsp->n_barrier_done & 0x1) != 0);
        _rcu_barrier_trace(rsp, "Inc2", -1, rsp->n_barrier_done);
        smp_mb(); /* Keep increment before caller's subsequent code. */
-@@ -2715,10 +2715,10 @@ rcu_boot_init_percpu_data(int cpu, struct rcu_state *rsp)
+@@ -2821,10 +2821,10 @@ rcu_boot_init_percpu_data(int cpu, struct rcu_state *rsp)
        rdp->grpmask = 1UL << (cpu - rdp->mynode->grplo);
        init_callback_list(rdp);
        rdp->qlen_lazy = 0;
@@ -77581,10 +77091,10 @@ index e441b77..dd54f17 100644
        WARN_ON_ONCE(rdp->dynticks->dynticks_nesting != DYNTICK_TASK_EXIT_IDLE);
 -      WARN_ON_ONCE(atomic_read(&rdp->dynticks->dynticks) != 1);
 +      WARN_ON_ONCE(atomic_read_unchecked(&rdp->dynticks->dynticks) != 1);
- #ifdef CONFIG_RCU_USER_QS
-       WARN_ON_ONCE(rdp->dynticks->in_user);
- #endif
-@@ -2754,8 +2754,8 @@ rcu_init_percpu_data(int cpu, struct rcu_state *rsp, int preemptible)
+       rdp->cpu = cpu;
+       rdp->rsp = rsp;
+       rcu_boot_init_nocb_percpu_data(rdp);
+@@ -2857,8 +2857,8 @@ rcu_init_percpu_data(int cpu, struct rcu_state *rsp, int preemptible)
        rdp->blimit = blimit;
        init_callback_list(rdp);  /* Re-enable callbacks on this CPU. */
        rdp->dynticks->dynticks_nesting = DYNTICK_TASK_EXIT_IDLE;
@@ -77596,7 +77106,7 @@ index e441b77..dd54f17 100644
        raw_spin_unlock(&rnp->lock);            /* irqs remain disabled. */
  
 diff --git a/kernel/rcutree.h b/kernel/rcutree.h
-index 4b69291..704c92e 100644
+index c896b50..c357252 100644
 --- a/kernel/rcutree.h
 +++ b/kernel/rcutree.h
 @@ -86,7 +86,7 @@ struct rcu_dynticks {
@@ -77608,7 +77118,7 @@ index 4b69291..704c92e 100644
  #ifdef CONFIG_RCU_FAST_NO_HZ
        int dyntick_drain;          /* Prepare-for-idle state variable. */
        unsigned long dyntick_holdoff;
-@@ -423,17 +423,17 @@ struct rcu_state {
+@@ -416,17 +416,17 @@ struct rcu_state {
                                                /*  _rcu_barrier(). */
        /* End of fields guarded by barrier_mutex. */
  
@@ -77714,7 +77224,7 @@ index c1cc7e1..f62e436 100644
  }
  
 diff --git a/kernel/rcutree_trace.c b/kernel/rcutree_trace.c
-index 0d095dc..1985b19 100644
+index 93f8e8f..cf812ae 100644
 --- a/kernel/rcutree_trace.c
 +++ b/kernel/rcutree_trace.c
 @@ -123,7 +123,7 @@ static void print_one_rcu_data(struct seq_file *m, struct rcu_data *rdp)
@@ -77778,10 +77288,10 @@ index 73f35d4..4684fc4 100644
  }
  __initcall(ioresources_init);
 diff --git a/kernel/rtmutex-tester.c b/kernel/rtmutex-tester.c
-index 98ec494..4241d6d 100644
+index 7890b10..8b68605f 100644
 --- a/kernel/rtmutex-tester.c
 +++ b/kernel/rtmutex-tester.c
-@@ -20,7 +20,7 @@
+@@ -21,7 +21,7 @@
  #define MAX_RT_TEST_MUTEXES   8
  
  static spinlock_t rttest_lock;
@@ -77790,7 +77300,7 @@ index 98ec494..4241d6d 100644
  
  struct test_thread_data {
        int                     opcode;
-@@ -61,7 +61,7 @@ static int handle_op(struct test_thread_data *td, int lockwakeup)
+@@ -62,7 +62,7 @@ static int handle_op(struct test_thread_data *td, int lockwakeup)
  
        case RTTEST_LOCKCONT:
                td->mutexes[td->opdata] = 1;
@@ -77799,7 +77309,7 @@ index 98ec494..4241d6d 100644
                return 0;
  
        case RTTEST_RESET:
-@@ -74,7 +74,7 @@ static int handle_op(struct test_thread_data *td, int lockwakeup)
+@@ -75,7 +75,7 @@ static int handle_op(struct test_thread_data *td, int lockwakeup)
                return 0;
  
        case RTTEST_RESETEVENT:
@@ -77808,7 +77318,7 @@ index 98ec494..4241d6d 100644
                return 0;
  
        default:
-@@ -91,9 +91,9 @@ static int handle_op(struct test_thread_data *td, int lockwakeup)
+@@ -92,9 +92,9 @@ static int handle_op(struct test_thread_data *td, int lockwakeup)
                        return ret;
  
                td->mutexes[id] = 1;
@@ -77820,7 +77330,7 @@ index 98ec494..4241d6d 100644
                td->mutexes[id] = 4;
                return 0;
  
-@@ -104,9 +104,9 @@ static int handle_op(struct test_thread_data *td, int lockwakeup)
+@@ -105,9 +105,9 @@ static int handle_op(struct test_thread_data *td, int lockwakeup)
                        return ret;
  
                td->mutexes[id] = 1;
@@ -77832,7 +77342,7 @@ index 98ec494..4241d6d 100644
                td->mutexes[id] = ret ? 0 : 4;
                return ret ? -EINTR : 0;
  
-@@ -115,9 +115,9 @@ static int handle_op(struct test_thread_data *td, int lockwakeup)
+@@ -116,9 +116,9 @@ static int handle_op(struct test_thread_data *td, int lockwakeup)
                if (id < 0 || id >= MAX_RT_TEST_MUTEXES || td->mutexes[id] != 4)
                        return ret;
  
@@ -77844,7 +77354,7 @@ index 98ec494..4241d6d 100644
                td->mutexes[id] = 0;
                return 0;
  
-@@ -164,7 +164,7 @@ void schedule_rt_mutex_test(struct rt_mutex *mutex)
+@@ -165,7 +165,7 @@ void schedule_rt_mutex_test(struct rt_mutex *mutex)
                        break;
  
                td->mutexes[dat] = 2;
@@ -77853,7 +77363,7 @@ index 98ec494..4241d6d 100644
                break;
  
        default:
-@@ -184,7 +184,7 @@ void schedule_rt_mutex_test(struct rt_mutex *mutex)
+@@ -185,7 +185,7 @@ void schedule_rt_mutex_test(struct rt_mutex *mutex)
                        return;
  
                td->mutexes[dat] = 3;
@@ -77862,7 +77372,7 @@ index 98ec494..4241d6d 100644
                break;
  
        case RTTEST_LOCKNOWAIT:
-@@ -196,7 +196,7 @@ void schedule_rt_mutex_test(struct rt_mutex *mutex)
+@@ -197,7 +197,7 @@ void schedule_rt_mutex_test(struct rt_mutex *mutex)
                        return;
  
                td->mutexes[dat] = 1;
@@ -77872,7 +77382,7 @@ index 98ec494..4241d6d 100644
  
        default:
 diff --git a/kernel/sched/auto_group.c b/kernel/sched/auto_group.c
-index 0984a21..939f183 100644
+index 64de5f8..7735e12 100644
 --- a/kernel/sched/auto_group.c
 +++ b/kernel/sched/auto_group.c
 @@ -11,7 +11,7 @@
@@ -77884,7 +77394,7 @@ index 0984a21..939f183 100644
  
  void __init autogroup_init(struct task_struct *init_task)
  {
-@@ -78,7 +78,7 @@ static inline struct autogroup *autogroup_create(void)
+@@ -81,7 +81,7 @@ static inline struct autogroup *autogroup_create(void)
  
        kref_init(&ag->kref);
        init_rwsem(&ag->lock);
@@ -77894,10 +77404,10 @@ index 0984a21..939f183 100644
  #ifdef CONFIG_RT_GROUP_SCHED
        /*
 diff --git a/kernel/sched/core.c b/kernel/sched/core.c
-index 26058d0..e315889 100644
+index 67d0465..4cf9361 100644
 --- a/kernel/sched/core.c
 +++ b/kernel/sched/core.c
-@@ -3367,7 +3367,7 @@ EXPORT_SYMBOL(wait_for_completion_interruptible);
+@@ -3406,7 +3406,7 @@ EXPORT_SYMBOL(wait_for_completion_interruptible);
   * The return value is -ERESTARTSYS if interrupted, 0 if timed out,
   * positive (at least 1, or number of jiffies left till timeout) if completed.
   */
@@ -77906,7 +77416,7 @@ index 26058d0..e315889 100644
  wait_for_completion_interruptible_timeout(struct completion *x,
                                          unsigned long timeout)
  {
-@@ -3384,7 +3384,7 @@ EXPORT_SYMBOL(wait_for_completion_interruptible_timeout);
+@@ -3423,7 +3423,7 @@ EXPORT_SYMBOL(wait_for_completion_interruptible_timeout);
   *
   * The return value is -ERESTARTSYS if interrupted, 0 if completed.
   */
@@ -77915,7 +77425,7 @@ index 26058d0..e315889 100644
  {
        long t = wait_for_common(x, MAX_SCHEDULE_TIMEOUT, TASK_KILLABLE);
        if (t == -ERESTARTSYS)
-@@ -3405,7 +3405,7 @@ EXPORT_SYMBOL(wait_for_completion_killable);
+@@ -3444,7 +3444,7 @@ EXPORT_SYMBOL(wait_for_completion_killable);
   * The return value is -ERESTARTSYS if interrupted, 0 if timed out,
   * positive (at least 1, or number of jiffies left till timeout) if completed.
   */
@@ -77924,7 +77434,7 @@ index 26058d0..e315889 100644
  wait_for_completion_killable_timeout(struct completion *x,
                                     unsigned long timeout)
  {
-@@ -3631,6 +3631,8 @@ int can_nice(const struct task_struct *p, const int nice)
+@@ -3670,6 +3670,8 @@ int can_nice(const struct task_struct *p, const int nice)
        /* convert nice value [19,-20] to rlimit style value [1,40] */
        int nice_rlim = 20 - nice;
  
@@ -77933,7 +77443,7 @@ index 26058d0..e315889 100644
        return (nice_rlim <= task_rlimit(p, RLIMIT_NICE) ||
                capable(CAP_SYS_NICE));
  }
-@@ -3664,7 +3666,8 @@ SYSCALL_DEFINE1(nice, int, increment)
+@@ -3703,7 +3705,8 @@ SYSCALL_DEFINE1(nice, int, increment)
        if (nice > 19)
                nice = 19;
  
@@ -77943,7 +77453,7 @@ index 26058d0..e315889 100644
                return -EPERM;
  
        retval = security_task_setnice(current, nice);
-@@ -3818,6 +3821,7 @@ recheck:
+@@ -3857,6 +3860,7 @@ recheck:
                        unsigned long rlim_rtprio =
                                        task_rlimit(p, RLIMIT_RTPRIO);
  
@@ -77951,7 +77461,7 @@ index 26058d0..e315889 100644
                        /* can't set/change the rt policy */
                        if (policy != p->policy && !rlim_rtprio)
                                return -EPERM;
-@@ -4901,7 +4905,7 @@ static void migrate_tasks(unsigned int dead_cpu)
+@@ -4954,7 +4958,7 @@ static void migrate_tasks(unsigned int dead_cpu)
  
  #if defined(CONFIG_SCHED_DEBUG) && defined(CONFIG_SYSCTL)
  
@@ -77960,7 +77470,7 @@ index 26058d0..e315889 100644
        {
                .procname       = "sched_domain",
                .mode           = 0555,
-@@ -4918,17 +4922,17 @@ static struct ctl_table sd_ctl_root[] = {
+@@ -4971,17 +4975,17 @@ static struct ctl_table sd_ctl_root[] = {
        {}
  };
  
@@ -77982,7 +77492,7 @@ index 26058d0..e315889 100644
  
        /*
         * In the intermediate directories, both the child directory and
-@@ -4936,22 +4940,25 @@ static void sd_free_ctl_entry(struct ctl_table **tablep)
+@@ -4989,22 +4993,25 @@ static void sd_free_ctl_entry(struct ctl_table **tablep)
         * will always be set. In the lowest directory the names are
         * static strings and all have proc handlers.
         */
@@ -78006,7 +77516,7 @@ index 26058d0..e315889 100644
  }
  
  static int min_load_idx = 0;
- static int max_load_idx = CPU_LOAD_IDX_MAX;
+ static int max_load_idx = CPU_LOAD_IDX_MAX-1;
  
  static void
 -set_table_entry(struct ctl_table *entry,
@@ -78014,7 +77524,7 @@ index 26058d0..e315889 100644
                const char *procname, void *data, int maxlen,
                umode_t mode, proc_handler *proc_handler,
                bool load_idx)
-@@ -4971,7 +4978,7 @@ set_table_entry(struct ctl_table *entry,
+@@ -5024,7 +5031,7 @@ set_table_entry(struct ctl_table *entry,
  static struct ctl_table *
  sd_alloc_ctl_domain_table(struct sched_domain *sd)
  {
@@ -78023,7 +77533,7 @@ index 26058d0..e315889 100644
  
        if (table == NULL)
                return NULL;
-@@ -5006,9 +5013,9 @@ sd_alloc_ctl_domain_table(struct sched_domain *sd)
+@@ -5059,9 +5066,9 @@ sd_alloc_ctl_domain_table(struct sched_domain *sd)
        return table;
  }
  
@@ -78035,7 +77545,7 @@ index 26058d0..e315889 100644
        struct sched_domain *sd;
        int domain_num = 0, i;
        char buf[32];
-@@ -5035,11 +5042,13 @@ static struct ctl_table_header *sd_sysctl_header;
+@@ -5088,11 +5095,13 @@ static struct ctl_table_header *sd_sysctl_header;
  static void register_sched_domain_sysctl(void)
  {
        int i, cpu_num = num_possible_cpus();
@@ -78050,7 +77560,7 @@ index 26058d0..e315889 100644
  
        if (entry == NULL)
                return;
-@@ -5062,8 +5071,12 @@ static void unregister_sched_domain_sysctl(void)
+@@ -5115,8 +5124,12 @@ static void unregister_sched_domain_sysctl(void)
        if (sd_sysctl_header)
                unregister_sysctl_table(sd_sysctl_header);
        sd_sysctl_header = NULL;
@@ -78065,7 +77575,7 @@ index 26058d0..e315889 100644
  }
  #else
  static void register_sched_domain_sysctl(void)
-@@ -5162,7 +5175,7 @@ migration_call(struct notifier_block *nfb, unsigned long action, void *hcpu)
+@@ -5215,7 +5228,7 @@ migration_call(struct notifier_block *nfb, unsigned long action, void *hcpu)
   * happens before everything else.  This has to be lower priority than
   * the notifier in the perf_event subsystem, though.
   */
@@ -78075,7 +77585,7 @@ index 26058d0..e315889 100644
        .priority = CPU_PRI_MIGRATION,
  };
 diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
-index 81fa536..6ccf96a 100644
+index 7a33e59..2f7730c 100644
 --- a/kernel/sched/fair.c
 +++ b/kernel/sched/fair.c
 @@ -830,7 +830,7 @@ void task_numa_fault(int node, int pages, bool migrated)
@@ -78087,48 +77597,7 @@ index 81fa536..6ccf96a 100644
        p->mm->numa_scan_offset = 0;
  }
  
-@@ -3254,25 +3254,18 @@ find_idlest_cpu(struct sched_group *group, struct task_struct *p, int this_cpu)
-  */
- static int select_idle_sibling(struct task_struct *p, int target)
- {
--      int cpu = smp_processor_id();
--      int prev_cpu = task_cpu(p);
-       struct sched_domain *sd;
-       struct sched_group *sg;
--      int i;
-+      int i = task_cpu(p);
--      /*
--       * If the task is going to be woken-up on this cpu and if it is
--       * already idle, then it is the right target.
--       */
--      if (target == cpu && idle_cpu(cpu))
--              return cpu;
-+      if (idle_cpu(target))
-+              return target;
-       /*
--       * If the task is going to be woken-up on the cpu where it previously
--       * ran and if it is currently idle, then it the right target.
-+       * If the prevous cpu is cache affine and idle, don't be stupid.
-        */
--      if (target == prev_cpu && idle_cpu(prev_cpu))
--              return prev_cpu;
-+      if (i != target && cpus_share_cache(i, target) && idle_cpu(i))
-+              return i;
-       /*
-        * Otherwise, iterate the domains and find an elegible idle cpu.
-@@ -3286,7 +3279,7 @@ static int select_idle_sibling(struct task_struct *p, int target)
-                               goto next;
-                       for_each_cpu(i, sched_group_cpus(sg)) {
--                              if (!idle_cpu(i))
-+                              if (i == target || !idle_cpu(i))
-                                       goto next;
-                       }
-@@ -5663,7 +5656,7 @@ static void nohz_idle_balance(int this_cpu, enum cpu_idle_type idle) { }
+@@ -5654,7 +5654,7 @@ static void nohz_idle_balance(int this_cpu, enum cpu_idle_type idle) { }
   * run_rebalance_domains is triggered when needed from the scheduler tick.
   * Also triggered for nohz idle balancing (with nohz_balancing_kick set).
   */
@@ -78138,7 +77607,7 @@ index 81fa536..6ccf96a 100644
        int this_cpu = smp_processor_id();
        struct rq *this_rq = cpu_rq(this_cpu);
 diff --git a/kernel/signal.c b/kernel/signal.c
-index dec9c30..d1da15b 100644
+index 598dc06..471310a 100644
 --- a/kernel/signal.c
 +++ b/kernel/signal.c
 @@ -50,12 +50,12 @@ static struct kmem_cache *sigqueue_cachep;
@@ -78247,7 +77716,7 @@ index dec9c30..d1da15b 100644
  
        return ret;
  }
-@@ -2855,7 +2878,15 @@ do_send_specific(pid_t tgid, pid_t pid, int sig, struct siginfo *info)
+@@ -2923,7 +2946,15 @@ do_send_specific(pid_t tgid, pid_t pid, int sig, struct siginfo *info)
        int error = -ESRCH;
  
        rcu_read_lock();
@@ -78264,7 +77733,7 @@ index dec9c30..d1da15b 100644
        if (p && (tgid <= 0 || task_tgid_vnr(p) == tgid)) {
                error = check_kill_permission(sig, info, p);
                /*
-@@ -3138,8 +3169,8 @@ COMPAT_SYSCALL_DEFINE2(sigaltstack,
+@@ -3237,8 +3268,8 @@ COMPAT_SYSCALL_DEFINE2(sigaltstack,
        }
        seg = get_fs();
        set_fs(KERNEL_DS);
@@ -78276,10 +77745,10 @@ index dec9c30..d1da15b 100644
        set_fs(seg);
        if (ret >= 0 && uoss_ptr)  {
 diff --git a/kernel/smp.c b/kernel/smp.c
-index 69f38bd..77bbf12 100644
+index 8e451f3..8322029 100644
 --- a/kernel/smp.c
 +++ b/kernel/smp.c
-@@ -77,7 +77,7 @@ hotplug_cfd(struct notifier_block *nfb, unsigned long action, void *hcpu)
+@@ -73,7 +73,7 @@ hotplug_cfd(struct notifier_block *nfb, unsigned long action, void *hcpu)
        return NOTIFY_OK;
  }
  
@@ -78289,10 +77758,10 @@ index 69f38bd..77bbf12 100644
  };
  
 diff --git a/kernel/smpboot.c b/kernel/smpboot.c
-index d6c5fc0..530560c 100644
+index 02fc5c9..e54c335 100644
 --- a/kernel/smpboot.c
 +++ b/kernel/smpboot.c
-@@ -275,7 +275,7 @@ int smpboot_register_percpu_thread(struct smp_hotplug_thread *plug_thread)
+@@ -288,7 +288,7 @@ int smpboot_register_percpu_thread(struct smp_hotplug_thread *plug_thread)
                }
                smpboot_unpark_thread(plug_thread, cpu);
        }
@@ -78301,7 +77770,7 @@ index d6c5fc0..530560c 100644
  out:
        mutex_unlock(&smpboot_threads_lock);
        return ret;
-@@ -292,7 +292,7 @@ void smpboot_unregister_percpu_thread(struct smp_hotplug_thread *plug_thread)
+@@ -305,7 +305,7 @@ void smpboot_unregister_percpu_thread(struct smp_hotplug_thread *plug_thread)
  {
        get_online_cpus();
        mutex_lock(&smpboot_threads_lock);
@@ -78311,7 +77780,7 @@ index d6c5fc0..530560c 100644
        mutex_unlock(&smpboot_threads_lock);
        put_online_cpus();
 diff --git a/kernel/softirq.c b/kernel/softirq.c
-index ed567ba..e71dabf 100644
+index 14d7758..012121f 100644
 --- a/kernel/softirq.c
 +++ b/kernel/softirq.c
 @@ -53,11 +53,11 @@ irq_cpustat_t irq_stat[NR_CPUS] ____cacheline_aligned;
@@ -78337,7 +77806,7 @@ index ed567ba..e71dabf 100644
                        trace_softirq_exit(vec_nr);
                        if (unlikely(prev_count != preempt_count())) {
                                printk(KERN_ERR "huh, entered softirq %u %s %p"
-@@ -391,7 +391,7 @@ void __raise_softirq_irqoff(unsigned int nr)
+@@ -389,7 +389,7 @@ void __raise_softirq_irqoff(unsigned int nr)
        or_softirq_pending(1UL << nr);
  }
  
@@ -78346,7 +77815,7 @@ index ed567ba..e71dabf 100644
  {
        softirq_vec[nr].action = action;
  }
-@@ -447,7 +447,7 @@ void __tasklet_hi_schedule_first(struct tasklet_struct *t)
+@@ -445,7 +445,7 @@ void __tasklet_hi_schedule_first(struct tasklet_struct *t)
  
  EXPORT_SYMBOL(__tasklet_hi_schedule_first);
  
@@ -78355,7 +77824,7 @@ index ed567ba..e71dabf 100644
  {
        struct tasklet_struct *list;
  
-@@ -482,7 +482,7 @@ static void tasklet_action(struct softirq_action *a)
+@@ -480,7 +480,7 @@ static void tasklet_action(struct softirq_action *a)
        }
  }
  
@@ -78364,7 +77833,7 @@ index ed567ba..e71dabf 100644
  {
        struct tasklet_struct *list;
  
-@@ -718,7 +718,7 @@ static int __cpuinit remote_softirq_cpu_notify(struct notifier_block *self,
+@@ -716,7 +716,7 @@ static int __cpuinit remote_softirq_cpu_notify(struct notifier_block *self,
        return NOTIFY_OK;
  }
  
@@ -78373,7 +77842,7 @@ index ed567ba..e71dabf 100644
        .notifier_call  = remote_softirq_cpu_notify,
  };
  
-@@ -835,11 +835,11 @@ static int __cpuinit cpu_callback(struct notifier_block *nfb,
+@@ -833,11 +833,11 @@ static int __cpuinit cpu_callback(struct notifier_block *nfb,
        return NOTIFY_OK;
  }
  
@@ -78388,13 +77857,13 @@ index ed567ba..e71dabf 100644
        .thread_should_run      = ksoftirqd_should_run,
        .thread_fn              = run_ksoftirqd,
 diff --git a/kernel/srcu.c b/kernel/srcu.c
-index 2b85982..d52ab26 100644
+index 01d5ccb..cdcbee6 100644
 --- a/kernel/srcu.c
 +++ b/kernel/srcu.c
-@@ -305,9 +305,9 @@ int __srcu_read_lock(struct srcu_struct *sp)
+@@ -300,9 +300,9 @@ int __srcu_read_lock(struct srcu_struct *sp)
+       idx = ACCESS_ONCE(sp->completed) & 0x1;
        preempt_disable();
-       idx = rcu_dereference_index_check(sp->completed,
-                                         rcu_read_lock_sched_held()) & 0x1;
 -      ACCESS_ONCE(this_cpu_ptr(sp->per_cpu_ref)->c[idx]) += 1;
 +      ACCESS_ONCE_RW(this_cpu_ptr(sp->per_cpu_ref)->c[idx]) += 1;
        smp_mb(); /* B */  /* Avoid leaking the critical section. */
@@ -78403,33 +77872,11 @@ index 2b85982..d52ab26 100644
        preempt_enable();
        return idx;
  }
-@@ -323,7 +323,7 @@ void __srcu_read_unlock(struct srcu_struct *sp, int idx)
- {
-       preempt_disable();
-       smp_mb(); /* C */  /* Avoid leaking the critical section. */
--      ACCESS_ONCE(this_cpu_ptr(sp->per_cpu_ref)->c[idx]) -= 1;
-+      ACCESS_ONCE_RW(this_cpu_ptr(sp->per_cpu_ref)->c[idx]) -= 1;
-       preempt_enable();
- }
- EXPORT_SYMBOL_GPL(__srcu_read_unlock);
-diff --git a/kernel/stop_machine.c b/kernel/stop_machine.c
-index 2f194e9..2c05ea9 100644
---- a/kernel/stop_machine.c
-+++ b/kernel/stop_machine.c
-@@ -362,7 +362,7 @@ static int __cpuinit cpu_stop_cpu_callback(struct notifier_block *nfb,
-  * cpu notifiers.  It currently shares the same priority as sched
-  * migration_notifier.
-  */
--static struct notifier_block __cpuinitdata cpu_stop_cpu_notifier = {
-+static struct notifier_block cpu_stop_cpu_notifier = {
-       .notifier_call  = cpu_stop_cpu_callback,
-       .priority       = 10,
- };
 diff --git a/kernel/sys.c b/kernel/sys.c
-index 265b376..4e42ef5 100644
+index 0da73cf..a22106a 100644
 --- a/kernel/sys.c
 +++ b/kernel/sys.c
-@@ -157,6 +157,12 @@ static int set_one_prio(struct task_struct *p, int niceval, int error)
+@@ -158,6 +158,12 @@ static int set_one_prio(struct task_struct *p, int niceval, int error)
                error = -EACCES;
                goto out;
        }
@@ -78442,7 +77889,7 @@ index 265b376..4e42ef5 100644
        no_nice = security_task_setnice(p, niceval);
        if (no_nice) {
                error = no_nice;
-@@ -595,6 +601,9 @@ SYSCALL_DEFINE2(setregid, gid_t, rgid, gid_t, egid)
+@@ -598,6 +604,9 @@ SYSCALL_DEFINE2(setregid, gid_t, rgid, gid_t, egid)
                        goto error;
        }
  
@@ -78452,7 +77899,7 @@ index 265b376..4e42ef5 100644
        if (rgid != (gid_t) -1 ||
            (egid != (gid_t) -1 && !gid_eq(kegid, old->gid)))
                new->sgid = new->egid;
-@@ -630,6 +639,10 @@ SYSCALL_DEFINE1(setgid, gid_t, gid)
+@@ -633,6 +642,10 @@ SYSCALL_DEFINE1(setgid, gid_t, gid)
        old = current_cred();
  
        retval = -EPERM;
@@ -78463,7 +77910,7 @@ index 265b376..4e42ef5 100644
        if (nsown_capable(CAP_SETGID))
                new->gid = new->egid = new->sgid = new->fsgid = kgid;
        else if (gid_eq(kgid, old->gid) || gid_eq(kgid, old->sgid))
-@@ -647,7 +660,7 @@ error:
+@@ -650,7 +663,7 @@ error:
  /*
   * change the user struct in a credentials set to match the new UID
   */
@@ -78472,7 +77919,7 @@ index 265b376..4e42ef5 100644
  {
        struct user_struct *new_user;
  
-@@ -727,6 +740,9 @@ SYSCALL_DEFINE2(setreuid, uid_t, ruid, uid_t, euid)
+@@ -730,6 +743,9 @@ SYSCALL_DEFINE2(setreuid, uid_t, ruid, uid_t, euid)
                        goto error;
        }
  
@@ -78482,7 +77929,7 @@ index 265b376..4e42ef5 100644
        if (!uid_eq(new->uid, old->uid)) {
                retval = set_user(new);
                if (retval < 0)
-@@ -777,6 +793,12 @@ SYSCALL_DEFINE1(setuid, uid_t, uid)
+@@ -780,6 +796,12 @@ SYSCALL_DEFINE1(setuid, uid_t, uid)
        old = current_cred();
  
        retval = -EPERM;
@@ -78495,7 +77942,7 @@ index 265b376..4e42ef5 100644
        if (nsown_capable(CAP_SETUID)) {
                new->suid = new->uid = kuid;
                if (!uid_eq(kuid, old->uid)) {
-@@ -846,6 +868,9 @@ SYSCALL_DEFINE3(setresuid, uid_t, ruid, uid_t, euid, uid_t, suid)
+@@ -849,6 +871,9 @@ SYSCALL_DEFINE3(setresuid, uid_t, ruid, uid_t, euid, uid_t, suid)
                        goto error;
        }
  
@@ -78505,7 +77952,7 @@ index 265b376..4e42ef5 100644
        if (ruid != (uid_t) -1) {
                new->uid = kruid;
                if (!uid_eq(kruid, old->uid)) {
-@@ -928,6 +953,9 @@ SYSCALL_DEFINE3(setresgid, gid_t, rgid, gid_t, egid, gid_t, sgid)
+@@ -931,6 +956,9 @@ SYSCALL_DEFINE3(setresgid, gid_t, rgid, gid_t, egid, gid_t, sgid)
                        goto error;
        }
  
@@ -78515,17 +77962,16 @@ index 265b376..4e42ef5 100644
        if (rgid != (gid_t) -1)
                new->gid = krgid;
        if (egid != (gid_t) -1)
-@@ -981,6 +1009,9 @@ SYSCALL_DEFINE1(setfsuid, uid_t, uid)
-       if (!uid_valid(kuid))
-               return old_fsuid;
-+      if (gr_check_user_change(INVALID_UID, INVALID_UID, kuid))
-+              goto error;
+@@ -992,12 +1020,16 @@ SYSCALL_DEFINE1(setfsuid, uid_t, uid)
+           uid_eq(kuid, old->suid) || uid_eq(kuid, old->fsuid) ||
+           nsown_capable(CAP_SETUID)) {
+               if (!uid_eq(kuid, old->fsuid)) {
++                      if (gr_check_user_change(INVALID_UID, INVALID_UID, kuid))
++                              goto error;
 +
-       new = prepare_creds();
-       if (!new)
-               return old_fsuid;
-@@ -995,6 +1026,7 @@ SYSCALL_DEFINE1(setfsuid, uid_t, uid)
+                       new->fsuid = kuid;
+                       if (security_task_fix_setuid(new, old, LSM_SETID_FS) == 0)
+                               goto change_okay;
                }
        }
  
@@ -78533,7 +77979,7 @@ index 265b376..4e42ef5 100644
        abort_creds(new);
        return old_fsuid;
  
-@@ -1027,12 +1059,16 @@ SYSCALL_DEFINE1(setfsgid, gid_t, gid)
+@@ -1030,12 +1062,16 @@ SYSCALL_DEFINE1(setfsgid, gid_t, gid)
        if (gid_eq(kgid, old->gid)  || gid_eq(kgid, old->egid)  ||
            gid_eq(kgid, old->sgid) || gid_eq(kgid, old->fsgid) ||
            nsown_capable(CAP_SETGID)) {
@@ -78550,7 +77996,7 @@ index 265b376..4e42ef5 100644
        abort_creds(new);
        return old_fsgid;
  
-@@ -1340,19 +1376,19 @@ SYSCALL_DEFINE1(olduname, struct oldold_utsname __user *, name)
+@@ -1343,19 +1379,19 @@ SYSCALL_DEFINE1(olduname, struct oldold_utsname __user *, name)
                return -EFAULT;
  
        down_read(&uts_sem);
@@ -78575,20 +78021,25 @@ index 265b376..4e42ef5 100644
                                __OLD_UTS_LEN);
        error |= __put_user(0, name->machine + __OLD_UTS_LEN);
        up_read(&uts_sem);
-@@ -2026,7 +2062,7 @@ SYSCALL_DEFINE5(prctl, int, option, unsigned long, arg2, unsigned long, arg3,
-                       error = get_dumpable(me->mm);
-                       break;
-               case PR_SET_DUMPABLE:
--                      if (arg2 < 0 || arg2 > 1) {
-+                      if (arg2 > 1) {
-                               error = -EINVAL;
-                               break;
-                       }
+@@ -1557,6 +1593,13 @@ int do_prlimit(struct task_struct *tsk, unsigned int resource,
+                        */
+                       new_rlim->rlim_cur = 1;
+               }
++              /* Handle the case where a fork and setuid occur and then RLIMIT_NPROC
++                 is changed to a lower value.  Since tasks can be created by the same
++                 user in between this limit change and an execve by this task, force
++                 a recheck only for this task by setting PF_NPROC_EXCEEDED
++              */
++              if (resource == RLIMIT_NPROC)
++                      tsk->flags |= PF_NPROC_EXCEEDED;
+       }
+       if (!retval) {
+               if (old_rlim)
 diff --git a/kernel/sysctl.c b/kernel/sysctl.c
-index c88878d..e4fa5d1 100644
+index afc1dc6..5e28bbf 100644
 --- a/kernel/sysctl.c
 +++ b/kernel/sysctl.c
-@@ -92,7 +92,6 @@
+@@ -93,7 +93,6 @@
  
  
  #if defined(CONFIG_SYSCTL)
@@ -78596,7 +78047,7 @@ index c88878d..e4fa5d1 100644
  /* External variables not in a header file. */
  extern int sysctl_overcommit_memory;
  extern int sysctl_overcommit_ratio;
-@@ -172,10 +171,8 @@ static int proc_taint(struct ctl_table *table, int write,
+@@ -178,10 +177,8 @@ static int proc_taint(struct ctl_table *table, int write,
                               void __user *buffer, size_t *lenp, loff_t *ppos);
  #endif
  
@@ -78607,7 +78058,7 @@ index c88878d..e4fa5d1 100644
  
  static int proc_dointvec_minmax_coredump(struct ctl_table *table, int write,
                void __user *buffer, size_t *lenp, loff_t *ppos);
-@@ -206,6 +203,8 @@ static int sysrq_sysctl_handler(ctl_table *table, int write,
+@@ -212,6 +209,8 @@ static int sysrq_sysctl_handler(ctl_table *table, int write,
  
  #endif
  
@@ -78616,7 +78067,7 @@ index c88878d..e4fa5d1 100644
  static struct ctl_table kern_table[];
  static struct ctl_table vm_table[];
  static struct ctl_table fs_table[];
-@@ -220,6 +219,20 @@ extern struct ctl_table epoll_table[];
+@@ -226,6 +225,20 @@ extern struct ctl_table epoll_table[];
  int sysctl_legacy_va_layout;
  #endif
  
@@ -78637,7 +78088,7 @@ index c88878d..e4fa5d1 100644
  /* The default sysctl tables: */
  
  static struct ctl_table sysctl_base_table[] = {
-@@ -268,6 +281,22 @@ static int max_extfrag_threshold = 1000;
+@@ -274,6 +287,22 @@ static int max_extfrag_threshold = 1000;
  #endif
  
  static struct ctl_table kern_table[] = {
@@ -78660,7 +78111,7 @@ index c88878d..e4fa5d1 100644
        {
                .procname       = "sched_child_runs_first",
                .data           = &sysctl_sched_child_runs_first,
-@@ -593,7 +622,7 @@ static struct ctl_table kern_table[] = {
+@@ -608,7 +637,7 @@ static struct ctl_table kern_table[] = {
                .data           = &modprobe_path,
                .maxlen         = KMOD_PATH_LEN,
                .mode           = 0644,
@@ -78669,7 +78120,7 @@ index c88878d..e4fa5d1 100644
        },
        {
                .procname       = "modules_disabled",
-@@ -760,16 +789,20 @@ static struct ctl_table kern_table[] = {
+@@ -775,16 +804,20 @@ static struct ctl_table kern_table[] = {
                .extra1         = &zero,
                .extra2         = &one,
        },
@@ -78691,7 +78142,18 @@ index c88878d..e4fa5d1 100644
        {
                .procname       = "ngroups_max",
                .data           = &ngroups_max,
-@@ -1266,6 +1299,13 @@ static struct ctl_table vm_table[] = {
+@@ -1026,8 +1059,8 @@ static struct ctl_table kern_table[] = {
+        */
+       {
+               .procname       = "perf_event_paranoid",
+-              .data           = &sysctl_perf_event_paranoid,
+-              .maxlen         = sizeof(sysctl_perf_event_paranoid),
++              .data           = &sysctl_perf_event_legitimately_concerned,
++              .maxlen         = sizeof(sysctl_perf_event_legitimately_concerned),
+               .mode           = 0644,
+               .proc_handler   = proc_dointvec,
+       },
+@@ -1283,6 +1316,13 @@ static struct ctl_table vm_table[] = {
                .proc_handler   = proc_dointvec_minmax,
                .extra1         = &zero,
        },
@@ -78705,7 +78167,7 @@ index c88878d..e4fa5d1 100644
  #else
        {
                .procname       = "nr_trim_pages",
-@@ -1716,6 +1756,16 @@ int proc_dostring(struct ctl_table *table, int write,
+@@ -1733,6 +1773,16 @@ int proc_dostring(struct ctl_table *table, int write,
                               buffer, lenp, ppos);
  }
  
@@ -78722,7 +78184,7 @@ index c88878d..e4fa5d1 100644
  static size_t proc_skip_spaces(char **buf)
  {
        size_t ret;
-@@ -1821,6 +1871,8 @@ static int proc_put_long(void __user **buf, size_t *size, unsigned long val,
+@@ -1838,6 +1888,8 @@ static int proc_put_long(void __user **buf, size_t *size, unsigned long val,
        len = strlen(tmp);
        if (len > *size)
                len = *size;
@@ -78731,7 +78193,7 @@ index c88878d..e4fa5d1 100644
        if (copy_to_user(*buf, tmp, len))
                return -EFAULT;
        *size -= len;
-@@ -1985,7 +2037,7 @@ int proc_dointvec(struct ctl_table *table, int write,
+@@ -2002,7 +2054,7 @@ int proc_dointvec(struct ctl_table *table, int write,
  static int proc_taint(struct ctl_table *table, int write,
                               void __user *buffer, size_t *lenp, loff_t *ppos)
  {
@@ -78740,7 +78202,7 @@ index c88878d..e4fa5d1 100644
        unsigned long tmptaint = get_taint();
        int err;
  
-@@ -2013,7 +2065,6 @@ static int proc_taint(struct ctl_table *table, int write,
+@@ -2030,7 +2082,6 @@ static int proc_taint(struct ctl_table *table, int write,
        return err;
  }
  
@@ -78748,7 +78210,7 @@ index c88878d..e4fa5d1 100644
  static int proc_dointvec_minmax_sysadmin(struct ctl_table *table, int write,
                                void __user *buffer, size_t *lenp, loff_t *ppos)
  {
-@@ -2022,7 +2073,6 @@ static int proc_dointvec_minmax_sysadmin(struct ctl_table *table, int write,
+@@ -2039,7 +2090,6 @@ static int proc_dointvec_minmax_sysadmin(struct ctl_table *table, int write,
  
        return proc_dointvec_minmax(table, write, buffer, lenp, ppos);
  }
@@ -78756,7 +78218,7 @@ index c88878d..e4fa5d1 100644
  
  struct do_proc_dointvec_minmax_conv_param {
        int *min;
-@@ -2169,8 +2219,11 @@ static int __do_proc_doulongvec_minmax(void *data, struct ctl_table *table, int
+@@ -2186,8 +2236,11 @@ static int __do_proc_doulongvec_minmax(void *data, struct ctl_table *table, int
                        *i = val;
                } else {
                        val = convdiv * (*i) / convmul;
@@ -78769,7 +78231,7 @@ index c88878d..e4fa5d1 100644
                        err = proc_put_long(&buffer, &left, val, false);
                        if (err)
                                break;
-@@ -2562,6 +2615,12 @@ int proc_dostring(struct ctl_table *table, int write,
+@@ -2579,6 +2632,12 @@ int proc_dostring(struct ctl_table *table, int write,
        return -ENOSYS;
  }
  
@@ -78782,80 +78244,13 @@ index c88878d..e4fa5d1 100644
  int proc_dointvec(struct ctl_table *table, int write,
                  void __user *buffer, size_t *lenp, loff_t *ppos)
  {
-@@ -2618,5 +2677,6 @@ EXPORT_SYMBOL(proc_dointvec_minmax);
+@@ -2635,5 +2694,6 @@ EXPORT_SYMBOL(proc_dointvec_minmax);
  EXPORT_SYMBOL(proc_dointvec_userhz_jiffies);
  EXPORT_SYMBOL(proc_dointvec_ms_jiffies);
  EXPORT_SYMBOL(proc_dostring);
 +EXPORT_SYMBOL(proc_dostring_modpriv);
  EXPORT_SYMBOL(proc_doulongvec_minmax);
  EXPORT_SYMBOL(proc_doulongvec_ms_jiffies_minmax);
-diff --git a/kernel/sysctl_binary.c b/kernel/sysctl_binary.c
-index 0ddf3a0..a199f50 100644
---- a/kernel/sysctl_binary.c
-+++ b/kernel/sysctl_binary.c
-@@ -989,7 +989,7 @@ static ssize_t bin_intvec(struct file *file,
-               int i;
-               set_fs(KERNEL_DS);
--              result = vfs_read(file, buffer, BUFSZ - 1, &pos);
-+              result = vfs_read(file, (char __force_user *)buffer, BUFSZ - 1, &pos);
-               set_fs(old_fs);
-               if (result < 0)
-                       goto out_kfree;
-@@ -1034,7 +1034,7 @@ static ssize_t bin_intvec(struct file *file,
-               }
-               set_fs(KERNEL_DS);
--              result = vfs_write(file, buffer, str - buffer, &pos);
-+              result = vfs_write(file, (const char __force_user *)buffer, str - buffer, &pos);
-               set_fs(old_fs);
-               if (result < 0)
-                       goto out_kfree;
-@@ -1067,7 +1067,7 @@ static ssize_t bin_ulongvec(struct file *file,
-               int i;
-               set_fs(KERNEL_DS);
--              result = vfs_read(file, buffer, BUFSZ - 1, &pos);
-+              result = vfs_read(file, (char __force_user *)buffer, BUFSZ - 1, &pos);
-               set_fs(old_fs);
-               if (result < 0)
-                       goto out_kfree;
-@@ -1112,7 +1112,7 @@ static ssize_t bin_ulongvec(struct file *file,
-               }
-               set_fs(KERNEL_DS);
--              result = vfs_write(file, buffer, str - buffer, &pos);
-+              result = vfs_write(file, (const char __force_user *)buffer, str - buffer, &pos);
-               set_fs(old_fs);
-               if (result < 0)
-                       goto out_kfree;
-@@ -1138,7 +1138,7 @@ static ssize_t bin_uuid(struct file *file,
-               int i;
-               set_fs(KERNEL_DS);
--              result = vfs_read(file, buf, sizeof(buf) - 1, &pos);
-+              result = vfs_read(file, (char __force_user *)buf, sizeof(buf) - 1, &pos);
-               set_fs(old_fs);
-               if (result < 0)
-                       goto out;
-@@ -1185,7 +1185,7 @@ static ssize_t bin_dn_node_address(struct file *file,
-               __le16 dnaddr;
-               set_fs(KERNEL_DS);
--              result = vfs_read(file, buf, sizeof(buf) - 1, &pos);
-+              result = vfs_read(file, (char __force_user *)buf, sizeof(buf) - 1, &pos);
-               set_fs(old_fs);
-               if (result < 0)
-                       goto out;
-@@ -1234,7 +1234,7 @@ static ssize_t bin_dn_node_address(struct file *file,
-                               le16_to_cpu(dnaddr) & 0x3ff);
-               set_fs(KERNEL_DS);
--              result = vfs_write(file, buf, len, &pos);
-+              result = vfs_write(file, (const char __force_user *)buf, len, &pos);
-               set_fs(old_fs);
-               if (result < 0)
-                       goto out;
 diff --git a/kernel/taskstats.c b/kernel/taskstats.c
 index 145bb4d..b2aa969 100644
 --- a/kernel/taskstats.c
@@ -78884,10 +78279,10 @@ index 145bb4d..b2aa969 100644
                return cmd_attr_register_cpumask(info);
        else if (info->attrs[TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK])
 diff --git a/kernel/time.c b/kernel/time.c
-index d226c6a..2f0d217 100644
+index f8342a4..288f13b 100644
 --- a/kernel/time.c
 +++ b/kernel/time.c
-@@ -163,6 +163,11 @@ int do_sys_settimeofday(const struct timespec *tv, const struct timezone *tz)
+@@ -171,6 +171,11 @@ int do_sys_settimeofday(const struct timespec *tv, const struct timezone *tz)
                return error;
  
        if (tz) {
@@ -78899,7 +78294,7 @@ index d226c6a..2f0d217 100644
                sys_tz = *tz;
                update_vsyscall_tz();
                if (firsttime) {
-@@ -493,7 +498,7 @@ EXPORT_SYMBOL(usecs_to_jiffies);
+@@ -501,7 +506,7 @@ EXPORT_SYMBOL(usecs_to_jiffies);
   * The >> (NSEC_JIFFIE_SC - SEC_JIFFIE_SC) converts the scaled nsec
   * value to a scaled second value.
   */
@@ -78922,20 +78317,20 @@ index f11d83b..d016d91 100644
                .clock_get      = alarm_clock_get,
                .timer_create   = alarm_timer_create,
 diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c
-index a13987a..36cd791 100644
+index 90ad470..1814e9a 100644
 --- a/kernel/time/tick-broadcast.c
 +++ b/kernel/time/tick-broadcast.c
-@@ -116,7 +116,7 @@ int tick_device_uses_broadcast(struct clock_event_device *dev, int cpu)
+@@ -138,7 +138,7 @@ int tick_device_uses_broadcast(struct clock_event_device *dev, int cpu)
                 * then clear the broadcast bit.
                 */
                if (!(dev->features & CLOCK_EVT_FEAT_C3STOP)) {
 -                      int cpu = smp_processor_id();
 +                      cpu = smp_processor_id();
                        cpumask_clear_cpu(cpu, tick_get_broadcast_mask());
                        tick_broadcast_clear_oneshot(cpu);
+               } else {
 diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
-index cbc6acb..3a77191 100644
+index 9a0bc98..fceb7d0 100644
 --- a/kernel/time/timekeeping.c
 +++ b/kernel/time/timekeeping.c
 @@ -15,6 +15,7 @@
@@ -78946,7 +78341,7 @@ index cbc6acb..3a77191 100644
  #include <linux/syscore_ops.h>
  #include <linux/clocksource.h>
  #include <linux/jiffies.h>
-@@ -412,6 +413,8 @@ int do_settimeofday(const struct timespec *tv)
+@@ -448,6 +449,8 @@ int do_settimeofday(const struct timespec *tv)
        if (!timespec_valid_strict(tv))
                return -EINVAL;
  
@@ -79074,7 +78469,7 @@ index 0b537f2..40d6c20 100644
                return -ENOMEM;
        return 0;
 diff --git a/kernel/timer.c b/kernel/timer.c
-index 367d008..5dee98f 100644
+index 1b399c8..90e1849 100644
 --- a/kernel/timer.c
 +++ b/kernel/timer.c
 @@ -1363,7 +1363,7 @@ void update_process_times(int user_tick)
@@ -79105,7 +78500,7 @@ index 367d008..5dee98f 100644
  };
  
 diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
-index c0bd030..62a1927 100644
+index 5a0f781..1497f95 100644
 --- a/kernel/trace/blktrace.c
 +++ b/kernel/trace/blktrace.c
 @@ -317,7 +317,7 @@ static ssize_t blk_dropped_read(struct file *filp, char __user *buffer,
@@ -79136,10 +78531,10 @@ index c0bd030..62a1927 100644
        ret = -EIO;
        bt->dropped_file = debugfs_create_file("dropped", 0444, dir, bt,
 diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
-index b27052c..0e1af95 100644
+index 0a0e2a6..943495e 100644
 --- a/kernel/trace/ftrace.c
 +++ b/kernel/trace/ftrace.c
-@@ -1874,12 +1874,17 @@ ftrace_code_disable(struct module *mod, struct dyn_ftrace *rec)
+@@ -1909,12 +1909,17 @@ ftrace_code_disable(struct module *mod, struct dyn_ftrace *rec)
        if (unlikely(ftrace_disabled))
                return 0;
  
@@ -79159,7 +78554,7 @@ index b27052c..0e1af95 100644
  }
  
  /*
-@@ -2965,7 +2970,7 @@ static void ftrace_free_entry_rcu(struct rcu_head *rhp)
+@@ -2986,7 +2991,7 @@ static void ftrace_free_entry_rcu(struct rcu_head *rhp)
  
  int
  register_ftrace_function_probe(char *glob, struct ftrace_probe_ops *ops,
@@ -79168,7 +78563,7 @@ index b27052c..0e1af95 100644
  {
        struct ftrace_func_probe *entry;
        struct ftrace_page *pg;
-@@ -3832,8 +3837,10 @@ static int ftrace_process_locs(struct module *mod,
+@@ -3854,8 +3859,10 @@ static int ftrace_process_locs(struct module *mod,
        if (!count)
                return 0;
  
@@ -79179,7 +78574,7 @@ index b27052c..0e1af95 100644
  
        start_pg = ftrace_allocate_pages(count);
        if (!start_pg)
-@@ -4559,8 +4566,6 @@ ftrace_enable_sysctl(struct ctl_table *table, int write,
+@@ -4574,8 +4581,6 @@ ftrace_enable_sysctl(struct ctl_table *table, int write,
  #ifdef CONFIG_FUNCTION_GRAPH_TRACER
  
  static int ftrace_graph_active;
@@ -79188,7 +78583,7 @@ index b27052c..0e1af95 100644
  int ftrace_graph_entry_stub(struct ftrace_graph_ent *trace)
  {
        return 0;
-@@ -4704,6 +4709,10 @@ ftrace_suspend_notifier_call(struct notifier_block *bl, unsigned long state,
+@@ -4719,6 +4724,10 @@ ftrace_suspend_notifier_call(struct notifier_block *bl, unsigned long state,
        return NOTIFY_DONE;
  }
  
@@ -79199,7 +78594,7 @@ index b27052c..0e1af95 100644
  int register_ftrace_graph(trace_func_graph_ret_t retfunc,
                        trace_func_graph_ent_t entryfunc)
  {
-@@ -4717,7 +4726,6 @@ int register_ftrace_graph(trace_func_graph_ret_t retfunc,
+@@ -4732,7 +4741,6 @@ int register_ftrace_graph(trace_func_graph_ret_t retfunc,
                goto out;
        }
  
@@ -79208,10 +78603,10 @@ index b27052c..0e1af95 100644
  
        ftrace_graph_active++;
 diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
-index ce8514f..8233573 100644
+index 6989df2..c2265cf 100644
 --- a/kernel/trace/ring_buffer.c
 +++ b/kernel/trace/ring_buffer.c
-@@ -346,9 +346,9 @@ struct buffer_data_page {
+@@ -349,9 +349,9 @@ struct buffer_data_page {
   */
  struct buffer_page {
        struct list_head list;          /* list of buffer pages */
@@ -79223,7 +78618,7 @@ index ce8514f..8233573 100644
        unsigned long    real_end;      /* real end of data */
        struct buffer_data_page *page;  /* Actual data page */
  };
-@@ -461,8 +461,8 @@ struct ring_buffer_per_cpu {
+@@ -464,8 +464,8 @@ struct ring_buffer_per_cpu {
        unsigned long                   last_overrun;
        local_t                         entries_bytes;
        local_t                         entries;
@@ -79234,7 +78629,7 @@ index ce8514f..8233573 100644
        local_t                         dropped_events;
        local_t                         committing;
        local_t                         commits;
-@@ -861,8 +861,8 @@ static int rb_tail_page_update(struct ring_buffer_per_cpu *cpu_buffer,
+@@ -864,8 +864,8 @@ static int rb_tail_page_update(struct ring_buffer_per_cpu *cpu_buffer,
         *
         * We add a counter to the write field to denote this.
         */
@@ -79245,7 +78640,7 @@ index ce8514f..8233573 100644
  
        /*
         * Just make sure we have seen our old_write and synchronize
-@@ -890,8 +890,8 @@ static int rb_tail_page_update(struct ring_buffer_per_cpu *cpu_buffer,
+@@ -893,8 +893,8 @@ static int rb_tail_page_update(struct ring_buffer_per_cpu *cpu_buffer,
                 * cmpxchg to only update if an interrupt did not already
                 * do it for us. If the cmpxchg fails, we don't care.
                 */
@@ -79256,7 +78651,7 @@ index ce8514f..8233573 100644
  
                /*
                 * No need to worry about races with clearing out the commit.
-@@ -1250,12 +1250,12 @@ static void rb_reset_cpu(struct ring_buffer_per_cpu *cpu_buffer);
+@@ -1253,12 +1253,12 @@ static void rb_reset_cpu(struct ring_buffer_per_cpu *cpu_buffer);
  
  static inline unsigned long rb_page_entries(struct buffer_page *bpage)
  {
@@ -79271,7 +78666,7 @@ index ce8514f..8233573 100644
  }
  
  static int
-@@ -1350,7 +1350,7 @@ rb_remove_pages(struct ring_buffer_per_cpu *cpu_buffer, unsigned int nr_pages)
+@@ -1353,7 +1353,7 @@ rb_remove_pages(struct ring_buffer_per_cpu *cpu_buffer, unsigned int nr_pages)
                         * bytes consumed in ring buffer from here.
                         * Increment overrun to account for the lost events.
                         */
@@ -79280,7 +78675,7 @@ index ce8514f..8233573 100644
                        local_sub(BUF_PAGE_SIZE, &cpu_buffer->entries_bytes);
                }
  
-@@ -1906,7 +1906,7 @@ rb_handle_head_page(struct ring_buffer_per_cpu *cpu_buffer,
+@@ -1909,7 +1909,7 @@ rb_handle_head_page(struct ring_buffer_per_cpu *cpu_buffer,
                 * it is our responsibility to update
                 * the counters.
                 */
@@ -79289,7 +78684,7 @@ index ce8514f..8233573 100644
                local_sub(BUF_PAGE_SIZE, &cpu_buffer->entries_bytes);
  
                /*
-@@ -2056,7 +2056,7 @@ rb_reset_tail(struct ring_buffer_per_cpu *cpu_buffer,
+@@ -2059,7 +2059,7 @@ rb_reset_tail(struct ring_buffer_per_cpu *cpu_buffer,
                if (tail == BUF_PAGE_SIZE)
                        tail_page->real_end = 0;
  
@@ -79298,7 +78693,7 @@ index ce8514f..8233573 100644
                return;
        }
  
-@@ -2091,7 +2091,7 @@ rb_reset_tail(struct ring_buffer_per_cpu *cpu_buffer,
+@@ -2094,7 +2094,7 @@ rb_reset_tail(struct ring_buffer_per_cpu *cpu_buffer,
                rb_event_set_padding(event);
  
                /* Set the write back to the previous setting */
@@ -79307,7 +78702,7 @@ index ce8514f..8233573 100644
                return;
        }
  
-@@ -2103,7 +2103,7 @@ rb_reset_tail(struct ring_buffer_per_cpu *cpu_buffer,
+@@ -2106,7 +2106,7 @@ rb_reset_tail(struct ring_buffer_per_cpu *cpu_buffer,
  
        /* Set write to end of buffer */
        length = (tail + length) - BUF_PAGE_SIZE;
@@ -79316,7 +78711,7 @@ index ce8514f..8233573 100644
  }
  
  /*
-@@ -2129,7 +2129,7 @@ rb_move_tail(struct ring_buffer_per_cpu *cpu_buffer,
+@@ -2132,7 +2132,7 @@ rb_move_tail(struct ring_buffer_per_cpu *cpu_buffer,
         * about it.
         */
        if (unlikely(next_page == commit_page)) {
@@ -79325,7 +78720,7 @@ index ce8514f..8233573 100644
                goto out_reset;
        }
  
-@@ -2185,7 +2185,7 @@ rb_move_tail(struct ring_buffer_per_cpu *cpu_buffer,
+@@ -2188,7 +2188,7 @@ rb_move_tail(struct ring_buffer_per_cpu *cpu_buffer,
                                      cpu_buffer->tail_page) &&
                                     (cpu_buffer->commit_page ==
                                      cpu_buffer->reader_page))) {
@@ -79334,7 +78729,7 @@ index ce8514f..8233573 100644
                                goto out_reset;
                        }
                }
-@@ -2233,7 +2233,7 @@ __rb_reserve_next(struct ring_buffer_per_cpu *cpu_buffer,
+@@ -2236,7 +2236,7 @@ __rb_reserve_next(struct ring_buffer_per_cpu *cpu_buffer,
                length += RB_LEN_TIME_EXTEND;
  
        tail_page = cpu_buffer->tail_page;
@@ -79343,7 +78738,7 @@ index ce8514f..8233573 100644
  
        /* set write to only the index of the write */
        write &= RB_WRITE_MASK;
-@@ -2250,7 +2250,7 @@ __rb_reserve_next(struct ring_buffer_per_cpu *cpu_buffer,
+@@ -2253,7 +2253,7 @@ __rb_reserve_next(struct ring_buffer_per_cpu *cpu_buffer,
        kmemcheck_annotate_bitfield(event, bitfield);
        rb_update_event(cpu_buffer, event, length, add_timestamp, delta);
  
@@ -79352,7 +78747,7 @@ index ce8514f..8233573 100644
  
        /*
         * If this is the first commit on the page, then update
-@@ -2283,7 +2283,7 @@ rb_try_to_discard(struct ring_buffer_per_cpu *cpu_buffer,
+@@ -2286,7 +2286,7 @@ rb_try_to_discard(struct ring_buffer_per_cpu *cpu_buffer,
  
        if (bpage->page == (void *)addr && rb_page_write(bpage) == old_index) {
                unsigned long write_mask =
@@ -79361,7 +78756,7 @@ index ce8514f..8233573 100644
                unsigned long event_length = rb_event_length(event);
                /*
                 * This is on the tail page. It is possible that
-@@ -2293,7 +2293,7 @@ rb_try_to_discard(struct ring_buffer_per_cpu *cpu_buffer,
+@@ -2296,7 +2296,7 @@ rb_try_to_discard(struct ring_buffer_per_cpu *cpu_buffer,
                 */
                old_index += write_mask;
                new_index += write_mask;
@@ -79370,7 +78765,7 @@ index ce8514f..8233573 100644
                if (index == old_index) {
                        /* update counters */
                        local_sub(event_length, &cpu_buffer->entries_bytes);
-@@ -2632,7 +2632,7 @@ rb_decrement_entry(struct ring_buffer_per_cpu *cpu_buffer,
+@@ -2670,7 +2670,7 @@ rb_decrement_entry(struct ring_buffer_per_cpu *cpu_buffer,
  
        /* Do the likely case first */
        if (likely(bpage->page == (void *)addr)) {
@@ -79379,7 +78774,7 @@ index ce8514f..8233573 100644
                return;
        }
  
-@@ -2644,7 +2644,7 @@ rb_decrement_entry(struct ring_buffer_per_cpu *cpu_buffer,
+@@ -2682,7 +2682,7 @@ rb_decrement_entry(struct ring_buffer_per_cpu *cpu_buffer,
        start = bpage;
        do {
                if (bpage->page == (void *)addr) {
@@ -79388,7 +78783,7 @@ index ce8514f..8233573 100644
                        return;
                }
                rb_inc_page(cpu_buffer, &bpage);
-@@ -2926,7 +2926,7 @@ static inline unsigned long
+@@ -2964,7 +2964,7 @@ static inline unsigned long
  rb_num_of_entries(struct ring_buffer_per_cpu *cpu_buffer)
  {
        return local_read(&cpu_buffer->entries) -
@@ -79397,7 +78792,7 @@ index ce8514f..8233573 100644
  }
  
  /**
-@@ -3015,7 +3015,7 @@ unsigned long ring_buffer_overrun_cpu(struct ring_buffer *buffer, int cpu)
+@@ -3053,7 +3053,7 @@ unsigned long ring_buffer_overrun_cpu(struct ring_buffer *buffer, int cpu)
                return 0;
  
        cpu_buffer = buffer->buffers[cpu];
@@ -79406,7 +78801,7 @@ index ce8514f..8233573 100644
  
        return ret;
  }
-@@ -3038,7 +3038,7 @@ ring_buffer_commit_overrun_cpu(struct ring_buffer *buffer, int cpu)
+@@ -3076,7 +3076,7 @@ ring_buffer_commit_overrun_cpu(struct ring_buffer *buffer, int cpu)
                return 0;
  
        cpu_buffer = buffer->buffers[cpu];
@@ -79415,7 +78810,7 @@ index ce8514f..8233573 100644
  
        return ret;
  }
-@@ -3105,7 +3105,7 @@ unsigned long ring_buffer_overruns(struct ring_buffer *buffer)
+@@ -3161,7 +3161,7 @@ unsigned long ring_buffer_overruns(struct ring_buffer *buffer)
        /* if you care about this being correct, lock the buffer */
        for_each_buffer_cpu(buffer, cpu) {
                cpu_buffer = buffer->buffers[cpu];
@@ -79424,7 +78819,7 @@ index ce8514f..8233573 100644
        }
  
        return overruns;
-@@ -3281,8 +3281,8 @@ rb_get_reader_page(struct ring_buffer_per_cpu *cpu_buffer)
+@@ -3337,8 +3337,8 @@ rb_get_reader_page(struct ring_buffer_per_cpu *cpu_buffer)
        /*
         * Reset the reader page to size zero.
         */
@@ -79435,7 +78830,7 @@ index ce8514f..8233573 100644
        local_set(&cpu_buffer->reader_page->page->commit, 0);
        cpu_buffer->reader_page->real_end = 0;
  
-@@ -3316,7 +3316,7 @@ rb_get_reader_page(struct ring_buffer_per_cpu *cpu_buffer)
+@@ -3372,7 +3372,7 @@ rb_get_reader_page(struct ring_buffer_per_cpu *cpu_buffer)
         * want to compare with the last_overrun.
         */
        smp_mb();
@@ -79444,7 +78839,7 @@ index ce8514f..8233573 100644
  
        /*
         * Here's the tricky part.
-@@ -3886,8 +3886,8 @@ rb_reset_cpu(struct ring_buffer_per_cpu *cpu_buffer)
+@@ -3942,8 +3942,8 @@ rb_reset_cpu(struct ring_buffer_per_cpu *cpu_buffer)
  
        cpu_buffer->head_page
                = list_entry(cpu_buffer->pages, struct buffer_page, list);
@@ -79455,7 +78850,7 @@ index ce8514f..8233573 100644
        local_set(&cpu_buffer->head_page->page->commit, 0);
  
        cpu_buffer->head_page->read = 0;
-@@ -3897,14 +3897,14 @@ rb_reset_cpu(struct ring_buffer_per_cpu *cpu_buffer)
+@@ -3953,14 +3953,14 @@ rb_reset_cpu(struct ring_buffer_per_cpu *cpu_buffer)
  
        INIT_LIST_HEAD(&cpu_buffer->reader_page->list);
        INIT_LIST_HEAD(&cpu_buffer->new_pages);
@@ -79474,7 +78869,7 @@ index ce8514f..8233573 100644
        local_set(&cpu_buffer->dropped_events, 0);
        local_set(&cpu_buffer->entries, 0);
        local_set(&cpu_buffer->committing, 0);
-@@ -4308,8 +4308,8 @@ int ring_buffer_read_page(struct ring_buffer *buffer,
+@@ -4364,8 +4364,8 @@ int ring_buffer_read_page(struct ring_buffer *buffer,
                rb_init_page(bpage);
                bpage = reader->page;
                reader->page = *data_page;
@@ -79486,10 +78881,19 @@ index ce8514f..8233573 100644
                *data_page = bpage;
  
 diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
-index fe1d581..43a0f38 100644
+index 3f28192..a29e8b0 100644
 --- a/kernel/trace/trace.c
 +++ b/kernel/trace/trace.c
-@@ -4494,10 +4494,9 @@ static const struct file_operations tracing_dyn_info_fops = {
+@@ -2893,7 +2893,7 @@ int trace_keep_overwrite(struct tracer *tracer, u32 mask, int set)
+       return 0;
+ }
+-int set_tracer_flag(unsigned int mask, int enabled)
++int set_tracer_flag(unsigned long mask, int enabled)
+ {
+       /* do nothing if flag is already set */
+       if (!!(trace_flags & mask) == !!enabled)
+@@ -4637,10 +4637,9 @@ static const struct file_operations tracing_dyn_info_fops = {
  };
  #endif
  
@@ -79501,23 +78905,36 @@ index fe1d581..43a0f38 100644
        static int once;
  
        if (d_tracer)
-@@ -4517,10 +4516,9 @@ struct dentry *tracing_init_dentry(void)
+@@ -4660,10 +4659,9 @@ struct dentry *tracing_init_dentry(void)
        return d_tracer;
  }
  
 -static struct dentry *d_percpu;
 -
- struct dentry *tracing_dentry_percpu(void)
+ static struct dentry *tracing_dentry_percpu(void)
  {
 +      static struct dentry *d_percpu;
        static int once;
        struct dentry *d_tracer;
  
+diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
+index 2081971..09f861e 100644
+--- a/kernel/trace/trace.h
++++ b/kernel/trace/trace.h
+@@ -948,7 +948,7 @@ extern const char *__stop___trace_bprintk_fmt[];
+ void trace_printk_init_buffers(void);
+ void trace_printk_start_comm(void);
+ int trace_keep_overwrite(struct tracer *tracer, u32 mask, int set);
+-int set_tracer_flag(unsigned int mask, int enabled);
++int set_tracer_flag(unsigned long mask, int enabled);
+ #undef FTRACE_ENTRY
+ #define FTRACE_ENTRY(call, struct_name, id, tstruct, print, filter)   \
 diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
-index 880073d..42db7c3 100644
+index 57e9b28..eebe41c 100644
 --- a/kernel/trace/trace_events.c
 +++ b/kernel/trace/trace_events.c
-@@ -1330,10 +1330,6 @@ static LIST_HEAD(ftrace_module_file_list);
+@@ -1329,10 +1329,6 @@ static LIST_HEAD(ftrace_module_file_list);
  struct ftrace_module_file_ops {
        struct list_head                list;
        struct module                   *mod;
@@ -79528,7 +78945,7 @@ index 880073d..42db7c3 100644
  };
  
  static struct ftrace_module_file_ops *
-@@ -1354,17 +1350,12 @@ trace_create_file_ops(struct module *mod)
+@@ -1353,17 +1349,12 @@ trace_create_file_ops(struct module *mod)
  
        file_ops->mod = mod;
  
@@ -79552,7 +78969,7 @@ index 880073d..42db7c3 100644
  
        list_add(&file_ops->list, &ftrace_module_file_list);
  
-@@ -1388,8 +1379,8 @@ static void trace_module_add_events(struct module *mod)
+@@ -1387,8 +1378,8 @@ static void trace_module_add_events(struct module *mod)
  
        for_each_event(call, start, end) {
                __trace_add_event_call(*call, mod,
@@ -79604,7 +79021,7 @@ index fd3c8aa..5f324a6 100644
        }
        entry   = ring_buffer_event_data(event);
 diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c
-index 194d796..76edb8f 100644
+index 697e88d..1a79993 100644
 --- a/kernel/trace/trace_output.c
 +++ b/kernel/trace/trace_output.c
 @@ -278,7 +278,7 @@ int trace_seq_path(struct trace_seq *s, const struct path *path)
@@ -79616,7 +79033,7 @@ index 194d796..76edb8f 100644
                if (p) {
                        s->len = p - s->buffer;
                        return 1;
-@@ -852,14 +852,16 @@ int register_ftrace_event(struct trace_event *event)
+@@ -851,14 +851,16 @@ int register_ftrace_event(struct trace_event *event)
                        goto out;
        }
  
@@ -79638,71 +79055,23 @@ index 194d796..76edb8f 100644
        key = event->type & (EVENT_HASHSIZE - 1);
  
 diff --git a/kernel/trace/trace_stack.c b/kernel/trace/trace_stack.c
-index 42ca822..cdcacc6 100644
+index b20428c..4845a10 100644
 --- a/kernel/trace/trace_stack.c
 +++ b/kernel/trace/trace_stack.c
-@@ -52,7 +52,7 @@ static inline void check_stack(void)
+@@ -68,7 +68,7 @@ check_stack(unsigned long ip, unsigned long *stack)
                return;
  
        /* we do not handle interrupt stacks yet */
--      if (!object_is_on_stack(&this_size))
-+      if (!object_starts_on_stack(&this_size))
+-      if (!object_is_on_stack(stack))
++      if (!object_starts_on_stack(stack))
                return;
  
        local_irq_save(flags);
-diff --git a/kernel/user.c b/kernel/user.c
-index 7f6ff2b..1ac8f18 100644
---- a/kernel/user.c
-+++ b/kernel/user.c
-@@ -47,9 +47,7 @@ struct user_namespace init_user_ns = {
-                       .count = 4294967295U,
-               },
-       },
--      .kref = {
--              .refcount       = ATOMIC_INIT(3),
--      },
-+      .count = ATOMIC_INIT(3),
-       .owner = GLOBAL_ROOT_UID,
-       .group = GLOBAL_ROOT_GID,
-       .proc_inum = PROC_USER_INIT_INO,
 diff --git a/kernel/user_namespace.c b/kernel/user_namespace.c
-index f45e128..a5a5fb6 100644
+index e134d8f..a018cdd 100644
 --- a/kernel/user_namespace.c
 +++ b/kernel/user_namespace.c
-@@ -88,7 +88,7 @@ int create_user_ns(struct cred *new)
-               return ret;
-       }
--      kref_init(&ns->kref);
-+      atomic_set(&ns->count, 1);
-       /* Leave the new->user_ns reference with the new user namespace. */
-       ns->parent = parent_ns;
-       ns->owner = owner;
-@@ -116,15 +116,16 @@ int unshare_userns(unsigned long unshare_flags, struct cred **new_cred)
-       return create_user_ns(cred);
- }
--void free_user_ns(struct kref *kref)
-+void free_user_ns(struct user_namespace *ns)
- {
--      struct user_namespace *parent, *ns =
--              container_of(kref, struct user_namespace, kref);
-+      struct user_namespace *parent;
--      parent = ns->parent;
--      proc_free_inum(ns->proc_inum);
--      kmem_cache_free(user_ns_cachep, ns);
--      put_user_ns(parent);
-+      do {
-+              parent = ns->parent;
-+              proc_free_inum(ns->proc_inum);
-+              kmem_cache_free(user_ns_cachep, ns);
-+              ns = parent;
-+      } while (atomic_dec_and_test(&parent->count));
- }
- EXPORT_SYMBOL(free_user_ns);
-@@ -815,7 +816,7 @@ static int userns_install(struct nsproxy *nsproxy, void *ns)
+@@ -853,7 +853,7 @@ static int userns_install(struct nsproxy *nsproxy, void *ns)
        if (atomic_read(&current->mm->mm_users) > 1)
                return -EINVAL;
  
@@ -79712,10 +79081,10 @@ index f45e128..a5a5fb6 100644
  
        if (!ns_capable(user_ns, CAP_SYS_ADMIN))
 diff --git a/kernel/utsname_sysctl.c b/kernel/utsname_sysctl.c
-index 63da38c..639904e 100644
+index 4f69f9a..7c6f8f8 100644
 --- a/kernel/utsname_sysctl.c
 +++ b/kernel/utsname_sysctl.c
-@@ -46,7 +46,7 @@ static void put_uts(ctl_table *table, int write, void *which)
+@@ -47,7 +47,7 @@ static void put_uts(ctl_table *table, int write, void *which)
  static int proc_do_uts_string(ctl_table *table, int write,
                  void __user *buffer, size_t *lenp, loff_t *ppos)
  {
@@ -79725,10 +79094,10 @@ index 63da38c..639904e 100644
        memcpy(&uts_table, table, sizeof(uts_table));
        uts_table.data = get_uts(table, write);
 diff --git a/kernel/watchdog.c b/kernel/watchdog.c
-index 75a2ab3..5961da7 100644
+index 4a94467..80a6f9c 100644
 --- a/kernel/watchdog.c
 +++ b/kernel/watchdog.c
-@@ -527,7 +527,7 @@ int proc_dowatchdog(struct ctl_table *table, int write,
+@@ -526,7 +526,7 @@ int proc_dowatchdog(struct ctl_table *table, int write,
  }
  #endif /* CONFIG_SYSCTL */
  
@@ -79738,10 +79107,10 @@ index 75a2ab3..5961da7 100644
        .thread_should_run      = watchdog_should_run,
        .thread_fn              = watchdog,
 diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
-index 67604e5..fe94fb1 100644
+index 28be08c..47bab92 100644
 --- a/lib/Kconfig.debug
 +++ b/lib/Kconfig.debug
-@@ -550,7 +550,7 @@ config DEBUG_MUTEXES
+@@ -549,7 +549,7 @@ config DEBUG_MUTEXES
  
  config DEBUG_LOCK_ALLOC
        bool "Lock debugging: detect incorrect freeing of live locks"
@@ -79750,7 +79119,7 @@ index 67604e5..fe94fb1 100644
        select DEBUG_SPINLOCK
        select DEBUG_MUTEXES
        select LOCKDEP
-@@ -564,7 +564,7 @@ config DEBUG_LOCK_ALLOC
+@@ -563,7 +563,7 @@ config DEBUG_LOCK_ALLOC
  
  config PROVE_LOCKING
        bool "Lock debugging: prove locking correctness"
@@ -79759,7 +79128,7 @@ index 67604e5..fe94fb1 100644
        select LOCKDEP
        select DEBUG_SPINLOCK
        select DEBUG_MUTEXES
-@@ -670,7 +670,7 @@ config LOCKDEP
+@@ -614,7 +614,7 @@ config LOCKDEP
  
  config LOCK_STAT
        bool "Lock usage statistics"
@@ -79768,7 +79137,7 @@ index 67604e5..fe94fb1 100644
        select LOCKDEP
        select DEBUG_SPINLOCK
        select DEBUG_MUTEXES
-@@ -1278,6 +1278,7 @@ config LATENCYTOP
+@@ -1282,6 +1282,7 @@ config LATENCYTOP
        depends on DEBUG_KERNEL
        depends on STACKTRACE_SUPPORT
        depends on PROC_FS
@@ -79776,7 +79145,7 @@ index 67604e5..fe94fb1 100644
        select FRAME_POINTER if !MIPS && !PPC && !S390 && !MICROBLAZE && !ARM_UNWIND
        select KALLSYMS
        select KALLSYMS_ALL
-@@ -1306,7 +1307,7 @@ config INTERVAL_TREE_TEST
+@@ -1310,7 +1311,7 @@ config INTERVAL_TREE_TEST
  
  config PROVIDE_OHCI1394_DMA_INIT
        bool "Remote debugging over FireWire early on boot"
@@ -79785,7 +79154,7 @@ index 67604e5..fe94fb1 100644
        help
          If you want to debug problems which hang or crash the kernel early
          on boot and the crashing machine has a FireWire port, you can use
-@@ -1335,7 +1336,7 @@ config PROVIDE_OHCI1394_DMA_INIT
+@@ -1339,7 +1340,7 @@ config PROVIDE_OHCI1394_DMA_INIT
  
  config FIREWIRE_OHCI_REMOTE_DMA
        bool "Remote debugging over FireWire with firewire-ohci"
@@ -79795,7 +79164,7 @@ index 67604e5..fe94fb1 100644
          This option lets you use the FireWire bus for remote debugging
          with help of the firewire-ohci driver. It enables unfiltered
 diff --git a/lib/Makefile b/lib/Makefile
-index 02ed6c0..bd243da 100644
+index 6e2cc56..9b13738 100644
 --- a/lib/Makefile
 +++ b/lib/Makefile
 @@ -47,7 +47,7 @@ obj-$(CONFIG_GENERIC_HWEIGHT) += hweight.o
@@ -79848,7 +79217,7 @@ index 06f7e4f..f3cf2b0 100644
  }
  EXPORT_SYMBOL(bitmap_parselist_user);
 diff --git a/lib/bug.c b/lib/bug.c
-index d0cdf14..4d07bd2 100644
+index 1686034..a9c00c8 100644
 --- a/lib/bug.c
 +++ b/lib/bug.c
 @@ -134,6 +134,8 @@ enum bug_trap_type report_bug(unsigned long bugaddr, struct pt_regs *regs)
@@ -79861,10 +79230,10 @@ index d0cdf14..4d07bd2 100644
        file = NULL;
        line = 0;
 diff --git a/lib/debugobjects.c b/lib/debugobjects.c
-index d11808c..dc2d6f8 100644
+index 37061ed..da83f48 100644
 --- a/lib/debugobjects.c
 +++ b/lib/debugobjects.c
-@@ -287,7 +287,7 @@ static void debug_object_is_on_stack(void *addr, int onstack)
+@@ -286,7 +286,7 @@ static void debug_object_is_on_stack(void *addr, int onstack)
        if (limit > 4)
                return;
  
@@ -79874,10 +79243,10 @@ index d11808c..dc2d6f8 100644
                return;
  
 diff --git a/lib/devres.c b/lib/devres.c
-index 80b9c76..9e32279 100644
+index 8235331..5881053 100644
 --- a/lib/devres.c
 +++ b/lib/devres.c
-@@ -80,7 +80,7 @@ EXPORT_SYMBOL(devm_ioremap_nocache);
+@@ -81,7 +81,7 @@ EXPORT_SYMBOL(devm_ioremap_nocache);
  void devm_iounmap(struct device *dev, void __iomem *addr)
  {
        WARN_ON(devres_destroy(dev, devm_ioremap_release, devm_ioremap_match,
@@ -79886,7 +79255,7 @@ index 80b9c76..9e32279 100644
        iounmap(addr);
  }
  EXPORT_SYMBOL(devm_iounmap);
-@@ -192,7 +192,7 @@ void devm_ioport_unmap(struct device *dev, void __iomem *addr)
+@@ -224,7 +224,7 @@ void devm_ioport_unmap(struct device *dev, void __iomem *addr)
  {
        ioport_unmap(addr);
        WARN_ON(devres_destroy(dev, devm_ioport_map_release,
@@ -79894,7 +79263,7 @@ index 80b9c76..9e32279 100644
 +                             devm_ioport_map_match, (void __force *)addr));
  }
  EXPORT_SYMBOL(devm_ioport_unmap);
+ #endif /* CONFIG_HAS_IOPORT */
 diff --git a/lib/div64.c b/lib/div64.c
 index a163b6c..9618fa5 100644
 --- a/lib/div64.c
@@ -79918,7 +79287,7 @@ index a163b6c..9618fa5 100644
        u32 high = divisor >> 32;
        u64 quot;
 diff --git a/lib/dma-debug.c b/lib/dma-debug.c
-index 5e396ac..58d5de1 100644
+index d87a17a..ac0d79a 100644
 --- a/lib/dma-debug.c
 +++ b/lib/dma-debug.c
 @@ -768,7 +768,7 @@ static int dma_debug_device_change(struct notifier_block *nb, unsigned long acti
@@ -79930,7 +79299,7 @@ index 5e396ac..58d5de1 100644
  
        if (global_disable)
                return;
-@@ -942,7 +942,7 @@ out:
+@@ -945,7 +945,7 @@ static void check_unmap(struct dma_debug_entry *ref)
  
  static void check_for_stack(struct device *dev, void *addr)
  {
@@ -79989,10 +79358,10 @@ index bd2bea9..6b3c95e 100644
                return false;
  
 diff --git a/lib/kobject.c b/lib/kobject.c
-index e07ee1f..998489d 100644
+index a654866..a4fd13d 100644
 --- a/lib/kobject.c
 +++ b/lib/kobject.c
-@@ -852,9 +852,9 @@ EXPORT_SYMBOL_GPL(kset_create_and_add);
+@@ -859,9 +859,9 @@ EXPORT_SYMBOL_GPL(kset_create_and_add);
  
  
  static DEFINE_SPINLOCK(kobj_ns_type_lock);
@@ -80220,10 +79589,10 @@ index a28df52..3d55877 100644
        unsigned long c;
  
 diff --git a/lib/swiotlb.c b/lib/swiotlb.c
-index 196b069..358f342 100644
+index d23762e..e21eab2 100644
 --- a/lib/swiotlb.c
 +++ b/lib/swiotlb.c
-@@ -642,7 +642,7 @@ EXPORT_SYMBOL(swiotlb_alloc_coherent);
+@@ -664,7 +664,7 @@ EXPORT_SYMBOL(swiotlb_alloc_coherent);
  
  void
  swiotlb_free_coherent(struct device *hwdev, size_t size, void *vaddr,
@@ -80233,7 +79602,7 @@ index 196b069..358f342 100644
        phys_addr_t paddr = dma_to_phys(hwdev, dev_addr);
  
 diff --git a/lib/vsprintf.c b/lib/vsprintf.c
-index fab33a9..3b5fe68 100644
+index 0d62fd7..b7bc911 100644
 --- a/lib/vsprintf.c
 +++ b/lib/vsprintf.c
 @@ -16,6 +16,9 @@
@@ -80246,15 +79615,6 @@ index fab33a9..3b5fe68 100644
  #include <stdarg.h>
  #include <linux/module.h>     /* for KSYM_SYMBOL_LEN */
  #include <linux/types.h>
-@@ -541,7 +544,7 @@ char *symbol_string(char *buf, char *end, void *ptr,
-       char sym[KSYM_SYMBOL_LEN];
-       if (ext == 'B')
-               sprint_backtrace(sym, value);
--      else if (ext != 'f' && ext != 's')
-+      else if (ext != 'f' && ext != 's' && ext != 'a')
-               sprint_symbol(sym, value);
-       else
-               sprint_symbol_no_offset(sym, value);
 @@ -974,7 +977,11 @@ char *netdev_feature_string(char *buf, char *end, const u8 *addr,
        return number(buf, end, *(const netdev_features_t *)addr, spec);
  }
@@ -80276,7 +79636,7 @@ index fab33a9..3b5fe68 100644
   * - 'R' For decoded struct resource, e.g., [mem 0x0-0x1f 64bit pref]
   * - 'r' For raw struct resource, e.g., [mem 0x0-0x1f flags 0x201]
   * - 'M' For a 6-byte MAC address, it prints the address in the
-@@ -1043,12 +1052,12 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr,
+@@ -1044,12 +1053,12 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr,
  
        if (!ptr && *fmt != 'K') {
                /*
@@ -80291,7 +79651,7 @@ index fab33a9..3b5fe68 100644
        }
  
        switch (*fmt) {
-@@ -1058,6 +1067,13 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr,
+@@ -1059,6 +1068,12 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr,
                /* Fallthrough */
        case 'S':
        case 's':
@@ -80301,11 +79661,10 @@ index fab33a9..3b5fe68 100644
 +              return symbol_string(buf, end, ptr, spec, *fmt);
 +#endif
 +      case 'A':
-+      case 'a':
        case 'B':
                return symbol_string(buf, end, ptr, spec, *fmt);
        case 'R':
-@@ -1098,6 +1114,8 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr,
+@@ -1099,6 +1114,8 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr,
                        va_end(va);
                        return buf;
                }
@@ -80314,9 +79673,9 @@ index fab33a9..3b5fe68 100644
        case 'K':
                /*
                 * %pK cannot be used in IRQ context because its test
-@@ -1121,6 +1139,21 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr,
-               }
-               break;
+@@ -1128,6 +1145,21 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr,
+               return number(buf, end,
+                             (unsigned long long) *((phys_addr_t *)ptr), spec);
        }
 +
 +#ifdef CONFIG_GRKERNSEC_HIDESYM
@@ -80336,7 +79695,7 @@ index fab33a9..3b5fe68 100644
        spec.flags |= SMALL;
        if (spec.field_width == -1) {
                spec.field_width = default_width;
-@@ -1842,11 +1875,11 @@ int bstr_printf(char *buf, size_t size, const char *fmt, const u32 *bin_buf)
+@@ -1849,11 +1881,11 @@ int bstr_printf(char *buf, size_t size, const char *fmt, const u32 *bin_buf)
        typeof(type) value;                                             \
        if (sizeof(type) == 8) {                                        \
                args = PTR_ALIGN(args, sizeof(u32));                    \
@@ -80351,7 +79710,7 @@ index fab33a9..3b5fe68 100644
        }                                                               \
        args += sizeof(type);                                           \
        value;                                                          \
-@@ -1909,7 +1942,7 @@ int bstr_printf(char *buf, size_t size, const char *fmt, const u32 *bin_buf)
+@@ -1916,7 +1948,7 @@ int bstr_printf(char *buf, size_t size, const char *fmt, const u32 *bin_buf)
                case FORMAT_TYPE_STR: {
                        const char *str_arg = args;
                        args += strlen(str_arg) + 1;
@@ -80368,10 +79727,10 @@ index 0000000..7cd6065
 @@ -0,0 +1 @@
 +-grsec
 diff --git a/mm/Kconfig b/mm/Kconfig
-index 278e3ab..87c384d 100644
+index 3bea74f..e821c99 100644
 --- a/mm/Kconfig
 +++ b/mm/Kconfig
-@@ -286,10 +286,10 @@ config KSM
+@@ -311,10 +311,10 @@ config KSM
          root has set /sys/kernel/mm/ksm/run to 1 (if CONFIG_SYSFS is set).
  
  config DEFAULT_MMAP_MIN_ADDR
@@ -80385,7 +79744,7 @@ index 278e3ab..87c384d 100644
          This is the portion of low virtual memory which should be protected
          from userspace allocation.  Keeping a user from writing to low pages
          can help reduce the impact of kernel NULL pointer bugs.
-@@ -320,7 +320,7 @@ config MEMORY_FAILURE
+@@ -345,7 +345,7 @@ config MEMORY_FAILURE
  
  config HWPOISON_INJECT
        tristate "HWPoison pages injector"
@@ -80395,10 +79754,10 @@ index 278e3ab..87c384d 100644
  
  config NOMMU_INITIAL_TRIM_EXCESS
 diff --git a/mm/filemap.c b/mm/filemap.c
-index 83efee7..3f99381 100644
+index e1979fd..dda5120 100644
 --- a/mm/filemap.c
 +++ b/mm/filemap.c
-@@ -1747,7 +1747,7 @@ int generic_file_mmap(struct file * file, struct vm_area_struct * vma)
+@@ -1748,7 +1748,7 @@ int generic_file_mmap(struct file * file, struct vm_area_struct * vma)
        struct address_space *mapping = file->f_mapping;
  
        if (!mapping->a_ops->readpage)
@@ -80407,7 +79766,7 @@ index 83efee7..3f99381 100644
        file_accessed(file);
        vma->vm_ops = &generic_file_vm_ops;
        return 0;
-@@ -2087,6 +2087,7 @@ inline int generic_write_checks(struct file *file, loff_t *pos, size_t *count, i
+@@ -2088,6 +2088,7 @@ inline int generic_write_checks(struct file *file, loff_t *pos, size_t *count, i
                          *pos = i_size_read(inode);
  
                if (limit != RLIM_INFINITY) {
@@ -80416,10 +79775,10 @@ index 83efee7..3f99381 100644
                                send_sig(SIGXFSZ, current, 0);
                                return -EFBIG;
 diff --git a/mm/fremap.c b/mm/fremap.c
-index a0aaf0e..20325c3 100644
+index 87da359..3f41cb1 100644
 --- a/mm/fremap.c
 +++ b/mm/fremap.c
-@@ -157,6 +157,11 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size,
+@@ -158,6 +158,11 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size,
   retry:
        vma = find_vma(mm, start);
  
@@ -80460,10 +79819,10 @@ index b32b70c..e512eb0 100644
        set_page_address(page, (void *)vaddr);
  
 diff --git a/mm/hugetlb.c b/mm/hugetlb.c
-index d7cec92..b05cc33 100644
+index 1a12f5b..a85b8fc 100644
 --- a/mm/hugetlb.c
 +++ b/mm/hugetlb.c
-@@ -2008,15 +2008,17 @@ static int hugetlb_sysctl_handler_common(bool obey_mempolicy,
+@@ -2005,15 +2005,17 @@ static int hugetlb_sysctl_handler_common(bool obey_mempolicy,
        struct hstate *h = &default_hstate;
        unsigned long tmp;
        int ret;
@@ -80484,7 +79843,7 @@ index d7cec92..b05cc33 100644
        if (ret)
                goto out;
  
-@@ -2073,15 +2075,17 @@ int hugetlb_overcommit_handler(struct ctl_table *table, int write,
+@@ -2070,15 +2072,17 @@ int hugetlb_overcommit_handler(struct ctl_table *table, int write,
        struct hstate *h = &default_hstate;
        unsigned long tmp;
        int ret;
@@ -80505,7 +79864,7 @@ index d7cec92..b05cc33 100644
        if (ret)
                goto out;
  
-@@ -2515,6 +2519,27 @@ static int unmap_ref_private(struct mm_struct *mm, struct vm_area_struct *vma,
+@@ -2512,6 +2516,27 @@ static int unmap_ref_private(struct mm_struct *mm, struct vm_area_struct *vma,
        return 1;
  }
  
@@ -80533,7 +79892,7 @@ index d7cec92..b05cc33 100644
  /*
   * Hugetlb_cow() should be called with page lock of the original hugepage held.
   * Called with hugetlb_instantiation_mutex held and pte_page locked so we
-@@ -2633,6 +2658,11 @@ retry_avoidcopy:
+@@ -2630,6 +2655,11 @@ retry_avoidcopy:
                                make_huge_pte(vma, new_page, 1));
                page_remove_rmap(old_page);
                hugepage_add_new_anon_rmap(new_page, vma, address);
@@ -80545,7 +79904,7 @@ index d7cec92..b05cc33 100644
                /* Make the old page be freed below */
                new_page = old_page;
        }
-@@ -2792,6 +2822,10 @@ retry:
+@@ -2788,6 +2818,10 @@ retry:
                                && (vma->vm_flags & VM_SHARED)));
        set_huge_pte_at(mm, address, ptep, new_pte);
  
@@ -80556,7 +79915,7 @@ index d7cec92..b05cc33 100644
        if ((flags & FAULT_FLAG_WRITE) && !(vma->vm_flags & VM_SHARED)) {
                /* Optimization, do the COW without a second fault */
                ret = hugetlb_cow(mm, vma, address, ptep, new_pte, page);
-@@ -2821,6 +2855,10 @@ int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma,
+@@ -2817,6 +2851,10 @@ int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma,
        static DEFINE_MUTEX(hugetlb_instantiation_mutex);
        struct hstate *h = hstate_vma(vma);
  
@@ -80567,7 +79926,7 @@ index d7cec92..b05cc33 100644
        address &= huge_page_mask(h);
  
        ptep = huge_pte_offset(mm, address);
-@@ -2834,6 +2872,26 @@ int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma,
+@@ -2830,6 +2868,26 @@ int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma,
                                VM_FAULT_SET_HINDEX(hstate_index(h));
        }
  
@@ -80595,7 +79954,7 @@ index d7cec92..b05cc33 100644
        if (!ptep)
                return VM_FAULT_OOM;
 diff --git a/mm/internal.h b/mm/internal.h
-index 9ba2110..eaf0674 100644
+index 8562de0..7fdfe92 100644
 --- a/mm/internal.h
 +++ b/mm/internal.h
 @@ -100,6 +100,7 @@ extern pmd_t *mm_find_pmd(struct mm_struct *mm, unsigned long address);
@@ -80607,7 +79966,7 @@ index 9ba2110..eaf0674 100644
  #ifdef CONFIG_MEMORY_FAILURE
  extern bool is_free_buddy_page(struct page *page);
 diff --git a/mm/kmemleak.c b/mm/kmemleak.c
-index 752a705..6c3102e 100644
+index c8d7f31..2dbeffd 100644
 --- a/mm/kmemleak.c
 +++ b/mm/kmemleak.c
 @@ -363,7 +363,7 @@ static void print_unreferenced(struct seq_file *seq,
@@ -80619,7 +79978,7 @@ index 752a705..6c3102e 100644
        }
  }
  
-@@ -1853,7 +1853,7 @@ static int __init kmemleak_late_init(void)
+@@ -1851,7 +1851,7 @@ static int __init kmemleak_late_init(void)
                return -ENOMEM;
        }
  
@@ -80651,10 +80010,10 @@ index d53adf9..03a24bf 100644
        set_fs(old_fs);
  
 diff --git a/mm/madvise.c b/mm/madvise.c
-index 03dfa5c..b032917 100644
+index c58c94b..86ec14e 100644
 --- a/mm/madvise.c
 +++ b/mm/madvise.c
-@@ -48,6 +48,10 @@ static long madvise_behavior(struct vm_area_struct * vma,
+@@ -51,6 +51,10 @@ static long madvise_behavior(struct vm_area_struct * vma,
        pgoff_t pgoff;
        unsigned long new_flags = vma->vm_flags;
  
@@ -80665,7 +80024,7 @@ index 03dfa5c..b032917 100644
        switch (behavior) {
        case MADV_NORMAL:
                new_flags = new_flags & ~VM_RAND_READ & ~VM_SEQ_READ;
-@@ -123,6 +127,13 @@ success:
+@@ -126,6 +130,13 @@ success:
        /*
         * vm_flags is protected by the mmap_sem held in write mode.
         */
@@ -80679,7 +80038,7 @@ index 03dfa5c..b032917 100644
        vma->vm_flags = new_flags;
  
  out:
-@@ -181,6 +192,11 @@ static long madvise_dontneed(struct vm_area_struct * vma,
+@@ -274,6 +285,11 @@ static long madvise_dontneed(struct vm_area_struct * vma,
                             struct vm_area_struct ** prev,
                             unsigned long start, unsigned long end)
  {
@@ -80691,7 +80050,7 @@ index 03dfa5c..b032917 100644
        *prev = vma;
        if (vma->vm_flags & (VM_LOCKED|VM_HUGETLB|VM_PFNMAP))
                return -EINVAL;
-@@ -193,6 +209,21 @@ static long madvise_dontneed(struct vm_area_struct * vma,
+@@ -286,6 +302,21 @@ static long madvise_dontneed(struct vm_area_struct * vma,
                zap_page_range(vma, start, end - start, &details);
        } else
                zap_page_range(vma, start, end - start, NULL);
@@ -80713,7 +80072,7 @@ index 03dfa5c..b032917 100644
        return 0;
  }
  
-@@ -397,6 +428,16 @@ SYSCALL_DEFINE3(madvise, unsigned long, start, size_t, len_in, int, behavior)
+@@ -491,6 +522,16 @@ SYSCALL_DEFINE3(madvise, unsigned long, start, size_t, len_in, int, behavior)
        if (end < start)
                goto out;
  
@@ -80731,15 +80090,15 @@ index 03dfa5c..b032917 100644
        if (end == start)
                goto out;
 diff --git a/mm/memory-failure.c b/mm/memory-failure.c
-index c6e4dd3..1f41988 100644
+index df0694c..bc95539 100644
 --- a/mm/memory-failure.c
 +++ b/mm/memory-failure.c
 @@ -61,7 +61,7 @@ int sysctl_memory_failure_early_kill __read_mostly = 0;
  
  int sysctl_memory_failure_recovery __read_mostly = 1;
  
--atomic_long_t mce_bad_pages __read_mostly = ATOMIC_LONG_INIT(0);
-+atomic_long_unchecked_t mce_bad_pages __read_mostly = ATOMIC_LONG_INIT(0);
+-atomic_long_t num_poisoned_pages __read_mostly = ATOMIC_LONG_INIT(0);
++atomic_long_unchecked_t num_poisoned_pages __read_mostly = ATOMIC_LONG_INIT(0);
  
  #if defined(CONFIG_HWPOISON_INJECT) || defined(CONFIG_HWPOISON_INJECT_MODULE)
  
@@ -80761,74 +80120,97 @@ index c6e4dd3..1f41988 100644
        { reserved,     reserved,       "reserved kernel",      me_kernel },
        /*
         * free pages are specially detected outside this table:
-@@ -1040,7 +1040,7 @@ int memory_failure(unsigned long pfn, int trapno, int flags)
-       }
-       nr_pages = 1 << compound_trans_order(hpage);
--      atomic_long_add(nr_pages, &mce_bad_pages);
-+      atomic_long_add_unchecked(nr_pages, &mce_bad_pages);
+@@ -1051,7 +1051,7 @@ int memory_failure(unsigned long pfn, int trapno, int flags)
+               nr_pages = 1 << compound_order(hpage);
+       else /* normal page or thp */
+               nr_pages = 1;
+-      atomic_long_add(nr_pages, &num_poisoned_pages);
++      atomic_long_add_unchecked(nr_pages, &num_poisoned_pages);
  
        /*
         * We need/can do nothing about count=0 pages.
-@@ -1070,7 +1070,7 @@ int memory_failure(unsigned long pfn, int trapno, int flags)
+@@ -1081,7 +1081,7 @@ int memory_failure(unsigned long pfn, int trapno, int flags)
                        if (!PageHWPoison(hpage)
                            || (hwpoison_filter(p) && TestClearPageHWPoison(p))
                            || (p != hpage && TestSetPageHWPoison(hpage))) {
--                              atomic_long_sub(nr_pages, &mce_bad_pages);
-+                              atomic_long_sub_unchecked(nr_pages, &mce_bad_pages);
+-                              atomic_long_sub(nr_pages, &num_poisoned_pages);
++                              atomic_long_sub_unchecked(nr_pages, &num_poisoned_pages);
                                return 0;
                        }
                        set_page_hwpoison_huge_page(hpage);
-@@ -1128,7 +1128,7 @@ int memory_failure(unsigned long pfn, int trapno, int flags)
+@@ -1148,7 +1148,7 @@ int memory_failure(unsigned long pfn, int trapno, int flags)
        }
        if (hwpoison_filter(p)) {
                if (TestClearPageHWPoison(p))
--                      atomic_long_sub(nr_pages, &mce_bad_pages);
-+                      atomic_long_sub_unchecked(nr_pages, &mce_bad_pages);
+-                      atomic_long_sub(nr_pages, &num_poisoned_pages);
++                      atomic_long_sub_unchecked(nr_pages, &num_poisoned_pages);
                unlock_page(hpage);
                put_page(hpage);
                return 0;
-@@ -1323,7 +1323,7 @@ int unpoison_memory(unsigned long pfn)
+@@ -1350,7 +1350,7 @@ int unpoison_memory(unsigned long pfn)
                        return 0;
                }
                if (TestClearPageHWPoison(p))
--                      atomic_long_sub(nr_pages, &mce_bad_pages);
-+                      atomic_long_sub_unchecked(nr_pages, &mce_bad_pages);
+-                      atomic_long_sub(nr_pages, &num_poisoned_pages);
++                      atomic_long_sub_unchecked(nr_pages, &num_poisoned_pages);
                pr_info("MCE: Software-unpoisoned free page %#lx\n", pfn);
                return 0;
        }
-@@ -1337,7 +1337,7 @@ int unpoison_memory(unsigned long pfn)
+@@ -1364,7 +1364,7 @@ int unpoison_memory(unsigned long pfn)
         */
        if (TestClearPageHWPoison(page)) {
                pr_info("MCE: Software-unpoisoned page %#lx\n", pfn);
--              atomic_long_sub(nr_pages, &mce_bad_pages);
-+              atomic_long_sub_unchecked(nr_pages, &mce_bad_pages);
+-              atomic_long_sub(nr_pages, &num_poisoned_pages);
++              atomic_long_sub_unchecked(nr_pages, &num_poisoned_pages);
                freeit = 1;
                if (PageHuge(page))
                        clear_page_hwpoison_huge_page(page);
-@@ -1442,7 +1442,7 @@ static int soft_offline_huge_page(struct page *page, int flags)
-       }
- done:
-       if (!PageHWPoison(hpage))
+@@ -1491,7 +1491,7 @@ static int soft_offline_huge_page(struct page *page, int flags)
+       } else {
+               set_page_hwpoison_huge_page(hpage);
+               dequeue_hwpoisoned_huge_page(hpage);
 -              atomic_long_add(1 << compound_trans_order(hpage),
 +              atomic_long_add_unchecked(1 << compound_trans_order(hpage),
-                               &mce_bad_pages);
-       set_page_hwpoison_huge_page(hpage);
-       dequeue_hwpoisoned_huge_page(hpage);
-@@ -1583,7 +1583,7 @@ int soft_offline_page(struct page *page, int flags)
-               return ret;
- done:
--      atomic_long_add(1, &mce_bad_pages);
-+      atomic_long_add_unchecked(1, &mce_bad_pages);
-       SetPageHWPoison(page);
+                               &num_poisoned_pages);
+       }
        /* keep elevated page count for bad page */
-       return ret;
+@@ -1552,11 +1552,11 @@ int soft_offline_page(struct page *page, int flags)
+               if (PageHuge(page)) {
+                       set_page_hwpoison_huge_page(hpage);
+                       dequeue_hwpoisoned_huge_page(hpage);
+-                      atomic_long_add(1 << compound_trans_order(hpage),
++                      atomic_long_add_unchecked(1 << compound_trans_order(hpage),
+                                       &num_poisoned_pages);
+               } else {
+                       SetPageHWPoison(page);
+-                      atomic_long_inc(&num_poisoned_pages);
++                      atomic_long_inc_unchecked(&num_poisoned_pages);
+               }
+       }
+       /* keep elevated page count for bad page */
+@@ -1596,7 +1596,7 @@ static int __soft_offline_page(struct page *page, int flags)
+               put_page(page);
+               pr_info("soft_offline: %#lx: invalidated\n", pfn);
+               SetPageHWPoison(page);
+-              atomic_long_inc(&num_poisoned_pages);
++              atomic_long_inc_unchecked(&num_poisoned_pages);
+               return 0;
+       }
+@@ -1626,7 +1626,7 @@ static int __soft_offline_page(struct page *page, int flags)
+                               ret = -EIO;
+               } else {
+                       SetPageHWPoison(page);
+-                      atomic_long_inc(&num_poisoned_pages);
++                      atomic_long_inc_unchecked(&num_poisoned_pages);
+               }
+       } else {
+               pr_info("soft offline: %#lx: isolation failed: %d, page count %d, type %lx\n",
 diff --git a/mm/memory.c b/mm/memory.c
-index bb1369f..b9631d2 100644
+index ba94dec..08ffe0d 100644
 --- a/mm/memory.c
 +++ b/mm/memory.c
-@@ -433,6 +433,7 @@ static inline void free_pmd_range(struct mmu_gather *tlb, pud_t *pud,
+@@ -438,6 +438,7 @@ static inline void free_pmd_range(struct mmu_gather *tlb, pud_t *pud,
                free_pte_range(tlb, pmd, addr);
        } while (pmd++, addr = next, addr != end);
  
@@ -80836,7 +80218,7 @@ index bb1369f..b9631d2 100644
        start &= PUD_MASK;
        if (start < floor)
                return;
-@@ -447,6 +448,8 @@ static inline void free_pmd_range(struct mmu_gather *tlb, pud_t *pud,
+@@ -452,6 +453,8 @@ static inline void free_pmd_range(struct mmu_gather *tlb, pud_t *pud,
        pmd = pmd_offset(pud, start);
        pud_clear(pud);
        pmd_free_tlb(tlb, pmd, start);
@@ -80845,7 +80227,7 @@ index bb1369f..b9631d2 100644
  }
  
  static inline void free_pud_range(struct mmu_gather *tlb, pgd_t *pgd,
-@@ -466,6 +469,7 @@ static inline void free_pud_range(struct mmu_gather *tlb, pgd_t *pgd,
+@@ -471,6 +474,7 @@ static inline void free_pud_range(struct mmu_gather *tlb, pgd_t *pgd,
                free_pmd_range(tlb, pud, addr, next, floor, ceiling);
        } while (pud++, addr = next, addr != end);
  
@@ -80853,7 +80235,7 @@ index bb1369f..b9631d2 100644
        start &= PGDIR_MASK;
        if (start < floor)
                return;
-@@ -480,6 +484,8 @@ static inline void free_pud_range(struct mmu_gather *tlb, pgd_t *pgd,
+@@ -485,6 +489,8 @@ static inline void free_pud_range(struct mmu_gather *tlb, pgd_t *pgd,
        pud = pud_offset(pgd, start);
        pgd_clear(pgd);
        pud_free_tlb(tlb, pud, start);
@@ -80862,7 +80244,7 @@ index bb1369f..b9631d2 100644
  }
  
  /*
-@@ -1618,12 +1624,6 @@ no_page_table:
+@@ -1644,12 +1650,6 @@ no_page_table:
        return page;
  }
  
@@ -80875,7 +80257,7 @@ index bb1369f..b9631d2 100644
  /**
   * __get_user_pages() - pin user pages in memory
   * @tsk:      task_struct of target task
-@@ -1709,10 +1709,10 @@ int __get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
+@@ -1736,10 +1736,10 @@ long __get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
  
        i = 0;
  
@@ -80888,7 +80270,7 @@ index bb1369f..b9631d2 100644
                if (!vma && in_gate_area(mm, start)) {
                        unsigned long pg = start & PAGE_MASK;
                        pgd_t *pgd;
-@@ -1760,7 +1760,7 @@ int __get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
+@@ -1788,7 +1788,7 @@ long __get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
                        goto next_page;
                }
  
@@ -80897,7 +80279,7 @@ index bb1369f..b9631d2 100644
                    (vma->vm_flags & (VM_IO | VM_PFNMAP)) ||
                    !(vm_flags & vma->vm_flags))
                        return i ? : -EFAULT;
-@@ -1787,11 +1787,6 @@ int __get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
+@@ -1817,11 +1817,6 @@ long __get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
                                int ret;
                                unsigned int fault_flags = 0;
  
@@ -80909,16 +80291,16 @@ index bb1369f..b9631d2 100644
                                if (foll_flags & FOLL_WRITE)
                                        fault_flags |= FAULT_FLAG_WRITE;
                                if (nonblocking)
-@@ -1865,7 +1860,7 @@ next_page:
-                       start += PAGE_SIZE;
-                       nr_pages--;
+@@ -1901,7 +1896,7 @@ next_page:
+                       start += page_increm * PAGE_SIZE;
+                       nr_pages -= page_increm;
                } while (nr_pages && start < vma->vm_end);
 -      } while (nr_pages);
 +      }
        return i;
  }
  EXPORT_SYMBOL(__get_user_pages);
-@@ -2072,6 +2067,10 @@ static int insert_page(struct vm_area_struct *vma, unsigned long addr,
+@@ -2108,6 +2103,10 @@ static int insert_page(struct vm_area_struct *vma, unsigned long addr,
        page_add_file_rmap(page);
        set_pte_at(mm, addr, pte, mk_pte(page, prot));
  
@@ -80929,7 +80311,7 @@ index bb1369f..b9631d2 100644
        retval = 0;
        pte_unmap_unlock(pte, ptl);
        return retval;
-@@ -2116,9 +2115,21 @@ int vm_insert_page(struct vm_area_struct *vma, unsigned long addr,
+@@ -2152,9 +2151,21 @@ int vm_insert_page(struct vm_area_struct *vma, unsigned long addr,
        if (!page_count(page))
                return -EINVAL;
        if (!(vma->vm_flags & VM_MIXEDMAP)) {
@@ -80951,7 +80333,7 @@ index bb1369f..b9631d2 100644
        }
        return insert_page(vma, addr, page, vma->vm_page_prot);
  }
-@@ -2201,6 +2212,7 @@ int vm_insert_mixed(struct vm_area_struct *vma, unsigned long addr,
+@@ -2237,6 +2248,7 @@ int vm_insert_mixed(struct vm_area_struct *vma, unsigned long addr,
                        unsigned long pfn)
  {
        BUG_ON(!(vma->vm_flags & VM_MIXEDMAP));
@@ -80959,7 +80341,7 @@ index bb1369f..b9631d2 100644
  
        if (addr < vma->vm_start || addr >= vma->vm_end)
                return -EFAULT;
-@@ -2401,7 +2413,9 @@ static int apply_to_pmd_range(struct mm_struct *mm, pud_t *pud,
+@@ -2484,7 +2496,9 @@ static int apply_to_pmd_range(struct mm_struct *mm, pud_t *pud,
  
        BUG_ON(pud_huge(*pud));
  
@@ -80970,7 +80352,7 @@ index bb1369f..b9631d2 100644
        if (!pmd)
                return -ENOMEM;
        do {
-@@ -2421,7 +2435,9 @@ static int apply_to_pud_range(struct mm_struct *mm, pgd_t *pgd,
+@@ -2504,7 +2518,9 @@ static int apply_to_pud_range(struct mm_struct *mm, pgd_t *pgd,
        unsigned long next;
        int err;
  
@@ -80981,7 +80363,7 @@ index bb1369f..b9631d2 100644
        if (!pud)
                return -ENOMEM;
        do {
-@@ -2509,6 +2525,186 @@ static inline void cow_user_page(struct page *dst, struct page *src, unsigned lo
+@@ -2592,6 +2608,186 @@ static inline void cow_user_page(struct page *dst, struct page *src, unsigned lo
                copy_user_highpage(dst, src, va, vma);
  }
  
@@ -81057,7 +80439,7 @@ index bb1369f..b9631d2 100644
 +      page_add_anon_rmap(page_m, vma_m, address_m);
 +      inc_mm_counter_fast(mm, MM_ANONPAGES);
 +      set_pte_at(mm, address_m, pte_m, entry_m);
-+      update_mmu_cache(vma_m, address_m, entry_m);
++      update_mmu_cache(vma_m, address_m, pte_m);
 +out:
 +      if (ptl != ptl_m)
 +              spin_unlock(ptl_m);
@@ -81096,7 +80478,7 @@ index bb1369f..b9631d2 100644
 +      page_add_file_rmap(page_m);
 +      inc_mm_counter_fast(mm, MM_FILEPAGES);
 +      set_pte_at(mm, address_m, pte_m, entry_m);
-+      update_mmu_cache(vma_m, address_m, entry_m);
++      update_mmu_cache(vma_m, address_m, pte_m);
 +out:
 +      if (ptl != ptl_m)
 +              spin_unlock(ptl_m);
@@ -81168,7 +80550,7 @@ index bb1369f..b9631d2 100644
  /*
   * This routine handles present pages, when users try to write
   * to a shared page. It is done by copying the page to a new address
-@@ -2725,6 +2921,12 @@ gotten:
+@@ -2808,6 +3004,12 @@ gotten:
         */
        page_table = pte_offset_map_lock(mm, pmd, address, &ptl);
        if (likely(pte_same(*page_table, orig_pte))) {
@@ -81181,7 +80563,7 @@ index bb1369f..b9631d2 100644
                if (old_page) {
                        if (!PageAnon(old_page)) {
                                dec_mm_counter_fast(mm, MM_FILEPAGES);
-@@ -2776,6 +2978,10 @@ gotten:
+@@ -2859,6 +3061,10 @@ gotten:
                        page_remove_rmap(old_page);
                }
  
@@ -81192,7 +80574,7 @@ index bb1369f..b9631d2 100644
                /* Free the old page.. */
                new_page = old_page;
                ret |= VM_FAULT_WRITE;
-@@ -3051,6 +3257,11 @@ static int do_swap_page(struct mm_struct *mm, struct vm_area_struct *vma,
+@@ -3134,6 +3340,11 @@ static int do_swap_page(struct mm_struct *mm, struct vm_area_struct *vma,
        swap_free(entry);
        if (vm_swap_full() || (vma->vm_flags & VM_LOCKED) || PageMlocked(page))
                try_to_free_swap(page);
@@ -81202,9 +80584,9 @@ index bb1369f..b9631d2 100644
 +#endif
 +
        unlock_page(page);
-       if (swapcache) {
+       if (page != swapcache) {
                /*
-@@ -3074,6 +3285,11 @@ static int do_swap_page(struct mm_struct *mm, struct vm_area_struct *vma,
+@@ -3157,6 +3368,11 @@ static int do_swap_page(struct mm_struct *mm, struct vm_area_struct *vma,
  
        /* No need to invalidate - it was non-present before */
        update_mmu_cache(vma, address, page_table);
@@ -81216,7 +80598,7 @@ index bb1369f..b9631d2 100644
  unlock:
        pte_unmap_unlock(page_table, ptl);
  out:
-@@ -3093,40 +3309,6 @@ out_release:
+@@ -3176,40 +3392,6 @@ out_release:
  }
  
  /*
@@ -81257,7 +80639,7 @@ index bb1369f..b9631d2 100644
   * We enter with non-exclusive mmap_sem (to exclude vma changes,
   * but allow concurrent faults), and pte mapped but not yet locked.
   * We return with mmap_sem still held, but pte unmapped and unlocked.
-@@ -3135,27 +3317,23 @@ static int do_anonymous_page(struct mm_struct *mm, struct vm_area_struct *vma,
+@@ -3218,27 +3400,23 @@ static int do_anonymous_page(struct mm_struct *mm, struct vm_area_struct *vma,
                unsigned long address, pte_t *page_table, pmd_t *pmd,
                unsigned int flags)
  {
@@ -81290,7 +80672,7 @@ index bb1369f..b9631d2 100644
        if (unlikely(anon_vma_prepare(vma)))
                goto oom;
        page = alloc_zeroed_user_highpage_movable(vma, address);
-@@ -3174,6 +3352,11 @@ static int do_anonymous_page(struct mm_struct *mm, struct vm_area_struct *vma,
+@@ -3257,6 +3435,11 @@ static int do_anonymous_page(struct mm_struct *mm, struct vm_area_struct *vma,
        if (!pte_none(*page_table))
                goto release;
  
@@ -81302,7 +80684,7 @@ index bb1369f..b9631d2 100644
        inc_mm_counter_fast(mm, MM_ANONPAGES);
        page_add_new_anon_rmap(page, vma, address);
  setpte:
-@@ -3181,6 +3364,12 @@ setpte:
+@@ -3264,6 +3447,12 @@ setpte:
  
        /* No need to invalidate - it was non-present before */
        update_mmu_cache(vma, address, page_table);
@@ -81315,7 +80697,7 @@ index bb1369f..b9631d2 100644
  unlock:
        pte_unmap_unlock(page_table, ptl);
        return 0;
-@@ -3324,6 +3513,12 @@ static int __do_fault(struct mm_struct *mm, struct vm_area_struct *vma,
+@@ -3407,6 +3596,12 @@ static int __do_fault(struct mm_struct *mm, struct vm_area_struct *vma,
         */
        /* Only go through if we didn't race with anybody else... */
        if (likely(pte_same(*page_table, orig_pte))) {
@@ -81328,7 +80710,7 @@ index bb1369f..b9631d2 100644
                flush_icache_page(vma, page);
                entry = mk_pte(page, vma->vm_page_prot);
                if (flags & FAULT_FLAG_WRITE)
-@@ -3343,6 +3538,14 @@ static int __do_fault(struct mm_struct *mm, struct vm_area_struct *vma,
+@@ -3426,6 +3621,14 @@ static int __do_fault(struct mm_struct *mm, struct vm_area_struct *vma,
  
                /* no need to invalidate: a not-present page won't be cached */
                update_mmu_cache(vma, address, page_table);
@@ -81343,7 +80725,7 @@ index bb1369f..b9631d2 100644
        } else {
                if (cow_page)
                        mem_cgroup_uncharge_page(cow_page);
-@@ -3664,6 +3867,12 @@ int handle_pte_fault(struct mm_struct *mm,
+@@ -3747,6 +3950,12 @@ int handle_pte_fault(struct mm_struct *mm,
                if (flags & FAULT_FLAG_WRITE)
                        flush_tlb_fix_spurious_fault(vma, address);
        }
@@ -81356,7 +80738,7 @@ index bb1369f..b9631d2 100644
  unlock:
        pte_unmap_unlock(pte, ptl);
        return 0;
-@@ -3680,6 +3889,10 @@ int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma,
+@@ -3763,6 +3972,10 @@ int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma,
        pmd_t *pmd;
        pte_t *pte;
  
@@ -81367,7 +80749,7 @@ index bb1369f..b9631d2 100644
        __set_current_state(TASK_RUNNING);
  
        count_vm_event(PGFAULT);
-@@ -3691,6 +3904,34 @@ int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma,
+@@ -3774,6 +3987,34 @@ int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma,
        if (unlikely(is_vm_hugetlb_page(vma)))
                return hugetlb_fault(mm, vma, address, flags);
  
@@ -81402,7 +80784,7 @@ index bb1369f..b9631d2 100644
  retry:
        pgd = pgd_offset(mm, address);
        pud = pud_alloc(mm, pgd, address);
-@@ -3789,6 +4030,23 @@ int __pud_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long address)
+@@ -3872,6 +4113,23 @@ int __pud_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long address)
        spin_unlock(&mm->page_table_lock);
        return 0;
  }
@@ -81426,7 +80808,7 @@ index bb1369f..b9631d2 100644
  #endif /* __PAGETABLE_PUD_FOLDED */
  
  #ifndef __PAGETABLE_PMD_FOLDED
-@@ -3819,11 +4077,35 @@ int __pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long address)
+@@ -3902,6 +4160,30 @@ int __pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long address)
        spin_unlock(&mm->page_table_lock);
        return 0;
  }
@@ -81456,15 +80838,8 @@ index bb1369f..b9631d2 100644
 +}
  #endif /* __PAGETABLE_PMD_FOLDED */
  
--int make_pages_present(unsigned long addr, unsigned long end)
-+ssize_t make_pages_present(unsigned long addr, unsigned long end)
- {
--      int ret, len, write;
-+      ssize_t ret, len, write;
-       struct vm_area_struct * vma;
-       vma = find_vma(current->mm, addr);
-@@ -3856,7 +4138,7 @@ static int __init gate_vma_init(void)
+ #if !defined(__HAVE_ARCH_GATE_AREA)
+@@ -3915,7 +4197,7 @@ static int __init gate_vma_init(void)
        gate_vma.vm_start = FIXADDR_USER_START;
        gate_vma.vm_end = FIXADDR_USER_END;
        gate_vma.vm_flags = VM_READ | VM_MAYREAD | VM_EXEC | VM_MAYEXEC;
@@ -81473,7 +80848,7 @@ index bb1369f..b9631d2 100644
  
        return 0;
  }
-@@ -3990,8 +4272,8 @@ out:
+@@ -4049,8 +4331,8 @@ out:
        return ret;
  }
  
@@ -81484,7 +80859,7 @@ index bb1369f..b9631d2 100644
  {
        resource_size_t phys_addr;
        unsigned long prot = 0;
-@@ -4016,8 +4298,8 @@ int generic_access_phys(struct vm_area_struct *vma, unsigned long addr,
+@@ -4075,8 +4357,8 @@ int generic_access_phys(struct vm_area_struct *vma, unsigned long addr,
   * Access another process' address space as given in mm.  If non-NULL, use the
   * given task for page fault accounting.
   */
@@ -81495,7 +80870,7 @@ index bb1369f..b9631d2 100644
  {
        struct vm_area_struct *vma;
        void *old_buf = buf;
-@@ -4025,7 +4307,7 @@ static int __access_remote_vm(struct task_struct *tsk, struct mm_struct *mm,
+@@ -4084,7 +4366,7 @@ static int __access_remote_vm(struct task_struct *tsk, struct mm_struct *mm,
        down_read(&mm->mmap_sem);
        /* ignore errors, just check how much was successfully transferred */
        while (len) {
@@ -81504,7 +80879,7 @@ index bb1369f..b9631d2 100644
                void *maddr;
                struct page *page = NULL;
  
-@@ -4084,8 +4366,8 @@ static int __access_remote_vm(struct task_struct *tsk, struct mm_struct *mm,
+@@ -4143,8 +4425,8 @@ static int __access_remote_vm(struct task_struct *tsk, struct mm_struct *mm,
   *
   * The caller must hold a reference on @mm.
   */
@@ -81515,7 +80890,7 @@ index bb1369f..b9631d2 100644
  {
        return __access_remote_vm(NULL, mm, addr, buf, len, write);
  }
-@@ -4095,11 +4377,11 @@ int access_remote_vm(struct mm_struct *mm, unsigned long addr,
+@@ -4154,11 +4436,11 @@ int access_remote_vm(struct mm_struct *mm, unsigned long addr,
   * Source/target buffer must be kernel space,
   * Do not walk the page table directly, use get_user_pages
   */
@@ -81531,10 +80906,10 @@ index bb1369f..b9631d2 100644
        mm = get_task_mm(tsk);
        if (!mm)
 diff --git a/mm/mempolicy.c b/mm/mempolicy.c
-index 3df6d12..a11056a 100644
+index 7431001..0f8344e 100644
 --- a/mm/mempolicy.c
 +++ b/mm/mempolicy.c
-@@ -721,6 +721,10 @@ static int mbind_range(struct mm_struct *mm, unsigned long start,
+@@ -708,6 +708,10 @@ static int mbind_range(struct mm_struct *mm, unsigned long start,
        unsigned long vmstart;
        unsigned long vmend;
  
@@ -81545,7 +80920,7 @@ index 3df6d12..a11056a 100644
        vma = find_vma(mm, start);
        if (!vma || vma->vm_start > start)
                return -EFAULT;
-@@ -757,9 +761,20 @@ static int mbind_range(struct mm_struct *mm, unsigned long start,
+@@ -744,9 +748,20 @@ static int mbind_range(struct mm_struct *mm, unsigned long start,
                        if (err)
                                goto out;
                }
@@ -81566,7 +80941,7 @@ index 3df6d12..a11056a 100644
        }
  
   out:
-@@ -1216,6 +1231,17 @@ static long do_mbind(unsigned long start, unsigned long len,
+@@ -1202,6 +1217,17 @@ static long do_mbind(unsigned long start, unsigned long len,
  
        if (end < start)
                return -EINVAL;
@@ -81584,7 +80959,7 @@ index 3df6d12..a11056a 100644
        if (end == start)
                return 0;
  
-@@ -1445,8 +1471,7 @@ SYSCALL_DEFINE4(migrate_pages, pid_t, pid, unsigned long, maxnode,
+@@ -1430,8 +1456,7 @@ SYSCALL_DEFINE4(migrate_pages, pid_t, pid, unsigned long, maxnode,
         */
        tcred = __task_cred(task);
        if (!uid_eq(cred->euid, tcred->suid) && !uid_eq(cred->euid, tcred->uid) &&
@@ -81594,7 +80969,7 @@ index 3df6d12..a11056a 100644
                rcu_read_unlock();
                err = -EPERM;
                goto out_put;
-@@ -1477,6 +1502,15 @@ SYSCALL_DEFINE4(migrate_pages, pid_t, pid, unsigned long, maxnode,
+@@ -1462,6 +1487,15 @@ SYSCALL_DEFINE4(migrate_pages, pid_t, pid, unsigned long, maxnode,
                goto out;
        }
  
@@ -81611,10 +80986,10 @@ index 3df6d12..a11056a 100644
                capable(CAP_SYS_NICE) ? MPOL_MF_MOVE_ALL : MPOL_MF_MOVE);
  
 diff --git a/mm/migrate.c b/mm/migrate.c
-index 2fd8b4a..d70358f 100644
+index 3bbaf5d..299b0e9 100644
 --- a/mm/migrate.c
 +++ b/mm/migrate.c
-@@ -1401,8 +1401,7 @@ SYSCALL_DEFINE6(move_pages, pid_t, pid, unsigned long, nr_pages,
+@@ -1382,8 +1382,7 @@ SYSCALL_DEFINE6(move_pages, pid_t, pid, unsigned long, nr_pages,
         */
        tcred = __task_cred(task);
        if (!uid_eq(cred->euid, tcred->suid) && !uid_eq(cred->euid, tcred->uid) &&
@@ -81625,7 +81000,7 @@ index 2fd8b4a..d70358f 100644
                err = -EPERM;
                goto out;
 diff --git a/mm/mlock.c b/mm/mlock.c
-index c9bd528..da8d069 100644
+index 79b7cf7..c60424f 100644
 --- a/mm/mlock.c
 +++ b/mm/mlock.c
 @@ -13,6 +13,7 @@
@@ -81636,7 +81011,7 @@ index c9bd528..da8d069 100644
  #include <linux/sched.h>
  #include <linux/export.h>
  #include <linux/rmap.h>
-@@ -369,7 +370,7 @@ static int do_mlock(unsigned long start, size_t len, int on)
+@@ -334,7 +335,7 @@ static int do_mlock(unsigned long start, size_t len, int on)
  {
        unsigned long nstart, end, tmp;
        struct vm_area_struct * vma, * prev;
@@ -81645,7 +81020,7 @@ index c9bd528..da8d069 100644
  
        VM_BUG_ON(start & ~PAGE_MASK);
        VM_BUG_ON(len != PAGE_ALIGN(len));
-@@ -378,6 +379,9 @@ static int do_mlock(unsigned long start, size_t len, int on)
+@@ -343,6 +344,9 @@ static int do_mlock(unsigned long start, size_t len, int on)
                return -EINVAL;
        if (end == start)
                return 0;
@@ -81655,7 +81030,7 @@ index c9bd528..da8d069 100644
        vma = find_vma(current->mm, start);
        if (!vma || vma->vm_start > start)
                return -ENOMEM;
-@@ -389,6 +393,11 @@ static int do_mlock(unsigned long start, size_t len, int on)
+@@ -354,6 +358,11 @@ static int do_mlock(unsigned long start, size_t len, int on)
        for (nstart = start ; ; ) {
                vm_flags_t newflags;
  
@@ -81666,8 +81041,8 @@ index c9bd528..da8d069 100644
 +
                /* Here we know that  vma->vm_start <= nstart < vma->vm_end. */
  
-               newflags = vma->vm_flags VM_LOCKED;
-@@ -494,6 +503,7 @@ SYSCALL_DEFINE2(mlock, unsigned long, start, size_t, len)
+               newflags = vma->vm_flags & ~VM_LOCKED;
+@@ -466,6 +475,7 @@ SYSCALL_DEFINE2(mlock, unsigned long, start, size_t, len)
        lock_limit >>= PAGE_SHIFT;
  
        /* check against resource limits */
@@ -81675,7 +81050,7 @@ index c9bd528..da8d069 100644
        if ((locked <= lock_limit) || capable(CAP_IPC_LOCK))
                error = do_mlock(start, len, 1);
        up_write(&current->mm->mmap_sem);
-@@ -528,6 +538,12 @@ static int do_mlockall(int flags)
+@@ -500,6 +510,12 @@ static int do_mlockall(int flags)
        for (vma = current->mm->mmap; vma ; vma = prev->vm_next) {
                vm_flags_t newflags;
  
@@ -81685,10 +81060,10 @@ index c9bd528..da8d069 100644
 +#endif
 +
 +              BUG_ON(vma->vm_end > TASK_SIZE);
-               newflags = vma->vm_flags VM_LOCKED;
-               if (!(flags & MCL_CURRENT))
-                       newflags &= ~VM_LOCKED;
-@@ -560,6 +576,7 @@ SYSCALL_DEFINE1(mlockall, int, flags)
+               newflags = vma->vm_flags & ~VM_LOCKED;
+               if (flags & MCL_CURRENT)
+                       newflags |= VM_LOCKED;
+@@ -532,6 +548,7 @@ SYSCALL_DEFINE1(mlockall, int, flags)
        lock_limit >>= PAGE_SHIFT;
  
        ret = -ENOMEM;
@@ -81697,18 +81072,18 @@ index c9bd528..da8d069 100644
            capable(CAP_IPC_LOCK))
                ret = do_mlockall(flags);
 diff --git a/mm/mmap.c b/mm/mmap.c
-index 8832b87..04240d1 100644
+index 0dceed8..671951c 100644
 --- a/mm/mmap.c
 +++ b/mm/mmap.c
-@@ -32,6 +32,7 @@
- #include <linux/khugepaged.h>
+@@ -33,6 +33,7 @@
  #include <linux/uprobes.h>
  #include <linux/rbtree_augmented.h>
+ #include <linux/sched/sysctl.h>
 +#include <linux/random.h>
  
  #include <asm/uaccess.h>
  #include <asm/cacheflush.h>
-@@ -48,6 +49,16 @@
+@@ -49,6 +50,16 @@
  #define arch_rebalance_pgtables(addr, len)            (addr)
  #endif
  
@@ -81725,7 +81100,7 @@ index 8832b87..04240d1 100644
  static void unmap_region(struct mm_struct *mm,
                struct vm_area_struct *vma, struct vm_area_struct *prev,
                unsigned long start, unsigned long end);
-@@ -67,22 +78,32 @@ static void unmap_region(struct mm_struct *mm,
+@@ -68,22 +79,32 @@ static void unmap_region(struct mm_struct *mm,
   *            x: (no) no      x: (no) yes     x: (no) yes     x: (yes) yes
   *
   */
@@ -81761,7 +81136,7 @@ index 8832b87..04240d1 100644
  /*
   * Make sure vm_committed_as in one cacheline and not cacheline shared with
   * other variables. It can be updated by several CPUs frequently.
-@@ -238,6 +259,7 @@ static struct vm_area_struct *remove_vma(struct vm_area_struct *vma)
+@@ -239,6 +260,7 @@ static struct vm_area_struct *remove_vma(struct vm_area_struct *vma)
        struct vm_area_struct *next = vma->vm_next;
  
        might_sleep();
@@ -81769,7 +81144,7 @@ index 8832b87..04240d1 100644
        if (vma->vm_ops && vma->vm_ops->close)
                vma->vm_ops->close(vma);
        if (vma->vm_file)
-@@ -281,6 +303,7 @@ SYSCALL_DEFINE1(brk, unsigned long, brk)
+@@ -283,6 +305,7 @@ SYSCALL_DEFINE1(brk, unsigned long, brk)
         * not page aligned -Ram Gupta
         */
        rlim = rlimit(RLIMIT_DATA);
@@ -81777,7 +81152,7 @@ index 8832b87..04240d1 100644
        if (rlim < RLIM_INFINITY && (brk - mm->start_brk) +
                        (mm->end_data - mm->start_data) > rlim)
                goto out;
-@@ -888,6 +911,12 @@ static int
+@@ -897,6 +920,12 @@ static int
  can_vma_merge_before(struct vm_area_struct *vma, unsigned long vm_flags,
        struct anon_vma *anon_vma, struct file *file, pgoff_t vm_pgoff)
  {
@@ -81790,7 +81165,7 @@ index 8832b87..04240d1 100644
        if (is_mergeable_vma(vma, file, vm_flags) &&
            is_mergeable_anon_vma(anon_vma, vma->anon_vma, vma)) {
                if (vma->vm_pgoff == vm_pgoff)
-@@ -907,6 +936,12 @@ static int
+@@ -916,6 +945,12 @@ static int
  can_vma_merge_after(struct vm_area_struct *vma, unsigned long vm_flags,
        struct anon_vma *anon_vma, struct file *file, pgoff_t vm_pgoff)
  {
@@ -81803,7 +81178,7 @@ index 8832b87..04240d1 100644
        if (is_mergeable_vma(vma, file, vm_flags) &&
            is_mergeable_anon_vma(anon_vma, vma->anon_vma, vma)) {
                pgoff_t vm_pglen;
-@@ -949,13 +984,20 @@ can_vma_merge_after(struct vm_area_struct *vma, unsigned long vm_flags,
+@@ -958,13 +993,20 @@ can_vma_merge_after(struct vm_area_struct *vma, unsigned long vm_flags,
  struct vm_area_struct *vma_merge(struct mm_struct *mm,
                        struct vm_area_struct *prev, unsigned long addr,
                        unsigned long end, unsigned long vm_flags,
@@ -81825,7 +81200,7 @@ index 8832b87..04240d1 100644
        /*
         * We later require that vma->vm_flags == vm_flags,
         * so this tests vma->vm_flags & VM_SPECIAL, too.
-@@ -971,6 +1013,15 @@ struct vm_area_struct *vma_merge(struct mm_struct *mm,
+@@ -980,6 +1022,15 @@ struct vm_area_struct *vma_merge(struct mm_struct *mm,
        if (next && next->vm_end == end)                /* cases 6, 7, 8 */
                next = next->vm_next;
  
@@ -81841,7 +81216,7 @@ index 8832b87..04240d1 100644
        /*
         * Can it merge with the predecessor?
         */
-@@ -990,9 +1041,24 @@ struct vm_area_struct *vma_merge(struct mm_struct *mm,
+@@ -999,9 +1050,24 @@ struct vm_area_struct *vma_merge(struct mm_struct *mm,
                                                        /* cases 1, 6 */
                        err = vma_adjust(prev, prev->vm_start,
                                next->vm_end, prev->vm_pgoff, NULL);
@@ -81867,7 +81242,7 @@ index 8832b87..04240d1 100644
                if (err)
                        return NULL;
                khugepaged_enter_vma_merge(prev);
-@@ -1006,12 +1072,27 @@ struct vm_area_struct *vma_merge(struct mm_struct *mm,
+@@ -1015,12 +1081,27 @@ struct vm_area_struct *vma_merge(struct mm_struct *mm,
                        mpol_equal(policy, vma_policy(next)) &&
                        can_vma_merge_before(next, vm_flags,
                                        anon_vma, file, pgoff+pglen)) {
@@ -81897,7 +81272,7 @@ index 8832b87..04240d1 100644
                if (err)
                        return NULL;
                khugepaged_enter_vma_merge(area);
-@@ -1120,8 +1201,10 @@ none:
+@@ -1129,8 +1210,10 @@ none:
  void vm_stat_account(struct mm_struct *mm, unsigned long flags,
                                                struct file *file, long pages)
  {
@@ -81910,7 +81285,7 @@ index 8832b87..04240d1 100644
  
        mm->total_vm += pages;
  
-@@ -1129,7 +1212,7 @@ void vm_stat_account(struct mm_struct *mm, unsigned long flags,
+@@ -1138,7 +1221,7 @@ void vm_stat_account(struct mm_struct *mm, unsigned long flags,
                mm->shared_vm += pages;
                if ((flags & (VM_EXEC|VM_WRITE)) == VM_EXEC)
                        mm->exec_vm += pages;
@@ -81919,7 +81294,7 @@ index 8832b87..04240d1 100644
                mm->stack_vm += pages;
  }
  #endif /* CONFIG_PROC_FS */
-@@ -1165,7 +1248,7 @@ unsigned long do_mmap_pgoff(struct file *file, unsigned long addr,
+@@ -1177,7 +1260,7 @@ unsigned long do_mmap_pgoff(struct file *file, unsigned long addr,
         * (the exception is when the underlying filesystem is noexec
         *  mounted, in which case we dont add PROT_EXEC.)
         */
@@ -81928,7 +81303,7 @@ index 8832b87..04240d1 100644
                if (!(file && (file->f_path.mnt->mnt_flags & MNT_NOEXEC)))
                        prot |= PROT_EXEC;
  
-@@ -1191,7 +1274,7 @@ unsigned long do_mmap_pgoff(struct file *file, unsigned long addr,
+@@ -1203,7 +1286,7 @@ unsigned long do_mmap_pgoff(struct file *file, unsigned long addr,
        /* Obtain the address to map to. we verify (or select) it and ensure
         * that it represents a valid section of the address space.
         */
@@ -81937,7 +81312,7 @@ index 8832b87..04240d1 100644
        if (addr & ~PAGE_MASK)
                return addr;
  
-@@ -1202,6 +1285,36 @@ unsigned long do_mmap_pgoff(struct file *file, unsigned long addr,
+@@ -1214,6 +1297,36 @@ unsigned long do_mmap_pgoff(struct file *file, unsigned long addr,
        vm_flags = calc_vm_prot_bits(prot) | calc_vm_flag_bits(flags) |
                        mm->def_flags | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC;
  
@@ -81974,7 +81349,7 @@ index 8832b87..04240d1 100644
        if (flags & MAP_LOCKED)
                if (!can_do_mlock())
                        return -EPERM;
-@@ -1213,6 +1326,7 @@ unsigned long do_mmap_pgoff(struct file *file, unsigned long addr,
+@@ -1225,6 +1338,7 @@ unsigned long do_mmap_pgoff(struct file *file, unsigned long addr,
                locked += mm->locked_vm;
                lock_limit = rlimit(RLIMIT_MEMLOCK);
                lock_limit >>= PAGE_SHIFT;
@@ -81982,17 +81357,17 @@ index 8832b87..04240d1 100644
                if (locked > lock_limit && !capable(CAP_IPC_LOCK))
                        return -EAGAIN;
        }
-@@ -1279,6 +1393,9 @@ unsigned long do_mmap_pgoff(struct file *file, unsigned long addr,
-               }
+@@ -1305,6 +1419,9 @@ unsigned long do_mmap_pgoff(struct file *file, unsigned long addr,
+                       vm_flags |= VM_NORESERVE;
        }
  
 +      if (!gr_acl_handle_mmap(file, prot))
 +              return -EACCES;
-+
-       return mmap_region(file, addr, len, flags, vm_flags, pgoff);
- }
-@@ -1356,7 +1473,7 @@ int vma_wants_writenotify(struct vm_area_struct *vma)
++      
+       addr = mmap_region(file, addr, len, vm_flags, pgoff);
+       if (!IS_ERR_VALUE(addr) &&
+           ((vm_flags & VM_LOCKED) ||
+@@ -1396,7 +1513,7 @@ int vma_wants_writenotify(struct vm_area_struct *vma)
        vm_flags_t vm_flags = vma->vm_flags;
  
        /* If it was private or non-writable, the write bit is already clear */
@@ -82001,9 +81376,9 @@ index 8832b87..04240d1 100644
                return 0;
  
        /* The backer wishes to know when pages are first written to? */
-@@ -1405,16 +1522,30 @@ unsigned long mmap_region(struct file *file, unsigned long addr,
+@@ -1444,16 +1561,30 @@ unsigned long mmap_region(struct file *file, unsigned long addr,
        unsigned long charged = 0;
-       struct inode *inode =  file ? file->f_path.dentry->d_inode : NULL;
+       struct inode *inode =  file ? file_inode(file) : NULL;
  
 +#ifdef CONFIG_PAX_SEGMEXEC
 +      struct vm_area_struct *vma_m = NULL;
@@ -82034,7 +81409,7 @@ index 8832b87..04240d1 100644
        if (!may_expand_vm(mm, len >> PAGE_SHIFT))
                return -ENOMEM;
  
-@@ -1460,6 +1591,16 @@ munmap_back:
+@@ -1485,6 +1616,16 @@ munmap_back:
                goto unacct_error;
        }
  
@@ -82051,7 +81426,7 @@ index 8832b87..04240d1 100644
        vma->vm_mm = mm;
        vma->vm_start = addr;
        vma->vm_end = addr + len;
-@@ -1484,6 +1625,13 @@ munmap_back:
+@@ -1509,6 +1650,13 @@ munmap_back:
                if (error)
                        goto unmap_and_free_vma;
  
@@ -82065,7 +81440,7 @@ index 8832b87..04240d1 100644
                /* Can addr have changed??
                 *
                 * Answer: Yes, several device drivers can do it in their
-@@ -1522,6 +1670,11 @@ munmap_back:
+@@ -1547,6 +1695,11 @@ munmap_back:
        vma_link(mm, vma, prev, rb_link, rb_parent);
        file = vma->vm_file;
  
@@ -82077,15 +81452,15 @@ index 8832b87..04240d1 100644
        /* Once vma denies write, undo our temporary denial count */
        if (correct_wcount)
                atomic_inc(&inode->i_writecount);
-@@ -1529,6 +1682,7 @@ out:
+@@ -1554,6 +1707,7 @@ out:
        perf_event_mmap(vma);
  
        vm_stat_account(mm, vm_flags, file, len >> PAGE_SHIFT);
 +      track_exec_limit(mm, addr, addr + len, vm_flags);
        if (vm_flags & VM_LOCKED) {
-               if (!mlock_vma_pages_range(vma, addr, addr + len))
-                       mm->locked_vm += (len >> PAGE_SHIFT);
-@@ -1550,6 +1704,12 @@ unmap_and_free_vma:
+               if (!((vm_flags & VM_SPECIAL) || is_vm_hugetlb_page(vma) ||
+                                       vma == get_gate_vma(current->mm)))
+@@ -1577,6 +1731,12 @@ unmap_and_free_vma:
        unmap_region(mm, vma, prev, vma->vm_start, vma->vm_end);
        charged = 0;
  free_vma:
@@ -82098,7 +81473,7 @@ index 8832b87..04240d1 100644
        kmem_cache_free(vm_area_cachep, vma);
  unacct_error:
        if (charged)
-@@ -1557,6 +1717,62 @@ unacct_error:
+@@ -1584,6 +1744,62 @@ unacct_error:
        return error;
  }
  
@@ -82161,7 +81536,7 @@ index 8832b87..04240d1 100644
  unsigned long unmapped_area(struct vm_unmapped_area_info *info)
  {
        /*
-@@ -1776,6 +1992,7 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
+@@ -1803,6 +2019,7 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
        struct mm_struct *mm = current->mm;
        struct vm_area_struct *vma;
        struct vm_unmapped_area_info info;
@@ -82169,7 +81544,7 @@ index 8832b87..04240d1 100644
  
        if (len > TASK_SIZE)
                return -ENOMEM;
-@@ -1783,17 +2000,26 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
+@@ -1810,29 +2027,45 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
        if (flags & MAP_FIXED)
                return addr;
  
@@ -82197,8 +81572,10 @@ index 8832b87..04240d1 100644
 +
        info.high_limit = TASK_SIZE;
        info.align_mask = 0;
++      info.threadstack_offset = offset;
        return vm_unmapped_area(&info);
-@@ -1802,10 +2028,16 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
+ }
+ #endif        
  
  void arch_unmap_area(struct mm_struct *mm, unsigned long addr)
  {
@@ -82216,7 +81593,7 @@ index 8832b87..04240d1 100644
                mm->free_area_cache = addr;
  }
  
-@@ -1823,6 +2055,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
+@@ -1850,6 +2083,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
        struct mm_struct *mm = current->mm;
        unsigned long addr = addr0;
        struct vm_unmapped_area_info info;
@@ -82224,7 +81601,7 @@ index 8832b87..04240d1 100644
  
        /* requested length too big for entire address space */
        if (len > TASK_SIZE)
-@@ -1831,12 +2064,15 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
+@@ -1858,12 +2092,15 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
        if (flags & MAP_FIXED)
                return addr;
  
@@ -82242,7 +81619,15 @@ index 8832b87..04240d1 100644
                        return addr;
        }
  
-@@ -1857,6 +2093,12 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
+@@ -1872,6 +2109,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
+       info.low_limit = PAGE_SIZE;
+       info.high_limit = mm->mmap_base;
+       info.align_mask = 0;
++      info.threadstack_offset = offset;
+       addr = vm_unmapped_area(&info);
+       /*
+@@ -1884,6 +2122,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;
@@ -82255,7 +81640,7 @@ index 8832b87..04240d1 100644
                info.high_limit = TASK_SIZE;
                addr = vm_unmapped_area(&info);
        }
-@@ -1867,6 +2109,12 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
+@@ -1894,6 +2138,12 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
  
  void arch_unmap_area_topdown(struct mm_struct *mm, unsigned long addr)
  {
@@ -82268,7 +81653,7 @@ index 8832b87..04240d1 100644
        /*
         * Is this a new hole at the highest possible address?
         */
-@@ -1874,8 +2122,10 @@ void arch_unmap_area_topdown(struct mm_struct *mm, unsigned long addr)
+@@ -1901,8 +2151,10 @@ void arch_unmap_area_topdown(struct mm_struct *mm, unsigned long addr)
                mm->free_area_cache = addr;
  
        /* dont allow allocations above current base */
@@ -82280,16 +81665,7 @@ index 8832b87..04240d1 100644
  }
  
  unsigned long
-@@ -1922,7 +2172,7 @@ struct vm_area_struct *find_vma(struct mm_struct *mm, unsigned long addr)
-       /* Check the cache first. */
-       /* (Cache hit rate is typically around 35%.) */
--      vma = mm->mmap_cache;
-+      vma = ACCESS_ONCE(mm->mmap_cache);
-       if (!(vma && vma->vm_end > addr && vma->vm_start <= addr)) {
-               struct rb_node *rb_node;
-@@ -1974,6 +2224,28 @@ find_vma_prev(struct mm_struct *mm, unsigned long addr,
+@@ -2001,6 +2253,28 @@ find_vma_prev(struct mm_struct *mm, unsigned long addr,
        return vma;
  }
  
@@ -82318,7 +81694,7 @@ index 8832b87..04240d1 100644
  /*
   * Verify that the stack growth is acceptable and
   * update accounting. This is shared with both the
-@@ -1990,6 +2262,7 @@ static int acct_stack_growth(struct vm_area_struct *vma, unsigned long size, uns
+@@ -2017,6 +2291,7 @@ static int acct_stack_growth(struct vm_area_struct *vma, unsigned long size, uns
                return -ENOMEM;
  
        /* Stack limit test */
@@ -82326,7 +81702,7 @@ index 8832b87..04240d1 100644
        if (size > ACCESS_ONCE(rlim[RLIMIT_STACK].rlim_cur))
                return -ENOMEM;
  
-@@ -2000,6 +2273,7 @@ static int acct_stack_growth(struct vm_area_struct *vma, unsigned long size, uns
+@@ -2027,6 +2302,7 @@ static int acct_stack_growth(struct vm_area_struct *vma, unsigned long size, uns
                locked = mm->locked_vm + grow;
                limit = ACCESS_ONCE(rlim[RLIMIT_MEMLOCK].rlim_cur);
                limit >>= PAGE_SHIFT;
@@ -82334,7 +81710,7 @@ index 8832b87..04240d1 100644
                if (locked > limit && !capable(CAP_IPC_LOCK))
                        return -ENOMEM;
        }
-@@ -2029,37 +2303,48 @@ static int acct_stack_growth(struct vm_area_struct *vma, unsigned long size, uns
+@@ -2056,37 +2332,48 @@ static int acct_stack_growth(struct vm_area_struct *vma, unsigned long size, uns
   * PA-RISC uses this for its stack; IA64 for its Register Backing Store.
   * vma is the last one with address > vma->vm_end.  Have to extend vma.
   */
@@ -82392,7 +81768,7 @@ index 8832b87..04240d1 100644
                unsigned long size, grow;
  
                size = address - vma->vm_start;
-@@ -2094,6 +2379,8 @@ int expand_upwards(struct vm_area_struct *vma, unsigned long address)
+@@ -2121,6 +2408,8 @@ int expand_upwards(struct vm_area_struct *vma, unsigned long address)
                        }
                }
        }
@@ -82401,7 +81777,7 @@ index 8832b87..04240d1 100644
        vma_unlock_anon_vma(vma);
        khugepaged_enter_vma_merge(vma);
        validate_mm(vma->vm_mm);
-@@ -2108,6 +2395,8 @@ int expand_downwards(struct vm_area_struct *vma,
+@@ -2135,6 +2424,8 @@ int expand_downwards(struct vm_area_struct *vma,
                                   unsigned long address)
  {
        int error;
@@ -82410,7 +81786,7 @@ index 8832b87..04240d1 100644
  
        /*
         * We must make sure the anon_vma is allocated
-@@ -2121,6 +2410,15 @@ int expand_downwards(struct vm_area_struct *vma,
+@@ -2148,6 +2439,15 @@ int expand_downwards(struct vm_area_struct *vma,
        if (error)
                return error;
  
@@ -82426,7 +81802,7 @@ index 8832b87..04240d1 100644
        vma_lock_anon_vma(vma);
  
        /*
-@@ -2130,9 +2428,17 @@ int expand_downwards(struct vm_area_struct *vma,
+@@ -2157,9 +2457,17 @@ int expand_downwards(struct vm_area_struct *vma,
         */
  
        /* Somebody else might have raced and expanded it already */
@@ -82445,7 +81821,7 @@ index 8832b87..04240d1 100644
                size = vma->vm_end - address;
                grow = (vma->vm_start - address) >> PAGE_SHIFT;
  
-@@ -2157,6 +2463,18 @@ int expand_downwards(struct vm_area_struct *vma,
+@@ -2184,6 +2492,18 @@ int expand_downwards(struct vm_area_struct *vma,
                                vma->vm_pgoff -= grow;
                                anon_vma_interval_tree_post_update_vma(vma);
                                vma_gap_update(vma);
@@ -82464,7 +81840,7 @@ index 8832b87..04240d1 100644
                                spin_unlock(&vma->vm_mm->page_table_lock);
  
                                perf_event_mmap(vma);
-@@ -2263,6 +2581,13 @@ static void remove_vma_list(struct mm_struct *mm, struct vm_area_struct *vma)
+@@ -2288,6 +2608,13 @@ static void remove_vma_list(struct mm_struct *mm, struct vm_area_struct *vma)
        do {
                long nrpages = vma_pages(vma);
  
@@ -82478,7 +81854,7 @@ index 8832b87..04240d1 100644
                if (vma->vm_flags & VM_ACCOUNT)
                        nr_accounted += nrpages;
                vm_stat_account(mm, vma->vm_flags, vma->vm_file, -nrpages);
-@@ -2308,6 +2633,16 @@ detach_vmas_to_be_unmapped(struct mm_struct *mm, struct vm_area_struct *vma,
+@@ -2333,6 +2660,16 @@ detach_vmas_to_be_unmapped(struct mm_struct *mm, struct vm_area_struct *vma,
        insertion_point = (prev ? &prev->vm_next : &mm->mmap);
        vma->vm_prev = NULL;
        do {
@@ -82495,7 +81871,7 @@ index 8832b87..04240d1 100644
                vma_rb_erase(vma, &mm->mm_rb);
                mm->map_count--;
                tail_vma = vma;
-@@ -2339,14 +2674,33 @@ static int __split_vma(struct mm_struct * mm, struct vm_area_struct * vma,
+@@ -2364,14 +2701,33 @@ static int __split_vma(struct mm_struct * mm, struct vm_area_struct * vma,
        struct vm_area_struct *new;
        int err = -ENOMEM;
  
@@ -82529,7 +81905,7 @@ index 8832b87..04240d1 100644
        /* most fields are the same, copy all, and then fixup */
        *new = *vma;
  
-@@ -2359,6 +2713,22 @@ static int __split_vma(struct mm_struct * mm, struct vm_area_struct * vma,
+@@ -2384,6 +2740,22 @@ static int __split_vma(struct mm_struct * mm, struct vm_area_struct * vma,
                new->vm_pgoff += ((addr - vma->vm_start) >> PAGE_SHIFT);
        }
  
@@ -82552,7 +81928,7 @@ index 8832b87..04240d1 100644
        pol = mpol_dup(vma_policy(vma));
        if (IS_ERR(pol)) {
                err = PTR_ERR(pol);
-@@ -2381,6 +2751,36 @@ static int __split_vma(struct mm_struct * mm, struct vm_area_struct * vma,
+@@ -2406,6 +2778,36 @@ static int __split_vma(struct mm_struct * mm, struct vm_area_struct * vma,
        else
                err = vma_adjust(vma, vma->vm_start, addr, vma->vm_pgoff, new);
  
@@ -82589,7 +81965,7 @@ index 8832b87..04240d1 100644
        /* Success. */
        if (!err)
                return 0;
-@@ -2390,10 +2790,18 @@ static int __split_vma(struct mm_struct * mm, struct vm_area_struct * vma,
+@@ -2415,10 +2817,18 @@ static int __split_vma(struct mm_struct * mm, struct vm_area_struct * vma,
                new->vm_ops->close(new);
        if (new->vm_file)
                fput(new->vm_file);
@@ -82609,7 +81985,7 @@ index 8832b87..04240d1 100644
        kmem_cache_free(vm_area_cachep, new);
   out_err:
        return err;
-@@ -2406,6 +2814,15 @@ static int __split_vma(struct mm_struct * mm, struct vm_area_struct * vma,
+@@ -2431,6 +2841,15 @@ static int __split_vma(struct mm_struct * mm, struct vm_area_struct * vma,
  int split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
              unsigned long addr, int new_below)
  {
@@ -82625,7 +82001,7 @@ index 8832b87..04240d1 100644
        if (mm->map_count >= sysctl_max_map_count)
                return -ENOMEM;
  
-@@ -2417,11 +2834,30 @@ int split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
+@@ -2442,11 +2861,30 @@ int split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
   * work.  This now handles partial unmappings.
   * Jeremy Fitzhardinge <jeremy@goop.org>
   */
@@ -82656,7 +82032,7 @@ index 8832b87..04240d1 100644
        if ((start & ~PAGE_MASK) || start > TASK_SIZE || len > TASK_SIZE-start)
                return -EINVAL;
  
-@@ -2496,6 +2932,8 @@ int do_munmap(struct mm_struct *mm, unsigned long start, size_t len)
+@@ -2521,6 +2959,8 @@ int do_munmap(struct mm_struct *mm, unsigned long start, size_t len)
        /* Fix up all other VM information */
        remove_vma_list(mm, vma);
  
@@ -82665,7 +82041,7 @@ index 8832b87..04240d1 100644
        return 0;
  }
  
-@@ -2504,6 +2942,13 @@ int vm_munmap(unsigned long start, size_t len)
+@@ -2529,6 +2969,13 @@ int vm_munmap(unsigned long start, size_t len)
        int ret;
        struct mm_struct *mm = current->mm;
  
@@ -82679,7 +82055,7 @@ index 8832b87..04240d1 100644
        down_write(&mm->mmap_sem);
        ret = do_munmap(mm, start, len);
        up_write(&mm->mmap_sem);
-@@ -2517,16 +2962,6 @@ SYSCALL_DEFINE2(munmap, unsigned long, addr, size_t, len)
+@@ -2542,16 +2989,6 @@ SYSCALL_DEFINE2(munmap, unsigned long, addr, size_t, len)
        return vm_munmap(addr, len);
  }
  
@@ -82696,7 +82072,7 @@ index 8832b87..04240d1 100644
  /*
   *  this is really a simplified "do_mmap".  it only handles
   *  anonymous maps.  eventually we may be able to do some
-@@ -2540,6 +2975,7 @@ static unsigned long do_brk(unsigned long addr, unsigned long len)
+@@ -2565,6 +3002,7 @@ static unsigned long do_brk(unsigned long addr, unsigned long len)
        struct rb_node ** rb_link, * rb_parent;
        pgoff_t pgoff = addr >> PAGE_SHIFT;
        int error;
@@ -82704,7 +82080,7 @@ index 8832b87..04240d1 100644
  
        len = PAGE_ALIGN(len);
        if (!len)
-@@ -2547,16 +2983,30 @@ static unsigned long do_brk(unsigned long addr, unsigned long len)
+@@ -2572,16 +3010,30 @@ static unsigned long do_brk(unsigned long addr, unsigned long len)
  
        flags = VM_DATA_DEFAULT_FLAGS | VM_ACCOUNT | mm->def_flags;
  
@@ -82736,7 +82112,7 @@ index 8832b87..04240d1 100644
                locked += mm->locked_vm;
                lock_limit = rlimit(RLIMIT_MEMLOCK);
                lock_limit >>= PAGE_SHIFT;
-@@ -2573,21 +3023,20 @@ static unsigned long do_brk(unsigned long addr, unsigned long len)
+@@ -2598,21 +3050,20 @@ static unsigned long do_brk(unsigned long addr, unsigned long len)
        /*
         * Clear old maps.  this also does some error checking for us
         */
@@ -82761,7 +82137,7 @@ index 8832b87..04240d1 100644
                return -ENOMEM;
  
        /* Can we just expand an old private anonymous mapping? */
-@@ -2601,7 +3050,7 @@ static unsigned long do_brk(unsigned long addr, unsigned long len)
+@@ -2626,7 +3077,7 @@ static unsigned long do_brk(unsigned long addr, unsigned long len)
         */
        vma = kmem_cache_zalloc(vm_area_cachep, GFP_KERNEL);
        if (!vma) {
@@ -82770,22 +82146,20 @@ index 8832b87..04240d1 100644
                return -ENOMEM;
        }
  
-@@ -2615,11 +3064,12 @@ static unsigned long do_brk(unsigned long addr, unsigned long len)
+@@ -2640,9 +3091,10 @@ static unsigned long do_brk(unsigned long addr, unsigned long len)
        vma_link(mm, vma, prev, rb_link, rb_parent);
  out:
        perf_event_mmap(vma);
 -      mm->total_vm += len >> PAGE_SHIFT;
 +      mm->total_vm += charged;
-       if (flags & VM_LOCKED) {
-               if (!mlock_vma_pages_range(vma, addr, addr + len))
--                      mm->locked_vm += (len >> PAGE_SHIFT);
-+                      mm->locked_vm += charged;
-       }
+       if (flags & VM_LOCKED)
+-              mm->locked_vm += (len >> PAGE_SHIFT);
++              mm->locked_vm += charged;
 +      track_exec_limit(mm, addr, addr + len, flags);
        return addr;
  }
  
-@@ -2677,6 +3127,7 @@ void exit_mmap(struct mm_struct *mm)
+@@ -2704,6 +3156,7 @@ void exit_mmap(struct mm_struct *mm)
        while (vma) {
                if (vma->vm_flags & VM_ACCOUNT)
                        nr_accounted += vma_pages(vma);
@@ -82793,7 +82167,7 @@ index 8832b87..04240d1 100644
                vma = remove_vma(vma);
        }
        vm_unacct_memory(nr_accounted);
-@@ -2693,6 +3144,13 @@ int insert_vm_struct(struct mm_struct *mm, struct vm_area_struct *vma)
+@@ -2720,6 +3173,13 @@ int insert_vm_struct(struct mm_struct *mm, struct vm_area_struct *vma)
        struct vm_area_struct *prev;
        struct rb_node **rb_link, *rb_parent;
  
@@ -82807,7 +82181,7 @@ index 8832b87..04240d1 100644
        /*
         * The vm_pgoff of a purely anonymous vma should be irrelevant
         * until its first write fault, when page's anon_vma and index
-@@ -2716,7 +3174,21 @@ int insert_vm_struct(struct mm_struct *mm, struct vm_area_struct *vma)
+@@ -2743,7 +3203,21 @@ int insert_vm_struct(struct mm_struct *mm, struct vm_area_struct *vma)
             security_vm_enough_memory_mm(mm, vma_pages(vma)))
                return -ENOMEM;
  
@@ -82829,7 +82203,7 @@ index 8832b87..04240d1 100644
        return 0;
  }
  
-@@ -2736,6 +3208,8 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap,
+@@ -2763,6 +3237,8 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap,
        struct mempolicy *pol;
        bool faulted_in_anon_vma = true;
  
@@ -82838,7 +82212,7 @@ index 8832b87..04240d1 100644
        /*
         * If anonymous vma has not yet been faulted, update new pgoff
         * to match new location, to increase its chance of merging.
-@@ -2802,6 +3276,39 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap,
+@@ -2829,6 +3305,39 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap,
        return NULL;
  }
  
@@ -82878,7 +82252,7 @@ index 8832b87..04240d1 100644
  /*
   * Return true if the calling process may expand its vm space by the passed
   * number of pages
-@@ -2813,6 +3320,7 @@ int may_expand_vm(struct mm_struct *mm, unsigned long npages)
+@@ -2840,6 +3349,7 @@ int may_expand_vm(struct mm_struct *mm, unsigned long npages)
  
        lim = rlimit(RLIMIT_AS) >> PAGE_SHIFT;
  
@@ -82886,7 +82260,7 @@ index 8832b87..04240d1 100644
        if (cur + npages > lim)
                return 0;
        return 1;
-@@ -2883,6 +3391,22 @@ int install_special_mapping(struct mm_struct *mm,
+@@ -2910,6 +3420,22 @@ int install_special_mapping(struct mm_struct *mm,
        vma->vm_start = addr;
        vma->vm_end = addr + len;
  
@@ -82910,13 +82284,14 @@ index 8832b87..04240d1 100644
        vma->vm_page_prot = vm_get_page_prot(vma->vm_flags);
  
 diff --git a/mm/mprotect.c b/mm/mprotect.c
-index 94722a4..9837984 100644
+index 94722a4..07d9926 100644
 --- a/mm/mprotect.c
 +++ b/mm/mprotect.c
-@@ -23,10 +23,17 @@
+@@ -23,10 +23,18 @@
  #include <linux/mmu_notifier.h>
  #include <linux/migrate.h>
  #include <linux/perf_event.h>
++#include <linux/sched/sysctl.h>
 +
 +#ifdef CONFIG_PAX_MPROTECT
 +#include <linux/elf.h>
@@ -82931,7 +82306,7 @@ index 94722a4..9837984 100644
  
  #ifndef pgprot_modify
  static inline pgprot_t pgprot_modify(pgprot_t oldprot, pgprot_t newprot)
-@@ -233,6 +240,48 @@ unsigned long change_protection(struct vm_area_struct *vma, unsigned long start,
+@@ -233,6 +241,48 @@ unsigned long change_protection(struct vm_area_struct *vma, unsigned long start,
        return pages;
  }
  
@@ -82980,7 +82355,7 @@ index 94722a4..9837984 100644
  int
  mprotect_fixup(struct vm_area_struct *vma, struct vm_area_struct **pprev,
        unsigned long start, unsigned long end, unsigned long newflags)
-@@ -245,11 +294,29 @@ mprotect_fixup(struct vm_area_struct *vma, struct vm_area_struct **pprev,
+@@ -245,11 +295,29 @@ mprotect_fixup(struct vm_area_struct *vma, struct vm_area_struct **pprev,
        int error;
        int dirty_accountable = 0;
  
@@ -83010,7 +82385,7 @@ index 94722a4..9837984 100644
        /*
         * If we make a private mapping writable we increase our commit;
         * but (without finer accounting) cannot reduce our commit if we
-@@ -266,6 +333,42 @@ mprotect_fixup(struct vm_area_struct *vma, struct vm_area_struct **pprev,
+@@ -266,6 +334,42 @@ mprotect_fixup(struct vm_area_struct *vma, struct vm_area_struct **pprev,
                }
        }
  
@@ -83053,7 +82428,7 @@ index 94722a4..9837984 100644
        /*
         * First try to merge with previous and/or next vma.
         */
-@@ -296,9 +399,21 @@ success:
+@@ -296,9 +400,21 @@ success:
         * vm_flags and vm_page_prot are protected by the mmap_sem
         * held in write mode.
         */
@@ -83076,7 +82451,7 @@ index 94722a4..9837984 100644
  
        if (vma_wants_writenotify(vma)) {
                vma->vm_page_prot = vm_get_page_prot(newflags & ~VM_SHARED);
-@@ -337,6 +452,17 @@ SYSCALL_DEFINE3(mprotect, unsigned long, start, size_t, len,
+@@ -337,6 +453,17 @@ SYSCALL_DEFINE3(mprotect, unsigned long, start, size_t, len,
        end = start + len;
        if (end <= start)
                return -ENOMEM;
@@ -83094,7 +82469,7 @@ index 94722a4..9837984 100644
        if (!arch_validate_prot(prot))
                return -EINVAL;
  
-@@ -344,7 +470,7 @@ SYSCALL_DEFINE3(mprotect, unsigned long, start, size_t, len,
+@@ -344,7 +471,7 @@ SYSCALL_DEFINE3(mprotect, unsigned long, start, size_t, len,
        /*
         * Does the application expect PROT_READ to imply PROT_EXEC:
         */
@@ -83103,7 +82478,7 @@ index 94722a4..9837984 100644
                prot |= PROT_EXEC;
  
        vm_flags = calc_vm_prot_bits(prot);
-@@ -376,6 +502,11 @@ SYSCALL_DEFINE3(mprotect, unsigned long, start, size_t, len,
+@@ -376,6 +503,11 @@ SYSCALL_DEFINE3(mprotect, unsigned long, start, size_t, len,
        if (start > vma->vm_start)
                prev = vma;
  
@@ -83115,7 +82490,7 @@ index 94722a4..9837984 100644
        for (nstart = start ; ; ) {
                unsigned long newflags;
  
-@@ -386,6 +517,14 @@ SYSCALL_DEFINE3(mprotect, unsigned long, start, size_t, len,
+@@ -386,6 +518,14 @@ SYSCALL_DEFINE3(mprotect, unsigned long, start, size_t, len,
  
                /* newflags >> 4 shift VM_MAY% in place of VM_% */
                if ((newflags & ~(newflags >> 4)) & (VM_READ | VM_WRITE | VM_EXEC)) {
@@ -83130,7 +82505,7 @@ index 94722a4..9837984 100644
                        error = -EACCES;
                        goto out;
                }
-@@ -400,6 +539,9 @@ SYSCALL_DEFINE3(mprotect, unsigned long, start, size_t, len,
+@@ -400,6 +540,9 @@ SYSCALL_DEFINE3(mprotect, unsigned long, start, size_t, len,
                error = mprotect_fixup(vma, &prev, nstart, tmp, newflags);
                if (error)
                        goto out;
@@ -83141,10 +82516,10 @@ index 94722a4..9837984 100644
  
                if (nstart < prev->vm_end)
 diff --git a/mm/mremap.c b/mm/mremap.c
-index e1031e1..1f2a0a1 100644
+index 463a257..c0c7a92 100644
 --- a/mm/mremap.c
 +++ b/mm/mremap.c
-@@ -125,6 +125,12 @@ static void move_ptes(struct vm_area_struct *vma, pmd_t *old_pmd,
+@@ -126,6 +126,12 @@ static void move_ptes(struct vm_area_struct *vma, pmd_t *old_pmd,
                        continue;
                pte = ptep_get_and_clear(mm, old_addr, old_pte);
                pte = move_pte(pte, new_vma->vm_page_prot, old_addr, new_addr);
@@ -83157,7 +82532,7 @@ index e1031e1..1f2a0a1 100644
                set_pte_at(mm, new_addr, new_pte, pte);
        }
  
-@@ -319,6 +325,11 @@ static struct vm_area_struct *vma_to_resize(unsigned long addr,
+@@ -318,6 +324,11 @@ static struct vm_area_struct *vma_to_resize(unsigned long addr,
        if (is_vm_hugetlb_page(vma))
                goto Einval;
  
@@ -83169,7 +82544,7 @@ index e1031e1..1f2a0a1 100644
        /* We can't remap across vm area boundaries */
        if (old_len > vma->vm_end - addr)
                goto Efault;
-@@ -375,20 +386,25 @@ static unsigned long mremap_to(unsigned long addr,
+@@ -373,20 +384,25 @@ static unsigned long mremap_to(unsigned long addr, unsigned long old_len,
        unsigned long ret = -EINVAL;
        unsigned long charged = 0;
        unsigned long map_flags;
@@ -83200,15 +82575,15 @@ index e1031e1..1f2a0a1 100644
                goto out;
  
        ret = do_munmap(mm, new_addr, new_len);
-@@ -456,6 +472,7 @@ SYSCALL_DEFINE5(mremap, unsigned long, addr, unsigned long, old_len,
-       struct vm_area_struct *vma;
+@@ -455,6 +471,7 @@ SYSCALL_DEFINE5(mremap, unsigned long, addr, unsigned long, old_len,
        unsigned long ret = -EINVAL;
        unsigned long charged = 0;
+       bool locked = false;
 +      unsigned long pax_task_size = TASK_SIZE;
  
        down_write(&current->mm->mmap_sem);
  
-@@ -476,6 +493,17 @@ SYSCALL_DEFINE5(mremap, unsigned long, addr, unsigned long, old_len,
+@@ -475,6 +492,17 @@ SYSCALL_DEFINE5(mremap, unsigned long, addr, unsigned long, old_len,
        if (!new_len)
                goto out;
  
@@ -83225,9 +82600,9 @@ index e1031e1..1f2a0a1 100644
 +
        if (flags & MREMAP_FIXED) {
                if (flags & MREMAP_MAYMOVE)
-                       ret = mremap_to(addr, old_len, new_addr, new_len);
+                       ret = mremap_to(addr, old_len, new_addr, new_len,
 @@ -524,6 +552,7 @@ SYSCALL_DEFINE5(mremap, unsigned long, addr, unsigned long, old_len,
-                                                  addr + new_len);
+                               new_addr = addr;
                        }
                        ret = addr;
 +                      track_exec_limit(vma->vm_mm, vma->vm_start, addr + new_len, vma->vm_flags);
@@ -83239,7 +82614,7 @@ index e1031e1..1f2a0a1 100644
                }
  
 +              map_flags = vma->vm_flags;
-               ret = move_vma(vma, addr, old_len, new_len, new_addr);
+               ret = move_vma(vma, addr, old_len, new_len, new_addr, &locked);
 +              if (!(ret & ~PAGE_MASK)) {
 +                      track_exec_limit(current->mm, addr, addr + old_len, 0UL);
 +                      track_exec_limit(current->mm, new_addr, new_addr + new_len, map_flags);
@@ -83248,10 +82623,10 @@ index e1031e1..1f2a0a1 100644
  out:
        if (ret & ~PAGE_MASK)
 diff --git a/mm/nommu.c b/mm/nommu.c
-index 79c3cac..b2601ea 100644
+index e001768..9b52b30 100644
 --- a/mm/nommu.c
 +++ b/mm/nommu.c
-@@ -62,7 +62,6 @@ int sysctl_overcommit_memory = OVERCOMMIT_GUESS; /* heuristic overcommit */
+@@ -63,7 +63,6 @@ int sysctl_overcommit_memory = OVERCOMMIT_GUESS; /* heuristic overcommit */
  int sysctl_overcommit_ratio = 50; /* default is 50% */
  int sysctl_max_map_count = DEFAULT_MAX_MAP_COUNT;
  int sysctl_nr_trim_pages = CONFIG_NOMMU_INITIAL_TRIM_EXCESS;
@@ -83259,16 +82634,7 @@ index 79c3cac..b2601ea 100644
  
  atomic_long_t mmap_pages_allocated;
  
-@@ -819,7 +818,7 @@ struct vm_area_struct *find_vma(struct mm_struct *mm, unsigned long addr)
-       struct vm_area_struct *vma;
-       /* check the cache first */
--      vma = mm->mmap_cache;
-+      vma = ACCESS_ONCE(mm->mmap_cache);
-       if (vma && vma->vm_start <= addr && vma->vm_end > addr)
-               return vma;
-@@ -839,15 +838,6 @@ struct vm_area_struct *find_vma(struct mm_struct *mm, unsigned long addr)
+@@ -841,15 +840,6 @@ struct vm_area_struct *find_vma(struct mm_struct *mm, unsigned long addr)
  EXPORT_SYMBOL(find_vma);
  
  /*
@@ -83284,7 +82650,7 @@ index 79c3cac..b2601ea 100644
   * expand a stack to a given address
   * - not supported under NOMMU conditions
   */
-@@ -1555,6 +1545,7 @@ int split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
+@@ -1560,6 +1550,7 @@ int split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
  
        /* most fields are the same, copy all, and then fixup */
        *new = *vma;
@@ -83292,7 +82658,7 @@ index 79c3cac..b2601ea 100644
        *region = *vma->vm_region;
        new->vm_region = region;
  
-@@ -1975,8 +1966,8 @@ int generic_file_remap_pages(struct vm_area_struct *vma, unsigned long addr,
+@@ -1992,8 +1983,8 @@ int generic_file_remap_pages(struct vm_area_struct *vma, unsigned long addr,
  }
  EXPORT_SYMBOL(generic_file_remap_pages);
  
@@ -83303,7 +82669,7 @@ index 79c3cac..b2601ea 100644
  {
        struct vm_area_struct *vma;
  
-@@ -2017,8 +2008,8 @@ static int __access_remote_vm(struct task_struct *tsk, struct mm_struct *mm,
+@@ -2034,8 +2025,8 @@ static int __access_remote_vm(struct task_struct *tsk, struct mm_struct *mm,
   *
   * The caller must hold a reference on @mm.
   */
@@ -83314,7 +82680,7 @@ index 79c3cac..b2601ea 100644
  {
        return __access_remote_vm(NULL, mm, addr, buf, len, write);
  }
-@@ -2027,7 +2018,7 @@ int access_remote_vm(struct mm_struct *mm, unsigned long addr,
+@@ -2044,7 +2035,7 @@ int access_remote_vm(struct mm_struct *mm, unsigned long addr,
   * Access another process' address space.
   * - source/target buffer must be kernel space
   */
@@ -83324,10 +82690,10 @@ index 79c3cac..b2601ea 100644
        struct mm_struct *mm;
  
 diff --git a/mm/page-writeback.c b/mm/page-writeback.c
-index 0713bfb..b95bb87 100644
+index efe6814..64b4701 100644
 --- a/mm/page-writeback.c
 +++ b/mm/page-writeback.c
-@@ -655,7 +655,7 @@ unsigned long bdi_dirty_limit(struct backing_dev_info *bdi, unsigned long dirty)
+@@ -659,7 +659,7 @@ unsigned long bdi_dirty_limit(struct backing_dev_info *bdi, unsigned long dirty)
   *   card's bdi_dirty may rush to many times higher than bdi_setpoint.
   * - the bdi dirty thresh drops quickly due to change of JBOD workload
   */
@@ -83336,7 +82702,7 @@ index 0713bfb..b95bb87 100644
                                        unsigned long thresh,
                                        unsigned long bg_thresh,
                                        unsigned long dirty,
-@@ -1630,7 +1630,7 @@ ratelimit_handler(struct notifier_block *self, unsigned long action,
+@@ -1634,7 +1634,7 @@ ratelimit_handler(struct notifier_block *self, unsigned long action,
        }
  }
  
@@ -83346,18 +82712,18 @@ index 0713bfb..b95bb87 100644
        .next           = NULL,
  };
 diff --git a/mm/page_alloc.c b/mm/page_alloc.c
-index 6a83cd3..3ab04ef 100644
+index 8fcced7..ebcd481 100644
 --- a/mm/page_alloc.c
 +++ b/mm/page_alloc.c
-@@ -58,6 +58,7 @@
- #include <linux/prefetch.h>
+@@ -59,6 +59,7 @@
  #include <linux/migrate.h>
  #include <linux/page-debug-flags.h>
+ #include <linux/sched/rt.h>
 +#include <linux/random.h>
  
  #include <asm/tlbflush.h>
  #include <asm/div64.h>
-@@ -338,7 +339,7 @@ out:
+@@ -344,7 +345,7 @@ out:
   * This usage means that zero-order pages may not be compound.
   */
  
@@ -83366,7 +82732,7 @@ index 6a83cd3..3ab04ef 100644
  {
        __free_pages_ok(page, compound_order(page));
  }
-@@ -693,6 +694,10 @@ static bool free_pages_prepare(struct page *page, unsigned int order)
+@@ -701,6 +702,10 @@ static bool free_pages_prepare(struct page *page, unsigned int order)
        int i;
        int bad = 0;
  
@@ -83377,7 +82743,7 @@ index 6a83cd3..3ab04ef 100644
        trace_mm_page_free(page, order);
        kmemcheck_free_shadow(page, order);
  
-@@ -708,6 +713,12 @@ static bool free_pages_prepare(struct page *page, unsigned int order)
+@@ -716,6 +721,12 @@ static bool free_pages_prepare(struct page *page, unsigned int order)
                debug_check_no_obj_freed(page_address(page),
                                           PAGE_SIZE << order);
        }
@@ -83390,7 +82756,7 @@ index 6a83cd3..3ab04ef 100644
        arch_free_page(page, order);
        kernel_map_pages(page, 1 << order, 0);
  
-@@ -730,6 +741,19 @@ static void __free_pages_ok(struct page *page, unsigned int order)
+@@ -738,6 +749,19 @@ static void __free_pages_ok(struct page *page, unsigned int order)
        local_irq_restore(flags);
  }
  
@@ -83410,7 +82776,7 @@ index 6a83cd3..3ab04ef 100644
  /*
   * Read access to zone->managed_pages is safe because it's unsigned long,
   * but we still need to serialize writers. Currently all callers of
-@@ -752,6 +776,19 @@ void __meminit __free_pages_bootmem(struct page *page, unsigned int order)
+@@ -760,6 +784,19 @@ void __meminit __free_pages_bootmem(struct page *page, unsigned int order)
                set_page_count(p, 0);
        }
  
@@ -83430,7 +82796,7 @@ index 6a83cd3..3ab04ef 100644
        page_zone(page)->managed_pages += 1 << order;
        set_page_refcounted(page);
        __free_pages(page, order);
-@@ -861,8 +898,10 @@ static int prep_new_page(struct page *page, int order, gfp_t gfp_flags)
+@@ -869,8 +906,10 @@ static int prep_new_page(struct page *page, int order, gfp_t gfp_flags)
        arch_alloc_page(page, order);
        kernel_map_pages(page, 1 << order, 1);
  
@@ -83441,20 +82807,6 @@ index 6a83cd3..3ab04ef 100644
  
        if (order && (gfp_flags & __GFP_COMP))
                prep_compound_page(page, order);
-@@ -3752,7 +3791,13 @@ static int pageblock_is_reserved(unsigned long start_pfn, unsigned long end_pfn)
-       unsigned long pfn;
-       for (pfn = start_pfn; pfn < end_pfn; pfn++) {
-+#ifdef CONFIG_X86_32
-+              /* boot failures in VMware 8 on 32bit vanilla since
-+                 this change */
-+              if (!pfn_valid(pfn) || PageReserved(pfn_to_page(pfn)))
-+#else
-               if (!pfn_valid_within(pfn) || PageReserved(pfn_to_page(pfn)))
-+#endif
-                       return 1;
-       }
-       return 0;
 diff --git a/mm/percpu.c b/mm/percpu.c
 index 8c8e08f..73a5cda 100644
 --- a/mm/percpu.c
@@ -83520,7 +82872,7 @@ index fd26d04..0cea1b0 100644
        if (!mm || IS_ERR(mm)) {
                rc = IS_ERR(mm) ? PTR_ERR(mm) : -ESRCH;
 diff --git a/mm/rmap.c b/mm/rmap.c
-index 2c78f8c..9e9c624 100644
+index 807c96b..0e05279 100644
 --- a/mm/rmap.c
 +++ b/mm/rmap.c
 @@ -163,6 +163,10 @@ int anon_vma_prepare(struct vm_area_struct *vma)
@@ -83610,7 +82962,7 @@ index 2c78f8c..9e9c624 100644
        struct anon_vma_chain *avc;
        struct anon_vma *anon_vma;
 diff --git a/mm/shmem.c b/mm/shmem.c
-index efd0b3a..994b702 100644
+index 1c44af7..cefe9a6 100644
 --- a/mm/shmem.c
 +++ b/mm/shmem.c
 @@ -31,7 +31,7 @@
@@ -83631,7 +82983,7 @@ index efd0b3a..994b702 100644
  
  /*
   * shmem_fallocate and shmem_writepage communicate via inode->i_private
-@@ -2202,6 +2202,11 @@ static const struct xattr_handler *shmem_xattr_handlers[] = {
+@@ -2201,6 +2201,11 @@ static const struct xattr_handler *shmem_xattr_handlers[] = {
  static int shmem_xattr_validate(const char *name)
  {
        struct { const char *prefix; size_t len; } arr[] = {
@@ -83643,7 +82995,7 @@ index efd0b3a..994b702 100644
                { XATTR_SECURITY_PREFIX, XATTR_SECURITY_PREFIX_LEN },
                { XATTR_TRUSTED_PREFIX, XATTR_TRUSTED_PREFIX_LEN }
        };
-@@ -2257,6 +2262,15 @@ static int shmem_setxattr(struct dentry *dentry, const char *name,
+@@ -2256,6 +2261,15 @@ static int shmem_setxattr(struct dentry *dentry, const char *name,
        if (err)
                return err;
  
@@ -83659,7 +83011,7 @@ index efd0b3a..994b702 100644
        return simple_xattr_set(&info->xattrs, name, value, size, flags);
  }
  
-@@ -2562,8 +2576,7 @@ int shmem_fill_super(struct super_block *sb, void *data, int silent)
+@@ -2568,8 +2582,7 @@ int shmem_fill_super(struct super_block *sb, void *data, int silent)
        int err = -ENOMEM;
  
        /* Round up to L1_CACHE_BYTES to resist false sharing */
@@ -83670,7 +83022,7 @@ index efd0b3a..994b702 100644
                return -ENOMEM;
  
 diff --git a/mm/slab.c b/mm/slab.c
-index e7667a3..a48e73b 100644
+index 856e4a1..fafb820 100644
 --- a/mm/slab.c
 +++ b/mm/slab.c
 @@ -306,7 +306,7 @@ struct kmem_list3 {
@@ -83951,7 +83303,7 @@ index 3f3cd97..93b0236 100644
  }
  
 diff --git a/mm/slob.c b/mm/slob.c
-index a99fdf7..6ee34ec 100644
+index eeed4a0..6ee34ec 100644
 --- a/mm/slob.c
 +++ b/mm/slob.c
 @@ -157,7 +157,7 @@ static void set_slob(slob_t *s, slobidx_t size, slob_t *next)
@@ -84037,7 +83389,7 @@ index a99fdf7..6ee34ec 100644
                        clear_slob_page_free(sp);
                spin_unlock_irqrestore(&slob_lock, flags);
 -              __ClearPageSlab(sp);
--              reset_page_mapcount(sp);
+-              page_mapcount_reset(sp);
 -              slob_free_pages(b, 0);
 +              slob_free_pages(sp, 0);
                return;
@@ -84314,7 +83666,7 @@ index a99fdf7..6ee34ec 100644
  EXPORT_SYMBOL(kmem_cache_free);
  
 diff --git a/mm/slub.c b/mm/slub.c
-index ba2ca53..991c4f7 100644
+index 4aec537..a64753d 100644
 --- a/mm/slub.c
 +++ b/mm/slub.c
 @@ -197,7 +197,7 @@ struct track {
@@ -84605,20 +83957,20 @@ index 1b7e22a..3fcd4f3 100644
        return pgd;
  }
 diff --git a/mm/sparse.c b/mm/sparse.c
-index 6b5fb76..db0c190 100644
+index 7ca6dc8..6472aa1 100644
 --- a/mm/sparse.c
 +++ b/mm/sparse.c
-@@ -782,7 +782,7 @@ static void clear_hwpoisoned_pages(struct page *memmap, int nr_pages)
+@@ -783,7 +783,7 @@ static void clear_hwpoisoned_pages(struct page *memmap, int nr_pages)
  
        for (i = 0; i < PAGES_PER_SECTION; i++) {
                if (PageHWPoison(&memmap[i])) {
--                      atomic_long_sub(1, &mce_bad_pages);
-+                      atomic_long_sub_unchecked(1, &mce_bad_pages);
+-                      atomic_long_sub(1, &num_poisoned_pages);
++                      atomic_long_sub_unchecked(1, &num_poisoned_pages);
                        ClearPageHWPoison(&memmap[i]);
                }
        }
 diff --git a/mm/swap.c b/mm/swap.c
-index 6310dc2..3662b3f 100644
+index 8a529a0..154ef26 100644
 --- a/mm/swap.c
 +++ b/mm/swap.c
 @@ -30,6 +30,7 @@
@@ -84639,10 +83991,10 @@ index 6310dc2..3662b3f 100644
  }
  
 diff --git a/mm/swapfile.c b/mm/swapfile.c
-index e97a0e5..b50e796 100644
+index a1f7772..9e982ac 100644
 --- a/mm/swapfile.c
 +++ b/mm/swapfile.c
-@@ -64,7 +64,7 @@ static DEFINE_MUTEX(swapon_mutex);
+@@ -66,7 +66,7 @@ static DEFINE_MUTEX(swapon_mutex);
  
  static DECLARE_WAIT_QUEUE_HEAD(proc_poll_wait);
  /* Activity counter to indicate that a swapon or swapoff has occurred */
@@ -84651,7 +84003,7 @@ index e97a0e5..b50e796 100644
  
  static inline unsigned char swap_count(unsigned char ent)
  {
-@@ -1608,7 +1608,7 @@ SYSCALL_DEFINE1(swapoff, const char __user *, specialfile)
+@@ -1683,7 +1683,7 @@ SYSCALL_DEFINE1(swapoff, const char __user *, specialfile)
        }
        filp_close(swap_file, NULL);
        err = 0;
@@ -84660,7 +84012,7 @@ index e97a0e5..b50e796 100644
        wake_up_interruptible(&proc_poll_wait);
  
  out_dput:
-@@ -1625,8 +1625,8 @@ static unsigned swaps_poll(struct file *file, poll_table *wait)
+@@ -1700,8 +1700,8 @@ static unsigned swaps_poll(struct file *file, poll_table *wait)
  
        poll_wait(file, &proc_poll_wait, wait);
  
@@ -84671,7 +84023,7 @@ index e97a0e5..b50e796 100644
                return POLLIN | POLLRDNORM | POLLERR | POLLPRI;
        }
  
-@@ -1724,7 +1724,7 @@ static int swaps_open(struct inode *inode, struct file *file)
+@@ -1799,7 +1799,7 @@ static int swaps_open(struct inode *inode, struct file *file)
                return ret;
  
        seq = file->private_data;
@@ -84680,7 +84032,7 @@ index e97a0e5..b50e796 100644
        return 0;
  }
  
-@@ -2066,7 +2066,7 @@ SYSCALL_DEFINE2(swapon, const char __user *, specialfile, int, swap_flags)
+@@ -2142,7 +2142,7 @@ SYSCALL_DEFINE2(swapon, const char __user *, specialfile, int, swap_flags)
                (frontswap_map) ? "FS" : "");
  
        mutex_unlock(&swapon_mutex);
@@ -84690,10 +84042,10 @@ index e97a0e5..b50e796 100644
  
        if (S_ISREG(inode->i_mode))
 diff --git a/mm/util.c b/mm/util.c
-index c55e26b..3f913a9 100644
+index ab1424d..7c5bd5a 100644
 --- a/mm/util.c
 +++ b/mm/util.c
-@@ -292,6 +292,12 @@ done:
+@@ -294,6 +294,12 @@ done:
  void arch_pick_mmap_layout(struct mm_struct *mm)
  {
        mm->mmap_base = TASK_UNMAPPED_BASE;
@@ -84707,7 +84059,7 @@ index c55e26b..3f913a9 100644
        mm->unmap_area = arch_unmap_area;
  }
 diff --git a/mm/vmalloc.c b/mm/vmalloc.c
-index 5123a16..f234a48 100644
+index 0f751f2..ef398a0 100644
 --- a/mm/vmalloc.c
 +++ b/mm/vmalloc.c
 @@ -39,8 +39,19 @@ static void vunmap_pte_range(pmd_t *pmd, unsigned long addr, unsigned long end)
@@ -84845,7 +84197,7 @@ index 5123a16..f234a48 100644
        if (flags & VM_IOREMAP) {
                int bit = fls(size);
  
-@@ -1568,6 +1617,11 @@ void *vmap(struct page **pages, unsigned int count,
+@@ -1569,6 +1618,11 @@ void *vmap(struct page **pages, unsigned int count,
        if (count > totalram_pages)
                return NULL;
  
@@ -84857,7 +84209,7 @@ index 5123a16..f234a48 100644
        area = get_vm_area_caller((count << PAGE_SHIFT), flags,
                                        __builtin_return_address(0));
        if (!area)
-@@ -1669,6 +1723,13 @@ void *__vmalloc_node_range(unsigned long size, unsigned long align,
+@@ -1670,6 +1724,13 @@ void *__vmalloc_node_range(unsigned long size, unsigned long align,
        if (!size || (size >> PAGE_SHIFT) > totalram_pages)
                goto fail;
  
@@ -84871,7 +84223,7 @@ index 5123a16..f234a48 100644
        area = __get_vm_area_node(size, align, VM_ALLOC | VM_UNLIST,
                                  start, end, node, gfp_mask, caller);
        if (!area)
-@@ -1842,10 +1903,9 @@ EXPORT_SYMBOL(vzalloc_node);
+@@ -1845,10 +1906,9 @@ EXPORT_SYMBOL(vzalloc_node);
   *    For tight control over page level allocator and protection flags
   *    use __vmalloc() instead.
   */
@@ -84880,10 +84232,10 @@ index 5123a16..f234a48 100644
  {
 -      return __vmalloc_node(size, 1, GFP_KERNEL | __GFP_HIGHMEM, PAGE_KERNEL_EXEC,
 +      return __vmalloc_node(size, 1, GFP_KERNEL | __GFP_HIGHMEM | __GFP_ZERO, PAGE_KERNEL_EXEC,
-                             -1, __builtin_return_address(0));
+                             NUMA_NO_NODE, __builtin_return_address(0));
  }
  
-@@ -2136,6 +2196,8 @@ int remap_vmalloc_range(struct vm_area_struct *vma, void *addr,
+@@ -2139,6 +2199,8 @@ int remap_vmalloc_range(struct vm_area_struct *vma, void *addr,
        unsigned long uaddr = vma->vm_start;
        unsigned long usize = vma->vm_end - vma->vm_start;
  
@@ -84892,7 +84244,7 @@ index 5123a16..f234a48 100644
        if ((PAGE_SIZE-1) & (unsigned long)addr)
                return -EINVAL;
  
-@@ -2575,7 +2637,11 @@ static int s_show(struct seq_file *m, void *p)
+@@ -2578,7 +2640,11 @@ static int s_show(struct seq_file *m, void *p)
                v->addr, v->addr + v->size, v->size);
  
        if (v->caller)
@@ -84905,7 +84257,7 @@ index 5123a16..f234a48 100644
        if (v->nr_pages)
                seq_printf(m, " pages=%d", v->nr_pages);
 diff --git a/mm/vmstat.c b/mm/vmstat.c
-index 9800306..76b4b27 100644
+index e1d8ed1..253fa3c 100644
 --- a/mm/vmstat.c
 +++ b/mm/vmstat.c
 @@ -78,7 +78,7 @@ void vm_events_fold_cpu(int cpu)
@@ -84946,7 +84298,7 @@ index 9800306..76b4b27 100644
                }
  }
  #endif
-@@ -1223,7 +1223,7 @@ static int __cpuinit vmstat_cpuup_callback(struct notifier_block *nfb,
+@@ -1224,7 +1224,7 @@ static int __cpuinit vmstat_cpuup_callback(struct notifier_block *nfb,
        return NOTIFY_OK;
  }
  
@@ -84955,7 +84307,7 @@ index 9800306..76b4b27 100644
        { &vmstat_cpuup_callback, NULL, 0 };
  #endif
  
-@@ -1238,10 +1238,20 @@ static int __init setup_vmstat(void)
+@@ -1239,10 +1239,20 @@ static int __init setup_vmstat(void)
                start_cpu_timer(cpu);
  #endif
  #ifdef CONFIG_PROC_FS
@@ -84981,10 +84333,10 @@ index 9800306..76b4b27 100644
        return 0;
  }
 diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c
-index acc74ad..be02639 100644
+index 85addcd..c429a13 100644
 --- a/net/8021q/vlan.c
 +++ b/net/8021q/vlan.c
-@@ -108,6 +108,13 @@ void unregister_vlan_dev(struct net_device *dev, struct list_head *head)
+@@ -114,6 +114,13 @@ void unregister_vlan_dev(struct net_device *dev, struct list_head *head)
        if (vlan_id)
                vlan_vid_del(real_dev, vlan_id);
  
@@ -84998,7 +84350,7 @@ index acc74ad..be02639 100644
        /* Get rid of the vlan's reference to real_dev */
        dev_put(real_dev);
  }
-@@ -485,7 +492,7 @@ out:
+@@ -496,7 +503,7 @@ out:
        return NOTIFY_DONE;
  }
  
@@ -85007,7 +84359,7 @@ index acc74ad..be02639 100644
        .notifier_call = vlan_device_event,
  };
  
-@@ -560,8 +567,7 @@ static int vlan_ioctl_handler(struct net *net, void __user *arg)
+@@ -571,8 +578,7 @@ static int vlan_ioctl_handler(struct net *net, void __user *arg)
                err = -EPERM;
                if (!ns_capable(net->user_ns, CAP_NET_ADMIN))
                        break;
@@ -85106,7 +84458,7 @@ index a86aff9..3a0d6f6 100644
  /*
   * ATM LAN Emulation supports both LLC & Dix Ethernet EtherType
 diff --git a/net/atm/proc.c b/net/atm/proc.c
-index 0d020de..011c7bb 100644
+index 6ac35ff..ac0e136 100644
 --- a/net/atm/proc.c
 +++ b/net/atm/proc.c
 @@ -45,9 +45,9 @@ static void add_stats(struct seq_file *seq, const char *aal,
@@ -85158,7 +84510,7 @@ index d5744b7..506bae3 100644
        table = kmemdup(ax25_param_table, sizeof(ax25_param_table), GFP_KERNEL);
        if (!table)
 diff --git a/net/batman-adv/bat_iv_ogm.c b/net/batman-adv/bat_iv_ogm.c
-index 1ee94d0..14beea2 100644
+index a5bb0a7..e1d8b97 100644
 --- a/net/batman-adv/bat_iv_ogm.c
 +++ b/net/batman-adv/bat_iv_ogm.c
 @@ -63,7 +63,7 @@ static int batadv_iv_ogm_iface_enable(struct batadv_hard_iface *hard_iface)
@@ -85170,7 +84522,7 @@ index 1ee94d0..14beea2 100644
  
        hard_iface->bat_iv.ogm_buff_len = BATADV_OGM_HLEN;
        ogm_buff = kmalloc(hard_iface->bat_iv.ogm_buff_len, GFP_ATOMIC);
-@@ -615,9 +615,9 @@ static void batadv_iv_ogm_schedule(struct batadv_hard_iface *hard_iface)
+@@ -611,9 +611,9 @@ static void batadv_iv_ogm_schedule(struct batadv_hard_iface *hard_iface)
        batadv_ogm_packet = (struct batadv_ogm_packet *)(*ogm_buff);
  
        /* change sequence number to network order */
@@ -85182,7 +84534,7 @@ index 1ee94d0..14beea2 100644
  
        batadv_ogm_packet->ttvn = atomic_read(&bat_priv->tt.vn);
        batadv_ogm_packet->tt_crc = htons(bat_priv->tt.local_crc);
-@@ -1022,7 +1022,7 @@ static void batadv_iv_ogm_process(const struct ethhdr *ethhdr,
+@@ -1013,7 +1013,7 @@ static void batadv_iv_ogm_process(const struct ethhdr *ethhdr,
                return;
  
        /* could be changed by schedule_own_packet() */
@@ -85192,7 +84544,7 @@ index 1ee94d0..14beea2 100644
        if (batadv_ogm_packet->flags & BATADV_DIRECTLINK)
                has_directlink_flag = 1;
 diff --git a/net/batman-adv/hard-interface.c b/net/batman-adv/hard-interface.c
-index f1d37cd..4190879 100644
+index 368219e..53f56f9 100644
 --- a/net/batman-adv/hard-interface.c
 +++ b/net/batman-adv/hard-interface.c
 @@ -370,7 +370,7 @@ int batadv_hardif_enable_interface(struct batadv_hard_iface *hard_iface,
@@ -85204,7 +84556,7 @@ index f1d37cd..4190879 100644
        batadv_info(hard_iface->soft_iface, "Adding interface: %s\n",
                    hard_iface->net_dev->name);
  
-@@ -493,7 +493,7 @@ batadv_hardif_add_interface(struct net_device *net_dev)
+@@ -514,7 +514,7 @@ batadv_hardif_add_interface(struct net_device *net_dev)
        /* This can't be called via a bat_priv callback because
         * we have no bat_priv yet.
         */
@@ -85214,7 +84566,7 @@ index f1d37cd..4190879 100644
  
        return hard_iface;
 diff --git a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c
-index 6b548fd..fc32c8d 100644
+index 2711e87..4ca48fa 100644
 --- a/net/batman-adv/soft-interface.c
 +++ b/net/batman-adv/soft-interface.c
 @@ -252,7 +252,7 @@ static int batadv_interface_tx(struct sk_buff *skb,
@@ -85226,7 +84578,7 @@ index 6b548fd..fc32c8d 100644
                bcast_packet->seqno = htonl(seqno);
  
                batadv_add_bcast_packet_to_list(bat_priv, skb, brd_delay);
-@@ -497,7 +497,7 @@ struct net_device *batadv_softif_create(const char *name)
+@@ -527,7 +527,7 @@ struct net_device *batadv_softif_create(const char *name)
        atomic_set(&bat_priv->batman_queue_left, BATADV_BATMAN_QUEUE_LEN);
  
        atomic_set(&bat_priv->mesh_state, BATADV_MESH_INACTIVE);
@@ -85236,10 +84588,10 @@ index 6b548fd..fc32c8d 100644
        atomic_set(&bat_priv->tt.local_changes, 0);
        atomic_set(&bat_priv->tt.ogm_append_cnt, 0);
 diff --git a/net/batman-adv/types.h b/net/batman-adv/types.h
-index ae9ac9a..11e0fe7 100644
+index 4cd87a0..348e705 100644
 --- a/net/batman-adv/types.h
 +++ b/net/batman-adv/types.h
-@@ -48,7 +48,7 @@
+@@ -51,7 +51,7 @@
  struct batadv_hard_iface_bat_iv {
        unsigned char *ogm_buff;
        int ogm_buff_len;
@@ -85247,8 +84599,8 @@ index ae9ac9a..11e0fe7 100644
 +      atomic_unchecked_t ogm_seqno;
  };
  
- struct batadv_hard_iface {
-@@ -56,7 +56,7 @@ struct batadv_hard_iface {
+ /**
+@@ -75,7 +75,7 @@ struct batadv_hard_iface {
        int16_t if_num;
        char if_status;
        struct net_device *net_dev;
@@ -85257,20 +84609,20 @@ index ae9ac9a..11e0fe7 100644
        struct kobject *hardif_obj;
        atomic_t refcount;
        struct packet_type batman_adv_ptype;
-@@ -284,7 +284,7 @@ struct batadv_priv {
-       atomic_t orig_interval;         /* uint */
-       atomic_t hop_penalty;           /* uint */
-       atomic_t log_level;             /* uint */
+@@ -495,7 +495,7 @@ struct batadv_priv {
+ #ifdef CONFIG_BATMAN_ADV_DEBUG
+       atomic_t log_level;
+ #endif
 -      atomic_t bcast_seqno;
 +      atomic_unchecked_t bcast_seqno;
        atomic_t bcast_queue_left;
        atomic_t batman_queue_left;
        char num_ifaces;
 diff --git a/net/batman-adv/unicast.c b/net/batman-adv/unicast.c
-index 10aff49..ea8e021 100644
+index 50e079f..49ce2d2 100644
 --- a/net/batman-adv/unicast.c
 +++ b/net/batman-adv/unicast.c
-@@ -272,7 +272,7 @@ int batadv_frag_send_skb(struct sk_buff *skb, struct batadv_priv *bat_priv,
+@@ -270,7 +270,7 @@ int batadv_frag_send_skb(struct sk_buff *skb, struct batadv_priv *bat_priv,
        frag1->flags = BATADV_UNI_FRAG_HEAD | large_tail;
        frag2->flags = large_tail;
  
@@ -85280,10 +84632,10 @@ index 10aff49..ea8e021 100644
        frag2->seqno = htons(seqno);
  
 diff --git a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c
-index 07f0739..3c42e34 100644
+index 6a93614..1415549 100644
 --- a/net/bluetooth/hci_sock.c
 +++ b/net/bluetooth/hci_sock.c
-@@ -934,7 +934,7 @@ static int hci_sock_setsockopt(struct socket *sock, int level, int optname,
+@@ -929,7 +929,7 @@ static int hci_sock_setsockopt(struct socket *sock, int level, int optname,
                        uf.event_mask[1] = *((u32 *) f->event_mask + 1);
                }
  
@@ -85293,10 +84645,10 @@ index 07f0739..3c42e34 100644
                        err = -EFAULT;
                        break;
 diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
-index 22e6583..426e2f3 100644
+index 7c7e932..7a7815d 100644
 --- a/net/bluetooth/l2cap_core.c
 +++ b/net/bluetooth/l2cap_core.c
-@@ -3400,8 +3400,10 @@ static int l2cap_parse_conf_rsp(struct l2cap_chan *chan, void *rsp, int len,
+@@ -3395,8 +3395,10 @@ static int l2cap_parse_conf_rsp(struct l2cap_chan *chan, void *rsp, int len,
                        break;
  
                case L2CAP_CONF_RFC:
@@ -85361,10 +84713,10 @@ index 1bcfb84..dad9f98 100644
                        err = -EFAULT;
                        break;
 diff --git a/net/bluetooth/rfcomm/sock.c b/net/bluetooth/rfcomm/sock.c
-index ce3f665..2c7d08f 100644
+index 7c9224b..381009e 100644
 --- a/net/bluetooth/rfcomm/sock.c
 +++ b/net/bluetooth/rfcomm/sock.c
-@@ -667,7 +667,7 @@ static int rfcomm_sock_setsockopt(struct socket *sock, int level, int optname, c
+@@ -666,7 +666,7 @@ static int rfcomm_sock_setsockopt(struct socket *sock, int level, int optname, c
        struct sock *sk = sock->sk;
        struct bt_security sec;
        int err = 0;
@@ -85373,7 +84725,7 @@ index ce3f665..2c7d08f 100644
        u32 opt;
  
        BT_DBG("sk %p", sk);
-@@ -689,7 +689,7 @@ static int rfcomm_sock_setsockopt(struct socket *sock, int level, int optname, c
+@@ -688,7 +688,7 @@ static int rfcomm_sock_setsockopt(struct socket *sock, int level, int optname, c
  
                sec.level = BT_SECURITY_LOW;
  
@@ -85383,7 +84735,7 @@ index ce3f665..2c7d08f 100644
                        err = -EFAULT;
                        break;
 diff --git a/net/bluetooth/rfcomm/tty.c b/net/bluetooth/rfcomm/tty.c
-index bd6fd0f..6492cba 100644
+index b6e44ad..5b0d514 100644
 --- a/net/bluetooth/rfcomm/tty.c
 +++ b/net/bluetooth/rfcomm/tty.c
 @@ -309,7 +309,7 @@ static void rfcomm_dev_del(struct rfcomm_dev *dev)
@@ -85395,7 +84747,7 @@ index bd6fd0f..6492cba 100644
                spin_unlock_irqrestore(&dev->port.lock, flags);
                return;
        }
-@@ -664,10 +664,10 @@ static int rfcomm_tty_open(struct tty_struct *tty, struct file *filp)
+@@ -659,10 +659,10 @@ static int rfcomm_tty_open(struct tty_struct *tty, struct file *filp)
                return -ENODEV;
  
        BT_DBG("dev %p dst %pMR channel %d opened %d", dev, &dev->dst,
@@ -85408,7 +84760,7 @@ index bd6fd0f..6492cba 100644
                spin_unlock_irqrestore(&dev->port.lock, flags);
                return 0;
        }
-@@ -732,10 +732,10 @@ static void rfcomm_tty_close(struct tty_struct *tty, struct file *filp)
+@@ -727,10 +727,10 @@ static void rfcomm_tty_close(struct tty_struct *tty, struct file *filp)
                return;
  
        BT_DBG("tty %p dev %p dlc %p opened %d", tty, dev, dev->dlc,
@@ -85421,24 +84773,11 @@ index bd6fd0f..6492cba 100644
                spin_unlock_irqrestore(&dev->port.lock, flags);
                if (dev->tty_dev->parent)
                        device_move(dev->tty_dev, NULL, DPM_ORDER_DEV_LAST);
-diff --git a/net/bridge/br_fdb.c b/net/bridge/br_fdb.c
-index d9576e6..85f4f4e 100644
---- a/net/bridge/br_fdb.c
-+++ b/net/bridge/br_fdb.c
-@@ -386,7 +386,7 @@ static int fdb_insert(struct net_bridge *br, struct net_bridge_port *source,
-                       return 0;
-               br_warn(br, "adding interface %s with same address "
-                      "as a received packet\n",
--                     source->dev->name);
-+                     source ? source->dev->name : br->dev->name);
-               fdb_delete(br, fdb);
-       }
 diff --git a/net/bridge/netfilter/ebtables.c b/net/bridge/netfilter/ebtables.c
-index 5fe2ff3..121d696 100644
+index 8d493c9..3849e49 100644
 --- a/net/bridge/netfilter/ebtables.c
 +++ b/net/bridge/netfilter/ebtables.c
-@@ -1523,7 +1523,7 @@ static int do_ebt_get_ctl(struct sock *sk, int cmd, void __user *user, int *len)
+@@ -1525,7 +1525,7 @@ static int do_ebt_get_ctl(struct sock *sk, int cmd, void __user *user, int *len)
                        tmp.valid_hooks = t->table->valid_hooks;
                }
                mutex_unlock(&ebt_mutex);
@@ -85447,7 +84786,7 @@ index 5fe2ff3..121d696 100644
                        BUGPRINT("c2u Didn't work\n");
                        ret = -EFAULT;
                        break;
-@@ -2327,7 +2327,7 @@ static int compat_do_ebt_get_ctl(struct sock *sk, int cmd,
+@@ -2331,7 +2331,7 @@ static int compat_do_ebt_get_ctl(struct sock *sk, int cmd,
                        goto out;
                tmp.valid_hooks = t->valid_hooks;
  
@@ -85456,7 +84795,7 @@ index 5fe2ff3..121d696 100644
                        ret = -EFAULT;
                        break;
                }
-@@ -2338,7 +2338,7 @@ static int compat_do_ebt_get_ctl(struct sock *sk, int cmd,
+@@ -2342,7 +2342,7 @@ static int compat_do_ebt_get_ctl(struct sock *sk, int cmd,
                tmp.entries_size = t->table->entries_size;
                tmp.valid_hooks = t->table->valid_hooks;
  
@@ -85509,10 +84848,10 @@ index a376ec1..1fbd6be 100644
                        list_del(&p->list);
                        goto out;
 diff --git a/net/can/af_can.c b/net/can/af_can.c
-index ddac1ee..3ee0a78 100644
+index c48e522..1223690 100644
 --- a/net/can/af_can.c
 +++ b/net/can/af_can.c
-@@ -872,7 +872,7 @@ static const struct net_proto_family can_family_ops = {
+@@ -870,7 +870,7 @@ static const struct net_proto_family can_family_ops = {
  };
  
  /* notifier block for netdevice event */
@@ -85522,18 +84861,18 @@ index ddac1ee..3ee0a78 100644
  };
  
 diff --git a/net/can/gw.c b/net/can/gw.c
-index 574dda78e..3d2b3da 100644
+index 117814a..ad4fb73 100644
 --- a/net/can/gw.c
 +++ b/net/can/gw.c
-@@ -67,7 +67,6 @@ MODULE_AUTHOR("Oliver Hartkopp <oliver.hartkopp@volkswagen.de>");
MODULE_ALIAS("can-gw");
+@@ -80,7 +80,6 @@ MODULE_PARM_DESC(max_hops,
               "default: " __stringify(CGW_DEFAULT_HOPS) ")");
  
  static HLIST_HEAD(cgw_list);
 -static struct notifier_block notifier;
  
  static struct kmem_cache *cgw_cache __read_mostly;
  
-@@ -893,6 +892,10 @@ static int cgw_remove_job(struct sk_buff *skb,  struct nlmsghdr *nlh, void *arg)
+@@ -928,6 +927,10 @@ static int cgw_remove_job(struct sk_buff *skb,  struct nlmsghdr *nlh, void *arg)
        return err;
  }
  
@@ -85543,8 +84882,8 @@ index 574dda78e..3d2b3da 100644
 +
  static __init int cgw_module_init(void)
  {
-       printk(banner);
-@@ -904,7 +907,6 @@ static __init int cgw_module_init(void)
+       /* sanitize given module parameter */
+@@ -943,7 +946,6 @@ static __init int cgw_module_init(void)
                return -ENOMEM;
  
        /* set notifier */
@@ -85706,24 +85045,10 @@ index 368f9c3..f82d4a3 100644
  
        return err;
 diff --git a/net/core/dev.c b/net/core/dev.c
-index 5d9c43d..b471558 100644
+index 9a278e9..15f2b9e 100644
 --- a/net/core/dev.c
 +++ b/net/core/dev.c
-@@ -1250,9 +1250,13 @@ void dev_load(struct net *net, const char *name)
-       if (no_module && capable(CAP_NET_ADMIN))
-               no_module = request_module("netdev-%s", name);
-       if (no_module && capable(CAP_SYS_MODULE)) {
-+#ifdef CONFIG_GRKERNSEC_MODHARDEN
-+              ___request_module(true, "grsec_modharden_netdev", "%s", name);
-+#else
-               if (!request_module("%s", name))
-                       pr_warn("Loading kernel module for a network device with CAP_SYS_MODULE (deprecated).  Use CAP_NET_ADMIN and alias netdev-%s instead.\n",
-                               name);
-+#endif
-       }
- }
- EXPORT_SYMBOL(dev_load);
-@@ -1714,7 +1718,7 @@ int dev_forward_skb(struct net_device *dev, struct sk_buff *skb)
+@@ -1617,7 +1617,7 @@ int dev_forward_skb(struct net_device *dev, struct sk_buff *skb)
  {
        if (skb_shinfo(skb)->tx_flags & SKBTX_DEV_ZEROCOPY) {
                if (skb_copy_ubufs(skb, GFP_ATOMIC)) {
@@ -85732,8 +85057,8 @@ index 5d9c43d..b471558 100644
                        kfree_skb(skb);
                        return NET_RX_DROP;
                }
-@@ -1724,7 +1728,7 @@ int dev_forward_skb(struct net_device *dev, struct sk_buff *skb)
-       nf_reset(skb);
+@@ -1626,7 +1626,7 @@ int dev_forward_skb(struct net_device *dev, struct sk_buff *skb)
+       skb_orphan(skb);
  
        if (unlikely(!is_skb_forwardable(dev, skb))) {
 -              atomic_long_inc(&dev->rx_dropped);
@@ -85741,7 +85066,7 @@ index 5d9c43d..b471558 100644
                kfree_skb(skb);
                return NET_RX_DROP;
        }
-@@ -2179,7 +2183,7 @@ static int illegal_highdma(struct net_device *dev, struct sk_buff *skb)
+@@ -2351,7 +2351,7 @@ static int illegal_highdma(struct net_device *dev, struct sk_buff *skb)
  
  struct dev_gso_cb {
        void (*destructor)(struct sk_buff *skb);
@@ -85750,7 +85075,7 @@ index 5d9c43d..b471558 100644
  
  #define DEV_GSO_CB(skb) ((struct dev_gso_cb *)(skb)->cb)
  
-@@ -3052,7 +3056,7 @@ enqueue:
+@@ -3093,7 +3093,7 @@ enqueue:
  
        local_irq_restore(flags);
  
@@ -85759,7 +85084,7 @@ index 5d9c43d..b471558 100644
        kfree_skb(skb);
        return NET_RX_DROP;
  }
-@@ -3124,7 +3128,7 @@ int netif_rx_ni(struct sk_buff *skb)
+@@ -3165,7 +3165,7 @@ int netif_rx_ni(struct sk_buff *skb)
  }
  EXPORT_SYMBOL(netif_rx_ni);
  
@@ -85768,7 +85093,7 @@ index 5d9c43d..b471558 100644
  {
        struct softnet_data *sd = &__get_cpu_var(softnet_data);
  
-@@ -3462,7 +3466,7 @@ ncls:
+@@ -3490,7 +3490,7 @@ ncls:
                        ret = pt_prev->func(skb, skb->dev, pt_prev, orig_dev);
        } else {
  drop:
@@ -85777,7 +85102,7 @@ index 5d9c43d..b471558 100644
                kfree_skb(skb);
                /* Jamal, now you will not able to escape explaining
                 * me how you were going to use this. :-)
-@@ -4045,7 +4049,7 @@ void netif_napi_del(struct napi_struct *napi)
+@@ -4095,7 +4095,7 @@ void netif_napi_del(struct napi_struct *napi)
  }
  EXPORT_SYMBOL(netif_napi_del);
  
@@ -85786,21 +85111,7 @@ index 5d9c43d..b471558 100644
  {
        struct softnet_data *sd = &__get_cpu_var(softnet_data);
        unsigned long time_limit = jiffies + 2;
-@@ -4529,8 +4533,13 @@ static int ptype_seq_show(struct seq_file *seq, void *v)
-               else
-                       seq_printf(seq, "%04x", ntohs(pt->type));
-+#ifdef CONFIG_GRKERNSEC_HIDESYM
-+              seq_printf(seq, " %-8s %p\n",
-+                         pt->dev ? pt->dev->name : "", NULL);
-+#else
-               seq_printf(seq, " %-8s %pF\n",
-                          pt->dev ? pt->dev->name : "", pt->func);
-+#endif
-       }
-       return 0;
-@@ -6102,7 +6111,7 @@ struct rtnl_link_stats64 *dev_get_stats(struct net_device *dev,
+@@ -5522,7 +5522,7 @@ struct rtnl_link_stats64 *dev_get_stats(struct net_device *dev,
        } else {
                netdev_stats_to_stats64(storage, &dev->stats);
        }
@@ -85809,8 +85120,26 @@ index 5d9c43d..b471558 100644
        return storage;
  }
  EXPORT_SYMBOL(dev_get_stats);
+diff --git a/net/core/dev_ioctl.c b/net/core/dev_ioctl.c
+index 6cc0481..59cfb00 100644
+--- a/net/core/dev_ioctl.c
++++ b/net/core/dev_ioctl.c
+@@ -376,9 +376,13 @@ void dev_load(struct net *net, const char *name)
+       if (no_module && capable(CAP_NET_ADMIN))
+               no_module = request_module("netdev-%s", name);
+       if (no_module && capable(CAP_SYS_MODULE)) {
++#ifdef CONFIG_GRKERNSEC_MODHARDEN
++              ___request_module(true, "grsec_modharden_netdev", "%s", name);
++#else
+               if (!request_module("%s", name))
+                       pr_warn("Loading kernel module for a network device with CAP_SYS_MODULE (deprecated).  Use CAP_NET_ADMIN and alias netdev-%s instead.\n",
+                               name);
++#endif
+       }
+ }
+ EXPORT_SYMBOL(dev_load);
 diff --git a/net/core/flow.c b/net/core/flow.c
-index 3bad824..2071a55 100644
+index 2bfd081..53c6058 100644
 --- a/net/core/flow.c
 +++ b/net/core/flow.c
 @@ -61,7 +61,7 @@ struct flow_cache {
@@ -85831,7 +85160,7 @@ index 3bad824..2071a55 100644
                return 0;
        if (fle->object && !fle->object->ops->check(fle->object))
                return 0;
-@@ -259,7 +259,7 @@ flow_cache_lookup(struct net *net, const struct flowi *key, u16 family, u8 dir,
+@@ -258,7 +258,7 @@ flow_cache_lookup(struct net *net, const struct flowi *key, u16 family, u8 dir,
                        hlist_add_head(&fle->u.hlist, &fcp->hash_table[hash]);
                        fcp->hash_count++;
                }
@@ -85840,7 +85169,7 @@ index 3bad824..2071a55 100644
                flo = fle->object;
                if (!flo)
                        goto ret_object;
-@@ -280,7 +280,7 @@ nocache:
+@@ -279,7 +279,7 @@ nocache:
        }
        flo = resolver(net, key, family, dir, flo, ctx);
        if (fle) {
@@ -85872,10 +85201,10 @@ index 7e7aeb0..2a998cb 100644
  
        m->msg_iov = iov;
 diff --git a/net/core/neighbour.c b/net/core/neighbour.c
-index c815f28..e6403f2 100644
+index 3863b8f..85c99a6 100644
 --- a/net/core/neighbour.c
 +++ b/net/core/neighbour.c
-@@ -2776,7 +2776,7 @@ static int proc_unres_qlen(ctl_table *ctl, int write, void __user *buffer,
+@@ -2778,7 +2778,7 @@ static int proc_unres_qlen(ctl_table *ctl, int write, void __user *buffer,
                           size_t *lenp, loff_t *ppos)
  {
        int size, ret;
@@ -85884,11 +85213,29 @@ index c815f28..e6403f2 100644
  
        tmp.extra1 = &zero;
        tmp.extra2 = &unres_qlen_max;
+diff --git a/net/core/net-procfs.c b/net/core/net-procfs.c
+index 3174f19..5810985 100644
+--- a/net/core/net-procfs.c
++++ b/net/core/net-procfs.c
+@@ -271,8 +271,13 @@ static int ptype_seq_show(struct seq_file *seq, void *v)
+               else
+                       seq_printf(seq, "%04x", ntohs(pt->type));
++#ifdef CONFIG_GRKERNSEC_HIDESYM
++              seq_printf(seq, " %-8s %pF\n",
++                         pt->dev ? pt->dev->name : "", NULL);
++#else
+               seq_printf(seq, " %-8s %pF\n",
+                          pt->dev ? pt->dev->name : "", pt->func);
++#endif
+       }
+       return 0;
 diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c
-index 28c5f5a..7edf2e2 100644
+index 7427ab5..389f411 100644
 --- a/net/core/net-sysfs.c
 +++ b/net/core/net-sysfs.c
-@@ -1455,7 +1455,7 @@ void netdev_class_remove_file(struct class_attribute *class_attr)
+@@ -1321,7 +1321,7 @@ void netdev_class_remove_file(struct class_attribute *class_attr)
  }
  EXPORT_SYMBOL(netdev_class_remove_file);
  
@@ -85898,7 +85245,7 @@ index 28c5f5a..7edf2e2 100644
        kobj_ns_type_register(&net_ns_type_operations);
        return class_register(&net_class);
 diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c
-index 8acce01..2e306bb 100644
+index 80e271d..2980cc2 100644
 --- a/net/core/net_namespace.c
 +++ b/net/core/net_namespace.c
 @@ -442,7 +442,7 @@ static int __register_pernet_operations(struct list_head *list,
@@ -85938,7 +85285,7 @@ index 8acce01..2e306bb 100644
        return error;
  }
 diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
-index 6212ec9..dd4ad3b 100644
+index 23854b5..ff4fda4 100644
 --- a/net/core/rtnetlink.c
 +++ b/net/core/rtnetlink.c
 @@ -58,7 +58,7 @@ struct rtnl_link {
@@ -86016,11 +85363,29 @@ index 2dc6cda..2159524 100644
             i++, cmfptr++)
        {
                struct socket *sock;
+diff --git a/net/core/secure_seq.c b/net/core/secure_seq.c
+index e61a8bb..6a2f13c 100644
+--- a/net/core/secure_seq.c
++++ b/net/core/secure_seq.c
+@@ -12,12 +12,10 @@
+ static u32 net_secret[MD5_MESSAGE_BYTES / 4] ____cacheline_aligned;
+-static int __init net_secret_init(void)
++void net_secret_init(void)
+ {
+       get_random_bytes(net_secret, sizeof(net_secret));
+-      return 0;
+ }
+-late_initcall(net_secret_init);
+ #ifdef CONFIG_INET
+ static u32 seq_scale(u32 seq)
 diff --git a/net/core/sock.c b/net/core/sock.c
-index bc131d4..029e378 100644
+index 1432266..1a0d4a1 100644
 --- a/net/core/sock.c
 +++ b/net/core/sock.c
-@@ -388,7 +388,7 @@ int sock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
+@@ -390,7 +390,7 @@ int sock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
        struct sk_buff_head *list = &sk->sk_receive_queue;
  
        if (atomic_read(&sk->sk_rmem_alloc) >= sk->sk_rcvbuf) {
@@ -86029,7 +85394,7 @@ index bc131d4..029e378 100644
                trace_sock_rcvqueue_full(sk, skb);
                return -ENOMEM;
        }
-@@ -398,7 +398,7 @@ int sock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
+@@ -400,7 +400,7 @@ int sock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
                return err;
  
        if (!sk_rmem_schedule(sk, skb, skb->truesize)) {
@@ -86038,7 +85403,7 @@ index bc131d4..029e378 100644
                return -ENOBUFS;
        }
  
-@@ -418,7 +418,7 @@ int sock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
+@@ -420,7 +420,7 @@ int sock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
        skb_dst_force(skb);
  
        spin_lock_irqsave(&list->lock, flags);
@@ -86047,7 +85412,7 @@ index bc131d4..029e378 100644
        __skb_queue_tail(list, skb);
        spin_unlock_irqrestore(&list->lock, flags);
  
-@@ -438,7 +438,7 @@ int sk_receive_skb(struct sock *sk, struct sk_buff *skb, const int nested)
+@@ -440,7 +440,7 @@ int sk_receive_skb(struct sock *sk, struct sk_buff *skb, const int nested)
        skb->dev = NULL;
  
        if (sk_rcvqueues_full(sk, skb, sk->sk_rcvbuf)) {
@@ -86056,7 +85421,7 @@ index bc131d4..029e378 100644
                goto discard_and_relse;
        }
        if (nested)
-@@ -456,7 +456,7 @@ int sk_receive_skb(struct sock *sk, struct sk_buff *skb, const int nested)
+@@ -458,7 +458,7 @@ int sk_receive_skb(struct sock *sk, struct sk_buff *skb, const int nested)
                mutex_release(&sk->sk_lock.dep_map, 1, _RET_IP_);
        } else if (sk_add_backlog(sk, skb, sk->sk_rcvbuf)) {
                bh_unlock_sock(sk);
@@ -86065,7 +85430,7 @@ index bc131d4..029e378 100644
                goto discard_and_relse;
        }
  
-@@ -930,12 +930,12 @@ int sock_getsockopt(struct socket *sock, int level, int optname,
+@@ -942,12 +942,12 @@ int sock_getsockopt(struct socket *sock, int level, int optname,
                struct timeval tm;
        } v;
  
@@ -86081,7 +85446,7 @@ index bc131d4..029e378 100644
                return -EINVAL;
  
        memset(&v, 0, sizeof(v));
-@@ -1083,11 +1083,11 @@ int sock_getsockopt(struct socket *sock, int level, int optname,
+@@ -1099,11 +1099,11 @@ int sock_getsockopt(struct socket *sock, int level, int optname,
  
        case SO_PEERNAME:
        {
@@ -86095,7 +85460,7 @@ index bc131d4..029e378 100644
                        return -EINVAL;
                if (copy_to_user(optval, address, len))
                        return -EFAULT;
-@@ -1146,7 +1146,7 @@ int sock_getsockopt(struct socket *sock, int level, int optname,
+@@ -1166,7 +1166,7 @@ int sock_getsockopt(struct socket *sock, int level, int optname,
  
        if (len > lv)
                len = lv;
@@ -86104,7 +85469,7 @@ index bc131d4..029e378 100644
                return -EFAULT;
  lenout:
        if (put_user(len, optlen))
-@@ -2276,7 +2276,7 @@ void sock_init_data(struct socket *sock, struct sock *sk)
+@@ -2284,7 +2284,7 @@ void sock_init_data(struct socket *sock, struct sock *sk)
         */
        smp_wmb();
        atomic_set(&sk->sk_refcnt, 1);
@@ -86114,7 +85479,7 @@ index bc131d4..029e378 100644
  EXPORT_SYMBOL(sock_init_data);
  
 diff --git a/net/core/sock_diag.c b/net/core/sock_diag.c
-index 750f44f..922399c 100644
+index a29e90c..922399c 100644
 --- a/net/core/sock_diag.c
 +++ b/net/core/sock_diag.c
 @@ -9,26 +9,33 @@
@@ -86165,7 +85530,7 @@ index 750f44f..922399c 100644
        mutex_unlock(&sock_diag_table_mutex);
  
        return err;
-@@ -92,26 +102,13 @@ void sock_diag_unregister(const struct sock_diag_handler *hnld)
+@@ -92,7 +102,9 @@ void sock_diag_unregister(const struct sock_diag_handler *hnld)
  
        mutex_lock(&sock_diag_table_mutex);
        BUG_ON(sock_diag_handlers[family] != hnld);
@@ -86175,50 +85540,11 @@ index 750f44f..922399c 100644
        mutex_unlock(&sock_diag_table_mutex);
  }
  EXPORT_SYMBOL_GPL(sock_diag_unregister);
--static const inline struct sock_diag_handler *sock_diag_lock_handler(int family)
--{
--      if (sock_diag_handlers[family] == NULL)
--              request_module("net-pf-%d-proto-%d-type-%d", PF_NETLINK,
--                              NETLINK_SOCK_DIAG, family);
--
--      mutex_lock(&sock_diag_table_mutex);
--      return sock_diag_handlers[family];
--}
--
--static inline void sock_diag_unlock_handler(const struct sock_diag_handler *h)
--{
--      mutex_unlock(&sock_diag_table_mutex);
--}
--
- static int __sock_diag_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
- {
-       int err;
-@@ -124,12 +121,17 @@ static int __sock_diag_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
-       if (req->sdiag_family >= AF_MAX)
-               return -EINVAL;
--      hndl = sock_diag_lock_handler(req->sdiag_family);
-+      if (sock_diag_handlers[req->sdiag_family] == NULL)
-+              request_module("net-pf-%d-proto-%d-type-%d", PF_NETLINK,
-+                              NETLINK_SOCK_DIAG, req->sdiag_family);
-+
-+      mutex_lock(&sock_diag_table_mutex);
-+      hndl = sock_diag_handlers[req->sdiag_family];
-       if (hndl == NULL)
-               err = -ENOENT;
-       else
-               err = hndl->dump(skb, nlh);
--      sock_diag_unlock_handler(hndl);
-+      mutex_unlock(&sock_diag_table_mutex);
-       return err;
- }
 diff --git a/net/core/sysctl_net_core.c b/net/core/sysctl_net_core.c
-index d1b0804..98cf5f7 100644
+index cfdb46a..cef55e1 100644
 --- a/net/core/sysctl_net_core.c
 +++ b/net/core/sysctl_net_core.c
-@@ -26,7 +26,7 @@ static int rps_sock_flow_sysctl(ctl_table *table, int write,
+@@ -28,7 +28,7 @@ static int rps_sock_flow_sysctl(ctl_table *table, int write,
  {
        unsigned int orig_size, size;
        int ret, i;
@@ -86227,7 +85553,7 @@ index d1b0804..98cf5f7 100644
                .data = &size,
                .maxlen = sizeof(size),
                .mode = table->mode
-@@ -205,13 +205,12 @@ static struct ctl_table netns_core_table[] = {
+@@ -211,13 +211,12 @@ static struct ctl_table netns_core_table[] = {
  
  static __net_init int sysctl_core_net_init(struct net *net)
  {
@@ -86243,7 +85569,7 @@ index d1b0804..98cf5f7 100644
                if (tbl == NULL)
                        goto err_dup;
  
-@@ -221,17 +220,16 @@ static __net_init int sysctl_core_net_init(struct net *net)
+@@ -227,17 +226,16 @@ static __net_init int sysctl_core_net_init(struct net *net)
                if (net->user_ns != &init_user_ns) {
                        tbl[0].procname = NULL;
                }
@@ -86265,7 +85591,7 @@ index d1b0804..98cf5f7 100644
  err_dup:
        return -ENOMEM;
  }
-@@ -246,7 +244,7 @@ static __net_exit void sysctl_core_net_exit(struct net *net)
+@@ -252,7 +250,7 @@ static __net_exit void sysctl_core_net_exit(struct net *net)
        kfree(tbl);
  }
  
@@ -86275,10 +85601,10 @@ index d1b0804..98cf5f7 100644
        .exit = sysctl_core_net_exit,
  };
 diff --git a/net/decnet/af_decnet.c b/net/decnet/af_decnet.c
-index 307c322..78a4c6f 100644
+index c21f200..bc4565b 100644
 --- a/net/decnet/af_decnet.c
 +++ b/net/decnet/af_decnet.c
-@@ -468,6 +468,7 @@ static struct proto dn_proto = {
+@@ -465,6 +465,7 @@ static struct proto dn_proto = {
        .sysctl_rmem            = sysctl_decnet_rmem,
        .max_header             = DN_MAX_NSP_DATA_HEADER + 64,
        .obj_size               = sizeof(struct dn_sock),
@@ -86309,12 +85635,32 @@ index a55eecc..dd8428c 100644
  
        *lenp = len;
 diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
-index fcf104e..95552d4 100644
+index c929d9c..df10cde 100644
 --- a/net/ipv4/af_inet.c
 +++ b/net/ipv4/af_inet.c
-@@ -1717,13 +1717,9 @@ static int __init inet_init(void)
+@@ -115,6 +115,7 @@
+ #include <net/inet_common.h>
+ #include <net/xfrm.h>
+ #include <net/net_namespace.h>
++#include <net/secure_seq.h>
+ #ifdef CONFIG_IP_MROUTE
+ #include <linux/mroute.h>
+ #endif
+@@ -263,8 +264,10 @@ void build_ehash_secret(void)
+               get_random_bytes(&rnd, sizeof(rnd));
+       } while (rnd == 0);
+-      if (cmpxchg(&inet_ehash_secret, 0, rnd) == 0)
++      if (cmpxchg(&inet_ehash_secret, 0, rnd) == 0) {
+               get_random_bytes(&ipv6_hash_secret, sizeof(ipv6_hash_secret));
++              net_secret_init();
++      }
+ }
+ EXPORT_SYMBOL(build_ehash_secret);
  
-       BUILD_BUG_ON(sizeof(struct inet_skb_parm) > sizeof(dummy_skb->cb));
+@@ -1699,13 +1702,9 @@ static int __init inet_init(void)
+       BUILD_BUG_ON(sizeof(struct inet_skb_parm) > FIELD_SIZEOF(struct sk_buff, cb));
  
 -      sysctl_local_reserved_ports = kzalloc(65536 / 8, GFP_KERNEL);
 -      if (!sysctl_local_reserved_ports)
@@ -86327,7 +85673,7 @@ index fcf104e..95552d4 100644
  
        rc = proto_register(&udp_prot, 1);
        if (rc)
-@@ -1832,8 +1828,6 @@ out_unregister_udp_proto:
+@@ -1814,8 +1813,6 @@ out_unregister_udp_proto:
        proto_unregister(&udp_prot);
  out_unregister_tcp_proto:
        proto_unregister(&tcp_prot);
@@ -86337,10 +85683,10 @@ index fcf104e..95552d4 100644
  }
  
 diff --git a/net/ipv4/ah4.c b/net/ipv4/ah4.c
-index a69b4e4..dbccba5 100644
+index 2e7f194..0fa4d6d 100644
 --- a/net/ipv4/ah4.c
 +++ b/net/ipv4/ah4.c
-@@ -421,7 +421,7 @@ static void ah4_err(struct sk_buff *skb, u32 info)
+@@ -420,7 +420,7 @@ static void ah4_err(struct sk_buff *skb, u32 info)
                return;
  
        if (icmp_hdr(skb)->type == ICMP_DEST_UNREACH) {
@@ -86350,10 +85696,10 @@ index a69b4e4..dbccba5 100644
  
                ipv4_update_pmtu(skb, net, info, 0, 0, IPPROTO_AH, 0);
 diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
-index a8e4f26..25e5f40 100644
+index c6287cd..e9bc96a 100644
 --- a/net/ipv4/devinet.c
 +++ b/net/ipv4/devinet.c
-@@ -1763,7 +1763,7 @@ static int ipv4_doint_and_flush(ctl_table *ctl, int write,
+@@ -1992,7 +1992,7 @@ static int ipv4_doint_and_flush(ctl_table *ctl, int write,
  #define DEVINET_SYSCTL_FLUSHING_ENTRY(attr, name) \
        DEVINET_SYSCTL_COMPLEX_ENTRY(attr, name, ipv4_doint_and_flush)
  
@@ -86362,7 +85708,7 @@ index a8e4f26..25e5f40 100644
        struct ctl_table_header *sysctl_header;
        struct ctl_table devinet_vars[__IPV4_DEVCONF_MAX];
  } devinet_sysctl = {
-@@ -1881,7 +1881,7 @@ static __net_init int devinet_init_net(struct net *net)
+@@ -2110,7 +2110,7 @@ static __net_init int devinet_init_net(struct net *net)
        int err;
        struct ipv4_devconf *all, *dflt;
  #ifdef CONFIG_SYSCTL
@@ -86371,7 +85717,7 @@ index a8e4f26..25e5f40 100644
        struct ctl_table_header *forw_hdr;
  #endif
  
-@@ -1899,7 +1899,7 @@ static __net_init int devinet_init_net(struct net *net)
+@@ -2128,7 +2128,7 @@ static __net_init int devinet_init_net(struct net *net)
                        goto err_alloc_dflt;
  
  #ifdef CONFIG_SYSCTL
@@ -86380,7 +85726,7 @@ index a8e4f26..25e5f40 100644
                if (tbl == NULL)
                        goto err_alloc_ctl;
  
-@@ -1919,7 +1919,10 @@ static __net_init int devinet_init_net(struct net *net)
+@@ -2148,7 +2148,10 @@ static __net_init int devinet_init_net(struct net *net)
                goto err_reg_dflt;
  
        err = -ENOMEM;
@@ -86392,7 +85738,7 @@ index a8e4f26..25e5f40 100644
        if (forw_hdr == NULL)
                goto err_reg_ctl;
        net->ipv4.forw_hdr = forw_hdr;
-@@ -1935,8 +1938,7 @@ err_reg_ctl:
+@@ -2164,8 +2167,7 @@ err_reg_ctl:
  err_reg_dflt:
        __devinet_sysctl_unregister(all);
  err_reg_all:
@@ -86403,7 +85749,7 @@ index a8e4f26..25e5f40 100644
  #endif
        if (dflt != &ipv4_devconf_dflt)
 diff --git a/net/ipv4/esp4.c b/net/ipv4/esp4.c
-index 3b4f0cd..8cb864c 100644
+index 4cfe34d..a6ba66e 100644
 --- a/net/ipv4/esp4.c
 +++ b/net/ipv4/esp4.c
 @@ -503,7 +503,7 @@ static void esp4_err(struct sk_buff *skb, u32 info)
@@ -86416,10 +85762,10 @@ index 3b4f0cd..8cb864c 100644
  
                ipv4_update_pmtu(skb, net, info, 0, 0, IPPROTO_ESP, 0);
 diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c
-index 5cd75e2..f57ef39 100644
+index eb4bb12..ee4ec7d 100644
 --- a/net/ipv4/fib_frontend.c
 +++ b/net/ipv4/fib_frontend.c
-@@ -1020,12 +1020,12 @@ static int fib_inetaddr_event(struct notifier_block *this, unsigned long event,
+@@ -1017,12 +1017,12 @@ static int fib_inetaddr_event(struct notifier_block *this, unsigned long event,
  #ifdef CONFIG_IP_ROUTE_MULTIPATH
                fib_sync_up(dev);
  #endif
@@ -86434,7 +85780,7 @@ index 5cd75e2..f57ef39 100644
                if (ifa->ifa_dev->ifa_list == NULL) {
                        /* Last address was deleted from this interface.
                         * Disable IP.
-@@ -1061,7 +1061,7 @@ static int fib_netdev_event(struct notifier_block *this, unsigned long event, vo
+@@ -1058,7 +1058,7 @@ static int fib_netdev_event(struct notifier_block *this, unsigned long event, vo
  #ifdef CONFIG_IP_ROUTE_MULTIPATH
                fib_sync_up(dev);
  #endif
@@ -86444,10 +85790,10 @@ index 5cd75e2..f57ef39 100644
                break;
        case NETDEV_DOWN:
 diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c
-index 4797a80..2bd54e9 100644
+index 8f6cb7a..34507f9 100644
 --- a/net/ipv4/fib_semantics.c
 +++ b/net/ipv4/fib_semantics.c
-@@ -767,7 +767,7 @@ __be32 fib_info_update_nh_saddr(struct net *net, struct fib_nh *nh)
+@@ -765,7 +765,7 @@ __be32 fib_info_update_nh_saddr(struct net *net, struct fib_nh *nh)
        nh->nh_saddr = inet_select_addr(nh->nh_dev,
                                        nh->nh_gw,
                                        nh->nh_parent->fib_scope);
@@ -86457,7 +85803,7 @@ index 4797a80..2bd54e9 100644
        return nh->nh_saddr;
  }
 diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c
-index d0670f0..744ac80 100644
+index 786d97a..1889c0d 100644
 --- a/net/ipv4/inet_connection_sock.c
 +++ b/net/ipv4/inet_connection_sock.c
 @@ -37,7 +37,7 @@ struct local_ports sysctl_local_ports __read_mostly = {
@@ -86470,7 +85816,7 @@ index d0670f0..744ac80 100644
  
  void inet_get_local_port_range(int *low, int *high)
 diff --git a/net/ipv4/inet_hashtables.c b/net/ipv4/inet_hashtables.c
-index fa3ae81..0dbe6b8 100644
+index 6af375a..c493c74 100644
 --- a/net/ipv4/inet_hashtables.c
 +++ b/net/ipv4/inet_hashtables.c
 @@ -18,12 +18,15 @@
@@ -86489,7 +85835,7 @@ index fa3ae81..0dbe6b8 100644
  /*
   * Allocate and initialize a new local port bind bucket.
   * The bindhash mutex for snum's hash chain must be held here.
-@@ -540,6 +543,8 @@ ok:
+@@ -554,6 +557,8 @@ ok:
                        twrefcnt += inet_twsk_bind_unhash(tw, hinfo);
                spin_unlock(&head->lock);
  
@@ -86514,10 +85860,10 @@ index 000e3d2..5472da3 100644
                                        secure_ip_id(daddr->addr.a4) :
                                        secure_ipv6_id(daddr->addr.a6));
 diff --git a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c
-index a8fc332..4ca4ca65 100644
+index 52c273e..579060b 100644
 --- a/net/ipv4/ip_fragment.c
 +++ b/net/ipv4/ip_fragment.c
-@@ -319,7 +319,7 @@ static inline int ip_frag_too_far(struct ipq *qp)
+@@ -311,7 +311,7 @@ static inline int ip_frag_too_far(struct ipq *qp)
                return 0;
  
        start = qp->rid;
@@ -86526,7 +85872,7 @@ index a8fc332..4ca4ca65 100644
        qp->rid = end;
  
        rc = qp->q.fragments && (end - start) > max;
-@@ -786,12 +786,11 @@ static struct ctl_table ip4_frags_ctl_table[] = {
+@@ -788,12 +788,11 @@ static struct ctl_table ip4_frags_ctl_table[] = {
  
  static int __net_init ip4_frags_ns_ctl_register(struct net *net)
  {
@@ -86541,7 +85887,7 @@ index a8fc332..4ca4ca65 100644
                if (table == NULL)
                        goto err_alloc;
  
-@@ -802,9 +801,10 @@ static int __net_init ip4_frags_ns_ctl_register(struct net *net)
+@@ -804,9 +803,10 @@ static int __net_init ip4_frags_ns_ctl_register(struct net *net)
                /* Don't export sysctls to unprivileged users */
                if (net->user_ns != &init_user_ns)
                        table[0].procname = NULL;
@@ -86554,7 +85900,7 @@ index a8fc332..4ca4ca65 100644
        if (hdr == NULL)
                goto err_reg;
  
-@@ -812,8 +812,7 @@ static int __net_init ip4_frags_ns_ctl_register(struct net *net)
+@@ -814,8 +814,7 @@ static int __net_init ip4_frags_ns_ctl_register(struct net *net)
        return 0;
  
  err_reg:
@@ -86565,7 +85911,7 @@ index a8fc332..4ca4ca65 100644
        return -ENOMEM;
  }
 diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
-index a85062b..2958a9b 100644
+index 91d66db..4af7d99 100644
 --- a/net/ipv4/ip_gre.c
 +++ b/net/ipv4/ip_gre.c
 @@ -124,7 +124,7 @@ static bool log_ecn_error = true;
@@ -86577,7 +85923,7 @@ index a85062b..2958a9b 100644
  static int ipgre_tunnel_init(struct net_device *dev);
  static void ipgre_tunnel_setup(struct net_device *dev);
  static int ipgre_tunnel_bind_dev(struct net_device *dev);
-@@ -1753,7 +1753,7 @@ static const struct nla_policy ipgre_policy[IFLA_GRE_MAX + 1] = {
+@@ -1823,7 +1823,7 @@ static const struct nla_policy ipgre_policy[IFLA_GRE_MAX + 1] = {
        [IFLA_GRE_PMTUDISC]     = { .type = NLA_U8 },
  };
  
@@ -86586,7 +85932,7 @@ index a85062b..2958a9b 100644
        .kind           = "gre",
        .maxtype        = IFLA_GRE_MAX,
        .policy         = ipgre_policy,
-@@ -1766,7 +1766,7 @@ static struct rtnl_link_ops ipgre_link_ops __read_mostly = {
+@@ -1836,7 +1836,7 @@ static struct rtnl_link_ops ipgre_link_ops __read_mostly = {
        .fill_info      = ipgre_fill_info,
  };
  
@@ -86641,7 +85987,7 @@ index c3a4233..1412161 100644
        .maxtype        = IFLA_VTI_MAX,
        .policy         = vti_policy,
 diff --git a/net/ipv4/ipcomp.c b/net/ipv4/ipcomp.c
-index 9a46dae..5f793a0 100644
+index f01d1b1..8fe03ad 100644
 --- a/net/ipv4/ipcomp.c
 +++ b/net/ipv4/ipcomp.c
 @@ -48,7 +48,7 @@ static void ipcomp4_err(struct sk_buff *skb, u32 info)
@@ -86654,7 +86000,7 @@ index 9a46dae..5f793a0 100644
  
                ipv4_update_pmtu(skb, net, info, 0, 0, IPPROTO_COMP, 0);
 diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c
-index a2e50ae..e152b7c 100644
+index bf6c5cf..ab2e9c6 100644
 --- a/net/ipv4/ipconfig.c
 +++ b/net/ipv4/ipconfig.c
 @@ -323,7 +323,7 @@ static int __init ic_devinet_ioctl(unsigned int cmd, struct ifreq *arg)
@@ -86685,7 +86031,7 @@ index a2e50ae..e152b7c 100644
        return res;
  }
 diff --git a/net/ipv4/ipip.c b/net/ipv4/ipip.c
-index 191fc24..1b3b804 100644
+index 8f024d4..8b3500c 100644
 --- a/net/ipv4/ipip.c
 +++ b/net/ipv4/ipip.c
 @@ -138,7 +138,7 @@ struct ipip_net {
@@ -86697,7 +86043,7 @@ index 191fc24..1b3b804 100644
  
  static struct rtnl_link_stats64 *ipip_get_stats64(struct net_device *dev,
                                                  struct rtnl_link_stats64 *tot)
-@@ -972,7 +972,7 @@ static const struct nla_policy ipip_policy[IFLA_IPTUN_MAX + 1] = {
+@@ -974,7 +974,7 @@ static const struct nla_policy ipip_policy[IFLA_IPTUN_MAX + 1] = {
        [IFLA_IPTUN_PMTUDISC]           = { .type = NLA_U8 },
  };
  
@@ -86707,7 +86053,7 @@ index 191fc24..1b3b804 100644
        .maxtype        = IFLA_IPTUN_MAX,
        .policy         = ipip_policy,
 diff --git a/net/ipv4/netfilter/arp_tables.c b/net/ipv4/netfilter/arp_tables.c
-index 3ea4127..849297b 100644
+index 7dc6a97..229c61b 100644
 --- a/net/ipv4/netfilter/arp_tables.c
 +++ b/net/ipv4/netfilter/arp_tables.c
 @@ -879,14 +879,14 @@ static int compat_table_info(const struct xt_table_info *info,
@@ -86756,7 +86102,7 @@ index 3ea4127..849297b 100644
  
        case ARPT_SO_GET_ENTRIES:
 diff --git a/net/ipv4/netfilter/ip_tables.c b/net/ipv4/netfilter/ip_tables.c
-index 17c5e06..1b91206 100644
+index 3efcf87..5247916 100644
 --- a/net/ipv4/netfilter/ip_tables.c
 +++ b/net/ipv4/netfilter/ip_tables.c
 @@ -1068,14 +1068,14 @@ static int compat_table_info(const struct xt_table_info *info,
@@ -86805,7 +86151,7 @@ index 17c5e06..1b91206 100644
  
        case IPT_SO_GET_ENTRIES:
 diff --git a/net/ipv4/ping.c b/net/ipv4/ping.c
-index dc454cc..5bb917f 100644
+index 2e91006..f084394 100644
 --- a/net/ipv4/ping.c
 +++ b/net/ipv4/ping.c
 @@ -844,7 +844,7 @@ static void ping_format_sock(struct sock *sp, struct seq_file *f,
@@ -86818,10 +86164,10 @@ index dc454cc..5bb917f 100644
  
  static int ping_seq_show(struct seq_file *seq, void *v)
 diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c
-index 6f08991..55867ad 100644
+index dd44e0a..06dcca4 100644
 --- a/net/ipv4/raw.c
 +++ b/net/ipv4/raw.c
-@@ -311,7 +311,7 @@ static int raw_rcv_skb(struct sock *sk, struct sk_buff *skb)
+@@ -309,7 +309,7 @@ static int raw_rcv_skb(struct sock *sk, struct sk_buff *skb)
  int raw_rcv(struct sock *sk, struct sk_buff *skb)
  {
        if (!xfrm4_policy_check(sk, XFRM_POLICY_IN, skb)) {
@@ -86830,7 +86176,7 @@ index 6f08991..55867ad 100644
                kfree_skb(skb);
                return NET_RX_DROP;
        }
-@@ -747,16 +747,20 @@ static int raw_init(struct sock *sk)
+@@ -745,16 +745,20 @@ static int raw_init(struct sock *sk)
  
  static int raw_seticmpfilter(struct sock *sk, char __user *optval, int optlen)
  {
@@ -86852,7 +86198,7 @@ index 6f08991..55867ad 100644
  
        if (get_user(len, optlen))
                goto out;
-@@ -766,8 +770,8 @@ static int raw_geticmpfilter(struct sock *sk, char __user *optval, int __user *o
+@@ -764,8 +768,8 @@ static int raw_geticmpfilter(struct sock *sk, char __user *optval, int __user *o
        if (len > sizeof(struct icmp_filter))
                len = sizeof(struct icmp_filter);
        ret = -EFAULT;
@@ -86863,7 +86209,7 @@ index 6f08991..55867ad 100644
                goto out;
        ret = 0;
  out:  return ret;
-@@ -998,7 +1002,7 @@ static void raw_sock_seq_show(struct seq_file *seq, struct sock *sp, int i)
+@@ -994,7 +998,7 @@ static void raw_sock_seq_show(struct seq_file *seq, struct sock *sp, int i)
                0, 0L, 0,
                from_kuid_munged(seq_user_ns(seq), sock_i_uid(sp)),
                0, sock_i_ino(sp),
@@ -86873,10 +86219,10 @@ index 6f08991..55867ad 100644
  
  static int raw_seq_show(struct seq_file *seq, void *v)
 diff --git a/net/ipv4/route.c b/net/ipv4/route.c
-index a0fcc47..32e2c89 100644
+index 6e28514..5e1b055 100644
 --- a/net/ipv4/route.c
 +++ b/net/ipv4/route.c
-@@ -2552,34 +2552,34 @@ static struct ctl_table ipv4_route_flush_table[] = {
+@@ -2553,34 +2553,34 @@ static struct ctl_table ipv4_route_flush_table[] = {
                .maxlen         = sizeof(int),
                .mode           = 0200,
                .proc_handler   = ipv4_sysctl_rtcache_flush,
@@ -86919,7 +86265,7 @@ index a0fcc47..32e2c89 100644
  err_dup:
        return -ENOMEM;
  }
-@@ -2602,7 +2602,7 @@ static __net_initdata struct pernet_operations sysctl_route_ops = {
+@@ -2603,7 +2603,7 @@ static __net_initdata struct pernet_operations sysctl_route_ops = {
  
  static __net_init int rt_genid_init(struct net *net)
  {
@@ -86929,10 +86275,10 @@ index a0fcc47..32e2c89 100644
                         sizeof(net->ipv4.dev_addr_genid));
        return 0;
 diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c
-index d84400b..62e066e 100644
+index 960fd29..d55bf64 100644
 --- a/net/ipv4/sysctl_net_ipv4.c
 +++ b/net/ipv4/sysctl_net_ipv4.c
-@@ -54,7 +54,7 @@ static int ipv4_local_port_range(ctl_table *table, int write,
+@@ -55,7 +55,7 @@ static int ipv4_local_port_range(ctl_table *table, int write,
  {
        int ret;
        int range[2];
@@ -86941,7 +86287,7 @@ index d84400b..62e066e 100644
                .data = &range,
                .maxlen = sizeof(range),
                .mode = table->mode,
-@@ -107,7 +107,7 @@ static int ipv4_ping_group_range(ctl_table *table, int write,
+@@ -108,7 +108,7 @@ static int ipv4_ping_group_range(ctl_table *table, int write,
        int ret;
        gid_t urange[2];
        kgid_t low, high;
@@ -86950,7 +86296,7 @@ index d84400b..62e066e 100644
                .data = &urange,
                .maxlen = sizeof(urange),
                .mode = table->mode,
-@@ -138,7 +138,7 @@ static int proc_tcp_congestion_control(ctl_table *ctl, int write,
+@@ -139,7 +139,7 @@ static int proc_tcp_congestion_control(ctl_table *ctl, int write,
                                       void __user *buffer, size_t *lenp, loff_t *ppos)
  {
        char val[TCP_CA_NAME_MAX];
@@ -86959,7 +86305,7 @@ index d84400b..62e066e 100644
                .data = val,
                .maxlen = TCP_CA_NAME_MAX,
        };
-@@ -157,7 +157,7 @@ static int proc_tcp_available_congestion_control(ctl_table *ctl,
+@@ -158,7 +158,7 @@ static int proc_tcp_available_congestion_control(ctl_table *ctl,
                                                 void __user *buffer, size_t *lenp,
                                                 loff_t *ppos)
  {
@@ -86968,7 +86314,7 @@ index d84400b..62e066e 100644
        int ret;
  
        tbl.data = kmalloc(tbl.maxlen, GFP_USER);
-@@ -174,7 +174,7 @@ static int proc_allowed_congestion_control(ctl_table *ctl,
+@@ -175,7 +175,7 @@ static int proc_allowed_congestion_control(ctl_table *ctl,
                                           void __user *buffer, size_t *lenp,
                                           loff_t *ppos)
  {
@@ -86977,7 +86323,7 @@ index d84400b..62e066e 100644
        int ret;
  
        tbl.data = kmalloc(tbl.maxlen, GFP_USER);
-@@ -200,15 +200,17 @@ static int ipv4_tcp_mem(ctl_table *ctl, int write,
+@@ -201,15 +201,17 @@ static int ipv4_tcp_mem(ctl_table *ctl, int write,
        struct mem_cgroup *memcg;
  #endif
  
@@ -86998,16 +86344,16 @@ index d84400b..62e066e 100644
        }
  
        ret = proc_doulongvec_minmax(&tmp, write, buffer, lenp, ppos);
-@@ -235,7 +237,7 @@ static int ipv4_tcp_mem(ctl_table *ctl, int write,
- int proc_tcp_fastopen_key(ctl_table *ctl, int write, void __user *buffer,
-                         size_t *lenp, loff_t *ppos)
+@@ -236,7 +238,7 @@ static int ipv4_tcp_mem(ctl_table *ctl, int write,
static int proc_tcp_fastopen_key(ctl_table *ctl, int write, void __user *buffer,
+                                size_t *lenp, loff_t *ppos)
  {
 -      ctl_table tbl = { .maxlen = (TCP_FASTOPEN_KEY_LENGTH * 2 + 10) };
 +      ctl_table_no_const tbl = { .maxlen = (TCP_FASTOPEN_KEY_LENGTH * 2 + 10) };
        struct tcp_fastopen_context *ctxt;
        int ret;
        u32  user_key[4]; /* 16 bytes, matching TCP_FASTOPEN_KEY_LENGTH */
-@@ -476,7 +478,7 @@ static struct ctl_table ipv4_table[] = {
+@@ -477,7 +479,7 @@ static struct ctl_table ipv4_table[] = {
        },
        {
                .procname       = "ip_local_reserved_ports",
@@ -87016,7 +86362,7 @@ index d84400b..62e066e 100644
                .maxlen         = 65536,
                .mode           = 0644,
                .proc_handler   = proc_do_large_bitmap,
-@@ -860,11 +862,10 @@ static struct ctl_table ipv4_net_table[] = {
+@@ -856,11 +858,10 @@ static struct ctl_table ipv4_net_table[] = {
  
  static __net_init int ipv4_sysctl_init_net(struct net *net)
  {
@@ -87030,7 +86376,7 @@ index d84400b..62e066e 100644
                if (table == NULL)
                        goto err_alloc;
  
-@@ -897,15 +898,17 @@ static __net_init int ipv4_sysctl_init_net(struct net *net)
+@@ -895,15 +896,17 @@ static __net_init int ipv4_sysctl_init_net(struct net *net)
  
        tcp_init_mem(net);
  
@@ -87051,7 +86397,7 @@ index d84400b..62e066e 100644
  err_alloc:
        return -ENOMEM;
  }
-@@ -927,16 +930,6 @@ static __net_initdata struct pernet_operations ipv4_sysctl_ops = {
+@@ -925,16 +928,6 @@ static __net_initdata struct pernet_operations ipv4_sysctl_ops = {
  static __init int sysctl_ipv4_init(void)
  {
        struct ctl_table_header *hdr;
@@ -87069,10 +86415,10 @@ index d84400b..62e066e 100644
        hdr = register_net_sysctl(&init_net, "net/ipv4", ipv4_table);
        if (hdr == NULL)
 diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
-index 9841a71..ef60409 100644
+index 13b9c08..d33a8d0 100644
 --- a/net/ipv4/tcp_input.c
 +++ b/net/ipv4/tcp_input.c
-@@ -4730,7 +4730,7 @@ static struct sk_buff *tcp_collapse_one(struct sock *sk, struct sk_buff *skb,
+@@ -4724,7 +4724,7 @@ static struct sk_buff *tcp_collapse_one(struct sock *sk, struct sk_buff *skb,
   * simplifies code)
   */
  static void
@@ -87081,7 +86427,7 @@ index 9841a71..ef60409 100644
             struct sk_buff *head, struct sk_buff *tail,
             u32 start, u32 end)
  {
-@@ -5847,6 +5847,7 @@ discard:
+@@ -5838,6 +5838,7 @@ discard:
            tcp_paws_reject(&tp->rx_opt, 0))
                goto discard_and_undo;
  
@@ -87089,7 +86435,7 @@ index 9841a71..ef60409 100644
        if (th->syn) {
                /* We see SYN without ACK. It is attempt of
                 * simultaneous connect with crossed SYNs.
-@@ -5897,6 +5898,7 @@ discard:
+@@ -5888,6 +5889,7 @@ discard:
                goto discard;
  #endif
        }
@@ -87097,7 +86443,7 @@ index 9841a71..ef60409 100644
        /* "fifth, if neither of the SYN or RST bits is set then
         * drop the segment and return."
         */
-@@ -5941,7 +5943,7 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb,
+@@ -5932,7 +5934,7 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb,
                        goto discard;
  
                if (th->syn) {
@@ -87107,7 +86453,7 @@ index 9841a71..ef60409 100644
                        if (icsk->icsk_af_ops->conn_request(sk, skb) < 0)
                                return 1;
 diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
-index d9130a9..00328ff 100644
+index d09203c..fd5cc91 100644
 --- a/net/ipv4/tcp_ipv4.c
 +++ b/net/ipv4/tcp_ipv4.c
 @@ -90,6 +90,10 @@ int sysctl_tcp_low_latency __read_mostly;
@@ -87121,7 +86467,7 @@ index d9130a9..00328ff 100644
  #ifdef CONFIG_TCP_MD5SIG
  static int tcp_v4_md5_hash_hdr(char *md5_hash, const struct tcp_md5sig_key *key,
                               __be32 daddr, __be32 saddr, const struct tcphdr *th);
-@@ -1895,6 +1899,9 @@ int tcp_v4_do_rcv(struct sock *sk, struct sk_buff *skb)
+@@ -1897,6 +1901,9 @@ int tcp_v4_do_rcv(struct sock *sk, struct sk_buff *skb)
        return 0;
  
  reset:
@@ -87131,7 +86477,7 @@ index d9130a9..00328ff 100644
        tcp_v4_send_reset(rsk, skb);
  discard:
        kfree_skb(skb);
-@@ -1994,12 +2001,19 @@ int tcp_v4_rcv(struct sk_buff *skb)
+@@ -1996,12 +2003,19 @@ int tcp_v4_rcv(struct sk_buff *skb)
        TCP_SKB_CB(skb)->sacked  = 0;
  
        sk = __inet_lookup_skb(&tcp_hashinfo, skb, th->source, th->dest);
@@ -87154,7 +86500,7 @@ index d9130a9..00328ff 100644
  
        if (unlikely(iph->ttl < inet_sk(sk)->min_ttl)) {
                NET_INC_STATS_BH(net, LINUX_MIB_TCPMINTTLDROP);
-@@ -2050,6 +2064,10 @@ no_tcp_socket:
+@@ -2052,6 +2066,10 @@ no_tcp_socket:
  bad_packet:
                TCP_INC_STATS_BH(net, TCP_MIB_INERRS);
        } else {
@@ -87166,7 +86512,7 @@ index d9130a9..00328ff 100644
        }
  
 diff --git a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c
-index f35f2df..ccb5ca6 100644
+index 2f672e7..b8895e9 100644
 --- a/net/ipv4/tcp_minisocks.c
 +++ b/net/ipv4/tcp_minisocks.c
 @@ -27,6 +27,10 @@
@@ -87180,7 +86526,7 @@ index f35f2df..ccb5ca6 100644
  int sysctl_tcp_syncookies __read_mostly = 1;
  EXPORT_SYMBOL(sysctl_tcp_syncookies);
  
-@@ -742,7 +746,10 @@ embryonic_reset:
+@@ -749,7 +753,10 @@ embryonic_reset:
                 * avoid becoming vulnerable to outside attack aiming at
                 * resetting legit local connections.
                 */
@@ -87193,7 +86539,7 @@ index f35f2df..ccb5ca6 100644
                reqsk_fastopen_remove(sk, req, true);
                tcp_reset(sk);
 diff --git a/net/ipv4/tcp_probe.c b/net/ipv4/tcp_probe.c
-index 4526fe6..1a34e43 100644
+index d4943f6..e7a74a5 100644
 --- a/net/ipv4/tcp_probe.c
 +++ b/net/ipv4/tcp_probe.c
 @@ -204,7 +204,7 @@ static ssize_t tcpprobe_read(struct file *file, char __user *buf,
@@ -87235,7 +86581,7 @@ index b78aac3..e18230b 100644
                                  syn_set ? 0 : icsk->icsk_user_timeout, syn_set)) {
                /* Has it gone just too far? */
 diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
-index 1f4d405..3524677 100644
+index 0a073a2..ddf6279 100644
 --- a/net/ipv4/udp.c
 +++ b/net/ipv4/udp.c
 @@ -87,6 +87,7 @@
@@ -87257,7 +86603,7 @@ index 1f4d405..3524677 100644
  struct udp_table udp_table __read_mostly;
  EXPORT_SYMBOL(udp_table);
  
-@@ -569,6 +574,9 @@ found:
+@@ -594,6 +599,9 @@ found:
        return s;
  }
  
@@ -87267,7 +86613,7 @@ index 1f4d405..3524677 100644
  /*
   * This routine is called by the ICMP module when it gets some
   * sort of error condition.  If err < 0 then the socket should
-@@ -864,9 +872,18 @@ int udp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
+@@ -889,9 +897,18 @@ int udp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
                dport = usin->sin_port;
                if (dport == 0)
                        return -EINVAL;
@@ -87286,7 +86632,7 @@ index 1f4d405..3524677 100644
                daddr = inet->inet_daddr;
                dport = inet->inet_dport;
                /* Open fast path for connected socket.
-@@ -1108,7 +1125,7 @@ static unsigned int first_packet_length(struct sock *sk)
+@@ -1133,7 +1150,7 @@ static unsigned int first_packet_length(struct sock *sk)
                udp_lib_checksum_complete(skb)) {
                UDP_INC_STATS_BH(sock_net(sk), UDP_MIB_INERRORS,
                                 IS_UDPLITE(sk));
@@ -87295,7 +86641,7 @@ index 1f4d405..3524677 100644
                __skb_unlink(skb, rcvq);
                __skb_queue_tail(&list_kill, skb);
        }
-@@ -1194,6 +1211,10 @@ try_again:
+@@ -1219,6 +1236,10 @@ try_again:
        if (!skb)
                goto out;
  
@@ -87306,7 +86652,7 @@ index 1f4d405..3524677 100644
        ulen = skb->len - sizeof(struct udphdr);
        copied = len;
        if (copied > ulen)
-@@ -1227,7 +1248,7 @@ try_again:
+@@ -1252,7 +1273,7 @@ try_again:
        if (unlikely(err)) {
                trace_kfree_skb(skb, udp_recvmsg);
                if (!peeked) {
@@ -87315,7 +86661,7 @@ index 1f4d405..3524677 100644
                        UDP_INC_STATS_USER(sock_net(sk),
                                           UDP_MIB_INERRORS, is_udplite);
                }
-@@ -1510,7 +1531,7 @@ int udp_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
+@@ -1535,7 +1556,7 @@ int udp_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
  
  drop:
        UDP_INC_STATS_BH(sock_net(sk), UDP_MIB_INERRORS, is_udplite);
@@ -87324,7 +86670,7 @@ index 1f4d405..3524677 100644
        kfree_skb(skb);
        return -1;
  }
-@@ -1529,7 +1550,7 @@ static void flush_stack(struct sock **stack, unsigned int count,
+@@ -1554,7 +1575,7 @@ static void flush_stack(struct sock **stack, unsigned int count,
                        skb1 = (i == final) ? skb : skb_clone(skb, GFP_ATOMIC);
  
                if (!skb1) {
@@ -87333,7 +86679,7 @@ index 1f4d405..3524677 100644
                        UDP_INC_STATS_BH(sock_net(sk), UDP_MIB_RCVBUFERRORS,
                                         IS_UDPLITE(sk));
                        UDP_INC_STATS_BH(sock_net(sk), UDP_MIB_INERRORS,
-@@ -1698,6 +1719,9 @@ int __udp4_lib_rcv(struct sk_buff *skb, struct udp_table *udptable,
+@@ -1723,6 +1744,9 @@ int __udp4_lib_rcv(struct sk_buff *skb, struct udp_table *udptable,
                goto csum_error;
  
        UDP_INC_STATS_BH(net, UDP_MIB_NOPORTS, proto == IPPROTO_UDPLITE);
@@ -87343,7 +86689,7 @@ index 1f4d405..3524677 100644
        icmp_send(skb, ICMP_DEST_UNREACH, ICMP_PORT_UNREACH, 0);
  
        /*
-@@ -2120,7 +2144,7 @@ static void udp4_format_sock(struct sock *sp, struct seq_file *f,
+@@ -2152,7 +2176,7 @@ static void udp4_format_sock(struct sock *sp, struct seq_file *f,
                from_kuid_munged(seq_user_ns(f), sock_i_uid(sp)),
                0, sock_i_ino(sp),
                atomic_read(&sp->sk_refcnt), sp,
@@ -87352,11 +86698,50 @@ index 1f4d405..3524677 100644
  }
  
  int udp4_seq_show(struct seq_file *seq, void *v)
+diff --git a/net/ipv4/xfrm4_policy.c b/net/ipv4/xfrm4_policy.c
+index 9a459be..086b866 100644
+--- a/net/ipv4/xfrm4_policy.c
++++ b/net/ipv4/xfrm4_policy.c
+@@ -264,19 +264,18 @@ static struct ctl_table xfrm4_policy_table[] = {
+ static int __net_init xfrm4_net_init(struct net *net)
+ {
+-      struct ctl_table *table;
++      ctl_table_no_const *table = NULL;
+       struct ctl_table_header *hdr;
+-      table = xfrm4_policy_table;
+       if (!net_eq(net, &init_net)) {
+-              table = kmemdup(table, sizeof(xfrm4_policy_table), GFP_KERNEL);
++              table = kmemdup(xfrm4_policy_table, sizeof(xfrm4_policy_table), GFP_KERNEL);
+               if (!table)
+                       goto err_alloc;
+               table[0].data = &net->xfrm.xfrm4_dst_ops.gc_thresh;
+-      }
+-
+-      hdr = register_net_sysctl(net, "net/ipv4", table);
++              hdr = register_net_sysctl(net, "net/ipv4", table);
++      } else
++              hdr = register_net_sysctl(net, "net/ipv4", xfrm4_policy_table);
+       if (!hdr)
+               goto err_reg;
+@@ -284,8 +283,7 @@ static int __net_init xfrm4_net_init(struct net *net)
+       return 0;
+ err_reg:
+-      if (!net_eq(net, &init_net))
+-              kfree(table);
++      kfree(table);
+ err_alloc:
+       return -ENOMEM;
+ }
 diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
-index a36d17e..96d099f 100644
+index dae802c..bfa4baa 100644
 --- a/net/ipv6/addrconf.c
 +++ b/net/ipv6/addrconf.c
-@@ -2272,7 +2272,7 @@ int addrconf_set_dstaddr(struct net *net, void __user *arg)
+@@ -2274,7 +2274,7 @@ int addrconf_set_dstaddr(struct net *net, void __user *arg)
                p.iph.ihl = 5;
                p.iph.protocol = IPPROTO_IPV6;
                p.iph.ttl = 64;
@@ -87365,7 +86750,7 @@ index a36d17e..96d099f 100644
  
                if (ops->ndo_do_ioctl) {
                        mm_segment_t oldfs = get_fs();
-@@ -4388,7 +4388,7 @@ int addrconf_sysctl_forward(ctl_table *ctl, int write,
+@@ -4410,7 +4410,7 @@ int addrconf_sysctl_forward(ctl_table *ctl, int write,
        int *valp = ctl->data;
        int val = *valp;
        loff_t pos = *ppos;
@@ -87374,7 +86759,7 @@ index a36d17e..96d099f 100644
        int ret;
  
        /*
-@@ -4470,7 +4470,7 @@ int addrconf_sysctl_disable(ctl_table *ctl, int write,
+@@ -4492,7 +4492,7 @@ int addrconf_sysctl_disable(ctl_table *ctl, int write,
        int *valp = ctl->data;
        int val = *valp;
        loff_t pos = *ppos;
@@ -87397,7 +86782,7 @@ index fff5bdd..15194fb 100644
        table = kmemdup(ipv6_icmp_table_template,
                        sizeof(ipv6_icmp_table_template),
 diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c
-index 131dd09..f7ed64f 100644
+index 95d13c7..791fe2f 100644
 --- a/net/ipv6/ip6_gre.c
 +++ b/net/ipv6/ip6_gre.c
 @@ -73,7 +73,7 @@ struct ip6gre_net {
@@ -87437,7 +86822,7 @@ index 131dd09..f7ed64f 100644
        .maxtype        = IFLA_GRE_MAX,
        .policy         = ip6gre_policy,
 diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c
-index a14f28b..b4b8956 100644
+index fff83cb..82d49dd 100644
 --- a/net/ipv6/ip6_tunnel.c
 +++ b/net/ipv6/ip6_tunnel.c
 @@ -87,7 +87,7 @@ static u32 HASH(const struct in6_addr *addr1, const struct in6_addr *addr2)
@@ -87449,7 +86834,7 @@ index a14f28b..b4b8956 100644
  
  static int ip6_tnl_net_id __read_mostly;
  struct ip6_tnl_net {
-@@ -1686,7 +1686,7 @@ static const struct nla_policy ip6_tnl_policy[IFLA_IPTUN_MAX + 1] = {
+@@ -1684,7 +1684,7 @@ static const struct nla_policy ip6_tnl_policy[IFLA_IPTUN_MAX + 1] = {
        [IFLA_IPTUN_PROTO]              = { .type = NLA_U8 },
  };
  
@@ -87472,7 +86857,7 @@ index d1e2e8e..51c19ae 100644
                msg.msg_flags = flags;
  
 diff --git a/net/ipv6/netfilter/ip6_tables.c b/net/ipv6/netfilter/ip6_tables.c
-index 125a90d..2a11f36 100644
+index 341b54a..591e8ed 100644
 --- a/net/ipv6/netfilter/ip6_tables.c
 +++ b/net/ipv6/netfilter/ip6_tables.c
 @@ -1076,14 +1076,14 @@ static int compat_table_info(const struct xt_table_info *info,
@@ -87520,21 +86905,8 @@ index 125a90d..2a11f36 100644
                break;
  
        case IP6T_SO_GET_ENTRIES:
-diff --git a/net/ipv6/netfilter/ip6t_NPT.c b/net/ipv6/netfilter/ip6t_NPT.c
-index 83acc14..0ea43c7 100644
---- a/net/ipv6/netfilter/ip6t_NPT.c
-+++ b/net/ipv6/netfilter/ip6t_NPT.c
-@@ -57,7 +57,7 @@ static bool ip6t_npt_map_pfx(const struct ip6t_npt_tginfo *npt,
-               if (pfx_len - i >= 32)
-                       mask = 0;
-               else
--                      mask = htonl(~((1 << (pfx_len - i)) - 1));
-+                      mask = htonl((1 << (i - pfx_len + 32)) - 1);
-               idx = i / 32;
-               addr->s6_addr32[idx] &= mask;
 diff --git a/net/ipv6/netfilter/nf_conntrack_reasm.c b/net/ipv6/netfilter/nf_conntrack_reasm.c
-index 2f3a018..8bca195 100644
+index 6700069..1e50f42 100644
 --- a/net/ipv6/netfilter/nf_conntrack_reasm.c
 +++ b/net/ipv6/netfilter/nf_conntrack_reasm.c
 @@ -89,12 +89,11 @@ static struct ctl_table nf_ct_frag6_sysctl_table[] = {
@@ -87553,9 +86925,9 @@ index 2f3a018..8bca195 100644
                if (table == NULL)
                        goto err_alloc;
 @@ -102,9 +101,9 @@ static int nf_ct_frag6_sysctl_register(struct net *net)
-               table[0].data = &net->ipv6.frags.high_thresh;
-               table[1].data = &net->ipv6.frags.low_thresh;
-               table[2].data = &net->ipv6.frags.timeout;
+               table[0].data = &net->nf_frag.frags.timeout;
+               table[1].data = &net->nf_frag.frags.low_thresh;
+               table[2].data = &net->nf_frag.frags.high_thresh;
 -      }
 -
 -      hdr = register_net_sysctl(net, "net/netfilter", table);
@@ -87576,10 +86948,10 @@ index 2f3a018..8bca195 100644
        return -ENOMEM;
  }
 diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c
-index 70fa814..d70c28c 100644
+index 330b5e7..796fbf1 100644
 --- a/net/ipv6/raw.c
 +++ b/net/ipv6/raw.c
-@@ -379,7 +379,7 @@ static inline int rawv6_rcv_skb(struct sock *sk, struct sk_buff *skb)
+@@ -378,7 +378,7 @@ static inline int rawv6_rcv_skb(struct sock *sk, struct sk_buff *skb)
  {
        if ((raw6_sk(sk)->checksum || rcu_access_pointer(sk->sk_filter)) &&
            skb_checksum_complete(skb)) {
@@ -87588,7 +86960,7 @@ index 70fa814..d70c28c 100644
                kfree_skb(skb);
                return NET_RX_DROP;
        }
-@@ -407,7 +407,7 @@ int rawv6_rcv(struct sock *sk, struct sk_buff *skb)
+@@ -406,7 +406,7 @@ int rawv6_rcv(struct sock *sk, struct sk_buff *skb)
        struct raw6_sock *rp = raw6_sk(sk);
  
        if (!xfrm6_policy_check(sk, XFRM_POLICY_IN, skb)) {
@@ -87597,7 +86969,7 @@ index 70fa814..d70c28c 100644
                kfree_skb(skb);
                return NET_RX_DROP;
        }
-@@ -431,7 +431,7 @@ int rawv6_rcv(struct sock *sk, struct sk_buff *skb)
+@@ -430,7 +430,7 @@ int rawv6_rcv(struct sock *sk, struct sk_buff *skb)
  
        if (inet->hdrincl) {
                if (skb_checksum_complete(skb)) {
@@ -87606,7 +86978,7 @@ index 70fa814..d70c28c 100644
                        kfree_skb(skb);
                        return NET_RX_DROP;
                }
-@@ -604,7 +604,7 @@ out:
+@@ -603,7 +603,7 @@ out:
        return err;
  }
  
@@ -87615,7 +86987,7 @@ index 70fa814..d70c28c 100644
                        struct flowi6 *fl6, struct dst_entry **dstp,
                        unsigned int flags)
  {
-@@ -916,12 +916,15 @@ do_confirm:
+@@ -915,12 +915,15 @@ do_confirm:
  static int rawv6_seticmpfilter(struct sock *sk, int level, int optname,
                               char __user *optval, int optlen)
  {
@@ -87632,7 +87004,7 @@ index 70fa814..d70c28c 100644
                return 0;
        default:
                return -ENOPROTOOPT;
-@@ -934,6 +937,7 @@ static int rawv6_geticmpfilter(struct sock *sk, int level, int optname,
+@@ -933,6 +936,7 @@ static int rawv6_geticmpfilter(struct sock *sk, int level, int optname,
                               char __user *optval, int __user *optlen)
  {
        int len;
@@ -87640,7 +87012,7 @@ index 70fa814..d70c28c 100644
  
        switch (optname) {
        case ICMPV6_FILTER:
-@@ -945,7 +949,8 @@ static int rawv6_geticmpfilter(struct sock *sk, int level, int optname,
+@@ -944,7 +948,8 @@ static int rawv6_geticmpfilter(struct sock *sk, int level, int optname,
                        len = sizeof(struct icmp6_filter);
                if (put_user(len, optlen))
                        return -EFAULT;
@@ -87650,7 +87022,7 @@ index 70fa814..d70c28c 100644
                        return -EFAULT;
                return 0;
        default:
-@@ -1253,7 +1258,7 @@ static void raw6_sock_seq_show(struct seq_file *seq, struct sock *sp, int i)
+@@ -1252,7 +1257,7 @@ static void raw6_sock_seq_show(struct seq_file *seq, struct sock *sp, int i)
                   from_kuid_munged(seq_user_ns(seq), sock_i_uid(sp)),
                   0,
                   sock_i_ino(sp),
@@ -87660,10 +87032,10 @@ index 70fa814..d70c28c 100644
  
  static int raw6_seq_show(struct seq_file *seq, void *v)
 diff --git a/net/ipv6/reassembly.c b/net/ipv6/reassembly.c
-index d9ba8a2..f3f9e14 100644
+index 0ba10e5..c14a4f6 100644
 --- a/net/ipv6/reassembly.c
 +++ b/net/ipv6/reassembly.c
-@@ -608,12 +608,11 @@ static struct ctl_table ip6_frags_ctl_table[] = {
+@@ -602,12 +602,11 @@ static struct ctl_table ip6_frags_ctl_table[] = {
  
  static int __net_init ip6_frags_ns_sysctl_register(struct net *net)
  {
@@ -87678,7 +87050,7 @@ index d9ba8a2..f3f9e14 100644
                if (table == NULL)
                        goto err_alloc;
  
-@@ -624,9 +623,10 @@ static int __net_init ip6_frags_ns_sysctl_register(struct net *net)
+@@ -618,9 +617,10 @@ static int __net_init ip6_frags_ns_sysctl_register(struct net *net)
                /* Don't export sysctls to unprivileged users */
                if (net->user_ns != &init_user_ns)
                        table[0].procname = NULL;
@@ -87691,7 +87063,7 @@ index d9ba8a2..f3f9e14 100644
        if (hdr == NULL)
                goto err_reg;
  
-@@ -634,8 +634,7 @@ static int __net_init ip6_frags_ns_sysctl_register(struct net *net)
+@@ -628,8 +628,7 @@ static int __net_init ip6_frags_ns_sysctl_register(struct net *net)
        return 0;
  
  err_reg:
@@ -87702,10 +87074,10 @@ index d9ba8a2..f3f9e14 100644
        return -ENOMEM;
  }
 diff --git a/net/ipv6/route.c b/net/ipv6/route.c
-index 5845613..3af8fc7 100644
+index e5fe004..9fe3e8e 100644
 --- a/net/ipv6/route.c
 +++ b/net/ipv6/route.c
-@@ -2966,7 +2966,7 @@ ctl_table ipv6_route_table_template[] = {
+@@ -2881,7 +2881,7 @@ ctl_table ipv6_route_table_template[] = {
  
  struct ctl_table * __net_init ipv6_route_sysctl_init(struct net *net)
  {
@@ -87715,19 +87087,19 @@ index 5845613..3af8fc7 100644
        table = kmemdup(ipv6_route_table_template,
                        sizeof(ipv6_route_table_template),
 diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c
-index cfba99b..20ca511 100644
+index 02f96dc..4a5a6e5 100644
 --- a/net/ipv6/sit.c
 +++ b/net/ipv6/sit.c
-@@ -72,7 +72,7 @@ MODULE_PARM_DESC(log_ecn_error, "Log packets received with corrupted ECN");
- static int ipip6_tunnel_init(struct net_device *dev);
- static void ipip6_tunnel_setup(struct net_device *dev);
+@@ -74,7 +74,7 @@ static void ipip6_tunnel_setup(struct net_device *dev);
  static void ipip6_dev_free(struct net_device *dev);
+ static bool check_6rd(struct ip_tunnel *tunnel, const struct in6_addr *v6dst,
+                     __be32 *v4dst);
 -static struct rtnl_link_ops sit_link_ops __read_mostly;
 +static struct rtnl_link_ops sit_link_ops;
  
  static int sit_net_id __read_mostly;
  struct sit_net {
-@@ -1463,7 +1463,7 @@ static const struct nla_policy ipip6_policy[IFLA_IPTUN_MAX + 1] = {
+@@ -1486,7 +1486,7 @@ static const struct nla_policy ipip6_policy[IFLA_IPTUN_MAX + 1] = {
  #endif
  };
  
@@ -87750,7 +87122,7 @@ index e85c48b..b8268d3 100644
        struct ctl_table *ipv6_icmp_table;
        int err;
 diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
-index 8d19346..e47216f 100644
+index 0fce928..c52a518 100644
 --- a/net/ipv6/tcp_ipv6.c
 +++ b/net/ipv6/tcp_ipv6.c
 @@ -103,6 +103,10 @@ static void inet6_sk_rx_dst_set(struct sock *sk, const struct sk_buff *skb)
@@ -87764,7 +87136,7 @@ index 8d19346..e47216f 100644
  static void tcp_v6_hash(struct sock *sk)
  {
        if (sk->sk_state != TCP_CLOSE) {
-@@ -1440,6 +1444,9 @@ static int tcp_v6_do_rcv(struct sock *sk, struct sk_buff *skb)
+@@ -1446,6 +1450,9 @@ static int tcp_v6_do_rcv(struct sock *sk, struct sk_buff *skb)
        return 0;
  
  reset:
@@ -87774,7 +87146,7 @@ index 8d19346..e47216f 100644
        tcp_v6_send_reset(sk, skb);
  discard:
        if (opt_skb)
-@@ -1521,12 +1528,20 @@ static int tcp_v6_rcv(struct sk_buff *skb)
+@@ -1527,12 +1534,20 @@ static int tcp_v6_rcv(struct sk_buff *skb)
        TCP_SKB_CB(skb)->sacked = 0;
  
        sk = __inet6_lookup_skb(&tcp_hashinfo, skb, th->source, th->dest);
@@ -87797,7 +87169,7 @@ index 8d19346..e47216f 100644
  
        if (hdr->hop_limit < inet6_sk(sk)->min_hopcount) {
                NET_INC_STATS_BH(net, LINUX_MIB_TCPMINTTLDROP);
-@@ -1575,6 +1590,10 @@ no_tcp_socket:
+@@ -1581,6 +1596,10 @@ no_tcp_socket:
  bad_packet:
                TCP_INC_STATS_BH(net, TCP_MIB_INERRS);
        } else {
@@ -87809,10 +87181,10 @@ index 8d19346..e47216f 100644
        }
  
 diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
-index fb08329..2d6919e 100644
+index 27f0f8e..949e7ee 100644
 --- a/net/ipv6/udp.c
 +++ b/net/ipv6/udp.c
-@@ -51,6 +51,10 @@
+@@ -52,6 +52,10 @@
  #include <trace/events/skb.h>
  #include "udp_impl.h"
  
@@ -87823,7 +87195,7 @@ index fb08329..2d6919e 100644
  int ipv6_rcv_saddr_equal(const struct sock *sk, const struct sock *sk2)
  {
        const struct in6_addr *sk_rcv_saddr6 = &inet6_sk(sk)->rcv_saddr;
-@@ -395,7 +399,7 @@ try_again:
+@@ -419,7 +423,7 @@ try_again:
        if (unlikely(err)) {
                trace_kfree_skb(skb, udpv6_recvmsg);
                if (!peeked) {
@@ -87832,7 +87204,7 @@ index fb08329..2d6919e 100644
                        if (is_udp4)
                                UDP_INC_STATS_USER(sock_net(sk),
                                                   UDP_MIB_INERRORS,
-@@ -633,7 +637,7 @@ int udpv6_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
+@@ -657,7 +661,7 @@ int udpv6_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
        return rc;
  drop:
        UDP6_INC_STATS_BH(sock_net(sk), UDP_MIB_INERRORS, is_udplite);
@@ -87841,7 +87213,7 @@ index fb08329..2d6919e 100644
        kfree_skb(skb);
        return -1;
  }
-@@ -691,7 +695,7 @@ static void flush_stack(struct sock **stack, unsigned int count,
+@@ -715,7 +719,7 @@ static void flush_stack(struct sock **stack, unsigned int count,
                if (likely(skb1 == NULL))
                        skb1 = (i == final) ? skb : skb_clone(skb, GFP_ATOMIC);
                if (!skb1) {
@@ -87850,7 +87222,7 @@ index fb08329..2d6919e 100644
                        UDP6_INC_STATS_BH(sock_net(sk), UDP_MIB_RCVBUFERRORS,
                                          IS_UDPLITE(sk));
                        UDP6_INC_STATS_BH(sock_net(sk), UDP_MIB_INERRORS,
-@@ -862,6 +866,9 @@ int __udp6_lib_rcv(struct sk_buff *skb, struct udp_table *udptable,
+@@ -852,6 +856,9 @@ int __udp6_lib_rcv(struct sk_buff *skb, struct udp_table *udptable,
                goto discard;
  
        UDP6_INC_STATS_BH(net, UDP_MIB_NOPORTS, proto == IPPROTO_UDPLITE);
@@ -87860,7 +87232,7 @@ index fb08329..2d6919e 100644
        icmpv6_send(skb, ICMPV6_DEST_UNREACH, ICMPV6_PORT_UNREACH, 0);
  
        kfree_skb(skb);
-@@ -1379,7 +1386,7 @@ static void udp6_sock_seq_show(struct seq_file *seq, struct sock *sp, int bucket
+@@ -1377,7 +1384,7 @@ static void udp6_sock_seq_show(struct seq_file *seq, struct sock *sp, int bucket
                   0,
                   sock_i_ino(sp),
                   atomic_read(&sp->sk_refcnt), sp,
@@ -87869,11 +87241,50 @@ index fb08329..2d6919e 100644
  }
  
  int udp6_seq_show(struct seq_file *seq, void *v)
+diff --git a/net/ipv6/xfrm6_policy.c b/net/ipv6/xfrm6_policy.c
+index 23ed03d..465a71d 100644
+--- a/net/ipv6/xfrm6_policy.c
++++ b/net/ipv6/xfrm6_policy.c
+@@ -324,19 +324,19 @@ static struct ctl_table xfrm6_policy_table[] = {
+ static int __net_init xfrm6_net_init(struct net *net)
+ {
+-      struct ctl_table *table;
++      ctl_table_no_const *table = NULL;
+       struct ctl_table_header *hdr;
+-      table = xfrm6_policy_table;
+       if (!net_eq(net, &init_net)) {
+-              table = kmemdup(table, sizeof(xfrm6_policy_table), GFP_KERNEL);
++              table = kmemdup(xfrm6_policy_table, sizeof(xfrm6_policy_table), GFP_KERNEL);
+               if (!table)
+                       goto err_alloc;
+               table[0].data = &net->xfrm.xfrm6_dst_ops.gc_thresh;
+-      }
++              hdr = register_net_sysctl(net, "net/ipv6", table);
++      } else
++              hdr = register_net_sysctl(net, "net/ipv6", xfrm6_policy_table);
+-      hdr = register_net_sysctl(net, "net/ipv6", table);
+       if (!hdr)
+               goto err_reg;
+@@ -344,8 +344,7 @@ static int __net_init xfrm6_net_init(struct net *net)
+       return 0;
+ err_reg:
+-      if (!net_eq(net, &init_net))
+-              kfree(table);
++      kfree(table);
+ err_alloc:
+       return -ENOMEM;
+ }
 diff --git a/net/irda/ircomm/ircomm_tty.c b/net/irda/ircomm/ircomm_tty.c
-index a68c88c..d55b0c5 100644
+index 362ba47..66196f4 100644
 --- a/net/irda/ircomm/ircomm_tty.c
 +++ b/net/irda/ircomm/ircomm_tty.c
-@@ -312,12 +312,12 @@ static int ircomm_tty_block_til_ready(struct ircomm_tty_cb *self,
+@@ -319,11 +319,11 @@ static int ircomm_tty_block_til_ready(struct ircomm_tty_cb *self,
        add_wait_queue(&port->open_wait, &wait);
  
        IRDA_DEBUG(2, "%s(%d):block_til_ready before block on %s open_count=%d\n",
@@ -87881,14 +87292,13 @@ index a68c88c..d55b0c5 100644
 +            __FILE__, __LINE__, tty->driver->name, atomic_read(&port->count));
  
        spin_lock_irqsave(&port->lock, flags);
-       if (!tty_hung_up_p(filp)) {
-               extra_count = 1;
+       if (!tty_hung_up_p(filp))
 -              port->count--;
 +              atomic_dec(&port->count);
-       }
-       spin_unlock_irqrestore(&port->lock, flags);
        port->blocked_open++;
-@@ -353,7 +353,7 @@ static int ircomm_tty_block_til_ready(struct ircomm_tty_cb *self,
+       spin_unlock_irqrestore(&port->lock, flags);
+@@ -358,7 +358,7 @@ static int ircomm_tty_block_til_ready(struct ircomm_tty_cb *self,
                }
  
                IRDA_DEBUG(1, "%s(%d):block_til_ready blocking on %s open_count=%d\n",
@@ -87897,15 +87307,14 @@ index a68c88c..d55b0c5 100644
  
                schedule();
        }
-@@ -364,13 +364,13 @@ static int ircomm_tty_block_til_ready(struct ircomm_tty_cb *self,
-       if (extra_count) {
-               /* ++ is not atomic, so this should be protected - Jean II */
-               spin_lock_irqsave(&port->lock, flags);
+@@ -368,12 +368,12 @@ static int ircomm_tty_block_til_ready(struct ircomm_tty_cb *self,
+       spin_lock_irqsave(&port->lock, flags);
+       if (!tty_hung_up_p(filp))
 -              port->count++;
 +              atomic_inc(&port->count);
-               spin_unlock_irqrestore(&port->lock, flags);
-       }
        port->blocked_open--;
+       spin_unlock_irqrestore(&port->lock, flags);
  
        IRDA_DEBUG(1, "%s(%d):block_til_ready after blocking on %s open_count=%d\n",
 -            __FILE__, __LINE__, tty->driver->name, port->count);
@@ -87913,7 +87322,7 @@ index a68c88c..d55b0c5 100644
  
        if (!retval)
                port->flags |= ASYNC_NORMAL_ACTIVE;
-@@ -444,12 +444,12 @@ static int ircomm_tty_open(struct tty_struct *tty, struct file *filp)
+@@ -447,12 +447,12 @@ static int ircomm_tty_open(struct tty_struct *tty, struct file *filp)
  
        /* ++ is not atomic, so this should be protected - Jean II */
        spin_lock_irqsave(&self->port.lock, flags);
@@ -87927,8 +87336,8 @@ index a68c88c..d55b0c5 100644
 +                 self->line, atomic_read(&self->port.count));
  
        /* Not really used by us, but lets do it anyway */
-       tty->low_latency = (self->port.flags & ASYNC_LOW_LATENCY) ? 1 : 0;
-@@ -986,7 +986,7 @@ static void ircomm_tty_hangup(struct tty_struct *tty)
+       self->port.low_latency = (self->port.flags & ASYNC_LOW_LATENCY) ? 1 : 0;
+@@ -989,7 +989,7 @@ static void ircomm_tty_hangup(struct tty_struct *tty)
                tty_kref_put(port->tty);
        }
        port->tty = NULL;
@@ -87937,7 +87346,7 @@ index a68c88c..d55b0c5 100644
        spin_unlock_irqrestore(&port->lock, flags);
  
        wake_up_interruptible(&port->open_wait);
-@@ -1343,7 +1343,7 @@ static void ircomm_tty_line_info(struct ircomm_tty_cb *self, struct seq_file *m)
+@@ -1346,7 +1346,7 @@ static void ircomm_tty_line_info(struct ircomm_tty_cb *self, struct seq_file *m)
        seq_putc(m, '\n');
  
        seq_printf(m, "Role: %s\n", self->client ? "client" : "server");
@@ -87946,29 +87355,11 @@ index a68c88c..d55b0c5 100644
        seq_printf(m, "Max data size: %d\n", self->max_data_size);
        seq_printf(m, "Max header size: %d\n", self->max_header_size);
  
-diff --git a/net/irda/iriap.c b/net/irda/iriap.c
-index e71e85b..29340a9 100644
---- a/net/irda/iriap.c
-+++ b/net/irda/iriap.c
-@@ -495,8 +495,11 @@ static void iriap_getvaluebyclass_confirm(struct iriap_cb *self,
- /*            case CS_ISO_8859_9: */
- /*            case CS_UNICODE: */
-               default:
--                      IRDA_DEBUG(0, "%s(), charset %s, not supported\n",
--                                 __func__, ias_charset_types[charset]);
-+                      IRDA_DEBUG(0, "%s(), charset [%d] %s, not supported\n",
-+                                 __func__, charset,
-+                                 charset < ARRAY_SIZE(ias_charset_types) ?
-+                                      ias_charset_types[charset] :
-+                                      "(unknown)");
-                       /* Aborting, close connection! */
-                       iriap_disconnect_request(self);
 diff --git a/net/iucv/af_iucv.c b/net/iucv/af_iucv.c
-index cd6f7a9..e63fe89 100644
+index 206ce6d..cfb27cd 100644
 --- a/net/iucv/af_iucv.c
 +++ b/net/iucv/af_iucv.c
-@@ -782,10 +782,10 @@ static int iucv_sock_autobind(struct sock *sk)
+@@ -773,10 +773,10 @@ static int iucv_sock_autobind(struct sock *sk)
  
        write_lock_bh(&iucv_sk_list.lock);
  
@@ -87982,7 +87373,7 @@ index cd6f7a9..e63fe89 100644
  
        write_unlock_bh(&iucv_sk_list.lock);
 diff --git a/net/iucv/iucv.c b/net/iucv/iucv.c
-index df08250..02021fe 100644
+index 4fe76ff..426a904 100644
 --- a/net/iucv/iucv.c
 +++ b/net/iucv/iucv.c
 @@ -690,7 +690,7 @@ static int __cpuinit iucv_cpu_notify(struct notifier_block *self,
@@ -87995,10 +87386,10 @@ index df08250..02021fe 100644
  };
  
 diff --git a/net/key/af_key.c b/net/key/af_key.c
-index 5b426a6..970032b 100644
+index 5b1e5af..2358147 100644
 --- a/net/key/af_key.c
 +++ b/net/key/af_key.c
-@@ -3019,10 +3019,10 @@ static int pfkey_send_policy_notify(struct xfrm_policy *xp, int dir, const struc
+@@ -3041,10 +3041,10 @@ static int pfkey_send_policy_notify(struct xfrm_policy *xp, int dir, const struc
  static u32 get_acqseq(void)
  {
        u32 res;
@@ -88012,10 +87403,10 @@ index 5b426a6..970032b 100644
        return res;
  }
 diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
-index 0479c64..9e72ff4 100644
+index 843d8c4..cb04fa1 100644
 --- a/net/mac80211/cfg.c
 +++ b/net/mac80211/cfg.c
-@@ -790,7 +790,7 @@ static int ieee80211_set_monitor_channel(struct wiphy *wiphy,
+@@ -799,7 +799,7 @@ static int ieee80211_set_monitor_channel(struct wiphy *wiphy,
                        ret = ieee80211_vif_use_channel(sdata, chandef,
                                        IEEE80211_CHANCTX_EXCLUSIVE);
                }
@@ -88024,34 +87415,7 @@ index 0479c64..9e72ff4 100644
                local->_oper_channel = chandef->chan;
                local->_oper_channel_type = cfg80211_get_chandef_type(chandef);
                ieee80211_hw_config(local, 0);
-@@ -2499,7 +2499,7 @@ static int ieee80211_cancel_roc(struct ieee80211_local *local,
-                       list_del(&dep->list);
-                       mutex_unlock(&local->mtx);
--                      ieee80211_roc_notify_destroy(dep);
-+                      ieee80211_roc_notify_destroy(dep, true);
-                       return 0;
-               }
-@@ -2539,7 +2539,7 @@ static int ieee80211_cancel_roc(struct ieee80211_local *local,
-                       ieee80211_start_next_roc(local);
-               mutex_unlock(&local->mtx);
--              ieee80211_roc_notify_destroy(found);
-+              ieee80211_roc_notify_destroy(found, true);
-       } else {
-               /* work may be pending so use it all the time */
-               found->abort = true;
-@@ -2549,6 +2549,8 @@ static int ieee80211_cancel_roc(struct ieee80211_local *local,
-               /* work will clean up etc */
-               flush_delayed_work(&found->work);
-+              WARN_ON(!found->to_be_freed);
-+              kfree(found);
-       }
-       return 0;
-@@ -2716,7 +2718,7 @@ static void ieee80211_mgmt_frame_register(struct wiphy *wiphy,
+@@ -2834,7 +2834,7 @@ static void ieee80211_mgmt_frame_register(struct wiphy *wiphy,
                else
                        local->probe_req_reg--;
  
@@ -88060,8 +87424,19 @@ index 0479c64..9e72ff4 100644
                        break;
  
                ieee80211_queue_work(&local->hw, &local->reconfig_filter);
+@@ -3297,8 +3297,8 @@ static int ieee80211_cfg_get_channel(struct wiphy *wiphy,
+       if (chanctx_conf) {
+               *chandef = chanctx_conf->def;
+               ret = 0;
+-      } else if (local->open_count > 0 &&
+-                 local->open_count == local->monitors &&
++      } else if (local_read(&local->open_count) > 0 &&
++                 local_read(&local->open_count) == local->monitors &&
+                  sdata->vif.type == NL80211_IFTYPE_MONITOR) {
+               if (local->use_chanctx)
+                       *chandef = local->monitor_chandef;
 diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
-index 2ed065c..bec0c2b 100644
+index 5672533..6738c93 100644
 --- a/net/mac80211/ieee80211_i.h
 +++ b/net/mac80211/ieee80211_i.h
 @@ -28,6 +28,7 @@
@@ -88072,15 +87447,7 @@ index 2ed065c..bec0c2b 100644
  #include "key.h"
  #include "sta_info.h"
  #include "debug.h"
-@@ -346,6 +347,7 @@ struct ieee80211_roc_work {
-       struct ieee80211_channel *chan;
-       bool started, abort, hw_begun, notified;
-+      bool to_be_freed;
-       unsigned long hw_start_time;
-@@ -909,7 +911,7 @@ struct ieee80211_local {
+@@ -897,7 +898,7 @@ struct ieee80211_local {
        /* also used to protect ampdu_ac_queue and amdpu_ac_stop_refcnt */
        spinlock_t queue_stop_reason_lock;
  
@@ -88089,20 +87456,11 @@ index 2ed065c..bec0c2b 100644
        int monitors, cooked_mntrs;
        /* number of interfaces with corresponding FIF_ flags */
        int fif_fcsfail, fif_plcpfail, fif_control, fif_other_bss, fif_pspoll,
-@@ -1363,7 +1365,7 @@ void ieee80211_offchannel_return(struct ieee80211_local *local);
- void ieee80211_roc_setup(struct ieee80211_local *local);
- void ieee80211_start_next_roc(struct ieee80211_local *local);
- void ieee80211_roc_purge(struct ieee80211_sub_if_data *sdata);
--void ieee80211_roc_notify_destroy(struct ieee80211_roc_work *roc);
-+void ieee80211_roc_notify_destroy(struct ieee80211_roc_work *roc, bool free);
- void ieee80211_sw_roc_work(struct work_struct *work);
- void ieee80211_handle_roc_started(struct ieee80211_roc_work *roc);
 diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
-index 8be854e..ad72a69 100644
+index d51ca9d..042c35f 100644
 --- a/net/mac80211/iface.c
 +++ b/net/mac80211/iface.c
-@@ -546,7 +546,7 @@ int ieee80211_do_open(struct wireless_dev *wdev, bool coming_up)
+@@ -495,7 +495,7 @@ int ieee80211_do_open(struct wireless_dev *wdev, bool coming_up)
                break;
        }
  
@@ -88111,7 +87469,7 @@ index 8be854e..ad72a69 100644
                res = drv_start(local);
                if (res)
                        goto err_del_bss;
-@@ -591,7 +591,7 @@ int ieee80211_do_open(struct wireless_dev *wdev, bool coming_up)
+@@ -540,7 +540,7 @@ int ieee80211_do_open(struct wireless_dev *wdev, bool coming_up)
                        break;
                }
  
@@ -88120,8 +87478,8 @@ index 8be854e..ad72a69 100644
                        res = ieee80211_add_virtual_monitor(local);
                        if (res)
                                goto err_stop;
-@@ -699,7 +699,7 @@ int ieee80211_do_open(struct wireless_dev *wdev, bool coming_up)
-       mutex_unlock(&local->mtx);
+@@ -649,7 +649,7 @@ int ieee80211_do_open(struct wireless_dev *wdev, bool coming_up)
+               atomic_inc(&local->iff_promiscs);
  
        if (coming_up)
 -              local->open_count++;
@@ -88129,7 +87487,7 @@ index 8be854e..ad72a69 100644
  
        if (hw_reconf_flags)
                ieee80211_hw_config(local, hw_reconf_flags);
-@@ -713,7 +713,7 @@ int ieee80211_do_open(struct wireless_dev *wdev, bool coming_up)
+@@ -663,7 +663,7 @@ int ieee80211_do_open(struct wireless_dev *wdev, bool coming_up)
   err_del_interface:
        drv_remove_interface(local, sdata);
   err_stop:
@@ -88138,7 +87496,7 @@ index 8be854e..ad72a69 100644
                drv_stop(local);
   err_del_bss:
        sdata->bss = NULL;
-@@ -827,7 +827,7 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata,
+@@ -806,7 +806,7 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata,
        }
  
        if (going_down)
@@ -88147,7 +87505,7 @@ index 8be854e..ad72a69 100644
  
        switch (sdata->vif.type) {
        case NL80211_IFTYPE_AP_VLAN:
-@@ -884,7 +884,7 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata,
+@@ -871,7 +871,7 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata,
  
        ieee80211_recalc_ps(local, -1);
  
@@ -88156,7 +87514,7 @@ index 8be854e..ad72a69 100644
                if (local->ops->napi_poll)
                        napi_disable(&local->napi);
                ieee80211_clear_tx_pending(local);
-@@ -910,7 +910,7 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata,
+@@ -897,7 +897,7 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata,
        }
        spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags);
  
@@ -88166,10 +87524,10 @@ index 8be854e..ad72a69 100644
  }
  
 diff --git a/net/mac80211/main.c b/net/mac80211/main.c
-index 1b087ff..bf600e9 100644
+index 1a8591b..ef5db54 100644
 --- a/net/mac80211/main.c
 +++ b/net/mac80211/main.c
-@@ -181,7 +181,7 @@ int ieee80211_hw_config(struct ieee80211_local *local, u32 changed)
+@@ -180,7 +180,7 @@ int ieee80211_hw_config(struct ieee80211_local *local, u32 changed)
                changed &= ~(IEEE80211_CONF_CHANGE_CHANNEL |
                             IEEE80211_CONF_CHANGE_POWER);
  
@@ -88178,89 +87536,11 @@ index 1b087ff..bf600e9 100644
                ret = drv_config(local, changed);
                /*
                 * Goal:
-diff --git a/net/mac80211/offchannel.c b/net/mac80211/offchannel.c
-index a3ad4c3..7acbdaa 100644
---- a/net/mac80211/offchannel.c
-+++ b/net/mac80211/offchannel.c
-@@ -299,10 +299,13 @@ void ieee80211_start_next_roc(struct ieee80211_local *local)
-       }
- }
--void ieee80211_roc_notify_destroy(struct ieee80211_roc_work *roc)
-+void ieee80211_roc_notify_destroy(struct ieee80211_roc_work *roc, bool free)
- {
-       struct ieee80211_roc_work *dep, *tmp;
-+      if (WARN_ON(roc->to_be_freed))
-+              return;
-+
-       /* was never transmitted */
-       if (roc->frame) {
-               cfg80211_mgmt_tx_status(&roc->sdata->wdev,
-@@ -318,9 +321,12 @@ void ieee80211_roc_notify_destroy(struct ieee80211_roc_work *roc)
-                                                  GFP_KERNEL);
-       list_for_each_entry_safe(dep, tmp, &roc->dependents, list)
--              ieee80211_roc_notify_destroy(dep);
-+              ieee80211_roc_notify_destroy(dep, true);
--      kfree(roc);
-+      if (free)
-+              kfree(roc);
-+      else
-+              roc->to_be_freed = true;
- }
- void ieee80211_sw_roc_work(struct work_struct *work)
-@@ -333,6 +339,9 @@ void ieee80211_sw_roc_work(struct work_struct *work)
-       mutex_lock(&local->mtx);
-+      if (roc->to_be_freed)
-+              goto out_unlock;
-+
-       if (roc->abort)
-               goto finish;
-@@ -372,7 +381,7 @@ void ieee80211_sw_roc_work(struct work_struct *work)
-  finish:
-               list_del(&roc->list);
-               started = roc->started;
--              ieee80211_roc_notify_destroy(roc);
-+              ieee80211_roc_notify_destroy(roc, !roc->abort);
-               if (started) {
-                       drv_flush(local, false);
-@@ -412,7 +421,7 @@ static void ieee80211_hw_roc_done(struct work_struct *work)
-       list_del(&roc->list);
--      ieee80211_roc_notify_destroy(roc);
-+      ieee80211_roc_notify_destroy(roc, true);
-       /* if there's another roc, start it now */
-       ieee80211_start_next_roc(local);
-@@ -462,12 +471,14 @@ void ieee80211_roc_purge(struct ieee80211_sub_if_data *sdata)
-       list_for_each_entry_safe(roc, tmp, &tmp_list, list) {
-               if (local->ops->remain_on_channel) {
-                       list_del(&roc->list);
--                      ieee80211_roc_notify_destroy(roc);
-+                      ieee80211_roc_notify_destroy(roc, true);
-               } else {
-                       ieee80211_queue_delayed_work(&local->hw, &roc->work, 0);
-                       /* work will clean up etc */
-                       flush_delayed_work(&roc->work);
-+                      WARN_ON(!roc->to_be_freed);
-+                      kfree(roc);
-               }
-       }
 diff --git a/net/mac80211/pm.c b/net/mac80211/pm.c
-index 79a48f3..5e185c9 100644
+index 835584c..be46e67 100644
 --- a/net/mac80211/pm.c
 +++ b/net/mac80211/pm.c
-@@ -35,7 +35,7 @@ int __ieee80211_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan)
+@@ -33,7 +33,7 @@ int __ieee80211_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan)
        struct sta_info *sta;
        struct ieee80211_chanctx *ctx;
  
@@ -88269,7 +87549,7 @@ index 79a48f3..5e185c9 100644
                goto suspend;
  
        ieee80211_scan_cancel(local);
-@@ -73,7 +73,7 @@ int __ieee80211_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan)
+@@ -75,7 +75,7 @@ int __ieee80211_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan)
        cancel_work_sync(&local->dynamic_ps_enable_work);
        del_timer_sync(&local->dynamic_ps_timer);
  
@@ -88278,7 +87558,7 @@ index 79a48f3..5e185c9 100644
        if (local->wowlan) {
                int err = drv_suspend(local, wowlan);
                if (err < 0) {
-@@ -187,7 +187,7 @@ int __ieee80211_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan)
+@@ -214,7 +214,7 @@ int __ieee80211_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan)
        mutex_unlock(&local->chanctx_mtx);
  
        /* stop hardware - this must stop RX */
@@ -88314,10 +87594,10 @@ index c97a065..ff61928 100644
  
        return p;
 diff --git a/net/mac80211/util.c b/net/mac80211/util.c
-index f11e8c5..08d0013 100644
+index 0f38f43..e53d4a8 100644
 --- a/net/mac80211/util.c
 +++ b/net/mac80211/util.c
-@@ -1380,7 +1380,7 @@ int ieee80211_reconfig(struct ieee80211_local *local)
+@@ -1388,7 +1388,7 @@ int ieee80211_reconfig(struct ieee80211_local *local)
        }
  #endif
        /* everything else happens only if HW was up & running */
@@ -88327,10 +87607,10 @@ index f11e8c5..08d0013 100644
  
        /*
 diff --git a/net/netfilter/Kconfig b/net/netfilter/Kconfig
-index 49e96df..63a51c3 100644
+index 56d22ca..87c778f 100644
 --- a/net/netfilter/Kconfig
 +++ b/net/netfilter/Kconfig
-@@ -936,6 +936,16 @@ config NETFILTER_XT_MATCH_ESP
+@@ -958,6 +958,16 @@ config NETFILTER_XT_MATCH_ESP
  
          To compile it as a module, choose M here.  If unsure, say N.
  
@@ -88348,10 +87628,10 @@ index 49e96df..63a51c3 100644
        tristate '"hashlimit" match support'
        depends on (IP6_NF_IPTABLES || IP6_NF_IPTABLES=n)
 diff --git a/net/netfilter/Makefile b/net/netfilter/Makefile
-index 3259697..54d5393 100644
+index a1abf87..dbcb7ee 100644
 --- a/net/netfilter/Makefile
 +++ b/net/netfilter/Makefile
-@@ -109,6 +109,7 @@ obj-$(CONFIG_NETFILTER_XT_MATCH_DEVGROUP) += xt_devgroup.o
+@@ -112,6 +112,7 @@ obj-$(CONFIG_NETFILTER_XT_MATCH_DEVGROUP) += xt_devgroup.o
  obj-$(CONFIG_NETFILTER_XT_MATCH_DSCP) += xt_dscp.o
  obj-$(CONFIG_NETFILTER_XT_MATCH_ECN) += xt_ecn.o
  obj-$(CONFIG_NETFILTER_XT_MATCH_ESP) += xt_esp.o
@@ -88360,10 +87640,10 @@ index 3259697..54d5393 100644
  obj-$(CONFIG_NETFILTER_XT_MATCH_HELPER) += xt_helper.o
  obj-$(CONFIG_NETFILTER_XT_MATCH_HL) += xt_hl.o
 diff --git a/net/netfilter/ipset/ip_set_core.c b/net/netfilter/ipset/ip_set_core.c
-index 6d6d8f2..a676749 100644
+index 1ba9dbc..e39f4ca 100644
 --- a/net/netfilter/ipset/ip_set_core.c
 +++ b/net/netfilter/ipset/ip_set_core.c
-@@ -1800,7 +1800,7 @@ done:
+@@ -1801,7 +1801,7 @@ done:
        return ret;
  }
  
@@ -88373,10 +87653,10 @@ index 6d6d8f2..a676749 100644
        .get_optmin     = SO_IP_SET,
        .get_optmax     = SO_IP_SET + 1,
 diff --git a/net/netfilter/ipvs/ip_vs_conn.c b/net/netfilter/ipvs/ip_vs_conn.c
-index 30e764a..c3b6a9d 100644
+index 704e514..d644cc2 100644
 --- a/net/netfilter/ipvs/ip_vs_conn.c
 +++ b/net/netfilter/ipvs/ip_vs_conn.c
-@@ -554,7 +554,7 @@ ip_vs_bind_dest(struct ip_vs_conn *cp, struct ip_vs_dest *dest)
+@@ -551,7 +551,7 @@ ip_vs_bind_dest(struct ip_vs_conn *cp, struct ip_vs_dest *dest)
        /* Increase the refcnt counter of the dest */
        atomic_inc(&dest->refcnt);
  
@@ -88385,7 +87665,7 @@ index 30e764a..c3b6a9d 100644
        if (cp->protocol != IPPROTO_UDP)
                conn_flags &= ~IP_VS_CONN_F_ONE_PACKET;
        flags = cp->flags;
-@@ -899,7 +899,7 @@ ip_vs_conn_new(const struct ip_vs_conn_param *p,
+@@ -895,7 +895,7 @@ ip_vs_conn_new(const struct ip_vs_conn_param *p,
        atomic_set(&cp->refcnt, 1);
  
        atomic_set(&cp->n_control, 0);
@@ -88394,7 +87674,7 @@ index 30e764a..c3b6a9d 100644
  
        atomic_inc(&ipvs->conn_count);
        if (flags & IP_VS_CONN_F_NO_CPORT)
-@@ -1180,7 +1180,7 @@ static inline int todrop_entry(struct ip_vs_conn *cp)
+@@ -1174,7 +1174,7 @@ static inline int todrop_entry(struct ip_vs_conn *cp)
  
        /* Don't drop the entry if its number of incoming packets is not
           located in [0, 8] */
@@ -88404,7 +87684,7 @@ index 30e764a..c3b6a9d 100644
  
        if (!todrop_rate[i]) return 0;
 diff --git a/net/netfilter/ipvs/ip_vs_core.c b/net/netfilter/ipvs/ip_vs_core.c
-index 47edf5a..235b07d 100644
+index 61f49d2..6c8c5bc 100644
 --- a/net/netfilter/ipvs/ip_vs_core.c
 +++ b/net/netfilter/ipvs/ip_vs_core.c
 @@ -559,7 +559,7 @@ int ip_vs_leave(struct ip_vs_service *svc, struct sk_buff *skb,
@@ -88416,7 +87696,7 @@ index 47edf5a..235b07d 100644
                ip_vs_conn_put(cp);
                return ret;
        }
-@@ -1691,7 +1691,7 @@ ip_vs_in(unsigned int hooknum, struct sk_buff *skb, int af)
+@@ -1689,7 +1689,7 @@ ip_vs_in(unsigned int hooknum, struct sk_buff *skb, int af)
        if (cp->flags & IP_VS_CONN_F_ONE_PACKET)
                pkts = sysctl_sync_threshold(ipvs);
        else
@@ -88426,7 +87706,7 @@ index 47edf5a..235b07d 100644
        if (ipvs->sync_state & IP_VS_STATE_MASTER)
                ip_vs_sync_conn(net, cp, pkts);
 diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c
-index ec664cb..7f34a77 100644
+index 9e2d1cc..7f8f569 100644
 --- a/net/netfilter/ipvs/ip_vs_ctl.c
 +++ b/net/netfilter/ipvs/ip_vs_ctl.c
 @@ -787,7 +787,7 @@ __ip_vs_update_dest(struct ip_vs_service *svc, struct ip_vs_dest *dest,
@@ -88447,7 +87727,7 @@ index ec664cb..7f34a77 100644
        {
                .procname       = "amemthresh",
                .maxlen         = sizeof(int),
-@@ -2081,7 +2081,7 @@ static int ip_vs_info_seq_show(struct seq_file *seq, void *v)
+@@ -2087,7 +2087,7 @@ static int ip_vs_info_seq_show(struct seq_file *seq, void *v)
                                           "      %-7s %-6d %-10d %-10d\n",
                                           &dest->addr.in6,
                                           ntohs(dest->port),
@@ -88456,7 +87736,7 @@ index ec664cb..7f34a77 100644
                                           atomic_read(&dest->weight),
                                           atomic_read(&dest->activeconns),
                                           atomic_read(&dest->inactconns));
-@@ -2092,7 +2092,7 @@ static int ip_vs_info_seq_show(struct seq_file *seq, void *v)
+@@ -2098,7 +2098,7 @@ static int ip_vs_info_seq_show(struct seq_file *seq, void *v)
                                           "%-7s %-6d %-10d %-10d\n",
                                           ntohl(dest->addr.ip),
                                           ntohs(dest->port),
@@ -88465,7 +87745,7 @@ index ec664cb..7f34a77 100644
                                           atomic_read(&dest->weight),
                                           atomic_read(&dest->activeconns),
                                           atomic_read(&dest->inactconns));
-@@ -2562,7 +2562,7 @@ __ip_vs_get_dest_entries(struct net *net, const struct ip_vs_get_dests *get,
+@@ -2568,7 +2568,7 @@ __ip_vs_get_dest_entries(struct net *net, const struct ip_vs_get_dests *get,
  
                        entry.addr = dest->addr.ip;
                        entry.port = dest->port;
@@ -88474,7 +87754,7 @@ index ec664cb..7f34a77 100644
                        entry.weight = atomic_read(&dest->weight);
                        entry.u_threshold = dest->u_threshold;
                        entry.l_threshold = dest->l_threshold;
-@@ -3098,7 +3098,7 @@ static int ip_vs_genl_fill_dest(struct sk_buff *skb, struct ip_vs_dest *dest)
+@@ -3104,7 +3104,7 @@ static int ip_vs_genl_fill_dest(struct sk_buff *skb, struct ip_vs_dest *dest)
        if (nla_put(skb, IPVS_DEST_ATTR_ADDR, sizeof(dest->addr), &dest->addr) ||
            nla_put_u16(skb, IPVS_DEST_ATTR_PORT, dest->port) ||
            nla_put_u32(skb, IPVS_DEST_ATTR_FWD_METHOD,
@@ -88483,7 +87763,7 @@ index ec664cb..7f34a77 100644
                         IP_VS_CONN_F_FWD_MASK)) ||
            nla_put_u32(skb, IPVS_DEST_ATTR_WEIGHT,
                        atomic_read(&dest->weight)) ||
-@@ -3688,7 +3688,7 @@ static int __net_init ip_vs_control_net_init_sysctl(struct net *net)
+@@ -3694,7 +3694,7 @@ static int __net_init ip_vs_control_net_init_sysctl(struct net *net)
  {
        int idx;
        struct netns_ipvs *ipvs = net_ipvs(net);
@@ -88572,7 +87852,7 @@ index ee6b7a9..f9a89f6 100644
        }
  
 diff --git a/net/netfilter/nf_conntrack_acct.c b/net/netfilter/nf_conntrack_acct.c
-index 7df424e..a527b02 100644
+index 2d3030a..7ba1c0a 100644
 --- a/net/netfilter/nf_conntrack_acct.c
 +++ b/net/netfilter/nf_conntrack_acct.c
 @@ -60,7 +60,7 @@ static struct nf_ct_ext_type acct_extend __read_mostly = {
@@ -88585,10 +87865,10 @@ index 7df424e..a527b02 100644
        table = kmemdup(acct_sysctl_table, sizeof(acct_sysctl_table),
                        GFP_KERNEL);
 diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c
-index e4a0c4f..c263f28 100644
+index c8e001a..f842a8b 100644
 --- a/net/netfilter/nf_conntrack_core.c
 +++ b/net/netfilter/nf_conntrack_core.c
-@@ -1529,6 +1529,10 @@ err_extend:
+@@ -1594,6 +1594,10 @@ void nf_conntrack_init_end(void)
  #define DYING_NULLS_VAL               ((1<<30)+1)
  #define TEMPLATE_NULLS_VAL    ((1<<30)+2)
  
@@ -88596,10 +87876,10 @@ index e4a0c4f..c263f28 100644
 +static atomic_unchecked_t conntrack_cache_id = ATOMIC_INIT(0);
 +#endif
 +
static int nf_conntrack_init_net(struct net *net)
+ int nf_conntrack_init_net(struct net *net)
  {
        int ret;
-@@ -1543,7 +1547,11 @@ static int nf_conntrack_init_net(struct net *net)
+@@ -1608,7 +1612,11 @@ int nf_conntrack_init_net(struct net *net)
                goto err_stat;
        }
  
@@ -88612,7 +87892,7 @@ index e4a0c4f..c263f28 100644
                ret = -ENOMEM;
                goto err_slabname;
 diff --git a/net/netfilter/nf_conntrack_ecache.c b/net/netfilter/nf_conntrack_ecache.c
-index faa978f..1afb18f 100644
+index b5d2eb8..61ef19a 100644
 --- a/net/netfilter/nf_conntrack_ecache.c
 +++ b/net/netfilter/nf_conntrack_ecache.c
 @@ -186,7 +186,7 @@ static struct nf_ct_ext_type event_extend __read_mostly = {
@@ -88625,10 +87905,10 @@ index faa978f..1afb18f 100644
        table = kmemdup(event_sysctl_table, sizeof(event_sysctl_table),
                        GFP_KERNEL);
 diff --git a/net/netfilter/nf_conntrack_helper.c b/net/netfilter/nf_conntrack_helper.c
-index 884f2b3..d53b33a 100644
+index 94b4b98..97cf0ad 100644
 --- a/net/netfilter/nf_conntrack_helper.c
 +++ b/net/netfilter/nf_conntrack_helper.c
-@@ -55,7 +55,7 @@ static struct ctl_table helper_sysctl_table[] = {
+@@ -56,7 +56,7 @@ static struct ctl_table helper_sysctl_table[] = {
  
  static int nf_conntrack_helper_init_sysctl(struct net *net)
  {
@@ -88638,7 +87918,7 @@ index 884f2b3..d53b33a 100644
        table = kmemdup(helper_sysctl_table, sizeof(helper_sysctl_table),
                        GFP_KERNEL);
 diff --git a/net/netfilter/nf_conntrack_proto.c b/net/netfilter/nf_conntrack_proto.c
-index 51e928d..72a413a 100644
+index 58ab405..50eb8d3 100644
 --- a/net/netfilter/nf_conntrack_proto.c
 +++ b/net/netfilter/nf_conntrack_proto.c
 @@ -51,7 +51,7 @@ nf_ct_register_sysctl(struct net *net,
@@ -88651,7 +87931,7 @@ index 51e928d..72a413a 100644
  {
        if (users > 0)
 diff --git a/net/netfilter/nf_conntrack_standalone.c b/net/netfilter/nf_conntrack_standalone.c
-index e7185c6..4ad6c9c 100644
+index fedee39..d62a93d 100644
 --- a/net/netfilter/nf_conntrack_standalone.c
 +++ b/net/netfilter/nf_conntrack_standalone.c
 @@ -470,7 +470,7 @@ static ctl_table nf_ct_netfilter_table[] = {
@@ -88661,10 +87941,10 @@ index e7185c6..4ad6c9c 100644
 -      struct ctl_table *table;
 +      ctl_table_no_const *table;
  
-       if (net_eq(net, &init_net)) {
-               nf_ct_netfilter_header =
+       table = kmemdup(nf_ct_sysctl_table, sizeof(nf_ct_sysctl_table),
+                       GFP_KERNEL);
 diff --git a/net/netfilter/nf_conntrack_timestamp.c b/net/netfilter/nf_conntrack_timestamp.c
-index 7ea8026..bc9512d 100644
+index 902fb0a..87f7fdb 100644
 --- a/net/netfilter/nf_conntrack_timestamp.c
 +++ b/net/netfilter/nf_conntrack_timestamp.c
 @@ -42,7 +42,7 @@ static struct nf_ct_ext_type tstamp_extend __read_mostly = {
@@ -88731,21 +88011,8 @@ index f042ae5..30ea486 100644
        mutex_unlock(&nf_sockopt_mutex);
  }
  EXPORT_SYMBOL(nf_unregister_sockopt);
-diff --git a/net/netfilter/nfnetlink_acct.c b/net/netfilter/nfnetlink_acct.c
-index 589d686..dc3fd5d 100644
---- a/net/netfilter/nfnetlink_acct.c
-+++ b/net/netfilter/nfnetlink_acct.c
-@@ -49,6 +49,8 @@ nfnl_acct_new(struct sock *nfnl, struct sk_buff *skb,
-               return -EINVAL;
-       acct_name = nla_data(tb[NFACCT_NAME]);
-+      if (strlen(acct_name) == 0)
-+              return -EINVAL;
-       list_for_each_entry(nfacct, &nfnl_acct_list, head) {
-               if (strncmp(nfacct->name, acct_name, NFACCT_NAME_MAX) != 0)
 diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.c
-index 92fd8ec..3f6ea4b 100644
+index f248db5..3778ad9 100644
 --- a/net/netfilter/nfnetlink_log.c
 +++ b/net/netfilter/nfnetlink_log.c
 @@ -72,7 +72,7 @@ struct nfulnl_instance {
@@ -88757,7 +88024,7 @@ index 92fd8ec..3f6ea4b 100644
  
  #define INSTANCE_BUCKETS      16
  static struct hlist_head instance_table[INSTANCE_BUCKETS];
-@@ -537,7 +537,7 @@ __build_packet_message(struct nfulnl_instance *inst,
+@@ -536,7 +536,7 @@ __build_packet_message(struct nfulnl_instance *inst,
        /* global sequence number */
        if ((inst->flags & NFULNL_CFG_F_SEQ_GLOBAL) &&
            nla_put_be32(inst->skb, NFULA_SEQ_GLOBAL,
@@ -88766,22 +88033,6 @@ index 92fd8ec..3f6ea4b 100644
                goto nla_put_failure;
  
        if (data_len) {
-diff --git a/net/netfilter/nfnetlink_queue_core.c b/net/netfilter/nfnetlink_queue_core.c
-index 3158d87..39006c9 100644
---- a/net/netfilter/nfnetlink_queue_core.c
-+++ b/net/netfilter/nfnetlink_queue_core.c
-@@ -1064,8 +1064,10 @@ static int __init nfnetlink_queue_init(void)
- #ifdef CONFIG_PROC_FS
-       if (!proc_create("nfnetlink_queue", 0440,
--                       proc_net_netfilter, &nfqnl_file_ops))
-+                       proc_net_netfilter, &nfqnl_file_ops)) {
-+              status = -ENOMEM;
-               goto cleanup_subsys;
-+      }
- #endif
-       register_netdevice_notifier(&nfqnl_dev_notifier);
 diff --git a/net/netfilter/xt_gradm.c b/net/netfilter/xt_gradm.c
 new file mode 100644
 index 0000000..c566332
@@ -88874,10 +88125,10 @@ index 4fe4fb4..87a89e5 100644
        return 0;
  }
 diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
-index c0353d5..fcb0270 100644
+index 1e3fd5b..ad397ea 100644
 --- a/net/netlink/af_netlink.c
 +++ b/net/netlink/af_netlink.c
-@@ -785,7 +785,7 @@ static void netlink_overrun(struct sock *sk)
+@@ -781,7 +781,7 @@ static void netlink_overrun(struct sock *sk)
                        sk->sk_error_report(sk);
                }
        }
@@ -88886,7 +88137,7 @@ index c0353d5..fcb0270 100644
  }
  
  static struct sock *netlink_getsockbyportid(struct sock *ssk, u32 portid)
-@@ -2071,7 +2071,7 @@ static int netlink_seq_show(struct seq_file *seq, void *v)
+@@ -2063,7 +2063,7 @@ static int netlink_seq_show(struct seq_file *seq, void *v)
                           sk_wmem_alloc_get(s),
                           nlk->cb,
                           atomic_read(&s->sk_refcnt),
@@ -88938,10 +88189,10 @@ index 5a55be3..7630745 100644
                }
        }
 diff --git a/net/netrom/af_netrom.c b/net/netrom/af_netrom.c
-index 7261eb8..44e8ac6 100644
+index 103bd70..f21aad3 100644
 --- a/net/netrom/af_netrom.c
 +++ b/net/netrom/af_netrom.c
-@@ -838,6 +838,7 @@ static int nr_getname(struct socket *sock, struct sockaddr *uaddr,
+@@ -834,6 +834,7 @@ static int nr_getname(struct socket *sock, struct sockaddr *uaddr,
        struct sock *sk = sock->sk;
        struct nr_sock *nr = nr_sk(sk);
  
@@ -88949,7 +88200,7 @@ index 7261eb8..44e8ac6 100644
        lock_sock(sk);
        if (peer != 0) {
                if (sk->sk_state != TCP_ESTABLISHED) {
-@@ -852,7 +853,6 @@ static int nr_getname(struct socket *sock, struct sockaddr *uaddr,
+@@ -848,7 +849,6 @@ static int nr_getname(struct socket *sock, struct sockaddr *uaddr,
                *uaddr_len = sizeof(struct full_sockaddr_ax25);
        } else {
                sax->fsa_ax25.sax25_family = AF_NETROM;
@@ -88958,10 +88209,10 @@ index 7261eb8..44e8ac6 100644
                *uaddr_len = sizeof(struct sockaddr_ax25);
        }
 diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
-index c111bd0..7788ff7 100644
+index f83e172..b57140d 100644
 --- a/net/packet/af_packet.c
 +++ b/net/packet/af_packet.c
-@@ -1578,7 +1578,7 @@ static int packet_rcv(struct sk_buff *skb, struct net_device *dev,
+@@ -1571,7 +1571,7 @@ static int packet_rcv(struct sk_buff *skb, struct net_device *dev,
  
        spin_lock(&sk->sk_receive_queue.lock);
        po->stats.tp_packets++;
@@ -88970,7 +88221,7 @@ index c111bd0..7788ff7 100644
        __skb_queue_tail(&sk->sk_receive_queue, skb);
        spin_unlock(&sk->sk_receive_queue.lock);
        sk->sk_data_ready(sk, skb->len);
-@@ -1587,7 +1587,7 @@ static int packet_rcv(struct sk_buff *skb, struct net_device *dev,
+@@ -1580,7 +1580,7 @@ static int packet_rcv(struct sk_buff *skb, struct net_device *dev,
  drop_n_acct:
        spin_lock(&sk->sk_receive_queue.lock);
        po->stats.tp_drops++;
@@ -88979,7 +88230,7 @@ index c111bd0..7788ff7 100644
        spin_unlock(&sk->sk_receive_queue.lock);
  
  drop_n_restore:
-@@ -2565,6 +2565,7 @@ out:
+@@ -2558,6 +2558,7 @@ out:
  
  static int packet_recv_error(struct sock *sk, struct msghdr *msg, int len)
  {
@@ -88987,7 +88238,7 @@ index c111bd0..7788ff7 100644
        struct sock_exterr_skb *serr;
        struct sk_buff *skb, *skb2;
        int copied, err;
-@@ -2586,8 +2587,9 @@ static int packet_recv_error(struct sock *sk, struct msghdr *msg, int len)
+@@ -2579,8 +2580,9 @@ static int packet_recv_error(struct sock *sk, struct msghdr *msg, int len)
        sock_recv_timestamp(msg, sk, skb);
  
        serr = SKB_EXT_ERR(skb);
@@ -88998,7 +88249,7 @@ index c111bd0..7788ff7 100644
  
        msg->msg_flags |= MSG_ERRQUEUE;
        err = copied;
-@@ -3212,7 +3214,7 @@ static int packet_getsockopt(struct socket *sock, int level, int optname,
+@@ -3205,7 +3207,7 @@ static int packet_getsockopt(struct socket *sock, int level, int optname,
        case PACKET_HDRLEN:
                if (len > sizeof(int))
                        len = sizeof(int);
@@ -89007,7 +88258,7 @@ index c111bd0..7788ff7 100644
                        return -EFAULT;
                switch (val) {
                case TPACKET_V1:
-@@ -3254,7 +3256,7 @@ static int packet_getsockopt(struct socket *sock, int level, int optname,
+@@ -3247,7 +3249,7 @@ static int packet_getsockopt(struct socket *sock, int level, int optname,
                len = lv;
        if (put_user(len, optlen))
                return -EFAULT;
@@ -89017,18 +88268,9 @@ index c111bd0..7788ff7 100644
        return 0;
  }
 diff --git a/net/phonet/af_phonet.c b/net/phonet/af_phonet.c
-index 5a940db..f0b9c12 100644
+index 5a940db..d6a502d 100644
 --- a/net/phonet/af_phonet.c
 +++ b/net/phonet/af_phonet.c
-@@ -41,7 +41,7 @@ static struct phonet_protocol *phonet_proto_get(unsigned int protocol)
- {
-       struct phonet_protocol *pp;
--      if (protocol >= PHONET_NPROTO)
-+      if (protocol < 0 || protocol >= PHONET_NPROTO)
-               return NULL;
-       rcu_read_lock();
 @@ -469,7 +469,7 @@ int __init_or_module phonet_proto_register(unsigned int protocol,
  {
        int err = 0;
@@ -89039,7 +88281,7 @@ index 5a940db..f0b9c12 100644
  
        err = proto_register(pp->prot, 1);
 diff --git a/net/phonet/pep.c b/net/phonet/pep.c
-index 576f22c..bc7a71b 100644
+index e774117..900b8b7 100644
 --- a/net/phonet/pep.c
 +++ b/net/phonet/pep.c
 @@ -388,7 +388,7 @@ static int pipe_do_rcv(struct sock *sk, struct sk_buff *skb)
@@ -89070,10 +88312,10 @@ index 576f22c..bc7a71b 100644
                        break;
                }
 diff --git a/net/phonet/socket.c b/net/phonet/socket.c
-index b7e9827..c264c85 100644
+index 1afd138..0b42453 100644
 --- a/net/phonet/socket.c
 +++ b/net/phonet/socket.c
-@@ -615,7 +615,7 @@ static int pn_sock_seq_show(struct seq_file *seq, void *v)
+@@ -612,7 +612,7 @@ static int pn_sock_seq_show(struct seq_file *seq, void *v)
                        from_kuid_munged(seq_user_ns(seq), sock_i_uid(sk)),
                        sock_i_ino(sk),
                        atomic_read(&sk->sk_refcnt), sk,
@@ -89262,10 +88504,10 @@ index 81cf5a4..b5826ff 100644
        set_fs(oldfs);
  }
 diff --git a/net/rxrpc/af_rxrpc.c b/net/rxrpc/af_rxrpc.c
-index 05996d0..5a1dfe0 100644
+index e61aa60..f07cc89 100644
 --- a/net/rxrpc/af_rxrpc.c
 +++ b/net/rxrpc/af_rxrpc.c
-@@ -39,7 +39,7 @@ static const struct proto_ops rxrpc_rpc_ops;
+@@ -40,7 +40,7 @@ static const struct proto_ops rxrpc_rpc_ops;
  __be32 rxrpc_epoch;
  
  /* current debugging ID */
@@ -89552,11 +88794,24 @@ index 391a245..296b3d7 100644
  }
  
  /* Initialize IPv6 support and register with socket layer.  */
+diff --git a/net/sctp/probe.c b/net/sctp/probe.c
+index ad0dba8..e62c225 100644
+--- a/net/sctp/probe.c
++++ b/net/sctp/probe.c
+@@ -63,7 +63,7 @@ static struct {
+       struct timespec   tstart;
+ } sctpw;
+-static void printl(const char *fmt, ...)
++static __printf(1, 2) void printl(const char *fmt, ...)
+ {
+       va_list args;
+       int len;
 diff --git a/net/sctp/proc.c b/net/sctp/proc.c
-index 8c19e97..16264b8 100644
+index ab3bba8..2fbab4e 100644
 --- a/net/sctp/proc.c
 +++ b/net/sctp/proc.c
-@@ -338,7 +338,8 @@ static int sctp_assocs_seq_show(struct seq_file *seq, void *v)
+@@ -336,7 +336,8 @@ static int sctp_assocs_seq_show(struct seq_file *seq, void *v)
                seq_printf(seq,
                           "%8pK %8pK %-3d %-3d %-2d %-4d "
                           "%4d %8d %8d %7d %5lu %-5d %5d ",
@@ -89567,7 +88822,7 @@ index 8c19e97..16264b8 100644
                           assoc->assoc_id,
                           assoc->sndbuf_used,
 diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c
-index f898b1c..a2d0fe8 100644
+index 1c2e46c..f91cf5e 100644
 --- a/net/sctp/protocol.c
 +++ b/net/sctp/protocol.c
 @@ -834,8 +834,10 @@ int sctp_register_af(struct sctp_af *af)
@@ -89610,7 +88865,7 @@ index f898b1c..a2d0fe8 100644
  
  static int sctp_v4_protosw_init(void)
 diff --git a/net/sctp/sm_sideeffect.c b/net/sctp/sm_sideeffect.c
-index c957775..6d4593a 100644
+index 8aab894..f6b7e7d 100644
 --- a/net/sctp/sm_sideeffect.c
 +++ b/net/sctp/sm_sideeffect.c
 @@ -447,7 +447,7 @@ static void sctp_generate_sack_event(unsigned long data)
@@ -89623,7 +88878,7 @@ index c957775..6d4593a 100644
        sctp_generate_t1_cookie_event,
        sctp_generate_t1_init_event,
 diff --git a/net/sctp/socket.c b/net/sctp/socket.c
-index 9ef5c73..1e9a9a9 100644
+index b907073..57fef6c 100644
 --- a/net/sctp/socket.c
 +++ b/net/sctp/socket.c
 @@ -2166,11 +2166,13 @@ static int sctp_setsockopt_events(struct sock *sk, char __user *optval,
@@ -89704,46 +88959,6 @@ index 9ef5c73..1e9a9a9 100644
                if (copy_to_user(to, &temp, addrlen))
                        return -EFAULT;
                to += addrlen;
-diff --git a/net/sctp/ssnmap.c b/net/sctp/ssnmap.c
-index 442ad4e..825ea94 100644
---- a/net/sctp/ssnmap.c
-+++ b/net/sctp/ssnmap.c
-@@ -41,8 +41,6 @@
- #include <net/sctp/sctp.h>
- #include <net/sctp/sm.h>
--#define MAX_KMALLOC_SIZE      131072
--
- static struct sctp_ssnmap *sctp_ssnmap_init(struct sctp_ssnmap *map, __u16 in,
-                                           __u16 out);
-@@ -65,7 +63,7 @@ struct sctp_ssnmap *sctp_ssnmap_new(__u16 in, __u16 out,
-       int size;
-       size = sctp_ssnmap_size(in, out);
--      if (size <= MAX_KMALLOC_SIZE)
-+      if (size <= KMALLOC_MAX_SIZE)
-               retval = kmalloc(size, gfp);
-       else
-               retval = (struct sctp_ssnmap *)
-@@ -82,7 +80,7 @@ struct sctp_ssnmap *sctp_ssnmap_new(__u16 in, __u16 out,
-       return retval;
- fail_map:
--      if (size <= MAX_KMALLOC_SIZE)
-+      if (size <= KMALLOC_MAX_SIZE)
-               kfree(retval);
-       else
-               free_pages((unsigned long)retval, get_order(size));
-@@ -124,7 +122,7 @@ void sctp_ssnmap_free(struct sctp_ssnmap *map)
-               int size;
-               size = sctp_ssnmap_size(map->in.len, map->out.len);
--              if (size <= MAX_KMALLOC_SIZE)
-+              if (size <= KMALLOC_MAX_SIZE)
-                       kfree(map);
-               else
-                       free_pages((unsigned long)map, get_order(size));
 diff --git a/net/sctp/sysctl.c b/net/sctp/sysctl.c
 index bf3c6e8..376d8d0 100644
 --- a/net/sctp/sysctl.c
@@ -89767,10 +88982,10 @@ index bf3c6e8..376d8d0 100644
  
        table = kmemdup(sctp_net_table, sizeof(sctp_net_table), GFP_KERNEL);
 diff --git a/net/socket.c b/net/socket.c
-index 2ca51c7..ee5feb5 100644
+index 88f759a..c6933de 100644
 --- a/net/socket.c
 +++ b/net/socket.c
-@@ -89,6 +89,7 @@
+@@ -88,6 +88,7 @@
  #include <linux/magic.h>
  #include <linux/slab.h>
  #include <linux/xattr.h>
@@ -89778,7 +88993,7 @@ index 2ca51c7..ee5feb5 100644
  
  #include <asm/uaccess.h>
  #include <asm/unistd.h>
-@@ -106,6 +107,8 @@
+@@ -105,6 +106,8 @@
  #include <linux/sockios.h>
  #include <linux/atalk.h>
  
@@ -89787,7 +89002,7 @@ index 2ca51c7..ee5feb5 100644
  static int sock_no_open(struct inode *irrelevant, struct file *dontcare);
  static ssize_t sock_aio_read(struct kiocb *iocb, const struct iovec *iov,
                         unsigned long nr_segs, loff_t pos);
-@@ -322,7 +325,7 @@ static struct dentry *sockfs_mount(struct file_system_type *fs_type,
+@@ -321,7 +324,7 @@ static struct dentry *sockfs_mount(struct file_system_type *fs_type,
                &sockfs_dentry_operations, SOCKFS_MAGIC);
  }
  
@@ -89796,7 +89011,7 @@ index 2ca51c7..ee5feb5 100644
  
  static struct file_system_type sock_fs_type = {
        .name =         "sockfs",
-@@ -1270,6 +1273,8 @@ int __sock_create(struct net *net, int family, int type, int protocol,
+@@ -1268,6 +1271,8 @@ int __sock_create(struct net *net, int family, int type, int protocol,
                return -EAFNOSUPPORT;
        if (type < 0 || type >= SOCK_MAX)
                return -EINVAL;
@@ -89805,7 +89020,7 @@ index 2ca51c7..ee5feb5 100644
  
        /* Compatibility.
  
-@@ -1401,6 +1406,16 @@ SYSCALL_DEFINE3(socket, int, family, int, type, int, protocol)
+@@ -1399,6 +1404,16 @@ SYSCALL_DEFINE3(socket, int, family, int, type, int, protocol)
        if (SOCK_NONBLOCK != O_NONBLOCK && (flags & SOCK_NONBLOCK))
                flags = (flags & ~SOCK_NONBLOCK) | O_NONBLOCK;
  
@@ -89822,7 +89037,7 @@ index 2ca51c7..ee5feb5 100644
        retval = sock_create(family, type, protocol, &sock);
        if (retval < 0)
                goto out;
-@@ -1528,6 +1543,14 @@ SYSCALL_DEFINE3(bind, int, fd, struct sockaddr __user *, umyaddr, int, addrlen)
+@@ -1526,6 +1541,14 @@ SYSCALL_DEFINE3(bind, int, fd, struct sockaddr __user *, umyaddr, int, addrlen)
        if (sock) {
                err = move_addr_to_kernel(umyaddr, addrlen, &address);
                if (err >= 0) {
@@ -89837,7 +89052,7 @@ index 2ca51c7..ee5feb5 100644
                        err = security_socket_bind(sock,
                                                   (struct sockaddr *)&address,
                                                   addrlen);
-@@ -1536,6 +1559,7 @@ SYSCALL_DEFINE3(bind, int, fd, struct sockaddr __user *, umyaddr, int, addrlen)
+@@ -1534,6 +1557,7 @@ SYSCALL_DEFINE3(bind, int, fd, struct sockaddr __user *, umyaddr, int, addrlen)
                                                      (struct sockaddr *)
                                                      &address, addrlen);
                }
@@ -89845,7 +89060,7 @@ index 2ca51c7..ee5feb5 100644
                fput_light(sock->file, fput_needed);
        }
        return err;
-@@ -1559,10 +1583,20 @@ SYSCALL_DEFINE2(listen, int, fd, int, backlog)
+@@ -1557,10 +1581,20 @@ SYSCALL_DEFINE2(listen, int, fd, int, backlog)
                if ((unsigned int)backlog > somaxconn)
                        backlog = somaxconn;
  
@@ -89866,7 +89081,7 @@ index 2ca51c7..ee5feb5 100644
                fput_light(sock->file, fput_needed);
        }
        return err;
-@@ -1606,6 +1640,18 @@ SYSCALL_DEFINE4(accept4, int, fd, struct sockaddr __user *, upeer_sockaddr,
+@@ -1604,6 +1638,18 @@ SYSCALL_DEFINE4(accept4, int, fd, struct sockaddr __user *, upeer_sockaddr,
        newsock->type = sock->type;
        newsock->ops = sock->ops;
  
@@ -89885,7 +89100,7 @@ index 2ca51c7..ee5feb5 100644
        /*
         * We don't need try_module_get here, as the listening socket (sock)
         * has the protocol module (sock->ops->owner) held.
-@@ -1651,6 +1697,8 @@ SYSCALL_DEFINE4(accept4, int, fd, struct sockaddr __user *, upeer_sockaddr,
+@@ -1649,6 +1695,8 @@ SYSCALL_DEFINE4(accept4, int, fd, struct sockaddr __user *, upeer_sockaddr,
        fd_install(newfd, newfile);
        err = newfd;
  
@@ -89894,7 +89109,7 @@ index 2ca51c7..ee5feb5 100644
  out_put:
        fput_light(sock->file, fput_needed);
  out:
-@@ -1683,6 +1731,7 @@ SYSCALL_DEFINE3(connect, int, fd, struct sockaddr __user *, uservaddr,
+@@ -1681,6 +1729,7 @@ SYSCALL_DEFINE3(connect, int, fd, struct sockaddr __user *, uservaddr,
                int, addrlen)
  {
        struct socket *sock;
@@ -89902,7 +89117,7 @@ index 2ca51c7..ee5feb5 100644
        struct sockaddr_storage address;
        int err, fput_needed;
  
-@@ -1693,6 +1742,17 @@ SYSCALL_DEFINE3(connect, int, fd, struct sockaddr __user *, uservaddr,
+@@ -1691,6 +1740,17 @@ SYSCALL_DEFINE3(connect, int, fd, struct sockaddr __user *, uservaddr,
        if (err < 0)
                goto out_put;
  
@@ -89920,7 +89135,7 @@ index 2ca51c7..ee5feb5 100644
        err =
            security_socket_connect(sock, (struct sockaddr *)&address, addrlen);
        if (err)
-@@ -1774,6 +1834,8 @@ SYSCALL_DEFINE3(getpeername, int, fd, struct sockaddr __user *, usockaddr,
+@@ -1772,6 +1832,8 @@ SYSCALL_DEFINE3(getpeername, int, fd, struct sockaddr __user *, usockaddr,
   *    the protocol.
   */
  
@@ -89929,7 +89144,7 @@ index 2ca51c7..ee5feb5 100644
  SYSCALL_DEFINE6(sendto, int, fd, void __user *, buff, size_t, len,
                unsigned int, flags, struct sockaddr __user *, addr,
                int, addr_len)
-@@ -1840,7 +1902,7 @@ SYSCALL_DEFINE6(recvfrom, int, fd, void __user *, ubuf, size_t, size,
+@@ -1838,7 +1900,7 @@ SYSCALL_DEFINE6(recvfrom, int, fd, void __user *, ubuf, size_t, size,
        struct socket *sock;
        struct iovec iov;
        struct msghdr msg;
@@ -89938,7 +89153,7 @@ index 2ca51c7..ee5feb5 100644
        int err, err2;
        int fput_needed;
  
-@@ -2047,7 +2109,7 @@ static int __sys_sendmsg(struct socket *sock, struct msghdr __user *msg,
+@@ -2045,7 +2107,7 @@ static int __sys_sendmsg(struct socket *sock, struct msghdr __user *msg,
                 * checking falls down on this.
                 */
                if (copy_from_user(ctl_buf,
@@ -89947,7 +89162,7 @@ index 2ca51c7..ee5feb5 100644
                                   ctl_len))
                        goto out_freectl;
                msg_sys->msg_control = ctl_buf;
-@@ -2187,7 +2249,7 @@ static int __sys_recvmsg(struct socket *sock, struct msghdr __user *msg,
+@@ -2185,7 +2247,7 @@ static int __sys_recvmsg(struct socket *sock, struct msghdr __user *msg,
        int err, total_len, len;
  
        /* kernel mode address */
@@ -89956,7 +89171,7 @@ index 2ca51c7..ee5feb5 100644
  
        /* user mode address pointers */
        struct sockaddr __user *uaddr;
-@@ -2215,7 +2277,7 @@ static int __sys_recvmsg(struct socket *sock, struct msghdr __user *msg,
+@@ -2213,7 +2275,7 @@ static int __sys_recvmsg(struct socket *sock, struct msghdr __user *msg,
         *      kernel msghdr to use the kernel address space)
         */
  
@@ -89965,50 +89180,7 @@ index 2ca51c7..ee5feb5 100644
        uaddr_len = COMPAT_NAMELEN(msg);
        if (MSG_CMSG_COMPAT & flags) {
                err = verify_compat_iovec(msg_sys, iov, &addr, VERIFY_WRITE);
-@@ -2838,7 +2900,7 @@ static int ethtool_ioctl(struct net *net, struct compat_ifreq __user *ifr32)
-       }
-       ifr = compat_alloc_user_space(buf_size);
--      rxnfc = (void *)ifr + ALIGN(sizeof(struct ifreq), 8);
-+      rxnfc = (void __user *)ifr + ALIGN(sizeof(struct ifreq), 8);
-       if (copy_in_user(&ifr->ifr_name, &ifr32->ifr_name, IFNAMSIZ))
-               return -EFAULT;
-@@ -2862,12 +2924,12 @@ static int ethtool_ioctl(struct net *net, struct compat_ifreq __user *ifr32)
-                       offsetof(struct ethtool_rxnfc, fs.ring_cookie));
-               if (copy_in_user(rxnfc, compat_rxnfc,
--                               (void *)(&rxnfc->fs.m_ext + 1) -
--                               (void *)rxnfc) ||
-+                               (void __user *)(&rxnfc->fs.m_ext + 1) -
-+                               (void __user *)rxnfc) ||
-                   copy_in_user(&rxnfc->fs.ring_cookie,
-                                &compat_rxnfc->fs.ring_cookie,
--                               (void *)(&rxnfc->fs.location + 1) -
--                               (void *)&rxnfc->fs.ring_cookie) ||
-+                               (void __user *)(&rxnfc->fs.location + 1) -
-+                               (void __user *)&rxnfc->fs.ring_cookie) ||
-                   copy_in_user(&rxnfc->rule_cnt, &compat_rxnfc->rule_cnt,
-                                sizeof(rxnfc->rule_cnt)))
-                       return -EFAULT;
-@@ -2879,12 +2941,12 @@ static int ethtool_ioctl(struct net *net, struct compat_ifreq __user *ifr32)
-       if (convert_out) {
-               if (copy_in_user(compat_rxnfc, rxnfc,
--                               (const void *)(&rxnfc->fs.m_ext + 1) -
--                               (const void *)rxnfc) ||
-+                               (const void __user *)(&rxnfc->fs.m_ext + 1) -
-+                               (const void __user *)rxnfc) ||
-                   copy_in_user(&compat_rxnfc->fs.ring_cookie,
-                                &rxnfc->fs.ring_cookie,
--                               (const void *)(&rxnfc->fs.location + 1) -
--                               (const void *)&rxnfc->fs.ring_cookie) ||
-+                               (const void __user *)(&rxnfc->fs.location + 1) -
-+                               (const void __user *)&rxnfc->fs.ring_cookie) ||
-                   copy_in_user(&compat_rxnfc->rule_cnt, &rxnfc->rule_cnt,
-                                sizeof(rxnfc->rule_cnt)))
-                       return -EFAULT;
-@@ -2954,7 +3016,7 @@ static int bond_ioctl(struct net *net, unsigned int cmd,
+@@ -2952,7 +3014,7 @@ static int bond_ioctl(struct net *net, unsigned int cmd,
                old_fs = get_fs();
                set_fs(KERNEL_DS);
                err = dev_ioctl(net, cmd,
@@ -90017,7 +89189,7 @@ index 2ca51c7..ee5feb5 100644
                set_fs(old_fs);
  
                return err;
-@@ -3063,7 +3125,7 @@ static int compat_sioc_ifmap(struct net *net, unsigned int cmd,
+@@ -3061,7 +3123,7 @@ static int compat_sioc_ifmap(struct net *net, unsigned int cmd,
  
        old_fs = get_fs();
        set_fs(KERNEL_DS);
@@ -90026,7 +89198,7 @@ index 2ca51c7..ee5feb5 100644
        set_fs(old_fs);
  
        if (cmd == SIOCGIFMAP && !err) {
-@@ -3168,7 +3230,7 @@ static int routing_ioctl(struct net *net, struct socket *sock,
+@@ -3166,7 +3228,7 @@ static int routing_ioctl(struct net *net, struct socket *sock,
                ret |= __get_user(rtdev, &(ur4->rt_dev));
                if (rtdev) {
                        ret |= copy_from_user(devname, compat_ptr(rtdev), 15);
@@ -90035,7 +89207,7 @@ index 2ca51c7..ee5feb5 100644
                        devname[15] = 0;
                } else
                        r4.rt_dev = NULL;
-@@ -3394,8 +3456,8 @@ int kernel_getsockopt(struct socket *sock, int level, int optname,
+@@ -3392,8 +3454,8 @@ int kernel_getsockopt(struct socket *sock, int level, int optname,
        int __user *uoptlen;
        int err;
  
@@ -90046,7 +89218,7 @@ index 2ca51c7..ee5feb5 100644
  
        set_fs(KERNEL_DS);
        if (level == SOL_SOCKET)
-@@ -3415,7 +3477,7 @@ int kernel_setsockopt(struct socket *sock, int level, int optname,
+@@ -3413,7 +3475,7 @@ int kernel_setsockopt(struct socket *sock, int level, int optname,
        char __user *uoptval;
        int err;
  
@@ -90056,10 +89228,10 @@ index 2ca51c7..ee5feb5 100644
        set_fs(KERNEL_DS);
        if (level == SOL_SOCKET)
 diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
-index 507b5e8..049e64a 100644
+index d5f35f1..da2680b5 100644
 --- a/net/sunrpc/clnt.c
 +++ b/net/sunrpc/clnt.c
-@@ -1272,7 +1272,9 @@ call_start(struct rpc_task *task)
+@@ -1283,7 +1283,9 @@ call_start(struct rpc_task *task)
                        (RPC_IS_ASYNC(task) ? "async" : "sync"));
  
        /* Increment call count */
@@ -90087,10 +89259,10 @@ index f8529fc..ce8c643 100644
  #else
  static inline void rpc_task_set_debuginfo(struct rpc_task *task)
 diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c
-index 2d34b6b..e2d584d 100644
+index 89a588b..ba2cef8 100644
 --- a/net/sunrpc/svc.c
 +++ b/net/sunrpc/svc.c
-@@ -1156,7 +1156,9 @@ svc_process_common(struct svc_rqst *rqstp, struct kvec *argv, struct kvec *resv)
+@@ -1160,7 +1160,9 @@ svc_process_common(struct svc_rqst *rqstp, struct kvec *argv, struct kvec *resv)
        svc_putnl(resv, RPC_SUCCESS);
  
        /* Bump per-procedure stats counter */
@@ -90319,7 +89491,7 @@ index 9bc6db0..47ac8c0 100644
                int mode = (table->mode >> 6) & 7;
                return (mode << 6) | (mode << 3) | mode;
 diff --git a/net/tipc/link.c b/net/tipc/link.c
-index daa6080..02d357f 100644
+index daa6080..2bbbe70 100644
 --- a/net/tipc/link.c
 +++ b/net/tipc/link.c
 @@ -1201,7 +1201,7 @@ static int link_send_sections_long(struct tipc_port *sender,
@@ -90349,6 +89521,38 @@ index daa6080..02d357f 100644
                sect_crs += sz;
                sect_rest -= sz;
                fragm_crs += sz;
+@@ -2306,8 +2306,11 @@ static int link_recv_changeover_msg(struct tipc_link **l_ptr,
+       struct tipc_msg *tunnel_msg = buf_msg(tunnel_buf);
+       u32 msg_typ = msg_type(tunnel_msg);
+       u32 msg_count = msg_msgcnt(tunnel_msg);
++      u32 bearer_id = msg_bearer_id(tunnel_msg);
+-      dest_link = (*l_ptr)->owner->links[msg_bearer_id(tunnel_msg)];
++      if (bearer_id >= MAX_BEARERS)
++              goto exit;
++      dest_link = (*l_ptr)->owner->links[bearer_id];
+       if (!dest_link)
+               goto exit;
+       if (dest_link == *l_ptr) {
+@@ -2521,14 +2524,16 @@ int tipc_link_recv_fragment(struct sk_buff **pending, struct sk_buff **fb,
+               struct tipc_msg *imsg = (struct tipc_msg *)msg_data(fragm);
+               u32 msg_sz = msg_size(imsg);
+               u32 fragm_sz = msg_data_sz(fragm);
+-              u32 exp_fragm_cnt = msg_sz/fragm_sz + !!(msg_sz % fragm_sz);
++              u32 exp_fragm_cnt;
+               u32 max =  TIPC_MAX_USER_MSG_SIZE + NAMED_H_SIZE;
++
+               if (msg_type(imsg) == TIPC_MCAST_MSG)
+                       max = TIPC_MAX_USER_MSG_SIZE + MCAST_H_SIZE;
+-              if (msg_size(imsg) > max) {
++              if (fragm_sz == 0 || msg_size(imsg) > max) {
+                       kfree_skb(fbuf);
+                       return 0;
+               }
++              exp_fragm_cnt = msg_sz / fragm_sz + !!(msg_sz % fragm_sz);
+               pbuf = tipc_buf_acquire(msg_size(imsg));
+               if (pbuf != NULL) {
+                       pbuf->next = *pending;
 diff --git a/net/tipc/msg.c b/net/tipc/msg.c
 index f2db8a8..9245aa4 100644
 --- a/net/tipc/msg.c
@@ -90376,10 +89580,10 @@ index 6b42d47..2ac24d5 100644
  
        sub->evt.event = htohl(event, sub->swap);
 diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
-index b45eb65..bb4b223 100644
+index 2db702d..09a77488 100644
 --- a/net/unix/af_unix.c
 +++ b/net/unix/af_unix.c
-@@ -785,6 +785,12 @@ static struct sock *unix_find_other(struct net *net,
+@@ -783,6 +783,12 @@ static struct sock *unix_find_other(struct net *net,
                err = -ECONNREFUSED;
                if (!S_ISSOCK(inode->i_mode))
                        goto put_fail;
@@ -90392,7 +89596,7 @@ index b45eb65..bb4b223 100644
                u = unix_find_socket_byinode(inode);
                if (!u)
                        goto put_fail;
-@@ -805,6 +811,13 @@ static struct sock *unix_find_other(struct net *net,
+@@ -803,6 +809,13 @@ static struct sock *unix_find_other(struct net *net,
                if (u) {
                        struct dentry *dentry;
                        dentry = unix_sk(u)->path.dentry;
@@ -90406,7 +89610,7 @@ index b45eb65..bb4b223 100644
                        if (dentry)
                                touch_atime(&unix_sk(u)->path);
                } else
-@@ -838,12 +851,18 @@ static int unix_mknod(const char *sun_path, umode_t mode, struct path *res)
+@@ -836,12 +849,18 @@ static int unix_mknod(const char *sun_path, umode_t mode, struct path *res)
         */
        err = security_path_mknod(&path, dentry, mode, 0);
        if (!err) {
@@ -90425,16 +89629,7 @@ index b45eb65..bb4b223 100644
        done_path_create(&path, dentry);
        return err;
  }
-@@ -1995,7 +2014,7 @@ again:
-                       if ((UNIXCB(skb).pid  != siocb->scm->pid) ||
-                           (UNIXCB(skb).cred != siocb->scm->cred))
-                               break;
--              } else {
-+              } else if (test_bit(SOCK_PASSCRED, &sock->flags)) {
-                       /* Copy credentials */
-                       scm_set_cred(siocb->scm, UNIXCB(skb).pid, UNIXCB(skb).cred);
-                       check_creds = 1;
-@@ -2325,9 +2344,13 @@ static int unix_seq_show(struct seq_file *seq, void *v)
+@@ -2323,9 +2342,13 @@ static int unix_seq_show(struct seq_file *seq, void *v)
                seq_puts(seq, "Num       RefCount Protocol Flags    Type St "
                         "Inode Path\n");
        else {
@@ -90449,7 +89644,7 @@ index b45eb65..bb4b223 100644
  
                seq_printf(seq, "%pK: %08X %08X %08X %04X %02X %5lu",
                        s,
-@@ -2354,8 +2377,10 @@ static int unix_seq_show(struct seq_file *seq, void *v)
+@@ -2352,8 +2375,10 @@ static int unix_seq_show(struct seq_file *seq, void *v)
                        }
                        for ( ; i < len; i++)
                                seq_putc(seq, u->addr->name->sun_path[i]);
@@ -90475,20 +89670,6 @@ index 8800604..0526440 100644
  
        table = kmemdup(unix_table, sizeof(unix_table), GFP_KERNEL);
        if (table == NULL)
-diff --git a/net/wireless/trace.h b/net/wireless/trace.h
-index 2134576..5d71a5a 100644
---- a/net/wireless/trace.h
-+++ b/net/wireless/trace.h
-@@ -27,7 +27,8 @@
- #define WIPHY_PR_ARG  __entry->wiphy_name
- #define WDEV_ENTRY    __field(u32, id)
--#define WDEV_ASSIGN   (__entry->id) = (wdev ? wdev->identifier : 0)
-+#define WDEV_ASSIGN   (__entry->id) = (!IS_ERR_OR_NULL(wdev)  \
-+                                       ? wdev->identifier : 0)
- #define WDEV_PR_FMT   "wdev(%u)"
- #define WDEV_PR_ARG   (__entry->id)
 diff --git a/net/wireless/wext-core.c b/net/wireless/wext-core.c
 index c8717c1..08539f5 100644
 --- a/net/wireless/wext-core.c
@@ -90527,28 +89708,28 @@ index c8717c1..08539f5 100644
  
        iwp->length += essid_compat;
 diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
-index 07c5857..fde4018 100644
+index 167c67d..3f2ae427 100644
 --- a/net/xfrm/xfrm_policy.c
 +++ b/net/xfrm/xfrm_policy.c
-@@ -317,7 +317,7 @@ static void xfrm_policy_kill(struct xfrm_policy *policy)
+@@ -334,7 +334,7 @@ static void xfrm_policy_kill(struct xfrm_policy *policy)
  {
        policy->walk.dead = 1;
  
 -      atomic_inc(&policy->genid);
 +      atomic_inc_unchecked(&policy->genid);
  
-       if (del_timer(&policy->timer))
-               xfrm_pol_put(policy);
-@@ -601,7 +601,7 @@ int xfrm_policy_insert(int dir, struct xfrm_policy *policy, int excl)
+       del_timer(&policy->polq.hold_timer);
+       xfrm_queue_purge(&policy->polq.hold_queue);
+@@ -659,7 +659,7 @@ int xfrm_policy_insert(int dir, struct xfrm_policy *policy, int excl)
                hlist_add_head(&policy->bydst, chain);
        xfrm_pol_hold(policy);
        net->xfrm.policy_count[dir]++;
 -      atomic_inc(&flow_cache_genid);
 +      atomic_inc_unchecked(&flow_cache_genid);
        rt_genid_bump(net);
-       if (delpol)
-               __xfrm_policy_unlink(delpol, dir);
-@@ -1550,7 +1550,7 @@ free_dst:
+       if (delpol) {
+               xfrm_policy_requeue(delpol, policy);
+@@ -1611,7 +1611,7 @@ free_dst:
        goto out;
  }
  
@@ -90557,7 +89738,7 @@ index 07c5857..fde4018 100644
  xfrm_dst_alloc_copy(void **target, const void *src, int size)
  {
        if (!*target) {
-@@ -1562,7 +1562,7 @@ xfrm_dst_alloc_copy(void **target, const void *src, int size)
+@@ -1623,7 +1623,7 @@ xfrm_dst_alloc_copy(void **target, const void *src, int size)
        return 0;
  }
  
@@ -90566,7 +89747,7 @@ index 07c5857..fde4018 100644
  xfrm_dst_update_parent(struct dst_entry *dst, const struct xfrm_selector *sel)
  {
  #ifdef CONFIG_XFRM_SUB_POLICY
-@@ -1574,7 +1574,7 @@ xfrm_dst_update_parent(struct dst_entry *dst, const struct xfrm_selector *sel)
+@@ -1635,7 +1635,7 @@ xfrm_dst_update_parent(struct dst_entry *dst, const struct xfrm_selector *sel)
  #endif
  }
  
@@ -90575,7 +89756,7 @@ index 07c5857..fde4018 100644
  xfrm_dst_update_origin(struct dst_entry *dst, const struct flowi *fl)
  {
  #ifdef CONFIG_XFRM_SUB_POLICY
-@@ -1668,7 +1668,7 @@ xfrm_resolve_and_create_bundle(struct xfrm_policy **pols, int num_pols,
+@@ -1729,7 +1729,7 @@ xfrm_resolve_and_create_bundle(struct xfrm_policy **pols, int num_pols,
  
        xdst->num_pols = num_pols;
        memcpy(xdst->pols, pols, sizeof(struct xfrm_policy*) * num_pols);
@@ -90584,7 +89765,7 @@ index 07c5857..fde4018 100644
  
        return xdst;
  }
-@@ -2369,7 +2369,7 @@ static int xfrm_bundle_ok(struct xfrm_dst *first)
+@@ -2598,7 +2598,7 @@ static int xfrm_bundle_ok(struct xfrm_dst *first)
                if (xdst->xfrm_genid != dst->xfrm->genid)
                        return 0;
                if (xdst->num_pols > 0 &&
@@ -90593,7 +89774,7 @@ index 07c5857..fde4018 100644
                        return 0;
  
                mtu = dst_mtu(dst->child);
-@@ -2457,8 +2457,11 @@ int xfrm_policy_register_afinfo(struct xfrm_policy_afinfo *afinfo)
+@@ -2686,8 +2686,11 @@ int xfrm_policy_register_afinfo(struct xfrm_policy_afinfo *afinfo)
                        dst_ops->link_failure = xfrm_link_failure;
                if (likely(dst_ops->neigh_lookup == NULL))
                        dst_ops->neigh_lookup = xfrm_neigh_lookup;
@@ -90607,7 +89788,7 @@ index 07c5857..fde4018 100644
                rcu_assign_pointer(xfrm_policy_afinfo[afinfo->family], afinfo);
        }
        spin_unlock(&xfrm_policy_afinfo_lock);
-@@ -2512,7 +2515,9 @@ int xfrm_policy_unregister_afinfo(struct xfrm_policy_afinfo *afinfo)
+@@ -2741,7 +2744,9 @@ int xfrm_policy_unregister_afinfo(struct xfrm_policy_afinfo *afinfo)
                dst_ops->check = NULL;
                dst_ops->negative_advice = NULL;
                dst_ops->link_failure = NULL;
@@ -90618,7 +89799,7 @@ index 07c5857..fde4018 100644
        }
        return err;
  }
-@@ -2896,7 +2901,7 @@ static int xfrm_policy_migrate(struct xfrm_policy *pol,
+@@ -3124,7 +3129,7 @@ static int xfrm_policy_migrate(struct xfrm_policy *pol,
                               sizeof(pol->xfrm_vec[i].saddr));
                        pol->xfrm_vec[i].encap_family = mp->new_family;
                        /* flush bundles */
@@ -90628,15 +89809,16 @@ index 07c5857..fde4018 100644
        }
  
 diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c
-index 3459692..e7cdb1a 100644
+index 2c341bd..4404211 100644
 --- a/net/xfrm/xfrm_state.c
 +++ b/net/xfrm/xfrm_state.c
-@@ -194,11 +194,13 @@ int xfrm_register_type(const struct xfrm_type *type, unsigned short family)
+@@ -177,12 +177,14 @@ int xfrm_register_type(const struct xfrm_type *type, unsigned short family)
  
        if (unlikely(afinfo == NULL))
                return -EAFNOSUPPORT;
 -      typemap = afinfo->type_map;
 +      typemap = (const struct xfrm_type **)afinfo->type_map;
+       spin_lock_bh(&xfrm_type_lock);
  
 -      if (likely(typemap[type->proto] == NULL))
 +      if (likely(typemap[type->proto] == NULL)) {
@@ -90646,14 +89828,15 @@ index 3459692..e7cdb1a 100644
 +              pax_close_kernel();
 +      } else
                err = -EEXIST;
-       xfrm_state_unlock_afinfo(afinfo);
-       return err;
-@@ -213,12 +215,15 @@ int xfrm_unregister_type(const struct xfrm_type *type, unsigned short family)
+       spin_unlock_bh(&xfrm_type_lock);
+       xfrm_state_put_afinfo(afinfo);
+@@ -198,13 +200,16 @@ int xfrm_unregister_type(const struct xfrm_type *type, unsigned short family)
  
        if (unlikely(afinfo == NULL))
                return -EAFNOSUPPORT;
 -      typemap = afinfo->type_map;
 +      typemap = (const struct xfrm_type **)afinfo->type_map;
+       spin_lock_bh(&xfrm_type_lock);
  
        if (unlikely(typemap[type->proto] != type))
                err = -ENOENT;
@@ -90663,10 +89846,10 @@ index 3459692..e7cdb1a 100644
                typemap[type->proto] = NULL;
 +              pax_close_kernel();
 +      }
-       xfrm_state_unlock_afinfo(afinfo);
+       spin_unlock_bh(&xfrm_type_lock);
+       xfrm_state_put_afinfo(afinfo);
        return err;
- }
-@@ -227,7 +232,6 @@ EXPORT_SYMBOL(xfrm_unregister_type);
+@@ -214,7 +219,6 @@ EXPORT_SYMBOL(xfrm_unregister_type);
  static const struct xfrm_type *xfrm_get_type(u8 proto, unsigned short family)
  {
        struct xfrm_state_afinfo *afinfo;
@@ -90674,7 +89857,7 @@ index 3459692..e7cdb1a 100644
        const struct xfrm_type *type;
        int modload_attempted = 0;
  
-@@ -235,9 +239,8 @@ retry:
+@@ -222,9 +226,8 @@ retry:
        afinfo = xfrm_state_get_afinfo(family);
        if (unlikely(afinfo == NULL))
                return NULL;
@@ -90685,16 +89868,16 @@ index 3459692..e7cdb1a 100644
        if (unlikely(type && !try_module_get(type->owner)))
                type = NULL;
        if (!type && !modload_attempted) {
-@@ -270,7 +273,7 @@ int xfrm_register_mode(struct xfrm_mode *mode, int family)
+@@ -258,7 +261,7 @@ int xfrm_register_mode(struct xfrm_mode *mode, int family)
                return -EAFNOSUPPORT;
  
        err = -EEXIST;
 -      modemap = afinfo->mode_map;
 +      modemap = (struct xfrm_mode **)afinfo->mode_map;
+       spin_lock_bh(&xfrm_mode_lock);
        if (modemap[mode->encap])
                goto out;
-@@ -278,8 +281,10 @@ int xfrm_register_mode(struct xfrm_mode *mode, int family)
+@@ -267,8 +270,10 @@ int xfrm_register_mode(struct xfrm_mode *mode, int family)
        if (!try_module_get(afinfo->owner))
                goto out;
  
@@ -90706,12 +89889,13 @@ index 3459692..e7cdb1a 100644
        err = 0;
  
  out:
-@@ -302,9 +307,11 @@ int xfrm_unregister_mode(struct xfrm_mode *mode, int family)
+@@ -292,10 +297,12 @@ int xfrm_unregister_mode(struct xfrm_mode *mode, int family)
                return -EAFNOSUPPORT;
  
        err = -ENOENT;
 -      modemap = afinfo->mode_map;
 +      modemap = (struct xfrm_mode **)afinfo->mode_map;
+       spin_lock_bh(&xfrm_mode_lock);
        if (likely(modemap[mode->encap] == mode)) {
 +              pax_open_kernel();
                modemap[mode->encap] = NULL;
@@ -90831,7 +90015,7 @@ index 1ac414f..38575f7 100644
 +         $(host-cxxmulti) $(host-cxxobjs) $(host-cshlib) $(host-cshobjs) $(host-cxxshlib) $(host-cxxshobjs)
  
 diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c
-index cb1f50c..cef2a7c 100644
+index 7f6425e..9864506 100644
 --- a/scripts/basic/fixdep.c
 +++ b/scripts/basic/fixdep.c
 @@ -161,7 +161,7 @@ static unsigned int strhash(const char *str, unsigned int sz)
@@ -90876,7 +90060,7 @@ index cb1f50c..cef2a7c 100644
 +      unsigned int *p = (unsigned int *)test;
  
        if (*p != INT_CONF) {
-               fprintf(stderr, "fixdep: sizeof(int) != 4 or wrong endianess? %#x\n",
+               fprintf(stderr, "fixdep: sizeof(int) != 4 or wrong endianness? %#x\n",
 diff --git a/scripts/gcc-plugin.sh b/scripts/gcc-plugin.sh
 new file mode 100644
 index 0000000..5e0222d
@@ -90913,10 +90097,10 @@ index 581ca99..a6ff02e 100644
                $line =~ s/\s__attribute_const__$//g;
                $line =~ s/\b__packed\b/__attribute__((packed))/g;
 diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh
-index b3d907e..a4782ab 100644
+index 3d569d6..0c09522 100644
 --- a/scripts/link-vmlinux.sh
 +++ b/scripts/link-vmlinux.sh
-@@ -152,7 +152,7 @@ else
+@@ -159,7 +159,7 @@ else
  fi;
  
  # final build of init/
@@ -90926,10 +90110,10 @@ index b3d907e..a4782ab 100644
  kallsymso=""
  kallsyms_vmlinux=""
 diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c
-index df4fc23..0ea719d 100644
+index 771ac17..9f0d3ee 100644
 --- a/scripts/mod/file2alias.c
 +++ b/scripts/mod/file2alias.c
-@@ -128,7 +128,7 @@ static void device_id_check(const char *modname, const char *device_id,
+@@ -140,7 +140,7 @@ static void device_id_check(const char *modname, const char *device_id,
                            unsigned long size, unsigned long id_size,
                            void *symval)
  {
@@ -90937,66 +90121,66 @@ index df4fc23..0ea719d 100644
 +      unsigned int i;
  
        if (size % id_size || size < id_size) {
-               if (cross_build != 0)
-@@ -158,7 +158,7 @@ static void device_id_check(const char *modname, const char *device_id,
+               fatal("%s: sizeof(struct %s_device_id)=%lu is not a modulo "
+@@ -168,7 +168,7 @@ static void device_id_check(const char *modname, const char *device_id,
  /* USB is special because the bcdDevice can be matched against a numeric range */
  /* Looks like "usb:vNpNdNdcNdscNdpNicNiscNipNinN" */
- static void do_usb_entry(struct usb_device_id *id,
+ static void do_usb_entry(void *symval,
 -                       unsigned int bcdDevice_initial, int bcdDevice_initial_digits,
 +                       unsigned int bcdDevice_initial, unsigned int bcdDevice_initial_digits,
                         unsigned char range_lo, unsigned char range_hi,
                         unsigned char max, struct module *mod)
  {
-@@ -262,7 +262,7 @@ static void do_usb_entry_multi(struct usb_device_id *id, struct module *mod)
+@@ -278,7 +278,7 @@ static void do_usb_entry_multi(void *symval, struct module *mod)
  {
        unsigned int devlo, devhi;
        unsigned char chi, clo, max;
 -      int ndigits;
 +      unsigned int ndigits;
  
-       id->match_flags = TO_NATIVE(id->match_flags);
-       id->idVendor = TO_NATIVE(id->idVendor);
-@@ -507,7 +507,7 @@ static void do_pnp_device_entry(void *symval, unsigned long size,
+       DEF_FIELD(symval, usb_device_id, match_flags);
+       DEF_FIELD(symval, usb_device_id, idVendor);
+@@ -531,7 +531,7 @@ static void do_pnp_device_entry(void *symval, unsigned long size,
        for (i = 0; i < count; i++) {
-               const char *id = (char *)devs[i].id;
-               char acpi_id[sizeof(devs[0].id)];
+               DEF_FIELD_ADDR(symval + i*id_size, pnp_device_id, id);
+               char acpi_id[sizeof(*id)];
 -              int j;
 +              unsigned int j;
  
                buf_printf(&mod->dev_table_buf,
-                          "MODULE_ALIAS(\"pnp:d%s*\");\n", id);
-@@ -537,7 +537,7 @@ static void do_pnp_card_entries(void *symval, unsigned long size,
+                          "MODULE_ALIAS(\"pnp:d%s*\");\n", *id);
+@@ -560,7 +560,7 @@ static void do_pnp_card_entries(void *symval, unsigned long size,
  
                for (j = 0; j < PNP_MAX_DEVICES; j++) {
-                       const char *id = (char *)card->devs[j].id;
+                       const char *id = (char *)(*devs)[j].id;
 -                      int i2, j2;
 +                      unsigned int i2, j2;
                        int dup = 0;
  
                        if (!id[0])
-@@ -563,7 +563,7 @@ static void do_pnp_card_entries(void *symval, unsigned long size,
+@@ -586,7 +586,7 @@ static void do_pnp_card_entries(void *symval, unsigned long size,
                        /* add an individual alias for every device entry */
                        if (!dup) {
-                               char acpi_id[sizeof(card->devs[0].id)];
+                               char acpi_id[PNP_ID_LEN];
 -                              int k;
 +                              unsigned int k;
  
                                buf_printf(&mod->dev_table_buf,
                                           "MODULE_ALIAS(\"pnp:d%s*\");\n", id);
-@@ -888,7 +888,7 @@ static void dmi_ascii_filter(char *d, const char *s)
- static int do_dmi_entry(const char *filename, struct dmi_system_id *id,
+@@ -938,7 +938,7 @@ static void dmi_ascii_filter(char *d, const char *s)
+ static int do_dmi_entry(const char *filename, void *symval,
                        char *alias)
  {
 -      int i, j;
 +      unsigned int i, j;
+       DEF_FIELD_ADDR(symval, dmi_system_id, matches);
        sprintf(alias, "dmi*");
  
 diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
-index ff36c50..7ab4fa9 100644
+index 78b30c1..536850d 100644
 --- a/scripts/mod/modpost.c
 +++ b/scripts/mod/modpost.c
-@@ -929,6 +929,7 @@ enum mismatch {
+@@ -931,6 +931,7 @@ enum mismatch {
        ANY_INIT_TO_ANY_EXIT,
        ANY_EXIT_TO_ANY_INIT,
        EXPORT_TO_INIT_EXIT,
@@ -91004,7 +90188,7 @@ index ff36c50..7ab4fa9 100644
  };
  
  struct sectioncheck {
-@@ -1043,6 +1044,12 @@ const struct sectioncheck sectioncheck[] = {
+@@ -1045,6 +1046,12 @@ const struct sectioncheck sectioncheck[] = {
        .tosec   = { INIT_SECTIONS, EXIT_SECTIONS, NULL },
        .mismatch = EXPORT_TO_INIT_EXIT,
        .symbol_white_list = { DEFAULT_SYMBOL_WHITE_LIST, NULL },
@@ -91017,7 +90201,7 @@ index ff36c50..7ab4fa9 100644
  }
  };
  
-@@ -1165,10 +1172,10 @@ static Elf_Sym *find_elf_symbol(struct elf_info *elf, Elf64_Sword addr,
+@@ -1167,10 +1174,10 @@ static Elf_Sym *find_elf_symbol(struct elf_info *elf, Elf64_Sword addr,
                        continue;
                if (ELF_ST_TYPE(sym->st_info) == STT_SECTION)
                        continue;
@@ -91030,7 +90214,7 @@ index ff36c50..7ab4fa9 100644
                if (d < 0)
                        d = addr - sym->st_value;
                if (d < distance) {
-@@ -1447,6 +1454,14 @@ static void report_sec_mismatch(const char *modname,
+@@ -1449,6 +1456,14 @@ static void report_sec_mismatch(const char *modname,
                tosym, prl_to, prl_to, tosym);
                free(prl_to);
                break;
@@ -91045,7 +90229,7 @@ index ff36c50..7ab4fa9 100644
        }
        fprintf(stderr, "\n");
  }
-@@ -1681,7 +1696,7 @@ static void section_rel(const char *modname, struct elf_info *elf,
+@@ -1683,7 +1698,7 @@ static void section_rel(const char *modname, struct elf_info *elf,
  static void check_sec_ref(struct module *mod, const char *modname,
                            struct elf_info *elf)
  {
@@ -91054,7 +90238,7 @@ index ff36c50..7ab4fa9 100644
        Elf_Shdr *sechdrs = elf->sechdrs;
  
        /* Walk through all sections */
-@@ -1779,7 +1794,7 @@ void __attribute__((format(printf, 2, 3))) buf_printf(struct buffer *buf,
+@@ -1781,7 +1796,7 @@ void __attribute__((format(printf, 2, 3))) buf_printf(struct buffer *buf,
        va_end(ap);
  }
  
@@ -91063,7 +90247,7 @@ index ff36c50..7ab4fa9 100644
  {
        if (buf->size - buf->pos < len) {
                buf->size += len + SZ;
-@@ -1997,7 +2012,7 @@ static void write_if_changed(struct buffer *b, const char *fname)
+@@ -1999,7 +2014,7 @@ static void write_if_changed(struct buffer *b, const char *fname)
        if (fstat(fileno(file), &st) < 0)
                goto close_write;
  
@@ -91151,7 +90335,7 @@ index 68bb4ef..2f419e1 100644
      write_hex_cnt = 0;
      for (i = 0; i < logo_clutsize; i++) {
 diff --git a/scripts/sortextable.h b/scripts/sortextable.h
-index e4fd45b..2eeb5c4 100644
+index f5eb43d..1814de8 100644
 --- a/scripts/sortextable.h
 +++ b/scripts/sortextable.h
 @@ -106,9 +106,9 @@ do_func(Elf_Ehdr *ehdr, char const *const fname, table_sort_t custom_sort)
@@ -91168,7 +90352,7 @@ index e4fd45b..2eeb5c4 100644
        shdr = (Elf_Shdr *)((char *)ehdr + _r(&ehdr->e_shoff));
        shstrtab_sec = shdr + r2(&ehdr->e_shstrndx);
 diff --git a/security/Kconfig b/security/Kconfig
-index e9c6ac7..20df9f1 100644
+index e9c6ac7..e6254cf 100644
 --- a/security/Kconfig
 +++ b/security/Kconfig
 @@ -4,6 +4,944 @@
@@ -91205,6 +90389,7 @@ index e9c6ac7..20df9f1 100644
 +      select CRYPTO_SHA256
 +      select PROC_FS
 +      select STOP_MACHINE
++      select TTY
 +      help
 +        If you say Y here, you will be able to configure many features
 +        that will enhance the security of your system.  It is highly
@@ -91751,7 +90936,7 @@ index e9c6ac7..20df9f1 100644
 +config PAX_KERNEXEC
 +      bool "Enforce non-executable kernel pages"
 +      default y if GRKERNSEC_CONFIG_AUTO && (GRKERNSEC_CONFIG_VIRT_NONE || (GRKERNSEC_CONFIG_VIRT_EPT && GRKERNSEC_CONFIG_VIRT_GUEST) || (GRKERNSEC_CONFIG_VIRT_EPT && GRKERNSEC_CONFIG_VIRT_KVM))
-+      depends on ((X86 && (!X86_32 || X86_WP_WORKS_OK)) || (ARM && (CPU_V6 || CPU_V7) && !(ARM_LPAE && MODULES))) && !XEN
++      depends on (X86 || (ARM && (CPU_V6 || CPU_V7) && !(ARM_LPAE && MODULES))) && !XEN
 +      select PAX_PER_CPU_PGD if X86_64 || (X86_32 && X86_PAE)
 +      select PAX_KERNEXEC_PLUGIN if X86_64
 +      help
@@ -92011,7 +91196,7 @@ index e9c6ac7..20df9f1 100644
 +config PAX_CONSTIFY_PLUGIN
 +      bool "Automatically constify eligible structures"
 +      default y
-+      depends on !UML
++      depends on !UML && PAX_KERNEXEC
 +      help
 +        By saying Y here the compiler will automatically constify a class
 +        of types that contain only function pointers.  This reduces the
@@ -92057,7 +91242,6 @@ index e9c6ac7..20df9f1 100644
 +        Since this has a negligible performance impact, you should enable
 +        this feature.
 +
-+
 +config PAX_USERCOPY_DEBUG
 +      bool
 +      depends on X86 && PAX_USERCOPY
@@ -92126,7 +91310,7 @@ index e9c6ac7..20df9f1 100644
        help
          This is the portion of low virtual memory which should be protected
 diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c
-index 8c2a7f6..b133ac9 100644
+index b21830e..a7d1a17 100644
 --- a/security/apparmor/lsm.c
 +++ b/security/apparmor/lsm.c
 @@ -614,7 +614,7 @@ static int apparmor_task_setrlimit(struct task_struct *task,
@@ -92139,7 +91323,7 @@ index 8c2a7f6..b133ac9 100644
  
        .ptrace_access_check =          apparmor_ptrace_access_check,
 diff --git a/security/commoncap.c b/security/commoncap.c
-index 7ee08c7..8d1a9d6 100644
+index c44b6fe..932df30 100644
 --- a/security/commoncap.c
 +++ b/security/commoncap.c
 @@ -424,6 +424,32 @@ int get_vfs_caps_from_disk(const struct dentry *dentry, struct cpu_vfs_cap_data
@@ -92186,10 +91370,10 @@ index 7ee08c7..8d1a9d6 100644
                if (bprm->cap_effective)
                        return 1;
 diff --git a/security/integrity/ima/ima.h b/security/integrity/ima/ima.h
-index 079a85d..12e93f8 100644
+index a41c9c1..83da6dd 100644
 --- a/security/integrity/ima/ima.h
 +++ b/security/integrity/ima/ima.h
-@@ -96,8 +96,8 @@ void ima_add_violation(struct inode *inode, const unsigned char *filename,
+@@ -97,8 +97,8 @@ int ima_init_crypto(void);
  extern spinlock_t ima_queue_lock;
  
  struct ima_h_table {
@@ -92201,7 +91385,7 @@ index 079a85d..12e93f8 100644
  };
  extern struct ima_h_table ima_htable;
 diff --git a/security/integrity/ima/ima_api.c b/security/integrity/ima/ima_api.c
-index 0cea3db..2f0ef77 100644
+index 1c03e8f1..398a941 100644
 --- a/security/integrity/ima/ima_api.c
 +++ b/security/integrity/ima/ima_api.c
 @@ -79,7 +79,7 @@ void ima_add_violation(struct inode *inode, const unsigned char *filename,
@@ -92233,10 +91417,10 @@ index 38477c9..87a60c7 100644
  }
  
 diff --git a/security/integrity/ima/ima_queue.c b/security/integrity/ima/ima_queue.c
-index 55a6271..ad829c3 100644
+index ff63fe0..809cd96 100644
 --- a/security/integrity/ima/ima_queue.c
 +++ b/security/integrity/ima/ima_queue.c
-@@ -81,7 +81,7 @@ static int ima_add_digest_entry(struct ima_template_entry *entry)
+@@ -80,7 +80,7 @@ static int ima_add_digest_entry(struct ima_template_entry *entry)
        INIT_LIST_HEAD(&qe->later);
        list_add_tail_rcu(&qe->later, &ima_measurements);
  
@@ -92400,7 +91584,7 @@ index f728728..6457a0c 100644
  
  /*
 diff --git a/security/security.c b/security/security.c
-index 7b88c6a..1e3ea8f 100644
+index 03f248b..5710c33 100644
 --- a/security/security.c
 +++ b/security/security.c
 @@ -20,6 +20,7 @@
@@ -92433,10 +91617,10 @@ index 7b88c6a..1e3ea8f 100644
  
  /* Save user chosen LSM */
 diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
-index ef26e96..642fb78 100644
+index 7171a95..c35e879 100644
 --- a/security/selinux/hooks.c
 +++ b/security/selinux/hooks.c
-@@ -95,8 +95,6 @@
+@@ -96,8 +96,6 @@
  
  #define NUM_SEL_MNT_OPTS 5
  
@@ -92445,7 +91629,7 @@ index ef26e96..642fb78 100644
  /* SECMARK reference count */
  static atomic_t selinux_secmark_refcount = ATOMIC_INIT(0);
  
-@@ -5501,7 +5499,7 @@ static int selinux_key_getsecurity(struct key *key, char **_buffer)
+@@ -5498,7 +5496,7 @@ static int selinux_key_getsecurity(struct key *key, char **_buffer)
  
  #endif
  
@@ -92468,10 +91652,10 @@ index 65f67cb..3f141ef 100644
  }
  #else
 diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c
-index 38be92c..21f49ee 100644
+index fa64740..bc95b74 100644
 --- a/security/smack/smack_lsm.c
 +++ b/security/smack/smack_lsm.c
-@@ -3398,7 +3398,7 @@ static int smack_inode_getsecctx(struct inode *inode, void **ctx, u32 *ctxlen)
+@@ -3392,7 +3392,7 @@ static int smack_inode_getsecctx(struct inode *inode, void **ctx, u32 *ctxlen)
        return 0;
  }
  
@@ -92521,22 +91705,10 @@ index 20ef514..4182bed 100644
        select SECURITY_PATH
        default n
 diff --git a/security/yama/yama_lsm.c b/security/yama/yama_lsm.c
-index 23414b9..f8c115e 100644
+index 13c88fbc..f8c115e 100644
 --- a/security/yama/yama_lsm.c
 +++ b/security/yama/yama_lsm.c
-@@ -347,10 +347,8 @@ int yama_ptrace_traceme(struct task_struct *parent)
-       /* Only disallow PTRACE_TRACEME on more aggressive settings. */
-       switch (ptrace_scope) {
-       case YAMA_SCOPE_CAPABILITY:
--              rcu_read_lock();
--              if (!ns_capable(__task_cred(parent)->user_ns, CAP_SYS_PTRACE))
-+              if (!has_ns_capability(parent, current_user_ns(), CAP_SYS_PTRACE))
-                       rc = -EPERM;
--              rcu_read_unlock();
-               break;
-       case YAMA_SCOPE_NO_ATTACH:
-               rc = -EPERM;
-@@ -367,7 +365,7 @@ int yama_ptrace_traceme(struct task_struct *parent)
+@@ -365,7 +365,7 @@ int yama_ptrace_traceme(struct task_struct *parent)
  }
  
  #ifndef CONFIG_SECURITY_YAMA_STACKED
@@ -92545,7 +91717,7 @@ index 23414b9..f8c115e 100644
        .name =                 "yama",
  
        .ptrace_access_check =  yama_ptrace_access_check,
-@@ -378,28 +376,24 @@ static struct security_operations yama_ops = {
+@@ -376,28 +376,24 @@ static struct security_operations yama_ops = {
  #endif
  
  #ifdef CONFIG_SYSCTL
@@ -92715,7 +91887,7 @@ index af49721..e85058e 100644
        if (err < 0)
                return err;
 diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
-index 09b4286..8620fac 100644
+index eb560fa..69a4995 100644
 --- a/sound/core/pcm_native.c
 +++ b/sound/core/pcm_native.c
 @@ -2806,11 +2806,11 @@ int snd_pcm_kernel_ioctl(struct snd_pcm_substream *substream,
@@ -93086,6 +92258,19 @@ index 22056c5..25d3244 100644
        chip->card = card;
        chip->pci = pci;
        chip->irq = -1;
+diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
+index 7decbd9..d17d9d0 100644
+--- a/sound/soc/fsl/fsl_ssi.c
++++ b/sound/soc/fsl/fsl_ssi.c
+@@ -643,7 +643,7 @@ static int fsl_ssi_probe(struct platform_device *pdev)
+ {
+       struct fsl_ssi_private *ssi_private;
+       int ret = 0;
+-      struct device_attribute *dev_attr = NULL;
++      device_attribute_no_const *dev_attr = NULL;
+       struct device_node *np = pdev->dev.of_node;
+       const char *p, *sprop;
+       const uint32_t *iprop;
 diff --git a/tools/gcc/.gitignore b/tools/gcc/.gitignore
 new file mode 100644
 index 0000000..50f2f2f
@@ -103419,10 +102604,10 @@ index 0000000..ac2901e
 +}
 diff --git a/tools/gcc/structleak_plugin.c b/tools/gcc/structleak_plugin.c
 new file mode 100644
-index 0000000..5afca14
+index 0000000..4fae911
 --- /dev/null
 +++ b/tools/gcc/structleak_plugin.c
-@@ -0,0 +1,271 @@
+@@ -0,0 +1,277 @@
 +/*
 + * Copyright 2013 by PaX Team <pageexec@freemail.hu>
 + * Licensed under the GPL v2
@@ -103557,19 +102742,23 @@ index 0000000..5afca14
 +      gimple init_stmt;
 +
 +      // this is the original entry bb before the forced split
++      // TODO: check further BBs in case more splits occured before us
 +      bb = ENTRY_BLOCK_PTR->next_bb->next_bb;
 +
 +      // first check if the variable is already initialized, warn otherwise
 +      for (gsi = gsi_start_bb(bb); !gsi_end_p(gsi); gsi_next(&gsi)) {
 +              gimple stmt = gsi_stmt(gsi);
-+              tree rhs1 = gimple_assign_rhs1(stmt);
++              tree rhs1;
 +
 +              // we're looking for an assignment of a single rhs...
 +              if (!gimple_assign_single_p(stmt))
 +                      continue;
++              rhs1 = gimple_assign_rhs1(stmt);
++#if BUILDING_GCC_VERSION >= 4007
 +              // ... of a non-clobbering expression...
 +              if (TREE_CLOBBER_P(rhs1))
 +                      continue;
++#endif
 +              // ... to our variable...
 +              if (gimple_get_lhs(stmt) != var)
 +                      continue;
@@ -103578,9 +102767,11 @@ index 0000000..5afca14
 +                      return;
 +      }
 +
++      // these aren't the 0days you're looking for
++//    inform(DECL_SOURCE_LOCATION(var), "userspace variable will be forcibly initialized");
++
 +      // build the initializer expression
-+      initializer = make_node(CONSTRUCTOR);
-+      TREE_TYPE(initializer) = TREE_TYPE(var);
++      initializer = build_constructor(TREE_TYPE(var), NULL);
 +
 +      // build the initializer stmt
 +      init_stmt = gimple_build_assign(var, initializer);
@@ -103723,27 +102914,8 @@ index 96b919d..c49bb74 100644
 +#endif
 +
  #endif
-diff --git a/virt/kvm/ioapic.c b/virt/kvm/ioapic.c
-index cfb7e4d..52058f0 100644
---- a/virt/kvm/ioapic.c
-+++ b/virt/kvm/ioapic.c
-@@ -73,9 +73,12 @@ static unsigned long ioapic_read_indirect(struct kvm_ioapic *ioapic,
-                       u32 redir_index = (ioapic->ioregsel - 0x10) >> 1;
-                       u64 redir_content;
--                      ASSERT(redir_index < IOAPIC_NUM_PINS);
-+                      if (redir_index < IOAPIC_NUM_PINS)
-+                              redir_content =
-+                                      ioapic->redirtbl[redir_index].bits;
-+                      else
-+                              redir_content = ~0ULL;
--                      redir_content = ioapic->redirtbl[redir_index].bits;
-                       result = (ioapic->ioregsel & 0x1) ?
-                           (redir_content >> 32) & 0xffffffff :
-                           redir_content & 0xffffffff;
 diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
-index 1cd693a..f4a7b20 100644
+index f18013f..90421df 100644
 --- a/virt/kvm/kvm_main.c
 +++ b/virt/kvm/kvm_main.c
 @@ -75,12 +75,17 @@ LIST_HEAD(vm_list);
@@ -103766,7 +102938,7 @@ index 1cd693a..f4a7b20 100644
  
  struct dentry *kvm_debugfs_dir;
  
-@@ -731,7 +736,7 @@ int __kvm_set_memory_region(struct kvm *kvm,
+@@ -769,7 +774,7 @@ int __kvm_set_memory_region(struct kvm *kvm,
        /* We can read the guest memory with __xxx_user() later on. */
        if (user_alloc &&
            ((mem->userspace_addr & (PAGE_SIZE - 1)) ||
@@ -103775,7 +102947,7 @@ index 1cd693a..f4a7b20 100644
                        (void __user *)(unsigned long)mem->userspace_addr,
                        mem->memory_size)))
                goto out;
-@@ -1783,7 +1788,7 @@ static int kvm_vcpu_release(struct inode *inode, struct file *filp)
+@@ -1881,7 +1886,7 @@ static int kvm_vcpu_release(struct inode *inode, struct file *filp)
        return 0;
  }
  
@@ -103784,7 +102956,7 @@ index 1cd693a..f4a7b20 100644
        .release        = kvm_vcpu_release,
        .unlocked_ioctl = kvm_vcpu_ioctl,
  #ifdef CONFIG_COMPAT
-@@ -2304,7 +2309,7 @@ static int kvm_vm_mmap(struct file *file, struct vm_area_struct *vma)
+@@ -2402,7 +2407,7 @@ static int kvm_vm_mmap(struct file *file, struct vm_area_struct *vma)
        return 0;
  }
  
@@ -103793,7 +102965,7 @@ index 1cd693a..f4a7b20 100644
        .release        = kvm_vm_release,
        .unlocked_ioctl = kvm_vm_ioctl,
  #ifdef CONFIG_COMPAT
-@@ -2402,7 +2407,7 @@ out:
+@@ -2500,7 +2505,7 @@ out:
        return r;
  }
  
@@ -103802,7 +102974,7 @@ index 1cd693a..f4a7b20 100644
        .unlocked_ioctl = kvm_dev_ioctl,
        .compat_ioctl   = kvm_dev_ioctl,
        .llseek         = noop_llseek,
-@@ -2428,7 +2433,7 @@ static void hardware_enable_nolock(void *junk)
+@@ -2526,7 +2531,7 @@ static void hardware_enable_nolock(void *junk)
  
        if (r) {
                cpumask_clear_cpu(cpu, cpus_hardware_enabled);
@@ -103811,7 +102983,7 @@ index 1cd693a..f4a7b20 100644
                printk(KERN_INFO "kvm: enabling virtualization on "
                                 "CPU%d failed\n", cpu);
        }
-@@ -2482,10 +2487,10 @@ static int hardware_enable_all(void)
+@@ -2580,10 +2585,10 @@ static int hardware_enable_all(void)
  
        kvm_usage_count++;
        if (kvm_usage_count == 1) {
@@ -103824,7 +102996,7 @@ index 1cd693a..f4a7b20 100644
                        hardware_disable_all_nolock();
                        r = -EBUSY;
                }
-@@ -2843,7 +2848,7 @@ static void kvm_sched_out(struct preempt_notifier *pn,
+@@ -2941,7 +2946,7 @@ static void kvm_sched_out(struct preempt_notifier *pn,
        kvm_arch_vcpu_put(vcpu);
  }
  
@@ -103833,7 +103005,7 @@ index 1cd693a..f4a7b20 100644
                  struct module *module)
  {
        int r;
-@@ -2879,7 +2884,7 @@ int kvm_init(void *opaque, unsigned vcpu_size, unsigned vcpu_align,
+@@ -2977,7 +2982,7 @@ int kvm_init(void *opaque, unsigned vcpu_size, unsigned vcpu_align,
        if (!vcpu_align)
                vcpu_align = __alignof__(struct kvm_vcpu);
        kvm_vcpu_cache = kmem_cache_create("kvm_vcpu", vcpu_size, vcpu_align,
@@ -103842,7 +103014,7 @@ index 1cd693a..f4a7b20 100644
        if (!kvm_vcpu_cache) {
                r = -ENOMEM;
                goto out_free_3;
-@@ -2889,9 +2894,11 @@ int kvm_init(void *opaque, unsigned vcpu_size, unsigned vcpu_align,
+@@ -2987,9 +2992,11 @@ int kvm_init(void *opaque, unsigned vcpu_size, unsigned vcpu_align,
        if (r)
                goto out_free;
  
@@ -103854,7 +103026,7 @@ index 1cd693a..f4a7b20 100644
  
        r = misc_register(&kvm_dev);
        if (r) {
-@@ -2901,9 +2908,6 @@ int kvm_init(void *opaque, unsigned vcpu_size, unsigned vcpu_align,
+@@ -2999,9 +3006,6 @@ int kvm_init(void *opaque, unsigned vcpu_size, unsigned vcpu_align,
  
        register_syscore_ops(&kvm_syscore_ops);
  
index b2b4627f4d503656d198c885ddedeee16d8e00c2..6ed0bd4122ae6e42a6b7a5691b8579eedefa6f95 100755 (executable)
@@ -7,8 +7,17 @@
 BASEDIR=$(dirname ${0})
 SCRIPTS_DIR=${BASEDIR}
 
-CONFIGS="x86_64:default i686:legacy i686:default"
-CONFIGS="${CONFIGS} armv7hl:exynos armv7hl:omap armv5tel:versatile armv5tel:kirkwood"
+# x86_64
+CONFIGS="x86_64:default"
+
+# i686
+CONFIGS="${CONFIGS} i686:legacy i686:default"
+
+# armv7hl
+CONFIGS="${CONFIGS} armv7hl:exynos armv7hl:default"
+
+# armv5tel
+CONFIGS="${CONFIGS} armv5tel:versatile armv5tel:kirkwood"
 
 function merge_config() {
        local arch=${1}
@@ -64,11 +73,12 @@ function merge_config() {
                armv5tel:kirkwood)
                        configs="${configs} config-arm-generic config-armv5tel-kirkwood"
                        ;;
-               armv7hl:exynos)
-                       configs="${configs} config-arm-generic config-armv7hl-exynos"
+               armv7hl:default)
+                       configs="${configs} config-arm-generic config-armv7hl-default"
                        ;;
-               armv7hl:omap)
-                       configs="${configs} config-arm-generic config-armv7hl-omap"
+               armv7hl:exynos)
+                       configs="${configs} config-arm-generic config-armv7hl-default"
+                       configs="${configs} config-armv7hl-exynos"
                        ;;
                *)
                        echo >&2 "ERROR: Invalid parameters given: $@"
@@ -242,6 +252,11 @@ function diff_configs() {
                                ${SCRIPTS_DIR}/configdiff.py ${tmpdir}/config-i686-default \
                                        ${filename} > ${filename}.tmp
                                ;;
+                       armv7hl:exynos)
+                               # Exynos depends directly on the default configuration.
+                               ${SCRIPTS_DIR}/configdiff.py ${tmpdir}/config-armv7hl-default \
+                                       ${filename} > ${filename}.tmp
+                               ;;
                        armv5tel:versatile)
                                rm -f ${filename}
                                continue