From 664c0173f89c6cc7b8fc71d5a1a1fa7e571d4b0f Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sat, 6 Sep 2014 09:56:39 +0200 Subject: [PATCH] kernel: Update to 3.16.2 --- kernel/config-arm-generic | 124 +- kernel/config-armv5tel-default | 92 +- kernel/config-armv7hl-default | 312 +- kernel/config-armv7hl-lpae | 11 + kernel/config-generic | 109 +- kernel/config-i686-default | 29 +- kernel/config-i686-legacy | 27 +- kernel/config-x86-generic | 52 +- kernel/config-x86_64-default | 7 + kernel/kernel.nm | 2 +- ... grsecurity-3.0-3.16.2-201409060014.patch} | 19157 +++++++++++----- .../grsecurity-3.15.4-arm-kvm_arch_init.patch | 13 - 12 files changed, 13959 insertions(+), 5976 deletions(-) rename kernel/patches/{grsecurity-3.0-3.15.6-201407232200.patch => grsecurity-3.0-3.16.2-201409060014.patch} (89%) delete mode 100644 kernel/patches/grsecurity-3.15.4-arm-kvm_arch_init.patch diff --git a/kernel/config-arm-generic b/kernel/config-arm-generic index 1fdcf3972..09db613c4 100644 --- a/kernel/config-arm-generic +++ b/kernel/config-arm-generic @@ -1,7 +1,5 @@ CONFIG_ARM=y CONFIG_SYS_SUPPORTS_APM_EMULATION=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y -CONFIG_ARCH_HAS_CPUFREQ=y CONFIG_VECTORS_BASE=0xffff0000 CONFIG_ARM_PATCH_PHYS_VIRT=y @@ -76,20 +74,14 @@ CONFIG_LBDAF=y # CONFIG_ARCH_S5P64X0 is not set # CONFIG_ARCH_S5PC100 is not set # CONFIG_ARCH_S5PV210 is not set -# CONFIG_ARCH_EXYNOS is not set # CONFIG_ARCH_DAVINCI is not set # CONFIG_ARCH_OMAP1 is not set # -# Qualcomm SoC Selection +# OMAP Legacy Platform Data Board Type # # CONFIG_PLAT_SPEAR is not set -# -# Versatile Express platform type -# -CONFIG_PLAT_ORION=y - # # Processor Type # @@ -105,9 +97,6 @@ CONFIG_ARM_THUMB=y # CONFIG_CPU_DCACHE_DISABLE is not set CONFIG_KUSER_HELPERS=y CONFIG_OUTER_CACHE=y -CONFIG_CACHE_FEROCEON_L2=y -# CONFIG_CACHE_FEROCEON_L2_WRITETHROUGH is not set -CONFIG_ARM_NR_BANKS=8 CONFIG_MULTI_IRQ_HANDLER=y # @@ -123,7 +112,7 @@ CONFIG_PCI_SYSCALL=y # # PCI host controller drivers # -# CONFIG_PCI_MVEBU is not set +CONFIG_PCI_HOST_GENERIC=y # CONFIG_PCCARD is not set # @@ -133,10 +122,8 @@ CONFIG_VMSPLIT_3G=y # CONFIG_VMSPLIT_2G is not set # CONFIG_VMSPLIT_1G is not set CONFIG_PAGE_OFFSET=0xC0000000 -CONFIG_HZ_FIXED=0 -# CONFIG_HZ_200 is not set -# CONFIG_HZ_500 is not set CONFIG_AEABI=y +# CONFIG_OABI_COMPAT is not set # CONFIG_ARCH_SPARSEMEM_DEFAULT is not set # CONFIG_ARCH_SELECT_MEMORY_MODEL is not set CONFIG_HIGHMEM=y @@ -167,11 +154,7 @@ CONFIG_AUTO_ZRELADDR=y # CONFIG_CPU_FREQ_STAT=y # CONFIG_CPU_FREQ_STAT_DETAILS is not set - -# -# ARM CPU frequency scaling drivers -# -# CONFIG_ARM_KIRKWOOD_CPUFREQ is not set +# CONFIG_GENERIC_CPUFREQ_CPU0 is not set # # At least one emulation must be selected @@ -185,11 +168,6 @@ CONFIG_APM_EMULATION=y CONFIG_CPU_PM=y CONFIG_ARM_CPU_SUSPEND=y -# -# Classification -# -CONFIG_BPF_JIT=y - # # Bluetooth device drivers # @@ -218,8 +196,8 @@ CONFIG_CMA_AREAS=7 # # Bus devices # -CONFIG_MVEBU_MBUS=y -CONFIG_ARM_CCI=y +CONFIG_BRCMSTB_GISB_ARB=y +CONFIG_VEXPRESS_CONFIG=y CONFIG_DTC=y CONFIG_OF=y @@ -254,7 +232,7 @@ CONFIG_BLK_DEV_RAM_SIZE=4096 # CONFIG_SENSORS_LIS3LV02D is not set # CONFIG_SGI_IOC4 is not set # CONFIG_HP_ILO is not set -# CONFIG_PCH_PHUB is not set +CONFIG_VEXPRESS_SYSCFG=y # # SCSI Transports @@ -288,9 +266,11 @@ CONFIG_MII=y # Distributed Switch Architecture drivers # CONFIG_AMD8111_ETH=y +CONFIG_AMD_XGBE=m CONFIG_ARC_EMAC=m CONFIG_NET_CADENCE=y CONFIG_BCMGENET=m +CONFIG_SYSTEMPORT=m # CONFIG_CHELSIO_T1_1G is not set CONFIG_NET_VENDOR_CIRRUS=y CONFIG_CS89x0=m @@ -303,9 +283,9 @@ CONFIG_DM9000=m CONFIG_NET_VENDOR_FARADAY=y CONFIG_FTMAC100=m CONFIG_FTGMAC100=m +CONFIG_NET_VENDOR_HISILICON=y +CONFIG_HIX5HD2_GMAC=m # CONFIG_I40E_VXLAN is not set -CONFIG_MV643XX_ETH=m -CONFIG_MVNETA=m # CONFIG_SKGE_GENESIS is not set CONFIG_AX88796=m CONFIG_AX88796_93CX6=y @@ -320,6 +300,7 @@ CONFIG_SMC911X=m # # MII PHY device drivers # +CONFIG_AMD_XGBE_PHY=m CONFIG_MDIO_BUS_MUX=m CONFIG_MDIO_BUS_MUX_GPIO=m CONFIG_MDIO_BUS_MUX_MMIOREG=m @@ -349,6 +330,7 @@ CONFIG_WIL6210_TRACING=y # CONFIG_KEYBOARD_ADP5520 is not set CONFIG_KEYBOARD_PMIC8XXX=m # CONFIG_KEYBOARD_STMPE is not set +CONFIG_KEYBOARD_OMAP4=m # CONFIG_KEYBOARD_TC3589X is not set # CONFIG_INPUT_PM8XXX_VIBRATOR is not set CONFIG_INPUT_PMIC8XXX_PWRKEY=m @@ -381,6 +363,7 @@ CONFIG_SERIAL_8250_EM=m # # Non-8250 serial port support # +CONFIG_SERIAL_EARLYCON_ARM_SEMIHOST=y # CONFIG_SERIAL_JSM is not set CONFIG_SERIAL_OF_PLATFORM=y # CONFIG_SERIAL_SCCNXP is not set @@ -409,6 +392,7 @@ CONFIG_I2C_SIS630=m # I2C system bus drivers (mostly embedded / system-on-chip) # CONFIG_I2C_MV64XXX=m +CONFIG_I2C_RK3X=m # # Pin controllers @@ -419,28 +403,28 @@ CONFIG_GENERIC_PINCONF=y # CONFIG_PINCTRL_AS3722 is not set # CONFIG_PINCTRL_BCM281XX is not set CONFIG_PINCTRL_MSM=y -CONFIG_PINCTRL_MSM8X74=m +CONFIG_PINCTRL_IPQ8064=y # CONFIG_PINCTRL_PALMAS is not set -CONFIG_PINCTRL_MVEBU=y CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y CONFIG_ARCH_REQUIRE_GPIOLIB=y CONFIG_OF_GPIO=y +CONFIG_GPIOLIB_IRQCHIP=y CONFIG_GPIO_GENERIC=y # # Memory mapped GPIO drivers: # +CONFIG_GPIO_GENERIC_PLATFORM=y # CONFIG_GPIO_DWAPB is not set # CONFIG_GPIO_EM is not set # CONFIG_GPIO_ZEVIO is not set -CONFIG_GPIO_MVEBU=y -# CONFIG_GPIO_RCAR is not set # CONFIG_GPIO_SYSCON is not set # CONFIG_GPIO_GRGPIO is not set # # I2C GPIO expanders: # +# CONFIG_GPIO_STMPE is not set CONFIG_GPIO_ADNP=m # @@ -478,7 +462,6 @@ CONFIG_GPIO_BCM_KONA=y # CONFIG_CHARGER_TPS65090 is not set CONFIG_POWER_RESET_AS3722=y CONFIG_POWER_RESET_GPIO=y -# CONFIG_POWER_RESET_QNAP is not set CONFIG_POWER_RESET_RESTART=y CONFIG_POWER_RESET_VEXPRESS=y @@ -493,7 +476,6 @@ CONFIG_THERMAL_OF=y # Watchdog Device Drivers # CONFIG_GPIO_WATCHDOG=m -CONFIG_ORION_WATCHDOG=m CONFIG_MAX63XX_WATCHDOG=m # @@ -512,15 +494,17 @@ CONFIG_MFD_AS3722=y CONFIG_MFD_PM8XXX=m CONFIG_MFD_PM8921_CORE=m # CONFIG_MFD_RTSX_PCI is not set +CONFIG_MFD_STMPE=y # # STMicroelectronics STMPE Interface Drivers # +CONFIG_STMPE_I2C=y CONFIG_TWL4030_POWER=y # CONFIG_MFD_T7L66XB is not set # CONFIG_MFD_TC6387XB is not set # CONFIG_MFD_TC6393XB is not set -CONFIG_VEXPRESS_CONFIG=y +CONFIG_MFD_VEXPRESS_SYSREG=y CONFIG_REGULATOR=y # CONFIG_REGULATOR_DEBUG is not set CONFIG_REGULATOR_FIXED_VOLTAGE=y @@ -533,6 +517,7 @@ CONFIG_REGULATOR_ANATOP=m CONFIG_REGULATOR_AAT2870=m CONFIG_REGULATOR_AS3711=m CONFIG_REGULATOR_AS3722=m +CONFIG_REGULATOR_AXP20X=m CONFIG_REGULATOR_BCM590XX=m CONFIG_REGULATOR_DA903X=m CONFIG_REGULATOR_DA9052=m @@ -544,6 +529,7 @@ CONFIG_REGULATOR_ISL6271A=m CONFIG_REGULATOR_LP3971=m CONFIG_REGULATOR_LP3972=m CONFIG_REGULATOR_LP8755=m +CONFIG_REGULATOR_LTC3589=m CONFIG_REGULATOR_MAX14577=m CONFIG_REGULATOR_MAX1586=m CONFIG_REGULATOR_MAX8649=m @@ -637,29 +623,17 @@ CONFIG_DVB_STV0297=y # CONFIG_DVB_LNBP21=y -# -# Direct Rendering Manager -# -CONFIG_DRM_GEM_CMA_HELPER=y -CONFIG_DRM_KMS_CMA_HELPER=y - # # I2C encoder or helper chips # # CONFIG_DRM_RADEON is not set # CONFIG_DRM_NOUVEAU is not set CONFIG_DRM_ARMADA=m -CONFIG_DRM_RCAR_DU=m -CONFIG_DRM_RCAR_LVDS=y -CONFIG_DRM_SHMOBILE=m # CONFIG_DRM_TILCDC is not set # # Frame buffer Devices # -CONFIG_FB_SYS_FILLRECT=y -CONFIG_FB_SYS_COPYAREA=y -CONFIG_FB_SYS_IMAGEBLIT=y # CONFIG_FB_BACKLIGHT is not set # @@ -667,10 +641,14 @@ CONFIG_FB_SYS_IMAGEBLIT=y # # CONFIG_FB_SSD1307 is not set # CONFIG_BACKLIGHT_PWM is not set +# CONFIG_BACKLIGHT_LM3630A is not set +# CONFIG_BACKLIGHT_LP855X is not set +# CONFIG_BACKLIGHT_LP8788 is not set # # Console display driver support # +CONFIG_SND_DMAENGINE_PCM=m CONFIG_SND_COMPRESS_OFFLOAD=m # CONFIG_SND_ALI5451 is not set @@ -679,9 +657,19 @@ CONFIG_SND_COMPRESS_OFFLOAD=m # CONFIG_SND_ARM=y CONFIG_SND_SOC=m +CONFIG_SND_SOC_GENERIC_DMAENGINE_PCM=y CONFIG_SND_ATMEL_SOC=m CONFIG_SND_DESIGNWARE_I2S=m -CONFIG_SND_KIRKWOOD_SOC=m + +# +# Common SoC Audio options for Freescale CPUs: +# +CONFIG_SND_SOC_FSL_SAI=m +CONFIG_SND_SOC_FSL_SSI=m +CONFIG_SND_SOC_FSL_SPDIF=m +CONFIG_SND_SOC_FSL_ESAI=m +CONFIG_SND_SOC_FSL_UTILS=m +CONFIG_SND_SOC_IMX_AUDMUX=m # # SoC Audio support for SuperH @@ -695,8 +683,9 @@ CONFIG_SND_SOC_ADAU1701=m CONFIG_SND_SOC_AK4554=m CONFIG_SND_SOC_AK4642=m CONFIG_SND_SOC_AK5386=m -CONFIG_SND_SOC_CS42L51=m +CONFIG_SND_SOC_ALC5623=m CONFIG_SND_SOC_CS42L52=m +CONFIG_SND_SOC_CS42L56=m CONFIG_SND_SOC_CS42L73=m CONFIG_SND_SOC_CS4270=m CONFIG_SND_SOC_CS4271=m @@ -708,8 +697,10 @@ CONFIG_SND_SOC_PCM512x=m CONFIG_SND_SOC_PCM512x_I2C=m CONFIG_SND_SOC_SGTL5000=m CONFIG_SND_SOC_SIGMADSP=m +CONFIG_SND_SOC_SIGMADSP_I2C=m CONFIG_SND_SOC_SIRF_AUDIO_CODEC=m CONFIG_SND_SOC_SPDIF=m +CONFIG_SND_SOC_STA350=m CONFIG_SND_SOC_TAS5086=m CONFIG_SND_SOC_TLV320AIC3X=m CONFIG_SND_SOC_WM8510=m @@ -729,11 +720,6 @@ CONFIG_SND_SOC_WM8962=m CONFIG_SND_SOC_TPA6130A2=m CONFIG_SND_SIMPLE_CARD=m -# -# USB Host Controller Drivers -# -CONFIG_USB_EHCI_HCD_ORION=y - # # USB Imaging devices # @@ -751,7 +737,6 @@ CONFIG_USB_ULPI=y # MMC/SD/SDIO Host Controller Drivers # CONFIG_MMC_SDHCI_OF_ARASAN=m -CONFIG_MMC_MVSDIO=m CONFIG_MMC_DW=m CONFIG_MMC_DW_IDMAC=y CONFIG_MMC_DW_PLTFM=m @@ -778,7 +763,6 @@ CONFIG_RTC_DRV_HYM8563=m # # on-CPU RTC drivers # -CONFIG_RTC_DRV_MV=m CONFIG_RTC_DRV_PM8XXX=m CONFIG_RTC_DRV_SNVS=m @@ -800,25 +784,18 @@ CONFIG_MSM_GCC_8960=m CONFIG_MSM_MMCC_8960=m CONFIG_MSM_GCC_8974=m CONFIG_MSM_MMCC_8974=m -CONFIG_MVEBU_CLK_COMMON=y # # Hardware Spinlock drivers # CONFIG_CLKSRC_OF=y CONFIG_CLKSRC_MMIO=y -CONFIG_ORION_TIMER=y +CONFIG_CLKSRC_VERSATILE=y CONFIG_OF_IOMMU=y -# -# Rpmsg drivers -# -CONFIG_MVEBU_DEVBUS=y - # # Analog to digital converters # -# CONFIG_EXYNOS_ADC is not set CONFIG_VF610_ADC=m # @@ -827,12 +804,6 @@ CONFIG_VF610_ADC=m CONFIG_PWM=y CONFIG_PWM_SYSFS=y CONFIG_IRQCHIP=y -CONFIG_ORION_IRQCHIP=y - -# -# PHY Subsystem -# -CONFIG_PHY_MVEBU_SATA=y # # Memory Debugging @@ -849,6 +820,7 @@ CONFIG_PHY_MVEBU_SATA=y # # CONFIG_ARM_PTDUMP is not set CONFIG_ARM_UNWIND=y +CONFIG_OLD_MCOUNT=y # CONFIG_DEBUG_USER is not set # CONFIG_DEBUG_LL is not set # CONFIG_DEBUG_UART_PL01X is not set @@ -885,13 +857,9 @@ CONFIG_CRYPTO_SHA1_ARM=m # CONFIG_CRYPTO_AES_ARM=m -# -# Random Number Generation -# -CONFIG_CRYPTO_DEV_MV_CESA=m - # # Library routines # CONFIG_ARCH_USE_CMPXCHG_LOCKREF=y CONFIG_AUDIT_GENERIC=y +CONFIG_LIBFDT=y diff --git a/kernel/config-armv5tel-default b/kernel/config-armv5tel-default index ce625d1a6..8cdb7364e 100644 --- a/kernel/config-armv5tel-default +++ b/kernel/config-armv5tel-default @@ -21,7 +21,6 @@ CONFIG_TINY_RCU=y # # CONFIG_ARCH_MULTIPLATFORM is not set CONFIG_ARCH_KIRKWOOD=y -CONFIG_MACH_T5325=y # # Marvell Kirkwood Implementations @@ -36,6 +35,7 @@ CONFIG_MACH_OPENRD_CLIENT=y CONFIG_MACH_OPENRD_ULTIMATE=y CONFIG_MACH_RD88F6192_NAS=y CONFIG_MACH_RD88F6281=y +CONFIG_MACH_T5325=y CONFIG_MACH_TS219=y CONFIG_MACH_TS41X=y @@ -43,6 +43,7 @@ CONFIG_MACH_TS41X=y # Device tree entries # CONFIG_ARCH_KIRKWOOD_DT=y +CONFIG_PLAT_ORION=y CONFIG_PLAT_ORION_LEGACY=y # @@ -62,19 +63,29 @@ CONFIG_CPU_USE_DOMAINS=y # Processor Features # CONFIG_NEED_KUSER_HELPERS=y +CONFIG_CACHE_FEROCEON_L2=y +# CONFIG_CACHE_FEROCEON_L2_WRITETHROUGH is not set # CONFIG_CACHE_L2X0 is not set CONFIG_ARM_L1_CACHE_SHIFT=5 # # PCI host controller drivers # +# CONFIG_PCI_MVEBU is not set # CONFIG_PCIEPORTBUS is not set # # Kernel Features # CONFIG_ARCH_NR_GPIO=0 -# CONFIG_OABI_COMPAT is not set +CONFIG_HZ_FIXED=0 +# CONFIG_HZ_100 is not set +# CONFIG_HZ_200 is not set +# CONFIG_HZ_250 is not set +CONFIG_HZ_300=y +# CONFIG_HZ_500 is not set +# CONFIG_HZ_1000 is not set +CONFIG_HZ=300 CONFIG_SPLIT_PTLOCK_CPUS=999999 CONFIG_NEED_PER_CPU_KM=y CONFIG_FORCE_MAX_ZONEORDER=11 @@ -89,6 +100,11 @@ CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_FROM_BOOTLOADER=y CONFIG_CMDLINE="console=ttyAM0,115200 root=/dev/sda1 rootdelay=20" # CONFIG_XIP_KERNEL is not set +# +# ARM CPU frequency scaling drivers +# +CONFIG_ARM_KIRKWOOD_CPUFREQ=y + # # ARM CPU Idle Drivers # @@ -100,6 +116,11 @@ CONFIG_CMDLINE="console=ttyAM0,115200 root=/dev/sda1 rootdelay=20" # # CONFIG_SYS_HYPERVISOR is not set +# +# Bus devices +# +CONFIG_MVEBU_MBUS=y + # # Device Tree and Open Firmware support # @@ -114,6 +135,8 @@ CONFIG_VIRTIO_BLK=y # Distributed Switch Architecture drivers # # CONFIG_VORTEX is not set +CONFIG_MV643XX_ETH=m +CONFIG_MVNETA=m # # USB Network Adapters @@ -125,6 +148,16 @@ CONFIG_B43_SDIO=y # # CONFIG_ISDN_DRV_LOOP is not set +# +# Input device support +# +CONFIG_INPUT_MATRIXKMAP=m + +# +# Input Device Drivers +# +CONFIG_KEYBOARD_SAMSUNG=m + # # PPS support # @@ -138,19 +171,32 @@ CONFIG_PTP_1588_CLOCK=m # # Pin controllers # +CONFIG_PINCTRL_APQ8064=m # CONFIG_PINCTRL_SINGLE is not set +CONFIG_PINCTRL_MVEBU=y CONFIG_PINCTRL_KIRKWOOD=y +# +# Memory mapped GPIO drivers: +# +CONFIG_GPIO_MVEBU=y + # # 1-wire Slaves # # CONFIG_CHARGER_LP8788 is not set +# CONFIG_POWER_RESET_QNAP is not set # # Native drivers # CONFIG_KIRKWOOD_THERMAL=m +# +# Watchdog Device Drivers +# +CONFIG_ORION_WATCHDOG=m + # # Sonics Silicon Backplane # @@ -191,6 +237,9 @@ CONFIG_DRM_I2C_NXP_TDA998X=m # # Frame buffer Devices # +CONFIG_FB_SYS_FILLRECT=m +CONFIG_FB_SYS_COPYAREA=m +CONFIG_FB_SYS_IMAGEBLIT=m CONFIG_FB_SYS_FOPS=m # @@ -206,15 +255,21 @@ CONFIG_SND_LX6464ES=m CONFIG_SND_MAESTRO3_INPUT=y # -# HD-Audio +# Common SoC Audio options for Freescale CPUs: # +CONFIG_SND_KIRKWOOD_SOC=m CONFIG_SND_KIRKWOOD_SOC_OPENRD=m CONFIG_SND_KIRKWOOD_SOC_T5325=m # # CODEC drivers # -CONFIG_SND_SOC_ALC5623=m +CONFIG_SND_SOC_CS42L51=m + +# +# USB Host Controller Drivers +# +CONFIG_USB_EHCI_HCD_ORION=y # # USB Physical Layer drivers @@ -231,6 +286,7 @@ CONFIG_MMC_BLOCK=m # MMC/SD/SDIO Host Controller Drivers # CONFIG_MMC_RICOH_MMC=y +CONFIG_MMC_MVSDIO=m # # LED drivers @@ -239,6 +295,11 @@ CONFIG_LEDS_PWM=m CONFIG_LEDS_NS2=m CONFIG_LEDS_NETXBIG=m +# +# on-CPU RTC drivers +# +CONFIG_RTC_DRV_MV=m + # # DMA Devices # @@ -272,8 +333,19 @@ CONFIG_BPCTL=m # CONFIG_COMMON_CLK_WM831X=m CONFIG_COMMON_CLK_MAX77686=m +CONFIG_MVEBU_CLK_COMMON=y CONFIG_KIRKWOOD_CLK=y +# +# Hardware Spinlock drivers +# +CONFIG_ORION_TIMER=y + +# +# Rpmsg drivers +# +CONFIG_MVEBU_DEVBUS=y + # # Analog to digital converters # @@ -288,21 +360,16 @@ CONFIG_PWM_LP3943=m CONFIG_PWM_PCA9685=m CONFIG_PWM_TWL=m CONFIG_PWM_TWL_LED=m +CONFIG_ORION_IRQCHIP=y # -# Compile-time checks and compiler options -# -CONFIG_FRAME_POINTER=y - -# -# RCU Debugging +# PHY Subsystem # -CONFIG_FUNCTION_GRAPH_TRACER=y +CONFIG_PHY_MVEBU_SATA=y # # Runtime Testing # -CONFIG_OLD_MCOUNT=y CONFIG_DEBUG_LL_INCLUDE="debug/8250.S" CONFIG_DEBUG_UART_8250=y CONFIG_DEBUG_UART_PHYS=0xf1012000 @@ -315,6 +382,7 @@ CONFIG_UNCOMPRESS_INCLUDE="mach/uncompress.h" # # Random Number Generation # +CONFIG_CRYPTO_DEV_MV_CESA=m CONFIG_CRYPTO_DEV_HIFN_795X=m CONFIG_CRYPTO_DEV_HIFN_795X_RNG=y diff --git a/kernel/config-armv7hl-default b/kernel/config-armv7hl-default index e3a135c23..4b5562ef1 100644 --- a/kernel/config-armv7hl-default +++ b/kernel/config-armv7hl-default @@ -1,7 +1,11 @@ CONFIG_ARM_HAS_SG_CHAIN=y +CONFIG_NEED_SG_DMA_LENGTH=y +CONFIG_ARM_DMA_USE_IOMMU=y +CONFIG_ARM_DMA_IOMMU_ALIGNMENT=8 CONFIG_MIGHT_HAVE_PCI=y CONFIG_NO_IOPORT_MAP=y CONFIG_ARCH_HAS_BANDGAP=y +CONFIG_FIQ=y # # IRQ subsystem @@ -45,6 +49,7 @@ CONFIG_SLUB_CPU_PARTIAL=y # IO Schedulers # CONFIG_MUTEX_SPIN_ON_OWNER=y +CONFIG_RWSEM_SPIN_ON_OWNER=y # # System Type @@ -60,56 +65,30 @@ CONFIG_ARCH_MULTI_V7=y CONFIG_ARCH_MULTI_V6_V7=y # CONFIG_ARCH_MULTI_CPU_AUTO is not set CONFIG_ARCH_VIRT=y -CONFIG_ARCH_MVEBU=y - -# -# Marvell EBU SoC variants -# -CONFIG_MACH_MVEBU_V7=y -CONFIG_MACH_ARMADA_370=y -CONFIG_MACH_ARMADA_375=y -CONFIG_MACH_ARMADA_38X=y -CONFIG_MACH_ARMADA_XP=y -CONFIG_MACH_DOVE=y +# CONFIG_ARCH_MVEBU is not set CONFIG_ARCH_BCM=y - -# -# Broadcom SoC Selection -# # CONFIG_ARCH_BCM_MOBILE is not set CONFIG_ARCH_BCM_5301X=y CONFIG_ARCH_BERLIN=y - -# -# Marvell Berlin SoC variants -# # CONFIG_MACH_BERLIN_BG2 is not set # CONFIG_MACH_BERLIN_BG2CD is not set +# CONFIG_MACH_BERLIN_BG2Q is not set CONFIG_ARCH_HIGHBANK=y CONFIG_ARCH_HI3xxx=y CONFIG_ARCH_KEYSTONE=y CONFIG_ARCH_MXC=y - -# -# Freescale i.MX support -# # CONFIG_MXC_DEBUG_BOARD is not set -# -# i.MX51 machines: -# -# CONFIG_MACH_IMX51_DT is not set -# CONFIG_MACH_MX51_BABBAGE is not set -# CONFIG_MACH_EUKREA_CPUIMX51SD is not set - # # Device tree only # # CONFIG_SOC_IMX50 is not set +# CONFIG_MACH_IMX51_DT is not set # CONFIG_SOC_IMX53 is not set CONFIG_SOC_IMX6=y CONFIG_SOC_IMX6Q=y CONFIG_SOC_IMX6SL=y +CONFIG_SOC_IMX6SX=y CONFIG_SOC_VF610=y # @@ -125,6 +104,10 @@ CONFIG_OMAP_32K_TIMER=y CONFIG_OMAP_DM_TIMER=y CONFIG_OMAP_PM_NOOP=y CONFIG_MACH_OMAP_GENERIC=y + +# +# TI OMAP/AM/DM/DRA Family +# CONFIG_ARCH_OMAP=y CONFIG_ARCH_OMAP3=y CONFIG_ARCH_OMAP4=y @@ -169,10 +152,6 @@ CONFIG_MACH_TI8148EVM=y # CONFIG_OMAP3_EMU is not set # CONFIG_OMAP3_SDRC_AC_TIMING is not set CONFIG_ARCH_QCOM=y - -# -# Qualcomm SoC Selection -# # CONFIG_ARCH_MSM8X60 is not set # CONFIG_ARCH_MSM8960 is not set # CONFIG_ARCH_MSM8974 is not set @@ -182,12 +161,37 @@ CONFIG_ARCH_ROCKCHIP=y CONFIG_ARCH_STI=y CONFIG_SOC_STIH415=y CONFIG_SOC_STIH416=y -CONFIG_ARCH_SHMOBILE=y -CONFIG_ARCH_SHMOBILE_MULTI=y +CONFIG_ARCH_EXYNOS=y +# CONFIG_ARCH_EXYNOS3 is not set +CONFIG_ARCH_EXYNOS4=y +CONFIG_ARCH_EXYNOS5=y + +# +# EXYNOS SoCs +# +CONFIG_CPU_EXYNOS4210=y +CONFIG_SOC_EXYNOS4212=y +CONFIG_SOC_EXYNOS4412=y +CONFIG_SOC_EXYNOS5250=y +CONFIG_SOC_EXYNOS5260=y +CONFIG_SOC_EXYNOS5410=y +CONFIG_SOC_EXYNOS5420=y +CONFIG_SOC_EXYNOS5440=y +CONFIG_SOC_EXYNOS5800=y +# CONFIG_EXYNOS5420_MCPM is not set +CONFIG_PLAT_SAMSUNG=y + +# +# Boot options +# +CONFIG_S5P_DEV_MFC=y # -# Renesas ARM SoCs System Type +# Power management # +# CONFIG_SAMSUNG_PM_CHECK is not set +CONFIG_ARCH_SHMOBILE=y +CONFIG_ARCH_SHMOBILE_MULTI=y # CONFIG_ARCH_EMEV2 is not set # CONFIG_ARCH_R7S72100 is not set # CONFIG_ARCH_R8A7790 is not set @@ -198,6 +202,10 @@ CONFIG_ARCH_SHMOBILE_MULTI=y # CONFIG_SHMOBILE_TIMER_HZ=128 CONFIG_ARCH_SUNXI=y +CONFIG_MACH_SUN4I=y +CONFIG_MACH_SUN5I=y +CONFIG_MACH_SUN6I=y +CONFIG_MACH_SUN7I=y CONFIG_ARCH_SIRF=y # @@ -208,10 +216,6 @@ CONFIG_ARCH_PRIMA2=y CONFIG_ARCH_MARCO=y CONFIG_SIRF_IRQ=y CONFIG_ARCH_TEGRA=y - -# -# NVIDIA Tegra options -# CONFIG_ARCH_TEGRA_2x_SOC=y CONFIG_ARCH_TEGRA_3x_SOC=y CONFIG_ARCH_TEGRA_114_SOC=y @@ -219,20 +223,12 @@ CONFIG_ARCH_TEGRA_124_SOC=y CONFIG_TEGRA_AHB=y CONFIG_ARCH_U8500=y CONFIG_UX500_SOC_DB8500=y - -# -# Ux500 target platform (boards) -# CONFIG_MACH_MOP500=y # CONFIG_MACH_HREFV60 is not set # CONFIG_MACH_SNOWBALL is not set CONFIG_UX500_AUTO_PLATFORM=y CONFIG_UX500_DEBUG_UART=2 CONFIG_ARCH_VEXPRESS=y - -# -# Versatile Express platform type -# CONFIG_ARCH_VEXPRESS_CORTEX_A5_A9_ERRATA=y CONFIG_ARCH_VEXPRESS_CA9X4=y CONFIG_ARCH_VEXPRESS_DCSCB=y @@ -256,8 +252,6 @@ CONFIG_TRUSTED_FOUNDATIONS=y # # Processor Type # -CONFIG_CPU_PJ4=y -CONFIG_CPU_PJ4B=y CONFIG_CPU_V7=y CONFIG_CPU_32v6K=y CONFIG_CPU_32v7=y @@ -283,23 +277,20 @@ CONFIG_OUTER_CACHE_SYNC=y CONFIG_MIGHT_HAVE_CACHE_L2X0=y CONFIG_CACHE_L2X0=y CONFIG_CACHE_PL310=y -CONFIG_CACHE_TAUROS2=y +CONFIG_PL310_ERRATA_588369=y +CONFIG_PL310_ERRATA_727915=y +CONFIG_PL310_ERRATA_753970=y +CONFIG_PL310_ERRATA_769419=y CONFIG_ARM_L1_CACHE_SHIFT_6=y CONFIG_ARM_L1_CACHE_SHIFT=6 CONFIG_ARM_DMA_MEM_BUFFERABLE=y CONFIG_ARCH_SUPPORTS_BIG_ENDIAN=y -CONFIG_IWMMXT=y -CONFIG_PJ4B_ERRATA_4742=y # CONFIG_ARM_ERRATA_430973 is not set -CONFIG_PL310_ERRATA_588369=y # CONFIG_ARM_ERRATA_643719 is not set CONFIG_ARM_ERRATA_720789=y -CONFIG_PL310_ERRATA_727915=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_ERRATA_773022 is not set @@ -316,9 +307,11 @@ CONFIG_PCI_DOMAINS=y # PCI host controller drivers # CONFIG_PCIE_DW=y +CONFIG_PCI_EXYNOS=y CONFIG_PCI_IMX6=y CONFIG_PCI_TEGRA=y CONFIG_PCI_RCAR_GEN2=y +CONFIG_PCI_RCAR_GEN2_PCIE=y CONFIG_PCIEPORTBUS=y CONFIG_PCIEAER=y # CONFIG_PCIE_ECRC is not set @@ -345,9 +338,9 @@ CONFIG_NR_CPUS=4 CONFIG_HOTPLUG_CPU=y CONFIG_ARM_PSCI=y CONFIG_ARCH_NR_GPIO=1024 +CONFIG_HZ_FIXED=200 +CONFIG_HZ=200 # CONFIG_THUMB2_KERNEL is not set -CONFIG_THUMB2_AVOID_R_ARM_THM_JUMP11=y -CONFIG_ARM_ASM_UNIFIED=y CONFIG_ARCH_HAS_HOLES_MEMORYMODEL=y CONFIG_SPLIT_PTLOCK_CPUS=4 CONFIG_MMU_NOTIFIER=y @@ -365,8 +358,17 @@ CONFIG_CMDLINE="root=/dev/ram0 rw ramdisk=8192 initrd=0x41000000,8M console=ttyS # # ARM CPU frequency scaling drivers # -# CONFIG_ARM_BIG_LITTLE_CPUFREQ is not set -# CONFIG_ARM_IMX6Q_CPUFREQ is not set +CONFIG_ARM_BIG_LITTLE_CPUFREQ=m +# CONFIG_ARM_DT_BL_CPUFREQ is not set +# CONFIG_ARM_VEXPRESS_SPC_CPUFREQ is not set +CONFIG_ARM_EXYNOS_CPUFREQ=y +CONFIG_ARM_EXYNOS4210_CPUFREQ=y +CONFIG_ARM_EXYNOS4X12_CPUFREQ=y +CONFIG_ARM_EXYNOS5250_CPUFREQ=y +CONFIG_ARM_EXYNOS5440_CPUFREQ=y +# CONFIG_ARM_EXYNOS_CPU_FREQ_BOOST_SW is not set +CONFIG_ARM_IMX6Q_CPUFREQ=m +# CONFIG_ARM_KIRKWOOD_CPUFREQ is not set CONFIG_ARM_OMAP2PLUS_CPUFREQ=y CONFIG_ARM_TEGRA_CPUFREQ=y @@ -377,6 +379,7 @@ CONFIG_ARM_TEGRA_CPUFREQ=y # CONFIG_ARM_HIGHBANK_CPUIDLE is not set # CONFIG_ARM_ZYNQ_CPUIDLE is not set # CONFIG_ARM_U8500_CPUIDLE is not set +# CONFIG_ARM_EXYNOS_CPUIDLE is not set CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED=y # @@ -392,6 +395,9 @@ CONFIG_KERNEL_MODE_NEON=y CONFIG_PM_SLEEP_SMP=y CONFIG_ARCH_HAS_OPP=y CONFIG_PM_OPP=y +CONFIG_PM_GENERIC_DOMAINS=y +CONFIG_PM_GENERIC_DOMAINS_SLEEP=y +CONFIG_PM_GENERIC_DOMAINS_RUNTIME=y # # Classification @@ -413,6 +419,7 @@ CONFIG_SOC_BUS=y # CONFIG_IMX_WEIM is not set # CONFIG_OMAP_OCP2SCP is not set CONFIG_OMAP_INTERCONNECT=y +CONFIG_ARM_CCI=y # # Device Tree and Open Firmware support @@ -458,7 +465,6 @@ CONFIG_SUN4I_EMAC=m # CONFIG_MACB is not set CONFIG_NET_VENDOR_FREESCALE=y CONFIG_FEC=m -# CONFIG_DWMAC_SOCFPGA is not set CONFIG_DWMAC_SUNXI=y CONFIG_DWMAC_STI=y CONFIG_TI_DAVINCI_EMAC=m @@ -486,14 +492,20 @@ CONFIG_MDIO_SUN4I=m CONFIG_XEN_NETDEV_FRONTEND=m CONFIG_XEN_NETDEV_BACKEND=m +# +# Input device support +# +CONFIG_INPUT_MATRIXKMAP=y + # # Input Device Drivers # CONFIG_KEYBOARD_IMX=m # CONFIG_KEYBOARD_NOMADIK is not set CONFIG_KEYBOARD_TEGRA=m +CONFIG_KEYBOARD_SAMSUNG=y +# CONFIG_KEYBOARD_ST_KEYSCAN is not set CONFIG_KEYBOARD_SH_KEYSC=m -CONFIG_KEYBOARD_OMAP4=m # CONFIG_INPUT_AB8500_PONKEY is not set CONFIG_INPUT_XEN_KBDDEV_FRONTEND=y CONFIG_INPUT_SIRFSOC_ONKEY=y @@ -508,6 +520,9 @@ CONFIG_INPUT_SIRFSOC_ONKEY=y # CONFIG_SERIAL_AMBA_PL010=m CONFIG_SERIAL_AMBA_PL011=m +CONFIG_SERIAL_SAMSUNG=m +CONFIG_SERIAL_SAMSUNG_UARTS_4=y +CONFIG_SERIAL_SAMSUNG_UARTS=4 CONFIG_SERIAL_SIRFSOC=m CONFIG_SERIAL_IMX=m # CONFIG_SERIAL_UARTLITE is not set @@ -522,6 +537,7 @@ CONFIG_HVC_XEN=y CONFIG_HVC_XEN_FRONTEND=y CONFIG_HW_RANDOM_OMAP=y CONFIG_HW_RANDOM_OMAP3_ROM=y +CONFIG_HW_RANDOM_EXYNOS=y CONFIG_HW_RANDOM_MSM=m # @@ -529,17 +545,20 @@ CONFIG_HW_RANDOM_MSM=m # # CONFIG_I2C_CADENCE is not set CONFIG_I2C_DAVINCI=m +CONFIG_I2C_EXYNOS5=m CONFIG_I2C_IMX=m CONFIG_I2C_NOMADIK=y CONFIG_I2C_OMAP=y CONFIG_I2C_QUP=m CONFIG_I2C_RIIC=m +CONFIG_I2C_S3C2410=m CONFIG_I2C_SH_MOBILE=m CONFIG_I2C_SIRF=m CONFIG_I2C_ST=m +CONFIG_I2C_SUN6I_P2WI=m CONFIG_I2C_TEGRA=m CONFIG_I2C_VERSATILE=m -# CONFIG_I2C_WMT is not set +CONFIG_I2C_WMT=m CONFIG_I2C_RCAR=m # @@ -547,6 +566,12 @@ CONFIG_I2C_RCAR=m # CONFIG_SPMI_MSM_PMIC_ARB=m +# +# HSI controllers +# +CONFIG_OMAP_SSI=m +CONFIG_OMAP_SSI_PORT=m + # # PPS support # @@ -568,30 +593,37 @@ CONFIG_PINCTRL_AB8505=y CONFIG_PINCTRL_IMX=y CONFIG_PINCTRL_IMX6Q=y CONFIG_PINCTRL_IMX6SL=y +CONFIG_PINCTRL_IMX6SX=y CONFIG_PINCTRL_VF610=y +CONFIG_PINCTRL_APQ8064=y +CONFIG_PINCTRL_MSM8X74=m CONFIG_PINCTRL_NOMADIK=y CONFIG_PINCTRL_DB8500=y CONFIG_PINCTRL_DB8540=y CONFIG_PINCTRL_ROCKCHIP=y CONFIG_PINCTRL_SINGLE=y CONFIG_PINCTRL_SIRF=y -CONFIG_PINCTRL_SUNXI=y CONFIG_PINCTRL_ST=y CONFIG_PINCTRL_TEGRA=y CONFIG_PINCTRL_TEGRA20=y CONFIG_PINCTRL_TEGRA30=y CONFIG_PINCTRL_TEGRA114=y CONFIG_PINCTRL_TEGRA124=y -CONFIG_PINCTRL_DOVE=y -CONFIG_PINCTRL_ARMADA_370=y -CONFIG_PINCTRL_ARMADA_375=y -CONFIG_PINCTRL_ARMADA_38X=y -CONFIG_PINCTRL_ARMADA_XP=y +CONFIG_PINCTRL_SAMSUNG=y +CONFIG_PINCTRL_EXYNOS=y +CONFIG_PINCTRL_EXYNOS5440=y CONFIG_PINCTRL_SH_PFC=y CONFIG_GPIO_SH_PFC=y +CONFIG_PINCTRL_SUNXI=y +CONFIG_PINCTRL_SUNXI_COMMON=y +CONFIG_PINCTRL_SUN4I_A10=y +CONFIG_PINCTRL_SUN5I_A10S=y +CONFIG_PINCTRL_SUN5I_A13=y +CONFIG_PINCTRL_SUN6I_A31=y +CONFIG_PINCTRL_SUN6I_A31_R=y +CONFIG_PINCTRL_SUN7I_A20=y # CONFIG_PINCTRL_WM8850 is not set CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y -CONFIG_GPIOLIB_IRQCHIP=y # # Memory mapped GPIO drivers: @@ -599,7 +631,9 @@ CONFIG_GPIOLIB_IRQCHIP=y # CONFIG_GPIO_DAVINCI is not set CONFIG_GPIO_MSM_V2=m CONFIG_GPIO_MXC=y +CONFIG_GPIO_OMAP=y CONFIG_GPIO_PL061=y +# CONFIG_GPIO_RCAR is not set # CONFIG_GPIO_XILINX is not set # @@ -612,23 +646,31 @@ CONFIG_GPIO_PL061=y # 1-wire Slaves # # CONFIG_POWER_RESET_MSM is not set +CONFIG_POWER_RESET_SUN6I=y +CONFIG_POWER_RESET_KEYSTONE=y # # Native drivers # CONFIG_RCAR_THERMAL=y CONFIG_DB8500_THERMAL=y -CONFIG_ARMADA_THERMAL=y # # Texas Instruments thermal drivers # # CONFIG_TI_SOC_THERMAL is not set +# +# Samsung thermal drivers +# +CONFIG_EXYNOS_THERMAL=m +CONFIG_EXYNOS_THERMAL_CORE=y + # # Watchdog Device Drivers # CONFIG_ARM_SP805_WATCHDOG=m +CONFIG_S3C2410_WATCHDOG=m CONFIG_OMAP_WATCHDOG=m CONFIG_DAVINCI_WATCHDOG=m CONFIG_SUNXI_WATCHDOG=m @@ -654,6 +696,7 @@ CONFIG_MFD_DB8500_PRCMU=y # # STMicroelectronics STMPE Interface Drivers # +CONFIG_MFD_SUN6I_PRCM=y CONFIG_MFD_OMAP_USB_HOST=y # CONFIG_MFD_VX855 is not set CONFIG_REGULATOR_88PM8607=y @@ -680,8 +723,16 @@ CONFIG_REGULATOR_TWL4030=y # CONFIG_VIDEO_DM6446_CCDC is not set # CONFIG_VIDEO_OMAP2_VOUT is not set # CONFIG_VIDEO_SH_VOU is not set -# CONFIG_VIDEO_MX3 is not set +CONFIG_VIDEO_OMAP3=m +# CONFIG_VIDEO_OMAP3_DEBUG is not set +CONFIG_VIDEO_MX3=m +# CONFIG_VIDEO_SAMSUNG_EXYNOS4_IS is not set +# CONFIG_VIDEO_SAMSUNG_S5P_TV is not set # CONFIG_VIDEO_CODA is not set +CONFIG_VIDEO_SAMSUNG_S5P_G2D=m +CONFIG_VIDEO_SAMSUNG_S5P_JPEG=m +CONFIG_VIDEO_SAMSUNG_S5P_MFC=m +CONFIG_VIDEO_SAMSUNG_EXYNOS_GSC=m # CONFIG_VIDEO_TI_VPE is not set # @@ -689,11 +740,14 @@ CONFIG_REGULATOR_TWL4030=y # CONFIG_TEGRA_HOST1X=y CONFIG_TEGRA_HOST1X_FIREWALL=y +CONFIG_IMX_IPUV3_CORE=m # # Direct Rendering Manager # CONFIG_DRM_MIPI_DSI=y +CONFIG_DRM_GEM_CMA_HELPER=y +CONFIG_DRM_KMS_CMA_HELPER=y # # I2C encoder or helper chips @@ -703,14 +757,15 @@ CONFIG_DRM_MIPI_DSI=y # CONFIG_DRM_I2C_NXP_TDA998X is not set CONFIG_DRM_EXYNOS=m CONFIG_DRM_EXYNOS_DMABUF=y -CONFIG_DRM_EXYNOS_DPI=y -CONFIG_DRM_EXYNOS_DSI=y +# CONFIG_DRM_EXYNOS_FIMD is not set CONFIG_DRM_EXYNOS_HDMI=y CONFIG_DRM_EXYNOS_VIDI=y CONFIG_DRM_EXYNOS_G2D=y CONFIG_DRM_EXYNOS_IPP=y # CONFIG_DRM_EXYNOS_FIMC is not set # CONFIG_DRM_EXYNOS_ROTATOR is not set +CONFIG_DRM_RCAR_DU=m +CONFIG_DRM_SHMOBILE=m CONFIG_DRM_TEGRA=m CONFIG_DRM_TEGRA_FBDEV=y # CONFIG_DRM_TEGRA_DEBUG is not set @@ -727,6 +782,9 @@ CONFIG_DRM_PANEL=y # # Frame buffer Devices # +CONFIG_FB_SYS_FILLRECT=y +CONFIG_FB_SYS_COPYAREA=y +CONFIG_FB_SYS_IMAGEBLIT=y CONFIG_FB_SYS_FOPS=y # @@ -737,11 +795,14 @@ CONFIG_FB_SYS_FOPS=y # CONFIG_FB_VT8500 is not set # CONFIG_FB_WM8505 is not set # CONFIG_FB_SH_MOBILE_LCDC is not set +# CONFIG_FB_S3C is not set # CONFIG_FB_XILINX is not set # CONFIG_FB_DA8XX is not set CONFIG_XEN_FBDEV_FRONTEND=y # CONFIG_FB_MX3 is not set # CONFIG_OMAP2_DSS is not set +CONFIG_EXYNOS_VIDEO=y +# CONFIG_EXYNOS_MIPI_DSI is not set # CONFIG_FB_SH_MOBILE_MERAM is not set # CONFIG_LCD_PLATFORM is not set CONFIG_VIDEOMODE_HELPERS=y @@ -749,32 +810,44 @@ CONFIG_VIDEOMODE_HELPERS=y # # Console display driver support # -CONFIG_SND_DMAENGINE_PCM=m # CONFIG_SND_ES1968_INPUT is not set # CONFIG_SND_MAESTRO3_INPUT is not set # # HD-Audio # +CONFIG_SND_HDA_TEGRA=m CONFIG_SND_ARMAACI=m -CONFIG_SND_SOC_GENERIC_DMAENGINE_PCM=y # CONFIG_SND_SOC_ADI is not set CONFIG_SND_DAVINCI_SOC=m CONFIG_SND_DAVINCI_SOC_MCASP=m CONFIG_SND_DAVINCI_SOC_GENERIC_EVM=m CONFIG_SND_AM33XX_SOC_EVM=m -CONFIG_SND_SOC_FSL_SSI=m -CONFIG_SND_SOC_FSL_SPDIF=m -CONFIG_SND_SOC_FSL_UTILS=m + +# +# Common SoC Audio options for Freescale CPUs: +# +CONFIG_SND_SOC_IMX_PCM_DMA=m CONFIG_SND_IMX_SOC=m CONFIG_SND_SOC_IMX_SSI=m -CONFIG_SND_SOC_IMX_PCM_DMA=m -CONFIG_SND_SOC_IMX_AUDMUX=m +CONFIG_SND_SOC_IMX_PCM_FIQ=m + +# +# SoC Audio support for Freescale i.MX boards: +# CONFIG_SND_SOC_EUKREA_TLV320=m CONFIG_SND_SOC_IMX_WM8962=m CONFIG_SND_SOC_IMX_SGTL5000=m CONFIG_SND_SOC_IMX_SPDIF=m -CONFIG_SND_KIRKWOOD_SOC_ARMADA370_DB=m +CONFIG_SND_SOC_SAMSUNG=m +CONFIG_SND_S3C_DMA=m +CONFIG_SND_SAMSUNG_PCM=m +CONFIG_SND_SAMSUNG_SPDIF=m +CONFIG_SND_SAMSUNG_I2S=m +CONFIG_SND_SOC_SAMSUNG_SMDK_WM8994=m +CONFIG_SND_SOC_SAMSUNG_SMDK_SPDIF=m +CONFIG_SND_SOC_SMDK_WM8994_PCM=m +CONFIG_SND_SOC_SNOW=m # # SoC Audio support for SuperH @@ -784,21 +857,29 @@ CONFIG_SND_SOC_RCAR=m CONFIG_SND_SOC_SIRF=m CONFIG_SND_SOC_SIRF_AUDIO=m CONFIG_SND_SOC_SIRF_AUDIO_PORT=m -# CONFIG_SND_SOC_UX500 is not set +CONFIG_SND_SOC_UX500=m +CONFIG_SND_SOC_UX500_PLAT_DMA=m # # CODEC drivers # +CONFIG_SND_SOC_WM_HUBS=m +CONFIG_SND_SOC_MAX98090=m +CONFIG_SND_SOC_MAX98095=m CONFIG_SND_SOC_TLV320AIC23=m CONFIG_SND_SOC_TLV320AIC23_I2C=m +CONFIG_SND_SOC_WM8994=m # # USB Host Controller Drivers # CONFIG_USB_EHCI_MXC=y CONFIG_USB_EHCI_HCD_OMAP=y +CONFIG_USB_EHCI_MSM=y CONFIG_USB_EHCI_TEGRA=y +CONFIG_USB_EHCI_EXYNOS=y CONFIG_USB_OHCI_HCD_OMAP3=y +CONFIG_USB_OHCI_EXYNOS=y CONFIG_USB_UHCI_SUPPORT_NON_PCI_HC=y CONFIG_USB_UHCI_PLATFORM=y CONFIG_USB_IMX21_HCD=y @@ -812,12 +893,19 @@ CONFIG_USB_MUSB_AM35X=m # CONFIG_USB_TI_CPPI41_DMA is not set # CONFIG_USB_TUSB_OMAP_DMA is not set +# +# Platform Glue Driver Support +# +CONFIG_USB_DWC3_EXYNOS=m +CONFIG_USB_DWC3_KEYSTONE=m + # # USB Physical Layer drivers # # CONFIG_AB8500_USB is not set CONFIG_KEYSTONE_USB_PHY=m CONFIG_NOP_USB_XCEIV=y +CONFIG_USB_MSM_OTG=m CONFIG_USB_MXS_PHY=m CONFIG_USB_ULPI_VIEWPORT=y CONFIG_MMC=y @@ -835,7 +923,9 @@ CONFIG_MMC_SDHCI_IO_ACCESSORS=y # CONFIG_MMC_RICOH_MMC is not set CONFIG_MMC_SDHCI_ESDHC_IMX=m CONFIG_MMC_SDHCI_TEGRA=m +CONFIG_MMC_SDHCI_S3C=m CONFIG_MMC_SDHCI_SIRF=m +CONFIG_MMC_SDHCI_S3C_DMA=y CONFIG_MMC_OMAP=m CONFIG_MMC_OMAP_HS=m CONFIG_MMC_SDHCI_MSM=m @@ -844,6 +934,7 @@ CONFIG_MMC_TMIO_CORE=m CONFIG_MMC_SDHI=m CONFIG_MMC_SH_MMCIF=m CONFIG_MMC_WMT=y +CONFIG_MMC_SUNXI=m # # LED drivers @@ -860,6 +951,7 @@ CONFIG_MMC_WMT=y # CONFIG_RTC_DRV_IMXDI=m CONFIG_RTC_DRV_OMAP=m +CONFIG_RTC_DRV_S3C=m CONFIG_RTC_DRV_PL030=m CONFIG_RTC_DRV_PL031=m # CONFIG_RTC_DRV_VT8500 is not set @@ -873,7 +965,6 @@ CONFIG_RTC_DRV_SIRFSOC=m # # CONFIG_AMBA_PL08X is not set # CONFIG_DW_DMAC_PCI is not set -# CONFIG_MV_XOR is not set CONFIG_MX3_IPU=y CONFIG_MX3_IPU_IRQS=4 # CONFIG_TEGRA20_APB_DMA is not set @@ -892,6 +983,7 @@ CONFIG_SH_DMAE_BASE=y # CONFIG_DMA_OMAP is not set # CONFIG_TI_CPPI41 is not set # CONFIG_K3_DMA is not set +CONFIG_XILINX_VDMA=m # # DMA Clients @@ -901,6 +993,7 @@ CONFIG_SH_DMAE_BASE=y # CONFIG_UIO_SERCOS3 is not set # CONFIG_UIO_PCI_GENERIC is not set # CONFIG_UIO_MF624 is not set +# CONFIG_VFIO is not set CONFIG_VIRTIO=m # @@ -937,21 +1030,22 @@ CONFIG_XEN_PRIVCMD=y # CONFIG_DRM_IMX is not set # CONFIG_BT_NOKIA_H4P is not set +# +# SOC (System On Chip) specific Drivers +# +CONFIG_QCOM_GSBI=m + # # Common Clock Framework # CONFIG_COMMON_CLK_WM831X=y CONFIG_COMMON_CLK_VERSATILE=y +CONFIG_CLK_SP810=y +CONFIG_CLK_VEXPRESS_OSC=y CONFIG_COMMON_CLK_MAX77686=y # CONFIG_COMMON_CLK_AXI_CLKGEN is not set CONFIG_COMMON_CLK_KEYSTONE=y -CONFIG_MVEBU_CLK_CPU=y -CONFIG_MVEBU_CLK_COREDIV=y -CONFIG_ARMADA_370_CLK=y -CONFIG_ARMADA_375_CLK=y -CONFIG_ARMADA_38X_CLK=y -CONFIG_ARMADA_XP_CLK=y -CONFIG_DOVE_CLK=y +CONFIG_COMMON_CLK_SAMSUNG=y # # Hardware Spinlock drivers @@ -960,7 +1054,6 @@ CONFIG_DOVE_CLK=y # CONFIG_HSEM_U8500 is not set CONFIG_DW_APB_TIMER=y CONFIG_DW_APB_TIMER_OF=y -CONFIG_ARMADA_370_XP_TIMER=y CONFIG_SUN4I_TIMER=y CONFIG_SUN5I_HSTIMER=y CONFIG_VT8500_TIMER=y @@ -972,17 +1065,32 @@ CONFIG_ARM_ARCH_TIMER=y CONFIG_ARM_ARCH_TIMER_EVTSTREAM=y CONFIG_ARM_GLOBAL_TIMER=y CONFIG_CLKSRC_ARM_GLOBAL_TIMER_SCHED_CLOCK=y +CONFIG_CLKSRC_EXYNOS_MCT=y +CONFIG_CLKSRC_SAMSUNG_PWM=y CONFIG_VF_PIT_TIMER=y CONFIG_PL320_MBOX=y -# CONFIG_OMAP2PLUS_MBOX is not set -# CONFIG_OMAP_IOMMU is not set +CONFIG_OMAP_MBOX=m +CONFIG_OMAP2PLUS_MBOX=m +CONFIG_OMAP_MBOX_KFIFO_SIZE=256 +CONFIG_IOMMU_API=y +CONFIG_OMAP_IOMMU=y +CONFIG_OMAP_IOVMM=m +# CONFIG_OMAP_IOMMU_DEBUG is not set # CONFIG_TEGRA_IOMMU_GART is not set # CONFIG_TEGRA_IOMMU_SMMU is not set +# CONFIG_EXYNOS_IOMMU is not set # CONFIG_SHMOBILE_IOMMU is not set +# +# Remoteproc drivers +# +CONFIG_REMOTEPROC=m +CONFIG_OMAP_REMOTEPROC=m + # # Rpmsg drivers # +CONFIG_RPMSG=m # CONFIG_TI_AEMIF is not set # CONFIG_TI_EMIF is not set CONFIG_TEGRA20_MC=y @@ -991,6 +1099,7 @@ CONFIG_TEGRA30_MC=y # # Analog to digital converters # +# CONFIG_EXYNOS_ADC is not set # CONFIG_LP8788_ADC is not set # CONFIG_TWL6030_GPADC is not set # CONFIG_XILINX_XADC is not set @@ -1004,6 +1113,7 @@ CONFIG_TEGRA30_MC=y # CONFIG_PWM_LP3943 is not set # CONFIG_PWM_PCA9685 is not set # CONFIG_PWM_RENESAS_TPU is not set +# CONFIG_PWM_SAMSUNG is not set # CONFIG_PWM_TEGRA is not set # CONFIG_PWM_TIECAP is not set # CONFIG_PWM_TIEHRPWM is not set @@ -1011,6 +1121,7 @@ CONFIG_TEGRA30_MC=y # CONFIG_PWM_TWL_LED is not set # CONFIG_PWM_VT8500 is not set CONFIG_ARM_GIC=y +CONFIG_GIC_NON_BANKED=y CONFIG_DW_APB_ICTL=y CONFIG_IRQ_CROSSBAR=y CONFIG_ARCH_HAS_RESET_CONTROLLER=y @@ -1021,9 +1132,16 @@ CONFIG_STIH416_RESET=y # # PHY Subsystem # +CONFIG_PHY_EXYNOS_MIPI_VIDEO=y CONFIG_OMAP_CONTROL_PHY=m CONFIG_TWL4030_USB=m +CONFIG_PHY_EXYNOS_DP_VIDEO=y +CONFIG_PHY_EXYNOS5250_SATA=m CONFIG_PHY_SUN4I_USB=m +# CONFIG_PHY_EXYNOS4210_USB2 is not set +# CONFIG_PHY_EXYNOS4X12_USB2 is not set +# CONFIG_PHY_EXYNOS5250_USB2 is not set +CONFIG_PHY_EXYNOS5_USBDRD=m # # File systems @@ -1045,6 +1163,7 @@ CONFIG_RCU_CPU_STALL_TIMEOUT=21 # Runtime Testing # CONFIG_DEBUG_IMX_UART_PORT=1 +CONFIG_DEBUG_VF_UART_PORT=1 CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S" # CONFIG_DEBUG_UART_8250 is not set CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h" @@ -1093,6 +1212,7 @@ CONFIG_CRYPTO_DEV_OMAP_SHAM=m CONFIG_CRYPTO_DEV_OMAP_AES=m CONFIG_CRYPTO_DEV_OMAP_DES=m CONFIG_CRYPTO_DEV_SAHARA=m +CONFIG_CRYPTO_DEV_S5P=m # CONFIG_CRYPTO_DEV_UX500 is not set # diff --git a/kernel/config-armv7hl-lpae b/kernel/config-armv7hl-lpae index b755713a4..0847e948c 100644 --- a/kernel/config-armv7hl-lpae +++ b/kernel/config-armv7hl-lpae @@ -4,6 +4,11 @@ # CONFIG_PREEMPT_NOTIFIERS=y +# +# CPU Core family selection +# +CONFIG_ARCH_AXXIA=y + # # Processor Features # @@ -17,9 +22,15 @@ CONFIG_SYS_SUPPORTS_HUGETLBFS=y CONFIG_PHYS_ADDR_T_64BIT=y # CONFIG_TRANSPARENT_HUGEPAGE is not set +# +# 1-wire Slaves +# +CONFIG_POWER_RESET_AXXIA=y + # # Hardware Spinlock drivers # +# CONFIG_IPMMU_VMSA is not set # CONFIG_ARM_SMMU is not set # diff --git a/kernel/config-generic b/kernel/config-generic index a652a165f..167d038e9 100644 --- a/kernel/config-generic +++ b/kernel/config-generic @@ -6,7 +6,9 @@ CONFIG_MMU=y CONFIG_NEED_DMA_MAP_STATE=y CONFIG_GENERIC_BUG=y CONFIG_GENERIC_HWEIGHT=y +CONFIG_RWSEM_XCHGADD_ALGORITHM=y CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_ARCH_HIBERNATION_POSSIBLE=y CONFIG_ARCH_SUSPEND_POSSIBLE=y CONFIG_ARCH_WANT_GENERAL_HUGETLB=y CONFIG_ARCH_SUPPORTS_UPROBES=y @@ -38,6 +40,7 @@ CONFIG_SYSVIPC=y CONFIG_SYSVIPC_SYSCTL=y CONFIG_POSIX_MQUEUE=y CONFIG_POSIX_MQUEUE_SYSCTL=y +CONFIG_CROSS_MEMORY_ATTACH=y CONFIG_FHANDLE=y # CONFIG_USELIB is not set CONFIG_AUDIT=y @@ -122,6 +125,7 @@ CONFIG_ANON_INODES=y CONFIG_HAVE_UID16=y CONFIG_EXPERT=y CONFIG_UID16=y +CONFIG_SGETMASK_SYSCALL=y CONFIG_SYSFS_SYSCALL=y # CONFIG_SYSCTL_SYSCALL is not set CONFIG_KALLSYMS=y @@ -165,6 +169,7 @@ CONFIG_HAVE_KPROBES=y CONFIG_HAVE_KRETPROBES=y CONFIG_HAVE_ARCH_TRACEHOOK=y CONFIG_HAVE_DMA_ATTRS=y +CONFIG_HAVE_DMA_CONTIGUOUS=y CONFIG_GENERIC_SMP_IDLE_THREAD=y CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y CONFIG_HAVE_CLK=y @@ -246,6 +251,7 @@ CONFIG_INLINE_READ_UNLOCK=y CONFIG_INLINE_READ_UNLOCK_IRQ=y CONFIG_INLINE_WRITE_UNLOCK=y CONFIG_INLINE_WRITE_UNLOCK_IRQ=y +CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y CONFIG_FREEZER=y # @@ -268,7 +274,6 @@ CONFIG_MIGRATION=y CONFIG_ZONE_DMA_FLAG=1 CONFIG_BOUNCE=y CONFIG_KSM=y -CONFIG_CROSS_MEMORY_ATTACH=y CONFIG_CLEANCACHE=y # CONFIG_FRONTSWAP is not set CONFIG_CMA=y @@ -276,11 +281,6 @@ CONFIG_CMA=y # CONFIG_ZBUD is not set # CONFIG_ZSMALLOC is not set CONFIG_SECCOMP=y -# CONFIG_HZ_100 is not set -# CONFIG_HZ_250 is not set -CONFIG_HZ_300=y -# CONFIG_HZ_1000 is not set -CONFIG_HZ=300 CONFIG_SCHED_HRTICK=y CONFIG_CRASH_DUMP=y @@ -452,7 +452,6 @@ CONFIG_IPV6_MROUTE_MULTIPLE_TABLES=y CONFIG_IPV6_PIMSM_V2=y # CONFIG_NETLABEL is not set CONFIG_NETWORK_SECMARK=y -CONFIG_NET_PTP_CLASSIFY=y # CONFIG_NETWORK_PHY_TIMESTAMPING is not set CONFIG_NETFILTER=y # CONFIG_NETFILTER_DEBUG is not set @@ -732,6 +731,7 @@ CONFIG_NF_NAT_IPV6=m CONFIG_IP6_NF_TARGET_MASQUERADE=m CONFIG_IP6_NF_TARGET_NPT=m CONFIG_NF_TABLES_BRIDGE=m +CONFIG_NFT_BRIDGE_META=m CONFIG_BRIDGE_NF_EBTABLES=m CONFIG_BRIDGE_EBT_BROUTE=m CONFIG_BRIDGE_EBT_T_FILTER=m @@ -972,7 +972,7 @@ CONFIG_RFKILL_INPUT=y # # Generic Driver Options # -CONFIG_UEVENT_HELPER_PATH="" +# CONFIG_UEVENT_HELPER is not set CONFIG_DEVTMPFS=y CONFIG_DEVTMPFS_MOUNT=y CONFIG_STANDALONE=y @@ -1020,13 +1020,11 @@ CONFIG_BLK_DEV_RAM_COUNT=16 # Misc devices # # CONFIG_AD525X_DPOT is not set -# CONFIG_ATMEL_PWM is not set CONFIG_DUMMY_IRQ=m # CONFIG_PHANTOM 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_APDS9802ALS is not set # CONFIG_ISL29003 is not set @@ -1480,6 +1478,7 @@ CONFIG_YELLOWFIN=m CONFIG_NET_VENDOR_QLOGIC=y CONFIG_QLA3XXX=m CONFIG_QLCNIC=m +CONFIG_QLCNIC_HWMON=y CONFIG_QLGE=m CONFIG_NETXEN_NIC=m CONFIG_NET_VENDOR_REALTEK=y @@ -1665,6 +1664,9 @@ CONFIG_WCN36XX=m CONFIG_B43=m CONFIG_B43_BCMA=y CONFIG_B43_SSB=y +CONFIG_B43_BUSES_BCMA_AND_SSB=y +# CONFIG_B43_BUSES_BCMA is not set +# CONFIG_B43_BUSES_SSB is not set CONFIG_B43_PCI_AUTOSELECT=y CONFIG_B43_PCICORE_AUTOSELECT=y CONFIG_B43_BCMA_PIO=y @@ -1868,11 +1870,11 @@ CONFIG_HISAX_HFC4S8S=m # Active cards # CONFIG_ISDN_CAPI=m -CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y CONFIG_CAPI_TRACE=y CONFIG_ISDN_CAPI_CAPI20=m CONFIG_ISDN_CAPI_MIDDLEWARE=y CONFIG_ISDN_CAPI_CAPIDRV=m +CONFIG_ISDN_CAPI_CAPIDRV_VERBOSE=y # # CAPI hardware drivers @@ -1894,7 +1896,6 @@ CONFIG_ISDN_HDLC=m CONFIG_INPUT=y CONFIG_INPUT_POLLDEV=m CONFIG_INPUT_SPARSEKMAP=m -CONFIG_INPUT_MATRIXKMAP=m # # Userland interfaces @@ -1929,7 +1930,6 @@ CONFIG_KEYBOARD_LM8333=m # CONFIG_KEYBOARD_MPR121 is not set # CONFIG_KEYBOARD_NEWTON is not set # CONFIG_KEYBOARD_OPENCORES is not set -# CONFIG_KEYBOARD_SAMSUNG is not set # CONFIG_KEYBOARD_STOWAWAY is not set # CONFIG_KEYBOARD_SUNKBD is not set CONFIG_KEYBOARD_TWL4030=m @@ -2020,6 +2020,7 @@ CONFIG_N_GSM=m # # Serial drivers # +CONFIG_SERIAL_EARLYCON=y CONFIG_SERIAL_8250=y CONFIG_SERIAL_8250_DEPRECATED_OPTIONS=y CONFIG_SERIAL_8250_CONSOLE=y @@ -2040,9 +2041,9 @@ CONFIG_SERIAL_8250_DW=m # CONFIG_SERIAL_MFD_HSU is not set CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y +CONFIG_SERIAL_SC16IS7XX=m # CONFIG_SERIAL_ALTERA_JTAGUART is not set # CONFIG_SERIAL_ALTERA_UART is not set -# CONFIG_SERIAL_PCH_UART is not set CONFIG_SERIAL_FSL_LPUART=m # CONFIG_TTY_PRINTK is not set CONFIG_IPMI_HANDLER=m @@ -2054,9 +2055,7 @@ 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 @@ -2109,7 +2108,6 @@ CONFIG_I2C_CBUS_GPIO=m CONFIG_I2C_DESIGNWARE_CORE=m CONFIG_I2C_DESIGNWARE_PLATFORM=m # CONFIG_I2C_DESIGNWARE_PCI is not set -# CONFIG_I2C_EG20T is not set # CONFIG_I2C_GPIO is not set CONFIG_I2C_KEMPLD=m # CONFIG_I2C_OCORES is not set @@ -2140,6 +2138,10 @@ CONFIG_SPMI=m CONFIG_HSI=m CONFIG_HSI_BOARDINFO=y +# +# HSI controllers +# + # # HSI clients # @@ -2184,7 +2186,6 @@ CONFIG_GPIO_SYSFS=y # # Memory mapped GPIO drivers: # -# CONFIG_GPIO_GENERIC_PLATFORM is not set # CONFIG_GPIO_SCH311X is not set # CONFIG_GPIO_VX855 is not set @@ -2198,7 +2199,6 @@ CONFIG_GPIO_SYSFS=y # CONFIG_GPIO_PCF857X is not set # CONFIG_GPIO_RC5T583 is not set # CONFIG_GPIO_SX150X is not set -# CONFIG_GPIO_STMPE is not set # CONFIG_GPIO_TC3589X is not set # CONFIG_GPIO_TPS65912 is not set # CONFIG_GPIO_TWL4030 is not set @@ -2371,6 +2371,7 @@ CONFIG_SENSORS_LM95245=m CONFIG_SENSORS_PC87360=m CONFIG_SENSORS_PC87427=m CONFIG_SENSORS_NTC_THERMISTOR=m +CONFIG_SENSORS_NCT6683=m CONFIG_SENSORS_NCT6775=m CONFIG_SENSORS_PCF8591=m CONFIG_PMBUS=m @@ -2386,6 +2387,7 @@ CONFIG_SENSORS_UCD9200=m # CONFIG_SENSORS_ZL6100 is not set CONFIG_SENSORS_SHT15=m CONFIG_SENSORS_SHT21=m +CONFIG_SENSORS_SHTC1=m CONFIG_SENSORS_SIS5595=m CONFIG_SENSORS_DME1737=m CONFIG_SENSORS_EMC1403=m @@ -2509,6 +2511,7 @@ CONFIG_MFD_AS3711=y CONFIG_PMIC_ADP5520=y CONFIG_MFD_AAT2870_CORE=y CONFIG_MFD_BCM590XX=m +CONFIG_MFD_AXP20X=y # CONFIG_MFD_CROS_EC is not set CONFIG_PMIC_DA903X=y CONFIG_PMIC_DA9052=y @@ -2543,12 +2546,6 @@ CONFIG_MFD_SEC_CORE=y CONFIG_MFD_SM501=m CONFIG_MFD_SM501_GPIO=y CONFIG_MFD_SMSC=y -CONFIG_MFD_STMPE=y - -# -# STMicroelectronics STMPE Interface Drivers -# -CONFIG_STMPE_I2C=y CONFIG_MFD_SYSCON=y # CONFIG_MFD_TI_AM335X_TSCADC is not set CONFIG_MFD_LP3943=m @@ -2659,6 +2656,7 @@ CONFIG_USB_GL860=m CONFIG_USB_GSPCA_BENQ=m CONFIG_USB_GSPCA_CONEX=m CONFIG_USB_GSPCA_CPIA1=m +CONFIG_USB_GSPCA_DTCS033=m CONFIG_USB_GSPCA_ETOMS=m CONFIG_USB_GSPCA_FINEPIX=m CONFIG_USB_GSPCA_JEILINJ=m @@ -2935,6 +2933,7 @@ CONFIG_MEDIA_TUNER_E4000=m CONFIG_MEDIA_TUNER_FC2580=m CONFIG_MEDIA_TUNER_M88TS2022=m CONFIG_MEDIA_TUNER_TUA9001=m +CONFIG_MEDIA_TUNER_SI2157=m CONFIG_MEDIA_TUNER_IT913X=m CONFIG_MEDIA_TUNER_R820T=m @@ -2992,6 +2991,7 @@ CONFIG_DVB_EC100=m CONFIG_DVB_CXD2820R=m CONFIG_DVB_RTL2830=m CONFIG_DVB_RTL2832=m +CONFIG_DVB_SI2168=m # # DVB-C (cable) frontends @@ -3062,6 +3062,7 @@ CONFIG_DRM_TTM=m # # I2C encoder or helper chips # +CONFIG_DRM_PTN3460=m CONFIG_DRM_TDFX=m CONFIG_DRM_R128=m CONFIG_DRM_MGA=m @@ -3075,7 +3076,6 @@ CONFIG_DRM_MGAG200=m CONFIG_DRM_CIRRUS_QEMU=m CONFIG_DRM_QXL=m CONFIG_DRM_BOCHS=m -CONFIG_DRM_PTN3460=m # # Frame buffer Devices @@ -3125,18 +3125,15 @@ CONFIG_FB_TILEBLITTING=y # CONFIG_FB_ARK is not set # CONFIG_FB_PM3 is not set # CONFIG_FB_CARMINE is not set -# CONFIG_FB_TMIO is not set # CONFIG_FB_SM501 is not set # CONFIG_FB_SMSCUFX is not set # CONFIG_FB_UDL is not set -# CONFIG_FB_GOLDFISH is not set # CONFIG_FB_VIRTUAL is not set # CONFIG_FB_METRONOME is not set # CONFIG_FB_MB862XX is not set # CONFIG_FB_BROADSHEET is not set # CONFIG_FB_AUO_K190X is not set # CONFIG_FB_SIMPLE is not set -# CONFIG_EXYNOS_VIDEO is not set CONFIG_BACKLIGHT_LCD_SUPPORT=y CONFIG_LCD_CLASS_DEVICE=m CONFIG_BACKLIGHT_CLASS_DEVICE=y @@ -3151,10 +3148,7 @@ CONFIG_BACKLIGHT_CLASS_DEVICE=y # CONFIG_BACKLIGHT_ADP8870 is not set # CONFIG_BACKLIGHT_88PM860X is not set # CONFIG_BACKLIGHT_AAT2870 is not set -# CONFIG_BACKLIGHT_LM3630A is not set # CONFIG_BACKLIGHT_LM3639 is not set -# CONFIG_BACKLIGHT_LP855X is not set -# CONFIG_BACKLIGHT_LP8788 is not set # CONFIG_BACKLIGHT_PANDORA is not set # CONFIG_BACKLIGHT_AS3711 is not set # CONFIG_BACKLIGHT_GPIO is not set @@ -3318,6 +3312,7 @@ CONFIG_SND_USB_CAIAQ=m CONFIG_SND_USB_CAIAQ_INPUT=y CONFIG_SND_USB_6FIRE=m CONFIG_SND_USB_HIFACE=m +CONFIG_SND_BCD2000=m # CONFIG_SOUND_PRIME is not set CONFIG_AC97_BUS=m @@ -3389,6 +3384,7 @@ CONFIG_HID_SAMSUNG=m CONFIG_HID_SPEEDLINK=m # CONFIG_HID_STEELSERIES is not set CONFIG_HID_SUNPLUS=m +CONFIG_HID_RMI=m # CONFIG_HID_GREENASIA is not set # CONFIG_HID_SMARTJOYPLUS is not set CONFIG_HID_TIVO=m @@ -3418,7 +3414,6 @@ CONFIG_USB_SUPPORT=y CONFIG_USB_COMMON=y CONFIG_USB_ARCH_HAS_HCD=y CONFIG_USB=y -# CONFIG_USB_DEBUG is not set CONFIG_USB_ANNOUNCE_NEW_DEVICES=y # @@ -3429,6 +3424,7 @@ CONFIG_USB_DEFAULT_PERSIST=y CONFIG_USB_OTG=y # CONFIG_USB_OTG_WHITELIST is not set # CONFIG_USB_OTG_BLACKLIST_HUB is not set +CONFIG_USB_OTG_FSM=m CONFIG_USB_MON=m CONFIG_USB_WUSB_CBAF=m # CONFIG_USB_WUSB_CBAF_DEBUG is not set @@ -3512,15 +3508,20 @@ CONFIG_USB_DWC3_HOST=y # # Platform Glue Driver Support # -CONFIG_USB_DWC3_EXYNOS=m CONFIG_USB_DWC3_PCI=m -CONFIG_USB_DWC3_KEYSTONE=m # # Debugging features # # CONFIG_USB_DWC3_DEBUG is not set -CONFIG_USB_DWC2=m +CONFIG_USB_DWC2=y +CONFIG_USB_DWC2_HOST=m +CONFIG_USB_DWC2_PLATFORM=y +CONFIG_USB_DWC2_PCI=y + +# +# Gadget mode requires USB Gadget support to be enabled +# # CONFIG_USB_DWC2_DEBUG is not set # CONFIG_USB_DWC2_TRACK_MISSED_SOFS is not set CONFIG_USB_CHIPIDEA=m @@ -3621,13 +3622,11 @@ CONFIG_USB_XUSBATM=m # USB Physical Layer drivers # CONFIG_USB_PHY=y -CONFIG_USB_OTG_FSM=m CONFIG_SAMSUNG_USBPHY=m CONFIG_SAMSUNG_USB2PHY=m CONFIG_SAMSUNG_USB3PHY=m CONFIG_USB_GPIO_VBUS=m CONFIG_USB_ISP1301=m -CONFIG_USB_RCAR_PHY=m # CONFIG_USB_GADGET is not set # CONFIG_UWB is not set # CONFIG_MMC_DEBUG is not set @@ -3654,6 +3653,8 @@ CONFIG_MMC_CB710=m CONFIG_MMC_VIA_SDMMC=m CONFIG_MMC_VUB300=m CONFIG_MMC_USHC=m +CONFIG_MMC_USDHI6ROL0=m +CONFIG_MMC_REALTEK_USB=m CONFIG_MEMSTICK=m # CONFIG_MEMSTICK_DEBUG is not set @@ -3670,6 +3671,7 @@ CONFIG_MS_BLOCK=m CONFIG_MEMSTICK_TIFM_MS=m CONFIG_MEMSTICK_JMICRON_38X=m CONFIG_MEMSTICK_R592=m +CONFIG_MEMSTICK_REALTEK_USB=m CONFIG_NEW_LEDS=y CONFIG_LEDS_CLASS=y @@ -3691,7 +3693,6 @@ CONFIG_LEDS_LP8501=m CONFIG_LEDS_LP8788=m # CONFIG_LEDS_PCA955X is not set CONFIG_LEDS_PCA963X=m -CONFIG_LEDS_PCA9685=m CONFIG_LEDS_WM831X_STATUS=m CONFIG_LEDS_WM8350=m CONFIG_LEDS_DA903X=m @@ -3702,6 +3703,10 @@ CONFIG_LEDS_ADP5520=m CONFIG_LEDS_TCA6507=m CONFIG_LEDS_MAX8997=m CONFIG_LEDS_LM355x=m + +# +# LED driver for blink(1) USB RGB LED is under Special HID drivers (HID_THINGM) +# CONFIG_LEDS_BLINKM=m # @@ -3795,6 +3800,7 @@ CONFIG_RTC_DRV_DS1553=m CONFIG_RTC_DRV_DS1742=m CONFIG_RTC_DRV_DA9052=m CONFIG_RTC_DRV_DA9055=m +CONFIG_RTC_DRV_DA9063=m CONFIG_RTC_DRV_STK17TA8=m # CONFIG_RTC_DRV_M48T86 is not set CONFIG_RTC_DRV_M48T35=m @@ -3811,6 +3817,7 @@ CONFIG_RTC_DRV_WM8350=m # on-CPU RTC drivers # CONFIG_RTC_DRV_MOXART=m +CONFIG_RTC_DRV_XGENE=m # # HID Sensor RTC drivers @@ -3865,12 +3872,11 @@ CONFIG_RTLLIB_CRYPTO_WEP=m # CONFIG_RTL8192E is not set # CONFIG_R8712U is not set # CONFIG_R8188EU is not set +CONFIG_R8192EE=m CONFIG_R8723AU=m CONFIG_8723AU_AP_MODE=y -CONFIG_8723AU_P2P=y CONFIG_8723AU_BT_COEXIST=y CONFIG_R8821AE=m -# CONFIG_RTS5139 is not set CONFIG_RTS5208=m # CONFIG_RTS5208_DEBUG is not set # CONFIG_TRANZPORT is not set @@ -3894,7 +3900,6 @@ CONFIG_RTS5208=m # # CONFIG_AD7291 is not set # CONFIG_AD7606 is not set -# CONFIG_AD799X is not set # # Analog digital bi-direction converters @@ -3977,6 +3982,10 @@ CONFIG_CED1401=m # CONFIG_DGNC is not set # CONFIG_DGAP is not set # CONFIG_GS_FPGABOOT is not set + +# +# SOC (System On Chip) specific Drivers +# CONFIG_CLKDEV_LOOKUP=y CONFIG_HAVE_CLK_PREPARE=y CONFIG_COMMON_CLK=y @@ -4023,10 +4032,12 @@ CONFIG_IIO_CONSUMERS_PER_TRIGGER=2 # CONFIG_BMA180 is not set # CONFIG_HID_SENSOR_ACCEL_3D is not set # CONFIG_IIO_ST_ACCEL_3AXIS is not set +# CONFIG_MMA8452 is not set # # Analog to digital converters # +# CONFIG_AD799X is not set # CONFIG_MAX1363 is not set # CONFIG_MCP3422 is not set # CONFIG_NAU7802 is not set @@ -4114,6 +4125,7 @@ CONFIG_CM32181=m # Inclinometer sensors # CONFIG_HID_SENSOR_INCLINOMETER_3D=m +# CONFIG_HID_SENSOR_DEVICE_ROTATION is not set # # Triggers - standalone @@ -4125,13 +4137,19 @@ CONFIG_IIO_INTERRUPT_TRIGGER=m # Pressure sensors # # CONFIG_HID_SENSOR_PRESS is not set +# CONFIG_MPL115 is not set CONFIG_MPL3115=m CONFIG_IIO_ST_PRESS=m CONFIG_IIO_ST_PRESS_I2C=m +# +# Lightning sensors +# + # # Temperature sensors # +# CONFIG_MLX90614 is not set # CONFIG_TMP006 is not set # CONFIG_VME_BUS is not set # CONFIG_IPACK_BUS is not set @@ -4411,6 +4429,7 @@ CONFIG_STRIP_ASM_SYMS=y CONFIG_DEBUG_FS=y CONFIG_HEADERS_CHECK=y # CONFIG_DEBUG_SECTION_MISMATCH is not set +CONFIG_FRAME_POINTER=y # CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set CONFIG_MAGIC_SYSRQ=y CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x1 @@ -4462,6 +4481,7 @@ CONFIG_STACKTRACE=y # CONFIG_DEBUG_KOBJECT is not set CONFIG_DEBUG_BUGVERBOSE=y CONFIG_DEBUG_LIST=y +# CONFIG_DEBUG_PI_LIST is not set # CONFIG_DEBUG_SG is not set # CONFIG_DEBUG_NOTIFIERS is not set # CONFIG_DEBUG_CREDENTIALS is not set @@ -4478,6 +4498,7 @@ CONFIG_DEBUG_LIST=y # CONFIG_FAULT_INJECTION is not set CONFIG_NOP_TRACER=y CONFIG_HAVE_FUNCTION_TRACER=y +CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y CONFIG_HAVE_DYNAMIC_FTRACE=y CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y CONFIG_HAVE_SYSCALL_TRACEPOINTS=y @@ -4492,6 +4513,7 @@ CONFIG_GENERIC_TRACER=y CONFIG_TRACING_SUPPORT=y CONFIG_FTRACE=y CONFIG_FUNCTION_TRACER=y +CONFIG_FUNCTION_GRAPH_TRACER=y # CONFIG_IRQSOFF_TRACER is not set CONFIG_SCHED_TRACER=y CONFIG_TRACER_SNAPSHOT=y @@ -4507,6 +4529,7 @@ CONFIG_DYNAMIC_FTRACE=y CONFIG_FUNCTION_PROFILER=y CONFIG_FTRACE_MCOUNT_RECORD=y # CONFIG_FTRACE_STARTUP_TEST is not set +# CONFIG_TRACEPOINT_BENCHMARK is not set CONFIG_RING_BUFFER_BENCHMARK=m # CONFIG_RING_BUFFER_STARTUP_TEST is not set @@ -4527,6 +4550,7 @@ CONFIG_ASYNC_RAID6_TEST=m # CONFIG_DMA_API_DEBUG is not set # CONFIG_TEST_MODULE is not set # CONFIG_TEST_USER_COPY is not set +# CONFIG_TEST_BPF is not set # CONFIG_SAMPLES is not set CONFIG_HAVE_ARCH_KGDB=y # CONFIG_KGDB is not set @@ -4662,7 +4686,6 @@ CONFIG_GRKERNSEC_HARDEN_IPC=y # # Network Protections # -CONFIG_GRKERNSEC_RANDNET=y CONFIG_GRKERNSEC_BLACKHOLE=y CONFIG_GRKERNSEC_NO_SIMULT_CONNECT=y # CONFIG_GRKERNSEC_SOCKET is not set diff --git a/kernel/config-i686-default b/kernel/config-i686-default index b098b68f5..3418fa85c 100644 --- a/kernel/config-i686-default +++ b/kernel/config-i686-default @@ -47,7 +47,6 @@ CONFIG_LBDAF=y # Processor type and features # CONFIG_X86_BIGSMP=y -# CONFIG_X86_GOLDFISH is not set # CONFIG_X86_INTEL_MID is not set # CONFIG_X86_RDC321X is not set CONFIG_X86_32_NON_STANDARD=y @@ -178,6 +177,7 @@ CONFIG_IBM_ASM=m CONFIG_CS5535_MFGPT=m CONFIG_CS5535_MFGPT_DEFAULT_IRQ=7 CONFIG_CS5535_CLOCK_EVENT_SRC=m +CONFIG_PCH_PHUB=m # # SCSI Transports @@ -194,6 +194,11 @@ CONFIG_PATA_CS5530=m CONFIG_PATA_CS5536=m # CONFIG_PATA_SC1200 is not set +# +# Distributed Switch Architecture drivers +# +CONFIG_PCH_GBE=m + # # Input Device Drivers # @@ -203,6 +208,7 @@ CONFIG_PATA_CS5536=m # Non-8250 serial port support # # CONFIG_SERIAL_TIMBERDALE is not set +# CONFIG_SERIAL_PCH_UART is not set CONFIG_HW_RANDOM_GEODE=m CONFIG_SONYPI=m CONFIG_PC8736x_GPIO=m @@ -217,15 +223,31 @@ CONFIG_I2C_ALI15X3=m CONFIG_I2C_SIS5595=m CONFIG_I2C_SIS630=m +# +# I2C system bus drivers (mostly embedded / system-on-chip) +# +# CONFIG_I2C_EG20T is not set + # # Other I2C/SMBus bus drivers # CONFIG_SCx200_ACB=m +# +# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks. +# +CONFIG_PTP_1588_CLOCK_PCH=m + +# +# PCI GPIO expanders: +# +# CONFIG_GPIO_PCH is not set + # # Watchdog Device Drivers # CONFIG_GEODE_WDT=m +# CONFIG_SBC8360_WDT is not set # CONFIG_SBC7240_WDT is not set # @@ -276,6 +298,11 @@ CONFIG_LEDS_OT200=m # CONFIG_EDAC_I82860 is not set # CONFIG_EDAC_R82600 is not set +# +# DMA Devices +# +CONFIG_PCH_DMA=m + # # Android # diff --git a/kernel/config-i686-legacy b/kernel/config-i686-legacy index 2de887576..6f806c0f9 100644 --- a/kernel/config-i686-legacy +++ b/kernel/config-i686-legacy @@ -13,6 +13,11 @@ CONFIG_HIGHMEM4G=y # CONFIG_VMSPLIT_2G_OPT is not set # CONFIG_PHYS_ADDR_T_64BIT is not set +# +# CPU Frequency scaling +# +# CONFIG_GENERIC_CPUFREQ_CPU0 is not set + # # Bus options (PCI etc.) # @@ -66,12 +71,15 @@ CONFIG_OF_PCI_IRQ=y # # Distributed Switch Architecture drivers # +CONFIG_AMD_XGBE=m # CONFIG_ARC_EMAC is not set CONFIG_BCMGENET=m +CONFIG_SYSTEMPORT=m # # MII PHY device drivers # +CONFIG_AMD_XGBE_PHY=m CONFIG_MDIO_BUS_MUX=m CONFIG_MDIO_BUS_MUX_GPIO=m CONFIG_MDIO_BUS_MUX_MMIOREG=m @@ -79,6 +87,8 @@ CONFIG_MDIO_BUS_MUX_MMIOREG=m # # Input Device Drivers # +CONFIG_KEYBOARD_STMPE=m +CONFIG_KEYBOARD_OMAP4=m CONFIG_MOUSE_PS2_OLPC=y CONFIG_INPUT_MAX8997_HAPTIC=m # CONFIG_INPUT_GPIO_BEEPER is not set @@ -111,6 +121,7 @@ CONFIG_SERIAL_OF_PLATFORM=y # CONFIG_I2C_PXA=m CONFIG_I2C_PXA_PCI=y +CONFIG_I2C_RK3X=m # # Pin controllers @@ -121,10 +132,12 @@ CONFIG_GENERIC_PINCONF=y CONFIG_PINCTRL_AS3722=y CONFIG_PINCTRL_BCM281XX=y CONFIG_PINCTRL_MSM=y -CONFIG_PINCTRL_MSM8X74=m +CONFIG_PINCTRL_APQ8064=y +CONFIG_PINCTRL_IPQ8064=y # CONFIG_PINCTRL_SINGLE is not set CONFIG_PINCTRL_PALMAS=y CONFIG_OF_GPIO=y +CONFIG_GPIOLIB_IRQCHIP=y # # Memory mapped GPIO drivers: @@ -136,6 +149,7 @@ CONFIG_OF_GPIO=y # # I2C GPIO expanders: # +# CONFIG_GPIO_STMPE is not set CONFIG_GPIO_ADNP=m # @@ -175,12 +189,21 @@ CONFIG_POWER_RESET_GPIO=y # Multifunction device drivers # CONFIG_MFD_AS3722=y +CONFIG_MFD_STMPE=y + +# +# STMicroelectronics STMPE Interface Drivers +# +CONFIG_STMPE_I2C=y # # Frame buffer hardware drivers # # CONFIG_FB_SSD1307 is not set CONFIG_BACKLIGHT_PWM=m +# CONFIG_BACKLIGHT_LM3630A is not set +# CONFIG_BACKLIGHT_LP855X is not set +# CONFIG_BACKLIGHT_LP8788 is not set # CONFIG_BACKLIGHT_OT200 is not set # @@ -226,6 +249,7 @@ CONFIG_DMA_OF=y # Android # CONFIG_XO1_RFKILL=m +# CONFIG_XO15_EBOOK is not set # # Common Clock Framework @@ -247,7 +271,6 @@ CONFIG_OF_IOMMU=y # # Analog to digital converters # -# CONFIG_EXYNOS_ADC is not set CONFIG_VF610_ADC=m # diff --git a/kernel/config-x86-generic b/kernel/config-x86-generic index f70382b54..8e7c58d1a 100644 --- a/kernel/config-x86-generic +++ b/kernel/config-x86-generic @@ -3,16 +3,15 @@ CONFIG_INSTRUCTION_DECODER=y CONFIG_NEED_SG_DMA_LENGTH=y CONFIG_GENERIC_ISA_DMA=y CONFIG_ARCH_MAY_HAVE_PC_FDC=y -CONFIG_RWSEM_XCHGADD_ALGORITHM=y CONFIG_ARCH_HAS_CPU_RELAX=y CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=y CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK=y -CONFIG_ARCH_HIBERNATION_POSSIBLE=y CONFIG_ARCH_WANT_HUGE_PMD_SHARE=y CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING=y CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y CONFIG_X86_HT=y +CONFIG_FIX_EARLYCON_MEM=y # # General setup @@ -22,6 +21,7 @@ CONFIG_X86_HT=y # # IRQ subsystem # +CONFIG_GENERIC_IRQ_LEGACY_ALLOC_HWIRQ=y CONFIG_GENERIC_PENDING_IRQ=y CONFIG_SPARSE_IRQ=y CONFIG_CLOCKSOURCE_WATCHDOG=y @@ -41,7 +41,6 @@ CONFIG_RCU_FANOUT_LEAF=16 CONFIG_RCU_FAST_NO_HZ=y CONFIG_RCU_NOCB_CPU=y CONFIG_RCU_NOCB_CPU_ALL=y -CONFIG_ARCH_SUPPORTS_NUMA_BALANCING=y CONFIG_ARCH_WANTS_PROT_NUMA_PROT_NONE=y CONFIG_SYSCTL_EXCEPTION_TRACE=y CONFIG_PCSPKR_PLATFORM=y @@ -60,6 +59,9 @@ CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG=y CONFIG_PREEMPT_NOTIFIERS=y CONFIG_PADATA=y CONFIG_MUTEX_SPIN_ON_OWNER=y +CONFIG_RWSEM_SPIN_ON_OWNER=y +CONFIG_ARCH_USE_QUEUE_RWLOCK=y +CONFIG_QUEUE_RWLOCK=y # # Processor type and features @@ -67,6 +69,7 @@ CONFIG_MUTEX_SPIN_ON_OWNER=y CONFIG_SMP=y CONFIG_X86_MPPARSE=y CONFIG_X86_EXTENDED_PLATFORM=y +# CONFIG_X86_GOLDFISH is not set CONFIG_X86_INTEL_LPSS=y CONFIG_X86_SUPPORTS_MEMORY_FAILURE=y CONFIG_SCHED_OMIT_FRAME_POINTER=y @@ -111,6 +114,7 @@ CONFIG_X86_MCE_AMD=y CONFIG_X86_MCE_THRESHOLD=y # CONFIG_X86_MCE_INJECT is not set CONFIG_X86_THERMAL_VECTOR=y +# CONFIG_X86_16BIT is not set CONFIG_I8K=m CONFIG_MICROCODE=m CONFIG_MICROCODE_INTEL=y @@ -151,6 +155,11 @@ CONFIG_ARCH_RANDOM=y CONFIG_X86_SMAP=y CONFIG_EFI=y CONFIG_EFI_STUB=y +# CONFIG_HZ_100 is not set +# CONFIG_HZ_250 is not set +CONFIG_HZ_300=y +# CONFIG_HZ_1000 is not set +CONFIG_HZ=300 CONFIG_RELOCATABLE=y CONFIG_RANDOMIZE_BASE=y CONFIG_X86_NEED_RELOCS=y @@ -282,6 +291,11 @@ CONFIG_HOTPLUG_PCI_ACPI_IBM=m # CONFIG_RAPIDIO is not set # CONFIG_X86_SYSFB is not set +# +# Executable file formats / Emulations +# +CONFIG_IOSF_MBI=m + # # Classification # @@ -304,6 +318,7 @@ CONFIG_RFKILL_GPIO=m # CONFIG_FIRMWARE_IN_KERNEL is not set CONFIG_SYS_HYPERVISOR=y CONFIG_GENERIC_CPU_AUTOPROBE=y +# CONFIG_DMA_CMA is not set # # Bus devices @@ -346,7 +361,6 @@ CONFIG_BLK_DEV_RSXX=m CONFIG_SENSORS_LIS3LV02D=m CONFIG_HP_ILO=m CONFIG_VMWARE_BALLOON=m -CONFIG_PCH_PHUB=m # CONFIG_SRAM is not set # @@ -454,7 +468,6 @@ CONFIG_I40E_VXLAN=y CONFIG_I40EVF=m CONFIG_SKGE_GENESIS=y CONFIG_MYRI10GE_DCA=y -CONFIG_PCH_GBE=m CONFIG_QLCNIC_SRIOV=y CONFIG_QLCNIC_VXLAN=y CONFIG_ATP=m @@ -499,16 +512,18 @@ CONFIG_XEN_NETDEV_BACKEND=m # Input device support # CONFIG_INPUT_FF_MEMLESS=m +CONFIG_INPUT_MATRIXKMAP=m # # Input Device Drivers # CONFIG_KEYBOARD_ADP5520=m -CONFIG_KEYBOARD_STMPE=m +CONFIG_KEYBOARD_SAMSUNG=m CONFIG_KEYBOARD_TC3589X=m CONFIG_MOUSE_PS2_LIFEBOOK=y CONFIG_INPUT_PCSPKR=m CONFIG_INPUT_APANEL=m +CONFIG_INPUT_GPIO_BEEPER=m CONFIG_INPUT_ATLAS_BTNS=m CONFIG_INPUT_TWL4030_PWRBUTTON=m CONFIG_INPUT_TWL4030_VIBRA=m @@ -539,7 +554,6 @@ CONFIG_NOZOMI=m # Serial drivers # CONFIG_SERIAL_8250_PNP=y -CONFIG_FIX_EARLYCON_MEM=y # # Non-8250 serial port support @@ -599,11 +613,6 @@ CONFIG_PPS=m # CONFIG_PTP_1588_CLOCK=m -# -# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks. -# -CONFIG_PTP_1588_CLOCK_PCH=m - # # Pin controllers # @@ -616,6 +625,7 @@ CONFIG_GPIO_ACPI=y # # Memory mapped GPIO drivers: # +# CONFIG_GPIO_GENERIC_PLATFORM is not set # CONFIG_GPIO_IT8761E is not set # CONFIG_GPIO_F7188X is not set CONFIG_GPIO_SCH=m @@ -627,7 +637,6 @@ CONFIG_GPIO_ICH=m # # CONFIG_GPIO_CS5535 is not set # CONFIG_GPIO_INTEL_MID is not set -# CONFIG_GPIO_PCH is not set # # 1-wire Slaves @@ -668,6 +677,7 @@ CONFIG_SENSORS_ATK0110=m CONFIG_INTEL_POWERCLAMP=m CONFIG_X86_PKG_TEMP_THERMAL=m CONFIG_ACPI_INT3403_THERMAL=m +CONFIG_INTEL_SOC_DTS_THERMAL=m # # Watchdog Device Drivers @@ -693,14 +703,11 @@ CONFIG_HPWDT_NMI_DECODING=y # CONFIG_PC87413_WDT is not set CONFIG_NV_TCO=m # CONFIG_60XX_WDT is not set -# CONFIG_SBC8360_WDT is not set # CONFIG_CPU5_WDT is not set CONFIG_SMSC_SCH311X_WDT=m # CONFIG_SMSC37B787_WDT is not set CONFIG_VIA_WDT=m CONFIG_W83627HF_WDT=m -CONFIG_W83697HF_WDT=m -CONFIG_W83697UG_WDT=m CONFIG_W83877F_WDT=m CONFIG_W83977F_WDT=m CONFIG_MACHZ_WDT=m @@ -725,10 +732,6 @@ CONFIG_MFD_CS5535=m CONFIG_LPC_ICH=m CONFIG_MFD_RTSX_PCI=m # CONFIG_ABX500_CORE is not set - -# -# STMicroelectronics STMPE Interface Drivers -# CONFIG_MFD_VX855=m # CONFIG_REGULATOR is not set @@ -736,6 +739,8 @@ CONFIG_MFD_VX855=m # Multimedia core support # CONFIG_VIDEOBUF_DMA_SG=m +CONFIG_VIDEOBUF2_DMA_SG=m +CONFIG_VIDEOBUF2_DVB=m CONFIG_TTPCI_EEPROM=m # @@ -916,7 +921,6 @@ CONFIG_DRM_I915=m CONFIG_DRM_I915_KMS=y CONFIG_DRM_I915_FBDEV=y # CONFIG_DRM_I915_PRELIMINARY_HW_SUPPORT is not set -# CONFIG_DRM_I915_UMS is not set CONFIG_DRM_SIS=m CONFIG_DRM_GMA500=m CONFIG_DRM_GMA600=y @@ -1037,7 +1041,6 @@ CONFIG_EDAC_I7300=m CONFIG_INTEL_IOATDMA=m CONFIG_DW_DMAC=m CONFIG_DW_DMAC_PCI=m -CONFIG_PCH_DMA=m CONFIG_DMA_ACPI=y # @@ -1103,6 +1106,7 @@ CONFIG_ASUS_LAPTOP=m CONFIG_DELL_LAPTOP=m CONFIG_DELL_WMI=m CONFIG_DELL_WMI_AIO=m +CONFIG_DELL_SMO8800=m CONFIG_FUJITSU_LAPTOP=m # CONFIG_FUJITSU_LAPTOP_DEBUG is not set # CONFIG_FUJITSU_TABLET is not set @@ -1137,7 +1141,6 @@ CONFIG_TOSHIBA_BT_RFKILL=m CONFIG_ACPI_CMPC=m CONFIG_INTEL_IPS=m # CONFIG_IBM_RTL is not set -# CONFIG_XO15_EBOOK is not set CONFIG_SAMSUNG_LAPTOP=m CONFIG_MXM_WMI=m CONFIG_INTEL_OAKTRAIL=m @@ -1218,7 +1221,6 @@ CONFIG_EFIVAR_FS=m # Compile-time checks and compiler options # CONFIG_ARCH_WANT_FRAME_POINTERS=y -CONFIG_FRAME_POINTER=y # # Memory Debugging @@ -1242,7 +1244,6 @@ CONFIG_RCU_CPU_STALL_TIMEOUT=60 CONFIG_ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS=y # CONFIG_DEBUG_STRICT_USER_COPY_CHECKS is not set CONFIG_USER_STACKTRACE_SUPPORT=y -CONFIG_FUNCTION_GRAPH_TRACER=y CONFIG_FTRACE_SYSCALLS=y CONFIG_DYNAMIC_FTRACE_WITH_REGS=y # CONFIG_MMIOTRACE is not set @@ -1366,6 +1367,7 @@ CONFIG_KVM_DEVICE_ASSIGNMENT=y CONFIG_GENERIC_FIND_FIRST_BIT=y CONFIG_GENERIC_IOMAP=y CONFIG_GENERIC_ALLOCATOR=y +CONFIG_INTERVAL_TREE=y CONFIG_HAS_IOPORT_MAP=y CONFIG_CPU_RMAP=y # CONFIG_DDR is not set diff --git a/kernel/config-x86_64-default b/kernel/config-x86_64-default index 157896f84..9e9d297e3 100644 --- a/kernel/config-x86_64-default +++ b/kernel/config-x86_64-default @@ -29,6 +29,7 @@ CONFIG_CONTEXT_TRACKING=y CONFIG_RCU_USER_QS=y CONFIG_CONTEXT_TRACKING_FORCE=y CONFIG_RCU_FANOUT=64 +CONFIG_ARCH_SUPPORTS_NUMA_BALANCING=y CONFIG_ARCH_SUPPORTS_INT128=y # CONFIG_NUMA_BALANCING is not set @@ -180,6 +181,12 @@ CONFIG_EDAC_SBRIDGE=m # # CONFIG_XEN_MCE_LOG is not set +# +# Android +# +CONFIG_CRYPTO_SKEIN=y +CONFIG_CRYPTO_THREEFISH=y + # # Hardware Spinlock drivers # diff --git a/kernel/kernel.nm b/kernel/kernel.nm index da672622d..d77786f61 100644 --- a/kernel/kernel.nm +++ b/kernel/kernel.nm @@ -4,7 +4,7 @@ ############################################################################### name = kernel -version = 3.15.6 +version = 3.16.2 release = 1 thisapp = linux-%{version} diff --git a/kernel/patches/grsecurity-3.0-3.15.6-201407232200.patch b/kernel/patches/grsecurity-3.0-3.16.2-201409060014.patch similarity index 89% rename from kernel/patches/grsecurity-3.0-3.15.6-201407232200.patch rename to kernel/patches/grsecurity-3.0-3.16.2-201409060014.patch index f992e88c0..83965d3ad 100644 --- a/kernel/patches/grsecurity-3.0-3.15.6-201407232200.patch +++ b/kernel/patches/grsecurity-3.0-3.16.2-201409060014.patch @@ -235,10 +235,10 @@ index 9de9813..1462492 100644 +zconf.lex.c zoffset.h diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt -index 30a8ad0d..2ed9efd 100644 +index b7fa2f5..90cd9f8 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt -@@ -1103,6 +1103,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted. +@@ -1138,6 +1138,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted. Format: such that (rxsize & ~0x1fffc0) == 0. Default: 1024 @@ -249,7 +249,7 @@ index 30a8ad0d..2ed9efd 100644 hashdist= [KNL,NUMA] Large hashes allocated during boot are distributed across NUMA nodes. Defaults on for 64-bit NUMA, off otherwise. -@@ -2099,6 +2103,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted. +@@ -2141,6 +2145,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted. noexec=on: enable non-executable mappings (default) noexec=off: disable non-executable mappings @@ -260,7 +260,7 @@ index 30a8ad0d..2ed9efd 100644 nosmap [X86] Disable SMAP (Supervisor Mode Access Prevention) even if it is supported by processor. -@@ -2366,6 +2374,25 @@ bytes respectively. Such letter suffixes can also be entirely omitted. +@@ -2418,6 +2426,25 @@ bytes respectively. Such letter suffixes can also be entirely omitted. the specified number of seconds. This is to be used if your oopses keep scrolling off the screen. @@ -286,11 +286,509 @@ index 30a8ad0d..2ed9efd 100644 pcbit= [HW,ISDN] pcd. [PARIDE] +diff --git a/Documentation/networking/filter.txt b/Documentation/networking/filter.txt +index ee78eba..a06b48d 100644 +--- a/Documentation/networking/filter.txt ++++ b/Documentation/networking/filter.txt +@@ -277,11 +277,10 @@ Possible BPF extensions are shown in the following table: + mark skb->mark + queue skb->queue_mapping + hatype skb->dev->type +- rxhash skb->hash ++ rxhash skb->rxhash + cpu raw_smp_processor_id() + vlan_tci vlan_tx_tag_get(skb) + vlan_pr vlan_tx_tag_present(skb) +- rand prandom_u32() + + These extensions can also be prefixed with '#'. + Examples for low-level BPF: +@@ -309,18 +308,6 @@ Examples for low-level BPF: + ret #-1 + drop: ret #0 + +-** icmp random packet sampling, 1 in 4 +- ldh [12] +- jne #0x800, drop +- ldb [23] +- jneq #1, drop +- # get a random uint32 number +- ld rand +- mod #4 +- jneq #1, drop +- ret #-1 +- drop: ret #0 +- + ** SECCOMP filter example: + + ld [4] /* offsetof(struct seccomp_data, arch) */ +@@ -559,456 +546,6 @@ ffffffffa0069c8f + : + For BPF JIT developers, bpf_jit_disasm, bpf_asm and bpf_dbg provides a useful + toolchain for developing and testing the kernel's JIT compiler. + +-BPF kernel internals +--------------------- +-Internally, for the kernel interpreter, a different instruction set +-format with similar underlying principles from BPF described in previous +-paragraphs is being used. However, the instruction set format is modelled +-closer to the underlying architecture to mimic native instruction sets, so +-that a better performance can be achieved (more details later). This new +-ISA is called 'eBPF' or 'internal BPF' interchangeably. (Note: eBPF which +-originates from [e]xtended BPF is not the same as BPF extensions! While +-eBPF is an ISA, BPF extensions date back to classic BPF's 'overloading' +-of BPF_LD | BPF_{B,H,W} | BPF_ABS instruction.) +- +-It is designed to be JITed with one to one mapping, which can also open up +-the possibility for GCC/LLVM compilers to generate optimized eBPF code through +-an eBPF backend that performs almost as fast as natively compiled code. +- +-The new instruction set was originally designed with the possible goal in +-mind to write programs in "restricted C" and compile into eBPF with a optional +-GCC/LLVM backend, so that it can just-in-time map to modern 64-bit CPUs with +-minimal performance overhead over two steps, that is, C -> eBPF -> native code. +- +-Currently, the new format is being used for running user BPF programs, which +-includes seccomp BPF, classic socket filters, cls_bpf traffic classifier, +-team driver's classifier for its load-balancing mode, netfilter's xt_bpf +-extension, PTP dissector/classifier, and much more. They are all internally +-converted by the kernel into the new instruction set representation and run +-in the eBPF interpreter. For in-kernel handlers, this all works transparently +-by using sk_unattached_filter_create() for setting up the filter, resp. +-sk_unattached_filter_destroy() for destroying it. The macro +-SK_RUN_FILTER(filter, ctx) transparently invokes eBPF interpreter or JITed +-code to run the filter. 'filter' is a pointer to struct sk_filter that we +-got from sk_unattached_filter_create(), and 'ctx' the given context (e.g. +-skb pointer). All constraints and restrictions from sk_chk_filter() apply +-before a conversion to the new layout is being done behind the scenes! +- +-Currently, the classic BPF format is being used for JITing on most of the +-architectures. Only x86-64 performs JIT compilation from eBPF instruction set, +-however, future work will migrate other JIT compilers as well, so that they +-will profit from the very same benefits. +- +-Some core changes of the new internal format: +- +-- Number of registers increase from 2 to 10: +- +- The old format had two registers A and X, and a hidden frame pointer. The +- new layout extends this to be 10 internal registers and a read-only frame +- pointer. Since 64-bit CPUs are passing arguments to functions via registers +- the number of args from eBPF program to in-kernel function is restricted +- to 5 and one register is used to accept return value from an in-kernel +- function. Natively, x86_64 passes first 6 arguments in registers, aarch64/ +- sparcv9/mips64 have 7 - 8 registers for arguments; x86_64 has 6 callee saved +- registers, and aarch64/sparcv9/mips64 have 11 or more callee saved registers. +- +- Therefore, eBPF calling convention is defined as: +- +- * R0 - return value from in-kernel function, and exit value for eBPF program +- * R1 - R5 - arguments from eBPF program to in-kernel function +- * R6 - R9 - callee saved registers that in-kernel function will preserve +- * R10 - read-only frame pointer to access stack +- +- Thus, all eBPF registers map one to one to HW registers on x86_64, aarch64, +- etc, and eBPF calling convention maps directly to ABIs used by the kernel on +- 64-bit architectures. +- +- On 32-bit architectures JIT may map programs that use only 32-bit arithmetic +- and may let more complex programs to be interpreted. +- +- R0 - R5 are scratch registers and eBPF program needs spill/fill them if +- necessary across calls. Note that there is only one eBPF program (== one +- eBPF main routine) and it cannot call other eBPF functions, it can only +- call predefined in-kernel functions, though. +- +-- Register width increases from 32-bit to 64-bit: +- +- Still, the semantics of the original 32-bit ALU operations are preserved +- via 32-bit subregisters. All eBPF registers are 64-bit with 32-bit lower +- subregisters that zero-extend into 64-bit if they are being written to. +- That behavior maps directly to x86_64 and arm64 subregister definition, but +- makes other JITs more difficult. +- +- 32-bit architectures run 64-bit internal BPF programs via interpreter. +- Their JITs may convert BPF programs that only use 32-bit subregisters into +- native instruction set and let the rest being interpreted. +- +- Operation is 64-bit, because on 64-bit architectures, pointers are also +- 64-bit wide, and we want to pass 64-bit values in/out of kernel functions, +- so 32-bit eBPF registers would otherwise require to define register-pair +- ABI, thus, there won't be able to use a direct eBPF register to HW register +- mapping and JIT would need to do combine/split/move operations for every +- register in and out of the function, which is complex, bug prone and slow. +- Another reason is the use of atomic 64-bit counters. +- +-- Conditional jt/jf targets replaced with jt/fall-through: +- +- While the original design has constructs such as "if (cond) jump_true; +- else jump_false;", they are being replaced into alternative constructs like +- "if (cond) jump_true; /* else fall-through */". +- +-- Introduces bpf_call insn and register passing convention for zero overhead +- calls from/to other kernel functions: +- +- Before an in-kernel function call, the internal BPF program needs to +- place function arguments into R1 to R5 registers to satisfy calling +- convention, then the interpreter will take them from registers and pass +- to in-kernel function. If R1 - R5 registers are mapped to CPU registers +- that are used for argument passing on given architecture, the JIT compiler +- doesn't need to emit extra moves. Function arguments will be in the correct +- registers and BPF_CALL instruction will be JITed as single 'call' HW +- instruction. This calling convention was picked to cover common call +- situations without performance penalty. +- +- After an in-kernel function call, R1 - R5 are reset to unreadable and R0 has +- a return value of the function. Since R6 - R9 are callee saved, their state +- is preserved across the call. +- +- For example, consider three C functions: +- +- u64 f1() { return (*_f2)(1); } +- u64 f2(u64 a) { return f3(a + 1, a); } +- u64 f3(u64 a, u64 b) { return a - b; } +- +- GCC can compile f1, f3 into x86_64: +- +- f1: +- movl $1, %edi +- movq _f2(%rip), %rax +- jmp *%rax +- f3: +- movq %rdi, %rax +- subq %rsi, %rax +- ret +- +- Function f2 in eBPF may look like: +- +- f2: +- bpf_mov R2, R1 +- bpf_add R1, 1 +- bpf_call f3 +- bpf_exit +- +- If f2 is JITed and the pointer stored to '_f2'. The calls f1 -> f2 -> f3 and +- returns will be seamless. Without JIT, __sk_run_filter() interpreter needs to +- be used to call into f2. +- +- For practical reasons all eBPF programs have only one argument 'ctx' which is +- already placed into R1 (e.g. on __sk_run_filter() startup) and the programs +- can call kernel functions with up to 5 arguments. Calls with 6 or more arguments +- are currently not supported, but these restrictions can be lifted if necessary +- in the future. +- +- On 64-bit architectures all register map to HW registers one to one. For +- example, x86_64 JIT compiler can map them as ... +- +- R0 - rax +- R1 - rdi +- R2 - rsi +- R3 - rdx +- R4 - rcx +- R5 - r8 +- R6 - rbx +- R7 - r13 +- R8 - r14 +- R9 - r15 +- R10 - rbp +- +- ... since x86_64 ABI mandates rdi, rsi, rdx, rcx, r8, r9 for argument passing +- and rbx, r12 - r15 are callee saved. +- +- Then the following internal BPF pseudo-program: +- +- bpf_mov R6, R1 /* save ctx */ +- bpf_mov R2, 2 +- bpf_mov R3, 3 +- bpf_mov R4, 4 +- bpf_mov R5, 5 +- bpf_call foo +- bpf_mov R7, R0 /* save foo() return value */ +- bpf_mov R1, R6 /* restore ctx for next call */ +- bpf_mov R2, 6 +- bpf_mov R3, 7 +- bpf_mov R4, 8 +- bpf_mov R5, 9 +- bpf_call bar +- bpf_add R0, R7 +- bpf_exit +- +- After JIT to x86_64 may look like: +- +- push %rbp +- mov %rsp,%rbp +- sub $0x228,%rsp +- mov %rbx,-0x228(%rbp) +- mov %r13,-0x220(%rbp) +- mov %rdi,%rbx +- mov $0x2,%esi +- mov $0x3,%edx +- mov $0x4,%ecx +- mov $0x5,%r8d +- callq foo +- mov %rax,%r13 +- mov %rbx,%rdi +- mov $0x2,%esi +- mov $0x3,%edx +- mov $0x4,%ecx +- mov $0x5,%r8d +- callq bar +- add %r13,%rax +- mov -0x228(%rbp),%rbx +- mov -0x220(%rbp),%r13 +- leaveq +- retq +- +- Which is in this example equivalent in C to: +- +- u64 bpf_filter(u64 ctx) +- { +- return foo(ctx, 2, 3, 4, 5) + bar(ctx, 6, 7, 8, 9); +- } +- +- In-kernel functions foo() and bar() with prototype: u64 (*)(u64 arg1, u64 +- arg2, u64 arg3, u64 arg4, u64 arg5); will receive arguments in proper +- registers and place their return value into '%rax' which is R0 in eBPF. +- Prologue and epilogue are emitted by JIT and are implicit in the +- interpreter. R0-R5 are scratch registers, so eBPF program needs to preserve +- them across the calls as defined by calling convention. +- +- For example the following program is invalid: +- +- bpf_mov R1, 1 +- bpf_call foo +- bpf_mov R0, R1 +- bpf_exit +- +- After the call the registers R1-R5 contain junk values and cannot be read. +- In the future an eBPF verifier can be used to validate internal BPF programs. +- +-Also in the new design, eBPF is limited to 4096 insns, which means that any +-program will terminate quickly and will only call a fixed number of kernel +-functions. Original BPF and the new format are two operand instructions, +-which helps to do one-to-one mapping between eBPF insn and x86 insn during JIT. +- +-The input context pointer for invoking the interpreter function is generic, +-its content is defined by a specific use case. For seccomp register R1 points +-to seccomp_data, for converted BPF filters R1 points to a skb. +- +-A program, that is translated internally consists of the following elements: +- +- op:16, jt:8, jf:8, k:32 ==> op:8, dst_reg:4, src_reg:4, off:16, imm:32 +- +-So far 87 internal BPF instructions were implemented. 8-bit 'op' opcode field +-has room for new instructions. Some of them may use 16/24/32 byte encoding. New +-instructions must be multiple of 8 bytes to preserve backward compatibility. +- +-Internal BPF is a general purpose RISC instruction set. Not every register and +-every instruction are used during translation from original BPF to new format. +-For example, socket filters are not using 'exclusive add' instruction, but +-tracing filters may do to maintain counters of events, for example. Register R9 +-is not used by socket filters either, but more complex filters may be running +-out of registers and would have to resort to spill/fill to stack. +- +-Internal BPF can used as generic assembler for last step performance +-optimizations, socket filters and seccomp are using it as assembler. Tracing +-filters may use it as assembler to generate code from kernel. In kernel usage +-may not be bounded by security considerations, since generated internal BPF code +-may be optimizing internal code path and not being exposed to the user space. +-Safety of internal BPF can come from a verifier (TBD). In such use cases as +-described, it may be used as safe instruction set. +- +-Just like the original BPF, the new format runs within a controlled environment, +-is deterministic and the kernel can easily prove that. The safety of the program +-can be determined in two steps: first step does depth-first-search to disallow +-loops and other CFG validation; second step starts from the first insn and +-descends all possible paths. It simulates execution of every insn and observes +-the state change of registers and stack. +- +-eBPF opcode encoding +--------------------- +- +-eBPF is reusing most of the opcode encoding from classic to simplify conversion +-of classic BPF to eBPF. For arithmetic and jump instructions the 8-bit 'code' +-field is divided into three parts: +- +- +----------------+--------+--------------------+ +- | 4 bits | 1 bit | 3 bits | +- | operation code | source | instruction class | +- +----------------+--------+--------------------+ +- (MSB) (LSB) +- +-Three LSB bits store instruction class which is one of: +- +- Classic BPF classes: eBPF classes: +- +- BPF_LD 0x00 BPF_LD 0x00 +- BPF_LDX 0x01 BPF_LDX 0x01 +- BPF_ST 0x02 BPF_ST 0x02 +- BPF_STX 0x03 BPF_STX 0x03 +- BPF_ALU 0x04 BPF_ALU 0x04 +- BPF_JMP 0x05 BPF_JMP 0x05 +- BPF_RET 0x06 [ class 6 unused, for future if needed ] +- BPF_MISC 0x07 BPF_ALU64 0x07 +- +-When BPF_CLASS(code) == BPF_ALU or BPF_JMP, 4th bit encodes source operand ... +- +- BPF_K 0x00 +- BPF_X 0x08 +- +- * in classic BPF, this means: +- +- BPF_SRC(code) == BPF_X - use register X as source operand +- BPF_SRC(code) == BPF_K - use 32-bit immediate as source operand +- +- * in eBPF, this means: +- +- BPF_SRC(code) == BPF_X - use 'src_reg' register as source operand +- BPF_SRC(code) == BPF_K - use 32-bit immediate as source operand +- +-... and four MSB bits store operation code. +- +-If BPF_CLASS(code) == BPF_ALU or BPF_ALU64 [ in eBPF ], BPF_OP(code) is one of: +- +- BPF_ADD 0x00 +- BPF_SUB 0x10 +- BPF_MUL 0x20 +- BPF_DIV 0x30 +- BPF_OR 0x40 +- BPF_AND 0x50 +- BPF_LSH 0x60 +- BPF_RSH 0x70 +- BPF_NEG 0x80 +- BPF_MOD 0x90 +- BPF_XOR 0xa0 +- BPF_MOV 0xb0 /* eBPF only: mov reg to reg */ +- BPF_ARSH 0xc0 /* eBPF only: sign extending shift right */ +- BPF_END 0xd0 /* eBPF only: endianness conversion */ +- +-If BPF_CLASS(code) == BPF_JMP, BPF_OP(code) is one of: +- +- BPF_JA 0x00 +- BPF_JEQ 0x10 +- BPF_JGT 0x20 +- BPF_JGE 0x30 +- BPF_JSET 0x40 +- BPF_JNE 0x50 /* eBPF only: jump != */ +- BPF_JSGT 0x60 /* eBPF only: signed '>' */ +- BPF_JSGE 0x70 /* eBPF only: signed '>=' */ +- BPF_CALL 0x80 /* eBPF only: function call */ +- BPF_EXIT 0x90 /* eBPF only: function return */ +- +-So BPF_ADD | BPF_X | BPF_ALU means 32-bit addition in both classic BPF +-and eBPF. There are only two registers in classic BPF, so it means A += X. +-In eBPF it means dst_reg = (u32) dst_reg + (u32) src_reg; similarly, +-BPF_XOR | BPF_K | BPF_ALU means A ^= imm32 in classic BPF and analogous +-src_reg = (u32) src_reg ^ (u32) imm32 in eBPF. +- +-Classic BPF is using BPF_MISC class to represent A = X and X = A moves. +-eBPF is using BPF_MOV | BPF_X | BPF_ALU code instead. Since there are no +-BPF_MISC operations in eBPF, the class 7 is used as BPF_ALU64 to mean +-exactly the same operations as BPF_ALU, but with 64-bit wide operands +-instead. So BPF_ADD | BPF_X | BPF_ALU64 means 64-bit addition, i.e.: +-dst_reg = dst_reg + src_reg +- +-Classic BPF wastes the whole BPF_RET class to represent a single 'ret' +-operation. Classic BPF_RET | BPF_K means copy imm32 into return register +-and perform function exit. eBPF is modeled to match CPU, so BPF_JMP | BPF_EXIT +-in eBPF means function exit only. The eBPF program needs to store return +-value into register R0 before doing a BPF_EXIT. Class 6 in eBPF is currently +-unused and reserved for future use. +- +-For load and store instructions the 8-bit 'code' field is divided as: +- +- +--------+--------+-------------------+ +- | 3 bits | 2 bits | 3 bits | +- | mode | size | instruction class | +- +--------+--------+-------------------+ +- (MSB) (LSB) +- +-Size modifier is one of ... +- +- BPF_W 0x00 /* word */ +- BPF_H 0x08 /* half word */ +- BPF_B 0x10 /* byte */ +- BPF_DW 0x18 /* eBPF only, double word */ +- +-... which encodes size of load/store operation: +- +- B - 1 byte +- H - 2 byte +- W - 4 byte +- DW - 8 byte (eBPF only) +- +-Mode modifier is one of: +- +- BPF_IMM 0x00 /* classic BPF only, reserved in eBPF */ +- BPF_ABS 0x20 +- BPF_IND 0x40 +- BPF_MEM 0x60 +- BPF_LEN 0x80 /* classic BPF only, reserved in eBPF */ +- BPF_MSH 0xa0 /* classic BPF only, reserved in eBPF */ +- BPF_XADD 0xc0 /* eBPF only, exclusive add */ +- +-eBPF has two non-generic instructions: (BPF_ABS | | BPF_LD) and +-(BPF_IND | | BPF_LD) which are used to access packet data. +- +-They had to be carried over from classic to have strong performance of +-socket filters running in eBPF interpreter. These instructions can only +-be used when interpreter context is a pointer to 'struct sk_buff' and +-have seven implicit operands. Register R6 is an implicit input that must +-contain pointer to sk_buff. Register R0 is an implicit output which contains +-the data fetched from the packet. Registers R1-R5 are scratch registers +-and must not be used to store the data across BPF_ABS | BPF_LD or +-BPF_IND | BPF_LD instructions. +- +-These instructions have implicit program exit condition as well. When +-eBPF program is trying to access the data beyond the packet boundary, +-the interpreter will abort the execution of the program. JIT compilers +-therefore must preserve this property. src_reg and imm32 fields are +-explicit inputs to these instructions. +- +-For example: +- +- BPF_IND | BPF_W | BPF_LD means: +- +- R0 = ntohl(*(u32 *) (((struct sk_buff *) R6)->data + src_reg + imm32)) +- and R1 - R5 were scratched. +- +-Unlike classic BPF instruction set, eBPF has generic load/store operations: +- +-BPF_MEM | | BPF_STX: *(size *) (dst_reg + off) = src_reg +-BPF_MEM | | BPF_ST: *(size *) (dst_reg + off) = imm32 +-BPF_MEM | | BPF_LDX: dst_reg = *(size *) (src_reg + off) +-BPF_XADD | BPF_W | BPF_STX: lock xadd *(u32 *)(dst_reg + off16) += src_reg +-BPF_XADD | BPF_DW | BPF_STX: lock xadd *(u64 *)(dst_reg + off16) += src_reg +- +-Where size is one of: BPF_B or BPF_H or BPF_W or BPF_DW. Note that 1 and +-2 byte atomic increments are not supported. +- +-Testing +-------- +- +-Next to the BPF toolchain, the kernel also ships a test module that contains +-various test cases for classic and internal BPF that can be executed against +-the BPF interpreter and JIT compiler. It can be found in lib/test_bpf.c and +-enabled via Kconfig: +- +- CONFIG_TEST_BPF=m +- +-After the module has been built and installed, the test suite can be executed +-via insmod or modprobe against 'test_bpf' module. Results of the test cases +-including timings in nsec can be found in the kernel log (dmesg). +- + Misc + ---- + +@@ -1024,4 +561,3 @@ the underlying architecture. + + Jay Schulist + Daniel Borkmann +-Alexei Starovoitov diff --git a/Makefile b/Makefile -index fefa023..06f4bb4 100644 +index c261752..7b9958b 100644 --- a/Makefile +++ b/Makefile -@@ -245,8 +245,9 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \ +@@ -303,8 +303,9 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \ HOSTCC = gcc HOSTCXX = g++ @@ -302,7 +800,7 @@ index fefa023..06f4bb4 100644 ifeq ($(shell $(HOSTCC) -v 2>&1 | grep -c "clang version"), 1) HOSTCFLAGS += -Wno-unused-value -Wno-unused-parameter \ -@@ -438,8 +439,8 @@ export RCS_TAR_IGNORE := --exclude SCCS --exclude BitKeeper --exclude .svn \ +@@ -449,8 +450,8 @@ export RCS_TAR_IGNORE := --exclude SCCS --exclude BitKeeper --exclude .svn \ # Rules shared between *config targets and build targets # Basic helpers built in scripts/ @@ -313,10 +811,13 @@ index fefa023..06f4bb4 100644 $(Q)$(MAKE) $(build)=scripts/basic $(Q)rm -f .tmp_quiet_recordmcount -@@ -600,6 +601,72 @@ else +@@ -621,6 +622,75 @@ else KBUILD_CFLAGS += -O2 endif ++# Tell gcc to never replace conditional load with a non-conditional one ++KBUILD_CFLAGS += $(call cc-option,--param=allow-store-data-races=0) ++ +ifndef DISABLE_PAX_PLUGINS +ifeq ($(call cc-ifversion, -ge, 0408, y), y) +PLUGINCC := $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-plugin.sh "$(HOSTCXX)" "$(HOSTCXX)" "$(CC)") @@ -383,10 +884,10 @@ index fefa023..06f4bb4 100644 +endif +endif + - include $(srctree)/arch/$(SRCARCH)/Makefile - ifdef CONFIG_READABLE_ASM -@@ -816,7 +883,7 @@ export mod_sign_cmd + # Disable optimizations that make assembler listings hard to read. + # reorder blocks reorders the control in the function +@@ -839,7 +909,7 @@ export mod_sign_cmd ifeq ($(KBUILD_EXTMOD),) @@ -395,16 +896,16 @@ index fefa023..06f4bb4 100644 vmlinux-dirs := $(patsubst %/,%,$(filter %/, $(init-y) $(init-m) \ $(core-y) $(core-m) $(drivers-y) $(drivers-m) \ -@@ -865,6 +932,8 @@ endif +@@ -888,6 +958,8 @@ endif - # The actual objects are generated when descending, + # The actual objects are generated when descending, # make sure no implicit rule kicks in +$(filter-out $(init-y),$(vmlinux-deps)): KBUILD_CFLAGS += $(GCC_PLUGINS_CFLAGS) +$(filter-out $(init-y),$(vmlinux-deps)): KBUILD_AFLAGS += $(GCC_PLUGINS_AFLAGS) $(sort $(vmlinux-deps)): $(vmlinux-dirs) ; # Handle descending into subdirectories listed in $(vmlinux-dirs) -@@ -874,7 +943,7 @@ $(sort $(vmlinux-deps)): $(vmlinux-dirs) ; +@@ -897,7 +969,7 @@ $(sort $(vmlinux-deps)): $(vmlinux-dirs) ; # Error messages still appears in the original language PHONY += $(vmlinux-dirs) @@ -413,7 +914,7 @@ index fefa023..06f4bb4 100644 $(Q)$(MAKE) $(build)=$@ define filechk_kernel.release -@@ -917,10 +986,13 @@ prepare1: prepare2 $(version_h) include/generated/utsrelease.h \ +@@ -940,10 +1012,13 @@ prepare1: prepare2 $(version_h) include/generated/utsrelease.h \ archprepare: archheaders archscripts prepare1 scripts_basic @@ -427,8 +928,8 @@ index fefa023..06f4bb4 100644 prepare: prepare0 # Generate some files -@@ -1028,6 +1100,8 @@ all: modules - # using awk while concatenating to the final file. +@@ -1051,6 +1126,8 @@ all: modules + # using awk while concatenating to the final file. PHONY += modules +modules: KBUILD_CFLAGS += $(GCC_PLUGINS_CFLAGS) @@ -436,7 +937,7 @@ index fefa023..06f4bb4 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.'; -@@ -1043,7 +1117,7 @@ modules.builtin: $(vmlinux-dirs:%=%/modules.builtin) +@@ -1066,7 +1143,7 @@ modules.builtin: $(vmlinux-dirs:%=%/modules.builtin) # Target to prepare building external modules PHONY += modules_prepare @@ -445,7 +946,7 @@ index fefa023..06f4bb4 100644 # Target to install modules PHONY += modules_install -@@ -1109,7 +1183,10 @@ MRPROPER_FILES += .config .config.old .version .old_version $(version_h) \ +@@ -1132,7 +1209,10 @@ 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 \ @@ -457,7 +958,7 @@ index fefa023..06f4bb4 100644 # clean - Delete most, but leave enough to build external modules # -@@ -1148,7 +1225,7 @@ distclean: mrproper +@@ -1171,7 +1251,7 @@ distclean: mrproper @find $(srctree) $(RCS_FIND_IGNORE) \ \( -name '*.orig' -o -name '*.rej' -o -name '*~' \ -o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \ @@ -466,7 +967,7 @@ index fefa023..06f4bb4 100644 -type f -print | xargs rm -f -@@ -1309,6 +1386,8 @@ PHONY += $(module-dirs) modules +@@ -1332,6 +1412,8 @@ PHONY += $(module-dirs) modules $(module-dirs): crmodverdir $(objtree)/Module.symvers $(Q)$(MAKE) $(build)=$(patsubst _module_%,%,$@) @@ -475,7 +976,7 @@ index fefa023..06f4bb4 100644 modules: $(module-dirs) @$(kecho) ' Building modules, stage 2.'; $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost -@@ -1448,17 +1527,21 @@ else +@@ -1471,17 +1553,21 @@ else target-dir = $(if $(KBUILD_EXTMOD),$(dir $<),$(dir $@)) endif @@ -501,7 +1002,7 @@ index fefa023..06f4bb4 100644 $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@) %.symtypes: %.c prepare scripts FORCE $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@) -@@ -1468,11 +1551,15 @@ endif +@@ -1491,11 +1577,15 @@ endif $(cmd_crmodverdir) $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \ $(build)=$(build-dir) @@ -520,10 +1021,10 @@ index fefa023..06f4bb4 100644 $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \ $(build)=$(build-dir) $(@:.ko=.o) diff --git a/arch/alpha/include/asm/atomic.h b/arch/alpha/include/asm/atomic.h -index 78b03ef..da28a51 100644 +index ed60a1e..47f1a55 100644 --- a/arch/alpha/include/asm/atomic.h +++ b/arch/alpha/include/asm/atomic.h -@@ -292,6 +292,16 @@ static inline long atomic64_dec_if_positive(atomic64_t *v) +@@ -292,4 +292,14 @@ static inline long atomic64_dec_if_positive(atomic64_t *v) #define atomic_dec(v) atomic_sub(1,(v)) #define atomic64_dec(v) atomic64_sub(1,(v)) @@ -537,9 +1038,7 @@ index 78b03ef..da28a51 100644 +#define atomic64_dec_unchecked(v) atomic64_dec(v) +#define atomic64_cmpxchg_unchecked(v, o, n) atomic64_cmpxchg((v), (o), (n)) + - #define smp_mb__before_atomic_dec() smp_mb() - #define smp_mb__after_atomic_dec() smp_mb() - #define smp_mb__before_atomic_inc() smp_mb() + #endif /* _ALPHA_ATOMIC_H */ diff --git a/arch/alpha/include/asm/cache.h b/arch/alpha/include/asm/cache.h index ad368a9..fbe0f25 100644 --- a/arch/alpha/include/asm/cache.h @@ -852,10 +1351,10 @@ index 98838a0..b304fb4 100644 /* Allow reads even for write-only mappings */ if (!(vma->vm_flags & (VM_READ | VM_WRITE))) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig -index db3c541..a1acc89 100644 +index 290f02ee..a639059 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig -@@ -1877,7 +1877,7 @@ config ALIGNMENT_TRAP +@@ -1787,7 +1787,7 @@ config ALIGNMENT_TRAP config UACCESS_WITH_MEMCPY bool "Use kernel mem{cpy,set}() for {copy_to,clear}_user()" @@ -864,7 +1363,7 @@ index db3c541..a1acc89 100644 default y if CPU_FEROCEON help Implement faster copy_to_user and clear_user methods for CPU -@@ -2141,6 +2141,7 @@ config XIP_PHYS_ADDR +@@ -2051,6 +2051,7 @@ config XIP_PHYS_ADDR config KEXEC bool "Kexec system call (EXPERIMENTAL)" depends on (!SMP || PM_SLEEP_SMP) @@ -873,7 +1372,7 @@ index db3c541..a1acc89 100644 kexec is a system call that implements the ability to shutdown your current kernel, and to start another kernel. It is like a reboot diff --git a/arch/arm/include/asm/atomic.h b/arch/arm/include/asm/atomic.h -index 9a92fd7..3502a80 100644 +index 3040359..89b3dfc 100644 --- a/arch/arm/include/asm/atomic.h +++ b/arch/arm/include/asm/atomic.h @@ -18,17 +18,35 @@ @@ -1190,7 +1689,7 @@ index 9a92fd7..3502a80 100644 #define atomic_dec_return(v) (atomic_sub_return(1, v)) #define atomic_sub_and_test(i, v) (atomic_sub_return(i, v) == 0) -@@ -251,6 +453,14 @@ typedef struct { +@@ -246,6 +448,14 @@ typedef struct { long long counter; } atomic64_t; @@ -1205,7 +1704,7 @@ index 9a92fd7..3502a80 100644 #define ATOMIC64_INIT(i) { (i) } #ifdef CONFIG_ARM_LPAE -@@ -267,6 +477,19 @@ static inline long long atomic64_read(const atomic64_t *v) +@@ -262,6 +472,19 @@ static inline long long atomic64_read(const atomic64_t *v) return result; } @@ -1225,7 +1724,7 @@ index 9a92fd7..3502a80 100644 static inline void atomic64_set(atomic64_t *v, long long i) { __asm__ __volatile__("@ atomic64_set\n" -@@ -275,6 +498,15 @@ static inline void atomic64_set(atomic64_t *v, long long i) +@@ -270,6 +493,15 @@ static inline void atomic64_set(atomic64_t *v, long long i) : "r" (&v->counter), "r" (i) ); } @@ -1241,7 +1740,7 @@ index 9a92fd7..3502a80 100644 #else static inline long long atomic64_read(const atomic64_t *v) { -@@ -289,6 +521,19 @@ static inline long long atomic64_read(const atomic64_t *v) +@@ -284,6 +516,19 @@ static inline long long atomic64_read(const atomic64_t *v) return result; } @@ -1261,7 +1760,7 @@ index 9a92fd7..3502a80 100644 static inline void atomic64_set(atomic64_t *v, long long i) { long long tmp; -@@ -303,6 +548,21 @@ static inline void atomic64_set(atomic64_t *v, long long i) +@@ -298,6 +543,21 @@ static inline void atomic64_set(atomic64_t *v, long long i) : "r" (&v->counter), "r" (i) : "cc"); } @@ -1283,7 +1782,7 @@ index 9a92fd7..3502a80 100644 #endif static inline void atomic64_add(long long i, atomic64_t *v) -@@ -314,6 +574,37 @@ static inline void atomic64_add(long long i, atomic64_t *v) +@@ -309,6 +569,37 @@ static inline void atomic64_add(long long i, atomic64_t *v) __asm__ __volatile__("@ atomic64_add\n" "1: ldrexd %0, %H0, [%3]\n" " adds %Q0, %Q0, %Q4\n" @@ -1321,7 +1820,7 @@ index 9a92fd7..3502a80 100644 " adc %R0, %R0, %R4\n" " strexd %1, %0, %H0, [%3]\n" " teq %1, #0\n" -@@ -334,6 +625,44 @@ static inline long long atomic64_add_return(long long i, atomic64_t *v) +@@ -329,6 +620,44 @@ static inline long long atomic64_add_return(long long i, atomic64_t *v) __asm__ __volatile__("@ atomic64_add_return\n" "1: ldrexd %0, %H0, [%3]\n" " adds %Q0, %Q0, %Q4\n" @@ -1366,7 +1865,7 @@ index 9a92fd7..3502a80 100644 " adc %R0, %R0, %R4\n" " strexd %1, %0, %H0, [%3]\n" " teq %1, #0\n" -@@ -356,6 +685,37 @@ static inline void atomic64_sub(long long i, atomic64_t *v) +@@ -351,6 +680,37 @@ static inline void atomic64_sub(long long i, atomic64_t *v) __asm__ __volatile__("@ atomic64_sub\n" "1: ldrexd %0, %H0, [%3]\n" " subs %Q0, %Q0, %Q4\n" @@ -1404,7 +1903,7 @@ index 9a92fd7..3502a80 100644 " sbc %R0, %R0, %R4\n" " strexd %1, %0, %H0, [%3]\n" " teq %1, #0\n" -@@ -376,16 +736,29 @@ static inline long long atomic64_sub_return(long long i, atomic64_t *v) +@@ -371,16 +731,29 @@ static inline long long atomic64_sub_return(long long i, atomic64_t *v) __asm__ __volatile__("@ atomic64_sub_return\n" "1: ldrexd %0, %H0, [%3]\n" " subs %Q0, %Q0, %Q4\n" @@ -1437,7 +1936,7 @@ index 9a92fd7..3502a80 100644 return result; } -@@ -415,6 +788,31 @@ static inline long long atomic64_cmpxchg(atomic64_t *ptr, long long old, +@@ -410,6 +783,31 @@ static inline long long atomic64_cmpxchg(atomic64_t *ptr, long long old, return oldval; } @@ -1469,7 +1968,7 @@ index 9a92fd7..3502a80 100644 static inline long long atomic64_xchg(atomic64_t *ptr, long long new) { long long result; -@@ -440,21 +838,35 @@ static inline long long atomic64_xchg(atomic64_t *ptr, long long new) +@@ -435,21 +833,35 @@ static inline long long atomic64_xchg(atomic64_t *ptr, long long new) static inline long long atomic64_dec_if_positive(atomic64_t *v) { long long result; @@ -1511,7 +2010,7 @@ index 9a92fd7..3502a80 100644 : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter) : "r" (&v->counter) : "cc"); -@@ -478,13 +890,25 @@ static inline int atomic64_add_unless(atomic64_t *v, long long a, long long u) +@@ -473,13 +885,25 @@ static inline int atomic64_add_unless(atomic64_t *v, long long a, long long u) " teq %0, %5\n" " teqeq %H0, %H5\n" " moveq %1, #0\n" @@ -1540,7 +2039,7 @@ index 9a92fd7..3502a80 100644 : "=&r" (val), "+r" (ret), "=&r" (tmp), "+Qo" (v->counter) : "r" (&v->counter), "r" (u), "r" (a) : "cc"); -@@ -497,10 +921,13 @@ static inline int atomic64_add_unless(atomic64_t *v, long long a, long long u) +@@ -492,10 +916,13 @@ static inline int atomic64_add_unless(atomic64_t *v, long long a, long long u) #define atomic64_add_negative(a, v) (atomic64_add_return((a), (v)) < 0) #define atomic64_inc(v) atomic64_add(1LL, (v)) @@ -1555,7 +2054,7 @@ index 9a92fd7..3502a80 100644 #define atomic64_dec_and_test(v) (atomic64_dec_return((v)) == 0) #define atomic64_inc_not_zero(v) atomic64_add_unless((v), 1LL, 0LL) diff --git a/arch/arm/include/asm/barrier.h b/arch/arm/include/asm/barrier.h -index 2f59f74..1594659 100644 +index c6a3e73..35cca85 100644 --- a/arch/arm/include/asm/barrier.h +++ b/arch/arm/include/asm/barrier.h @@ -63,7 +63,7 @@ @@ -1591,7 +2090,7 @@ index 75fe66b..ba3dee4 100644 #endif diff --git a/arch/arm/include/asm/cacheflush.h b/arch/arm/include/asm/cacheflush.h -index 8b8b616..d973d24 100644 +index fd43f7f..a817f5a 100644 --- a/arch/arm/include/asm/cacheflush.h +++ b/arch/arm/include/asm/cacheflush.h @@ -116,7 +116,7 @@ struct cpu_cache_fns { @@ -1860,13 +2359,13 @@ index f98c7f3..e5c626d 100644 MT_MEMORY_DMA_READY, }; diff --git a/arch/arm/include/asm/outercache.h b/arch/arm/include/asm/outercache.h -index f94784f..9a09a4a 100644 +index 891a56b..48f337e 100644 --- a/arch/arm/include/asm/outercache.h +++ b/arch/arm/include/asm/outercache.h -@@ -35,7 +35,7 @@ struct outer_cache_fns { - #endif - void (*set_debug)(unsigned long); - void (*resume)(void); +@@ -36,7 +36,7 @@ struct outer_cache_fns { + + /* This is an ARM L2C thing */ + void (*write_sec)(unsigned long, unsigned); -}; +} __no_const; @@ -2130,13 +2629,13 @@ index 5478e5d..f5b5cb3 100644 return pte; } diff --git a/arch/arm/include/asm/psci.h b/arch/arm/include/asm/psci.h -index c4ae171..ea0c0c2 100644 +index c25ef3e..735f14b 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); +@@ -32,7 +32,7 @@ struct psci_operations { + int (*affinity_info)(unsigned long target_affinity, + unsigned long lowest_affinity_level); + int (*migrate_info_type)(void); -}; +} __no_const; @@ -2156,7 +2655,7 @@ index 2ec765c..beb1fe16 100644 struct of_cpu_method { const char *method; diff --git a/arch/arm/include/asm/thread_info.h b/arch/arm/include/asm/thread_info.h -index f989d7c..e8aa7f0 100644 +index e4e4208..086684a 100644 --- a/arch/arm/include/asm/thread_info.h +++ b/arch/arm/include/asm/thread_info.h @@ -88,9 +88,9 @@ struct thread_info { @@ -2172,7 +2671,7 @@ index f989d7c..e8aa7f0 100644 .restart_block = { \ .fn = do_no_restart_syscall, \ }, \ -@@ -158,7 +158,11 @@ extern int vfp_restore_user_hwstate(struct user_vfp __user *, +@@ -164,7 +164,11 @@ extern int vfp_restore_user_hwstate(struct user_vfp __user *, #define TIF_SYSCALL_AUDIT 9 #define TIF_SYSCALL_TRACEPOINT 10 #define TIF_SECCOMP 11 /* seccomp syscall filtering active */ @@ -2185,7 +2684,7 @@ index f989d7c..e8aa7f0 100644 #define TIF_USING_IWMMXT 17 #define TIF_MEMDIE 18 /* is terminating due to OOM killer */ #define TIF_RESTORE_SIGMASK 20 -@@ -172,10 +176,11 @@ extern int vfp_restore_user_hwstate(struct user_vfp __user *, +@@ -178,10 +182,11 @@ extern int vfp_restore_user_hwstate(struct user_vfp __user *, #define _TIF_SYSCALL_TRACEPOINT (1 << TIF_SYSCALL_TRACEPOINT) #define _TIF_SECCOMP (1 << TIF_SECCOMP) #define _TIF_USING_IWMMXT (1 << TIF_USING_IWMMXT) @@ -2430,7 +2929,7 @@ index f7b450f..f5364c5 100644 EXPORT_SYMBOL(__get_user_1); EXPORT_SYMBOL(__get_user_2); diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S -index 1879e8d..5602dd4 100644 +index 52a949a..d8bbcab 100644 --- a/arch/arm/kernel/entry-armv.S +++ b/arch/arm/kernel/entry-armv.S @@ -47,6 +47,87 @@ @@ -2572,7 +3071,7 @@ index 1879e8d..5602dd4 100644 sub sp, sp, #S_FRAME_SIZE ARM( stmib sp, {r1 - r12} ) THUMB( stmia sp, {r0 - r12} ) -@@ -416,7 +513,9 @@ __und_usr: +@@ -421,7 +518,9 @@ __und_usr: tst r3, #PSR_T_BIT @ Thumb mode? bne __und_usr_thumb sub r4, r2, #4 @ ARM instr at LR - 4 @@ -2582,7 +3081,7 @@ index 1879e8d..5602dd4 100644 ARM_BE8(rev r0, r0) @ little endian instruction @ r0 = 32-bit ARM instruction which caused the exception -@@ -450,11 +549,15 @@ __und_usr_thumb: +@@ -455,11 +554,15 @@ __und_usr_thumb: */ .arch armv6t2 #endif @@ -2598,17 +3097,17 @@ index 1879e8d..5602dd4 100644 ARM_BE8(rev16 r0, r0) @ little endian instruction add r2, r2, #2 @ r2 is PC + 2, make it PC + 4 str r2, [sp, #S_PC] @ it's a 2x16bit instr, update -@@ -484,7 +587,8 @@ ENDPROC(__und_usr) +@@ -489,7 +592,8 @@ ENDPROC(__und_usr) */ .pushsection .fixup, "ax" .align 2 --4: mov pc, r9 +-4: str r4, [sp, #S_PC] @ retry current instruction +4: pax_close_userland -+ mov pc, r9 ++ str r4, [sp, #S_PC] @ retry current instruction + mov pc, r9 .popsection .pushsection __ex_table,"a" - .long 1b, 4b -@@ -694,7 +798,7 @@ ENTRY(__switch_to) +@@ -698,7 +802,7 @@ ENTRY(__switch_to) THUMB( str lr, [ip], #4 ) ldr r4, [r2, #TI_TP_VALUE] ldr r5, [r2, #TI_TP_VALUE + 4] @@ -2617,7 +3116,7 @@ index 1879e8d..5602dd4 100644 ldr r6, [r2, #TI_CPU_DOMAIN] #endif switch_tls r1, r4, r5, r3, r7 -@@ -703,7 +807,7 @@ ENTRY(__switch_to) +@@ -707,7 +811,7 @@ ENTRY(__switch_to) ldr r8, =__stack_chk_guard ldr r7, [r7, #TSK_STACK_CANARY] #endif @@ -2627,7 +3126,7 @@ index 1879e8d..5602dd4 100644 #endif mov r5, r0 diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S -index a2dcafd..1048b5a 100644 +index 7139d4a..feaf37f 100644 --- a/arch/arm/kernel/entry-common.S +++ b/arch/arm/kernel/entry-common.S @@ -10,18 +10,46 @@ @@ -2680,7 +3179,7 @@ index a2dcafd..1048b5a 100644 .align 5 /* * This is the fast syscall return path. We do as little as -@@ -411,6 +439,12 @@ ENTRY(vector_swi) +@@ -405,6 +433,12 @@ ENTRY(vector_swi) USER( ldr scno, [lr, #-4] ) @ get SWI instruction #endif @@ -2694,7 +3193,7 @@ index a2dcafd..1048b5a 100644 #if defined(CONFIG_OABI_COMPAT) diff --git a/arch/arm/kernel/entry-header.S b/arch/arm/kernel/entry-header.S -index efb208d..d34bd02 100644 +index 5d702f8..f5fc51a 100644 --- a/arch/arm/kernel/entry-header.S +++ b/arch/arm/kernel/entry-header.S @@ -188,6 +188,60 @@ @@ -2794,7 +3293,7 @@ index 918875d..cd5fa27 100644 flush_icache_range((unsigned long)base + offset, offset + length); diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S -index 591d6e4..8322a26 100644 +index 2c35f0f..7747ee6 100644 --- a/arch/arm/kernel/head.S +++ b/arch/arm/kernel/head.S @@ -437,7 +437,7 @@ __enable_mmu: @@ -2972,36 +3471,24 @@ index 81ef686..f4130b8 100644 } #endif diff --git a/arch/arm/kernel/psci.c b/arch/arm/kernel/psci.c -index 4693188..4596c5e 100644 +index f73891b..cf3004e 100644 --- a/arch/arm/kernel/psci.c +++ b/arch/arm/kernel/psci.c -@@ -24,7 +24,7 @@ - #include +@@ -28,7 +28,7 @@ #include + #include -struct psci_operations psci_ops; +struct psci_operations psci_ops __read_only; static int (*invoke_psci_fn)(u32, u32, u32, u32); - + typedef int (*psci_initcall_t)(const struct device_node *); diff --git a/arch/arm/kernel/ptrace.c b/arch/arm/kernel/ptrace.c -index 0dd3b79..b67388e 100644 +index 0c27ed6..b67388e 100644 --- a/arch/arm/kernel/ptrace.c +++ b/arch/arm/kernel/ptrace.c -@@ -908,7 +908,7 @@ enum ptrace_syscall_dir { - PTRACE_SYSCALL_EXIT, - }; - --static int tracehook_report_syscall(struct pt_regs *regs, -+static void tracehook_report_syscall(struct pt_regs *regs, - enum ptrace_syscall_dir dir) - { - unsigned long ip; -@@ -926,19 +926,29 @@ static int tracehook_report_syscall(struct pt_regs *regs, - current_thread_info()->syscall = -1; - +@@ -928,10 +928,19 @@ static void tracehook_report_syscall(struct pt_regs *regs, regs->ARM_ip = ip; -- return current_thread_info()->syscall; } +#ifdef CONFIG_GRKERNSEC_SETXID @@ -3020,20 +3507,11 @@ index 0dd3b79..b67388e 100644 /* Do the secure computing check first; failures should be fast. */ if (secure_computing(scno) == -1) return -1; - - if (test_thread_flag(TIF_SYSCALL_TRACE)) -- scno = tracehook_report_syscall(regs, PTRACE_SYSCALL_ENTER); -+ tracehook_report_syscall(regs, PTRACE_SYSCALL_ENTER); -+ -+ scno = current_thread_info()->syscall; - - if (test_thread_flag(TIF_SYSCALL_TRACEPOINT)) - trace_sys_enter(regs, scno); diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c -index 50e198c..a8b5f49 100644 +index 8a16ee5..4f560e5 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c -@@ -103,21 +103,23 @@ EXPORT_SYMBOL(elf_hwcap); +@@ -104,21 +104,23 @@ EXPORT_SYMBOL(elf_hwcap); unsigned int elf_hwcap2 __read_mostly; EXPORT_SYMBOL(elf_hwcap2); @@ -3062,7 +3540,7 @@ index 50e198c..a8b5f49 100644 EXPORT_SYMBOL(outer_cache); #endif -@@ -250,9 +252,13 @@ static int __get_cpu_architecture(void) +@@ -251,9 +253,13 @@ static int __get_cpu_architecture(void) asm("mrc p15, 0, %0, c0, c1, 4" : "=r" (mmfr0)); if ((mmfr0 & 0x0000000f) >= 0x00000003 || @@ -3297,7 +3775,7 @@ index 7bcee5c..e2f3249 100644 __data_loc = .; #endif diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c -index f0e50a0..8d5d36c 100644 +index 3c82b37..69fa3d2 100644 --- a/arch/arm/kvm/arm.c +++ b/arch/arm/kvm/arm.c @@ -57,7 +57,7 @@ static unsigned long hyp_default_vectors; @@ -3309,7 +3787,7 @@ index f0e50a0..8d5d36c 100644 static u8 kvm_next_vmid; static DEFINE_SPINLOCK(kvm_vmid_lock); -@@ -408,7 +408,7 @@ void force_vm_exit(const cpumask_t *mask) +@@ -409,7 +409,7 @@ void force_vm_exit(const cpumask_t *mask) */ static bool need_new_vmid_gen(struct kvm *kvm) { @@ -3318,7 +3796,7 @@ index f0e50a0..8d5d36c 100644 } /** -@@ -441,7 +441,7 @@ static void update_vttbr(struct kvm *kvm) +@@ -442,7 +442,7 @@ static void update_vttbr(struct kvm *kvm) /* First user of a new VMID generation? */ if (unlikely(kvm_next_vmid == 0)) { @@ -3327,7 +3805,7 @@ index f0e50a0..8d5d36c 100644 kvm_next_vmid = 1; /* -@@ -458,7 +458,7 @@ static void update_vttbr(struct kvm *kvm) +@@ -459,7 +459,7 @@ static void update_vttbr(struct kvm *kvm) kvm_call_hyp(__kvm_flush_vm_context); } @@ -3336,6 +3814,15 @@ index f0e50a0..8d5d36c 100644 kvm->arch.vmid = kvm_next_vmid; kvm_next_vmid++; +@@ -1034,7 +1034,7 @@ static void check_kvm_target_cpu(void *ret) + /** + * Initialize Hyp-mode and memory mappings on all CPUs. + */ +-int kvm_arch_init(void *opaque) ++int kvm_arch_init(const void *opaque) + { + int err; + int ret, cpu; diff --git a/arch/arm/lib/clear_user.S b/arch/arm/lib/clear_user.S index 14a0d98..7771a7d 100644 --- a/arch/arm/lib/clear_user.S @@ -3532,6 +4019,28 @@ index 255f33a..507b157 100644 clk = clk_register(dev, &gate_fn->gate.hw); if (IS_ERR(clk)) +diff --git a/arch/arm/mach-mvebu/coherency.c b/arch/arm/mach-mvebu/coherency.c +index 2bdc323..cf1c607 100644 +--- a/arch/arm/mach-mvebu/coherency.c ++++ b/arch/arm/mach-mvebu/coherency.c +@@ -316,7 +316,7 @@ static void __init armada_370_coherency_init(struct device_node *np) + + /* + * This ioremap hook is used on Armada 375/38x to ensure that PCIe +- * memory areas are mapped as MT_UNCACHED instead of MT_DEVICE. This ++ * memory areas are mapped as MT_UNCACHED_RW instead of MT_DEVICE. This + * is needed as a workaround for a deadlock issue between the PCIe + * interface and the cache controller. + */ +@@ -329,7 +329,7 @@ armada_pcie_wa_ioremap_caller(phys_addr_t phys_addr, size_t size, + mvebu_mbus_get_pcie_mem_aperture(&pcie_mem); + + if (pcie_mem.start <= phys_addr && (phys_addr + size) <= pcie_mem.end) +- mtype = MT_UNCACHED; ++ mtype = MT_UNCACHED_RW; + + return __arm_ioremap_caller(phys_addr, size, mtype, caller); + } diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c index aead77a..a2253fa 100644 --- a/arch/arm/mach-omap2/board-n8x0.c @@ -3546,10 +4055,10 @@ index aead77a..a2253fa 100644 }; diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c -index 9fe8c94..c014a4d 100644 +index 8bc1338..8b28b69 100644 --- a/arch/arm/mach-omap2/gpmc.c +++ b/arch/arm/mach-omap2/gpmc.c -@@ -148,7 +148,6 @@ struct omap3_gpmc_regs { +@@ -151,7 +151,6 @@ struct omap3_gpmc_regs { }; static struct gpmc_client_irq gpmc_client_irq[GPMC_NR_IRQ]; @@ -3557,7 +4066,7 @@ index 9fe8c94..c014a4d 100644 static int gpmc_irq_start; static struct resource gpmc_mem_root; -@@ -727,6 +726,18 @@ static void gpmc_irq_noop(struct irq_data *data) { } +@@ -736,6 +735,18 @@ static void gpmc_irq_noop(struct irq_data *data) { } static unsigned int gpmc_irq_noop_ret(struct irq_data *data) { return 0; } @@ -3576,7 +4085,7 @@ index 9fe8c94..c014a4d 100644 static int gpmc_setup_irq(void) { int i; -@@ -741,15 +752,6 @@ static int gpmc_setup_irq(void) +@@ -750,15 +761,6 @@ static int gpmc_setup_irq(void) return gpmc_irq_start; } @@ -3593,7 +4102,7 @@ index 9fe8c94..c014a4d 100644 gpmc_client_irq[1].bitmask = GPMC_IRQ_COUNT_EVENT; diff --git a/arch/arm/mach-omap2/omap-mpuss-lowpower.c b/arch/arm/mach-omap2/omap-mpuss-lowpower.c -index 667915d..2ee1219 100644 +index 4001325..b14e2a0 100644 --- a/arch/arm/mach-omap2/omap-mpuss-lowpower.c +++ b/arch/arm/mach-omap2/omap-mpuss-lowpower.c @@ -84,7 +84,7 @@ struct cpu_pm_ops { @@ -3615,7 +4124,7 @@ index 667915d..2ee1219 100644 .resume = dummy_cpu_resume, .scu_prepare = dummy_scu_prepare, diff --git a/arch/arm/mach-omap2/omap-wakeupgen.c b/arch/arm/mach-omap2/omap-wakeupgen.c -index 693fe48..c15ea73 100644 +index 37843a7..a98df13 100644 --- a/arch/arm/mach-omap2/omap-wakeupgen.c +++ b/arch/arm/mach-omap2/omap-wakeupgen.c @@ -343,7 +343,7 @@ static int irq_cpu_hotplug_notify(struct notifier_block *self, @@ -3669,7 +4178,7 @@ index 78c02b3..c94109a 100644 struct omap_device *omap_device_alloc(struct platform_device *pdev, struct omap_hwmod **ohs, int oh_cnt); diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c -index 66c60fe..c78950d 100644 +index da1b256..ab2a327 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c @@ -194,10 +194,10 @@ struct omap_hwmod_soc_ops { @@ -3709,7 +4218,7 @@ index 95fee54..cfa9cf1 100644 pwrdm_register_pwrdms(powerdomains_am43xx); pwrdm_complete_init(); diff --git a/arch/arm/mach-omap2/wd_timer.c b/arch/arm/mach-omap2/wd_timer.c -index d15c7bb..b2d1f0c 100644 +index 97d6607..8429d14 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) @@ -3764,7 +4273,7 @@ index 2dea8b5..6499da2 100644 extern void ux500_cpu_die(unsigned int cpu); diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig -index 5bf7c3c..571e67e 100644 +index c348eae..456a1a4 100644 --- a/arch/arm/mm/Kconfig +++ b/arch/arm/mm/Kconfig @@ -446,6 +446,7 @@ config CPU_32v5 @@ -3801,10 +4310,10 @@ index 5bf7c3c..571e67e 100644 If all of the binaries and libraries which run on your platform diff --git a/arch/arm/mm/alignment.c b/arch/arm/mm/alignment.c -index 9240364..a2b8cf3 100644 +index b8cb1a2..6a5624a 100644 --- a/arch/arm/mm/alignment.c +++ b/arch/arm/mm/alignment.c -@@ -212,10 +212,12 @@ union offset_union { +@@ -214,10 +214,12 @@ union offset_union { #define __get16_unaligned_check(ins,val,addr) \ do { \ unsigned int err = 0, v, a = addr; \ @@ -3817,7 +4326,7 @@ index 9240364..a2b8cf3 100644 if (err) \ goto fault; \ } while (0) -@@ -229,6 +231,7 @@ union offset_union { +@@ -231,6 +233,7 @@ union offset_union { #define __get32_unaligned_check(ins,val,addr) \ do { \ unsigned int err = 0, v, a = addr; \ @@ -3825,7 +4334,7 @@ index 9240364..a2b8cf3 100644 __get8_unaligned_check(ins,v,a,err); \ val = v << ((BE) ? 24 : 0); \ __get8_unaligned_check(ins,v,a,err); \ -@@ -237,6 +240,7 @@ union offset_union { +@@ -239,6 +242,7 @@ union offset_union { val |= v << ((BE) ? 8 : 16); \ __get8_unaligned_check(ins,v,a,err); \ val |= v << ((BE) ? 0 : 24); \ @@ -3833,7 +4342,7 @@ index 9240364..a2b8cf3 100644 if (err) \ goto fault; \ } while (0) -@@ -250,6 +254,7 @@ union offset_union { +@@ -252,6 +256,7 @@ union offset_union { #define __put16_unaligned_check(ins,val,addr) \ do { \ unsigned int err = 0, v = val, a = addr; \ @@ -3841,7 +4350,7 @@ index 9240364..a2b8cf3 100644 __asm__( FIRST_BYTE_16 \ ARM( "1: "ins" %1, [%2], #1\n" ) \ THUMB( "1: "ins" %1, [%2]\n" ) \ -@@ -269,6 +274,7 @@ union offset_union { +@@ -271,6 +276,7 @@ union offset_union { " .popsection\n" \ : "=r" (err), "=&r" (v), "=&r" (a) \ : "0" (err), "1" (v), "2" (a)); \ @@ -3849,7 +4358,7 @@ index 9240364..a2b8cf3 100644 if (err) \ goto fault; \ } while (0) -@@ -282,6 +288,7 @@ union offset_union { +@@ -284,6 +290,7 @@ union offset_union { #define __put32_unaligned_check(ins,val,addr) \ do { \ unsigned int err = 0, v = val, a = addr; \ @@ -3857,7 +4366,7 @@ index 9240364..a2b8cf3 100644 __asm__( FIRST_BYTE_32 \ ARM( "1: "ins" %1, [%2], #1\n" ) \ THUMB( "1: "ins" %1, [%2]\n" ) \ -@@ -311,6 +318,7 @@ union offset_union { +@@ -313,6 +320,7 @@ union offset_union { " .popsection\n" \ : "=r" (err), "=&r" (v), "=&r" (a) \ : "0" (err), "1" (v), "2" (a)); \ @@ -3866,17 +4375,17 @@ index 9240364..a2b8cf3 100644 goto fault; \ } while (0) diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c -index 7abde2c..9df495f 100644 +index 7c3fb41..bfb87d8 100644 --- a/arch/arm/mm/cache-l2x0.c +++ b/arch/arm/mm/cache-l2x0.c -@@ -46,7 +46,7 @@ struct l2x0_of_data { - void (*setup)(const struct device_node *, u32 *, u32 *); - void (*save)(void); +@@ -41,7 +41,7 @@ struct l2c_init_data { + void (*fixup)(void __iomem *, u32, struct outer_cache_fns *); + void (*save)(void __iomem *); struct outer_cache_fns outer_cache; -}; +} __do_const; - static bool of_init = false; + #define CACHE_LINE_SIZE 32 diff --git a/arch/arm/mm/context.c b/arch/arm/mm/context.c index 6eb97b3..ac509f6 100644 @@ -4171,10 +4680,10 @@ index cf08bdf..772656c 100644 unsigned long search_exception_table(unsigned long addr); diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c -index 2a77ba8..68e6a7a 100644 +index 659c75d..6f8c029 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c -@@ -30,6 +30,8 @@ +@@ -31,6 +31,8 @@ #include #include #include @@ -4183,7 +4692,7 @@ index 2a77ba8..68e6a7a 100644 #include #include -@@ -627,7 +629,46 @@ void free_initmem(void) +@@ -619,7 +621,46 @@ void free_initmem(void) { #ifdef CONFIG_HAVE_TCM extern char __tcm_start, __tcm_end; @@ -4231,7 +4740,7 @@ index 2a77ba8..68e6a7a 100644 free_reserved_area(&__tcm_start, &__tcm_end, -1, "TCM link"); #endif diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c -index f9c32ba..8540068 100644 +index d1e5ad7..84dcbf2 100644 --- a/arch/arm/mm/ioremap.c +++ b/arch/arm/mm/ioremap.c @@ -392,9 +392,9 @@ __arm_ioremap_exec(phys_addr_t phys_addr, size_t size, bool cached) @@ -4358,10 +4867,10 @@ index 5e85ed3..b10a7ed 100644 } } diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c -index b68c6b2..f66c492 100644 +index 6e3ba8d..9cbb4d7 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c -@@ -39,6 +39,22 @@ +@@ -40,6 +40,22 @@ #include "mm.h" #include "tcm.h" @@ -4384,7 +4893,7 @@ index b68c6b2..f66c492 100644 /* * empty_zero_page is a special page that is used for * zero-initialized data and COW. -@@ -235,7 +251,15 @@ __setup("noalign", noalign_setup); +@@ -239,7 +255,15 @@ __setup("noalign", noalign_setup); #define PROT_PTE_S2_DEVICE PROT_PTE_DEVICE #define PROT_SECT_DEVICE PMD_TYPE_SECT|PMD_SECT_AP_WRITE @@ -4401,7 +4910,7 @@ index b68c6b2..f66c492 100644 [MT_DEVICE] = { /* Strongly ordered / ARMv6 shared device */ .prot_pte = PROT_PTE_DEVICE | L_PTE_MT_DEV_SHARED | L_PTE_SHARED, -@@ -264,19 +288,19 @@ static struct mem_type mem_types[] = { +@@ -268,19 +292,19 @@ static struct mem_type mem_types[] = { .prot_sect = PROT_SECT_DEVICE, .domain = DOMAIN_IO, }, @@ -4426,7 +4935,7 @@ index b68c6b2..f66c492 100644 .domain = DOMAIN_KERNEL, }, #endif -@@ -284,15 +308,15 @@ static struct mem_type mem_types[] = { +@@ -288,15 +312,15 @@ 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, @@ -4445,7 +4954,7 @@ index b68c6b2..f66c492 100644 .prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY, .prot_l1 = PMD_TYPE_TABLE, .prot_sect = PMD_TYPE_SECT | PMD_SECT_AP_WRITE, -@@ -305,17 +329,30 @@ static struct mem_type mem_types[] = { +@@ -309,17 +333,30 @@ static struct mem_type mem_types[] = { .prot_sect = PMD_TYPE_SECT | PMD_SECT_AP_WRITE, .domain = DOMAIN_KERNEL, }, @@ -4479,7 +4988,7 @@ index b68c6b2..f66c492 100644 [MT_MEMORY_RW_DTCM] = { .prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY | L_PTE_XN, -@@ -323,9 +360,10 @@ static struct mem_type mem_types[] = { +@@ -327,9 +364,10 @@ static struct mem_type mem_types[] = { .prot_sect = PMD_TYPE_SECT | PMD_SECT_XN, .domain = DOMAIN_KERNEL, }, @@ -4492,7 +5001,7 @@ index b68c6b2..f66c492 100644 .domain = DOMAIN_KERNEL, }, [MT_MEMORY_RW_SO] = { -@@ -534,9 +572,14 @@ static void __init build_mem_type_table(void) +@@ -547,9 +585,14 @@ static void __init build_mem_type_table(void) * Mark cache clean areas and XIP ROM read only * from SVC mode and no access from userspace. */ @@ -4509,8 +5018,8 @@ index b68c6b2..f66c492 100644 + mem_types[MT_CACHECLEAN_RO].prot_sect |= PMD_SECT_APX|PMD_SECT_AP_WRITE; #endif - if (is_smp()) { -@@ -552,13 +595,17 @@ static void __init build_mem_type_table(void) + /* +@@ -566,13 +609,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; @@ -4532,7 +5041,7 @@ index b68c6b2..f66c492 100644 } } -@@ -569,15 +616,20 @@ static void __init build_mem_type_table(void) +@@ -583,15 +630,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 */ @@ -4556,7 +5065,7 @@ index b68c6b2..f66c492 100644 } #ifdef CONFIG_ARM_LPAE -@@ -593,6 +645,8 @@ static void __init build_mem_type_table(void) +@@ -607,6 +659,8 @@ static void __init build_mem_type_table(void) vecs_pgprot |= PTE_EXT_AF; #endif @@ -4565,7 +5074,7 @@ index b68c6b2..f66c492 100644 for (i = 0; i < 16; i++) { pteval_t v = pgprot_val(protection_map[i]); protection_map[i] = __pgprot(v | user_pgprot); -@@ -610,21 +664,24 @@ static void __init build_mem_type_table(void) +@@ -624,21 +678,24 @@ 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; @@ -4596,7 +5105,7 @@ index b68c6b2..f66c492 100644 break; } pr_info("Memory policy: %sData cache %s\n", -@@ -842,7 +899,7 @@ static void __init create_mapping(struct map_desc *md) +@@ -856,7 +913,7 @@ static void __init create_mapping(struct map_desc *md) return; } @@ -4605,7 +5114,7 @@ index b68c6b2..f66c492 100644 md->virtual >= PAGE_OFFSET && (md->virtual < VMALLOC_START || md->virtual >= VMALLOC_END)) { printk(KERN_WARNING "BUG: mapping for 0x%08llx" -@@ -1257,18 +1314,15 @@ void __init arm_mm_memblock_reserve(void) +@@ -1224,18 +1281,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. */ @@ -4628,7 +5137,7 @@ index b68c6b2..f66c492 100644 for (addr = VMALLOC_START; addr; addr += PMD_SIZE) pmd_clear(pmd_off_k(addr)); -@@ -1281,7 +1335,7 @@ static void __init devicemaps_init(const struct machine_desc *mdesc) +@@ -1248,7 +1302,7 @@ static void __init devicemaps_init(const struct machine_desc *mdesc) map.pfn = __phys_to_pfn(CONFIG_XIP_PHYS_ADDR & SECTION_MASK); map.virtual = MODULES_VADDR; map.length = ((unsigned long)_etext - map.virtual + ~SECTION_MASK) & SECTION_MASK; @@ -4637,7 +5146,7 @@ index b68c6b2..f66c492 100644 create_mapping(&map); #endif -@@ -1292,14 +1346,14 @@ static void __init devicemaps_init(const struct machine_desc *mdesc) +@@ -1259,14 +1313,14 @@ static void __init devicemaps_init(const struct machine_desc *mdesc) map.pfn = __phys_to_pfn(FLUSH_BASE_PHYS); map.virtual = FLUSH_BASE; map.length = SZ_1M; @@ -4654,7 +5163,7 @@ index b68c6b2..f66c492 100644 create_mapping(&map); #endif -@@ -1308,7 +1362,7 @@ static void __init devicemaps_init(const struct machine_desc *mdesc) +@@ -1275,7 +1329,7 @@ static void __init devicemaps_init(const struct machine_desc *mdesc) * location (0xffff0000). If we aren't using high-vectors, also * create a mapping at the low-vectors virtual address. */ @@ -4663,7 +5172,7 @@ index b68c6b2..f66c492 100644 map.virtual = 0xffff0000; map.length = PAGE_SIZE; #ifdef CONFIG_KUSER_HELPERS -@@ -1365,8 +1419,10 @@ static void __init kmap_init(void) +@@ -1335,8 +1389,10 @@ static void __init kmap_init(void) static void __init map_lowmem(void) { struct memblock_region *reg; @@ -4674,7 +5183,7 @@ index b68c6b2..f66c492 100644 /* Map all the lowmem memory banks. */ for_each_memblock(memory, reg) { -@@ -1379,11 +1435,48 @@ static void __init map_lowmem(void) +@@ -1349,11 +1405,48 @@ static void __init map_lowmem(void) if (start >= end) break; @@ -4724,7 +5233,7 @@ index b68c6b2..f66c492 100644 create_mapping(&map); } else { -@@ -1400,7 +1493,7 @@ static void __init map_lowmem(void) +@@ -1370,7 +1463,7 @@ static void __init map_lowmem(void) map.pfn = __phys_to_pfn(kernel_x_start); map.virtual = __phys_to_virt(kernel_x_start); map.length = kernel_x_end - kernel_x_start; @@ -4733,7 +5242,7 @@ index b68c6b2..f66c492 100644 create_mapping(&map); -@@ -1413,6 +1506,7 @@ static void __init map_lowmem(void) +@@ -1383,6 +1476,7 @@ static void __init map_lowmem(void) create_mapping(&map); } } @@ -4781,13 +5290,13 @@ index ce6d763..cfea917 100644 extern void *samsung_dmadev_get_ops(void); extern void *s3c_dma_get_ops(void); diff --git a/arch/arm64/include/asm/barrier.h b/arch/arm64/include/asm/barrier.h -index 66eb764..b529b84 100644 +index 6389d60..b5d3bdd 100644 --- a/arch/arm64/include/asm/barrier.h +++ b/arch/arm64/include/asm/barrier.h @@ -41,7 +41,7 @@ do { \ compiletime_assert_atomic_type(*p); \ - smp_mb(); \ + barrier(); \ - ACCESS_ONCE(*p) = (v); \ + ACCESS_ONCE_RW(*p) = (v); \ } while (0) @@ -4957,10 +5466,10 @@ index 7caf25d..ee65ac5 100644 #define __read_mostly __attribute__((__section__(".data..read_mostly"))) diff --git a/arch/frv/include/asm/atomic.h b/arch/frv/include/asm/atomic.h -index b86329d..6709906 100644 +index f6c3a16..cd422a4 100644 --- a/arch/frv/include/asm/atomic.h +++ b/arch/frv/include/asm/atomic.h -@@ -186,6 +186,16 @@ static inline void atomic64_dec(atomic64_t *v) +@@ -181,6 +181,16 @@ static inline void atomic64_dec(atomic64_t *v) #define atomic64_cmpxchg(v, old, new) (__cmpxchg_64(old, new, &(v)->counter)) #define atomic64_xchg(v, new) (__xchg_64(new, &(v)->counter)) @@ -5055,10 +5564,10 @@ index f4ca594..adc72fd6 100644 #define __cacheline_aligned __aligned(L1_CACHE_BYTES) #define ____cacheline_aligned __aligned(L1_CACHE_BYTES) diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig -index 12c3afe..b1abab2 100644 +index 2f3abcf..e63c7fa 100644 --- a/arch/ia64/Kconfig +++ b/arch/ia64/Kconfig -@@ -546,6 +546,7 @@ source "drivers/sn/Kconfig" +@@ -547,6 +547,7 @@ source "drivers/sn/Kconfig" config KEXEC bool "kexec system call" depends on !IA64_HP_SIM && (!SMP || HOTPLUG_CPU) @@ -5067,10 +5576,10 @@ index 12c3afe..b1abab2 100644 kexec is a system call that implements the ability to shutdown your current kernel, and to start another kernel. It is like a reboot diff --git a/arch/ia64/include/asm/atomic.h b/arch/ia64/include/asm/atomic.h -index 6e6fe18..a6ae668 100644 +index 0f8bf48..40ea950 100644 --- a/arch/ia64/include/asm/atomic.h +++ b/arch/ia64/include/asm/atomic.h -@@ -208,6 +208,16 @@ atomic64_add_negative (__s64 i, atomic64_t *v) +@@ -209,4 +209,14 @@ atomic64_add_negative (__s64 i, atomic64_t *v) #define atomic64_inc(v) atomic64_add(1, (v)) #define atomic64_dec(v) atomic64_sub(1, (v)) @@ -5084,14 +5593,12 @@ index 6e6fe18..a6ae668 100644 +#define atomic64_dec_unchecked(v) atomic64_dec(v) +#define atomic64_cmpxchg_unchecked(v, o, n) atomic64_cmpxchg((v), (o), (n)) + - /* Atomic operations are already serializing */ - #define smp_mb__before_atomic_dec() barrier() - #define smp_mb__after_atomic_dec() barrier() + #endif /* _ASM_IA64_ATOMIC_H */ diff --git a/arch/ia64/include/asm/barrier.h b/arch/ia64/include/asm/barrier.h -index d0a69aa..142f878 100644 +index a48957c..e097b56 100644 --- a/arch/ia64/include/asm/barrier.h +++ b/arch/ia64/include/asm/barrier.h -@@ -64,7 +64,7 @@ +@@ -67,7 +67,7 @@ do { \ compiletime_assert_atomic_type(*p); \ barrier(); \ @@ -5588,7 +6095,7 @@ index 0395c51..5f26031 100644 #define ARCH_DMA_MINALIGN L1_CACHE_BYTES diff --git a/arch/metag/include/asm/barrier.h b/arch/metag/include/asm/barrier.h -index 2d6f0de..de5f5ac 100644 +index c7591e8..ecef036 100644 --- a/arch/metag/include/asm/barrier.h +++ b/arch/metag/include/asm/barrier.h @@ -89,7 +89,7 @@ static inline void fence(void) @@ -5631,10 +6138,10 @@ index 4efe96a..60e8699 100644 #define SMP_CACHE_BYTES L1_CACHE_BYTES diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig -index 5cd695f..9a24ad0 100644 +index 4e238e6..7c9ed92 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig -@@ -2395,6 +2395,7 @@ source "kernel/Kconfig.preempt" +@@ -2392,6 +2392,7 @@ source "kernel/Kconfig.preempt" config KEXEC bool "Kexec system call" @@ -5656,7 +6163,7 @@ index 02f2444..506969c 100644 static dma_addr_t octeon_unity_phys_to_dma(struct device *dev, phys_addr_t paddr) diff --git a/arch/mips/include/asm/atomic.h b/arch/mips/include/asm/atomic.h -index e8eb3d5..2e665d1 100644 +index 37b2bef..02122b8 100644 --- a/arch/mips/include/asm/atomic.h +++ b/arch/mips/include/asm/atomic.h @@ -21,15 +21,39 @@ @@ -6563,7 +7070,7 @@ index e8eb3d5..2e665d1 100644 /* * atomic64_add_negative - add and test if negative diff --git a/arch/mips/include/asm/barrier.h b/arch/mips/include/asm/barrier.h -index e1aa4e4..670b68b 100644 +index d0101dd..266982c 100644 --- a/arch/mips/include/asm/barrier.h +++ b/arch/mips/include/asm/barrier.h @@ -184,7 +184,7 @@ @@ -6763,7 +7270,7 @@ index b336037..5b874cc 100644 /* diff --git a/arch/mips/include/asm/pgtable.h b/arch/mips/include/asm/pgtable.h -index 008324d..f67c239 100644 +index 539ddd1..8783f9a 100644 --- a/arch/mips/include/asm/pgtable.h +++ b/arch/mips/include/asm/pgtable.h @@ -20,6 +20,9 @@ @@ -6776,20 +7283,8 @@ index 008324d..f67c239 100644 struct mm_struct; struct vm_area_struct; -diff --git a/arch/mips/include/asm/smtc_proc.h b/arch/mips/include/asm/smtc_proc.h -index 25da651..ae2a259 100644 ---- a/arch/mips/include/asm/smtc_proc.h -+++ b/arch/mips/include/asm/smtc_proc.h -@@ -18,6 +18,6 @@ extern struct smtc_cpu_proc smtc_cpu_stats[NR_CPUS]; - - /* Count of number of recoveries of "stolen" FPU access rights on 34K */ - --extern atomic_t smtc_fpu_recoveries; -+extern atomic_unchecked_t smtc_fpu_recoveries; - - #endif /* __ASM_SMTC_PROC_H */ diff --git a/arch/mips/include/asm/thread_info.h b/arch/mips/include/asm/thread_info.h -index d2d961d..a674df0 100644 +index 7de8658..c109224 100644 --- a/arch/mips/include/asm/thread_info.h +++ b/arch/mips/include/asm/thread_info.h @@ -105,6 +105,9 @@ static inline struct thread_info *current_thread_info(void) @@ -6879,10 +7374,10 @@ index 7faf5f2..f3d3cf4 100644 /* diff --git a/arch/mips/kernel/i8259.c b/arch/mips/kernel/i8259.c -index 2b91fe8..fe4f6b4 100644 +index 50b3648..c2f3cec 100644 --- a/arch/mips/kernel/i8259.c +++ b/arch/mips/kernel/i8259.c -@@ -205,7 +205,7 @@ spurious_8259A_irq: +@@ -201,7 +201,7 @@ spurious_8259A_irq: printk(KERN_DEBUG "spurious 8259A interrupt: IRQ%d.\n", irq); spurious_irq_mask |= irqmask; } @@ -6905,10 +7400,10 @@ index 44a1f79..2bd6aa3 100644 void __init gt641xx_irq_init(void) diff --git a/arch/mips/kernel/irq.c b/arch/mips/kernel/irq.c -index d1fea7a..2e591b0 100644 +index d2bfbc2..a8eacd2 100644 --- a/arch/mips/kernel/irq.c +++ b/arch/mips/kernel/irq.c -@@ -77,17 +77,17 @@ void ack_bad_irq(unsigned int irq) +@@ -76,17 +76,17 @@ void ack_bad_irq(unsigned int irq) printk("unexpected IRQ # %d\n", irq); } @@ -6929,7 +7424,7 @@ index d1fea7a..2e591b0 100644 } void __init init_IRQ(void) -@@ -110,7 +110,10 @@ void __init init_IRQ(void) +@@ -109,7 +109,10 @@ void __init init_IRQ(void) #endif } @@ -6940,7 +7435,7 @@ index d1fea7a..2e591b0 100644 static inline void check_stack_overflow(void) { unsigned long sp; -@@ -126,6 +129,7 @@ static inline void check_stack_overflow(void) +@@ -125,6 +128,7 @@ static inline void check_stack_overflow(void) printk("do_IRQ: stack overflow: %ld\n", sp - sizeof(struct thread_info)); dump_stack(); @@ -6948,11 +7443,24 @@ index d1fea7a..2e591b0 100644 } } #else +diff --git a/arch/mips/kernel/pm-cps.c b/arch/mips/kernel/pm-cps.c +index c4c2069..bde8051 100644 +--- a/arch/mips/kernel/pm-cps.c ++++ b/arch/mips/kernel/pm-cps.c +@@ -168,7 +168,7 @@ int cps_pm_enter_state(enum cps_pm_state state) + nc_core_ready_count = nc_addr; + + /* Ensure ready_count is zero-initialised before the assembly runs */ +- ACCESS_ONCE(*nc_core_ready_count) = 0; ++ ACCESS_ONCE_RW(*nc_core_ready_count) = 0; + coupled_barrier(&per_cpu(pm_barrier, core), online); + + /* Run the generated entry code */ diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c -index 60e39dc..b4829bf 100644 +index 0a1ec0f..d9e93b6 100644 --- a/arch/mips/kernel/process.c +++ b/arch/mips/kernel/process.c -@@ -579,15 +579,3 @@ unsigned long get_wchan(struct task_struct *task) +@@ -572,15 +572,3 @@ unsigned long get_wchan(struct task_struct *task) out: return pc; } @@ -7027,55 +7535,11 @@ index 07fc524..b9d7f28 100644 pm_power_off(); + BUG(); } -diff --git a/arch/mips/kernel/smtc-proc.c b/arch/mips/kernel/smtc-proc.c -index 38635a9..3fcd5e0 100644 ---- a/arch/mips/kernel/smtc-proc.c -+++ b/arch/mips/kernel/smtc-proc.c -@@ -31,7 +31,7 @@ unsigned long selfipis[NR_CPUS]; - - struct smtc_cpu_proc smtc_cpu_stats[NR_CPUS]; - --atomic_t smtc_fpu_recoveries; -+atomic_unchecked_t smtc_fpu_recoveries; - - static int smtc_proc_show(struct seq_file *m, void *v) - { -@@ -48,7 +48,7 @@ static int smtc_proc_show(struct seq_file *m, void *v) - for(i = 0; i < NR_CPUS; i++) - seq_printf(m, "%d: %ld\n", i, smtc_cpu_stats[i].selfipis); - seq_printf(m, "%d Recoveries of \"stolen\" FPU\n", -- atomic_read(&smtc_fpu_recoveries)); -+ atomic_read_unchecked(&smtc_fpu_recoveries)); - return 0; - } - -@@ -73,7 +73,7 @@ void init_smtc_stats(void) - smtc_cpu_stats[i].selfipis = 0; - } - -- atomic_set(&smtc_fpu_recoveries, 0); -+ atomic_set_unchecked(&smtc_fpu_recoveries, 0); - - proc_create("smtc", 0444, NULL, &smtc_proc_fops); - } -diff --git a/arch/mips/kernel/smtc.c b/arch/mips/kernel/smtc.c -index c1681d6..9f881d1 100644 ---- a/arch/mips/kernel/smtc.c -+++ b/arch/mips/kernel/smtc.c -@@ -1359,7 +1359,7 @@ void smtc_soft_dump(void) - } - smtc_ipi_qdump(); - printk("%d Recoveries of \"stolen\" FPU\n", -- atomic_read(&smtc_fpu_recoveries)); -+ atomic_read_unchecked(&smtc_fpu_recoveries)); - } - - diff --git a/arch/mips/kernel/sync-r4k.c b/arch/mips/kernel/sync-r4k.c -index c24ad5f..9983ab2 100644 +index 2242bdd..b284048 100644 --- a/arch/mips/kernel/sync-r4k.c +++ b/arch/mips/kernel/sync-r4k.c -@@ -20,8 +20,8 @@ +@@ -18,8 +18,8 @@ #include static atomic_t count_start_flag = ATOMIC_INIT(0); @@ -7086,7 +7550,7 @@ index c24ad5f..9983ab2 100644 static atomic_t count_reference = ATOMIC_INIT(0); #define COUNTON 100 -@@ -68,13 +68,13 @@ void synchronise_count_master(int cpu) +@@ -58,13 +58,13 @@ void synchronise_count_master(int cpu) for (i = 0; i < NR_LOOPS; i++) { /* slaves loop on '!= 2' */ @@ -7103,7 +7567,7 @@ index c24ad5f..9983ab2 100644 /* * Everyone initialises count in the last loop: -@@ -85,11 +85,11 @@ void synchronise_count_master(int cpu) +@@ -75,11 +75,11 @@ void synchronise_count_master(int cpu) /* * Wait for all slaves to leave the synchronization point: */ @@ -7118,7 +7582,7 @@ index c24ad5f..9983ab2 100644 } /* Arrange for an interrupt in a short while */ write_c0_compare(read_c0_count() + COUNTON); -@@ -130,8 +130,8 @@ void synchronise_count_slave(int cpu) +@@ -112,8 +112,8 @@ void synchronise_count_slave(int cpu) initcount = atomic_read(&count_reference); for (i = 0; i < NR_LOOPS; i++) { @@ -7129,7 +7593,7 @@ index c24ad5f..9983ab2 100644 mb(); /* -@@ -140,8 +140,8 @@ void synchronise_count_slave(int cpu) +@@ -122,8 +122,8 @@ void synchronise_count_slave(int cpu) if (i == NR_LOOPS-1) write_c0_count(initcount); @@ -7141,10 +7605,10 @@ index c24ad5f..9983ab2 100644 } /* Arrange for an interrupt in a short while */ diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c -index 8119ac2..b229939 100644 +index 51706d6..ec1178c 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c -@@ -695,7 +695,18 @@ asmlinkage void do_ov(struct pt_regs *regs) +@@ -687,7 +687,18 @@ asmlinkage void do_ov(struct pt_regs *regs) siginfo_t info; prev_state = exception_enter(); @@ -7164,6 +7628,19 @@ index 8119ac2..b229939 100644 info.si_code = FPE_INTOVF; info.si_signo = SIGFPE; +diff --git a/arch/mips/kvm/kvm_mips.c b/arch/mips/kvm/kvm_mips.c +index f3c56a1..6a2f01c 100644 +--- a/arch/mips/kvm/kvm_mips.c ++++ b/arch/mips/kvm/kvm_mips.c +@@ -841,7 +841,7 @@ long kvm_arch_vm_ioctl(struct file *filp, unsigned int ioctl, unsigned long arg) + return r; + } + +-int kvm_arch_init(void *opaque) ++int kvm_arch_init(const void *opaque) + { + int ret; + diff --git a/arch/mips/mm/fault.c b/arch/mips/mm/fault.c index becc42b..9e43d4b 100644 --- a/arch/mips/mm/fault.c @@ -7498,10 +7975,10 @@ 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 472886c..00e7df9 100644 +index 0be2db2..1b0f26d 100644 --- a/arch/parisc/include/asm/atomic.h +++ b/arch/parisc/include/asm/atomic.h -@@ -252,6 +252,16 @@ static inline long atomic64_dec_if_positive(atomic64_t *v) +@@ -248,6 +248,16 @@ static inline long atomic64_dec_if_positive(atomic64_t *v) return dec; } @@ -7991,10 +8468,10 @@ index 3ca9c11..d163ef7 100644 /* * If for any reason at all we couldn't handle the fault, make diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig -index c95c4b8..d831f81 100644 +index 80b94b0..a3274fb 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig -@@ -397,6 +397,7 @@ config PPC64_SUPPORTS_MEMORY_FAILURE +@@ -398,6 +398,7 @@ config PPC64_SUPPORTS_MEMORY_FAILURE config KEXEC bool "kexec system call" depends on (PPC_BOOK3S || FSL_BOOKE || (44x && !SMP)) @@ -8003,10 +8480,10 @@ index c95c4b8..d831f81 100644 kexec is a system call that implements the ability to shutdown your current kernel, and to start another kernel. It is like a reboot diff --git a/arch/powerpc/include/asm/atomic.h b/arch/powerpc/include/asm/atomic.h -index e3b1d41..8e81edf 100644 +index 28992d0..c797b20 100644 --- a/arch/powerpc/include/asm/atomic.h +++ b/arch/powerpc/include/asm/atomic.h -@@ -523,6 +523,16 @@ static __inline__ long atomic64_inc_not_zero(atomic64_t *v) +@@ -519,6 +519,16 @@ static __inline__ long atomic64_inc_not_zero(atomic64_t *v) return t1; } @@ -8024,7 +8501,7 @@ index e3b1d41..8e81edf 100644 #endif /* __KERNEL__ */ diff --git a/arch/powerpc/include/asm/barrier.h b/arch/powerpc/include/asm/barrier.h -index f89da80..7f5b05a 100644 +index bab79a1..4a3eabc 100644 --- a/arch/powerpc/include/asm/barrier.h +++ b/arch/powerpc/include/asm/barrier.h @@ -73,7 +73,7 @@ @@ -8058,7 +8535,7 @@ index ed0afc1..0332825 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 935b5e7..7001d2d 100644 +index 888d8f3..66f581c 100644 --- a/arch/powerpc/include/asm/elf.h +++ b/arch/powerpc/include/asm/elf.h @@ -28,8 +28,19 @@ @@ -8083,7 +8560,7 @@ index 935b5e7..7001d2d 100644 #define ELF_CORE_EFLAGS (is_elf2_task() ? 2 : 0) -@@ -127,10 +138,6 @@ extern int arch_setup_additional_pages(struct linux_binprm *bprm, +@@ -129,10 +140,6 @@ extern int arch_setup_additional_pages(struct linux_binprm *bprm, (0x7ff >> (PAGE_SHIFT - 12)) : \ (0x3ffff >> (PAGE_SHIFT - 12))) @@ -8272,7 +8749,7 @@ index 4b0be20..c15a27d 100644 static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd, pte_t *pte) diff --git a/arch/powerpc/include/asm/pgtable.h b/arch/powerpc/include/asm/pgtable.h -index 3ebb188..e17dddf 100644 +index d98c1ec..9f61569 100644 --- a/arch/powerpc/include/asm/pgtable.h +++ b/arch/powerpc/include/asm/pgtable.h @@ -2,6 +2,7 @@ @@ -8296,10 +8773,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 e5d2e0b..9ac74b1 100644 +index bffd89d..a6641ed 100644 --- a/arch/powerpc/include/asm/reg.h +++ b/arch/powerpc/include/asm/reg.h -@@ -249,6 +249,7 @@ +@@ -251,6 +251,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 */ @@ -8308,7 +8785,7 @@ index e5d2e0b..9ac74b1 100644 #define DSISR_ISSTORE 0x02000000 /* access was a store */ #define DSISR_DABRMATCH 0x00400000 /* hit data breakpoint */ diff --git a/arch/powerpc/include/asm/smp.h b/arch/powerpc/include/asm/smp.h -index ff51046..b982dd4 100644 +index 5a6614a..d89995d1 100644 --- a/arch/powerpc/include/asm/smp.h +++ b/arch/powerpc/include/asm/smp.h @@ -51,7 +51,7 @@ struct smp_ops_t { @@ -8526,10 +9003,10 @@ index 9485b43..3bd3c16 100644 static inline unsigned long clear_user(void __user *addr, unsigned long size) diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile -index fcc9a89..07be2bb 100644 +index 670c312..60c2b52 100644 --- a/arch/powerpc/kernel/Makefile +++ b/arch/powerpc/kernel/Makefile -@@ -26,6 +26,8 @@ CFLAGS_REMOVE_ftrace.o = -pg -mno-sched-epilog +@@ -27,6 +27,8 @@ CFLAGS_REMOVE_ftrace.o = -pg -mno-sched-epilog CFLAGS_REMOVE_time.o = -pg -mno-sched-epilog endif @@ -8539,45 +9016,45 @@ index fcc9a89..07be2bb 100644 irq.o align.o signal_32.o pmc.o vdso.o \ process.o systbl.o idle.o \ diff --git a/arch/powerpc/kernel/exceptions-64e.S b/arch/powerpc/kernel/exceptions-64e.S -index c1bee3c..5b42583 100644 +index bb9cac6..5181202 100644 --- a/arch/powerpc/kernel/exceptions-64e.S +++ b/arch/powerpc/kernel/exceptions-64e.S @@ -1010,6 +1010,7 @@ storage_fault_common: std r14,_DAR(r1) std r15,_DSISR(r1) addi r3,r1,STACK_FRAME_OVERHEAD -+ bl .save_nvgprs ++ bl save_nvgprs mr r4,r14 mr r5,r15 ld r14,PACA_EXGEN+EX_R14(r13) @@ -1018,8 +1019,7 @@ storage_fault_common: cmpdi r3,0 bne- 1f - b .ret_from_except_lite --1: bl .save_nvgprs + b ret_from_except_lite +-1: bl save_nvgprs - mr r5,r3 +1: mr r5,r3 addi r3,r1,STACK_FRAME_OVERHEAD ld r4,_DAR(r1) - bl .bad_page_fault + bl bad_page_fault diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S -index 3afd391..18f9e36 100644 +index a7d36b1..53af150 100644 --- a/arch/powerpc/kernel/exceptions-64s.S +++ b/arch/powerpc/kernel/exceptions-64s.S -@@ -1587,10 +1587,10 @@ handle_page_fault: +@@ -1637,10 +1637,10 @@ handle_page_fault: 11: ld r4,_DAR(r1) ld r5,_DSISR(r1) addi r3,r1,STACK_FRAME_OVERHEAD -+ bl .save_nvgprs - bl .do_page_fault ++ bl save_nvgprs + bl do_page_fault cmpdi r3,0 beq+ 12f -- bl .save_nvgprs +- bl save_nvgprs mr r5,r3 addi r3,r1,STACK_FRAME_OVERHEAD lwz r4,_DAR(r1) diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c -index ca1cd74..6f0241a 100644 +index 248ee7e..1eb60dd 100644 --- a/arch/powerpc/kernel/irq.c +++ b/arch/powerpc/kernel/irq.c @@ -447,6 +447,8 @@ void migrate_irqs(void) @@ -8640,10 +9117,10 @@ index 6cff040..74ac5d1b 100644 sechdrs, module); #endif diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c -index 31d0215..206af70 100644 +index be99774..9879c82 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c -@@ -1031,8 +1031,8 @@ void show_regs(struct pt_regs * regs) +@@ -1039,8 +1039,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 */ @@ -8775,10 +9252,10 @@ index 2e3d2bf..35df241 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 4e47db6..6dcc96e 100644 +index 1bc5a17..910d3f3 100644 --- a/arch/powerpc/kernel/signal_32.c +++ b/arch/powerpc/kernel/signal_32.c -@@ -1013,7 +1013,7 @@ int handle_rt_signal32(unsigned long sig, struct k_sigaction *ka, +@@ -1012,7 +1012,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; @@ -8788,10 +9265,10 @@ index 4e47db6..6dcc96e 100644 tramp = current->mm->context.vdso_base + vdso32_rt_sigtramp; } else { diff --git a/arch/powerpc/kernel/signal_64.c b/arch/powerpc/kernel/signal_64.c -index d501dc4..e5a0de0 100644 +index 97c1e4b..f427f81 100644 --- a/arch/powerpc/kernel/signal_64.c +++ b/arch/powerpc/kernel/signal_64.c -@@ -760,7 +760,7 @@ int handle_rt_signal64(int signr, struct k_sigaction *ka, siginfo_t *info, +@@ -755,7 +755,7 @@ int handle_rt_signal64(int signr, struct k_sigaction *ka, siginfo_t *info, current->thread.fp_state.fpscr = 0; /* Set up to return from userspace. */ @@ -8801,7 +9278,7 @@ index d501dc4..e5a0de0 100644 } else { err |= setup_trampoline(__NR_rt_sigreturn, &frame->tramp[0]); diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c -index 1bd7ca2..9b78c2f 100644 +index 239f1cd..5359f76 100644 --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c @@ -142,6 +142,8 @@ static unsigned __kprobes long oops_begin(struct pt_regs *regs) @@ -8854,10 +9331,10 @@ index ce74c33..0803371 100644 rc = vdso_base; goto fail_mmapsem; diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c -index 3cf541a..ab2d825 100644 +index 61c738a..b1092d6 100644 --- a/arch/powerpc/kvm/powerpc.c +++ b/arch/powerpc/kvm/powerpc.c -@@ -1153,7 +1153,7 @@ void kvmppc_init_lpid(unsigned long nr_lpids_param) +@@ -1195,7 +1195,7 @@ void kvmppc_init_lpid(unsigned long nr_lpids_param) } EXPORT_SYMBOL_GPL(kvmppc_init_lpid); @@ -9132,10 +9609,10 @@ index 9098692..3d54cd1 100644 struct spu_context *ctx = vma->vm_file->private_data; unsigned long offset = address - vma->vm_start; diff --git a/arch/s390/include/asm/atomic.h b/arch/s390/include/asm/atomic.h -index 1d47061..0714963 100644 +index fa934fe..c296056 100644 --- a/arch/s390/include/asm/atomic.h +++ b/arch/s390/include/asm/atomic.h -@@ -412,6 +412,16 @@ static inline long long atomic64_dec_if_positive(atomic64_t *v) +@@ -412,4 +412,14 @@ static inline long long atomic64_dec_if_positive(atomic64_t *v) #define atomic64_dec_and_test(_v) (atomic64_sub_return(1, _v) == 0) #define atomic64_inc_not_zero(v) atomic64_add_unless((v), 1, 0) @@ -9149,14 +9626,12 @@ index 1d47061..0714963 100644 +#define atomic64_dec_unchecked(v) atomic64_dec(v) +#define atomic64_cmpxchg_unchecked(v, o, n) atomic64_cmpxchg((v), (o), (n)) + - #define smp_mb__before_atomic_dec() smp_mb() - #define smp_mb__after_atomic_dec() smp_mb() - #define smp_mb__before_atomic_inc() smp_mb() + #endif /* __ARCH_S390_ATOMIC__ */ diff --git a/arch/s390/include/asm/barrier.h b/arch/s390/include/asm/barrier.h -index 578680f..0eb3b11 100644 +index 19ff956..8d39cb1 100644 --- a/arch/s390/include/asm/barrier.h +++ b/arch/s390/include/asm/barrier.h -@@ -36,7 +36,7 @@ +@@ -37,7 +37,7 @@ do { \ compiletime_assert_atomic_type(*p); \ barrier(); \ @@ -9225,7 +9700,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 1be64a1..086839d1 100644 +index cd4c68e..6764641 100644 --- a/arch/s390/include/asm/uaccess.h +++ b/arch/s390/include/asm/uaccess.h @@ -59,6 +59,7 @@ static inline int __range_ok(unsigned long addr, unsigned long size) @@ -9236,7 +9711,7 @@ index 1be64a1..086839d1 100644 #define access_ok(type, addr, size) __access_ok(addr, size) /* -@@ -245,6 +246,10 @@ static inline unsigned long __must_check +@@ -275,6 +276,10 @@ static inline unsigned long __must_check copy_to_user(void __user *to, const void *from, unsigned long n) { might_fault(); @@ -9247,7 +9722,7 @@ index 1be64a1..086839d1 100644 return __copy_to_user(to, from, n); } -@@ -273,10 +278,14 @@ __compiletime_warning("copy_from_user() buffer size is not provably correct") +@@ -303,10 +308,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) { @@ -9340,7 +9815,7 @@ index b89b591..fd9609d 100644 if (r_type == R_390_GOTPC) rc = apply_rela_bits(loc, val, 1, 32, 0); diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c -index dd14532..1dfc145 100644 +index 93b9ca4..4ea1454 100644 --- a/arch/s390/kernel/process.c +++ b/arch/s390/kernel/process.c @@ -242,37 +242,3 @@ unsigned long get_wchan(struct task_struct *p) @@ -9569,10 +10044,10 @@ index 6777177..cb5e44f 100644 addr = vm_unmapped_area(&info); } diff --git a/arch/sparc/include/asm/atomic_64.h b/arch/sparc/include/asm/atomic_64.h -index be56a24..443328f 100644 +index bb894c8..8141d5c 100644 --- a/arch/sparc/include/asm/atomic_64.h +++ b/arch/sparc/include/asm/atomic_64.h -@@ -14,18 +14,40 @@ +@@ -15,18 +15,40 @@ #define ATOMIC64_INIT(i) { (i) } #define atomic_read(v) (*(volatile int *)&(v)->counter) @@ -9597,23 +10072,23 @@ index be56a24..443328f 100644 + v->counter = i; +} - extern void atomic_add(int, atomic_t *); -+extern void atomic_add_unchecked(int, atomic_unchecked_t *); - extern void atomic64_add(long, atomic64_t *); -+extern void atomic64_add_unchecked(long, atomic64_unchecked_t *); - extern void atomic_sub(int, atomic_t *); -+extern void atomic_sub_unchecked(int, atomic_unchecked_t *); - extern void atomic64_sub(long, atomic64_t *); -+extern void atomic64_sub_unchecked(long, atomic64_unchecked_t *); + void atomic_add(int, atomic_t *); ++void atomic_add_unchecked(int, atomic_unchecked_t *); + void atomic64_add(long, atomic64_t *); ++void atomic64_add_unchecked(long, atomic64_unchecked_t *); + void atomic_sub(int, atomic_t *); ++void atomic_sub_unchecked(int, atomic_unchecked_t *); + void atomic64_sub(long, atomic64_t *); ++void atomic64_sub_unchecked(long, atomic64_unchecked_t *); - extern int atomic_add_ret(int, atomic_t *); -+extern int atomic_add_ret_unchecked(int, atomic_unchecked_t *); - extern long atomic64_add_ret(long, atomic64_t *); -+extern long atomic64_add_ret_unchecked(long, atomic64_unchecked_t *); - extern int atomic_sub_ret(int, atomic_t *); - extern long atomic64_sub_ret(long, atomic64_t *); + int atomic_add_ret(int, atomic_t *); ++int atomic_add_ret_unchecked(int, atomic_unchecked_t *); + long atomic64_add_ret(long, atomic64_t *); ++long atomic64_add_ret_unchecked(long, atomic64_unchecked_t *); + int atomic_sub_ret(int, atomic_t *); + long atomic64_sub_ret(long, atomic64_t *); -@@ -33,13 +55,29 @@ extern long atomic64_sub_ret(long, atomic64_t *); +@@ -34,13 +56,29 @@ long atomic64_sub_ret(long, atomic64_t *); #define atomic64_dec_return(v) atomic64_sub_ret(1, v) #define atomic_inc_return(v) atomic_add_ret(1, v) @@ -9643,7 +10118,7 @@ index be56a24..443328f 100644 /* * atomic_inc_and_test - increment and test -@@ -50,6 +88,10 @@ extern long atomic64_sub_ret(long, atomic64_t *); +@@ -51,6 +89,10 @@ long atomic64_sub_ret(long, atomic64_t *); * other cases. */ #define atomic_inc_and_test(v) (atomic_inc_return(v) == 0) @@ -9654,7 +10129,7 @@ index be56a24..443328f 100644 #define atomic64_inc_and_test(v) (atomic64_inc_return(v) == 0) #define atomic_sub_and_test(i, v) (atomic_sub_ret(i, v) == 0) -@@ -59,25 +101,60 @@ extern long atomic64_sub_ret(long, atomic64_t *); +@@ -60,25 +102,60 @@ long atomic64_sub_ret(long, atomic64_t *); #define atomic64_dec_and_test(v) (atomic64_sub_ret(1, v) == 0) #define atomic_inc(v) atomic_add(1, v) @@ -9718,7 +10193,7 @@ index be56a24..443328f 100644 if (likely(old == c)) break; c = old; -@@ -88,20 +165,35 @@ static inline int __atomic_add_unless(atomic_t *v, int a, int u) +@@ -89,20 +166,35 @@ static inline int __atomic_add_unless(atomic_t *v, int a, int u) #define atomic64_cmpxchg(v, o, n) \ ((__typeof__((v)->counter))cmpxchg(&((v)->counter), (o), (n))) #define atomic64_xchg(v, new) (xchg(&((v)->counter), new)) @@ -9759,7 +10234,7 @@ index be56a24..443328f 100644 #define atomic64_inc_not_zero(v) atomic64_add_unless((v), 1, 0) diff --git a/arch/sparc/include/asm/barrier_64.h b/arch/sparc/include/asm/barrier_64.h -index b5aad96..99d7465 100644 +index 305dcc3..7835030 100644 --- a/arch/sparc/include/asm/barrier_64.h +++ b/arch/sparc/include/asm/barrier_64.h @@ -57,7 +57,7 @@ do { __asm__ __volatile__("ba,pt %%xcc, 1f\n\t" \ @@ -9826,10 +10301,10 @@ index 370ca1e..d4f4a98 100644 #define ELF_HWCAP sparc64_elf_hwcap diff --git a/arch/sparc/include/asm/pgalloc_32.h b/arch/sparc/include/asm/pgalloc_32.h -index 9b1c36d..209298b 100644 +index a3890da..f6a408e 100644 --- a/arch/sparc/include/asm/pgalloc_32.h +++ b/arch/sparc/include/asm/pgalloc_32.h -@@ -33,6 +33,7 @@ static inline void pgd_set(pgd_t * pgdp, pmd_t * pmdp) +@@ -35,6 +35,7 @@ static inline void pgd_set(pgd_t * pgdp, pmd_t * pmdp) } #define pgd_populate(MM, PGD, PMD) pgd_set(PGD, PMD) @@ -9838,7 +10313,7 @@ index 9b1c36d..209298b 100644 static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long address) diff --git a/arch/sparc/include/asm/pgalloc_64.h b/arch/sparc/include/asm/pgalloc_64.h -index bcfe063..b333142 100644 +index 39a7ac4..2c9b586 100644 --- a/arch/sparc/include/asm/pgalloc_64.h +++ b/arch/sparc/include/asm/pgalloc_64.h @@ -26,6 +26,7 @@ static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd) @@ -9863,10 +10338,10 @@ index 59ba6f6..4518128 100644 + #endif diff --git a/arch/sparc/include/asm/pgtable_32.h b/arch/sparc/include/asm/pgtable_32.h -index 502f632..da1917f 100644 +index b9b91ae..950b91e 100644 --- a/arch/sparc/include/asm/pgtable_32.h +++ b/arch/sparc/include/asm/pgtable_32.h -@@ -50,6 +50,9 @@ extern unsigned long calc_highpages(void); +@@ -51,6 +51,9 @@ unsigned long __init bootmem_init(unsigned long *pages_avail); #define PAGE_SHARED SRMMU_PAGE_SHARED #define PAGE_COPY SRMMU_PAGE_COPY #define PAGE_READONLY SRMMU_PAGE_RDONLY @@ -9876,7 +10351,7 @@ index 502f632..da1917f 100644 #define PAGE_KERNEL SRMMU_PAGE_KERNEL /* Top-level page directory - dummy used by init-mm. -@@ -62,18 +65,18 @@ extern unsigned long ptr_in_current_pgd; +@@ -63,18 +66,18 @@ extern unsigned long ptr_in_current_pgd; /* xwr */ #define __P000 PAGE_NONE @@ -9917,6 +10392,21 @@ index 79da178..c2eede8 100644 #define SRMMU_PAGE_KERNEL __pgprot(SRMMU_VALID | SRMMU_CACHE | SRMMU_PRIV | \ SRMMU_DIRTY | SRMMU_REF) +diff --git a/arch/sparc/include/asm/setup.h b/arch/sparc/include/asm/setup.h +index f5fffd8..a0669f0 100644 +--- a/arch/sparc/include/asm/setup.h ++++ b/arch/sparc/include/asm/setup.h +@@ -53,8 +53,8 @@ int handle_ldf_stq(u32 insn, struct pt_regs *regs); + void handle_ld_nf(u32 insn, struct pt_regs *regs); + + /* init_64.c */ +-extern atomic_t dcpage_flushes; +-extern atomic_t dcpage_flushes_xcall; ++extern atomic_unchecked_t dcpage_flushes; ++extern atomic_unchecked_t dcpage_flushes_xcall; + + extern int sysctl_tsb_ratio; + #endif diff --git a/arch/sparc/include/asm/spinlock_64.h b/arch/sparc/include/asm/spinlock_64.h index 9689176..63c18ea 100644 --- a/arch/sparc/include/asm/spinlock_64.h @@ -10079,7 +10569,7 @@ index a5f01ac..703b554 100644 * Thread-synchronous status. * diff --git a/arch/sparc/include/asm/uaccess.h b/arch/sparc/include/asm/uaccess.h -index 0167d26..767bb0c 100644 +index bd56c28..4b63d83 100644 --- a/arch/sparc/include/asm/uaccess.h +++ b/arch/sparc/include/asm/uaccess.h @@ -1,5 +1,6 @@ @@ -10090,10 +10580,10 @@ index 0167d26..767bb0c 100644 #include #else diff --git a/arch/sparc/include/asm/uaccess_32.h b/arch/sparc/include/asm/uaccess_32.h -index 53a28dd..50c38c3 100644 +index 9634d08..f55fe4f 100644 --- a/arch/sparc/include/asm/uaccess_32.h +++ b/arch/sparc/include/asm/uaccess_32.h -@@ -250,27 +250,46 @@ extern unsigned long __copy_user(void __user *to, const void __user *from, unsig +@@ -250,27 +250,46 @@ unsigned long __copy_user(void __user *to, const void __user *from, unsigned lon static inline unsigned long copy_to_user(void __user *to, const void *from, unsigned long n) { @@ -10145,7 +10635,7 @@ index 53a28dd..50c38c3 100644 } diff --git a/arch/sparc/include/asm/uaccess_64.h b/arch/sparc/include/asm/uaccess_64.h -index ad7e178..c9e7423 100644 +index c990a5e..f17b9c1 100644 --- a/arch/sparc/include/asm/uaccess_64.h +++ b/arch/sparc/include/asm/uaccess_64.h @@ -10,6 +10,7 @@ @@ -10156,7 +10646,7 @@ index ad7e178..c9e7423 100644 #include #include #include -@@ -214,8 +215,15 @@ extern unsigned long copy_from_user_fixup(void *to, const void __user *from, +@@ -214,8 +215,15 @@ unsigned long copy_from_user_fixup(void *to, const void __user *from, static inline unsigned long __must_check copy_from_user(void *to, const void __user *from, unsigned long size) { @@ -10173,7 +10663,7 @@ index ad7e178..c9e7423 100644 if (unlikely(ret)) ret = copy_from_user_fixup(to, from, size); -@@ -231,8 +239,15 @@ extern unsigned long copy_to_user_fixup(void __user *to, const void *from, +@@ -231,8 +239,15 @@ unsigned long copy_to_user_fixup(void __user *to, const void *from, static inline unsigned long __must_check copy_to_user(void __user *to, const void *from, unsigned long size) { @@ -10191,7 +10681,7 @@ index ad7e178..c9e7423 100644 ret = copy_to_user_fixup(to, from, size); return ret; diff --git a/arch/sparc/kernel/Makefile b/arch/sparc/kernel/Makefile -index d15cc17..d0ae796 100644 +index 7cf9c6e..6206648 100644 --- a/arch/sparc/kernel/Makefile +++ b/arch/sparc/kernel/Makefile @@ -4,7 +4,7 @@ @@ -10204,10 +10694,10 @@ index d15cc17..d0ae796 100644 extra-y := head_$(BITS).o diff --git a/arch/sparc/kernel/process_32.c b/arch/sparc/kernel/process_32.c -index 510baec..9ff2607 100644 +index 50e7b62..79fae35 100644 --- a/arch/sparc/kernel/process_32.c +++ b/arch/sparc/kernel/process_32.c -@@ -115,14 +115,14 @@ void show_regs(struct pt_regs *r) +@@ -123,14 +123,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()); @@ -10224,7 +10714,7 @@ index 510baec..9ff2607 100644 printk("%%L: %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n", rw->locals[0], rw->locals[1], rw->locals[2], rw->locals[3], -@@ -159,7 +159,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); @@ -10234,7 +10724,7 @@ index 510baec..9ff2607 100644 } while (++count < 16); printk("\n"); diff --git a/arch/sparc/kernel/process_64.c b/arch/sparc/kernel/process_64.c -index d7b4967..2edf827 100644 +index 027e099..6d4178f 100644 --- a/arch/sparc/kernel/process_64.c +++ b/arch/sparc/kernel/process_64.c @@ -161,7 +161,7 @@ static void show_regwindow(struct pt_regs *regs) @@ -10264,7 +10754,7 @@ index d7b4967..2edf827 100644 show_regwindow(regs); show_stack(current, (unsigned long *) regs->u_regs[UREG_FP]); } -@@ -272,7 +272,7 @@ void arch_trigger_all_cpu_backtrace(void) +@@ -278,7 +278,7 @@ void arch_trigger_all_cpu_backtrace(bool include_self) ((tp && tp->task) ? tp->task->pid : -1)); if (gp->tstate & TSTATE_PRIV) { @@ -10326,21 +10816,10 @@ index c13c9f2..d572c34 100644 if (unlikely(test_thread_flag(TIF_SYSCALL_TRACEPOINT))) diff --git a/arch/sparc/kernel/smp_64.c b/arch/sparc/kernel/smp_64.c -index 745a363..b5566b1 100644 +index 41aa247..eadfb74 100644 --- a/arch/sparc/kernel/smp_64.c +++ b/arch/sparc/kernel/smp_64.c -@@ -868,8 +868,8 @@ extern unsigned long xcall_flush_dcache_page_cheetah; - extern unsigned long xcall_flush_dcache_page_spitfire; - - #ifdef CONFIG_DEBUG_DCFLUSH --extern atomic_t dcpage_flushes; --extern atomic_t dcpage_flushes_xcall; -+extern atomic_unchecked_t dcpage_flushes; -+extern atomic_unchecked_t dcpage_flushes_xcall; - #endif - - static inline void __local_flush_dcache_page(struct page *page) -@@ -893,7 +893,7 @@ void smp_flush_dcache_page_impl(struct page *page, int cpu) +@@ -883,7 +883,7 @@ void smp_flush_dcache_page_impl(struct page *page, int cpu) return; #ifdef CONFIG_DEBUG_DCFLUSH @@ -10349,7 +10828,7 @@ index 745a363..b5566b1 100644 #endif this_cpu = get_cpu(); -@@ -917,7 +917,7 @@ void smp_flush_dcache_page_impl(struct page *page, int cpu) +@@ -907,7 +907,7 @@ void smp_flush_dcache_page_impl(struct page *page, int cpu) xcall_deliver(data0, __pa(pg_addr), (u64) pg_addr, cpumask_of(cpu)); #ifdef CONFIG_DEBUG_DCFLUSH @@ -10358,7 +10837,7 @@ index 745a363..b5566b1 100644 #endif } } -@@ -936,7 +936,7 @@ void flush_dcache_page_all(struct mm_struct *mm, struct page *page) +@@ -926,7 +926,7 @@ void flush_dcache_page_all(struct mm_struct *mm, struct page *page) preempt_disable(); #ifdef CONFIG_DEBUG_DCFLUSH @@ -10367,7 +10846,7 @@ index 745a363..b5566b1 100644 #endif data0 = 0; pg_addr = page_address(page); -@@ -953,7 +953,7 @@ void flush_dcache_page_all(struct mm_struct *mm, struct page *page) +@@ -943,7 +943,7 @@ void flush_dcache_page_all(struct mm_struct *mm, struct page *page) xcall_deliver(data0, __pa(pg_addr), (u64) pg_addr, cpu_online_mask); #ifdef CONFIG_DEBUG_DCFLUSH @@ -10377,10 +10856,10 @@ index 745a363..b5566b1 100644 } __local_flush_dcache_page(page); diff --git a/arch/sparc/kernel/sys_sparc_32.c b/arch/sparc/kernel/sys_sparc_32.c -index 3a8d184..49498a8 100644 +index 646988d..b88905f 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 +@@ -54,7 +54,7 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsi if (len > TASK_SIZE - PAGE_SIZE) return -ENOMEM; if (!addr) @@ -10390,10 +10869,10 @@ index 3a8d184..49498a8 100644 info.flags = 0; info.length = len; diff --git a/arch/sparc/kernel/sys_sparc_64.c b/arch/sparc/kernel/sys_sparc_64.c -index beb0b5a..5a153f7 100644 +index c85403d..6af95c9 100644 --- a/arch/sparc/kernel/sys_sparc_64.c +++ b/arch/sparc/kernel/sys_sparc_64.c -@@ -88,13 +88,14 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsi +@@ -89,13 +89,14 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsi struct vm_area_struct * vma; unsigned long task_size = TASK_SIZE; int do_color_align; @@ -10409,7 +10888,7 @@ index beb0b5a..5a153f7 100644 ((addr - (pgoff << PAGE_SHIFT)) & (SHMLBA - 1))) return -EINVAL; return addr; -@@ -109,6 +110,10 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsi +@@ -110,6 +111,10 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsi if (filp || (flags & MAP_SHARED)) do_color_align = 1; @@ -10420,7 +10899,7 @@ index beb0b5a..5a153f7 100644 if (addr) { if (do_color_align) addr = COLOR_ALIGN(addr, pgoff); -@@ -116,22 +121,28 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsi +@@ -117,22 +122,28 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsi addr = PAGE_ALIGN(addr); vma = find_vma(mm, addr); @@ -10452,7 +10931,7 @@ index beb0b5a..5a153f7 100644 info.high_limit = task_size; addr = vm_unmapped_area(&info); } -@@ -149,6 +160,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, +@@ -150,6 +161,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; @@ -10460,7 +10939,7 @@ index beb0b5a..5a153f7 100644 struct vm_unmapped_area_info info; /* This should only ever run for 32-bit processes. */ -@@ -158,7 +170,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, +@@ -159,7 +171,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. */ @@ -10469,7 +10948,7 @@ index beb0b5a..5a153f7 100644 ((addr - (pgoff << PAGE_SHIFT)) & (SHMLBA - 1))) return -EINVAL; return addr; -@@ -171,6 +183,10 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, +@@ -172,6 +184,10 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, if (filp || (flags & MAP_SHARED)) do_color_align = 1; @@ -10480,7 +10959,7 @@ index beb0b5a..5a153f7 100644 /* requesting a specific address */ if (addr) { if (do_color_align) -@@ -179,8 +195,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, +@@ -180,8 +196,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, addr = PAGE_ALIGN(addr); vma = find_vma(mm, addr); @@ -10490,7 +10969,7 @@ index beb0b5a..5a153f7 100644 return addr; } -@@ -190,6 +205,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, +@@ -191,6 +206,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; @@ -10498,7 +10977,7 @@ index beb0b5a..5a153f7 100644 addr = vm_unmapped_area(&info); /* -@@ -202,6 +218,12 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, +@@ -203,6 +219,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; @@ -10511,7 +10990,7 @@ index beb0b5a..5a153f7 100644 info.high_limit = STACK_TOP32; addr = vm_unmapped_area(&info); } -@@ -258,10 +280,14 @@ unsigned long get_fb_unmapped_area(struct file *filp, unsigned long orig_addr, u +@@ -259,10 +281,14 @@ unsigned long get_fb_unmapped_area(struct file *filp, unsigned long orig_addr, u EXPORT_SYMBOL(get_fb_unmapped_area); /* Essentially the same as PowerPC. */ @@ -10527,7 +11006,7 @@ index beb0b5a..5a153f7 100644 if (current->flags & PF_RANDOMIZE) { unsigned long val = get_random_int(); if (test_thread_flag(TIF_32BIT)) -@@ -274,7 +300,7 @@ static unsigned long mmap_rnd(void) +@@ -275,7 +301,7 @@ static unsigned long mmap_rnd(void) void arch_pick_mmap_layout(struct mm_struct *mm) { @@ -10536,7 +11015,7 @@ index beb0b5a..5a153f7 100644 unsigned long gap; /* -@@ -287,6 +313,12 @@ void arch_pick_mmap_layout(struct mm_struct *mm) +@@ -288,6 +314,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; @@ -10549,7 +11028,7 @@ index beb0b5a..5a153f7 100644 mm->get_unmapped_area = arch_get_unmapped_area; } else { /* We know it's 32-bit */ -@@ -298,6 +330,12 @@ void arch_pick_mmap_layout(struct mm_struct *mm) +@@ -299,6 +331,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); @@ -10603,7 +11082,7 @@ index 33a17e7..d87fb1f 100644 2: diff --git a/arch/sparc/kernel/traps_32.c b/arch/sparc/kernel/traps_32.c -index 6629829..036032d 100644 +index 6fd386c5..6907d81 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) @@ -10612,10 +11091,10 @@ index 6629829..036032d 100644 +extern void gr_handle_kernel_exploit(void); + - void die_if_kernel(char *str, struct pt_regs *regs) + void __noreturn die_if_kernel(char *str, struct pt_regs *regs) { static int die_counter; -@@ -76,15 +78,17 @@ void die_if_kernel(char *str, struct pt_regs *regs) +@@ -76,15 +78,17 @@ void __noreturn die_if_kernel(char *str, struct pt_regs *regs) count++ < 30 && (((unsigned long) rw) >= PAGE_OFFSET) && !(((unsigned long) rw) & 0x7)) { @@ -10636,10 +11115,10 @@ index 6629829..036032d 100644 } diff --git a/arch/sparc/kernel/traps_64.c b/arch/sparc/kernel/traps_64.c -index 4ced92f..965eeed 100644 +index fb6640e..2daada8 100644 --- a/arch/sparc/kernel/traps_64.c +++ b/arch/sparc/kernel/traps_64.c -@@ -77,7 +77,7 @@ static void dump_tl1_traplog(struct tl1_traplog *p) +@@ -79,7 +79,7 @@ static void dump_tl1_traplog(struct tl1_traplog *p) i + 1, p->trapstack[i].tstate, p->trapstack[i].tpc, p->trapstack[i].tnpc, p->trapstack[i].tt); @@ -10648,7 +11127,7 @@ index 4ced92f..965eeed 100644 } } -@@ -97,6 +97,12 @@ void bad_trap(struct pt_regs *regs, long lvl) +@@ -99,6 +99,12 @@ void bad_trap(struct pt_regs *regs, long lvl) lvl -= 0x100; if (regs->tstate & TSTATE_PRIV) { @@ -10661,7 +11140,7 @@ index 4ced92f..965eeed 100644 sprintf(buffer, "Kernel bad sw trap %lx", lvl); die_if_kernel(buffer, regs); } -@@ -115,11 +121,16 @@ void bad_trap(struct pt_regs *regs, long lvl) +@@ -117,11 +123,16 @@ void bad_trap(struct pt_regs *regs, long lvl) void bad_trap_tl1(struct pt_regs *regs, long lvl) { char buffer[32]; @@ -10679,7 +11158,7 @@ index 4ced92f..965eeed 100644 dump_tl1_traplog((struct tl1_traplog *)(regs + 1)); sprintf (buffer, "Bad trap %lx at tl>0", lvl); -@@ -1149,7 +1160,7 @@ static void cheetah_log_errors(struct pt_regs *regs, struct cheetah_err_info *in +@@ -1151,7 +1162,7 @@ static void cheetah_log_errors(struct pt_regs *regs, struct cheetah_err_info *in regs->tpc, regs->tnpc, regs->u_regs[UREG_I7], regs->tstate); printk("%s" "ERROR(%d): ", (recoverable ? KERN_WARNING : KERN_CRIT), smp_processor_id()); @@ -10688,7 +11167,7 @@ index 4ced92f..965eeed 100644 printk("%s" "ERROR(%d): M_SYND(%lx), E_SYND(%lx)%s%s\n", (recoverable ? KERN_WARNING : KERN_CRIT), smp_processor_id(), (afsr & CHAFSR_M_SYNDROME) >> CHAFSR_M_SYNDROME_SHIFT, -@@ -1756,7 +1767,7 @@ void cheetah_plus_parity_error(int type, struct pt_regs *regs) +@@ -1758,7 +1769,7 @@ void cheetah_plus_parity_error(int type, struct pt_regs *regs) smp_processor_id(), (type & 0x1) ? 'I' : 'D', regs->tpc); @@ -10697,7 +11176,7 @@ index 4ced92f..965eeed 100644 panic("Irrecoverable Cheetah+ parity error."); } -@@ -1764,7 +1775,7 @@ void cheetah_plus_parity_error(int type, struct pt_regs *regs) +@@ -1766,7 +1777,7 @@ void cheetah_plus_parity_error(int type, struct pt_regs *regs) smp_processor_id(), (type & 0x1) ? 'I' : 'D', regs->tpc); @@ -10706,7 +11185,7 @@ index 4ced92f..965eeed 100644 } struct sun4v_error_entry { -@@ -1837,8 +1848,8 @@ struct sun4v_error_entry { +@@ -1839,8 +1850,8 @@ struct sun4v_error_entry { /*0x38*/u64 reserved_5; }; @@ -10717,7 +11196,7 @@ index 4ced92f..965eeed 100644 static const char *sun4v_err_type_to_str(u8 type) { -@@ -1930,7 +1941,7 @@ static void sun4v_report_real_raddr(const char *pfx, struct pt_regs *regs) +@@ -1932,7 +1943,7 @@ static void sun4v_report_real_raddr(const char *pfx, struct pt_regs *regs) } static void sun4v_log_error(struct pt_regs *regs, struct sun4v_error_entry *ent, @@ -10726,7 +11205,7 @@ index 4ced92f..965eeed 100644 { u64 *raw_ptr = (u64 *) ent; u32 attrs; -@@ -1988,8 +1999,8 @@ static void sun4v_log_error(struct pt_regs *regs, struct sun4v_error_entry *ent, +@@ -1990,8 +2001,8 @@ static void sun4v_log_error(struct pt_regs *regs, struct sun4v_error_entry *ent, show_regs(regs); @@ -10737,7 +11216,7 @@ index 4ced92f..965eeed 100644 wmb(); printk("%s: Queue overflowed %d times.\n", pfx, cnt); -@@ -2046,7 +2057,7 @@ out: +@@ -2048,7 +2059,7 @@ out: */ void sun4v_resum_overflow(struct pt_regs *regs) { @@ -10746,7 +11225,7 @@ index 4ced92f..965eeed 100644 } /* We run with %pil set to PIL_NORMAL_MAX and PSTATE_IE enabled in %pstate. -@@ -2099,7 +2110,7 @@ void sun4v_nonresum_overflow(struct pt_regs *regs) +@@ -2101,7 +2112,7 @@ void sun4v_nonresum_overflow(struct pt_regs *regs) /* XXX Actually even this can make not that much sense. Perhaps * XXX we should just pull the plug and panic directly from here? */ @@ -10755,7 +11234,7 @@ index 4ced92f..965eeed 100644 } unsigned long sun4v_err_itlb_vaddr; -@@ -2114,9 +2125,9 @@ void sun4v_itlb_error_report(struct pt_regs *regs, int tl) +@@ -2116,9 +2127,9 @@ void sun4v_itlb_error_report(struct pt_regs *regs, int tl) printk(KERN_EMERG "SUN4V-ITLB: Error at TPC[%lx], tl %d\n", regs->tpc, tl); @@ -10767,7 +11246,7 @@ index 4ced92f..965eeed 100644 (void *) regs->u_regs[UREG_I7]); printk(KERN_EMERG "SUN4V-ITLB: vaddr[%lx] ctx[%lx] " "pte[%lx] error[%lx]\n", -@@ -2138,9 +2149,9 @@ void sun4v_dtlb_error_report(struct pt_regs *regs, int tl) +@@ -2140,9 +2151,9 @@ void sun4v_dtlb_error_report(struct pt_regs *regs, int tl) printk(KERN_EMERG "SUN4V-DTLB: Error at TPC[%lx], tl %d\n", regs->tpc, tl); @@ -10801,10 +11280,10 @@ index 4ced92f..965eeed 100644 +extern void gr_handle_kernel_exploit(void); + - void die_if_kernel(char *str, struct pt_regs *regs) + void __noreturn die_if_kernel(char *str, struct pt_regs *regs) { static int die_counter; -@@ -2411,7 +2424,7 @@ void die_if_kernel(char *str, struct pt_regs *regs) +@@ -2411,7 +2424,7 @@ void __noreturn die_if_kernel(char *str, struct pt_regs *regs) while (rw && count++ < 30 && kstack_valid(tp, (unsigned long) rw)) { @@ -10813,7 +11292,7 @@ index 4ced92f..965eeed 100644 (void *) rw->ins[7]); rw = kernel_stack_up(rw); -@@ -2424,8 +2437,10 @@ void die_if_kernel(char *str, struct pt_regs *regs) +@@ -2424,8 +2437,10 @@ void __noreturn die_if_kernel(char *str, struct pt_regs *regs) } user_instruction_dump ((unsigned int __user *) regs->tpc); } @@ -10826,10 +11305,10 @@ index 4ced92f..965eeed 100644 } EXPORT_SYMBOL(die_if_kernel); diff --git a/arch/sparc/kernel/unaligned_64.c b/arch/sparc/kernel/unaligned_64.c -index 35ab8b6..9046547 100644 +index 62098a8..547ab2c 100644 --- a/arch/sparc/kernel/unaligned_64.c +++ b/arch/sparc/kernel/unaligned_64.c -@@ -295,7 +295,7 @@ static void log_unaligned(struct pt_regs *regs) +@@ -297,7 +297,7 @@ static void log_unaligned(struct pt_regs *regs) static DEFINE_RATELIMIT_STATE(ratelimit, 5 * HZ, 5); if (__ratelimit(&ratelimit)) { @@ -10839,7 +11318,7 @@ index 35ab8b6..9046547 100644 } } diff --git a/arch/sparc/lib/Makefile b/arch/sparc/lib/Makefile -index dbe119b..089c7c1 100644 +index 3269b02..64f5231 100644 --- a/arch/sparc/lib/Makefile +++ b/arch/sparc/lib/Makefile @@ -2,7 +2,7 @@ @@ -11102,7 +11581,7 @@ index 30c3ecc..736f015 100644 obj-$(CONFIG_SPARC64) += ultra.o tlb.o tsb.o gup.o obj-y += fault_$(BITS).o diff --git a/arch/sparc/mm/fault_32.c b/arch/sparc/mm/fault_32.c -index 59dbd46..1dd7f5e 100644 +index 908e8c1..1524793 100644 --- a/arch/sparc/mm/fault_32.c +++ b/arch/sparc/mm/fault_32.c @@ -21,6 +21,9 @@ @@ -11115,7 +11594,7 @@ index 59dbd46..1dd7f5e 100644 #include #include -@@ -159,6 +162,277 @@ static unsigned long compute_si_addr(struct pt_regs *regs, int text_fault) +@@ -156,6 +159,277 @@ static unsigned long compute_si_addr(struct pt_regs *regs, int text_fault) return safe_compute_effective_address(regs, insn); } @@ -11393,7 +11872,7 @@ index 59dbd46..1dd7f5e 100644 static noinline void do_fault_siginfo(int code, int sig, struct pt_regs *regs, int text_fault) { -@@ -229,6 +503,24 @@ good_area: +@@ -226,6 +500,24 @@ good_area: if (!(vma->vm_flags & VM_WRITE)) goto bad_area; } else { @@ -11419,7 +11898,7 @@ index 59dbd46..1dd7f5e 100644 if (!(vma->vm_flags & (VM_READ | VM_EXEC))) goto bad_area; diff --git a/arch/sparc/mm/fault_64.c b/arch/sparc/mm/fault_64.c -index 4ced3fc..234f1e4 100644 +index 587cd05..fbdf17a 100644 --- a/arch/sparc/mm/fault_64.c +++ b/arch/sparc/mm/fault_64.c @@ -22,6 +22,9 @@ @@ -11432,7 +11911,7 @@ index 4ced3fc..234f1e4 100644 #include #include -@@ -75,7 +78,7 @@ static void __kprobes bad_kernel_pc(struct pt_regs *regs, unsigned long vaddr) +@@ -76,7 +79,7 @@ static void __kprobes bad_kernel_pc(struct pt_regs *regs, unsigned long vaddr) printk(KERN_CRIT "OOPS: Bogus kernel PC [%016lx] in fault handler\n", regs->tpc); printk(KERN_CRIT "OOPS: RPC [%016lx]\n", regs->u_regs[15]); @@ -11441,7 +11920,7 @@ index 4ced3fc..234f1e4 100644 printk(KERN_CRIT "OOPS: Fault was to vaddr[%lx]\n", vaddr); dump_stack(); unhandled_fault(regs->tpc, current, regs); -@@ -281,6 +284,466 @@ static void noinline __kprobes bogus_32bit_fault_tpc(struct pt_regs *regs) +@@ -279,6 +282,466 @@ static void noinline __kprobes bogus_32bit_fault_tpc(struct pt_regs *regs) show_regs(regs); } @@ -11908,7 +12387,7 @@ index 4ced3fc..234f1e4 100644 asmlinkage void __kprobes do_sparc64_fault(struct pt_regs *regs) { enum ctx_state prev_state = exception_enter(); -@@ -352,6 +815,29 @@ retry: +@@ -350,6 +813,29 @@ retry: if (!vma) goto bad_area; @@ -12045,10 +12524,10 @@ index d329537..2c3746a 100644 pte_t *huge_pte_alloc(struct mm_struct *mm, diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c -index ed3c969..42fe48d 100644 +index 2cfb0f2..e917d9f 100644 --- a/arch/sparc/mm/init_64.c +++ b/arch/sparc/mm/init_64.c -@@ -188,9 +188,9 @@ unsigned long sparc64_kern_sec_context __read_mostly; +@@ -189,9 +189,9 @@ unsigned long sparc64_kern_sec_context __read_mostly; int num_kernel_image_mappings; #ifdef CONFIG_DEBUG_DCFLUSH @@ -12060,7 +12539,7 @@ index ed3c969..42fe48d 100644 #endif #endif -@@ -198,7 +198,7 @@ inline void flush_dcache_page_impl(struct page *page) +@@ -199,7 +199,7 @@ inline void flush_dcache_page_impl(struct page *page) { BUG_ON(tlb_type == hypervisor); #ifdef CONFIG_DEBUG_DCFLUSH @@ -12069,7 +12548,7 @@ index ed3c969..42fe48d 100644 #endif #ifdef DCACHE_ALIASING_POSSIBLE -@@ -466,10 +466,10 @@ void mmu_info(struct seq_file *m) +@@ -471,10 +471,10 @@ void mmu_info(struct seq_file *m) #ifdef CONFIG_DEBUG_DCFLUSH seq_printf(m, "DCPageFlushes\t: %d\n", @@ -12083,10 +12562,10 @@ index ed3c969..42fe48d 100644 #endif /* CONFIG_DEBUG_DCFLUSH */ } diff --git a/arch/tile/Kconfig b/arch/tile/Kconfig -index 85258ca..df97c79 100644 +index 4f3006b..453f625f 100644 --- a/arch/tile/Kconfig +++ b/arch/tile/Kconfig -@@ -190,6 +190,7 @@ source "kernel/Kconfig.hz" +@@ -192,6 +192,7 @@ source "kernel/Kconfig.hz" config KEXEC bool "kexec system call" @@ -12095,7 +12574,7 @@ index 85258ca..df97c79 100644 kexec is a system call that implements the ability to shutdown your current kernel, and to start another kernel. It is like a reboot diff --git a/arch/tile/include/asm/atomic_64.h b/arch/tile/include/asm/atomic_64.h -index ad220ee..2f537b3 100644 +index 7b11c5f..755a026 100644 --- a/arch/tile/include/asm/atomic_64.h +++ b/arch/tile/include/asm/atomic_64.h @@ -105,6 +105,16 @@ static inline long atomic64_add_unless(atomic64_t *v, long a, long u) @@ -12112,9 +12591,9 @@ index ad220ee..2f537b3 100644 +#define atomic64_dec_unchecked(v) atomic64_dec(v) +#define atomic64_cmpxchg_unchecked(v, o, n) atomic64_cmpxchg((v), (o), (n)) + - /* Atomic dec and inc don't implement barrier, so provide them if needed. */ - #define smp_mb__before_atomic_dec() smp_mb() - #define smp_mb__after_atomic_dec() smp_mb() + /* Define this to indicate that cmpxchg is an efficient operation. */ + #define __HAVE_ARCH_CMPXCHG + diff --git a/arch/tile/include/asm/cache.h b/arch/tile/include/asm/cache.h index 6160761..00cac88 100644 --- a/arch/tile/include/asm/cache.h @@ -12170,7 +12649,7 @@ index e514899..f8743c4 100644 /* diff --git a/arch/um/Makefile b/arch/um/Makefile -index 36e658a..71a5c5a 100644 +index e4b1a96..16162f8 100644 --- a/arch/um/Makefile +++ b/arch/um/Makefile @@ -72,6 +72,10 @@ USER_CFLAGS = $(patsubst $(KERNEL_DEFINES),,$(patsubst -D__KERNEL__,,\ @@ -12287,10 +12766,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 6b8b429..7b21fe4 100644 +index 27adfd9..bc3551d 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig -@@ -127,7 +127,7 @@ config X86 +@@ -128,7 +128,7 @@ config X86 select RTC_LIB select HAVE_DEBUG_STACKOVERFLOW select HAVE_IRQ_EXIT_ON_IRQ_STACK if X86_64 @@ -12298,8 +12777,8 @@ index 6b8b429..7b21fe4 100644 + select HAVE_CC_STACKPROTECTOR if X86_64 || !PAX_MEMORY_UDEREF select GENERIC_CPU_AUTOPROBE select HAVE_ARCH_AUDITSYSCALL - -@@ -251,7 +251,7 @@ config X86_HT + select ARCH_SUPPORTS_ATOMIC_RMW +@@ -253,7 +253,7 @@ config X86_HT config X86_32_LAZY_GS def_bool y @@ -12308,7 +12787,7 @@ index 6b8b429..7b21fe4 100644 config ARCH_HWEIGHT_CFLAGS string -@@ -545,6 +545,7 @@ config SCHED_OMIT_FRAME_POINTER +@@ -549,6 +549,7 @@ config SCHED_OMIT_FRAME_POINTER menuconfig HYPERVISOR_GUEST bool "Linux guest support" @@ -12316,7 +12795,7 @@ index 6b8b429..7b21fe4 100644 ---help--- Say Y here to enable options for running Linux under various hyper- visors. This option enables basic hypervisor detection and platform -@@ -1054,6 +1055,7 @@ choice +@@ -1076,6 +1077,7 @@ choice config NOHIGHMEM bool "off" @@ -12324,7 +12803,7 @@ index 6b8b429..7b21fe4 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 -@@ -1090,6 +1092,7 @@ config NOHIGHMEM +@@ -1112,6 +1114,7 @@ config NOHIGHMEM config HIGHMEM4G bool "4GB" @@ -12332,7 +12811,7 @@ index 6b8b429..7b21fe4 100644 ---help--- Select this if you have a 32-bit processor and between 1 and 4 gigabytes of physical RAM. -@@ -1142,7 +1145,7 @@ config PAGE_OFFSET +@@ -1164,7 +1167,7 @@ config PAGE_OFFSET hex default 0xB0000000 if VMSPLIT_3G_OPT default 0x80000000 if VMSPLIT_2G @@ -12341,7 +12820,7 @@ index 6b8b429..7b21fe4 100644 default 0x40000000 if VMSPLIT_1G default 0xC0000000 depends on X86_32 -@@ -1555,6 +1558,7 @@ source kernel/Kconfig.hz +@@ -1578,6 +1581,7 @@ source kernel/Kconfig.hz config KEXEC bool "kexec system call" @@ -12349,7 +12828,7 @@ index 6b8b429..7b21fe4 100644 ---help--- kexec is a system call that implements the ability to shutdown your current kernel, and to start another kernel. It is like a reboot -@@ -1706,7 +1710,9 @@ config X86_NEED_RELOCS +@@ -1728,7 +1732,9 @@ config X86_NEED_RELOCS config PHYSICAL_ALIGN hex "Alignment value to which kernel should be aligned" @@ -12360,7 +12839,7 @@ index 6b8b429..7b21fe4 100644 range 0x2000 0x1000000 if X86_32 range 0x200000 0x1000000 if X86_64 ---help--- -@@ -1789,6 +1795,7 @@ config COMPAT_VDSO +@@ -1811,6 +1817,7 @@ config COMPAT_VDSO def_bool n prompt "Disable the 32-bit vDSO (needed for glibc 2.3.3)" depends on X86_32 || IA32_EMULATION @@ -12581,7 +13060,7 @@ index cbed140..5f2ca57 100644 /* Target address to relocate to for decompression */ diff --git a/arch/x86/boot/compressed/head_64.S b/arch/x86/boot/compressed/head_64.S -index 0d558ee..58f257e 100644 +index 2884e0c..904a2f7 100644 --- a/arch/x86/boot/compressed/head_64.S +++ b/arch/x86/boot/compressed/head_64.S @@ -94,10 +94,10 @@ ENTRY(startup_32) @@ -12716,10 +13195,10 @@ index 1fd7d57..0f7d096 100644 err = check_cpuflags(); } else if (err == 0x01 && diff --git a/arch/x86/boot/header.S b/arch/x86/boot/header.S -index 84c2234..3ef6360 100644 +index 7a6d43a..edf6e40 100644 --- a/arch/x86/boot/header.S +++ b/arch/x86/boot/header.S -@@ -420,10 +420,14 @@ setup_data: .quad 0 # 64-bit physical pointer to +@@ -438,10 +438,14 @@ setup_data: .quad 0 # 64-bit physical pointer to # single linked list of # struct setup_data @@ -13747,7 +14226,7 @@ index dbc4339..de6e120 100644 ################################################################ diff --git a/arch/x86/crypto/ghash-clmulni-intel_asm.S b/arch/x86/crypto/ghash-clmulni-intel_asm.S -index 185fad4..ff4cd36 100644 +index 5d1e007..098cb4f 100644 --- a/arch/x86/crypto/ghash-clmulni-intel_asm.S +++ b/arch/x86/crypto/ghash-clmulni-intel_asm.S @@ -18,6 +18,7 @@ @@ -14343,7 +14822,7 @@ index d21ff89..6da8e6e 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 2206757..85cbcfa 100644 +index f9e181a..b0df8b3 100644 --- a/arch/x86/ia32/ia32_signal.c +++ b/arch/x86/ia32/ia32_signal.c @@ -218,7 +218,7 @@ asmlinkage long sys32_sigreturn(void) @@ -14365,8 +14844,8 @@ index 2206757..85cbcfa 100644 } @@ -386,7 +386,7 @@ int ia32_setup_frame(int sig, struct ksignal *ksig, - restorer = VDSO32_SYMBOL(current->mm->context.vdso, - sigreturn); + restorer = current->mm->context.vdso + + selected_vdso32->sym___kernel_sigreturn; else - restorer = &frame->retcode; + restorer = frame->retcode; @@ -14391,16 +14870,16 @@ index 2206757..85cbcfa 100644 }; frame = get_sigframe(ksig, regs, sizeof(*frame), &fpstate); -@@ -461,16 +461,18 @@ int ia32_setup_rt_frame(int sig, struct ksignal *ksig, +@@ -461,16 +461,19 @@ int ia32_setup_rt_frame(int sig, struct ksignal *ksig, if (ksig->ka.sa.sa_flags & SA_RESTORER) restorer = ksig->ka.sa.sa_restorer; +- else + else if (current->mm->context.vdso) + /* Return stub is in 32bit vsyscall page */ -+ restorer = VDSO32_SYMBOL(current->mm->context.vdso, rt_sigreturn); - else -- restorer = VDSO32_SYMBOL(current->mm->context.vdso, -- rt_sigreturn); + restorer = current->mm->context.vdso + + selected_vdso32->sym___kernel_rt_sigreturn; ++ else + restorer = frame->retcode; put_user_ex(ptr_to_compat(restorer), &frame->pretcode); @@ -14894,10 +15373,10 @@ index 20370c6..a2eb9b0 100644 "popl %%ebp\n\t" "popl %%edi\n\t" diff --git a/arch/x86/include/asm/atomic.h b/arch/x86/include/asm/atomic.h -index b17f4f4..9620151 100644 +index 6dd1c7dd..2edd216 100644 --- a/arch/x86/include/asm/atomic.h +++ b/arch/x86/include/asm/atomic.h -@@ -23,7 +23,18 @@ +@@ -24,7 +24,18 @@ */ static inline int atomic_read(const atomic_t *v) { @@ -14917,7 +15396,7 @@ index b17f4f4..9620151 100644 } /** -@@ -39,6 +50,18 @@ static inline void atomic_set(atomic_t *v, int i) +@@ -40,6 +51,18 @@ static inline void atomic_set(atomic_t *v, int i) } /** @@ -14936,7 +15415,7 @@ index b17f4f4..9620151 100644 * atomic_add - add integer to atomic variable * @i: integer value to add * @v: pointer of type atomic_t -@@ -47,7 +70,29 @@ static inline void atomic_set(atomic_t *v, int i) +@@ -48,7 +71,29 @@ static inline void atomic_set(atomic_t *v, int i) */ static inline void atomic_add(int i, atomic_t *v) { @@ -14967,7 +15446,7 @@ index b17f4f4..9620151 100644 : "+m" (v->counter) : "ir" (i)); } -@@ -61,7 +106,29 @@ static inline void atomic_add(int i, atomic_t *v) +@@ -62,7 +107,29 @@ static inline void atomic_add(int i, atomic_t *v) */ static inline void atomic_sub(int i, atomic_t *v) { @@ -14998,7 +15477,7 @@ index b17f4f4..9620151 100644 : "+m" (v->counter) : "ir" (i)); } -@@ -77,7 +144,7 @@ static inline void atomic_sub(int i, atomic_t *v) +@@ -78,7 +145,7 @@ static inline void atomic_sub(int i, atomic_t *v) */ static inline int atomic_sub_and_test(int i, atomic_t *v) { @@ -15007,7 +15486,7 @@ index b17f4f4..9620151 100644 } /** -@@ -88,7 +155,27 @@ static inline int atomic_sub_and_test(int i, atomic_t *v) +@@ -89,7 +156,27 @@ static inline int atomic_sub_and_test(int i, atomic_t *v) */ static inline void atomic_inc(atomic_t *v) { @@ -15036,7 +15515,7 @@ index b17f4f4..9620151 100644 : "+m" (v->counter)); } -@@ -100,7 +187,27 @@ static inline void atomic_inc(atomic_t *v) +@@ -101,7 +188,27 @@ static inline void atomic_inc(atomic_t *v) */ static inline void atomic_dec(atomic_t *v) { @@ -15065,7 +15544,7 @@ index b17f4f4..9620151 100644 : "+m" (v->counter)); } -@@ -114,7 +221,7 @@ static inline void atomic_dec(atomic_t *v) +@@ -115,7 +222,7 @@ static inline void atomic_dec(atomic_t *v) */ static inline int atomic_dec_and_test(atomic_t *v) { @@ -15074,7 +15553,7 @@ index b17f4f4..9620151 100644 } /** -@@ -127,7 +234,20 @@ static inline int atomic_dec_and_test(atomic_t *v) +@@ -128,7 +235,20 @@ static inline int atomic_dec_and_test(atomic_t *v) */ static inline int atomic_inc_and_test(atomic_t *v) { @@ -15096,7 +15575,7 @@ index b17f4f4..9620151 100644 } /** -@@ -141,7 +261,7 @@ static inline int atomic_inc_and_test(atomic_t *v) +@@ -142,7 +262,7 @@ static inline int atomic_inc_and_test(atomic_t *v) */ static inline int atomic_add_negative(int i, atomic_t *v) { @@ -15105,7 +15584,7 @@ index b17f4f4..9620151 100644 } /** -@@ -153,6 +273,18 @@ static inline int atomic_add_negative(int i, atomic_t *v) +@@ -154,6 +274,18 @@ static inline int atomic_add_negative(int i, atomic_t *v) */ static inline int atomic_add_return(int i, atomic_t *v) { @@ -15124,7 +15603,7 @@ index b17f4f4..9620151 100644 return i + xadd(&v->counter, i); } -@@ -169,9 +301,18 @@ static inline int atomic_sub_return(int i, atomic_t *v) +@@ -170,9 +302,18 @@ static inline int atomic_sub_return(int i, atomic_t *v) } #define atomic_inc_return(v) (atomic_add_return(1, v)) @@ -15144,7 +15623,7 @@ index b17f4f4..9620151 100644 { return cmpxchg(&v->counter, old, new); } -@@ -181,6 +322,11 @@ static inline int atomic_xchg(atomic_t *v, int new) +@@ -182,6 +323,11 @@ static inline int atomic_xchg(atomic_t *v, int new) return xchg(&v->counter, new); } @@ -15156,7 +15635,7 @@ index b17f4f4..9620151 100644 /** * __atomic_add_unless - add unless the number is already a given value * @v: pointer of type atomic_t -@@ -190,14 +336,27 @@ static inline int atomic_xchg(atomic_t *v, int new) +@@ -191,14 +337,27 @@ static inline int atomic_xchg(atomic_t *v, int new) * Atomically adds @a to @v, so long as @v was not already @u. * Returns the old value of @v. */ @@ -15188,7 +15667,7 @@ index b17f4f4..9620151 100644 if (likely(old == c)) break; c = old; -@@ -206,6 +365,49 @@ static inline int __atomic_add_unless(atomic_t *v, int a, int u) +@@ -207,6 +366,49 @@ static inline int __atomic_add_unless(atomic_t *v, int a, int u) } /** @@ -15238,7 +15717,7 @@ index b17f4f4..9620151 100644 * atomic_inc_short - increment of a short integer * @v: pointer to type int * -@@ -234,14 +436,37 @@ static inline void atomic_or_long(unsigned long *v1, unsigned long v2) +@@ -235,14 +437,37 @@ static inline void atomic_or_long(unsigned long *v1, unsigned long v2) #endif /* These are x86-specific, used by some header files */ @@ -15281,8 +15760,8 @@ index b17f4f4..9620151 100644 + : "memory"); +} - /* Atomic operations are already serializing on x86 */ - #define smp_mb__before_atomic_dec() barrier() + #ifdef CONFIG_X86_32 + # include diff --git a/arch/x86/include/asm/atomic64_32.h b/arch/x86/include/asm/atomic64_32.h index b154de7..bf18a5a 100644 --- a/arch/x86/include/asm/atomic64_32.h @@ -15734,7 +16213,7 @@ index 46e9052..ae45136 100644 #define atomic64_inc_not_zero(v) atomic64_add_unless((v), 1, 0) diff --git a/arch/x86/include/asm/barrier.h b/arch/x86/include/asm/barrier.h -index 69bbb48..32517fe 100644 +index 5c7198c..44180b5 100644 --- a/arch/x86/include/asm/barrier.h +++ b/arch/x86/include/asm/barrier.h @@ -107,7 +107,7 @@ @@ -15756,10 +16235,10 @@ index 69bbb48..32517fe 100644 #define smp_load_acquire(p) \ diff --git a/arch/x86/include/asm/bitops.h b/arch/x86/include/asm/bitops.h -index 9fc1af7..776d75a 100644 +index afcd35d..141b32d 100644 --- a/arch/x86/include/asm/bitops.h +++ b/arch/x86/include/asm/bitops.h -@@ -49,7 +49,7 @@ +@@ -50,7 +50,7 @@ * a mask operation on a byte. */ #define IS_IMMEDIATE(nr) (__builtin_constant_p(nr)) @@ -15768,7 +16247,7 @@ index 9fc1af7..776d75a 100644 #define CONST_MASK(nr) (1 << ((nr) & 7)) /** -@@ -205,7 +205,7 @@ static inline void change_bit(long nr, volatile unsigned long *addr) +@@ -203,7 +203,7 @@ static inline void change_bit(long nr, volatile unsigned long *addr) */ static inline int test_and_set_bit(long nr, volatile unsigned long *addr) { @@ -15777,7 +16256,7 @@ index 9fc1af7..776d75a 100644 } /** -@@ -251,7 +251,7 @@ static inline int __test_and_set_bit(long nr, volatile unsigned long *addr) +@@ -249,7 +249,7 @@ static inline int __test_and_set_bit(long nr, volatile unsigned long *addr) */ static inline int test_and_clear_bit(long nr, volatile unsigned long *addr) { @@ -15786,7 +16265,7 @@ index 9fc1af7..776d75a 100644 } /** -@@ -304,7 +304,7 @@ static inline int __test_and_change_bit(long nr, volatile unsigned long *addr) +@@ -302,7 +302,7 @@ static inline int __test_and_change_bit(long nr, volatile unsigned long *addr) */ static inline int test_and_change_bit(long nr, volatile unsigned long *addr) { @@ -15795,7 +16274,7 @@ index 9fc1af7..776d75a 100644 } static __always_inline int constant_test_bit(long nr, const volatile unsigned long *addr) -@@ -345,7 +345,7 @@ static int test_bit(int nr, const volatile unsigned long *addr); +@@ -343,7 +343,7 @@ static int test_bit(int nr, const volatile unsigned long *addr); * * Undefined if no bit exists, so code should check against 0 first. */ @@ -15804,7 +16283,7 @@ index 9fc1af7..776d75a 100644 { asm("rep; bsf %1,%0" : "=r" (word) -@@ -359,7 +359,7 @@ static inline unsigned long __ffs(unsigned long word) +@@ -357,7 +357,7 @@ static inline unsigned long __ffs(unsigned long word) * * Undefined if no zero exists, so code should check against ~0UL first. */ @@ -15813,7 +16292,7 @@ index 9fc1af7..776d75a 100644 { asm("rep; bsf %1,%0" : "=r" (word) -@@ -373,7 +373,7 @@ static inline unsigned long ffz(unsigned long word) +@@ -371,7 +371,7 @@ static inline unsigned long ffz(unsigned long word) * * Undefined if no set bit exists, so code should check against 0 first. */ @@ -15822,7 +16301,7 @@ index 9fc1af7..776d75a 100644 { asm("bsr %1,%0" : "=r" (word) -@@ -436,7 +436,7 @@ static inline int ffs(int x) +@@ -434,7 +434,7 @@ static inline int ffs(int x) * set bit if value is nonzero. The last (most significant) bit is * at position 32. */ @@ -15831,7 +16310,7 @@ index 9fc1af7..776d75a 100644 { int r; -@@ -478,7 +478,7 @@ static inline int fls(int x) +@@ -476,7 +476,7 @@ static inline int fls(int x) * at position 64. */ #ifdef CONFIG_X86_64 @@ -16517,10 +16996,20 @@ index ced283a..ffe04cc 100644 union { u64 v64; diff --git a/arch/x86/include/asm/elf.h b/arch/x86/include/asm/elf.h -index 2c71182..731124d 100644 +index 1a055c8..a1701de 100644 --- a/arch/x86/include/asm/elf.h +++ b/arch/x86/include/asm/elf.h -@@ -243,7 +243,25 @@ extern int force_personality32; +@@ -75,9 +75,6 @@ typedef struct user_fxsr_struct elf_fpxregset_t; + + #include + +-#ifdef CONFIG_X86_64 +-extern unsigned int vdso64_enabled; +-#endif + #if defined(CONFIG_X86_32) || defined(CONFIG_COMPAT) + extern unsigned int vdso32_enabled; + #endif +@@ -248,7 +245,25 @@ extern int force_personality32; the loader. We need to make sure that it is out of the way of the program that it will "exec", and that there is sufficient room for the brk. */ @@ -16546,26 +17035,27 @@ index 2c71182..731124d 100644 /* This yields a mask that user programs can use to figure out what instruction set this CPU supports. This could be done in user space, -@@ -292,16 +310,12 @@ do { \ +@@ -297,17 +312,13 @@ do { \ #define ARCH_DLINFO \ do { \ -- if (vdso_enabled) \ +- if (vdso64_enabled) \ - NEW_AUX_ENT(AT_SYSINFO_EHDR, \ -- (unsigned long)current->mm->context.vdso); \ +- (unsigned long __force)current->mm->context.vdso); \ + NEW_AUX_ENT(AT_SYSINFO_EHDR, current->mm->context.vdso); \ } while (0) + /* As a historical oddity, the x32 and x86_64 vDSOs are controlled together. */ #define ARCH_DLINFO_X32 \ do { \ -- if (vdso_enabled) \ +- if (vdso64_enabled) \ - NEW_AUX_ENT(AT_SYSINFO_EHDR, \ -- (unsigned long)current->mm->context.vdso); \ +- (unsigned long __force)current->mm->context.vdso); \ + NEW_AUX_ENT(AT_SYSINFO_EHDR, current->mm->context.vdso); \ } while (0) #define AT_SYSINFO 32 -@@ -316,7 +330,7 @@ else \ +@@ -322,10 +333,10 @@ else \ #endif /* !CONFIG_X86_32 */ @@ -16573,10 +17063,14 @@ index 2c71182..731124d 100644 +#define VDSO_CURRENT_BASE (current->mm->context.vdso) #define VDSO_ENTRY \ - ((unsigned long)VDSO32_SYMBOL(VDSO_CURRENT_BASE, vsyscall)) -@@ -332,9 +346,6 @@ extern int x32_setup_additional_pages(struct linux_binprm *bprm, - extern int syscall32_setup_pages(struct linux_binprm *, int exstack); - #define compat_arch_setup_additional_pages syscall32_setup_pages +- ((unsigned long)current->mm->context.vdso + \ ++ (current->mm->context.vdso + \ + selected_vdso32->sym___kernel_vsyscall) + + struct linux_binprm; +@@ -337,9 +348,6 @@ extern int compat_arch_setup_additional_pages(struct linux_binprm *bprm, + int uses_interp); + #define compat_arch_setup_additional_pages compat_arch_setup_additional_pages -extern unsigned long arch_randomize_brk(struct mm_struct *mm); -#define arch_randomize_brk arch_randomize_brk @@ -16630,7 +17124,7 @@ index 1c7eefe..d0e4702 100644 }; diff --git a/arch/x86/include/asm/fpu-internal.h b/arch/x86/include/asm/fpu-internal.h -index cea1c76..6c0d79b 100644 +index 115e368..76ecf6c 100644 --- a/arch/x86/include/asm/fpu-internal.h +++ b/arch/x86/include/asm/fpu-internal.h @@ -124,8 +124,11 @@ static inline void sanitize_i387_state(struct task_struct *tsk) @@ -16728,7 +17222,7 @@ index b4c1f54..e290c08 100644 pagefault_enable(); diff --git a/arch/x86/include/asm/hw_irq.h b/arch/x86/include/asm/hw_irq.h -index a307b75..ec74ca2 100644 +index 4615906..788c817 100644 --- a/arch/x86/include/asm/hw_irq.h +++ b/arch/x86/include/asm/hw_irq.h @@ -164,8 +164,8 @@ extern void setup_ioapic_dest(void); @@ -16813,7 +17307,7 @@ index b8237d8..3e8864e 100644 * Convert a virtual cached pointer to an uncached pointer */ diff --git a/arch/x86/include/asm/irqflags.h b/arch/x86/include/asm/irqflags.h -index bba3cf8..06bc8da 100644 +index 0a8b519..80e7d5b 100644 --- a/arch/x86/include/asm/irqflags.h +++ b/arch/x86/include/asm/irqflags.h @@ -141,6 +141,11 @@ static inline notrace unsigned long arch_local_irq_save(void) @@ -16829,7 +17323,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 9454c16..e4100e3 100644 +index 53cdfb2..d1369e6 100644 --- a/arch/x86/include/asm/kprobes.h +++ b/arch/x86/include/asm/kprobes.h @@ -38,13 +38,8 @@ typedef u8 kprobe_opcode_t; @@ -17052,7 +17546,7 @@ index 0000000..2bfd3ba + +#endif /* X86_MMAN_H */ diff --git a/arch/x86/include/asm/mmu.h b/arch/x86/include/asm/mmu.h -index 5f55e69..e20bfb1 100644 +index 876e74e..e20bfb1 100644 --- a/arch/x86/include/asm/mmu.h +++ b/arch/x86/include/asm/mmu.h @@ -9,7 +9,7 @@ @@ -17068,7 +17562,7 @@ index 5f55e69..e20bfb1 100644 #endif struct mutex lock; -- void *vdso; +- void __user *vdso; + unsigned long vdso; + +#ifdef CONFIG_X86_32 @@ -17086,7 +17580,7 @@ index 5f55e69..e20bfb1 100644 #ifdef CONFIG_SMP diff --git a/arch/x86/include/asm/mmu_context.h b/arch/x86/include/asm/mmu_context.h -index be12c53..4d24039 100644 +index be12c53..07fd3ca 100644 --- a/arch/x86/include/asm/mmu_context.h +++ b/arch/x86/include/asm/mmu_context.h @@ -24,6 +24,20 @@ void destroy_context(struct mm_struct *mm); @@ -17177,9 +17671,9 @@ index be12c53..4d24039 100644 + +#if defined(CONFIG_X86_32) && defined(CONFIG_PAX_PAGEEXEC) && defined(CONFIG_SMP) + if (!(__supported_pte_mask & _PAGE_NX)) { -+ smp_mb__before_clear_bit(); ++ smp_mb__before_atomic(); + cpu_clear(cpu, prev->context.cpu_user_cs_mask); -+ smp_mb__after_clear_bit(); ++ smp_mb__after_atomic(); + cpu_set(cpu, next->context.cpu_user_cs_mask); + } +#endif @@ -17645,7 +18139,7 @@ index c4412e9..90e88c5 100644 { return (pud_t *)get_zeroed_page(GFP_KERNEL|__GFP_REPEAT); diff --git a/arch/x86/include/asm/pgtable-2level.h b/arch/x86/include/asm/pgtable-2level.h -index 0d193e2..bf59aeb 100644 +index 206a87f..1623b06 100644 --- a/arch/x86/include/asm/pgtable-2level.h +++ b/arch/x86/include/asm/pgtable-2level.h @@ -18,7 +18,9 @@ static inline void native_set_pte(pte_t *ptep , pte_t pte) @@ -17680,7 +18174,7 @@ index 81bb91b..9392125 100644 /* diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h -index b459ddf..b44081b 100644 +index aa97a07..f169e5b 100644 --- a/arch/x86/include/asm/pgtable.h +++ b/arch/x86/include/asm/pgtable.h @@ -46,6 +46,7 @@ extern struct mm_struct *pgd_page_get_mm(struct page *page); @@ -17743,7 +18237,7 @@ index b459ddf..b44081b 100644 static inline int pte_dirty(pte_t pte) { return pte_flags(pte) & _PAGE_DIRTY; -@@ -149,6 +189,11 @@ static inline unsigned long pud_pfn(pud_t pud) +@@ -155,6 +195,11 @@ static inline unsigned long pud_pfn(pud_t pud) return (pud_val(pud) & PTE_PFN_MASK) >> PAGE_SHIFT; } @@ -17755,7 +18249,7 @@ index b459ddf..b44081b 100644 #define pte_page(pte) pfn_to_page(pte_pfn(pte)) static inline int pmd_large(pmd_t pte) -@@ -202,9 +247,29 @@ static inline pte_t pte_wrprotect(pte_t pte) +@@ -208,9 +253,29 @@ static inline pte_t pte_wrprotect(pte_t pte) return pte_clear_flags(pte, _PAGE_RW); } @@ -17786,7 +18280,7 @@ index b459ddf..b44081b 100644 } static inline pte_t pte_mkdirty(pte_t pte) -@@ -431,6 +496,16 @@ pte_t *populate_extra_pte(unsigned long vaddr); +@@ -440,6 +505,16 @@ pte_t *populate_extra_pte(unsigned long vaddr); #endif #ifndef __ASSEMBLY__ @@ -17803,7 +18297,7 @@ index b459ddf..b44081b 100644 #include #include #include -@@ -571,7 +646,7 @@ static inline unsigned long pud_page_vaddr(pud_t pud) +@@ -586,7 +661,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: */ @@ -17812,7 +18306,7 @@ index b459ddf..b44081b 100644 /* Find an entry in the second-level page table.. */ static inline pmd_t *pmd_offset(pud_t *pud, unsigned long address) -@@ -611,7 +686,7 @@ static inline unsigned long pgd_page_vaddr(pgd_t pgd) +@@ -626,7 +701,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: */ @@ -17821,7 +18315,7 @@ index b459ddf..b44081b 100644 /* to find an entry in a page-table-directory. */ static inline unsigned long pud_index(unsigned long address) -@@ -626,7 +701,7 @@ static inline pud_t *pud_offset(pgd_t *pgd, unsigned long address) +@@ -641,7 +716,7 @@ static inline pud_t *pud_offset(pgd_t *pgd, unsigned long address) static inline int pgd_bad(pgd_t pgd) { @@ -17830,7 +18324,7 @@ index b459ddf..b44081b 100644 } static inline int pgd_none(pgd_t pgd) -@@ -649,7 +724,12 @@ static inline int pgd_none(pgd_t pgd) +@@ -664,7 +739,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; */ @@ -17844,7 +18338,7 @@ index b459ddf..b44081b 100644 /* * a shortcut which implies the use of the kernel's pgd, instead * of a process's -@@ -660,6 +740,23 @@ static inline int pgd_none(pgd_t pgd) +@@ -675,6 +755,23 @@ static inline int pgd_none(pgd_t pgd) #define KERNEL_PGD_BOUNDARY pgd_index(PAGE_OFFSET) #define KERNEL_PGD_PTRS (PTRS_PER_PGD - KERNEL_PGD_BOUNDARY) @@ -17868,7 +18362,7 @@ index b459ddf..b44081b 100644 #ifndef __ASSEMBLY__ extern int direct_gbpages; -@@ -826,11 +923,24 @@ static inline void pmdp_set_wrprotect(struct mm_struct *mm, +@@ -841,11 +938,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. */ @@ -17974,7 +18468,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 e22c1db..23a625a 100644 +index 5be9063..d62185b 100644 --- a/arch/x86/include/asm/pgtable_64.h +++ b/arch/x86/include/asm/pgtable_64.h @@ -16,10 +16,14 @@ @@ -18029,51 +18523,29 @@ index e22c1db..23a625a 100644 } diff --git a/arch/x86/include/asm/pgtable_64_types.h b/arch/x86/include/asm/pgtable_64_types.h -index c883bf7..19970b3 100644 +index 7166e25..baaa6fe 100644 --- a/arch/x86/include/asm/pgtable_64_types.h +++ b/arch/x86/include/asm/pgtable_64_types.h -@@ -61,6 +61,11 @@ typedef struct { pteval_t pte; } pte_t; +@@ -61,9 +61,14 @@ typedef struct { pteval_t pte; } pte_t; #define MODULES_VADDR (__START_KERNEL_map + KERNEL_IMAGE_SIZE) #define MODULES_END _AC(0xffffffffff000000, UL) #define MODULES_LEN (MODULES_END - MODULES_VADDR) +#define MODULES_EXEC_VADDR MODULES_VADDR +#define MODULES_EXEC_END MODULES_END -+ + #define ESPFIX_PGD_ENTRY _AC(-2, UL) + #define ESPFIX_BASE_ADDR (ESPFIX_PGD_ENTRY << PGDIR_SHIFT) + +#define ktla_ktva(addr) (addr) +#define ktva_ktla(addr) (addr) - ++ #define EARLY_DYNAMIC_PAGE_TABLES 64 + #endif /* _ASM_X86_PGTABLE_64_DEFS_H */ diff --git a/arch/x86/include/asm/pgtable_types.h b/arch/x86/include/asm/pgtable_types.h -index eb3d449..8d95316 100644 +index f216963..6bd7c21 100644 --- a/arch/x86/include/asm/pgtable_types.h +++ b/arch/x86/include/asm/pgtable_types.h -@@ -16,13 +16,12 @@ - #define _PAGE_BIT_PSE 7 /* 4 MB (or 2MB) page */ - #define _PAGE_BIT_PAT 7 /* on 4KB pages */ - #define _PAGE_BIT_GLOBAL 8 /* Global TLB entry PPro+ */ --#define _PAGE_BIT_UNUSED1 9 /* available for programmer */ -+#define _PAGE_BIT_SPECIAL 9 /* special mappings, no associated struct page */ - #define _PAGE_BIT_IOMAP 10 /* flag used to indicate IO mapping */ - #define _PAGE_BIT_HIDDEN 11 /* hidden by kmemcheck */ - #define _PAGE_BIT_PAT_LARGE 12 /* On 2MB or 1GB pages */ --#define _PAGE_BIT_SPECIAL _PAGE_BIT_UNUSED1 --#define _PAGE_BIT_CPA_TEST _PAGE_BIT_UNUSED1 --#define _PAGE_BIT_SPLITTING _PAGE_BIT_UNUSED1 /* only valid on a PSE pmd */ -+#define _PAGE_BIT_CPA_TEST _PAGE_BIT_SPECIAL -+#define _PAGE_BIT_SPLITTING _PAGE_BIT_SPECIAL /* only valid on a PSE pmd */ - #define _PAGE_BIT_NX 63 /* No execute: only valid after cpuid check */ - - /* If _PAGE_BIT_PRESENT is clear, we use these: */ -@@ -40,7 +39,6 @@ - #define _PAGE_DIRTY (_AT(pteval_t, 1) << _PAGE_BIT_DIRTY) - #define _PAGE_PSE (_AT(pteval_t, 1) << _PAGE_BIT_PSE) - #define _PAGE_GLOBAL (_AT(pteval_t, 1) << _PAGE_BIT_GLOBAL) --#define _PAGE_UNUSED1 (_AT(pteval_t, 1) << _PAGE_BIT_UNUSED1) - #define _PAGE_IOMAP (_AT(pteval_t, 1) << _PAGE_BIT_IOMAP) - #define _PAGE_PAT (_AT(pteval_t, 1) << _PAGE_BIT_PAT) - #define _PAGE_PAT_LARGE (_AT(pteval_t, 1) << _PAGE_BIT_PAT_LARGE) -@@ -87,8 +85,10 @@ +@@ -111,8 +111,10 @@ #if defined(CONFIG_X86_64) || defined(CONFIG_X86_PAE) #define _PAGE_NX (_AT(pteval_t, 1) << _PAGE_BIT_NX) @@ -18085,7 +18557,7 @@ index eb3d449..8d95316 100644 #endif #define _PAGE_FILE (_AT(pteval_t, 1) << _PAGE_BIT_FILE) -@@ -147,6 +147,9 @@ +@@ -151,6 +153,9 @@ #define PAGE_READONLY_EXEC __pgprot(_PAGE_PRESENT | _PAGE_USER | \ _PAGE_ACCESSED) @@ -18095,7 +18567,7 @@ index eb3d449..8d95316 100644 #define __PAGE_KERNEL_EXEC \ (_PAGE_PRESENT | _PAGE_RW | _PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_GLOBAL) #define __PAGE_KERNEL (__PAGE_KERNEL_EXEC | _PAGE_NX) -@@ -157,7 +160,7 @@ +@@ -161,7 +166,7 @@ #define __PAGE_KERNEL_WC (__PAGE_KERNEL | _PAGE_CACHE_WC) #define __PAGE_KERNEL_NOCACHE (__PAGE_KERNEL | _PAGE_PCD | _PAGE_PWT) #define __PAGE_KERNEL_UC_MINUS (__PAGE_KERNEL | _PAGE_PCD) @@ -18104,7 +18576,7 @@ index eb3d449..8d95316 100644 #define __PAGE_KERNEL_VVAR (__PAGE_KERNEL_RO | _PAGE_USER) #define __PAGE_KERNEL_VVAR_NOCACHE (__PAGE_KERNEL_VVAR | _PAGE_PCD | _PAGE_PWT) #define __PAGE_KERNEL_LARGE (__PAGE_KERNEL | _PAGE_PSE) -@@ -214,7 +217,7 @@ +@@ -218,7 +223,7 @@ #ifdef CONFIG_X86_64 #define __PAGE_KERNEL_IDENT_LARGE_EXEC __PAGE_KERNEL_LARGE_EXEC #else @@ -18113,7 +18585,7 @@ index eb3d449..8d95316 100644 #define PDE_IDENT_ATTR 0x063 /* PRESENT+RW+DIRTY+ACCESSED */ #define PGD_IDENT_ATTR 0x001 /* PRESENT (no other attributes) */ #endif -@@ -253,7 +256,17 @@ static inline pgdval_t pgd_flags(pgd_t pgd) +@@ -257,7 +262,17 @@ static inline pgdval_t pgd_flags(pgd_t pgd) { return native_pgd_val(pgd) & PTE_FLAGS_MASK; } @@ -18131,7 +18603,7 @@ index eb3d449..8d95316 100644 #if PAGETABLE_LEVELS > 3 typedef struct { pudval_t pud; } pud_t; -@@ -267,8 +280,6 @@ static inline pudval_t native_pud_val(pud_t pud) +@@ -271,8 +286,6 @@ static inline pudval_t native_pud_val(pud_t pud) return pud.pud; } #else @@ -18140,7 +18612,7 @@ index eb3d449..8d95316 100644 static inline pudval_t native_pud_val(pud_t pud) { return native_pgd_val(pud.pgd); -@@ -288,8 +299,6 @@ static inline pmdval_t native_pmd_val(pmd_t pmd) +@@ -292,8 +305,6 @@ static inline pmdval_t native_pmd_val(pmd_t pmd) return pmd.pmd; } #else @@ -18149,7 +18621,7 @@ index eb3d449..8d95316 100644 static inline pmdval_t native_pmd_val(pmd_t pmd) { return native_pgd_val(pmd.pud.pgd); -@@ -329,7 +338,6 @@ typedef struct page *pgtable_t; +@@ -333,7 +344,6 @@ typedef struct page *pgtable_t; extern pteval_t __supported_pte_mask; extern void set_nx(void); @@ -18439,6 +18911,21 @@ index 6205f0c..688a3a9 100644 #endif return *(unsigned long *)((unsigned long)regs + offset); } +diff --git a/arch/x86/include/asm/qrwlock.h b/arch/x86/include/asm/qrwlock.h +index 70f46f0..adfbdb4 100644 +--- a/arch/x86/include/asm/qrwlock.h ++++ b/arch/x86/include/asm/qrwlock.h +@@ -7,8 +7,8 @@ + #define queue_write_unlock queue_write_unlock + static inline void queue_write_unlock(struct qrwlock *lock) + { +- barrier(); +- ACCESS_ONCE(*(u8 *)&lock->cnts) = 0; ++ barrier(); ++ ACCESS_ONCE_RW(*(u8 *)&lock->cnts) = 0; + } + #endif + diff --git a/arch/x86/include/asm/realmode.h b/arch/x86/include/asm/realmode.h index 9c6b890..5305f53 100644 --- a/arch/x86/include/asm/realmode.h @@ -18947,10 +19434,10 @@ index 8cd27e0..7f05ec8 100644 #endif diff --git a/arch/x86/include/asm/spinlock.h b/arch/x86/include/asm/spinlock.h -index 0f62f54..cb5d0dd 100644 +index 54f1c80..39362a5 100644 --- a/arch/x86/include/asm/spinlock.h +++ b/arch/x86/include/asm/spinlock.h -@@ -222,6 +222,14 @@ static inline int arch_write_can_lock(arch_rwlock_t *lock) +@@ -223,6 +223,14 @@ static inline int arch_write_can_lock(arch_rwlock_t *lock) static inline void arch_read_lock(arch_rwlock_t *rw) { asm volatile(LOCK_PREFIX READ_LOCK_SIZE(dec) " (%0)\n\t" @@ -18965,7 +19452,7 @@ index 0f62f54..cb5d0dd 100644 "jns 1f\n" "call __read_lock_failed\n\t" "1:\n" -@@ -231,6 +239,14 @@ static inline void arch_read_lock(arch_rwlock_t *rw) +@@ -232,6 +240,14 @@ static inline void arch_read_lock(arch_rwlock_t *rw) static inline void arch_write_lock(arch_rwlock_t *rw) { asm volatile(LOCK_PREFIX WRITE_LOCK_SUB(%1) "(%0)\n\t" @@ -18980,7 +19467,7 @@ index 0f62f54..cb5d0dd 100644 "jz 1f\n" "call __write_lock_failed\n\t" "1:\n" -@@ -260,13 +276,29 @@ static inline int arch_write_trylock(arch_rwlock_t *lock) +@@ -261,13 +277,29 @@ static inline int arch_write_trylock(arch_rwlock_t *lock) static inline void arch_read_unlock(arch_rwlock_t *rw) { @@ -19011,7 +19498,7 @@ index 0f62f54..cb5d0dd 100644 + : "+m" (rw->write) : "i" (RW_LOCK_BIAS) : "memory"); } - + #else diff --git a/arch/x86/include/asm/stackprotector.h b/arch/x86/include/asm/stackprotector.h index 6a99859..03cb807 100644 --- a/arch/x86/include/asm/stackprotector.h @@ -19110,7 +19597,7 @@ index d7f3b3b..3cc39f1 100644 __switch_canary_iparam \ : "memory", "cc" __EXTRA_CLOBBER) diff --git a/arch/x86/include/asm/thread_info.h b/arch/x86/include/asm/thread_info.h -index 47e5de2..d3dda54 100644 +index 8540538..4b0b5e9 100644 --- a/arch/x86/include/asm/thread_info.h +++ b/arch/x86/include/asm/thread_info.h @@ -24,7 +24,6 @@ struct exec_domain; @@ -19146,7 +19633,7 @@ index 47e5de2..d3dda54 100644 #define init_stack (init_thread_union.stack) #else /* !__ASSEMBLY__ */ -@@ -90,6 +89,7 @@ struct thread_info { +@@ -91,6 +90,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 */ @@ -19154,7 +19641,7 @@ index 47e5de2..d3dda54 100644 #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) -@@ -113,17 +113,18 @@ struct thread_info { +@@ -115,17 +115,18 @@ struct thread_info { #define _TIF_SYSCALL_TRACEPOINT (1 << TIF_SYSCALL_TRACEPOINT) #define _TIF_ADDR32 (1 << TIF_ADDR32) #define _TIF_X32 (1 << TIF_X32) @@ -19175,7 +19662,7 @@ index 47e5de2..d3dda54 100644 /* work to do on interrupt/exception return */ #define _TIF_WORK_MASK \ -@@ -134,7 +135,7 @@ struct thread_info { +@@ -136,7 +137,7 @@ struct thread_info { /* work to do on any return to user space */ #define _TIF_ALLWORK_MASK \ ((0x0000FFFF & ~_TIF_SECCOMP) | _TIF_SYSCALL_TRACEPOINT | \ @@ -19184,7 +19671,7 @@ index 47e5de2..d3dda54 100644 /* Only used for 64 bit */ #define _TIF_DO_NOTIFY_MASK \ -@@ -149,7 +150,6 @@ struct thread_info { +@@ -151,7 +152,6 @@ struct thread_info { #define _TIF_WORK_CTXSW_NEXT (_TIF_WORK_CTXSW) #define STACK_WARN (THREAD_SIZE/8) @@ -19192,7 +19679,7 @@ index 47e5de2..d3dda54 100644 /* * macros/functions for gaining access to the thread information structure -@@ -160,26 +160,18 @@ struct thread_info { +@@ -162,26 +162,18 @@ struct thread_info { DECLARE_PER_CPU(unsigned long, kernel_stack); @@ -19334,7 +19821,7 @@ index 04905bf..49203ca 100644 } diff --git a/arch/x86/include/asm/uaccess.h b/arch/x86/include/asm/uaccess.h -index 0d592e0..7437fcc 100644 +index 0d592e0..526f797 100644 --- a/arch/x86/include/asm/uaccess.h +++ b/arch/x86/include/asm/uaccess.h @@ -7,6 +7,7 @@ @@ -19751,7 +20238,7 @@ index 0d592e0..7437fcc 100644 + copy_from_user_overflow(); + else + __copy_from_user_overflow(sz, n); -+ } if (access_ok(VERIFY_READ, from, n)) ++ } else if (access_ok(VERIFY_READ, from, n)) + n = __copy_from_user(to, from, n); + else if ((long)n > 0) + memset(to, 0, n); @@ -20339,7 +20826,7 @@ index 7b0a55a..ad115bf 100644 /* top of stack page */ diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile -index f4d9600..b45af01 100644 +index 047f9ff..4ba5ea6 100644 --- a/arch/x86/kernel/Makefile +++ b/arch/x86/kernel/Makefile @@ -24,7 +24,7 @@ obj-y += time.o ioport.o ldt.o dumpstack.o nmi.o @@ -20349,8 +20836,8 @@ index f4d9600..b45af01 100644 -obj-$(CONFIG_X86_32) += i386_ksyms_32.o +obj-$(CONFIG_X86_32) += sys_i386_32.o i386_ksyms_32.o obj-$(CONFIG_X86_64) += sys_x86_64.o x8664_ksyms_64.o + obj-$(CONFIG_X86_64) += mcount_64.o obj-y += syscall_$(BITS).o vsyscall_gtod.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 86281ff..e046fc2 100644 --- a/arch/x86/kernel/acpi/boot.c @@ -20411,10 +20898,10 @@ index 665c6b7..eae4d56 100644 bogus_magic: jmp bogus_magic diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c -index df94598..b7162f9 100644 +index 703130f..27a155d 100644 --- a/arch/x86/kernel/alternative.c +++ b/arch/x86/kernel/alternative.c -@@ -269,6 +269,13 @@ void __init_or_module apply_alternatives(struct alt_instr *start, +@@ -268,6 +268,13 @@ void __init_or_module apply_alternatives(struct alt_instr *start, */ for (a = start; a < end; a++) { instr = (u8 *)&a->instr_offset + a->instr_offset; @@ -20428,7 +20915,7 @@ index df94598..b7162f9 100644 replacement = (u8 *)&a->repl_offset + a->repl_offset; BUG_ON(a->replacementlen > a->instrlen); BUG_ON(a->instrlen > sizeof(insnbuf)); -@@ -285,6 +292,11 @@ void __init_or_module apply_alternatives(struct alt_instr *start, +@@ -284,6 +291,11 @@ void __init_or_module apply_alternatives(struct alt_instr *start, add_nops(insnbuf + a->replacementlen, a->instrlen - a->replacementlen); @@ -20440,7 +20927,7 @@ index df94598..b7162f9 100644 text_poke_early(instr, insnbuf, a->instrlen); } } -@@ -300,10 +312,16 @@ static void alternatives_smp_lock(const s32 *start, const s32 *end, +@@ -299,10 +311,16 @@ static void alternatives_smp_lock(const s32 *start, const s32 *end, for (poff = start; poff < end; poff++) { u8 *ptr = (u8 *)poff + *poff; @@ -20458,7 +20945,7 @@ index df94598..b7162f9 100644 text_poke(ptr, ((unsigned char []){0xf0}), 1); } mutex_unlock(&text_mutex); -@@ -318,10 +336,16 @@ static void alternatives_smp_unlock(const s32 *start, const s32 *end, +@@ -317,10 +335,16 @@ static void alternatives_smp_unlock(const s32 *start, const s32 *end, for (poff = start; poff < end; poff++) { u8 *ptr = (u8 *)poff + *poff; @@ -20476,7 +20963,7 @@ index df94598..b7162f9 100644 text_poke(ptr, ((unsigned char []){0x3E}), 1); } mutex_unlock(&text_mutex); -@@ -458,7 +482,7 @@ void __init_or_module apply_paravirt(struct paravirt_patch_site *start, +@@ -457,7 +481,7 @@ void __init_or_module apply_paravirt(struct paravirt_patch_site *start, BUG_ON(p->len > MAX_PATCH_LEN); /* prep the buffer with the original instructions */ @@ -20485,7 +20972,7 @@ index df94598..b7162f9 100644 used = pv_init_ops.patch(p->instrtype, p->clobbers, insnbuf, (unsigned long)p->instr, p->len); -@@ -505,7 +529,7 @@ void __init alternative_instructions(void) +@@ -504,7 +528,7 @@ void __init alternative_instructions(void) if (!uniproc_patched || num_possible_cpus() == 1) free_init_pages("SMP alternatives", (unsigned long)__smp_locks, @@ -20494,7 +20981,7 @@ index df94598..b7162f9 100644 #endif apply_paravirt(__parainstructions, __parainstructions_end); -@@ -525,13 +549,17 @@ void __init alternative_instructions(void) +@@ -524,13 +548,17 @@ void __init alternative_instructions(void) * instructions. And on the local CPU you need to be protected again NMI or MCE * handlers seeing an inconsistent instruction while you patch. */ @@ -20514,9 +21001,9 @@ index df94598..b7162f9 100644 local_irq_restore(flags); /* Could also do a CLFLUSH here to speed up CPU recovery; but that causes hangs on some VIA CPUs. */ -@@ -553,36 +581,22 @@ void *__init_or_module text_poke_early(void *addr, const void *opcode, +@@ -552,36 +580,22 @@ void *__init_or_module text_poke_early(void *addr, const void *opcode, */ - void *__kprobes text_poke(void *addr, const void *opcode, size_t len) + void *text_poke(void *addr, const void *opcode, size_t len) { - unsigned long flags; - char *vaddr; @@ -20559,7 +21046,7 @@ index df94598..b7162f9 100644 return addr; } -@@ -602,7 +616,7 @@ int poke_int3_handler(struct pt_regs *regs) +@@ -601,7 +615,7 @@ int poke_int3_handler(struct pt_regs *regs) if (likely(!bp_patching_in_progress)) return 0; @@ -20568,7 +21055,7 @@ index df94598..b7162f9 100644 return 0; /* set up the specified breakpoint handler */ -@@ -636,7 +650,7 @@ int poke_int3_handler(struct pt_regs *regs) +@@ -635,7 +649,7 @@ int poke_int3_handler(struct pt_regs *regs) */ void *text_poke_bp(void *addr, const void *opcode, size_t len, void *handler) { @@ -20648,10 +21135,10 @@ index e4840aa..e7d9dac 100644 .name = "bigsmp", .probe = probe_bigsmp, diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c -index 992060e..ecdc3b3 100644 +index 81e08ef..abc77e5 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c -@@ -1057,7 +1057,7 @@ int IO_APIC_get_PCI_irq_vector(int bus, int slot, int pin, +@@ -1042,7 +1042,7 @@ int IO_APIC_get_PCI_irq_vector(int bus, int slot, int pin, } EXPORT_SYMBOL(IO_APIC_get_PCI_irq_vector); @@ -20660,7 +21147,7 @@ index 992060e..ecdc3b3 100644 { /* Used to the online set of cpus does not change * during assign_irq_vector. -@@ -1065,7 +1065,7 @@ void lock_vector_lock(void) +@@ -1050,7 +1050,7 @@ void lock_vector_lock(void) raw_spin_lock(&vector_lock); } @@ -20669,7 +21156,7 @@ index 992060e..ecdc3b3 100644 { raw_spin_unlock(&vector_lock); } -@@ -2364,7 +2364,7 @@ static void ack_apic_edge(struct irq_data *data) +@@ -2349,7 +2349,7 @@ static void ack_apic_edge(struct irq_data *data) ack_APIC_irq(); } @@ -20678,7 +21165,7 @@ index 992060e..ecdc3b3 100644 #ifdef CONFIG_GENERIC_PENDING_IRQ static bool io_apic_level_ack_pending(struct irq_cfg *cfg) -@@ -2505,7 +2505,7 @@ static void ack_apic_level(struct irq_data *data) +@@ -2490,7 +2490,7 @@ static void ack_apic_level(struct irq_data *data) * at the cpu. */ if (!(v & (1 << (i & 0x1f)))) { @@ -20736,7 +21223,7 @@ index 6d600eb..0300c00 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 7834389..4ffc9c8 100644 +index 293b41d..4df25fd 100644 --- a/arch/x86/kernel/apic/x2apic_uv_x.c +++ b/arch/x86/kernel/apic/x2apic_uv_x.c @@ -350,7 +350,7 @@ static int uv_probe(void) @@ -20749,7 +21236,7 @@ index 7834389..4ffc9c8 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 3ab0343..814c4787 100644 +index 5848744..56cb598 100644 --- a/arch/x86/kernel/apm_32.c +++ b/arch/x86/kernel/apm_32.c @@ -433,7 +433,7 @@ static DEFINE_MUTEX(apm_mutex); @@ -20807,7 +21294,7 @@ index 3ab0343..814c4787 100644 put_cpu(); return error; } -@@ -2362,12 +2376,15 @@ static int __init apm_init(void) +@@ -2350,12 +2364,15 @@ static int __init apm_init(void) * code to that CPU. */ gdt = get_cpu_gdt_table(0); @@ -20904,10 +21391,10 @@ index ce8b8ff..d7d8851 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 a135239..41fb30a 100644 +index ef1b93f..150db65 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c -@@ -88,60 +88,6 @@ static const struct cpu_dev default_cpu = { +@@ -90,60 +90,6 @@ static const struct cpu_dev default_cpu = { static const struct cpu_dev *this_cpu = &default_cpu; @@ -20968,7 +21455,7 @@ index a135239..41fb30a 100644 static int __init x86_xsave_setup(char *s) { setup_clear_cpu_cap(X86_FEATURE_XSAVE); -@@ -293,6 +239,59 @@ static __always_inline void setup_smap(struct cpuinfo_x86 *c) +@@ -295,6 +241,59 @@ static __always_inline void setup_smap(struct cpuinfo_x86 *c) } } @@ -21028,7 +21515,7 @@ index a135239..41fb30a 100644 /* * Some CPU features depend on higher CPUID levels, which may not always * be available due to CPUID level capping or broken virtualization -@@ -393,7 +392,7 @@ void switch_to_new_gdt(int cpu) +@@ -395,7 +394,7 @@ void switch_to_new_gdt(int cpu) { struct desc_ptr gdt_descr; @@ -21037,7 +21524,7 @@ index a135239..41fb30a 100644 gdt_descr.size = GDT_SIZE - 1; load_gdt(&gdt_descr); /* Reload the per-cpu base */ -@@ -883,6 +882,10 @@ static void identify_cpu(struct cpuinfo_x86 *c) +@@ -885,6 +884,10 @@ static void identify_cpu(struct cpuinfo_x86 *c) setup_smep(c); setup_smap(c); @@ -21048,7 +21535,7 @@ index a135239..41fb30a 100644 /* * The vendor-specific functions might have changed features. * Now we do "generic changes." -@@ -891,6 +894,10 @@ static void identify_cpu(struct cpuinfo_x86 *c) +@@ -893,6 +896,10 @@ static void identify_cpu(struct cpuinfo_x86 *c) /* Filter out anything that depends on CPUID levels we don't have */ filter_cpuid_features(c, true); @@ -21059,7 +21546,16 @@ index a135239..41fb30a 100644 /* If the model name is still unset, do table lookup. */ if (!c->x86_model_id[0]) { const char *p; -@@ -1079,14 +1086,16 @@ static __init int setup_disablecpuid(char *arg) +@@ -973,7 +980,7 @@ static void syscall32_cpu_init(void) + void enable_sep_cpu(void) + { + int cpu = get_cpu(); +- struct tss_struct *tss = &per_cpu(init_tss, cpu); ++ struct tss_struct *tss = init_tss + cpu; + + if (!boot_cpu_has(X86_FEATURE_SEP)) { + put_cpu(); +@@ -1113,14 +1120,16 @@ static __init int setup_disablecpuid(char *arg) } __setup("clearcpuid=", setup_disablecpuid); @@ -21080,7 +21576,7 @@ index a135239..41fb30a 100644 DEFINE_PER_CPU_FIRST(union irq_stack_union, irq_stack_union) __aligned(PAGE_SIZE) __visible; -@@ -1246,7 +1255,7 @@ void cpu_init(void) +@@ -1283,7 +1292,7 @@ void cpu_init(void) load_ucode_ap(); cpu = stack_smp_processor_id(); @@ -21089,7 +21585,7 @@ index a135239..41fb30a 100644 oist = &per_cpu(orig_ist, cpu); #ifdef CONFIG_NUMA -@@ -1281,7 +1290,6 @@ void cpu_init(void) +@@ -1318,7 +1327,6 @@ void cpu_init(void) wrmsrl(MSR_KERNEL_GS_BASE, 0); barrier(); @@ -21097,7 +21593,7 @@ index a135239..41fb30a 100644 enable_x2apic(); /* -@@ -1333,7 +1341,7 @@ void cpu_init(void) +@@ -1370,7 +1378,7 @@ void cpu_init(void) { int cpu = smp_processor_id(); struct task_struct *curr = current; @@ -21107,10 +21603,10 @@ index a135239..41fb30a 100644 show_ucode_info_early(); diff --git a/arch/x86/kernel/cpu/intel_cacheinfo.c b/arch/x86/kernel/cpu/intel_cacheinfo.c -index a952e9c..58a4cbb 100644 +index 9c8f739..902a9c5 100644 --- a/arch/x86/kernel/cpu/intel_cacheinfo.c +++ b/arch/x86/kernel/cpu/intel_cacheinfo.c -@@ -1014,6 +1014,22 @@ static struct attribute *default_attrs[] = { +@@ -1026,6 +1026,22 @@ static struct attribute *default_attrs[] = { }; #ifdef CONFIG_AMD_NB @@ -21133,7 +21629,7 @@ index a952e9c..58a4cbb 100644 static struct attribute **amd_l3_attrs(void) { static struct attribute **attrs; -@@ -1024,18 +1040,7 @@ static struct attribute **amd_l3_attrs(void) +@@ -1036,18 +1052,7 @@ static struct attribute **amd_l3_attrs(void) n = ARRAY_SIZE(default_attrs); @@ -21153,7 +21649,7 @@ index a952e9c..58a4cbb 100644 if (amd_nb_has_feature(AMD_NB_L3_INDEX_DISABLE)) { attrs[n++] = &cache_disable_0.attr; -@@ -1086,6 +1091,13 @@ static struct kobj_type ktype_cache = { +@@ -1098,6 +1103,13 @@ static struct kobj_type ktype_cache = { .default_attrs = default_attrs, }; @@ -21167,7 +21663,7 @@ index a952e9c..58a4cbb 100644 static struct kobj_type ktype_percpu_entry = { .sysfs_ops = &sysfs_ops, }; -@@ -1151,20 +1163,26 @@ static int cache_add_dev(struct device *dev) +@@ -1163,20 +1175,26 @@ static int cache_add_dev(struct device *dev) return retval; } @@ -21198,7 +21694,7 @@ index a952e9c..58a4cbb 100644 "index%1lu", i); if (unlikely(retval)) { diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c -index 68317c8..c860d41 100644 +index 9a79c8d..158c2f1 100644 --- a/arch/x86/kernel/cpu/mcheck/mce.c +++ b/arch/x86/kernel/cpu/mcheck/mce.c @@ -45,6 +45,7 @@ @@ -21209,7 +21705,7 @@ index 68317c8..c860d41 100644 #include "mce-internal.h" -@@ -261,7 +262,7 @@ static void print_mce(struct mce *m) +@@ -259,7 +260,7 @@ static void print_mce(struct mce *m) !(m->mcgstatus & MCG_STATUS_EIPV) ? " !INEXACT!" : "", m->cs, m->ip); @@ -21218,7 +21714,7 @@ index 68317c8..c860d41 100644 print_symbol("{%s}", m->ip); pr_cont("\n"); } -@@ -294,10 +295,10 @@ static void print_mce(struct mce *m) +@@ -292,10 +293,10 @@ static void print_mce(struct mce *m) #define PANIC_TIMEOUT 5 /* 5 seconds */ @@ -21231,7 +21727,7 @@ index 68317c8..c860d41 100644 /* Panic in progress. Enable interrupts and wait for final IPI */ static void wait_for_panic(void) -@@ -321,7 +322,7 @@ static void mce_panic(char *msg, struct mce *final, char *exp) +@@ -319,7 +320,7 @@ static void mce_panic(char *msg, struct mce *final, char *exp) /* * Make sure only one CPU runs in machine check panic */ @@ -21240,7 +21736,7 @@ index 68317c8..c860d41 100644 wait_for_panic(); barrier(); -@@ -329,7 +330,7 @@ static void mce_panic(char *msg, struct mce *final, char *exp) +@@ -327,7 +328,7 @@ static void mce_panic(char *msg, struct mce *final, char *exp) console_verbose(); } else { /* Don't log too much for fake panic */ @@ -21249,7 +21745,7 @@ index 68317c8..c860d41 100644 return; } /* First print corrected ones that are still unlogged */ -@@ -368,7 +369,7 @@ static void mce_panic(char *msg, struct mce *final, char *exp) +@@ -366,7 +367,7 @@ static void mce_panic(char *msg, struct mce *final, char *exp) if (!fake_panic) { if (panic_timeout == 0) panic_timeout = mca_cfg.panic_timeout; @@ -21258,7 +21754,7 @@ index 68317c8..c860d41 100644 } else pr_emerg(HW_ERR "Fake kernel panic: %s\n", msg); } -@@ -699,7 +700,7 @@ static int mce_timed_out(u64 *t) +@@ -697,7 +698,7 @@ static int mce_timed_out(u64 *t) * might have been modified by someone else. */ rmb(); @@ -21267,7 +21763,7 @@ index 68317c8..c860d41 100644 wait_for_panic(); if (!mca_cfg.monarch_timeout) goto out; -@@ -1680,7 +1681,7 @@ static void unexpected_machine_check(struct pt_regs *regs, long error_code) +@@ -1674,7 +1675,7 @@ static void unexpected_machine_check(struct pt_regs *regs, long error_code) } /* Call the installed machine check handler for this CPU setup. */ @@ -21276,7 +21772,7 @@ index 68317c8..c860d41 100644 unexpected_machine_check; /* -@@ -1703,7 +1704,9 @@ void mcheck_cpu_init(struct cpuinfo_x86 *c) +@@ -1697,7 +1698,9 @@ void mcheck_cpu_init(struct cpuinfo_x86 *c) return; } @@ -21286,7 +21782,7 @@ index 68317c8..c860d41 100644 __mcheck_cpu_init_generic(); __mcheck_cpu_init_vendor(c); -@@ -1717,7 +1720,7 @@ void mcheck_cpu_init(struct cpuinfo_x86 *c) +@@ -1711,7 +1714,7 @@ void mcheck_cpu_init(struct cpuinfo_x86 *c) */ static DEFINE_SPINLOCK(mce_chrdev_state_lock); @@ -21295,7 +21791,7 @@ index 68317c8..c860d41 100644 static int mce_chrdev_open_exclu; /* already open exclusive? */ static int mce_chrdev_open(struct inode *inode, struct file *file) -@@ -1725,7 +1728,7 @@ static int mce_chrdev_open(struct inode *inode, struct file *file) +@@ -1719,7 +1722,7 @@ static int mce_chrdev_open(struct inode *inode, struct file *file) spin_lock(&mce_chrdev_state_lock); if (mce_chrdev_open_exclu || @@ -21304,7 +21800,7 @@ index 68317c8..c860d41 100644 spin_unlock(&mce_chrdev_state_lock); return -EBUSY; -@@ -1733,7 +1736,7 @@ static int mce_chrdev_open(struct inode *inode, struct file *file) +@@ -1727,7 +1730,7 @@ static int mce_chrdev_open(struct inode *inode, struct file *file) if (file->f_flags & O_EXCL) mce_chrdev_open_exclu = 1; @@ -21313,7 +21809,7 @@ index 68317c8..c860d41 100644 spin_unlock(&mce_chrdev_state_lock); -@@ -1744,7 +1747,7 @@ static int mce_chrdev_release(struct inode *inode, struct file *file) +@@ -1738,7 +1741,7 @@ static int mce_chrdev_release(struct inode *inode, struct file *file) { spin_lock(&mce_chrdev_state_lock); @@ -21322,7 +21818,7 @@ index 68317c8..c860d41 100644 mce_chrdev_open_exclu = 0; spin_unlock(&mce_chrdev_state_lock); -@@ -2420,7 +2423,7 @@ static __init void mce_init_banks(void) +@@ -2414,7 +2417,7 @@ static __init void mce_init_banks(void) for (i = 0; i < mca_cfg.banks; i++) { struct mce_bank *b = &mce_banks[i]; @@ -21331,7 +21827,7 @@ index 68317c8..c860d41 100644 sysfs_attr_init(&a->attr); a->attr.name = b->attrname; -@@ -2492,7 +2495,7 @@ struct dentry *mce_get_debugfs_dir(void) +@@ -2521,7 +2524,7 @@ struct dentry *mce_get_debugfs_dir(void) static void mce_reset(void) { cpu_missing = 0; @@ -21385,10 +21881,10 @@ index 7dc5564..1273569 100644 wmb(); diff --git a/arch/x86/kernel/cpu/microcode/core.c b/arch/x86/kernel/cpu/microcode/core.c -index 15c9876..0a43909 100644 +index dd9d619..86e1d81 100644 --- a/arch/x86/kernel/cpu/microcode/core.c +++ b/arch/x86/kernel/cpu/microcode/core.c -@@ -513,7 +513,7 @@ mc_cpu_callback(struct notifier_block *nb, unsigned long action, void *hcpu) +@@ -516,7 +516,7 @@ mc_cpu_callback(struct notifier_block *nb, unsigned long action, void *hcpu) return NOTIFY_OK; } @@ -21444,11 +21940,11 @@ 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 ae407f7..39c5b00 100644 +index 2879ecd..bb8c80b 100644 --- a/arch/x86/kernel/cpu/perf_event.c +++ b/arch/x86/kernel/cpu/perf_event.c -@@ -1367,7 +1367,7 @@ static void __init pmu_check_apic(void) - pr_info("no hardware sampling interrupt available.\n"); +@@ -1372,7 +1372,7 @@ static void __init pmu_check_apic(void) + } -static struct attribute_group x86_pmu_format_group = { @@ -21456,7 +21952,7 @@ index ae407f7..39c5b00 100644 .name = "format", .attrs = NULL, }; -@@ -1466,7 +1466,7 @@ static struct attribute *events_attr[] = { +@@ -1471,7 +1471,7 @@ static struct attribute *events_attr[] = { NULL, }; @@ -21465,7 +21961,7 @@ index ae407f7..39c5b00 100644 .name = "events", .attrs = events_attr, }; -@@ -1990,7 +1990,7 @@ static unsigned long get_segment_base(unsigned int segment) +@@ -1995,7 +1995,7 @@ static unsigned long get_segment_base(unsigned int segment) if (idx > GDT_ENTRIES) return 0; @@ -21474,7 +21970,7 @@ index ae407f7..39c5b00 100644 } return get_desc_base(desc + idx); -@@ -2080,7 +2080,7 @@ perf_callchain_user(struct perf_callchain_entry *entry, struct pt_regs *regs) +@@ -2085,7 +2085,7 @@ perf_callchain_user(struct perf_callchain_entry *entry, struct pt_regs *regs) break; perf_callchain_store(entry, frame.return_address); @@ -21497,10 +21993,10 @@ index 639d128..e92d7e5 100644 while (amd_iommu_v2_event_descs[i].attr.attr.name) diff --git a/arch/x86/kernel/cpu/perf_event_intel.c b/arch/x86/kernel/cpu/perf_event_intel.c -index adb02aa..9688c02 100644 +index 2502d0d..e5cc05c 100644 --- a/arch/x86/kernel/cpu/perf_event_intel.c +++ b/arch/x86/kernel/cpu/perf_event_intel.c -@@ -2308,10 +2308,10 @@ __init int intel_pmu_init(void) +@@ -2353,10 +2353,10 @@ __init int intel_pmu_init(void) x86_pmu.num_counters_fixed = max((int)edx.split.num_counters_fixed, 3); if (boot_cpu_has(X86_FEATURE_PDCM)) { @@ -21528,10 +22024,10 @@ index 619f769..d510008 100644 .attrs = NULL, /* patched at runtime */ }; diff --git a/arch/x86/kernel/cpu/perf_event_intel_uncore.c b/arch/x86/kernel/cpu/perf_event_intel_uncore.c -index 65bbbea..1438d9e 100644 +index ae6552a..b5be2d3 100644 --- a/arch/x86/kernel/cpu/perf_event_intel_uncore.c +++ b/arch/x86/kernel/cpu/perf_event_intel_uncore.c -@@ -3693,7 +3693,7 @@ static void __init uncore_types_exit(struct intel_uncore_type **types) +@@ -3694,7 +3694,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; @@ -21628,7 +22124,7 @@ index f6dfd93..892ade4 100644 .__cr3 = __pa_nodebug(swapper_pg_dir), diff --git a/arch/x86/kernel/dumpstack.c b/arch/x86/kernel/dumpstack.c -index d9c12d3..7858b62 100644 +index b74ebc7..6dbb0c5 100644 --- a/arch/x86/kernel/dumpstack.c +++ b/arch/x86/kernel/dumpstack.c @@ -2,6 +2,9 @@ @@ -21742,16 +22238,16 @@ index d9c12d3..7858b62 100644 printk_stack_address(addr, reliable); } -@@ -224,6 +223,8 @@ unsigned __kprobes long oops_begin(void) - } +@@ -225,6 +224,8 @@ unsigned long oops_begin(void) EXPORT_SYMBOL_GPL(oops_begin); + NOKPROBE_SYMBOL(oops_begin); +extern void gr_handle_kernel_exploit(void); + - void __kprobes oops_end(unsigned long flags, struct pt_regs *regs, int signr) + void oops_end(unsigned long flags, struct pt_regs *regs, int signr) { if (regs && kexec_should_crash(current)) -@@ -245,7 +246,10 @@ void __kprobes oops_end(unsigned long flags, struct pt_regs *regs, int signr) +@@ -246,7 +247,10 @@ void oops_end(unsigned long flags, struct pt_regs *regs, int signr) panic("Fatal exception in interrupt"); if (panic_on_oops) panic("Fatal exception"); @@ -21761,9 +22257,9 @@ index d9c12d3..7858b62 100644 + + do_group_exit(signr); } + NOKPROBE_SYMBOL(oops_end); - int __kprobes __die(const char *str, struct pt_regs *regs, long err) -@@ -273,7 +277,7 @@ int __kprobes __die(const char *str, struct pt_regs *regs, long err) +@@ -275,7 +279,7 @@ int __die(const char *str, struct pt_regs *regs, long err) print_modules(); show_regs(regs); #ifdef CONFIG_X86_32 @@ -21772,7 +22268,7 @@ index d9c12d3..7858b62 100644 sp = regs->sp; ss = regs->ss & 0xffff; } else { -@@ -301,7 +305,7 @@ void die(const char *str, struct pt_regs *regs, long err) +@@ -304,7 +308,7 @@ void die(const char *str, struct pt_regs *regs, long err) unsigned long flags = oops_begin(); int sig = SIGSEGV; @@ -22012,7 +22508,7 @@ index 01d1c18..8073693 100644 #include #include diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S -index 6491353..a918952 100644 +index 0d0c9d4..f65b4f6 100644 --- a/arch/x86/kernel/entry_32.S +++ b/arch/x86/kernel/entry_32.S @@ -177,13 +177,153 @@ @@ -22204,7 +22700,7 @@ index 6491353..a918952 100644 ENTRY(ret_from_kernel_thread) CFI_STARTPROC -@@ -344,7 +493,15 @@ ret_from_intr: +@@ -340,7 +489,15 @@ ret_from_intr: andl $SEGMENT_RPL_MASK, %eax #endif cmpl $USER_RPL, %eax @@ -22220,7 +22716,7 @@ index 6491353..a918952 100644 ENTRY(resume_userspace) LOCKDEP_SYS_EXIT -@@ -356,8 +513,8 @@ ENTRY(resume_userspace) +@@ -352,8 +509,8 @@ ENTRY(resume_userspace) andl $_TIF_WORK_MASK, %ecx # is there any work to be done on # int/exception return? jne work_pending @@ -22231,7 +22727,7 @@ index 6491353..a918952 100644 #ifdef CONFIG_PREEMPT ENTRY(resume_kernel) -@@ -369,7 +526,7 @@ need_resched: +@@ -365,7 +522,7 @@ need_resched: jz restore_all call preempt_schedule_irq jmp need_resched @@ -22239,8 +22735,8 @@ index 6491353..a918952 100644 +ENDPROC(resume_kernel) #endif CFI_ENDPROC - /* -@@ -403,30 +560,45 @@ sysenter_past_esp: + +@@ -395,30 +552,45 @@ sysenter_past_esp: /*CFI_REL_OFFSET cs, 0*/ /* * Push current_thread_info()->sysenter_return to the stack. @@ -22289,7 +22785,7 @@ index 6491353..a918952 100644 testl $_TIF_WORK_SYSCALL_ENTRY,TI_flags(%ebp) jnz sysenter_audit sysenter_do_call: -@@ -442,12 +614,24 @@ sysenter_after_call: +@@ -434,12 +606,24 @@ sysenter_after_call: testl $_TIF_ALLWORK_MASK, %ecx jne sysexit_audit sysenter_exit: @@ -22314,7 +22810,7 @@ index 6491353..a918952 100644 PTGS_TO_GS ENABLE_INTERRUPTS_SYSEXIT -@@ -464,6 +648,9 @@ sysenter_audit: +@@ -456,6 +640,9 @@ sysenter_audit: movl %eax,%edx /* 2nd arg: syscall number */ movl $AUDIT_ARCH_I386,%eax /* 1st arg: audit arch */ call __audit_syscall_entry @@ -22324,7 +22820,7 @@ index 6491353..a918952 100644 pushl_cfi %ebx movl PT_EAX(%esp),%eax /* reload syscall number */ jmp sysenter_do_call -@@ -489,10 +676,16 @@ sysexit_audit: +@@ -481,10 +668,16 @@ sysexit_audit: CFI_ENDPROC .pushsection .fixup,"ax" @@ -22343,7 +22839,7 @@ index 6491353..a918952 100644 PTGS_TO_GS_EX ENDPROC(ia32_sysenter_target) -@@ -507,6 +700,11 @@ ENTRY(system_call) +@@ -495,6 +688,11 @@ ENTRY(system_call) pushl_cfi %eax # save orig_eax SAVE_ALL GET_THREAD_INFO(%ebp) @@ -22355,7 +22851,7 @@ index 6491353..a918952 100644 # system call tracing in operation / emulation testl $_TIF_WORK_SYSCALL_ENTRY,TI_flags(%ebp) jnz syscall_trace_entry -@@ -525,6 +723,15 @@ syscall_exit: +@@ -514,6 +712,15 @@ syscall_exit: testl $_TIF_ALLWORK_MASK, %ecx # current->work jne syscall_exit_work @@ -22371,7 +22867,7 @@ index 6491353..a918952 100644 restore_all: TRACE_IRQS_IRET restore_all_notrace: -@@ -576,14 +783,34 @@ ldt_ss: +@@ -568,14 +775,34 @@ ldt_ss: * compensating for the offset by changing to the ESPFIX segment with * a base address that matches for the difference. */ @@ -22409,7 +22905,7 @@ index 6491353..a918952 100644 pushl_cfi $__ESPFIX_SS pushl_cfi %eax /* new kernel esp */ /* Disable interrupts, but do not irqtrace this section: we -@@ -612,20 +839,18 @@ work_resched: +@@ -605,20 +832,18 @@ work_resched: movl TI_flags(%ebp), %ecx andl $_TIF_WORK_MASK, %ecx # is there any work to be done other # than syscall tracing? @@ -22432,7 +22928,7 @@ index 6491353..a918952 100644 #endif TRACE_IRQS_ON ENABLE_INTERRUPTS(CLBR_NONE) -@@ -646,7 +871,7 @@ work_notifysig_v86: +@@ -639,7 +864,7 @@ work_notifysig_v86: movl %eax, %esp jmp 1b #endif @@ -22441,7 +22937,7 @@ index 6491353..a918952 100644 # perform syscall exit tracing ALIGN -@@ -654,11 +879,14 @@ syscall_trace_entry: +@@ -647,11 +872,14 @@ syscall_trace_entry: movl $-ENOSYS,PT_EAX(%esp) movl %esp, %eax call syscall_trace_enter @@ -22457,7 +22953,7 @@ index 6491353..a918952 100644 # perform syscall exit tracing ALIGN -@@ -671,26 +899,30 @@ syscall_exit_work: +@@ -664,26 +892,30 @@ syscall_exit_work: movl %esp, %eax call syscall_trace_leave jmp resume_userspace @@ -22479,22 +22975,22 @@ index 6491353..a918952 100644 +ENDPROC(syscall_fault) syscall_badsys: - movl $-ENOSYS,PT_EAX(%esp) - jmp syscall_exit + movl $-ENOSYS,%eax + jmp syscall_after_call -END(syscall_badsys) +ENDPROC(syscall_badsys) sysenter_badsys: - movl $-ENOSYS,PT_EAX(%esp) + movl $-ENOSYS,%eax jmp sysenter_after_call -END(syscall_badsys) +ENDPROC(sysenter_badsys) CFI_ENDPROC - /* - * End of kprobes section -@@ -706,8 +938,15 @@ END(syscall_badsys) - * normal stack and adjusts ESP with the matching offset. + + .macro FIXUP_ESPFIX_STACK +@@ -696,8 +928,15 @@ END(syscall_badsys) */ + #ifdef CONFIG_X86_ESPFIX32 /* fixup the stack */ - mov GDT_ESPFIX_SS + 4, %al /* bits 16..23 */ - mov GDT_ESPFIX_SS + 7, %ah /* bits 24..31 */ @@ -22510,7 +23006,7 @@ index 6491353..a918952 100644 shl $16, %eax addl %esp, %eax /* the adjusted stack pointer */ pushl_cfi $__KERNEL_DS -@@ -760,7 +999,7 @@ vector=vector+1 +@@ -753,7 +992,7 @@ vector=vector+1 .endr 2: jmp common_interrupt .endr @@ -22519,7 +23015,7 @@ index 6491353..a918952 100644 .previous END(interrupt) -@@ -821,7 +1060,7 @@ ENTRY(coprocessor_error) +@@ -810,7 +1049,7 @@ ENTRY(coprocessor_error) pushl_cfi $do_coprocessor_error jmp error_code CFI_ENDPROC @@ -22528,7 +23024,7 @@ index 6491353..a918952 100644 ENTRY(simd_coprocessor_error) RING0_INT_FRAME -@@ -834,7 +1073,7 @@ ENTRY(simd_coprocessor_error) +@@ -823,7 +1062,7 @@ ENTRY(simd_coprocessor_error) .section .altinstructions,"a" altinstruction_entry 661b, 663f, X86_FEATURE_XMM, 662b-661b, 664f-663f .previous @@ -22537,7 +23033,7 @@ index 6491353..a918952 100644 663: pushl $do_simd_coprocessor_error 664: .previous -@@ -843,7 +1082,7 @@ ENTRY(simd_coprocessor_error) +@@ -832,7 +1071,7 @@ ENTRY(simd_coprocessor_error) #endif jmp error_code CFI_ENDPROC @@ -22546,7 +23042,7 @@ index 6491353..a918952 100644 ENTRY(device_not_available) RING0_INT_FRAME -@@ -852,18 +1091,18 @@ ENTRY(device_not_available) +@@ -841,18 +1080,18 @@ ENTRY(device_not_available) pushl_cfi $do_device_not_available jmp error_code CFI_ENDPROC @@ -22568,7 +23064,7 @@ index 6491353..a918952 100644 #endif ENTRY(overflow) -@@ -873,7 +1112,7 @@ ENTRY(overflow) +@@ -862,7 +1101,7 @@ ENTRY(overflow) pushl_cfi $do_overflow jmp error_code CFI_ENDPROC @@ -22577,7 +23073,7 @@ index 6491353..a918952 100644 ENTRY(bounds) RING0_INT_FRAME -@@ -882,7 +1121,7 @@ ENTRY(bounds) +@@ -871,7 +1110,7 @@ ENTRY(bounds) pushl_cfi $do_bounds jmp error_code CFI_ENDPROC @@ -22586,7 +23082,7 @@ index 6491353..a918952 100644 ENTRY(invalid_op) RING0_INT_FRAME -@@ -891,7 +1130,7 @@ ENTRY(invalid_op) +@@ -880,7 +1119,7 @@ ENTRY(invalid_op) pushl_cfi $do_invalid_op jmp error_code CFI_ENDPROC @@ -22595,7 +23091,7 @@ index 6491353..a918952 100644 ENTRY(coprocessor_segment_overrun) RING0_INT_FRAME -@@ -900,7 +1139,7 @@ ENTRY(coprocessor_segment_overrun) +@@ -889,7 +1128,7 @@ ENTRY(coprocessor_segment_overrun) pushl_cfi $do_coprocessor_segment_overrun jmp error_code CFI_ENDPROC @@ -22604,7 +23100,7 @@ index 6491353..a918952 100644 ENTRY(invalid_TSS) RING0_EC_FRAME -@@ -908,7 +1147,7 @@ ENTRY(invalid_TSS) +@@ -897,7 +1136,7 @@ ENTRY(invalid_TSS) pushl_cfi $do_invalid_TSS jmp error_code CFI_ENDPROC @@ -22613,7 +23109,7 @@ index 6491353..a918952 100644 ENTRY(segment_not_present) RING0_EC_FRAME -@@ -916,7 +1155,7 @@ ENTRY(segment_not_present) +@@ -905,7 +1144,7 @@ ENTRY(segment_not_present) pushl_cfi $do_segment_not_present jmp error_code CFI_ENDPROC @@ -22622,7 +23118,7 @@ index 6491353..a918952 100644 ENTRY(stack_segment) RING0_EC_FRAME -@@ -924,7 +1163,7 @@ ENTRY(stack_segment) +@@ -913,7 +1152,7 @@ ENTRY(stack_segment) pushl_cfi $do_stack_segment jmp error_code CFI_ENDPROC @@ -22631,7 +23127,7 @@ index 6491353..a918952 100644 ENTRY(alignment_check) RING0_EC_FRAME -@@ -932,7 +1171,7 @@ ENTRY(alignment_check) +@@ -921,7 +1160,7 @@ ENTRY(alignment_check) pushl_cfi $do_alignment_check jmp error_code CFI_ENDPROC @@ -22640,7 +23136,7 @@ index 6491353..a918952 100644 ENTRY(divide_error) RING0_INT_FRAME -@@ -941,7 +1180,7 @@ ENTRY(divide_error) +@@ -930,7 +1169,7 @@ ENTRY(divide_error) pushl_cfi $do_divide_error jmp error_code CFI_ENDPROC @@ -22649,7 +23145,7 @@ index 6491353..a918952 100644 #ifdef CONFIG_X86_MCE ENTRY(machine_check) -@@ -951,7 +1190,7 @@ ENTRY(machine_check) +@@ -940,7 +1179,7 @@ ENTRY(machine_check) pushl_cfi machine_check_vector jmp error_code CFI_ENDPROC @@ -22658,16 +23154,16 @@ index 6491353..a918952 100644 #endif ENTRY(spurious_interrupt_bug) -@@ -961,7 +1200,7 @@ ENTRY(spurious_interrupt_bug) +@@ -950,7 +1189,7 @@ ENTRY(spurious_interrupt_bug) pushl_cfi $do_spurious_interrupt_bug jmp error_code CFI_ENDPROC -END(spurious_interrupt_bug) +ENDPROC(spurious_interrupt_bug) - /* - * End of kprobes section - */ -@@ -1071,7 +1310,7 @@ BUILD_INTERRUPT3(hyperv_callback_vector, HYPERVISOR_CALLBACK_VECTOR, + + #ifdef CONFIG_XEN + /* Xen doesn't set %esp to be precisely what the normal sysenter +@@ -1056,7 +1295,7 @@ BUILD_INTERRUPT3(hyperv_callback_vector, HYPERVISOR_CALLBACK_VECTOR, ENTRY(mcount) ret @@ -22676,7 +23172,7 @@ index 6491353..a918952 100644 ENTRY(ftrace_caller) cmpl $0, function_trace_stop -@@ -1104,7 +1343,7 @@ ftrace_graph_call: +@@ -1089,7 +1328,7 @@ ftrace_graph_call: .globl ftrace_stub ftrace_stub: ret @@ -22685,7 +23181,7 @@ index 6491353..a918952 100644 ENTRY(ftrace_regs_caller) pushf /* push flags before compare (in cs location) */ -@@ -1208,7 +1447,7 @@ trace: +@@ -1193,7 +1432,7 @@ trace: popl %ecx popl %eax jmp ftrace_stub @@ -22694,7 +23190,7 @@ index 6491353..a918952 100644 #endif /* CONFIG_DYNAMIC_FTRACE */ #endif /* CONFIG_FUNCTION_TRACER */ -@@ -1226,7 +1465,7 @@ ENTRY(ftrace_graph_caller) +@@ -1211,7 +1450,7 @@ ENTRY(ftrace_graph_caller) popl %ecx popl %eax ret @@ -22703,7 +23199,7 @@ index 6491353..a918952 100644 .globl return_to_handler return_to_handler: -@@ -1292,15 +1531,18 @@ error_code: +@@ -1272,15 +1511,18 @@ error_code: movl $-1, PT_ORIG_EAX(%esp) # no syscall to restart REG_TO_PTGS %ecx SET_KERNEL_GS %ecx @@ -22724,7 +23220,7 @@ index 6491353..a918952 100644 /* * Debug traps and NMI can happen at the one SYSENTER instruction -@@ -1343,7 +1585,7 @@ debug_stack_correct: +@@ -1323,7 +1565,7 @@ debug_stack_correct: call do_debug jmp ret_from_exception CFI_ENDPROC @@ -22733,7 +23229,7 @@ index 6491353..a918952 100644 /* * NMI is doubly nasty. It can happen _while_ we're handling -@@ -1381,6 +1623,9 @@ nmi_stack_correct: +@@ -1363,6 +1605,9 @@ nmi_stack_correct: xorl %edx,%edx # zero error code movl %esp,%eax # pt_regs pointer call do_nmi @@ -22743,7 +23239,7 @@ index 6491353..a918952 100644 jmp restore_all_notrace CFI_ENDPROC -@@ -1417,12 +1662,15 @@ nmi_espfix_stack: +@@ -1400,13 +1645,16 @@ nmi_espfix_stack: FIXUP_ESPFIX_STACK # %eax == %esp xorl %edx,%edx # zero error code call do_nmi @@ -22754,13 +23250,14 @@ index 6491353..a918952 100644 lss 12+4(%esp), %esp # back to espfix stack CFI_ADJUST_CFA_OFFSET -24 jmp irq_return + #endif CFI_ENDPROC -END(nmi) +ENDPROC(nmi) ENTRY(int3) RING0_INT_FRAME -@@ -1435,14 +1683,14 @@ ENTRY(int3) +@@ -1419,14 +1667,14 @@ ENTRY(int3) call do_int3 jmp ret_from_exception CFI_ENDPROC @@ -22777,7 +23274,7 @@ index 6491353..a918952 100644 #ifdef CONFIG_KVM_GUEST ENTRY(async_page_fault) -@@ -1451,7 +1699,7 @@ ENTRY(async_page_fault) +@@ -1435,6 +1683,6 @@ ENTRY(async_page_fault) pushl_cfi $do_async_page_fault jmp error_code CFI_ENDPROC @@ -22785,96 +23282,20 @@ index 6491353..a918952 100644 +ENDPROC(async_page_fault) #endif - /* diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S -index 1e96c36..3ff710a 100644 +index c844f08..b07ea0e 100644 --- a/arch/x86/kernel/entry_64.S +++ b/arch/x86/kernel/entry_64.S @@ -59,6 +59,8 @@ - #include #include + #include #include +#include +#include /* Avoid __ASSEMBLER__'ifying just for this. */ #include -@@ -80,8 +82,9 @@ - #ifdef CONFIG_DYNAMIC_FTRACE - - ENTRY(function_hook) -+ pax_force_retaddr - retq --END(function_hook) -+ENDPROC(function_hook) - - /* skip is set if stack has been adjusted */ - .macro ftrace_caller_setup skip=0 -@@ -122,8 +125,9 @@ GLOBAL(ftrace_graph_call) - #endif - - GLOBAL(ftrace_stub) -+ pax_force_retaddr - retq --END(ftrace_caller) -+ENDPROC(ftrace_caller) - - ENTRY(ftrace_regs_caller) - /* Save the current flags before compare (in SS location)*/ -@@ -191,7 +195,7 @@ ftrace_restore_flags: - popfq - jmp ftrace_stub - --END(ftrace_regs_caller) -+ENDPROC(ftrace_regs_caller) - - - #else /* ! CONFIG_DYNAMIC_FTRACE */ -@@ -212,6 +216,7 @@ ENTRY(function_hook) - #endif - - GLOBAL(ftrace_stub) -+ pax_force_retaddr - retq - - trace: -@@ -225,12 +230,13 @@ trace: - #endif - subq $MCOUNT_INSN_SIZE, %rdi - -+ pax_force_fptr ftrace_trace_function - call *ftrace_trace_function - - MCOUNT_RESTORE_FRAME - - jmp ftrace_stub --END(function_hook) -+ENDPROC(function_hook) - #endif /* CONFIG_DYNAMIC_FTRACE */ - #endif /* CONFIG_FUNCTION_TRACER */ - -@@ -252,8 +258,9 @@ ENTRY(ftrace_graph_caller) - - MCOUNT_RESTORE_FRAME - -+ pax_force_retaddr - retq --END(ftrace_graph_caller) -+ENDPROC(ftrace_graph_caller) - - GLOBAL(return_to_handler) - subq $24, %rsp -@@ -269,7 +276,9 @@ GLOBAL(return_to_handler) - movq 8(%rsp), %rdx - movq (%rsp), %rax - addq $24, %rsp -+ pax_force_fptr %rdi - jmp *%rdi -+ENDPROC(return_to_handler) - #endif - - -@@ -284,6 +293,430 @@ ENTRY(native_usergs_sysret64) +@@ -81,6 +83,430 @@ ENTRY(native_usergs_sysret64) ENDPROC(native_usergs_sysret64) #endif /* CONFIG_PARAVIRT */ @@ -23305,7 +23726,7 @@ index 1e96c36..3ff710a 100644 .macro TRACE_IRQS_IRETQ offset=ARGOFFSET #ifdef CONFIG_TRACE_IRQFLAGS -@@ -320,7 +753,7 @@ ENDPROC(native_usergs_sysret64) +@@ -117,7 +543,7 @@ ENDPROC(native_usergs_sysret64) .endm .macro TRACE_IRQS_IRETQ_DEBUG offset=ARGOFFSET @@ -23314,7 +23735,7 @@ index 1e96c36..3ff710a 100644 jnc 1f TRACE_IRQS_ON_DEBUG 1: -@@ -358,27 +791,6 @@ ENDPROC(native_usergs_sysret64) +@@ -155,27 +581,6 @@ ENDPROC(native_usergs_sysret64) movq \tmp,R11+\offset(%rsp) .endm @@ -23342,7 +23763,7 @@ index 1e96c36..3ff710a 100644 /* * initial frame state for interrupts (and exceptions without error code) */ -@@ -445,25 +857,26 @@ ENDPROC(native_usergs_sysret64) +@@ -242,25 +647,26 @@ ENDPROC(native_usergs_sysret64) /* save partial stack frame */ .macro SAVE_ARGS_IRQ cld @@ -23382,7 +23803,7 @@ index 1e96c36..3ff710a 100644 je 1f SWAPGS /* -@@ -483,6 +896,18 @@ ENDPROC(native_usergs_sysret64) +@@ -280,6 +686,18 @@ ENDPROC(native_usergs_sysret64) 0x06 /* DW_OP_deref */, \ 0x08 /* DW_OP_const1u */, SS+8-RBP, \ 0x22 /* DW_OP_plus */ @@ -23401,7 +23822,7 @@ index 1e96c36..3ff710a 100644 /* We entered an interrupt context - irqs are off: */ TRACE_IRQS_OFF .endm -@@ -514,9 +939,52 @@ ENTRY(save_paranoid) +@@ -309,9 +727,52 @@ ENTRY(save_paranoid) js 1f /* negative -> in kernel */ SWAPGS xorl %ebx,%ebx @@ -23453,10 +23874,10 @@ index 1e96c36..3ff710a 100644 + ret + CFI_ENDPROC +ENDPROC(save_paranoid_nmi) - .popsection /* -@@ -538,7 +1006,7 @@ ENTRY(ret_from_fork) + * A newly forked process directly context switches into this address. +@@ -332,7 +793,7 @@ ENTRY(ret_from_fork) RESTORE_REST @@ -23465,7 +23886,7 @@ index 1e96c36..3ff710a 100644 jz 1f testl $_TIF_IA32, TI_flags(%rcx) # 32-bit compat task needs IRET -@@ -548,15 +1016,13 @@ ENTRY(ret_from_fork) +@@ -342,15 +803,13 @@ ENTRY(ret_from_fork) jmp ret_from_sys_call # go to the SYSRET fastpath 1: @@ -23482,7 +23903,7 @@ index 1e96c36..3ff710a 100644 /* * System call entry. Up to 6 arguments in registers are supported. -@@ -593,7 +1059,7 @@ END(ret_from_fork) +@@ -387,7 +846,7 @@ END(ret_from_fork) ENTRY(system_call) CFI_STARTPROC simple CFI_SIGNAL_FRAME @@ -23491,7 +23912,7 @@ index 1e96c36..3ff710a 100644 CFI_REGISTER rip,rcx /*CFI_REGISTER rflags,r11*/ SWAPGS_UNSAFE_STACK -@@ -606,16 +1072,23 @@ GLOBAL(system_call_after_swapgs) +@@ -400,16 +859,23 @@ GLOBAL(system_call_after_swapgs) movq %rsp,PER_CPU_VAR(old_rsp) movq PER_CPU_VAR(kernel_stack),%rsp @@ -23517,7 +23938,7 @@ index 1e96c36..3ff710a 100644 jnz tracesys system_call_fastpath: #if __SYSCALL_MASK == ~0 -@@ -639,10 +1112,13 @@ sysret_check: +@@ -433,10 +899,13 @@ sysret_check: LOCKDEP_SYS_EXIT DISABLE_INTERRUPTS(CLBR_NONE) TRACE_IRQS_OFF @@ -23532,7 +23953,7 @@ index 1e96c36..3ff710a 100644 /* * sysretq will re-enable interrupts: */ -@@ -701,6 +1177,9 @@ auditsys: +@@ -495,6 +964,9 @@ auditsys: movq %rax,%rsi /* 2nd arg: syscall number */ movl $AUDIT_ARCH_X86_64,%edi /* 1st arg: audit arch */ call __audit_syscall_entry @@ -23542,7 +23963,7 @@ index 1e96c36..3ff710a 100644 LOAD_ARGS 0 /* reload call-clobbered registers */ jmp system_call_fastpath -@@ -722,7 +1201,7 @@ sysret_audit: +@@ -516,7 +988,7 @@ sysret_audit: /* Do syscall tracing */ tracesys: #ifdef CONFIG_AUDITSYSCALL @@ -23551,7 +23972,7 @@ index 1e96c36..3ff710a 100644 jz auditsys #endif SAVE_REST -@@ -730,12 +1209,15 @@ tracesys: +@@ -524,12 +996,15 @@ tracesys: FIXUP_TOP_OF_STACK %rdi movq %rsp,%rdi call syscall_trace_enter @@ -23568,7 +23989,7 @@ index 1e96c36..3ff710a 100644 RESTORE_REST #if __SYSCALL_MASK == ~0 cmpq $__NR_syscall_max,%rax -@@ -765,7 +1247,9 @@ GLOBAL(int_with_check) +@@ -559,7 +1034,9 @@ GLOBAL(int_with_check) andl %edi,%edx jnz int_careful andl $~TS_COMPAT,TI_status(%rcx) @@ -23579,7 +24000,7 @@ index 1e96c36..3ff710a 100644 /* Either reschedule or signal or syscall exit tracking needed. */ /* First do a reschedule test. */ -@@ -811,7 +1295,7 @@ int_restore_rest: +@@ -605,7 +1082,7 @@ int_restore_rest: TRACE_IRQS_OFF jmp int_with_check CFI_ENDPROC @@ -23588,7 +24009,7 @@ index 1e96c36..3ff710a 100644 .macro FORK_LIKE func ENTRY(stub_\func) -@@ -824,9 +1308,10 @@ ENTRY(stub_\func) +@@ -618,9 +1095,10 @@ ENTRY(stub_\func) DEFAULT_FRAME 0 8 /* offset 8: return address */ call sys_\func RESTORE_TOP_OF_STACK %r11, 8 @@ -23601,7 +24022,7 @@ index 1e96c36..3ff710a 100644 .endm .macro FIXED_FRAME label,func -@@ -836,9 +1321,10 @@ ENTRY(\label) +@@ -630,9 +1108,10 @@ ENTRY(\label) FIXUP_TOP_OF_STACK %r11, 8-ARGOFFSET call \func RESTORE_TOP_OF_STACK %r11, 8-ARGOFFSET @@ -23613,7 +24034,7 @@ index 1e96c36..3ff710a 100644 .endm FORK_LIKE clone -@@ -846,19 +1332,6 @@ END(\label) +@@ -640,19 +1119,6 @@ END(\label) FORK_LIKE vfork FIXED_FRAME stub_iopl, sys_iopl @@ -23633,7 +24054,7 @@ index 1e96c36..3ff710a 100644 ENTRY(stub_execve) CFI_STARTPROC addq $8, %rsp -@@ -870,7 +1343,7 @@ ENTRY(stub_execve) +@@ -664,7 +1130,7 @@ ENTRY(stub_execve) RESTORE_REST jmp int_ret_from_sys_call CFI_ENDPROC @@ -23642,7 +24063,7 @@ index 1e96c36..3ff710a 100644 /* * sigreturn is special because it needs to restore all registers on return. -@@ -887,7 +1360,7 @@ ENTRY(stub_rt_sigreturn) +@@ -681,7 +1147,7 @@ ENTRY(stub_rt_sigreturn) RESTORE_REST jmp int_ret_from_sys_call CFI_ENDPROC @@ -23651,7 +24072,7 @@ index 1e96c36..3ff710a 100644 #ifdef CONFIG_X86_X32_ABI ENTRY(stub_x32_rt_sigreturn) -@@ -901,7 +1374,7 @@ ENTRY(stub_x32_rt_sigreturn) +@@ -695,7 +1161,7 @@ ENTRY(stub_x32_rt_sigreturn) RESTORE_REST jmp int_ret_from_sys_call CFI_ENDPROC @@ -23660,7 +24081,7 @@ index 1e96c36..3ff710a 100644 ENTRY(stub_x32_execve) CFI_STARTPROC -@@ -915,7 +1388,7 @@ ENTRY(stub_x32_execve) +@@ -709,7 +1175,7 @@ ENTRY(stub_x32_execve) RESTORE_REST jmp int_ret_from_sys_call CFI_ENDPROC @@ -23669,7 +24090,7 @@ index 1e96c36..3ff710a 100644 #endif -@@ -952,7 +1425,7 @@ vector=vector+1 +@@ -746,7 +1212,7 @@ vector=vector+1 2: jmp common_interrupt .endr CFI_ENDPROC @@ -23678,7 +24099,7 @@ index 1e96c36..3ff710a 100644 .previous END(interrupt) -@@ -969,8 +1442,8 @@ END(interrupt) +@@ -763,8 +1229,8 @@ END(interrupt) /* 0(%rsp): ~(interrupt number) */ .macro interrupt func /* reserve pt_regs for scratch regs and rbp */ @@ -23689,7 +24110,7 @@ index 1e96c36..3ff710a 100644 SAVE_ARGS_IRQ call \func .endm -@@ -997,14 +1470,14 @@ ret_from_intr: +@@ -787,14 +1253,14 @@ ret_from_intr: /* Restore saved previous stack */ popq %rsi @@ -23708,7 +24129,7 @@ index 1e96c36..3ff710a 100644 je retint_kernel /* Interrupt came from user space */ -@@ -1026,12 +1499,16 @@ retint_swapgs: /* return to user-space */ +@@ -816,12 +1282,16 @@ retint_swapgs: /* return to user-space */ * The iretq could re-enable interrupts: */ DISABLE_INTERRUPTS(CLBR_ANY) @@ -23725,16 +24146,32 @@ index 1e96c36..3ff710a 100644 /* * The iretq could re-enable interrupts: */ -@@ -1112,7 +1589,7 @@ ENTRY(retint_kernel) +@@ -934,7 +1404,7 @@ ENTRY(retint_kernel) + jmp exit_intr #endif - CFI_ENDPROC -END(common_interrupt) +ENDPROC(common_interrupt) - /* - * End of kprobes section - */ -@@ -1130,7 +1607,7 @@ ENTRY(\sym) + + /* + * If IRET takes a fault on the espfix stack, then we +@@ -956,13 +1426,13 @@ __do_double_fault: + cmpq $native_irq_return_iret,%rax + jne do_double_fault /* This shouldn't happen... */ + movq PER_CPU_VAR(kernel_stack),%rax +- subq $(6*8-KERNEL_STACK_OFFSET),%rax /* Reset to original stack */ ++ subq $(6*8),%rax /* Reset to original stack */ + movq %rax,RSP(%rdi) + movq $0,(%rax) /* Missing (lost) #GP error code */ + movq $general_protection,RIP(%rdi) + retq + CFI_ENDPROC +-END(__do_double_fault) ++ENDPROC(__do_double_fault) + #else + # define __do_double_fault do_double_fault + #endif +@@ -979,7 +1449,7 @@ ENTRY(\sym) interrupt \do_sym jmp ret_from_intr CFI_ENDPROC @@ -23743,67 +24180,38 @@ index 1e96c36..3ff710a 100644 .endm #ifdef CONFIG_TRACING -@@ -1218,7 +1695,7 @@ ENTRY(\sym) - call \do_sym - jmp error_exit /* %ebx: no swapgs flag */ - CFI_ENDPROC --END(\sym) -+ENDPROC(\sym) - .endm - - .macro paranoidzeroentry sym do_sym -@@ -1236,10 +1713,10 @@ ENTRY(\sym) - call \do_sym - jmp paranoid_exit /* %ebx: no swapgs flag */ - CFI_ENDPROC --END(\sym) -+ENDPROC(\sym) - .endm - +@@ -1052,7 +1522,7 @@ apicinterrupt IRQ_WORK_VECTOR \ + /* + * Exception entry points. + */ -#define INIT_TSS_IST(x) PER_CPU_VAR(init_tss) + (TSS_ist + ((x) - 1) * 8) +#define INIT_TSS_IST(x) (TSS_ist + ((x) - 1) * 8)(%r13) - .macro paranoidzeroentry_ist sym do_sym ist + + .macro idtentry sym do_sym has_error_code:req paranoid=0 shift_ist=-1 ENTRY(\sym) - INTR_FRAME -@@ -1252,12 +1729,18 @@ ENTRY(\sym) - TRACE_IRQS_OFF_DEBUG - movq %rsp,%rdi /* pt_regs pointer */ - xorl %esi,%esi /* no error code */ +@@ -1103,6 +1573,12 @@ ENTRY(\sym) + .endif + + .if \shift_ist != -1 +#ifdef CONFIG_SMP + imul $TSS_size, PER_CPU_VAR(cpu_number), %r13d + lea init_tss(%r13), %r13 +#else + lea init_tss(%rip), %r13 +#endif - subq $EXCEPTION_STKSZ, INIT_TSS_IST(\ist) - call \do_sym - addq $EXCEPTION_STKSZ, INIT_TSS_IST(\ist) - jmp paranoid_exit /* %ebx: no swapgs flag */ - CFI_ENDPROC --END(\sym) -+ENDPROC(\sym) - .endm + subq $EXCEPTION_STKSZ, INIT_TSS_IST(\shift_ist) + .endif - .macro errorentry sym do_sym -@@ -1275,7 +1758,7 @@ ENTRY(\sym) - call \do_sym - jmp error_exit /* %ebx: no swapgs flag */ - CFI_ENDPROC --END(\sym) -+ENDPROC(\sym) - .endm +@@ -1119,7 +1595,7 @@ ENTRY(\sym) + .endif - #ifdef CONFIG_TRACING -@@ -1306,7 +1789,7 @@ ENTRY(\sym) - call \do_sym - jmp paranoid_exit /* %ebx: no swapgs flag */ CFI_ENDPROC -END(\sym) +ENDPROC(\sym) .endm - zeroentry divide_error do_divide_error -@@ -1336,9 +1819,10 @@ gs_change: + #ifdef CONFIG_TRACING +@@ -1160,9 +1636,10 @@ gs_change: 2: mfence /* workaround */ SWAPGS popfq_cfi @@ -23815,7 +24223,7 @@ index 1e96c36..3ff710a 100644 _ASM_EXTABLE(gs_change,bad_gs) .section .fixup,"ax" -@@ -1366,9 +1850,10 @@ ENTRY(do_softirq_own_stack) +@@ -1190,9 +1667,10 @@ ENTRY(do_softirq_own_stack) CFI_DEF_CFA_REGISTER rsp CFI_ADJUST_CFA_OFFSET -8 decl PER_CPU_VAR(irq_count) @@ -23826,8 +24234,8 @@ index 1e96c36..3ff710a 100644 +ENDPROC(do_softirq_own_stack) #ifdef CONFIG_XEN - zeroentry xen_hypervisor_callback xen_do_hypervisor_callback -@@ -1406,7 +1891,7 @@ ENTRY(xen_do_hypervisor_callback) # do_hypervisor_callback(struct *pt_regs) + idtentry xen_hypervisor_callback xen_do_hypervisor_callback has_error_code=0 +@@ -1230,7 +1708,7 @@ ENTRY(xen_do_hypervisor_callback) # do_hypervisor_callback(struct *pt_regs) decl PER_CPU_VAR(irq_count) jmp error_exit CFI_ENDPROC @@ -23836,7 +24244,7 @@ index 1e96c36..3ff710a 100644 /* * Hypervisor uses this for application faults while it executes. -@@ -1465,7 +1950,7 @@ ENTRY(xen_failsafe_callback) +@@ -1289,7 +1767,7 @@ ENTRY(xen_failsafe_callback) SAVE_ALL jmp error_exit CFI_ENDPROC @@ -23845,7 +24253,7 @@ index 1e96c36..3ff710a 100644 apicinterrupt3 HYPERVISOR_CALLBACK_VECTOR \ xen_hvm_callback_vector xen_evtchn_do_upcall -@@ -1517,18 +2002,33 @@ ENTRY(paranoid_exit) +@@ -1336,18 +1814,33 @@ ENTRY(paranoid_exit) DEFAULT_FRAME DISABLE_INTERRUPTS(CLBR_NONE) TRACE_IRQS_OFF_DEBUG @@ -23881,7 +24289,7 @@ index 1e96c36..3ff710a 100644 jmp irq_return paranoid_userspace: GET_THREAD_INFO(%rcx) -@@ -1557,7 +2057,7 @@ paranoid_schedule: +@@ -1376,7 +1869,7 @@ paranoid_schedule: TRACE_IRQS_OFF jmp paranoid_userspace CFI_ENDPROC @@ -23890,7 +24298,7 @@ index 1e96c36..3ff710a 100644 /* * Exception entry point. This expects an error code/orig_rax on the stack. -@@ -1584,12 +2084,23 @@ ENTRY(error_entry) +@@ -1403,12 +1896,23 @@ ENTRY(error_entry) movq_cfi r14, R14+8 movq_cfi r15, R15+8 xorl %ebx,%ebx @@ -23915,7 +24323,7 @@ index 1e96c36..3ff710a 100644 ret /* -@@ -1616,7 +2127,7 @@ bstep_iret: +@@ -1435,7 +1939,7 @@ bstep_iret: movq %rcx,RIP+8(%rsp) jmp error_swapgs CFI_ENDPROC @@ -23924,7 +24332,7 @@ index 1e96c36..3ff710a 100644 /* ebx: no swapgs flag (1: don't need swapgs, 0: need it) */ -@@ -1627,7 +2138,7 @@ ENTRY(error_exit) +@@ -1446,7 +1950,7 @@ ENTRY(error_exit) DISABLE_INTERRUPTS(CLBR_NONE) TRACE_IRQS_OFF GET_THREAD_INFO(%rcx) @@ -23933,7 +24341,7 @@ index 1e96c36..3ff710a 100644 jne retint_kernel LOCKDEP_SYS_EXIT_IRQ movl TI_flags(%rcx),%edx -@@ -1636,7 +2147,7 @@ ENTRY(error_exit) +@@ -1455,7 +1959,7 @@ ENTRY(error_exit) jnz retint_careful jmp retint_swapgs CFI_ENDPROC @@ -23942,7 +24350,7 @@ index 1e96c36..3ff710a 100644 /* * Test if a given stack is an NMI stack or not. -@@ -1694,9 +2205,11 @@ ENTRY(nmi) +@@ -1513,9 +2017,11 @@ ENTRY(nmi) * If %cs was not the kernel segment, then the NMI triggered in user * space, which means it is definitely not nested. */ @@ -23955,7 +24363,7 @@ index 1e96c36..3ff710a 100644 /* * Check the special variable on the stack to see if NMIs are * executing. -@@ -1730,8 +2243,7 @@ nested_nmi: +@@ -1549,8 +2055,7 @@ nested_nmi: 1: /* Set up the interrupted NMIs stack to jump to repeat_nmi */ @@ -23965,7 +24373,7 @@ index 1e96c36..3ff710a 100644 CFI_ADJUST_CFA_OFFSET 1*8 leaq -10*8(%rsp), %rdx pushq_cfi $__KERNEL_DS -@@ -1749,6 +2261,7 @@ nested_nmi_out: +@@ -1568,6 +2073,7 @@ nested_nmi_out: CFI_RESTORE rdx /* No need to check faults here */ @@ -23973,7 +24381,7 @@ index 1e96c36..3ff710a 100644 INTERRUPT_RETURN CFI_RESTORE_STATE -@@ -1845,13 +2358,13 @@ end_repeat_nmi: +@@ -1664,13 +2170,13 @@ end_repeat_nmi: subq $ORIG_RAX-R15, %rsp CFI_ADJUST_CFA_OFFSET ORIG_RAX-R15 /* @@ -23989,7 +24397,7 @@ index 1e96c36..3ff710a 100644 DEFAULT_FRAME 0 /* -@@ -1861,9 +2374,9 @@ end_repeat_nmi: +@@ -1680,9 +2186,9 @@ end_repeat_nmi: * NMI itself takes a page fault, the page fault that was preempted * will read the information from the NMI page fault and not the * origin fault. Save it off and restore it if it changes. @@ -24001,7 +24409,7 @@ index 1e96c36..3ff710a 100644 /* paranoidentry do_nmi, 0; without TRACE_IRQS_OFF */ movq %rsp,%rdi -@@ -1872,31 +2385,36 @@ end_repeat_nmi: +@@ -1691,29 +2197,34 @@ end_repeat_nmi: /* Did the NMI take a page fault? Restore cr2 if it did */ movq %cr2, %rcx @@ -24041,12 +24449,32 @@ index 1e96c36..3ff710a 100644 -END(ignore_sysret) +ENDPROC(ignore_sysret) - /* - * End of kprobes section +diff --git a/arch/x86/kernel/espfix_64.c b/arch/x86/kernel/espfix_64.c +index 94d857f..bf1f0bf 100644 +--- a/arch/x86/kernel/espfix_64.c ++++ b/arch/x86/kernel/espfix_64.c +@@ -197,7 +197,7 @@ void init_espfix_ap(void) + set_pte(&pte_p[n*PTE_STRIDE], pte); + + /* Job is done for this CPU and any CPU which shares this page */ +- ACCESS_ONCE(espfix_pages[page]) = stack_page; ++ ACCESS_ONCE_RW(espfix_pages[page]) = stack_page; + + unlock_done: + mutex_unlock(&espfix_init_mutex); diff --git a/arch/x86/kernel/ftrace.c b/arch/x86/kernel/ftrace.c -index 52819e8..b6d1dbd 100644 +index cbc4a91..b38ee45 100644 --- a/arch/x86/kernel/ftrace.c +++ b/arch/x86/kernel/ftrace.c +@@ -88,7 +88,7 @@ static unsigned long text_ip_addr(unsigned long ip) + * kernel identity mapping to modify code. + */ + if (within(ip, (unsigned long)_text, (unsigned long)_etext)) +- ip = (unsigned long)__va(__pa_symbol(ip)); ++ ip = (unsigned long)__va(__pa_symbol(ktla_ktva(ip))); + + return ip; + } @@ -104,6 +104,8 @@ ftrace_modify_code_direct(unsigned long ip, unsigned const char *old_code, { unsigned char replaced[MCOUNT_INSN_SIZE]; @@ -24065,16 +24493,7 @@ index 52819e8..b6d1dbd 100644 ftrace_update_func = ip; /* Make sure the breakpoints see the ftrace_update_func update */ -@@ -306,7 +308,7 @@ static int ftrace_write(unsigned long ip, const char *val, int size) - * kernel identity mapping to modify code. - */ - if (within(ip, (unsigned long)_text, (unsigned long)_etext)) -- ip = (unsigned long)__va(__pa_symbol(ip)); -+ ip = (unsigned long)__va(__pa_symbol(ktla_ktva(ip))); - - if (probe_kernel_write((void *)ip, val, size)) - return -EPERM; -@@ -319,7 +321,7 @@ static int add_break(unsigned long ip, const char *old) +@@ -310,7 +312,7 @@ static int add_break(unsigned long ip, const char *old) unsigned char replaced[MCOUNT_INSN_SIZE]; unsigned char brk = BREAKPOINT_INSTRUCTION; @@ -24084,7 +24503,7 @@ index 52819e8..b6d1dbd 100644 /* Make sure it is what we expect it to be */ diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c -index 068054f..c248bcd 100644 +index eda1a86..8f6df48 100644 --- a/arch/x86/kernel/head64.c +++ b/arch/x86/kernel/head64.c @@ -67,12 +67,12 @@ again: @@ -24129,7 +24548,7 @@ index 068054f..c248bcd 100644 pmd = (physaddr & PMD_MASK) + early_pmd_flags; pmd_p[pmd_index(address)] = pmd; @@ -175,7 +175,6 @@ asmlinkage __visible void __init x86_64_start_kernel(char * real_mode_data) - if (console_loglevel == 10) + if (console_loglevel >= CONSOLE_LOGLEVEL_DEBUG) early_printk("Kernel alive\n"); - clear_page(init_level4_pgt); @@ -24137,7 +24556,7 @@ index 068054f..c248bcd 100644 init_level4_pgt[511] = early_level4_pgt[511]; diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel/head_32.S -index f36bd42..56ee1534 100644 +index f36bd42..0ab4474 100644 --- a/arch/x86/kernel/head_32.S +++ b/arch/x86/kernel/head_32.S @@ -26,6 +26,12 @@ @@ -24549,7 +24968,7 @@ index f36bd42..56ee1534 100644 + .quad 0x00009b000000ffff /* 0xc0 APM CS 16 code (16 bit) */ + .quad 0x004093000000ffff /* 0xc8 APM DS data */ + -+ .quad 0x00c0930000000000 /* 0xd0 - ESPFIX SS */ ++ .quad 0x00c093000000ffff /* 0xd0 - ESPFIX SS */ + .quad 0x0040930000000000 /* 0xd8 - PERCPU */ + .quad 0x0040910000000017 /* 0xe0 - STACK_CANARY */ + .quad 0x0000000000000000 /* 0xe8 - PCIBIOS_CS */ @@ -24864,7 +25283,7 @@ index d5dd808..b6432cf 100644 /* diff --git a/arch/x86/kernel/i8259.c b/arch/x86/kernel/i8259.c -index 2e977b5..5f2c273 100644 +index 8af8171..f8c1169 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) @@ -24885,7 +25304,7 @@ index 2e977b5..5f2c273 100644 /* * Theoretically we do not have to handle this IRQ, * but in Linux this does not cause problems and is -@@ -332,14 +332,16 @@ static void init_8259A(int auto_eoi) +@@ -350,14 +350,16 @@ static void init_8259A(int auto_eoi) /* (slave's support for AEOI in flat mode is to be investigated) */ outb_pic(SLAVE_ICW4_DEFAULT, PIC_SLAVE_IMR); @@ -24965,7 +25384,7 @@ index 4ddaf66..49d5c18 100644 regs->flags = (regs->flags & ~X86_EFLAGS_IOPL) | (level << 12); t->iopl = level << 12; diff --git a/arch/x86/kernel/irq.c b/arch/x86/kernel/irq.c -index 11ccfb0..ec1e46f 100644 +index 922d285..6d20692 100644 --- a/arch/x86/kernel/irq.c +++ b/arch/x86/kernel/irq.c @@ -22,7 +22,7 @@ @@ -25297,10 +25716,10 @@ index 7ec1d5f..5a7d130 100644 } diff --git a/arch/x86/kernel/kprobes/core.c b/arch/x86/kernel/kprobes/core.c -index 61b17dc..784bfe9 100644 +index 67e6d19..731ed28 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) +@@ -120,9 +120,12 @@ __synthesize_relative_insn(void *from, void *to, u8 op) s32 raddr; } __packed *insn; @@ -25314,7 +25733,7 @@ index 61b17dc..784bfe9 100644 } /* Insert a jump instruction at address 'from', which jumps to address 'to'.*/ -@@ -164,7 +167,7 @@ int __kprobes can_boost(kprobe_opcode_t *opcodes) +@@ -168,7 +171,7 @@ int can_boost(kprobe_opcode_t *opcodes) kprobe_opcode_t opcode; kprobe_opcode_t *orig_opcodes = opcodes; @@ -25323,7 +25742,7 @@ index 61b17dc..784bfe9 100644 return 0; /* Page fault may occur on this address. */ retry: -@@ -238,9 +241,9 @@ __recover_probed_insn(kprobe_opcode_t *buf, unsigned long addr) +@@ -242,9 +245,9 @@ __recover_probed_insn(kprobe_opcode_t *buf, unsigned long addr) * for the first byte, we can recover the original instruction * from it and kp->opcode. */ @@ -25335,7 +25754,7 @@ index 61b17dc..784bfe9 100644 } /* -@@ -332,7 +335,9 @@ int __kprobes __copy_instruction(u8 *dest, u8 *src) +@@ -336,7 +339,9 @@ int __copy_instruction(u8 *dest, u8 *src) /* Another subsystem puts a breakpoint, failed to recover */ if (insn.opcode.bytes[0] == BREAKPOINT_INSTRUCTION) return 0; @@ -25345,7 +25764,7 @@ index 61b17dc..784bfe9 100644 #ifdef CONFIG_X86_64 if (insn_rip_relative(&insn)) { -@@ -359,7 +364,9 @@ int __kprobes __copy_instruction(u8 *dest, u8 *src) +@@ -363,7 +368,9 @@ int __copy_instruction(u8 *dest, u8 *src) return 0; } disp = (u8 *) dest + insn_offset_displacement(&insn); @@ -25355,7 +25774,7 @@ index 61b17dc..784bfe9 100644 } #endif return insn.length; -@@ -498,7 +505,7 @@ setup_singlestep(struct kprobe *p, struct pt_regs *regs, struct kprobe_ctlblk *k +@@ -505,7 +512,7 @@ static void setup_singlestep(struct kprobe *p, struct pt_regs *regs, * nor set current_kprobe, because it doesn't use single * stepping. */ @@ -25364,7 +25783,7 @@ index 61b17dc..784bfe9 100644 preempt_enable_no_resched(); return; } -@@ -515,9 +522,9 @@ setup_singlestep(struct kprobe *p, struct pt_regs *regs, struct kprobe_ctlblk *k +@@ -522,9 +529,9 @@ static void setup_singlestep(struct kprobe *p, struct pt_regs *regs, regs->flags &= ~X86_EFLAGS_IF; /* single step inline if the instruction is an int3 */ if (p->opcode == BREAKPOINT_INSTRUCTION) @@ -25374,9 +25793,18 @@ index 61b17dc..784bfe9 100644 - regs->ip = (unsigned long)p->ainsn.insn; + regs->ip = ktva_ktla((unsigned long)p->ainsn.insn); } + NOKPROBE_SYMBOL(setup_singlestep); - /* -@@ -596,7 +603,7 @@ static int __kprobes kprobe_handler(struct pt_regs *regs) +@@ -574,7 +581,7 @@ int kprobe_int3_handler(struct pt_regs *regs) + struct kprobe *p; + struct kprobe_ctlblk *kcb; + +- if (user_mode_vm(regs)) ++ if (user_mode(regs)) + return 0; + + addr = (kprobe_opcode_t *)(regs->ip - sizeof(kprobe_opcode_t)); +@@ -609,7 +616,7 @@ int kprobe_int3_handler(struct pt_regs *regs) setup_singlestep(p, regs, kcb, 0); return 1; } @@ -25385,7 +25813,7 @@ index 61b17dc..784bfe9 100644 /* * The breakpoint instruction was removed right * after we hit it. Another cpu has removed -@@ -642,6 +649,9 @@ static void __used __kprobes kretprobe_trampoline_holder(void) +@@ -656,6 +663,9 @@ static void __used kretprobe_trampoline_holder(void) " movq %rax, 152(%rsp)\n" RESTORE_REGS_STRING " popfq\n" @@ -25395,8 +25823,8 @@ index 61b17dc..784bfe9 100644 #else " pushf\n" SAVE_REGS_STRING -@@ -779,7 +789,7 @@ static void __kprobes - resume_execution(struct kprobe *p, struct pt_regs *regs, struct kprobe_ctlblk *kcb) +@@ -796,7 +806,7 @@ static void resume_execution(struct kprobe *p, struct pt_regs *regs, + struct kprobe_ctlblk *kcb) { unsigned long *tos = stack_addr(regs); - unsigned long copy_ip = (unsigned long)p->ainsn.insn; @@ -25404,7 +25832,7 @@ index 61b17dc..784bfe9 100644 unsigned long orig_ip = (unsigned long)p->addr; kprobe_opcode_t *insn = p->ainsn.insn; -@@ -959,7 +969,7 @@ kprobe_exceptions_notify(struct notifier_block *self, unsigned long val, void *d +@@ -979,7 +989,7 @@ int kprobe_exceptions_notify(struct notifier_block *self, unsigned long val, struct die_args *args = data; int ret = NOTIFY_DONE; @@ -25412,20 +25840,20 @@ index 61b17dc..784bfe9 100644 + if (args->regs && user_mode(args->regs)) return ret; - switch (val) { + if (val == DIE_GPF) { diff --git a/arch/x86/kernel/kprobes/opt.c b/arch/x86/kernel/kprobes/opt.c -index 898160b..758cde8 100644 +index f304773..551e63c 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) + static void 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 +@@ -86,6 +87,7 @@ static void synthesize_set_arg1(kprobe_opcode_t *addr, unsigned long val) *addr++ = 0xb8; #endif *(unsigned long *)addr = val; @@ -25433,7 +25861,7 @@ index 898160b..758cde8 100644 } asm ( -@@ -335,7 +337,7 @@ int __kprobes arch_prepare_optimized_kprobe(struct optimized_kprobe *op) +@@ -337,7 +339,7 @@ int arch_prepare_optimized_kprobe(struct optimized_kprobe *op) * Verify if the address gap is in 2GB range, because this uses * a relative jump. */ @@ -25442,7 +25870,7 @@ index 898160b..758cde8 100644 if (abs(rel) > 0x7fffffff) return -ERANGE; -@@ -350,16 +352,18 @@ int __kprobes arch_prepare_optimized_kprobe(struct optimized_kprobe *op) +@@ -352,16 +354,18 @@ int arch_prepare_optimized_kprobe(struct optimized_kprobe *op) op->optinsn.size = ret; /* Copy arch-dep-instance from template */ @@ -25464,7 +25892,7 @@ index 898160b..758cde8 100644 (u8 *)op->kp.addr + op->optinsn.size); flush_icache_range((unsigned long) buf, -@@ -384,7 +388,7 @@ void __kprobes arch_optimize_kprobes(struct list_head *oplist) +@@ -386,7 +390,7 @@ void arch_optimize_kprobes(struct list_head *oplist) WARN_ON(kprobe_disabled(&op->kp)); /* Backup instructions which will be replaced by jump address */ @@ -25473,7 +25901,7 @@ index 898160b..758cde8 100644 RELATIVE_ADDR_SIZE); insn_buf[0] = RELATIVEJUMP_OPCODE; -@@ -433,7 +437,7 @@ setup_detour_execution(struct kprobe *p, struct pt_regs *regs, int reenter) +@@ -434,7 +438,7 @@ int 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 */ @@ -25496,10 +25924,10 @@ index c2bedae..25e7ab60 100644 .name = "data", .mode = S_IRUGO, diff --git a/arch/x86/kernel/ldt.c b/arch/x86/kernel/ldt.c -index dcbbaa1..81ae763 100644 +index c37886d..d851d32 100644 --- a/arch/x86/kernel/ldt.c +++ b/arch/x86/kernel/ldt.c -@@ -68,13 +68,13 @@ static int alloc_ldt(mm_context_t *pc, int mincount, int reload) +@@ -66,13 +66,13 @@ static int alloc_ldt(mm_context_t *pc, int mincount, int reload) if (reload) { #ifdef CONFIG_SMP preempt_disable(); @@ -25515,7 +25943,7 @@ index dcbbaa1..81ae763 100644 #endif } if (oldsize) { -@@ -96,7 +96,7 @@ static inline int copy_ldt(mm_context_t *new, mm_context_t *old) +@@ -94,7 +94,7 @@ static inline int copy_ldt(mm_context_t *new, mm_context_t *old) return err; for (i = 0; i < old->size; i++) @@ -25524,7 +25952,7 @@ index dcbbaa1..81ae763 100644 return 0; } -@@ -117,6 +117,24 @@ int init_new_context(struct task_struct *tsk, struct mm_struct *mm) +@@ -115,6 +115,24 @@ int init_new_context(struct task_struct *tsk, struct mm_struct *mm) retval = copy_ldt(&mm->context, &old_mm->context); mutex_unlock(&old_mm->context.lock); } @@ -25549,7 +25977,7 @@ index dcbbaa1..81ae763 100644 return retval; } -@@ -231,6 +249,13 @@ static int write_ldt(void __user *ptr, unsigned long bytecount, int oldmode) +@@ -229,6 +247,13 @@ static int write_ldt(void __user *ptr, unsigned long bytecount, int oldmode) } } @@ -25560,9 +25988,9 @@ index dcbbaa1..81ae763 100644 + } +#endif + - /* - * On x86-64 we do not support 16-bit segments due to - * IRET leaking the high bits of the kernel stack address. + if (!IS_ENABLED(CONFIG_X86_16BIT) && !ldt_info.seg_32bit) { + error = -EINVAL; + goto out_unlock; diff --git a/arch/x86/kernel/machine_kexec_32.c b/arch/x86/kernel/machine_kexec_32.c index 1667b1d..16492c5 100644 --- a/arch/x86/kernel/machine_kexec_32.c @@ -25594,6 +26022,92 @@ index 1667b1d..16492c5 100644 relocate_kernel_ptr = control_page; page_list[PA_CONTROL_PAGE] = __pa(control_page); +diff --git a/arch/x86/kernel/mcount_64.S b/arch/x86/kernel/mcount_64.S +index c050a01..5774072 100644 +--- a/arch/x86/kernel/mcount_64.S ++++ b/arch/x86/kernel/mcount_64.S +@@ -7,7 +7,7 @@ + #include + #include + #include +- ++#include + + .code64 + .section .entry.text, "ax" +@@ -24,8 +24,9 @@ + #ifdef CONFIG_DYNAMIC_FTRACE + + ENTRY(function_hook) ++ pax_force_retaddr + retq +-END(function_hook) ++ENDPROC(function_hook) + + /* skip is set if stack has been adjusted */ + .macro ftrace_caller_setup skip=0 +@@ -66,8 +67,9 @@ GLOBAL(ftrace_graph_call) + #endif + + GLOBAL(ftrace_stub) ++ pax_force_retaddr + retq +-END(ftrace_caller) ++ENDPROC(ftrace_caller) + + ENTRY(ftrace_regs_caller) + /* Save the current flags before compare (in SS location)*/ +@@ -135,7 +137,7 @@ ftrace_restore_flags: + popfq + jmp ftrace_stub + +-END(ftrace_regs_caller) ++ENDPROC(ftrace_regs_caller) + + + #else /* ! CONFIG_DYNAMIC_FTRACE */ +@@ -156,6 +158,7 @@ ENTRY(function_hook) + #endif + + GLOBAL(ftrace_stub) ++ pax_force_retaddr + retq + + trace: +@@ -169,12 +172,13 @@ trace: + #endif + subq $MCOUNT_INSN_SIZE, %rdi + ++ pax_force_fptr ftrace_trace_function + call *ftrace_trace_function + + MCOUNT_RESTORE_FRAME + + jmp ftrace_stub +-END(function_hook) ++ENDPROC(function_hook) + #endif /* CONFIG_DYNAMIC_FTRACE */ + #endif /* CONFIG_FUNCTION_TRACER */ + +@@ -196,8 +200,9 @@ ENTRY(ftrace_graph_caller) + + MCOUNT_RESTORE_FRAME + ++ pax_force_retaddr + retq +-END(ftrace_graph_caller) ++ENDPROC(ftrace_graph_caller) + + GLOBAL(return_to_handler) + subq $24, %rsp +@@ -213,5 +218,7 @@ GLOBAL(return_to_handler) + movq 8(%rsp), %rdx + movq (%rsp), %rax + addq $24, %rsp ++ pax_force_fptr %rdi + jmp *%rdi ++ENDPROC(return_to_handler) + #endif diff --git a/arch/x86/kernel/module.c b/arch/x86/kernel/module.c index e69f988..da078ea 100644 --- a/arch/x86/kernel/module.c @@ -25779,7 +26293,7 @@ index c9603ac..9f88728 100644 }; diff --git a/arch/x86/kernel/nmi.c b/arch/x86/kernel/nmi.c -index b4872b9..5bf0684 100644 +index c3e985d..110a36a 100644 --- a/arch/x86/kernel/nmi.c +++ b/arch/x86/kernel/nmi.c @@ -98,16 +98,16 @@ fs_initcall(nmi_warning_debugfs); @@ -25801,8 +26315,8 @@ index b4872b9..5bf0684 100644 + n->action->handler, whole_msecs, decimal_msecs); } - static int __kprobes nmi_handle(unsigned int type, struct pt_regs *regs, bool b2b) -@@ -134,11 +134,11 @@ static int __kprobes nmi_handle(unsigned int type, struct pt_regs *regs, bool b2 + static int nmi_handle(unsigned int type, struct pt_regs *regs, bool b2b) +@@ -134,11 +134,11 @@ static int nmi_handle(unsigned int type, struct pt_regs *regs, bool b2b) delta = sched_clock() - delta; trace_nmi_handler(a->handler, (int)delta, thishandled); @@ -25817,16 +26331,16 @@ index b4872b9..5bf0684 100644 } rcu_read_unlock(); -@@ -147,7 +147,7 @@ static int __kprobes nmi_handle(unsigned int type, struct pt_regs *regs, bool b2 - return handled; +@@ -148,7 +148,7 @@ static int nmi_handle(unsigned int type, struct pt_regs *regs, bool b2b) } + NOKPROBE_SYMBOL(nmi_handle); -int __register_nmi_handler(unsigned int type, struct nmiaction *action) +int __register_nmi_handler(unsigned int type, const struct nmiaction *action) { struct nmi_desc *desc = nmi_to_desc(type); unsigned long flags; -@@ -155,7 +155,8 @@ int __register_nmi_handler(unsigned int type, struct nmiaction *action) +@@ -156,7 +156,8 @@ int __register_nmi_handler(unsigned int type, struct nmiaction *action) if (!action->handler) return -EINVAL; @@ -25836,7 +26350,7 @@ index b4872b9..5bf0684 100644 spin_lock_irqsave(&desc->lock, flags); -@@ -173,9 +174,9 @@ int __register_nmi_handler(unsigned int type, struct nmiaction *action) +@@ -174,9 +175,9 @@ int __register_nmi_handler(unsigned int type, struct nmiaction *action) * event confuses some handlers (kdump uses this flag) */ if (action->flags & NMI_FLAG_FIRST) @@ -25848,7 +26362,7 @@ index b4872b9..5bf0684 100644 spin_unlock_irqrestore(&desc->lock, flags); return 0; -@@ -198,7 +199,7 @@ void unregister_nmi_handler(unsigned int type, const char *name) +@@ -199,7 +200,7 @@ void unregister_nmi_handler(unsigned int type, const char *name) if (!strcmp(n->name, name)) { WARN(in_nmi(), "Trying to free NMI (%s) from NMI context!\n", n->name); @@ -25857,8 +26371,8 @@ index b4872b9..5bf0684 100644 break; } } -@@ -523,6 +524,17 @@ static inline void nmi_nesting_postprocess(void) - dotraplinkage notrace __kprobes void +@@ -528,6 +529,17 @@ static inline void nmi_nesting_postprocess(void) + dotraplinkage notrace void do_nmi(struct pt_regs *regs, long error_code) { + @@ -25911,10 +26425,10 @@ index bbb6c73..24a58ef 100644 .lock_spinning = __PV_IS_CALLEE_SAVE(paravirt_nop), .unlock_kick = paravirt_nop, diff --git a/arch/x86/kernel/paravirt.c b/arch/x86/kernel/paravirt.c -index 1b10af8..45bfbec 100644 +index 548d25f..f8fb99c 100644 --- a/arch/x86/kernel/paravirt.c +++ b/arch/x86/kernel/paravirt.c -@@ -55,6 +55,9 @@ u64 _paravirt_ident_64(u64 x) +@@ -56,6 +56,9 @@ u64 _paravirt_ident_64(u64 x) { return x; } @@ -25924,7 +26438,7 @@ index 1b10af8..45bfbec 100644 void __init default_banner(void) { -@@ -141,16 +144,20 @@ unsigned paravirt_patch_default(u8 type, u16 clobbers, void *insnbuf, +@@ -142,16 +145,20 @@ unsigned paravirt_patch_default(u8 type, u16 clobbers, void *insnbuf, if (opfunc == NULL) /* If there's no function, patch it with a ud2a (BUG) */ @@ -25949,7 +26463,7 @@ index 1b10af8..45bfbec 100644 else if (type == PARAVIRT_PATCH(pv_cpu_ops.iret) || type == PARAVIRT_PATCH(pv_cpu_ops.irq_enable_sysexit) || -@@ -175,7 +182,7 @@ unsigned paravirt_patch_insns(void *insnbuf, unsigned len, +@@ -176,7 +183,7 @@ unsigned paravirt_patch_insns(void *insnbuf, unsigned len, if (insn_len > len || start == NULL) insn_len = len; else @@ -25958,7 +26472,7 @@ index 1b10af8..45bfbec 100644 return insn_len; } -@@ -299,7 +306,7 @@ enum paravirt_lazy_mode paravirt_get_lazy_mode(void) +@@ -300,7 +307,7 @@ enum paravirt_lazy_mode paravirt_get_lazy_mode(void) return this_cpu_read(paravirt_lazy_mode); } @@ -25967,7 +26481,7 @@ index 1b10af8..45bfbec 100644 .name = "bare hardware", .paravirt_enabled = 0, .kernel_rpl = 0, -@@ -310,16 +317,16 @@ struct pv_info pv_info = { +@@ -311,16 +318,16 @@ struct pv_info pv_info = { #endif }; @@ -25987,7 +26501,7 @@ index 1b10af8..45bfbec 100644 .save_fl = __PV_IS_CALLEE_SAVE(native_save_fl), .restore_fl = __PV_IS_CALLEE_SAVE(native_restore_fl), .irq_disable = __PV_IS_CALLEE_SAVE(native_irq_disable), -@@ -331,7 +338,7 @@ __visible struct pv_irq_ops pv_irq_ops = { +@@ -332,7 +339,7 @@ __visible struct pv_irq_ops pv_irq_ops = { #endif }; @@ -25996,9 +26510,9 @@ index 1b10af8..45bfbec 100644 .cpuid = native_cpuid, .get_debugreg = native_get_debugreg, .set_debugreg = native_set_debugreg, -@@ -389,21 +396,26 @@ __visible struct pv_cpu_ops pv_cpu_ops = { - .end_context_switch = paravirt_nop, - }; +@@ -395,21 +402,26 @@ NOKPROBE_SYMBOL(native_get_debugreg); + NOKPROBE_SYMBOL(native_set_debugreg); + NOKPROBE_SYMBOL(native_load_idt); -struct pv_apic_ops pv_apic_ops = { +struct pv_apic_ops pv_apic_ops __read_only= { @@ -26026,7 +26540,7 @@ index 1b10af8..45bfbec 100644 .read_cr2 = native_read_cr2, .write_cr2 = native_write_cr2, -@@ -453,6 +465,7 @@ struct pv_mmu_ops pv_mmu_ops = { +@@ -459,6 +471,7 @@ struct pv_mmu_ops pv_mmu_ops = { .make_pud = PTE_IDENT, .set_pgd = native_set_pgd, @@ -26034,7 +26548,7 @@ index 1b10af8..45bfbec 100644 #endif #endif /* PAGETABLE_LEVELS >= 3 */ -@@ -473,6 +486,12 @@ struct pv_mmu_ops pv_mmu_ops = { +@@ -479,6 +492,12 @@ struct pv_mmu_ops pv_mmu_ops = { }, .set_fixmap = native_set_fixmap, @@ -26074,18 +26588,18 @@ index 35ccf75..7a15747 100644 #define DEBUG 1 diff --git a/arch/x86/kernel/pci-swiotlb.c b/arch/x86/kernel/pci-swiotlb.c -index 6c483ba..d10ce2f 100644 +index 77dd0ad..9ec4723 100644 --- a/arch/x86/kernel/pci-swiotlb.c +++ b/arch/x86/kernel/pci-swiotlb.c -@@ -32,7 +32,7 @@ static void x86_swiotlb_free_coherent(struct device *dev, size_t size, - void *vaddr, dma_addr_t dma_addr, +@@ -33,7 +33,7 @@ void x86_swiotlb_free_coherent(struct device *dev, size_t size, struct dma_attrs *attrs) { -- swiotlb_free_coherent(dev, size, vaddr, dma_addr); -+ swiotlb_free_coherent(dev, size, vaddr, dma_addr, attrs); + if (is_swiotlb_buffer(dma_to_phys(dev, dma_addr))) +- swiotlb_free_coherent(dev, size, vaddr, dma_addr); ++ swiotlb_free_coherent(dev, size, vaddr, dma_addr, attrs); + else + dma_generic_free_coherent(dev, size, vaddr, dma_addr, attrs); } - - static struct dma_map_ops swiotlb_dma_ops = { diff --git a/arch/x86/kernel/preempt.S b/arch/x86/kernel/preempt.S index ca7f0d5..8996469 100644 --- a/arch/x86/kernel/preempt.S @@ -26330,7 +26844,7 @@ index 7bc86bb..0ea06e8 100644 } - diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c -index 898d077..4c458ff 100644 +index ca5b02d..c0b2f6a 100644 --- a/arch/x86/kernel/process_64.c +++ b/arch/x86/kernel/process_64.c @@ -158,10 +158,11 @@ int copy_thread(unsigned long clone_flags, unsigned long sp, @@ -26393,7 +26907,7 @@ index 898d077..4c458ff 100644 /* * Now maybe reload the debug registers and handle I/O bitmaps -@@ -442,12 +447,11 @@ unsigned long get_wchan(struct task_struct *p) +@@ -443,12 +448,11 @@ unsigned long get_wchan(struct task_struct *p) if (!p || p == current || p->state == TASK_RUNNING) return 0; stack = (unsigned long)task_stack_page(p); @@ -26714,7 +27228,7 @@ index 3fd2c69..a444264 100644 identity_mapped: /* set return address to 0 if not preserving context */ diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c -index 09c76d2..7f33fc2 100644 +index 78a0e62..5c2e510 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c @@ -110,6 +110,7 @@ @@ -26907,7 +27421,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 9e5de68..16c53cb 100644 +index 2851d63..83bf567 100644 --- a/arch/x86/kernel/signal.c +++ b/arch/x86/kernel/signal.c @@ -190,7 +190,7 @@ static unsigned long align_sigframe(unsigned long sp) @@ -26919,19 +27433,20 @@ index 9e5de68..16c53cb 100644 #else /* !CONFIG_X86_32 */ sp = round_down(sp, 16) - 8; #endif -@@ -298,9 +298,9 @@ __setup_frame(int sig, struct ksignal *ksig, sigset_t *set, +@@ -298,10 +298,9 @@ __setup_frame(int sig, struct ksignal *ksig, sigset_t *set, } if (current->mm->context.vdso) -- restorer = VDSO32_SYMBOL(current->mm->context.vdso, sigreturn); -+ restorer = (__force void __user *)VDSO32_SYMBOL(current->mm->context.vdso, sigreturn); +- restorer = current->mm->context.vdso + +- selected_vdso32->sym___kernel_sigreturn; ++ restorer = (void __force_user *)(current->mm->context.vdso + selected_vdso32->sym___kernel_sigreturn); else - restorer = &frame->retcode; + restorer = (void __user *)&frame->retcode; if (ksig->ka.sa.sa_flags & SA_RESTORER) restorer = ksig->ka.sa.sa_restorer; -@@ -314,7 +314,7 @@ __setup_frame(int sig, struct ksignal *ksig, sigset_t *set, +@@ -315,7 +314,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. */ @@ -26940,19 +27455,20 @@ index 9e5de68..16c53cb 100644 if (err) return -EFAULT; -@@ -361,7 +361,10 @@ static int __setup_rt_frame(int sig, struct ksignal *ksig, +@@ -362,8 +361,10 @@ static int __setup_rt_frame(int sig, struct ksignal *ksig, save_altstack_ex(&frame->uc.uc_stack, regs->sp); /* Set up to return from userspace. */ -- restorer = VDSO32_SYMBOL(current->mm->context.vdso, rt_sigreturn); +- restorer = current->mm->context.vdso + +- selected_vdso32->sym___kernel_rt_sigreturn; + if (current->mm->context.vdso) -+ restorer = (__force void __user *)VDSO32_SYMBOL(current->mm->context.vdso, rt_sigreturn); ++ restorer = (void __force_user *)(current->mm->context.vdso + selected_vdso32->sym___kernel_rt_sigreturn); + else -+ restorer = (void __user *)&frame->retcode; ++ 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); -@@ -373,7 +376,7 @@ static int __setup_rt_frame(int sig, struct ksignal *ksig, +@@ -375,7 +376,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. */ @@ -26961,7 +27477,7 @@ index 9e5de68..16c53cb 100644 } put_user_catch(err); err |= copy_siginfo_to_user(&frame->info, &ksig->info); -@@ -609,7 +612,12 @@ setup_rt_frame(struct ksignal *ksig, struct pt_regs *regs) +@@ -611,7 +612,12 @@ setup_rt_frame(struct ksignal *ksig, struct pt_regs *regs) { int usig = signr_convert(ksig->sig); sigset_t *set = sigmask_to_save(); @@ -26975,7 +27491,7 @@ index 9e5de68..16c53cb 100644 /* Set up the stack frame */ if (is_ia32_frame()) { -@@ -620,7 +628,7 @@ setup_rt_frame(struct ksignal *ksig, struct pt_regs *regs) +@@ -622,7 +628,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 { @@ -26998,7 +27514,7 @@ index be8e1bd..a3d93fa 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 ae2fd975..c0c8d10 100644 +index 5492798..a3bd4f2 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c @@ -230,14 +230,17 @@ static void notrace start_secondary(void *unused) @@ -27023,7 +27539,7 @@ index ae2fd975..c0c8d10 100644 /* * Check TSC synchronization with the BP: */ -@@ -757,8 +760,9 @@ static int do_boot_cpu(int apicid, int cpu, struct task_struct *idle) +@@ -764,8 +767,9 @@ static int do_boot_cpu(int apicid, int cpu, struct task_struct *idle) alternatives_enable_smp(); idle->thread.sp = (unsigned long) (((struct pt_regs *) @@ -27034,7 +27550,7 @@ index ae2fd975..c0c8d10 100644 #ifdef CONFIG_X86_32 /* Stack for startup_32 can be just as for start_secondary onwards */ -@@ -767,10 +771,10 @@ static int do_boot_cpu(int apicid, int cpu, struct task_struct *idle) +@@ -774,10 +778,10 @@ static int do_boot_cpu(int apicid, int cpu, struct task_struct *idle) clear_tsk_thread_flag(idle, TIF_FORK); initial_gs = per_cpu_offset(cpu); #endif @@ -27048,7 +27564,7 @@ index ae2fd975..c0c8d10 100644 initial_code = (unsigned long)start_secondary; stack_start = idle->thread.sp; -@@ -916,6 +920,15 @@ int native_cpu_up(unsigned int cpu, struct task_struct *tidle) +@@ -923,6 +927,15 @@ int native_cpu_up(unsigned int cpu, struct task_struct *tidle) /* the FPU context is blank, nobody can own it */ __cpu_disable_lazy_restore(cpu); @@ -27520,10 +28036,10 @@ index 1c113db..287b42e 100644 static int trace_irq_vector_refcount; static DEFINE_MUTEX(irq_vector_mutex); diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c -index f73b5d4..0adcc9a 100644 +index 0d0e922..0886373 100644 --- a/arch/x86/kernel/traps.c +++ b/arch/x86/kernel/traps.c -@@ -66,7 +66,7 @@ +@@ -67,7 +67,7 @@ #include /* No need to be aligned, but done to keep all IDTs defined the same way. */ @@ -27532,7 +28048,7 @@ index f73b5d4..0adcc9a 100644 #else #include #include -@@ -75,7 +75,7 @@ asmlinkage int system_call(void); +@@ -76,7 +76,7 @@ asmlinkage int system_call(void); #endif /* Must be page-aligned because the real IDT is used in a fixmap. */ @@ -27541,10 +28057,10 @@ index f73b5d4..0adcc9a 100644 DECLARE_BITMAP(used_vectors, NR_VECTORS); EXPORT_SYMBOL_GPL(used_vectors); -@@ -107,11 +107,11 @@ static inline void preempt_conditional_cli(struct pt_regs *regs) +@@ -108,11 +108,11 @@ static inline void preempt_conditional_cli(struct pt_regs *regs) } - static int __kprobes + static nokprobe_inline int -do_trap_no_signal(struct task_struct *tsk, int trapnr, char *str, +do_trap_no_signal(struct task_struct *tsk, int trapnr, const char *str, struct pt_regs *regs, long error_code) @@ -27555,7 +28071,7 @@ index f73b5d4..0adcc9a 100644 /* * Traps 0, 1, 3, 4, and 5 should be forwarded to vm86. * On nmi (interrupt 2), do_trap should not be called. -@@ -124,12 +124,24 @@ do_trap_no_signal(struct task_struct *tsk, int trapnr, char *str, +@@ -125,12 +125,24 @@ do_trap_no_signal(struct task_struct *tsk, int trapnr, char *str, return -1; } #endif @@ -27581,16 +28097,16 @@ index f73b5d4..0adcc9a 100644 return 0; } -@@ -137,7 +149,7 @@ do_trap_no_signal(struct task_struct *tsk, int trapnr, char *str, +@@ -169,7 +181,7 @@ static siginfo_t *fill_trap_info(struct pt_regs *regs, int signr, int trapnr, } - static void __kprobes + static void -do_trap(int trapnr, int signr, char *str, struct pt_regs *regs, +do_trap(int trapnr, int signr, const char *str, struct pt_regs *regs, long error_code, siginfo_t *info) { struct task_struct *tsk = current; -@@ -161,7 +173,7 @@ do_trap(int trapnr, int signr, char *str, struct pt_regs *regs, +@@ -193,7 +205,7 @@ do_trap(int trapnr, int signr, char *str, struct pt_regs *regs, if (show_unhandled_signals && unhandled_signal(tsk, signr) && printk_ratelimit()) { pr_info("%s[%d] trap %s ip:%lx sp:%lx error:%lx", @@ -27599,7 +28115,7 @@ index f73b5d4..0adcc9a 100644 regs->ip, regs->sp, error_code); print_vma_addr(" in ", regs->ip); pr_cont("\n"); -@@ -251,6 +263,11 @@ dotraplinkage void do_double_fault(struct pt_regs *regs, long error_code) +@@ -266,6 +278,11 @@ dotraplinkage void do_double_fault(struct pt_regs *regs, long error_code) tsk->thread.error_code = error_code; tsk->thread.trap_nr = X86_TRAP_DF; @@ -27611,7 +28127,7 @@ index f73b5d4..0adcc9a 100644 #ifdef CONFIG_DOUBLEFAULT df_debug(regs, error_code); #endif -@@ -273,7 +290,7 @@ do_general_protection(struct pt_regs *regs, long error_code) +@@ -288,7 +305,7 @@ do_general_protection(struct pt_regs *regs, long error_code) conditional_sti(regs); #ifdef CONFIG_X86_32 @@ -27620,7 +28136,7 @@ index f73b5d4..0adcc9a 100644 local_irq_enable(); handle_vm86_fault((struct kernel_vm86_regs *) regs, error_code); goto exit; -@@ -281,18 +298,42 @@ do_general_protection(struct pt_regs *regs, long error_code) +@@ -296,18 +313,42 @@ do_general_protection(struct pt_regs *regs, long error_code) #endif tsk = current; @@ -27665,7 +28181,7 @@ index f73b5d4..0adcc9a 100644 tsk->thread.error_code = error_code; tsk->thread.trap_nr = X86_TRAP_GP; -@@ -453,7 +494,7 @@ dotraplinkage void __kprobes do_debug(struct pt_regs *regs, long error_code) +@@ -481,7 +522,7 @@ dotraplinkage void do_debug(struct pt_regs *regs, long error_code) /* It's safe to allow irq's after DR6 has been saved */ preempt_conditional_sti(regs); @@ -27674,7 +28190,7 @@ index f73b5d4..0adcc9a 100644 handle_vm86_trap((struct kernel_vm86_regs *) regs, error_code, X86_TRAP_DB); preempt_conditional_cli(regs); -@@ -468,7 +509,7 @@ dotraplinkage void __kprobes do_debug(struct pt_regs *regs, long error_code) +@@ -496,7 +537,7 @@ dotraplinkage void do_debug(struct pt_regs *regs, long error_code) * We already checked v86 mode above, so we can check for kernel mode * by just checking the CPL of CS. */ @@ -27683,7 +28199,7 @@ index f73b5d4..0adcc9a 100644 tsk->thread.debugreg6 &= ~DR_STEP; set_tsk_thread_flag(tsk, TIF_SINGLESTEP); regs->flags &= ~X86_EFLAGS_TF; -@@ -500,7 +541,7 @@ void math_error(struct pt_regs *regs, int error_code, int trapnr) +@@ -529,7 +570,7 @@ static void math_error(struct pt_regs *regs, int error_code, int trapnr) return; conditional_sti(regs); @@ -27693,7 +28209,7 @@ index f73b5d4..0adcc9a 100644 if (!fixup_exception(regs)) { task->thread.error_code = error_code; diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c -index 57e5ce1..20b0040 100644 +index ea03031..34a5cdda 100644 --- a/arch/x86/kernel/tsc.c +++ b/arch/x86/kernel/tsc.c @@ -150,7 +150,7 @@ static void cyc2ns_write_end(int cpu, struct cyc2ns_data *data) @@ -27706,10 +28222,10 @@ index 57e5ce1..20b0040 100644 /* diff --git a/arch/x86/kernel/uprobes.c b/arch/x86/kernel/uprobes.c -index 2ed8459..7cf329f 100644 +index 5d1cbfe..2a21feb 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, +@@ -845,7 +845,7 @@ int arch_uprobe_exception_notify(struct notifier_block *self, unsigned long val, int ret = NOTIFY_DONE; /* We are only interested in userspace traps */ @@ -27718,9 +28234,9 @@ index 2ed8459..7cf329f 100644 return NOTIFY_DONE; switch (val) { -@@ -719,7 +719,7 @@ arch_uretprobe_hijack_return_addr(unsigned long trampoline_vaddr, struct pt_regs +@@ -919,7 +919,7 @@ arch_uretprobe_hijack_return_addr(unsigned long trampoline_vaddr, struct pt_regs - if (ncopied != rasize) { + if (nleft != rasize) { pr_err("uprobe: return address clobbered: pid=%d, %%sp=%#lx, " - "%%ip=%#lx\n", current->pid, regs->sp, regs->ip); + "%%ip=%#lx\n", task_pid_nr(current), regs->sp, regs->ip); @@ -28072,7 +28588,7 @@ index 49edf2d..c0d1362 100644 #ifdef CONFIG_SMP diff --git a/arch/x86/kernel/vsyscall_64.c b/arch/x86/kernel/vsyscall_64.c -index 8b3b3eb..9395aa9 100644 +index e1e1e80..1400089 100644 --- a/arch/x86/kernel/vsyscall_64.c +++ b/arch/x86/kernel/vsyscall_64.c @@ -54,15 +54,13 @@ @@ -28102,18 +28618,18 @@ index 8b3b3eb..9395aa9 100644 } /* -@@ -332,10 +329,7 @@ void __init map_vsyscall(void) +@@ -331,10 +328,7 @@ void __init map_vsyscall(void) + extern char __vsyscall_page; unsigned long physaddr_vsyscall = __pa_symbol(&__vsyscall_page); - unsigned long physaddr_vvar_page = __pa_symbol(&__vvar_page); -- __set_fixmap(VSYSCALL_FIRST_PAGE, physaddr_vsyscall, +- __set_fixmap(VSYSCALL_PAGE, physaddr_vsyscall, - vsyscall_mode == NATIVE - ? PAGE_KERNEL_VSYSCALL - : PAGE_KERNEL_VVAR); -+ __set_fixmap(VSYSCALL_FIRST_PAGE, physaddr_vsyscall, PAGE_KERNEL_VVAR); - BUILD_BUG_ON((unsigned long)__fix_to_virt(VSYSCALL_FIRST_PAGE) != - (unsigned long)VSYSCALL_START); - ++ __set_fixmap(VSYSCALL_PAGE, physaddr_vsyscall, PAGE_KERNEL_VVAR); + BUILD_BUG_ON((unsigned long)__fix_to_virt(VSYSCALL_PAGE) != + (unsigned long)VSYSCALL_ADDR); + } diff --git a/arch/x86/kernel/x8664_ksyms_64.c b/arch/x86/kernel/x8664_ksyms_64.c index 04068192..4d75aa6 100644 --- a/arch/x86/kernel/x8664_ksyms_64.c @@ -28218,7 +28734,7 @@ index a4b451c..8dfe1ad 100644 if ((unsigned long)buf % 64 || fx_only) { u64 init_bv = pcntxt_mask & ~XSTATE_FPSSE; diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c -index f47a104..5ce59a8 100644 +index 38a0afe..94421a9 100644 --- a/arch/x86/kvm/cpuid.c +++ b/arch/x86/kvm/cpuid.c @@ -166,15 +166,20 @@ int kvm_vcpu_ioctl_set_cpuid2(struct kvm_vcpu *vcpu, @@ -28269,7 +28785,7 @@ index f47a104..5ce59a8 100644 out: diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c -index 0069118..c28ec0a 100644 +index 453e5fb..214168f 100644 --- a/arch/x86/kvm/lapic.c +++ b/arch/x86/kvm/lapic.c @@ -55,7 +55,7 @@ @@ -28282,7 +28798,7 @@ index 0069118..c28ec0a 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 123efd3..ad7726e 100644 +index 4107765..d9eb358 100644 --- a/arch/x86/kvm/paging_tmpl.h +++ b/arch/x86/kvm/paging_tmpl.h @@ -331,7 +331,7 @@ retry_walk: @@ -28295,10 +28811,10 @@ index 123efd3..ad7726e 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 7f4f9c2..67b1db0 100644 +index b5e994a..35b5866 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c -@@ -3535,7 +3535,11 @@ static void reload_tss(struct kvm_vcpu *vcpu) +@@ -3541,7 +3541,11 @@ static void reload_tss(struct kvm_vcpu *vcpu) int cpu = raw_smp_processor_id(); struct svm_cpu_data *sd = per_cpu(svm_data, cpu); @@ -28310,7 +28826,7 @@ index 7f4f9c2..67b1db0 100644 load_TR_desc(); } -@@ -3936,6 +3940,10 @@ static void svm_vcpu_run(struct kvm_vcpu *vcpu) +@@ -3942,6 +3946,10 @@ static void svm_vcpu_run(struct kvm_vcpu *vcpu) #endif #endif @@ -28322,7 +28838,7 @@ index 7f4f9c2..67b1db0 100644 local_irq_disable(); diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c -index 138ceff..2e584f0 100644 +index 801332e..eeff1cc 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -1339,12 +1339,12 @@ static void vmcs_write64(unsigned long field, u64 value) @@ -28406,7 +28922,7 @@ index 138ceff..2e584f0 100644 if (nested) nested_vmx_setup_ctls_msrs(); -@@ -4235,7 +4248,10 @@ static void vmx_set_constant_host_state(struct vcpu_vmx *vmx) +@@ -4221,7 +4234,10 @@ static void vmx_set_constant_host_state(struct vcpu_vmx *vmx) vmcs_writel(HOST_CR0, read_cr0() & ~X86_CR0_TS); /* 22.2.3 */ vmcs_writel(HOST_CR4, read_cr4()); /* 22.2.3, 22.2.5 */ @@ -28417,7 +28933,7 @@ index 138ceff..2e584f0 100644 vmcs_write16(HOST_CS_SELECTOR, __KERNEL_CS); /* 22.2.4 */ #ifdef CONFIG_X86_64 -@@ -4257,7 +4273,7 @@ static void vmx_set_constant_host_state(struct vcpu_vmx *vmx) +@@ -4243,7 +4259,7 @@ static void vmx_set_constant_host_state(struct vcpu_vmx *vmx) vmcs_writel(HOST_IDTR_BASE, dt.address); /* 22.2.4 */ vmx->host_idt_base = dt.address; @@ -28426,7 +28942,7 @@ index 138ceff..2e584f0 100644 rdmsr(MSR_IA32_SYSENTER_CS, low32, high32); vmcs_write32(HOST_IA32_SYSENTER_CS, low32); -@@ -7333,6 +7349,12 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu) +@@ -7413,6 +7429,12 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu) "jmp 2f \n\t" "1: " __ex(ASM_VMX_VMRESUME) "\n\t" "2: " @@ -28439,7 +28955,7 @@ index 138ceff..2e584f0 100644 /* Save guest registers, load host registers, keep flags */ "mov %0, %c[wordsize](%%" _ASM_SP ") \n\t" "pop %0 \n\t" -@@ -7385,6 +7407,11 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu) +@@ -7465,6 +7487,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)) @@ -28451,7 +28967,7 @@ index 138ceff..2e584f0 100644 : "cc", "memory" #ifdef CONFIG_X86_64 , "rax", "rbx", "rdi", "rsi" -@@ -7398,7 +7425,7 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu) +@@ -7478,7 +7505,7 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu) if (debugctlmsr) update_debugctlmsr(debugctlmsr); @@ -28460,7 +28976,7 @@ index 138ceff..2e584f0 100644 /* * The sysexit path does not restore ds/es, so we must set them to * a reasonable value ourselves. -@@ -7407,8 +7434,18 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu) +@@ -7487,8 +7514,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. */ @@ -28482,10 +28998,10 @@ index 138ceff..2e584f0 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 5521f7c..691b7a3 100644 +index ef432f8..a630659 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c -@@ -1822,8 +1822,8 @@ static int xen_hvm_config(struct kvm_vcpu *vcpu, u64 data) +@@ -1808,8 +1808,8 @@ static int xen_hvm_config(struct kvm_vcpu *vcpu, u64 data) { struct kvm *kvm = vcpu->kvm; int lm = is_long_mode(vcpu); @@ -28496,7 +29012,7 @@ index 5521f7c..691b7a3 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; -@@ -2738,6 +2738,8 @@ long kvm_arch_dev_ioctl(struct file *filp, +@@ -2729,6 +2729,8 @@ long kvm_arch_dev_ioctl(struct file *filp, if (n < msr_list.nmsrs) goto out; r = -EFAULT; @@ -28505,7 +29021,7 @@ index 5521f7c..691b7a3 100644 if (copy_to_user(user_msr_list->indices, &msrs_to_save, num_msrs_to_save * sizeof(u32))) goto out; -@@ -5574,7 +5576,7 @@ static struct notifier_block pvclock_gtod_notifier = { +@@ -5567,7 +5569,7 @@ static struct notifier_block pvclock_gtod_notifier = { }; #endif @@ -30628,18 +31144,18 @@ index 5dff5f0..cadebf4 100644 CFI_ENDPROC ENDPROC(call_rwsem_downgrade_wake) diff --git a/arch/x86/lib/thunk_64.S b/arch/x86/lib/thunk_64.S -index a63efd6..8149fbe 100644 +index 92d9fea..b2762c8 100644 --- a/arch/x86/lib/thunk_64.S +++ b/arch/x86/lib/thunk_64.S -@@ -8,6 +8,7 @@ - #include +@@ -9,6 +9,7 @@ #include #include + #include +#include /* rdi: arg1 ... normal C conventions. rax is saved/restored. */ .macro THUNK name, func, put_ret_addr_in_rdi=0 -@@ -15,11 +16,11 @@ +@@ -16,11 +17,11 @@ \name: CFI_STARTPROC @@ -30654,7 +31170,7 @@ index a63efd6..8149fbe 100644 .endif call \func -@@ -38,8 +39,9 @@ +@@ -40,9 +41,10 @@ /* SAVE_ARGS below is used only for the .cfi directives it contains. */ CFI_STARTPROC @@ -30666,6 +31182,7 @@ index a63efd6..8149fbe 100644 + pax_force_retaddr ret CFI_ENDPROC + _ASM_NOKPROBE(restore) diff --git a/arch/x86/lib/usercopy_32.c b/arch/x86/lib/usercopy_32.c index e2f5e21..4b22130 100644 --- a/arch/x86/lib/usercopy_32.c @@ -31376,10 +31893,10 @@ index 903ec1e..c4166b2 100644 } diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c -index 8e57229..31cce89 100644 +index 3664279..c6a7830 100644 --- a/arch/x86/mm/fault.c +++ b/arch/x86/mm/fault.c -@@ -14,11 +14,18 @@ +@@ -14,12 +14,19 @@ #include /* hstate_index_to_shift */ #include /* prefetchw */ #include /* exception_enter(), ... */ @@ -31389,7 +31906,8 @@ index 8e57229..31cce89 100644 #include /* dotraplinkage, ... */ #include /* pgd_*(), ... */ #include /* kmemcheck_*(), ... */ - #include /* VSYSCALL_START */ + #include /* VSYSCALL_ADDR */ + #include /* emulate_vsyscall */ +#include + +#if defined(CONFIG_X86_64) && defined(CONFIG_PAX_MEMORY_UDEREF) @@ -31398,7 +31916,7 @@ index 8e57229..31cce89 100644 #define CREATE_TRACE_POINTS #include -@@ -59,7 +66,7 @@ static inline int __kprobes kprobes_fault(struct pt_regs *regs) +@@ -60,7 +67,7 @@ static nokprobe_inline int kprobes_fault(struct pt_regs *regs) int ret = 0; /* kprobe_running() needs smp_processor_id() */ @@ -31407,7 +31925,7 @@ index 8e57229..31cce89 100644 preempt_disable(); if (kprobe_running() && kprobe_fault_handler(regs, 14)) ret = 1; -@@ -120,7 +127,10 @@ check_prefetch_opcode(struct pt_regs *regs, unsigned char *instr, +@@ -121,7 +128,10 @@ check_prefetch_opcode(struct pt_regs *regs, unsigned char *instr, return !instr_lo || (instr_lo>>1) == 1; case 0x00: /* Prefetch instruction is 0x0F0D or 0x0F18 */ @@ -31419,7 +31937,7 @@ index 8e57229..31cce89 100644 return 0; *prefetch = (instr_lo == 0xF) && -@@ -154,7 +164,10 @@ is_prefetch(struct pt_regs *regs, unsigned long error_code, unsigned long addr) +@@ -155,7 +165,10 @@ is_prefetch(struct pt_regs *regs, unsigned long error_code, unsigned long addr) while (instr < max_instr) { unsigned char opcode; @@ -31431,7 +31949,7 @@ index 8e57229..31cce89 100644 break; instr++; -@@ -185,6 +198,34 @@ force_sig_info_fault(int si_signo, int si_code, unsigned long address, +@@ -186,6 +199,34 @@ force_sig_info_fault(int si_signo, int si_code, unsigned long address, force_sig_info(si_signo, &info, tsk); } @@ -31466,7 +31984,7 @@ index 8e57229..31cce89 100644 DEFINE_SPINLOCK(pgd_lock); LIST_HEAD(pgd_list); -@@ -235,10 +276,27 @@ void vmalloc_sync_all(void) +@@ -236,10 +277,27 @@ void vmalloc_sync_all(void) for (address = VMALLOC_START & PMD_MASK; address >= TASK_SIZE && address < FIXADDR_TOP; address += PMD_SIZE) { @@ -31494,7 +32012,7 @@ index 8e57229..31cce89 100644 spinlock_t *pgt_lock; pmd_t *ret; -@@ -246,8 +304,14 @@ void vmalloc_sync_all(void) +@@ -247,8 +305,14 @@ void vmalloc_sync_all(void) pgt_lock = &pgd_page_get_mm(page)->page_table_lock; spin_lock(pgt_lock); @@ -31510,7 +32028,7 @@ index 8e57229..31cce89 100644 if (!ret) break; -@@ -281,6 +345,12 @@ static noinline __kprobes int vmalloc_fault(unsigned long address) +@@ -282,6 +346,12 @@ static noinline int vmalloc_fault(unsigned long address) * an interrupt in the middle of a task switch.. */ pgd_paddr = read_cr3(); @@ -31523,7 +32041,7 @@ index 8e57229..31cce89 100644 pmd_k = vmalloc_sync_one(__va(pgd_paddr), address); if (!pmd_k) return -1; -@@ -376,11 +446,25 @@ static noinline __kprobes int vmalloc_fault(unsigned long address) +@@ -378,11 +448,25 @@ static noinline int vmalloc_fault(unsigned long address) * happen within a race in page table update. In the later * case just flush: */ @@ -31550,7 +32068,7 @@ index 8e57229..31cce89 100644 if (pgd_none(*pgd)) { set_pgd(pgd, *pgd_ref); arch_flush_lazy_mmu_mode(); -@@ -546,7 +630,7 @@ static int is_errata93(struct pt_regs *regs, unsigned long address) +@@ -549,7 +633,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 @@ -31559,7 +32077,7 @@ index 8e57229..31cce89 100644 return 1; #endif return 0; -@@ -573,7 +657,7 @@ static int is_f00f_bug(struct pt_regs *regs, unsigned long address) +@@ -576,7 +660,7 @@ static int is_f00f_bug(struct pt_regs *regs, unsigned long address) } static const char nx_warning[] = KERN_CRIT @@ -31568,7 +32086,7 @@ index 8e57229..31cce89 100644 static void show_fault_oops(struct pt_regs *regs, unsigned long error_code, -@@ -582,7 +666,7 @@ show_fault_oops(struct pt_regs *regs, unsigned long error_code, +@@ -585,7 +669,7 @@ show_fault_oops(struct pt_regs *regs, unsigned long error_code, if (!oops_may_print()) return; @@ -31577,7 +32095,7 @@ index 8e57229..31cce89 100644 unsigned int level; pgd_t *pgd; pte_t *pte; -@@ -593,9 +677,21 @@ show_fault_oops(struct pt_regs *regs, unsigned long error_code, +@@ -596,9 +680,21 @@ show_fault_oops(struct pt_regs *regs, unsigned long error_code, pte = lookup_address_in_pgd(pgd, address, &level); if (pte && pte_present(*pte) && !pte_exec(*pte)) @@ -31600,7 +32118,7 @@ index 8e57229..31cce89 100644 printk(KERN_ALERT "BUG: unable to handle kernel "); if (address < PAGE_SIZE) printk(KERN_CONT "NULL pointer dereference"); -@@ -776,6 +872,22 @@ __bad_area_nosemaphore(struct pt_regs *regs, unsigned long error_code, +@@ -779,6 +875,22 @@ __bad_area_nosemaphore(struct pt_regs *regs, unsigned long error_code, return; } #endif @@ -31623,7 +32141,7 @@ index 8e57229..31cce89 100644 /* Kernel addresses are always protection faults: */ if (address >= TASK_SIZE) error_code |= PF_PROT; -@@ -861,7 +973,7 @@ do_sigbus(struct pt_regs *regs, unsigned long error_code, unsigned long address, +@@ -864,7 +976,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", @@ -31632,7 +32150,7 @@ index 8e57229..31cce89 100644 code = BUS_MCEERR_AR; } #endif -@@ -915,6 +1027,99 @@ static int spurious_fault_check(unsigned long error_code, pte_t *pte) +@@ -918,6 +1030,99 @@ static int spurious_fault_check(unsigned long error_code, pte_t *pte) return 1; } @@ -31732,7 +32250,7 @@ index 8e57229..31cce89 100644 /* * Handle a spurious fault caused by a stale TLB entry. * -@@ -981,6 +1186,9 @@ int show_unhandled_signals = 1; +@@ -985,6 +1190,9 @@ int show_unhandled_signals = 1; static inline int access_error(unsigned long error_code, struct vm_area_struct *vma) { @@ -31742,7 +32260,7 @@ index 8e57229..31cce89 100644 if (error_code & PF_WRITE) { /* write, present and write, not present: */ if (unlikely(!(vma->vm_flags & VM_WRITE))) -@@ -1015,7 +1223,7 @@ static inline bool smap_violation(int error_code, struct pt_regs *regs) +@@ -1019,7 +1227,7 @@ static inline bool smap_violation(int error_code, struct pt_regs *regs) if (error_code & PF_USER) return false; @@ -31751,7 +32269,7 @@ index 8e57229..31cce89 100644 return false; return true; -@@ -1043,6 +1251,22 @@ __do_page_fault(struct pt_regs *regs, unsigned long error_code, +@@ -1047,6 +1255,22 @@ __do_page_fault(struct pt_regs *regs, unsigned long error_code, tsk = current; mm = tsk->mm; @@ -31774,7 +32292,7 @@ index 8e57229..31cce89 100644 /* * Detect and handle instructions that would cause a page fault for * both a tracked kernel page and a userspace page. -@@ -1120,7 +1344,7 @@ __do_page_fault(struct pt_regs *regs, unsigned long error_code, +@@ -1124,7 +1348,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: */ @@ -31783,7 +32301,7 @@ index 8e57229..31cce89 100644 local_irq_enable(); error_code |= PF_USER; flags |= FAULT_FLAG_USER; -@@ -1167,6 +1391,11 @@ retry: +@@ -1171,6 +1395,11 @@ retry: might_sleep(); } @@ -31795,7 +32313,7 @@ index 8e57229..31cce89 100644 vma = find_vma(mm, address); if (unlikely(!vma)) { bad_area(regs, error_code, address); -@@ -1178,18 +1407,24 @@ retry: +@@ -1182,18 +1411,24 @@ retry: bad_area(regs, error_code, address); return; } @@ -31831,9 +32349,9 @@ index 8e57229..31cce89 100644 if (unlikely(expand_stack(vma, address))) { bad_area(regs, error_code, address); return; -@@ -1301,3 +1536,292 @@ trace_do_page_fault(struct pt_regs *regs, unsigned long error_code) - exception_exit(prev_state); +@@ -1309,3 +1544,292 @@ trace_do_page_fault(struct pt_regs *regs, unsigned long error_code) } + NOKPROBE_SYMBOL(trace_do_page_fault); #endif /* CONFIG_TRACING */ + +#if defined(CONFIG_PAX_PAGEEXEC) || defined(CONFIG_PAX_SEGMEXEC) @@ -31857,7 +32375,7 @@ index 8e57229..31cce89 100644 + +#ifdef CONFIG_PAX_SEGMEXEC + if (mm->pax_flags & MF_PAX_SEGMEXEC) { -+ if (!(error_code & (PF_PROT | PF_WRITE)) && (ip + SEGMEXEC_TASK_SIZE == address)) ++ if (!(error_code & (PF_PROT | PF_WRITE)) && (ip + SEGMEXEC_TASK_SIZE == address)) + return true; + return false; + } @@ -32720,7 +33238,7 @@ index e395048..cd38278 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 f35c66c..84b95ef 100644 +index df1a992..94c272c 100644 --- a/arch/x86/mm/init_64.c +++ b/arch/x86/mm/init_64.c @@ -151,7 +151,7 @@ early_param("gbpages", parse_direct_gbpages_on); @@ -32844,26 +33362,17 @@ index f35c66c..84b95ef 100644 spin_unlock(&init_mm.page_table_lock); pgd_changed = true; } -@@ -1188,8 +1209,8 @@ int kern_addr_valid(unsigned long addr) +@@ -1195,8 +1216,8 @@ static struct vm_operations_struct gate_vma_ops = { static struct vm_area_struct gate_vma = { - .vm_start = VSYSCALL_START, - .vm_end = VSYSCALL_START + (VSYSCALL_MAPPED_PAGES * PAGE_SIZE), + .vm_start = VSYSCALL_ADDR, + .vm_end = VSYSCALL_ADDR + PAGE_SIZE, - .vm_page_prot = PAGE_READONLY_EXEC, -- .vm_flags = VM_READ | VM_EXEC +- .vm_flags = VM_READ | VM_EXEC, + .vm_page_prot = PAGE_READONLY, -+ .vm_flags = VM_READ ++ .vm_flags = VM_READ, + .vm_ops = &gate_vma_ops, }; - struct vm_area_struct *get_gate_vma(struct mm_struct *mm) -@@ -1223,7 +1244,7 @@ int in_gate_area_no_mm(unsigned long addr) - - const char *arch_vma_name(struct vm_area_struct *vma) - { -- if (vma->vm_mm && vma->vm_start == (long)vma->vm_mm->context.vdso) -+ if (vma->vm_mm && vma->vm_start == vma->vm_mm->context.vdso) - return "[vdso]"; - if (vma == &gate_vma) - return "[vsyscall]"; diff --git a/arch/x86/mm/iomap_32.c b/arch/x86/mm/iomap_32.c index 7b179b4..6bd17777 100644 --- a/arch/x86/mm/iomap_32.c @@ -32881,7 +33390,7 @@ index 7b179b4..6bd17777 100644 return (void *)vaddr; diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c -index bc7527e..5e2c495 100644 +index baff1da..2816ef4 100644 --- a/arch/x86/mm/ioremap.c +++ b/arch/x86/mm/ioremap.c @@ -56,8 +56,8 @@ static int __ioremap_check_ram(unsigned long start_pfn, unsigned long nr_pages, @@ -32932,7 +33441,7 @@ index bc7527e..5e2c495 100644 static inline pmd_t * __init early_ioremap_pmd(unsigned long addr) { -@@ -370,8 +376,7 @@ void __init early_ioremap_init(void) +@@ -376,8 +382,7 @@ void __init early_ioremap_init(void) early_ioremap_setup(); pmd = early_ioremap_pmd(fix_to_virt(FIX_BTMAP_BEGIN)); @@ -33085,7 +33594,7 @@ index 0057a7a..95c7edd 100644 might_sleep(); if (is_enabled()) /* recheck and proper locking in *_core() */ diff --git a/arch/x86/mm/numa.c b/arch/x86/mm/numa.c -index 1d045f9..3a00249 100644 +index a32b706..efb308b 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) @@ -33097,19 +33606,6 @@ index 1d045f9..3a00249 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 461bc82..4e091a3 100644 ---- a/arch/x86/mm/pageattr-test.c -+++ b/arch/x86/mm/pageattr-test.c -@@ -35,7 +35,7 @@ enum { - - static int pte_testbit(pte_t pte) - { -- return pte_flags(pte) & _PAGE_UNUSED1; -+ return pte_flags(pte) & _PAGE_CPA_TEST; - } - - struct split_state { diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c index ae242a7..1c7998f 100644 --- a/arch/x86/mm/pageattr.c @@ -33312,7 +33808,7 @@ 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 c96314a..433b127 100644 +index 6fb6927..4fc13c0 100644 --- a/arch/x86/mm/pgtable.c +++ b/arch/x86/mm/pgtable.c @@ -97,10 +97,71 @@ static inline void pgd_list_del(pgd_t *pgd) @@ -33720,10 +34216,10 @@ index 0000000..dace51c +EXPORT_SYMBOL(__pax_close_userland); +#endif diff --git a/arch/x86/net/bpf_jit.S b/arch/x86/net/bpf_jit.S -index 0149575..f746de8 100644 +index 6440221..f746de8 100644 --- a/arch/x86/net/bpf_jit.S +++ b/arch/x86/net/bpf_jit.S -@@ -9,6 +9,7 @@ +@@ -9,19 +9,17 @@ */ #include #include @@ -33731,7 +34227,23 @@ index 0149575..f746de8 100644 /* * Calling convention : -@@ -35,6 +36,7 @@ sk_load_word_positive_offset: +- * rbx : skb pointer (callee saved) ++ * rdi : skb pointer + * esi : offset of byte(s) to fetch in skb (can be scratched) +- * r10 : copy of skb->data ++ * r8 : copy of skb->data + * r9d : hlen = skb->len - skb->data_len + */ +-#define SKBDATA %r10 ++#define SKBDATA %r8 + #define SKF_MAX_NEG_OFF $(-0x200000) /* SKF_LL_OFF from filter.h */ +-#define MAX_BPF_STACK (512 /* from filter.h */ + \ +- 32 /* space for rbx,r13,r14,r15 */ + \ +- 8 /* space for skb_copy_bits */) + + sk_load_word: + .globl sk_load_word +@@ -38,6 +36,7 @@ sk_load_word_positive_offset: jle bpf_slow_path_word mov (SKBDATA,%rsi),%eax bswap %eax /* ntohl() */ @@ -33739,7 +34251,7 @@ index 0149575..f746de8 100644 ret sk_load_half: -@@ -52,6 +54,7 @@ sk_load_half_positive_offset: +@@ -55,6 +54,7 @@ sk_load_half_positive_offset: jle bpf_slow_path_half movzwl (SKBDATA,%rsi),%eax rol $8,%ax # ntohs() @@ -33747,32 +34259,67 @@ index 0149575..f746de8 100644 ret sk_load_byte: -@@ -66,6 +69,7 @@ sk_load_byte_positive_offset: +@@ -69,45 +69,83 @@ sk_load_byte_positive_offset: cmp %esi,%r9d /* if (offset >= hlen) goto bpf_slow_path_byte */ jle bpf_slow_path_byte movzbl (SKBDATA,%rsi),%eax + pax_force_retaddr - ret - - /** -@@ -87,6 +91,7 @@ sk_load_byte_msh_positive_offset: - movzbl (SKBDATA,%rsi),%ebx - and $15,%bl - shl $2,%bl ++ ret ++ ++/** ++ * sk_load_byte_msh - BPF_S_LDX_B_MSH helper ++ * ++ * Implements BPF_S_LDX_B_MSH : ldxb 4*([offset]&0xf) ++ * Must preserve A accumulator (%eax) ++ * Inputs : %esi is the offset value ++ */ ++sk_load_byte_msh: ++ .globl sk_load_byte_msh ++ test %esi,%esi ++ js bpf_slow_path_byte_msh_neg ++ ++sk_load_byte_msh_positive_offset: ++ .globl sk_load_byte_msh_positive_offset ++ cmp %esi,%r9d /* if (offset >= hlen) goto bpf_slow_path_byte_msh */ ++ jle bpf_slow_path_byte_msh ++ movzbl (SKBDATA,%rsi),%ebx ++ and $15,%bl ++ shl $2,%bl + pax_force_retaddr ret /* rsi contains offset and can be scratched */ -@@ -109,6 +114,7 @@ bpf_slow_path_word: + #define bpf_slow_path_common(LEN) \ +- mov %rbx, %rdi; /* arg1 == skb */ \ ++ push %rdi; /* save skb */ \ + push %r9; \ + push SKBDATA; \ + /* rsi already has offset */ \ + mov $LEN,%ecx; /* len */ \ +- lea - MAX_BPF_STACK + 32(%rbp),%rdx; \ ++ lea -12(%rbp),%rdx; \ + call skb_copy_bits; \ + test %eax,%eax; \ + pop SKBDATA; \ +- pop %r9; ++ pop %r9; \ ++ pop %rdi + + + bpf_slow_path_word: + bpf_slow_path_common(4) js bpf_error - mov -12(%rbp),%eax +- mov - MAX_BPF_STACK + 32(%rbp),%eax ++ mov -12(%rbp),%eax bswap %eax + pax_force_retaddr ret bpf_slow_path_half: -@@ -117,12 +123,14 @@ bpf_slow_path_half: - mov -12(%rbp),%ax + bpf_slow_path_common(2) + js bpf_error +- mov - MAX_BPF_STACK + 32(%rbp),%ax ++ mov -12(%rbp),%ax rol $8,%ax movzwl %ax,%eax + pax_force_retaddr @@ -33781,20 +34328,40 @@ index 0149575..f746de8 100644 bpf_slow_path_byte: bpf_slow_path_common(1) js bpf_error - movzbl -12(%rbp),%eax +- movzbl - MAX_BPF_STACK + 32(%rbp),%eax ++ movzbl -12(%rbp),%eax + pax_force_retaddr - ret - - bpf_slow_path_byte_msh: -@@ -133,6 +141,7 @@ bpf_slow_path_byte_msh: - and $15,%al - shl $2,%al - xchg %eax,%ebx ++ ret ++ ++bpf_slow_path_byte_msh: ++ xchg %eax,%ebx /* dont lose A , X is about to be scratched */ ++ bpf_slow_path_common(1) ++ js bpf_error ++ movzbl -12(%rbp),%eax ++ and $15,%al ++ shl $2,%al ++ xchg %eax,%ebx + pax_force_retaddr ret #define sk_negative_common(SIZE) \ -@@ -157,6 +166,7 @@ sk_load_word_negative_offset: +- mov %rbx, %rdi; /* arg1 == skb */ \ ++ push %rdi; /* save skb */ \ + push %r9; \ + push SKBDATA; \ + /* rsi already has offset */ \ +@@ -116,8 +154,10 @@ bpf_slow_path_byte: + test %rax,%rax; \ + pop SKBDATA; \ + pop %r9; \ ++ pop %rdi; \ + jz bpf_error + ++ + bpf_slow_path_word_neg: + cmp SKF_MAX_NEG_OFF, %esi /* test range */ + jl bpf_error /* offset lower -> error */ +@@ -126,6 +166,7 @@ sk_load_word_negative_offset: sk_negative_common(4) mov (%rax), %eax bswap %eax @@ -33802,7 +34369,7 @@ index 0149575..f746de8 100644 ret bpf_slow_path_half_neg: -@@ -168,6 +178,7 @@ sk_load_half_negative_offset: +@@ -137,6 +178,7 @@ sk_load_half_negative_offset: mov (%rax),%ax rol $8,%ax movzwl %ax,%eax @@ -33810,33 +34377,84 @@ index 0149575..f746de8 100644 ret bpf_slow_path_byte_neg: -@@ -177,6 +188,7 @@ sk_load_byte_negative_offset: +@@ -146,14 +188,27 @@ sk_load_byte_negative_offset: .globl sk_load_byte_negative_offset sk_negative_common(1) movzbl (%rax), %eax + pax_force_retaddr - ret - - bpf_slow_path_byte_msh_neg: -@@ -190,6 +202,7 @@ sk_load_byte_msh_negative_offset: - and $15,%al - shl $2,%al - xchg %eax,%ebx ++ ret ++ ++bpf_slow_path_byte_msh_neg: ++ cmp SKF_MAX_NEG_OFF, %esi ++ jl bpf_error ++sk_load_byte_msh_negative_offset: ++ .globl sk_load_byte_msh_negative_offset ++ xchg %eax,%ebx /* dont lose A , X is about to be scratched */ ++ sk_negative_common(1) ++ movzbl (%rax),%eax ++ and $15,%al ++ shl $2,%al ++ xchg %eax,%ebx + pax_force_retaddr ret bpf_error: -@@ -197,4 +210,5 @@ bpf_error: - xor %eax,%eax - mov -8(%rbp),%rbx + # force a return 0 from jit handler +- xor %eax,%eax +- mov - MAX_BPF_STACK(%rbp),%rbx +- mov - MAX_BPF_STACK + 8(%rbp),%r13 +- mov - MAX_BPF_STACK + 16(%rbp),%r14 +- mov - MAX_BPF_STACK + 24(%rbp),%r15 ++ xor %eax,%eax ++ mov -8(%rbp),%rbx leaveq + pax_force_retaddr ret diff --git a/arch/x86/net/bpf_jit_comp.c b/arch/x86/net/bpf_jit_comp.c -index 6d5663a..f1ec380 100644 +index 99bef86..bdfb5c6 100644 --- a/arch/x86/net/bpf_jit_comp.c +++ b/arch/x86/net/bpf_jit_comp.c -@@ -50,13 +50,90 @@ static inline u8 *emit_code(u8 *ptr, u32 bytes, unsigned int len) +@@ -1,7 +1,6 @@ + /* bpf_jit_comp.c : BPF JIT compiler + * + * Copyright (C) 2011-2013 Eric Dumazet (eric.dumazet@gmail.com) +- * Internal BPF Copyright (c) 2011-2014 PLUMgrid, http://plumgrid.com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License +@@ -15,16 +14,28 @@ + #include + #include + ++/* ++ * Conventions : ++ * EAX : BPF A accumulator ++ * EBX : BPF X accumulator ++ * RDI : pointer to skb (first argument given to JIT function) ++ * RBP : frame pointer (even if CONFIG_FRAME_POINTER=n) ++ * ECX,EDX,ESI : scratch registers ++ * r9d : skb->len - skb->data_len (headlen) ++ * r8 : skb->data ++ * -8(RBP) : saved RBX value ++ * -16(RBP)..-80(RBP) : BPF_MEMWORDS values ++ */ + int bpf_jit_enable __read_mostly; + + /* + * assembly code in arch/x86/net/bpf_jit.S + */ +-extern u8 sk_load_word[], sk_load_half[], sk_load_byte[]; ++extern u8 sk_load_word[], sk_load_half[], sk_load_byte[], sk_load_byte_msh[]; + extern u8 sk_load_word_positive_offset[], sk_load_half_positive_offset[]; +-extern u8 sk_load_byte_positive_offset[]; ++extern u8 sk_load_byte_positive_offset[], sk_load_byte_msh_positive_offset[]; + extern u8 sk_load_word_negative_offset[], sk_load_half_negative_offset[]; +-extern u8 sk_load_byte_negative_offset[]; ++extern u8 sk_load_byte_negative_offset[], sk_load_byte_msh_negative_offset[]; + + static inline u8 *emit_code(u8 *ptr, u32 bytes, unsigned int len) + { +@@ -39,50 +50,113 @@ static inline u8 *emit_code(u8 *ptr, u32 bytes, unsigned int len) return ptr + len; } @@ -33852,6 +34470,14 @@ index 6d5663a..f1ec380 100644 #define EMIT2(b1, b2) EMIT((b1) + ((b2) << 8), 2) #define EMIT3(b1, b2, b3) EMIT((b1) + ((b2) << 8) + ((b3) << 16), 3) #define EMIT4(b1, b2, b3, b4) EMIT((b1) + ((b2) << 8) + ((b3) << 16) + ((b4) << 24), 4) +-#define EMIT1_off32(b1, off) \ +- do {EMIT1(b1); EMIT(off, 4); } while (0) +-#define EMIT2_off32(b1, b2, off) \ +- do {EMIT2(b1, b2); EMIT(off, 4); } while (0) +-#define EMIT3_off32(b1, b2, b3, off) \ +- do {EMIT3(b1, b2, b3); EMIT(off, 4); } while (0) +-#define EMIT4_off32(b1, b2, b3, b4, off) \ +- do {EMIT4(b1, b2, b3, b4); EMIT(off, 4); } while (0) + +#ifdef CONFIG_GRKERNSEC_JIT_HARDEN +/* original constant will appear in ecx */ @@ -33921,16 +34547,63 @@ index 6d5663a..f1ec380 100644 + } \ +} while (0) +#else - #define EMIT1_off32(b1, off) do { EMIT1(b1); EMIT(off, 4);} while (0) ++#define EMIT1_off32(b1, off) do { EMIT1(b1); EMIT(off, 4);} while (0) +#define EMIT2_off32(b1, b2, off) do { EMIT2(b1, b2); EMIT(off, 4);} while (0) +#endif ++ ++#define CLEAR_A() EMIT2(0x31, 0xc0) /* xor %eax,%eax */ ++#define CLEAR_X() EMIT2(0x31, 0xdb) /* xor %ebx,%ebx */ + + static inline bool is_imm8(int value) + { + return value <= 127 && value >= -128; + } + +-static inline bool is_simm32(s64 value) ++static inline bool is_near(int offset) + { +- return value == (s64) (s32) value; ++ return offset <= 127 && offset >= -128; + } + +-/* mov dst, src */ +-#define EMIT_mov(DST, SRC) \ +- do {if (DST != SRC) \ +- EMIT3(add_2mod(0x48, DST, SRC), 0x89, add_2reg(0xC0, DST, SRC)); \ +- } while (0) +- +-static int bpf_size_to_x86_bytes(int bpf_size) +-{ +- if (bpf_size == BPF_W) +- return 4; +- else if (bpf_size == BPF_H) +- return 2; +- else if (bpf_size == BPF_B) +- return 1; +- else if (bpf_size == BPF_DW) +- return 4; /* imm32 */ +- else +- return 0; +-} ++#define EMIT_JMP(offset) \ ++do { \ ++ if (offset) { \ ++ if (is_near(offset)) \ ++ EMIT2(0xeb, offset); /* jmp .+off8 */ \ ++ else \ ++ EMIT1_off32(0xe9, offset); /* jmp .+off32 */ \ ++ } \ ++} while (0) - #define CLEAR_A() EMIT2(0x31, 0xc0) /* xor %eax,%eax */ - #define CLEAR_X() EMIT2(0x31, 0xdb) /* xor %ebx,%ebx */ -@@ -91,6 +168,24 @@ do { \ + /* list of x86 cond jumps opcodes (. + s8) + * Add 0x10 (and an extra 0x0f) to generate far jumps (. + s32) +@@ -93,8 +167,46 @@ static int bpf_size_to_x86_bytes(int bpf_size) + #define X86_JNE 0x75 #define X86_JBE 0x76 #define X86_JA 0x77 - +-#define X86_JGE 0x7D +-#define X86_JG 0x7F ++ +#ifdef CONFIG_GRKERNSEC_JIT_HARDEN +#define APPEND_FLOW_VERIFY() \ +do { \ @@ -33949,20 +34622,33 @@ index 6d5663a..f1ec380 100644 +#define APPEND_FLOW_VERIFY() do { } while (0) +#endif + - #define EMIT_COND_JMP(op, offset) \ - do { \ - if (is_near(offset)) \ -@@ -98,6 +193,7 @@ do { \ - else { \ - EMIT2(0x0f, op + 0x10); \ - EMIT(offset, 4); /* jxx .+off32 */ \ ++#define EMIT_COND_JMP(op, offset) \ ++do { \ ++ if (is_near(offset)) \ ++ EMIT2(op, offset); /* jxx .+off8 */ \ ++ else { \ ++ EMIT2(0x0f, op + 0x10); \ ++ EMIT(offset, 4); /* jxx .+off32 */ \ + APPEND_FLOW_VERIFY(); \ - } \ - } while (0) ++ } \ ++} while (0) ++ ++#define COND_SEL(CODE, TOP, FOP) \ ++ case CODE: \ ++ t_op = TOP; \ ++ f_op = FOP; \ ++ goto cond_branch ++ ++ ++#define SEEN_DATAREF 1 /* might call external helpers */ ++#define SEEN_XREG 2 /* ebx is used */ ++#define SEEN_MEM 4 /* use mem[] for temporary storage */ -@@ -145,55 +241,54 @@ static int pkt_type_offset(void) - return -1; - } + static inline void bpf_flush_icache(void *start, void *end) + { +@@ -109,804 +221,646 @@ static inline void bpf_flush_icache(void *start, void *end) + #define CHOOSE_LOAD_FUNC(K, func) \ + ((int)K < 0 ? ((int)K >= SKF_LL_OFF ? func##_negative_offset : func) : func##_positive_offset) -struct bpf_binary_header { - unsigned int pages; @@ -33971,8 +34657,27 @@ index 6d5663a..f1ec380 100644 - */ - u8 image[]; -}; -- ++/* Helper to find the offset of pkt_type in sk_buff ++ * We want to make sure its still a 3bit field starting at a byte boundary. ++ */ ++#define PKT_TYPE_MAX 7 ++static int pkt_type_offset(void) ++{ ++ struct sk_buff skb_probe = { ++ .pkt_type = ~0, ++ }; ++ char *ct = (char *)&skb_probe; ++ unsigned int off; + -static struct bpf_binary_header *bpf_alloc_binary(unsigned int proglen, ++ for (off = 0; off < sizeof(struct sk_buff); off++) { ++ if (ct[off] == PKT_TYPE_MAX) ++ return off; ++ } ++ pr_err_once("Please fix pkt_type_offset(), as pkt_type couldn't be found\n"); ++ return -1; ++} ++ +/* Note : for security reasons, bpf code will follow a randomly + * sized amount of int3 instructions + */ @@ -34008,180 +34713,1432 @@ index 6d5663a..f1ec380 100644 return header; } - void bpf_jit_compile(struct sk_filter *fp) - { +-/* pick a register outside of BPF range for JIT internal work */ +-#define AUX_REG (MAX_BPF_REG + 1) +- +-/* the following table maps BPF registers to x64 registers. +- * x64 register r12 is unused, since if used as base address register +- * in load/store instructions, it always needs an extra byte of encoding +- */ +-static const int reg2hex[] = { +- [BPF_REG_0] = 0, /* rax */ +- [BPF_REG_1] = 7, /* rdi */ +- [BPF_REG_2] = 6, /* rsi */ +- [BPF_REG_3] = 2, /* rdx */ +- [BPF_REG_4] = 1, /* rcx */ +- [BPF_REG_5] = 0, /* r8 */ +- [BPF_REG_6] = 3, /* rbx callee saved */ +- [BPF_REG_7] = 5, /* r13 callee saved */ +- [BPF_REG_8] = 6, /* r14 callee saved */ +- [BPF_REG_9] = 7, /* r15 callee saved */ +- [BPF_REG_FP] = 5, /* rbp readonly */ +- [AUX_REG] = 3, /* r11 temp register */ +-}; +- +-/* is_ereg() == true if BPF register 'reg' maps to x64 r8..r15 +- * which need extra byte of encoding. +- * rax,rcx,...,rbp have simpler encoding +- */ +-static inline bool is_ereg(u32 reg) +-{ +- if (reg == BPF_REG_5 || reg == AUX_REG || +- (reg >= BPF_REG_7 && reg <= BPF_REG_9)) +- return true; +- else +- return false; +-} +- +-/* add modifiers if 'reg' maps to x64 registers r8..r15 */ +-static inline u8 add_1mod(u8 byte, u32 reg) +-{ +- if (is_ereg(reg)) +- byte |= 1; +- return byte; +-} +- +-static inline u8 add_2mod(u8 byte, u32 r1, u32 r2) +-{ +- if (is_ereg(r1)) +- byte |= 1; +- if (is_ereg(r2)) +- byte |= 4; +- return byte; +-} +- +-/* encode 'dst_reg' register into x64 opcode 'byte' */ +-static inline u8 add_1reg(u8 byte, u32 dst_reg) +-{ +- return byte + reg2hex[dst_reg]; +-} +- +-/* encode 'dst_reg' and 'src_reg' registers into x64 opcode 'byte' */ +-static inline u8 add_2reg(u8 byte, u32 dst_reg, u32 src_reg) +-{ +- return byte + reg2hex[dst_reg] + (reg2hex[src_reg] << 3); +-} +- +-struct jit_context { +- unsigned int cleanup_addr; /* epilogue code offset */ +- bool seen_ld_abs; +-}; +- +-static int do_jit(struct sk_filter *bpf_prog, int *addrs, u8 *image, +- int oldproglen, struct jit_context *ctx) +-{ +- struct sock_filter_int *insn = bpf_prog->insnsi; +- int insn_cnt = bpf_prog->len; - u8 temp[64]; +- int i; +- int proglen = 0; +- u8 *prog = temp; +- int stacksize = MAX_BPF_STACK + +- 32 /* space for rbx, r13, r14, r15 */ + +- 8 /* space for skb_copy_bits() buffer */; +- +- EMIT1(0x55); /* push rbp */ +- EMIT3(0x48, 0x89, 0xE5); /* mov rbp,rsp */ +- +- /* sub rsp, stacksize */ +- EMIT3_off32(0x48, 0x81, 0xEC, stacksize); +- +- /* all classic BPF filters use R6(rbx) save it */ +- +- /* mov qword ptr [rbp-X],rbx */ +- EMIT3_off32(0x48, 0x89, 0x9D, -stacksize); +- +- /* sk_convert_filter() maps classic BPF register X to R7 and uses R8 +- * as temporary, so all tcpdump filters need to spill/fill R7(r13) and +- * R8(r14). R9(r15) spill could be made conditional, but there is only +- * one 'bpf_error' return path out of helper functions inside bpf_jit.S +- * The overhead of extra spill is negligible for any filter other +- * than synthetic ones. Therefore not worth adding complexity. +- */ +- +- /* mov qword ptr [rbp-X],r13 */ +- EMIT3_off32(0x4C, 0x89, 0xAD, -stacksize + 8); +- /* mov qword ptr [rbp-X],r14 */ +- EMIT3_off32(0x4C, 0x89, 0xB5, -stacksize + 16); +- /* mov qword ptr [rbp-X],r15 */ +- EMIT3_off32(0x4C, 0x89, 0xBD, -stacksize + 24); +- +- /* clear A and X registers */ +- EMIT2(0x31, 0xc0); /* xor eax, eax */ +- EMIT3(0x4D, 0x31, 0xED); /* xor r13, r13 */ +- +- if (ctx->seen_ld_abs) { +- /* r9d : skb->len - skb->data_len (headlen) +- * r10 : skb->data +- */ +- if (is_imm8(offsetof(struct sk_buff, len))) +- /* mov %r9d, off8(%rdi) */ +- EMIT4(0x44, 0x8b, 0x4f, +- offsetof(struct sk_buff, len)); +- else +- /* mov %r9d, off32(%rdi) */ +- EMIT3_off32(0x44, 0x8b, 0x8f, +- offsetof(struct sk_buff, len)); +- +- if (is_imm8(offsetof(struct sk_buff, data_len))) +- /* sub %r9d, off8(%rdi) */ +- EMIT4(0x44, 0x2b, 0x4f, +- offsetof(struct sk_buff, data_len)); +- else +- EMIT3_off32(0x44, 0x2b, 0x8f, +- offsetof(struct sk_buff, data_len)); +- +- if (is_imm8(offsetof(struct sk_buff, data))) +- /* mov %r10, off8(%rdi) */ +- EMIT4(0x4c, 0x8b, 0x57, +- offsetof(struct sk_buff, data)); +- else +- /* mov %r10, off32(%rdi) */ +- EMIT3_off32(0x4c, 0x8b, 0x97, +- offsetof(struct sk_buff, data)); +- } +- +- for (i = 0; i < insn_cnt; i++, insn++) { +- const s32 imm32 = insn->imm; +- u32 dst_reg = insn->dst_reg; +- u32 src_reg = insn->src_reg; +- u8 b1 = 0, b2 = 0, b3 = 0; +- s64 jmp_offset; +- u8 jmp_cond; +- int ilen; +- u8 *func; +- +- switch (insn->code) { +- /* ALU */ +- case BPF_ALU | BPF_ADD | BPF_X: +- case BPF_ALU | BPF_SUB | BPF_X: +- case BPF_ALU | BPF_AND | BPF_X: +- case BPF_ALU | BPF_OR | BPF_X: +- case BPF_ALU | BPF_XOR | BPF_X: +- case BPF_ALU64 | BPF_ADD | BPF_X: +- case BPF_ALU64 | BPF_SUB | BPF_X: +- case BPF_ALU64 | BPF_AND | BPF_X: +- case BPF_ALU64 | BPF_OR | BPF_X: +- case BPF_ALU64 | BPF_XOR | BPF_X: +- switch (BPF_OP(insn->code)) { +- case BPF_ADD: b2 = 0x01; break; +- case BPF_SUB: b2 = 0x29; break; +- case BPF_AND: b2 = 0x21; break; +- case BPF_OR: b2 = 0x09; break; +- case BPF_XOR: b2 = 0x31; break; +- } +- if (BPF_CLASS(insn->code) == BPF_ALU64) +- EMIT1(add_2mod(0x48, dst_reg, src_reg)); +- else if (is_ereg(dst_reg) || is_ereg(src_reg)) +- EMIT1(add_2mod(0x40, dst_reg, src_reg)); +- EMIT2(b2, add_2reg(0xC0, dst_reg, src_reg)); +- break; +- +- /* mov dst, src */ +- case BPF_ALU64 | BPF_MOV | BPF_X: +- EMIT_mov(dst_reg, src_reg); +- break; +- +- /* mov32 dst, src */ +- case BPF_ALU | BPF_MOV | BPF_X: +- if (is_ereg(dst_reg) || is_ereg(src_reg)) +- EMIT1(add_2mod(0x40, dst_reg, src_reg)); +- EMIT2(0x89, add_2reg(0xC0, dst_reg, src_reg)); +- break; +- +- /* neg dst */ +- case BPF_ALU | BPF_NEG: +- case BPF_ALU64 | BPF_NEG: +- if (BPF_CLASS(insn->code) == BPF_ALU64) +- EMIT1(add_1mod(0x48, dst_reg)); +- else if (is_ereg(dst_reg)) +- EMIT1(add_1mod(0x40, dst_reg)); +- EMIT2(0xF7, add_1reg(0xD8, dst_reg)); +- break; +- +- case BPF_ALU | BPF_ADD | BPF_K: +- case BPF_ALU | BPF_SUB | BPF_K: +- case BPF_ALU | BPF_AND | BPF_K: +- case BPF_ALU | BPF_OR | BPF_K: +- case BPF_ALU | BPF_XOR | BPF_K: +- case BPF_ALU64 | BPF_ADD | BPF_K: +- case BPF_ALU64 | BPF_SUB | BPF_K: +- case BPF_ALU64 | BPF_AND | BPF_K: +- case BPF_ALU64 | BPF_OR | BPF_K: +- case BPF_ALU64 | BPF_XOR | BPF_K: +- if (BPF_CLASS(insn->code) == BPF_ALU64) +- EMIT1(add_1mod(0x48, dst_reg)); +- else if (is_ereg(dst_reg)) +- EMIT1(add_1mod(0x40, dst_reg)); +- +- switch (BPF_OP(insn->code)) { +- case BPF_ADD: b3 = 0xC0; break; +- case BPF_SUB: b3 = 0xE8; break; +- case BPF_AND: b3 = 0xE0; break; +- case BPF_OR: b3 = 0xC8; break; +- case BPF_XOR: b3 = 0xF0; break; +- } +- +- if (is_imm8(imm32)) +- EMIT3(0x83, add_1reg(b3, dst_reg), imm32); +- else +- EMIT2_off32(0x81, add_1reg(b3, dst_reg), imm32); +- break; +- +- case BPF_ALU64 | BPF_MOV | BPF_K: +- /* optimization: if imm32 is positive, +- * use 'mov eax, imm32' (which zero-extends imm32) +- * to save 2 bytes +- */ +- if (imm32 < 0) { +- /* 'mov rax, imm32' sign extends imm32 */ +- b1 = add_1mod(0x48, dst_reg); +- b2 = 0xC7; +- b3 = 0xC0; +- EMIT3_off32(b1, b2, add_1reg(b3, dst_reg), imm32); +- break; +- } +- +- case BPF_ALU | BPF_MOV | BPF_K: +- /* mov %eax, imm32 */ +- if (is_ereg(dst_reg)) +- EMIT1(add_1mod(0x40, dst_reg)); +- EMIT1_off32(add_1reg(0xB8, dst_reg), imm32); +- break; +- +- /* dst %= src, dst /= src, dst %= imm32, dst /= imm32 */ +- case BPF_ALU | BPF_MOD | BPF_X: +- case BPF_ALU | BPF_DIV | BPF_X: +- case BPF_ALU | BPF_MOD | BPF_K: +- case BPF_ALU | BPF_DIV | BPF_K: +- case BPF_ALU64 | BPF_MOD | BPF_X: +- case BPF_ALU64 | BPF_DIV | BPF_X: +- case BPF_ALU64 | BPF_MOD | BPF_K: +- case BPF_ALU64 | BPF_DIV | BPF_K: +- EMIT1(0x50); /* push rax */ +- EMIT1(0x52); /* push rdx */ +- +- if (BPF_SRC(insn->code) == BPF_X) +- /* mov r11, src_reg */ +- EMIT_mov(AUX_REG, src_reg); +- else +- /* mov r11, imm32 */ +- EMIT3_off32(0x49, 0xC7, 0xC3, imm32); +- +- /* mov rax, dst_reg */ +- EMIT_mov(BPF_REG_0, dst_reg); +- +- /* xor edx, edx +- * equivalent to 'xor rdx, rdx', but one byte less +- */ +- EMIT2(0x31, 0xd2); +- +- if (BPF_SRC(insn->code) == BPF_X) { +- /* if (src_reg == 0) return 0 */ +- +- /* cmp r11, 0 */ +- EMIT4(0x49, 0x83, 0xFB, 0x00); +- +- /* jne .+9 (skip over pop, pop, xor and jmp) */ +- EMIT2(X86_JNE, 1 + 1 + 2 + 5); +- EMIT1(0x5A); /* pop rdx */ +- EMIT1(0x58); /* pop rax */ +- EMIT2(0x31, 0xc0); /* xor eax, eax */ +- +- /* jmp cleanup_addr +- * addrs[i] - 11, because there are 11 bytes +- * after this insn: div, mov, pop, pop, mov +- */ +- jmp_offset = ctx->cleanup_addr - (addrs[i] - 11); +- EMIT1_off32(0xE9, jmp_offset); +- } +- +- if (BPF_CLASS(insn->code) == BPF_ALU64) +- /* div r11 */ +- EMIT3(0x49, 0xF7, 0xF3); +- else +- /* div r11d */ +- EMIT3(0x41, 0xF7, 0xF3); +- +- if (BPF_OP(insn->code) == BPF_MOD) +- /* mov r11, rdx */ +- EMIT3(0x49, 0x89, 0xD3); +- else +- /* mov r11, rax */ +- EMIT3(0x49, 0x89, 0xC3); +- +- EMIT1(0x5A); /* pop rdx */ +- EMIT1(0x58); /* pop rax */ +- +- /* mov dst_reg, r11 */ +- EMIT_mov(dst_reg, AUX_REG); +- break; +- +- case BPF_ALU | BPF_MUL | BPF_K: +- case BPF_ALU | BPF_MUL | BPF_X: +- case BPF_ALU64 | BPF_MUL | BPF_K: +- case BPF_ALU64 | BPF_MUL | BPF_X: +- EMIT1(0x50); /* push rax */ +- EMIT1(0x52); /* push rdx */ +- +- /* mov r11, dst_reg */ +- EMIT_mov(AUX_REG, dst_reg); +- +- if (BPF_SRC(insn->code) == BPF_X) +- /* mov rax, src_reg */ +- EMIT_mov(BPF_REG_0, src_reg); +- else +- /* mov rax, imm32 */ +- EMIT3_off32(0x48, 0xC7, 0xC0, imm32); +- +- if (BPF_CLASS(insn->code) == BPF_ALU64) +- EMIT1(add_1mod(0x48, AUX_REG)); +- else if (is_ereg(AUX_REG)) +- EMIT1(add_1mod(0x40, AUX_REG)); +- /* mul(q) r11 */ +- EMIT2(0xF7, add_1reg(0xE0, AUX_REG)); +- +- /* mov r11, rax */ +- EMIT_mov(AUX_REG, BPF_REG_0); +- +- EMIT1(0x5A); /* pop rdx */ +- EMIT1(0x58); /* pop rax */ +- +- /* mov dst_reg, r11 */ +- EMIT_mov(dst_reg, AUX_REG); +- break; +- +- /* shifts */ +- case BPF_ALU | BPF_LSH | BPF_K: +- case BPF_ALU | BPF_RSH | BPF_K: +- case BPF_ALU | BPF_ARSH | BPF_K: +- case BPF_ALU64 | BPF_LSH | BPF_K: +- case BPF_ALU64 | BPF_RSH | BPF_K: +- case BPF_ALU64 | BPF_ARSH | BPF_K: +- if (BPF_CLASS(insn->code) == BPF_ALU64) +- EMIT1(add_1mod(0x48, dst_reg)); +- else if (is_ereg(dst_reg)) +- EMIT1(add_1mod(0x40, dst_reg)); +- +- switch (BPF_OP(insn->code)) { +- case BPF_LSH: b3 = 0xE0; break; +- case BPF_RSH: b3 = 0xE8; break; +- case BPF_ARSH: b3 = 0xF8; break; +- } +- EMIT3(0xC1, add_1reg(b3, dst_reg), imm32); +- break; +- +- case BPF_ALU | BPF_END | BPF_FROM_BE: +- switch (imm32) { +- case 16: +- /* emit 'ror %ax, 8' to swap lower 2 bytes */ +- EMIT1(0x66); +- if (is_ereg(dst_reg)) +- EMIT1(0x41); +- EMIT3(0xC1, add_1reg(0xC8, dst_reg), 8); +- break; +- case 32: +- /* emit 'bswap eax' to swap lower 4 bytes */ +- if (is_ereg(dst_reg)) +- EMIT2(0x41, 0x0F); +- else +- EMIT1(0x0F); +- EMIT1(add_1reg(0xC8, dst_reg)); +- break; +- case 64: +- /* emit 'bswap rax' to swap 8 bytes */ +- EMIT3(add_1mod(0x48, dst_reg), 0x0F, +- add_1reg(0xC8, dst_reg)); +- break; +- } +- break; +- +- case BPF_ALU | BPF_END | BPF_FROM_LE: +- break; +- +- /* ST: *(u8*)(dst_reg + off) = imm */ +- case BPF_ST | BPF_MEM | BPF_B: +- if (is_ereg(dst_reg)) +- EMIT2(0x41, 0xC6); +- else +- EMIT1(0xC6); +- goto st; +- case BPF_ST | BPF_MEM | BPF_H: +- if (is_ereg(dst_reg)) +- EMIT3(0x66, 0x41, 0xC7); +- else +- EMIT2(0x66, 0xC7); +- goto st; +- case BPF_ST | BPF_MEM | BPF_W: +- if (is_ereg(dst_reg)) +- EMIT2(0x41, 0xC7); +- else +- EMIT1(0xC7); +- goto st; +- case BPF_ST | BPF_MEM | BPF_DW: +- EMIT2(add_1mod(0x48, dst_reg), 0xC7); +- +-st: if (is_imm8(insn->off)) +- EMIT2(add_1reg(0x40, dst_reg), insn->off); +- else +- EMIT1_off32(add_1reg(0x80, dst_reg), insn->off); +- +- EMIT(imm32, bpf_size_to_x86_bytes(BPF_SIZE(insn->code))); +- break; +- +- /* STX: *(u8*)(dst_reg + off) = src_reg */ +- case BPF_STX | BPF_MEM | BPF_B: +- /* emit 'mov byte ptr [rax + off], al' */ +- if (is_ereg(dst_reg) || is_ereg(src_reg) || +- /* have to add extra byte for x86 SIL, DIL regs */ +- src_reg == BPF_REG_1 || src_reg == BPF_REG_2) +- EMIT2(add_2mod(0x40, dst_reg, src_reg), 0x88); +- else +- EMIT1(0x88); +- goto stx; +- case BPF_STX | BPF_MEM | BPF_H: +- if (is_ereg(dst_reg) || is_ereg(src_reg)) +- EMIT3(0x66, add_2mod(0x40, dst_reg, src_reg), 0x89); +- else +- EMIT2(0x66, 0x89); +- goto stx; +- case BPF_STX | BPF_MEM | BPF_W: +- if (is_ereg(dst_reg) || is_ereg(src_reg)) +- EMIT2(add_2mod(0x40, dst_reg, src_reg), 0x89); +- else +- EMIT1(0x89); +- goto stx; +- case BPF_STX | BPF_MEM | BPF_DW: +- EMIT2(add_2mod(0x48, dst_reg, src_reg), 0x89); +-stx: if (is_imm8(insn->off)) +- EMIT2(add_2reg(0x40, dst_reg, src_reg), insn->off); +- else +- EMIT1_off32(add_2reg(0x80, dst_reg, src_reg), +- insn->off); +- break; +- +- /* LDX: dst_reg = *(u8*)(src_reg + off) */ +- case BPF_LDX | BPF_MEM | BPF_B: +- /* emit 'movzx rax, byte ptr [rax + off]' */ +- EMIT3(add_2mod(0x48, src_reg, dst_reg), 0x0F, 0xB6); +- goto ldx; +- case BPF_LDX | BPF_MEM | BPF_H: +- /* emit 'movzx rax, word ptr [rax + off]' */ +- EMIT3(add_2mod(0x48, src_reg, dst_reg), 0x0F, 0xB7); +- goto ldx; +- case BPF_LDX | BPF_MEM | BPF_W: +- /* emit 'mov eax, dword ptr [rax+0x14]' */ +- if (is_ereg(dst_reg) || is_ereg(src_reg)) +- EMIT2(add_2mod(0x40, src_reg, dst_reg), 0x8B); +- else +- EMIT1(0x8B); +- goto ldx; +- case BPF_LDX | BPF_MEM | BPF_DW: +- /* emit 'mov rax, qword ptr [rax+0x14]' */ +- EMIT2(add_2mod(0x48, src_reg, dst_reg), 0x8B); +-ldx: /* if insn->off == 0 we can save one extra byte, but +- * special case of x86 r13 which always needs an offset +- * is not worth the hassle +- */ +- if (is_imm8(insn->off)) +- EMIT2(add_2reg(0x40, src_reg, dst_reg), insn->off); +- else +- EMIT1_off32(add_2reg(0x80, src_reg, dst_reg), +- insn->off); +- break; +- +- /* STX XADD: lock *(u32*)(dst_reg + off) += src_reg */ +- case BPF_STX | BPF_XADD | BPF_W: +- /* emit 'lock add dword ptr [rax + off], eax' */ +- if (is_ereg(dst_reg) || is_ereg(src_reg)) +- EMIT3(0xF0, add_2mod(0x40, dst_reg, src_reg), 0x01); +- else +- EMIT2(0xF0, 0x01); +- goto xadd; +- case BPF_STX | BPF_XADD | BPF_DW: +- EMIT3(0xF0, add_2mod(0x48, dst_reg, src_reg), 0x01); +-xadd: if (is_imm8(insn->off)) +- EMIT2(add_2reg(0x40, dst_reg, src_reg), insn->off); +- else +- EMIT1_off32(add_2reg(0x80, dst_reg, src_reg), +- insn->off); +- break; +- +- /* call */ +- case BPF_JMP | BPF_CALL: +- func = (u8 *) __bpf_call_base + imm32; +- jmp_offset = func - (image + addrs[i]); +- if (ctx->seen_ld_abs) { +- EMIT2(0x41, 0x52); /* push %r10 */ +- EMIT2(0x41, 0x51); /* push %r9 */ +- /* need to adjust jmp offset, since +- * pop %r9, pop %r10 take 4 bytes after call insn +- */ +- jmp_offset += 4; +- } +- if (!imm32 || !is_simm32(jmp_offset)) { +- pr_err("unsupported bpf func %d addr %p image %p\n", +- imm32, func, image); +- return -EINVAL; +- } +- EMIT1_off32(0xE8, jmp_offset); +- if (ctx->seen_ld_abs) { +- EMIT2(0x41, 0x59); /* pop %r9 */ +- EMIT2(0x41, 0x5A); /* pop %r10 */ +- } +- break; +- +- /* cond jump */ +- case BPF_JMP | BPF_JEQ | BPF_X: +- case BPF_JMP | BPF_JNE | BPF_X: +- case BPF_JMP | BPF_JGT | BPF_X: +- case BPF_JMP | BPF_JGE | BPF_X: +- case BPF_JMP | BPF_JSGT | BPF_X: +- case BPF_JMP | BPF_JSGE | BPF_X: +- /* cmp dst_reg, src_reg */ +- EMIT3(add_2mod(0x48, dst_reg, src_reg), 0x39, +- add_2reg(0xC0, dst_reg, src_reg)); +- goto emit_cond_jmp; +- +- case BPF_JMP | BPF_JSET | BPF_X: +- /* test dst_reg, src_reg */ +- EMIT3(add_2mod(0x48, dst_reg, src_reg), 0x85, +- add_2reg(0xC0, dst_reg, src_reg)); +- goto emit_cond_jmp; +- +- case BPF_JMP | BPF_JSET | BPF_K: +- /* test dst_reg, imm32 */ +- EMIT1(add_1mod(0x48, dst_reg)); +- EMIT2_off32(0xF7, add_1reg(0xC0, dst_reg), imm32); +- goto emit_cond_jmp; +- +- case BPF_JMP | BPF_JEQ | BPF_K: +- case BPF_JMP | BPF_JNE | BPF_K: +- case BPF_JMP | BPF_JGT | BPF_K: +- case BPF_JMP | BPF_JGE | BPF_K: +- case BPF_JMP | BPF_JSGT | BPF_K: +- case BPF_JMP | BPF_JSGE | BPF_K: +- /* cmp dst_reg, imm8/32 */ +- EMIT1(add_1mod(0x48, dst_reg)); +- +- if (is_imm8(imm32)) +- EMIT3(0x83, add_1reg(0xF8, dst_reg), imm32); +- else +- EMIT2_off32(0x81, add_1reg(0xF8, dst_reg), imm32); +- +-emit_cond_jmp: /* convert BPF opcode to x86 */ +- switch (BPF_OP(insn->code)) { +- case BPF_JEQ: +- jmp_cond = X86_JE; +- break; +- case BPF_JSET: +- case BPF_JNE: +- jmp_cond = X86_JNE; +- break; +- case BPF_JGT: +- /* GT is unsigned '>', JA in x86 */ +- jmp_cond = X86_JA; +- break; +- case BPF_JGE: +- /* GE is unsigned '>=', JAE in x86 */ +- jmp_cond = X86_JAE; +- break; +- case BPF_JSGT: +- /* signed '>', GT in x86 */ +- jmp_cond = X86_JG; +- break; +- case BPF_JSGE: +- /* signed '>=', GE in x86 */ +- jmp_cond = X86_JGE; +- break; +- default: /* to silence gcc warning */ +- return -EFAULT; +- } +- jmp_offset = addrs[i + insn->off] - addrs[i]; +- if (is_imm8(jmp_offset)) { +- EMIT2(jmp_cond, jmp_offset); +- } else if (is_simm32(jmp_offset)) { +- EMIT2_off32(0x0F, jmp_cond + 0x10, jmp_offset); +- } else { +- pr_err("cond_jmp gen bug %llx\n", jmp_offset); +- return -EFAULT; +- } +- +- break; +- +- case BPF_JMP | BPF_JA: +- jmp_offset = addrs[i + insn->off] - addrs[i]; +- if (!jmp_offset) +- /* optimize out nop jumps */ +- break; +-emit_jmp: +- if (is_imm8(jmp_offset)) { +- EMIT2(0xEB, jmp_offset); +- } else if (is_simm32(jmp_offset)) { +- EMIT1_off32(0xE9, jmp_offset); +- } else { +- pr_err("jmp gen bug %llx\n", jmp_offset); +- return -EFAULT; +- } +- break; +- +- case BPF_LD | BPF_IND | BPF_W: +- func = sk_load_word; +- goto common_load; +- case BPF_LD | BPF_ABS | BPF_W: +- func = CHOOSE_LOAD_FUNC(imm32, sk_load_word); +-common_load: ctx->seen_ld_abs = true; +- jmp_offset = func - (image + addrs[i]); +- if (!func || !is_simm32(jmp_offset)) { +- pr_err("unsupported bpf func %d addr %p image %p\n", +- imm32, func, image); +- return -EINVAL; +- } +- if (BPF_MODE(insn->code) == BPF_ABS) { +- /* mov %esi, imm32 */ +- EMIT1_off32(0xBE, imm32); +- } else { +- /* mov %rsi, src_reg */ +- EMIT_mov(BPF_REG_2, src_reg); +- if (imm32) { +- if (is_imm8(imm32)) +- /* add %esi, imm8 */ +- EMIT3(0x83, 0xC6, imm32); +- else +- /* add %esi, imm32 */ +- EMIT2_off32(0x81, 0xC6, imm32); +- } +- } +- /* skb pointer is in R6 (%rbx), it will be copied into +- * %rdi if skb_copy_bits() call is necessary. +- * sk_load_* helpers also use %r10 and %r9d. +- * See bpf_jit.S +- */ +- EMIT1_off32(0xE8, jmp_offset); /* call */ +- break; +- +- case BPF_LD | BPF_IND | BPF_H: +- func = sk_load_half; +- goto common_load; +- case BPF_LD | BPF_ABS | BPF_H: +- func = CHOOSE_LOAD_FUNC(imm32, sk_load_half); +- goto common_load; +- case BPF_LD | BPF_IND | BPF_B: +- func = sk_load_byte; +- goto common_load; +- case BPF_LD | BPF_ABS | BPF_B: +- func = CHOOSE_LOAD_FUNC(imm32, sk_load_byte); +- goto common_load; +- +- case BPF_JMP | BPF_EXIT: +- if (i != insn_cnt - 1) { +- jmp_offset = ctx->cleanup_addr - addrs[i]; +- goto emit_jmp; +- } +- /* update cleanup_addr */ +- ctx->cleanup_addr = proglen; +- /* mov rbx, qword ptr [rbp-X] */ +- EMIT3_off32(0x48, 0x8B, 0x9D, -stacksize); +- /* mov r13, qword ptr [rbp-X] */ +- EMIT3_off32(0x4C, 0x8B, 0xAD, -stacksize + 8); +- /* mov r14, qword ptr [rbp-X] */ +- EMIT3_off32(0x4C, 0x8B, 0xB5, -stacksize + 16); +- /* mov r15, qword ptr [rbp-X] */ +- EMIT3_off32(0x4C, 0x8B, 0xBD, -stacksize + 24); +- +- EMIT1(0xC9); /* leave */ +- EMIT1(0xC3); /* ret */ +- break; +- +- default: +- /* By design x64 JIT should support all BPF instructions +- * This error will be seen if new instruction was added +- * to interpreter, but not to JIT +- * or if there is junk in sk_filter +- */ +- pr_err("bpf_jit: unknown opcode %02x\n", insn->code); +- return -EINVAL; +- } +- +- ilen = prog - temp; +- if (image) { +- if (unlikely(proglen + ilen > oldproglen)) { +- pr_err("bpf_jit_compile fatal error\n"); +- return -EFAULT; +- } +- memcpy(image + proglen, temp, ilen); +- } +- proglen += ilen; +- addrs[i] = proglen; +- prog = temp; +- } +- return proglen; +-} +- +-void bpf_jit_compile(struct sk_filter *prog) +-{ +-} +- +-void bpf_int_jit_compile(struct sk_filter *prog) +-{ +- struct bpf_binary_header *header = NULL; +- int proglen, oldproglen = 0; +- struct jit_context ctx = {}; ++void bpf_jit_compile(struct sk_filter *fp) ++{ + u8 temp[MAX_INSTR_CODE_SIZE]; - u8 *prog; - unsigned int proglen, oldproglen = 0; - int ilen, i; - int t_offset, f_offset; - u8 t_op, f_op, seen = 0, pass; ++ u8 *prog; ++ unsigned int proglen, oldproglen = 0; ++ int ilen, i; ++ int t_offset, f_offset; ++ u8 t_op, f_op, seen = 0, pass; u8 *image = NULL; -- struct bpf_binary_header *header = NULL; +- int *addrs; +- int pass; +- int i; + u8 *header = NULL; - u8 *func; - int pc_ret0 = -1; /* bpf index of first RET #0 instruction (if any) */ - unsigned int cleanup_addr; /* epilogue code offset */ - unsigned int *addrs; - const struct sock_filter *filter = fp->insns; - int flen = fp->len; ++ u8 *func; ++ int pc_ret0 = -1; /* bpf index of first RET #0 instruction (if any) */ ++ unsigned int cleanup_addr; /* epilogue code offset */ ++ unsigned int *addrs; ++ const struct sock_filter *filter = fp->insns; ++ int flen = fp->len; +#ifdef CONFIG_GRKERNSEC_JIT_HARDEN + unsigned int randkey; +#endif if (!bpf_jit_enable) return; -@@ -203,10 +298,10 @@ void bpf_jit_compile(struct sk_filter *fp) + +- if (!prog || !prog->len) +- return; +- +- addrs = kmalloc(prog->len * sizeof(*addrs), GFP_KERNEL); +- if (!addrs) ++ addrs = kmalloc(flen * sizeof(*addrs), GFP_KERNEL); ++ if (addrs == NULL) return; /* Before first pass, make a rough estimation of addrs[] - * each bpf instruction is translated to less than 64 bytes + * each bpf instruction is translated to less than MAX_INSTR_CODE_SIZE bytes */ - for (proglen = 0, i = 0; i < flen; i++) { +- for (proglen = 0, i = 0; i < prog->len; i++) { - proglen += 64; ++ for (proglen = 0, i = 0; i < flen; i++) { + proglen += MAX_INSTR_CODE_SIZE; addrs[i] = proglen; } - cleanup_addr = proglen; /* epilogue address */ -@@ -285,6 +380,10 @@ void bpf_jit_compile(struct sk_filter *fp) - for (i = 0; i < flen; i++) { - unsigned int K = filter[i].k; - +- ctx.cleanup_addr = proglen; ++ cleanup_addr = proglen; /* epilogue address */ + + for (pass = 0; pass < 10; pass++) { +- proglen = do_jit(prog, addrs, image, oldproglen, &ctx); +- if (proglen <= 0) { +- image = NULL; +- if (header) +- module_free(NULL, header); +- goto out; ++ u8 seen_or_pass0 = (pass == 0) ? (SEEN_XREG | SEEN_DATAREF | SEEN_MEM) : seen; ++ /* no prologue/epilogue for trivial filters (RET something) */ ++ proglen = 0; ++ prog = temp; ++ ++ if (seen_or_pass0) { ++ EMIT4(0x55, 0x48, 0x89, 0xe5); /* push %rbp; mov %rsp,%rbp */ ++ EMIT4(0x48, 0x83, 0xec, 96); /* subq $96,%rsp */ ++ /* note : must save %rbx in case bpf_error is hit */ ++ if (seen_or_pass0 & (SEEN_XREG | SEEN_DATAREF)) ++ EMIT4(0x48, 0x89, 0x5d, 0xf8); /* mov %rbx, -8(%rbp) */ ++ if (seen_or_pass0 & SEEN_XREG) ++ CLEAR_X(); /* make sure we dont leek kernel memory */ ++ ++ /* ++ * If this filter needs to access skb data, ++ * loads r9 and r8 with : ++ * r9 = skb->len - skb->data_len ++ * r8 = skb->data ++ */ ++ if (seen_or_pass0 & SEEN_DATAREF) { ++ if (offsetof(struct sk_buff, len) <= 127) ++ /* mov off8(%rdi),%r9d */ ++ EMIT4(0x44, 0x8b, 0x4f, offsetof(struct sk_buff, len)); ++ else { ++ /* mov off32(%rdi),%r9d */ ++ EMIT3(0x44, 0x8b, 0x8f); ++ EMIT(offsetof(struct sk_buff, len), 4); ++ } ++ if (is_imm8(offsetof(struct sk_buff, data_len))) ++ /* sub off8(%rdi),%r9d */ ++ EMIT4(0x44, 0x2b, 0x4f, offsetof(struct sk_buff, data_len)); ++ else { ++ EMIT3(0x44, 0x2b, 0x8f); ++ EMIT(offsetof(struct sk_buff, data_len), 4); ++ } ++ ++ if (is_imm8(offsetof(struct sk_buff, data))) ++ /* mov off8(%rdi),%r8 */ ++ EMIT4(0x4c, 0x8b, 0x47, offsetof(struct sk_buff, data)); ++ else { ++ /* mov off32(%rdi),%r8 */ ++ EMIT3(0x4c, 0x8b, 0x87); ++ EMIT(offsetof(struct sk_buff, data), 4); ++ } ++ } + } ++ ++ switch (filter[0].code) { ++ case BPF_S_RET_K: ++ case BPF_S_LD_W_LEN: ++ case BPF_S_ANC_PROTOCOL: ++ case BPF_S_ANC_IFINDEX: ++ case BPF_S_ANC_MARK: ++ case BPF_S_ANC_RXHASH: ++ case BPF_S_ANC_CPU: ++ case BPF_S_ANC_VLAN_TAG: ++ case BPF_S_ANC_VLAN_TAG_PRESENT: ++ case BPF_S_ANC_QUEUE: ++ case BPF_S_ANC_PKTTYPE: ++ case BPF_S_LD_W_ABS: ++ case BPF_S_LD_H_ABS: ++ case BPF_S_LD_B_ABS: ++ /* first instruction sets A register (or is RET 'constant') */ ++ break; ++ default: ++ /* make sure we dont leak kernel information to user */ ++ CLEAR_A(); /* A = 0 */ ++ } ++ ++ for (i = 0; i < flen; i++) { ++ unsigned int K = filter[i].k; ++ +#ifdef CONFIG_GRKERNSEC_JIT_HARDEN + randkey = prandom_u32(); +#endif + - switch (filter[i].code) { - case BPF_S_ALU_ADD_X: /* A += X; */ - seen |= SEEN_XREG; -@@ -317,10 +416,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 */ -- else { -- EMIT2(0x69, 0xc0); /* imul imm32,%eax */ -- EMIT(K, 4); -- } ++ switch (filter[i].code) { ++ case BPF_S_ALU_ADD_X: /* A += X; */ ++ seen |= SEEN_XREG; ++ EMIT2(0x01, 0xd8); /* add %ebx,%eax */ ++ break; ++ case BPF_S_ALU_ADD_K: /* A += K; */ ++ if (!K) ++ break; ++ if (is_imm8(K)) ++ EMIT3(0x83, 0xc0, K); /* add imm8,%eax */ ++ else ++ EMIT1_off32(0x05, K); /* add imm32,%eax */ ++ break; ++ case BPF_S_ALU_SUB_X: /* A -= X; */ ++ seen |= SEEN_XREG; ++ EMIT2(0x29, 0xd8); /* sub %ebx,%eax */ ++ break; ++ case BPF_S_ALU_SUB_K: /* A -= K */ ++ if (!K) ++ break; ++ if (is_imm8(K)) ++ EMIT3(0x83, 0xe8, K); /* sub imm8,%eax */ ++ else ++ EMIT1_off32(0x2d, K); /* sub imm32,%eax */ ++ break; ++ case BPF_S_ALU_MUL_X: /* A *= X; */ ++ seen |= SEEN_XREG; ++ EMIT3(0x0f, 0xaf, 0xc3); /* imul %ebx,%eax */ ++ break; ++ case BPF_S_ALU_MUL_K: /* A *= K */ ++ if (is_imm8(K)) ++ EMIT3(0x6b, 0xc0, K); /* imul imm8,%eax,%eax */ + else + EMIT2_off32(0x69, 0xc0, K); /* imul imm32,%eax */ - break; - case BPF_S_ALU_DIV_X: /* A /= X; */ - seen |= SEEN_XREG; -@@ -364,7 +461,11 @@ void bpf_jit_compile(struct sk_filter *fp) - break; - } - EMIT2(0x31, 0xd2); /* xor %edx,%edx */ ++ break; ++ case BPF_S_ALU_DIV_X: /* A /= X; */ ++ seen |= SEEN_XREG; ++ EMIT2(0x85, 0xdb); /* test %ebx,%ebx */ ++ if (pc_ret0 > 0) { ++ /* addrs[pc_ret0 - 1] is start address of target ++ * (addrs[i] - 4) is the address following this jmp ++ * ("xor %edx,%edx; div %ebx" being 4 bytes long) ++ */ ++ EMIT_COND_JMP(X86_JE, addrs[pc_ret0 - 1] - ++ (addrs[i] - 4)); ++ } else { ++ EMIT_COND_JMP(X86_JNE, 2 + 5); ++ CLEAR_A(); ++ EMIT1_off32(0xe9, cleanup_addr - (addrs[i] - 4)); /* jmp .+off32 */ ++ } ++ EMIT4(0x31, 0xd2, 0xf7, 0xf3); /* xor %edx,%edx; div %ebx */ ++ break; ++ case BPF_S_ALU_MOD_X: /* A %= X; */ ++ seen |= SEEN_XREG; ++ EMIT2(0x85, 0xdb); /* test %ebx,%ebx */ ++ if (pc_ret0 > 0) { ++ /* addrs[pc_ret0 - 1] is start address of target ++ * (addrs[i] - 6) is the address following this jmp ++ * ("xor %edx,%edx; div %ebx;mov %edx,%eax" being 6 bytes long) ++ */ ++ EMIT_COND_JMP(X86_JE, addrs[pc_ret0 - 1] - ++ (addrs[i] - 6)); ++ } else { ++ EMIT_COND_JMP(X86_JNE, 2 + 5); ++ CLEAR_A(); ++ EMIT1_off32(0xe9, cleanup_addr - (addrs[i] - 6)); /* jmp .+off32 */ ++ } ++ EMIT2(0x31, 0xd2); /* xor %edx,%edx */ ++ EMIT2(0xf7, 0xf3); /* div %ebx */ ++ EMIT2(0x89, 0xd0); /* mov %edx,%eax */ ++ break; ++ case BPF_S_ALU_MOD_K: /* A %= K; */ ++ if (K == 1) { ++ CLEAR_A(); ++ break; ++ } ++ EMIT2(0x31, 0xd2); /* xor %edx,%edx */ +#ifdef CONFIG_GRKERNSEC_JIT_HARDEN + DILUTE_CONST_SEQUENCE(K, randkey); +#else - EMIT1(0xb9);EMIT(K, 4); /* mov imm32,%ecx */ ++ EMIT1(0xb9);EMIT(K, 4); /* mov imm32,%ecx */ +#endif - EMIT2(0xf7, 0xf1); /* div %ecx */ - EMIT2(0x89, 0xd0); /* mov %edx,%eax */ - break; -@@ -372,7 +473,11 @@ void bpf_jit_compile(struct sk_filter *fp) - if (K == 1) - break; - EMIT2(0x31, 0xd2); /* xor %edx,%edx */ ++ EMIT2(0xf7, 0xf1); /* div %ecx */ ++ EMIT2(0x89, 0xd0); /* mov %edx,%eax */ ++ break; ++ case BPF_S_ALU_DIV_K: /* A /= K */ ++ if (K == 1) ++ break; ++ EMIT2(0x31, 0xd2); /* xor %edx,%edx */ +#ifdef CONFIG_GRKERNSEC_JIT_HARDEN + DILUTE_CONST_SEQUENCE(K, randkey); +#else - EMIT1(0xb9);EMIT(K, 4); /* mov imm32,%ecx */ ++ EMIT1(0xb9);EMIT(K, 4); /* mov imm32,%ecx */ +#endif - EMIT2(0xf7, 0xf1); /* div %ecx */ - break; - case BPF_S_ALU_AND_X: -@@ -643,8 +748,7 @@ common_load_ind: seen |= SEEN_DATAREF | SEEN_XREG; - if (is_imm8(K)) { - EMIT3(0x8d, 0x73, K); /* lea imm8(%rbx), %esi */ - } else { -- EMIT2(0x8d, 0xb3); /* lea imm32(%rbx),%esi */ -- EMIT(K, 4); -+ EMIT2_off32(0x8d, 0xb3, K); /* lea imm32(%rbx),%esi */ - } - } else { - EMIT2(0x89,0xde); /* mov %ebx,%esi */ -@@ -734,10 +838,12 @@ cond_branch: f_offset = addrs[i + filter[i].jf] - addrs[i]; - if (unlikely(proglen + ilen > oldproglen)) { - pr_err("bpb_jit_compile fatal error\n"); - kfree(addrs); -- module_free(NULL, header); -+ module_free_exec(NULL, image); - return; - } -+ pax_open_kernel(); - memcpy(image + proglen, temp, ilen); -+ pax_close_kernel(); - } - proglen += ilen; - addrs[i] = proglen; -@@ -770,7 +876,6 @@ cond_branch: f_offset = addrs[i + filter[i].jf] - addrs[i]; - - if (image) { - bpf_flush_icache(header, image + proglen); -- set_memory_ro((unsigned long)header, header->pages); - fp->bpf_func = (void *)image; - fp->jited = 1; - } -@@ -783,10 +888,9 @@ static void bpf_jit_free_deferred(struct work_struct *work) - { - struct sk_filter *fp = container_of(work, struct sk_filter, work); - unsigned long addr = (unsigned long)fp->bpf_func & PAGE_MASK; -- struct bpf_binary_header *header = (void *)addr; - -- set_memory_rw(addr, header->pages); -- module_free(NULL, header); -+ set_memory_rw(addr, 1); -+ module_free_exec(NULL, (void *)addr); - kfree(fp); - } - -diff --git a/arch/x86/oprofile/backtrace.c b/arch/x86/oprofile/backtrace.c -index 5d04be5..2beeaa2 100644 ---- a/arch/x86/oprofile/backtrace.c -+++ b/arch/x86/oprofile/backtrace.c -@@ -46,11 +46,11 @@ dump_user_backtrace_32(struct stack_frame_ia32 *head) - struct stack_frame_ia32 *fp; - unsigned long bytes; - -- bytes = copy_from_user_nmi(bufhead, head, sizeof(bufhead)); -+ bytes = copy_from_user_nmi(bufhead, (const char __force_user *)head, sizeof(bufhead)); - if (bytes != 0) - return NULL; - -- fp = (struct stack_frame_ia32 *) compat_ptr(bufhead[0].next_frame); -+ fp = (struct stack_frame_ia32 __force_kernel *) compat_ptr(bufhead[0].next_frame); - - oprofile_add_trace(bufhead[0].return_address); - -@@ -92,7 +92,7 @@ static struct stack_frame *dump_user_backtrace(struct stack_frame *head) - struct stack_frame bufhead[2]; - unsigned long bytes; - -- bytes = copy_from_user_nmi(bufhead, head, sizeof(bufhead)); -+ bytes = copy_from_user_nmi(bufhead, (const char __force_user *)head, sizeof(bufhead)); - if (bytes != 0) - return NULL; - -@@ -111,7 +111,7 @@ x86_backtrace(struct pt_regs * const regs, unsigned int depth) - { - struct stack_frame *head = (struct stack_frame *)frame_pointer(regs); - -- if (!user_mode_vm(regs)) { -+ if (!user_mode(regs)) { - unsigned long stack = kernel_stack_pointer(regs); - if (depth) - dump_trace(NULL, regs, (unsigned long *)stack, 0, -diff --git a/arch/x86/oprofile/nmi_int.c b/arch/x86/oprofile/nmi_int.c -index 379e8bd..6386e09 100644 ---- a/arch/x86/oprofile/nmi_int.c -+++ b/arch/x86/oprofile/nmi_int.c -@@ -23,6 +23,7 @@ - #include - #include - #include ++ EMIT2(0xf7, 0xf1); /* div %ecx */ ++ break; ++ case BPF_S_ALU_AND_X: ++ seen |= SEEN_XREG; ++ EMIT2(0x21, 0xd8); /* and %ebx,%eax */ ++ break; ++ case BPF_S_ALU_AND_K: ++ if (K >= 0xFFFFFF00) { ++ EMIT2(0x24, K & 0xFF); /* and imm8,%al */ ++ } else if (K >= 0xFFFF0000) { ++ EMIT2(0x66, 0x25); /* and imm16,%ax */ ++ EMIT(K, 2); ++ } else { ++ EMIT1_off32(0x25, K); /* and imm32,%eax */ ++ } ++ break; ++ case BPF_S_ALU_OR_X: ++ seen |= SEEN_XREG; ++ EMIT2(0x09, 0xd8); /* or %ebx,%eax */ ++ break; ++ case BPF_S_ALU_OR_K: ++ if (is_imm8(K)) ++ EMIT3(0x83, 0xc8, K); /* or imm8,%eax */ ++ else ++ EMIT1_off32(0x0d, K); /* or imm32,%eax */ ++ break; ++ case BPF_S_ANC_ALU_XOR_X: /* A ^= X; */ ++ case BPF_S_ALU_XOR_X: ++ seen |= SEEN_XREG; ++ EMIT2(0x31, 0xd8); /* xor %ebx,%eax */ ++ break; ++ case BPF_S_ALU_XOR_K: /* A ^= K; */ ++ if (K == 0) ++ break; ++ if (is_imm8(K)) ++ EMIT3(0x83, 0xf0, K); /* xor imm8,%eax */ ++ else ++ EMIT1_off32(0x35, K); /* xor imm32,%eax */ ++ break; ++ case BPF_S_ALU_LSH_X: /* A <<= X; */ ++ seen |= SEEN_XREG; ++ EMIT4(0x89, 0xd9, 0xd3, 0xe0); /* mov %ebx,%ecx; shl %cl,%eax */ ++ break; ++ case BPF_S_ALU_LSH_K: ++ if (K == 0) ++ break; ++ else if (K == 1) ++ EMIT2(0xd1, 0xe0); /* shl %eax */ ++ else ++ EMIT3(0xc1, 0xe0, K); ++ break; ++ case BPF_S_ALU_RSH_X: /* A >>= X; */ ++ seen |= SEEN_XREG; ++ EMIT4(0x89, 0xd9, 0xd3, 0xe8); /* mov %ebx,%ecx; shr %cl,%eax */ ++ break; ++ case BPF_S_ALU_RSH_K: /* A >>= K; */ ++ if (K == 0) ++ break; ++ else if (K == 1) ++ EMIT2(0xd1, 0xe8); /* shr %eax */ ++ else ++ EMIT3(0xc1, 0xe8, K); ++ break; ++ case BPF_S_ALU_NEG: ++ EMIT2(0xf7, 0xd8); /* neg %eax */ ++ break; ++ case BPF_S_RET_K: ++ if (!K) { ++ if (pc_ret0 == -1) ++ pc_ret0 = i; ++ CLEAR_A(); ++ } else { ++ EMIT1_off32(0xb8, K); /* mov $imm32,%eax */ ++ } ++ /* fallinto */ ++ case BPF_S_RET_A: ++ if (seen_or_pass0) { ++ if (i != flen - 1) { ++ EMIT_JMP(cleanup_addr - addrs[i]); ++ break; ++ } ++ if (seen_or_pass0 & SEEN_XREG) ++ EMIT4(0x48, 0x8b, 0x5d, 0xf8); /* mov -8(%rbp),%rbx */ ++ EMIT1(0xc9); /* leaveq */ ++ } ++ EMIT1(0xc3); /* ret */ ++ break; ++ case BPF_S_MISC_TAX: /* X = A */ ++ seen |= SEEN_XREG; ++ EMIT2(0x89, 0xc3); /* mov %eax,%ebx */ ++ break; ++ case BPF_S_MISC_TXA: /* A = X */ ++ seen |= SEEN_XREG; ++ EMIT2(0x89, 0xd8); /* mov %ebx,%eax */ ++ break; ++ case BPF_S_LD_IMM: /* A = K */ ++ if (!K) ++ CLEAR_A(); ++ else ++ EMIT1_off32(0xb8, K); /* mov $imm32,%eax */ ++ break; ++ case BPF_S_LDX_IMM: /* X = K */ ++ seen |= SEEN_XREG; ++ if (!K) ++ CLEAR_X(); ++ else ++ EMIT1_off32(0xbb, K); /* mov $imm32,%ebx */ ++ break; ++ case BPF_S_LD_MEM: /* A = mem[K] : mov off8(%rbp),%eax */ ++ seen |= SEEN_MEM; ++ EMIT3(0x8b, 0x45, 0xf0 - K*4); ++ break; ++ case BPF_S_LDX_MEM: /* X = mem[K] : mov off8(%rbp),%ebx */ ++ seen |= SEEN_XREG | SEEN_MEM; ++ EMIT3(0x8b, 0x5d, 0xf0 - K*4); ++ break; ++ case BPF_S_ST: /* mem[K] = A : mov %eax,off8(%rbp) */ ++ seen |= SEEN_MEM; ++ EMIT3(0x89, 0x45, 0xf0 - K*4); ++ break; ++ case BPF_S_STX: /* mem[K] = X : mov %ebx,off8(%rbp) */ ++ seen |= SEEN_XREG | SEEN_MEM; ++ EMIT3(0x89, 0x5d, 0xf0 - K*4); ++ break; ++ case BPF_S_LD_W_LEN: /* A = skb->len; */ ++ BUILD_BUG_ON(FIELD_SIZEOF(struct sk_buff, len) != 4); ++ if (is_imm8(offsetof(struct sk_buff, len))) ++ /* mov off8(%rdi),%eax */ ++ EMIT3(0x8b, 0x47, offsetof(struct sk_buff, len)); ++ else { ++ EMIT2(0x8b, 0x87); ++ EMIT(offsetof(struct sk_buff, len), 4); ++ } ++ break; ++ case BPF_S_LDX_W_LEN: /* X = skb->len; */ ++ seen |= SEEN_XREG; ++ if (is_imm8(offsetof(struct sk_buff, len))) ++ /* mov off8(%rdi),%ebx */ ++ EMIT3(0x8b, 0x5f, offsetof(struct sk_buff, len)); ++ else { ++ EMIT2(0x8b, 0x9f); ++ EMIT(offsetof(struct sk_buff, len), 4); ++ } ++ break; ++ case BPF_S_ANC_PROTOCOL: /* A = ntohs(skb->protocol); */ ++ BUILD_BUG_ON(FIELD_SIZEOF(struct sk_buff, protocol) != 2); ++ if (is_imm8(offsetof(struct sk_buff, protocol))) { ++ /* movzwl off8(%rdi),%eax */ ++ EMIT4(0x0f, 0xb7, 0x47, offsetof(struct sk_buff, protocol)); ++ } else { ++ EMIT3(0x0f, 0xb7, 0x87); /* movzwl off32(%rdi),%eax */ ++ EMIT(offsetof(struct sk_buff, protocol), 4); ++ } ++ EMIT2(0x86, 0xc4); /* ntohs() : xchg %al,%ah */ ++ break; ++ case BPF_S_ANC_IFINDEX: ++ if (is_imm8(offsetof(struct sk_buff, dev))) { ++ /* movq off8(%rdi),%rax */ ++ EMIT4(0x48, 0x8b, 0x47, offsetof(struct sk_buff, dev)); ++ } else { ++ EMIT3(0x48, 0x8b, 0x87); /* movq off32(%rdi),%rax */ ++ EMIT(offsetof(struct sk_buff, dev), 4); ++ } ++ EMIT3(0x48, 0x85, 0xc0); /* test %rax,%rax */ ++ EMIT_COND_JMP(X86_JE, cleanup_addr - (addrs[i] - 6)); ++ BUILD_BUG_ON(FIELD_SIZEOF(struct net_device, ifindex) != 4); ++ EMIT2(0x8b, 0x80); /* mov off32(%rax),%eax */ ++ EMIT(offsetof(struct net_device, ifindex), 4); ++ break; ++ case BPF_S_ANC_MARK: ++ BUILD_BUG_ON(FIELD_SIZEOF(struct sk_buff, mark) != 4); ++ if (is_imm8(offsetof(struct sk_buff, mark))) { ++ /* mov off8(%rdi),%eax */ ++ EMIT3(0x8b, 0x47, offsetof(struct sk_buff, mark)); ++ } else { ++ EMIT2(0x8b, 0x87); ++ EMIT(offsetof(struct sk_buff, mark), 4); ++ } ++ break; ++ case BPF_S_ANC_RXHASH: ++ BUILD_BUG_ON(FIELD_SIZEOF(struct sk_buff, hash) != 4); ++ if (is_imm8(offsetof(struct sk_buff, hash))) { ++ /* mov off8(%rdi),%eax */ ++ EMIT3(0x8b, 0x47, offsetof(struct sk_buff, hash)); ++ } else { ++ EMIT2(0x8b, 0x87); ++ EMIT(offsetof(struct sk_buff, hash), 4); ++ } ++ break; ++ case BPF_S_ANC_QUEUE: ++ BUILD_BUG_ON(FIELD_SIZEOF(struct sk_buff, queue_mapping) != 2); ++ if (is_imm8(offsetof(struct sk_buff, queue_mapping))) { ++ /* movzwl off8(%rdi),%eax */ ++ EMIT4(0x0f, 0xb7, 0x47, offsetof(struct sk_buff, queue_mapping)); ++ } else { ++ EMIT3(0x0f, 0xb7, 0x87); /* movzwl off32(%rdi),%eax */ ++ EMIT(offsetof(struct sk_buff, queue_mapping), 4); ++ } ++ break; ++ case BPF_S_ANC_CPU: ++#ifdef CONFIG_SMP ++ EMIT4(0x65, 0x8b, 0x04, 0x25); /* mov %gs:off32,%eax */ ++ EMIT((u32)(unsigned long)&cpu_number, 4); /* A = smp_processor_id(); */ ++#else ++ CLEAR_A(); ++#endif ++ break; ++ case BPF_S_ANC_VLAN_TAG: ++ case BPF_S_ANC_VLAN_TAG_PRESENT: ++ BUILD_BUG_ON(FIELD_SIZEOF(struct sk_buff, vlan_tci) != 2); ++ if (is_imm8(offsetof(struct sk_buff, vlan_tci))) { ++ /* movzwl off8(%rdi),%eax */ ++ EMIT4(0x0f, 0xb7, 0x47, offsetof(struct sk_buff, vlan_tci)); ++ } else { ++ EMIT3(0x0f, 0xb7, 0x87); /* movzwl off32(%rdi),%eax */ ++ EMIT(offsetof(struct sk_buff, vlan_tci), 4); ++ } ++ BUILD_BUG_ON(VLAN_TAG_PRESENT != 0x1000); ++ if (filter[i].code == BPF_S_ANC_VLAN_TAG) { ++ EMIT3(0x80, 0xe4, 0xef); /* and $0xef,%ah */ ++ } else { ++ EMIT3(0xc1, 0xe8, 0x0c); /* shr $0xc,%eax */ ++ EMIT3(0x83, 0xe0, 0x01); /* and $0x1,%eax */ ++ } ++ break; ++ case BPF_S_ANC_PKTTYPE: ++ { ++ int off = pkt_type_offset(); ++ ++ if (off < 0) ++ goto out; ++ if (is_imm8(off)) { ++ /* movzbl off8(%rdi),%eax */ ++ EMIT4(0x0f, 0xb6, 0x47, off); ++ } else { ++ /* movbl off32(%rdi),%eax */ ++ EMIT3(0x0f, 0xb6, 0x87); ++ EMIT(off, 4); ++ } ++ EMIT3(0x83, 0xe0, PKT_TYPE_MAX); /* and $0x7,%eax */ ++ break; ++ } ++ case BPF_S_LD_W_ABS: ++ func = CHOOSE_LOAD_FUNC(K, sk_load_word); ++common_load: seen |= SEEN_DATAREF; ++ t_offset = func - (image + addrs[i]); ++ EMIT1_off32(0xbe, K); /* mov imm32,%esi */ ++ EMIT1_off32(0xe8, t_offset); /* call */ ++ break; ++ case BPF_S_LD_H_ABS: ++ func = CHOOSE_LOAD_FUNC(K, sk_load_half); ++ goto common_load; ++ case BPF_S_LD_B_ABS: ++ func = CHOOSE_LOAD_FUNC(K, sk_load_byte); ++ goto common_load; ++ case BPF_S_LDX_B_MSH: ++ func = CHOOSE_LOAD_FUNC(K, sk_load_byte_msh); ++ seen |= SEEN_DATAREF | SEEN_XREG; ++ t_offset = func - (image + addrs[i]); ++ EMIT1_off32(0xbe, K); /* mov imm32,%esi */ ++ EMIT1_off32(0xe8, t_offset); /* call sk_load_byte_msh */ ++ break; ++ case BPF_S_LD_W_IND: ++ func = sk_load_word; ++common_load_ind: seen |= SEEN_DATAREF | SEEN_XREG; ++ t_offset = func - (image + addrs[i]); ++ if (K) { ++ if (is_imm8(K)) { ++ EMIT3(0x8d, 0x73, K); /* lea imm8(%rbx), %esi */ ++ } else { ++ EMIT2_off32(0x8d, 0xb3, K); /* lea imm32(%rbx),%esi */ ++ } ++ } else { ++ EMIT2(0x89,0xde); /* mov %ebx,%esi */ ++ } ++ EMIT1_off32(0xe8, t_offset); /* call sk_load_xxx_ind */ ++ break; ++ case BPF_S_LD_H_IND: ++ func = sk_load_half; ++ goto common_load_ind; ++ case BPF_S_LD_B_IND: ++ func = sk_load_byte; ++ goto common_load_ind; ++ case BPF_S_JMP_JA: ++ t_offset = addrs[i + K] - addrs[i]; ++ EMIT_JMP(t_offset); ++ break; ++ COND_SEL(BPF_S_JMP_JGT_K, X86_JA, X86_JBE); ++ COND_SEL(BPF_S_JMP_JGE_K, X86_JAE, X86_JB); ++ COND_SEL(BPF_S_JMP_JEQ_K, X86_JE, X86_JNE); ++ COND_SEL(BPF_S_JMP_JSET_K,X86_JNE, X86_JE); ++ COND_SEL(BPF_S_JMP_JGT_X, X86_JA, X86_JBE); ++ COND_SEL(BPF_S_JMP_JGE_X, X86_JAE, X86_JB); ++ COND_SEL(BPF_S_JMP_JEQ_X, X86_JE, X86_JNE); ++ COND_SEL(BPF_S_JMP_JSET_X,X86_JNE, X86_JE); ++ ++cond_branch: f_offset = addrs[i + filter[i].jf] - addrs[i]; ++ t_offset = addrs[i + filter[i].jt] - addrs[i]; ++ ++ /* same targets, can avoid doing the test :) */ ++ if (filter[i].jt == filter[i].jf) { ++ EMIT_JMP(t_offset); ++ break; ++ } ++ ++ switch (filter[i].code) { ++ case BPF_S_JMP_JGT_X: ++ case BPF_S_JMP_JGE_X: ++ case BPF_S_JMP_JEQ_X: ++ seen |= SEEN_XREG; ++ EMIT2(0x39, 0xd8); /* cmp %ebx,%eax */ ++ break; ++ case BPF_S_JMP_JSET_X: ++ seen |= SEEN_XREG; ++ EMIT2(0x85, 0xd8); /* test %ebx,%eax */ ++ break; ++ case BPF_S_JMP_JEQ_K: ++ if (K == 0) { ++ EMIT2(0x85, 0xc0); /* test %eax,%eax */ ++ break; ++ } ++ case BPF_S_JMP_JGT_K: ++ case BPF_S_JMP_JGE_K: ++ if (K <= 127) ++ EMIT3(0x83, 0xf8, K); /* cmp imm8,%eax */ ++ else ++ EMIT1_off32(0x3d, K); /* cmp imm32,%eax */ ++ break; ++ case BPF_S_JMP_JSET_K: ++ if (K <= 0xFF) ++ EMIT2(0xa8, K); /* test imm8,%al */ ++ else if (!(K & 0xFFFF00FF)) ++ EMIT3(0xf6, 0xc4, K >> 8); /* test imm8,%ah */ ++ else if (K <= 0xFFFF) { ++ EMIT2(0x66, 0xa9); /* test imm16,%ax */ ++ EMIT(K, 2); ++ } else { ++ EMIT1_off32(0xa9, K); /* test imm32,%eax */ ++ } ++ break; ++ } ++ if (filter[i].jt != 0) { ++ if (filter[i].jf && f_offset) ++ t_offset += is_near(f_offset) ? 2 : 5; ++ EMIT_COND_JMP(t_op, t_offset); ++ if (filter[i].jf) ++ EMIT_JMP(f_offset); ++ break; ++ } ++ EMIT_COND_JMP(f_op, f_offset); ++ break; ++ default: ++ /* hmm, too complex filter, give up with jit compiler */ ++ goto out; ++ } ++ ilen = prog - temp; ++ if (image) { ++ if (unlikely(proglen + ilen > oldproglen)) { ++ pr_err("bpb_jit_compile fatal error\n"); ++ kfree(addrs); ++ module_free_exec(NULL, image); ++ return; ++ } ++ pax_open_kernel(); ++ memcpy(image + proglen, temp, ilen); ++ pax_close_kernel(); ++ } ++ proglen += ilen; ++ addrs[i] = proglen; ++ prog = temp; ++ } ++ /* last bpf instruction is always a RET : ++ * use it to give the cleanup instruction(s) addr ++ */ ++ cleanup_addr = proglen - 1; /* ret */ ++ if (seen_or_pass0) ++ cleanup_addr -= 1; /* leaveq */ ++ if (seen_or_pass0 & SEEN_XREG) ++ cleanup_addr -= 4; /* mov -8(%rbp),%rbx */ ++ + if (image) { + if (proglen != oldproglen) +- pr_err("bpf_jit: proglen=%d != oldproglen=%d\n", +- proglen, oldproglen); ++ pr_err("bpb_jit_compile proglen=%u != oldproglen=%u\n", proglen, oldproglen); + break; + } + if (proglen == oldproglen) { +@@ -918,32 +872,30 @@ void bpf_int_jit_compile(struct sk_filter *prog) + } + + if (bpf_jit_enable > 1) +- bpf_jit_dump(prog->len, proglen, 0, image); ++ bpf_jit_dump(flen, proglen, pass, image); + + if (image) { + bpf_flush_icache(header, image + proglen); +- set_memory_ro((unsigned long)header, header->pages); +- prog->bpf_func = (void *)image; +- prog->jited = 1; ++ fp->bpf_func = (void *)image; + } + out: + kfree(addrs); ++ return; + } + + static void bpf_jit_free_deferred(struct work_struct *work) + { + struct sk_filter *fp = container_of(work, struct sk_filter, work); + unsigned long addr = (unsigned long)fp->bpf_func & PAGE_MASK; +- struct bpf_binary_header *header = (void *)addr; + +- set_memory_rw(addr, header->pages); +- module_free(NULL, header); ++ set_memory_rw(addr, 1); ++ module_free_exec(NULL, (void *)addr); + kfree(fp); + } + + void bpf_jit_free(struct sk_filter *fp) + { +- if (fp->jited) { ++ if (fp->bpf_func != sk_run_filter) { + INIT_WORK(&fp->work, bpf_jit_free_deferred); + schedule_work(&fp->work); + } else { +diff --git a/arch/x86/oprofile/backtrace.c b/arch/x86/oprofile/backtrace.c +index 5d04be5..2beeaa2 100644 +--- a/arch/x86/oprofile/backtrace.c ++++ b/arch/x86/oprofile/backtrace.c +@@ -46,11 +46,11 @@ dump_user_backtrace_32(struct stack_frame_ia32 *head) + struct stack_frame_ia32 *fp; + unsigned long bytes; + +- bytes = copy_from_user_nmi(bufhead, head, sizeof(bufhead)); ++ bytes = copy_from_user_nmi(bufhead, (const char __force_user *)head, sizeof(bufhead)); + if (bytes != 0) + return NULL; + +- fp = (struct stack_frame_ia32 *) compat_ptr(bufhead[0].next_frame); ++ fp = (struct stack_frame_ia32 __force_kernel *) compat_ptr(bufhead[0].next_frame); + + oprofile_add_trace(bufhead[0].return_address); + +@@ -92,7 +92,7 @@ static struct stack_frame *dump_user_backtrace(struct stack_frame *head) + struct stack_frame bufhead[2]; + unsigned long bytes; + +- bytes = copy_from_user_nmi(bufhead, head, sizeof(bufhead)); ++ bytes = copy_from_user_nmi(bufhead, (const char __force_user *)head, sizeof(bufhead)); + if (bytes != 0) + return NULL; + +@@ -111,7 +111,7 @@ x86_backtrace(struct pt_regs * const regs, unsigned int depth) + { + struct stack_frame *head = (struct stack_frame *)frame_pointer(regs); + +- if (!user_mode_vm(regs)) { ++ if (!user_mode(regs)) { + unsigned long stack = kernel_stack_pointer(regs); + if (depth) + dump_trace(NULL, regs, (unsigned long *)stack, 0, +diff --git a/arch/x86/oprofile/nmi_int.c b/arch/x86/oprofile/nmi_int.c +index 379e8bd..6386e09 100644 +--- a/arch/x86/oprofile/nmi_int.c ++++ b/arch/x86/oprofile/nmi_int.c +@@ -23,6 +23,7 @@ + #include + #include + #include +#include #include "op_counter.h" @@ -34822,7 +36779,7 @@ index fbe66e6..eae5e38 100644 .long 0 efi_rt_function_ptr: diff --git a/arch/x86/platform/efi/efi_stub_64.S b/arch/x86/platform/efi/efi_stub_64.S -index e0984ef..a062dac 100644 +index 5fcda72..b9d1d65 100644 --- a/arch/x86/platform/efi/efi_stub_64.S +++ b/arch/x86/platform/efi/efi_stub_64.S @@ -11,6 +11,7 @@ @@ -34833,61 +36790,13 @@ index e0984ef..a062dac 100644 #define SAVE_XMM \ mov %rsp, %rax; \ -@@ -81,6 +82,7 @@ ENTRY(efi_call0) - RESTORE_PGT - addq $32, %rsp - RESTORE_XMM -+ pax_force_retaddr 0, 1 - ret - ENDPROC(efi_call0) - -@@ -93,6 +95,7 @@ ENTRY(efi_call1) - RESTORE_PGT - addq $32, %rsp - RESTORE_XMM -+ pax_force_retaddr 0, 1 - ret - ENDPROC(efi_call1) - -@@ -105,6 +108,7 @@ ENTRY(efi_call2) - RESTORE_PGT - addq $32, %rsp - RESTORE_XMM -+ pax_force_retaddr 0, 1 - ret - ENDPROC(efi_call2) - -@@ -118,6 +122,7 @@ ENTRY(efi_call3) - RESTORE_PGT - addq $32, %rsp - RESTORE_XMM -+ pax_force_retaddr 0, 1 - ret - ENDPROC(efi_call3) - -@@ -132,6 +137,7 @@ ENTRY(efi_call4) - RESTORE_PGT - addq $32, %rsp - RESTORE_XMM -+ pax_force_retaddr 0, 1 - ret - ENDPROC(efi_call4) - -@@ -147,6 +153,7 @@ ENTRY(efi_call5) +@@ -88,6 +89,7 @@ ENTRY(efi_call) RESTORE_PGT addq $48, %rsp RESTORE_XMM + pax_force_retaddr 0, 1 ret - ENDPROC(efi_call5) - -@@ -165,6 +172,7 @@ ENTRY(efi_call6) - RESTORE_PGT - addq $48, %rsp - RESTORE_XMM -+ pax_force_retaddr 0, 1 - ret - ENDPROC(efi_call6) + ENDPROC(efi_call) diff --git a/arch/x86/platform/intel-mid/intel-mid.c b/arch/x86/platform/intel-mid/intel-mid.c index 1bbedc4..eb795b5 100644 @@ -34976,10 +36885,10 @@ index bad628a..a102610 100644 #endif } diff --git a/arch/x86/realmode/rm/Makefile b/arch/x86/realmode/rm/Makefile -index 3497f14..cc73b92 100644 +index 7c0d7be..d24dc88 100644 --- a/arch/x86/realmode/rm/Makefile +++ b/arch/x86/realmode/rm/Makefile -@@ -66,5 +66,8 @@ $(obj)/realmode.relocs: $(obj)/realmode.elf FORCE +@@ -67,5 +67,8 @@ $(obj)/realmode.relocs: $(obj)/realmode.elf FORCE KBUILD_CFLAGS := $(LINUXINCLUDE) $(REALMODE_CFLAGS) -D_SETUP -D_WAKEUP \ -I$(srctree)/arch/x86/boot @@ -35341,161 +37250,139 @@ index 80ffa5b..a33bd15 100644 return 0; diff --git a/arch/x86/vdso/Makefile b/arch/x86/vdso/Makefile -index c580d12..0a0ba35 100644 +index 61b04fe..3134230 100644 --- a/arch/x86/vdso/Makefile +++ b/arch/x86/vdso/Makefile -@@ -196,7 +196,7 @@ quiet_cmd_vdso = VDSO $@ +@@ -170,7 +170,7 @@ quiet_cmd_vdso = VDSO $@ -Wl,-T,$(filter %.lds,$^) $(filter %.o,$^) && \ sh $(srctree)/$(src)/checkundef.sh '$(NM)' '$@' -VDSO_LDFLAGS = -fPIC -shared $(call cc-ldoption, -Wl$(comma)--hash-style=sysv) \ +VDSO_LDFLAGS = -fPIC -shared -Wl,--no-undefined $(call cc-ldoption, -Wl$(comma)--hash-style=sysv) \ - $(LTO_CFLAGS) + $(call cc-ldoption, -Wl$(comma)--build-id) -Wl,-Bsymbolic $(LTO_CFLAGS) GCOV_PROFILE := n diff --git a/arch/x86/vdso/vdso32-setup.c b/arch/x86/vdso/vdso32-setup.c -index 310c5f0..766d0a7 100644 +index e4f7781..ab5ab26 100644 --- a/arch/x86/vdso/vdso32-setup.c +++ b/arch/x86/vdso/vdso32-setup.c -@@ -29,6 +29,7 @@ - #include - #include - #include +@@ -14,6 +14,7 @@ + #include + #include + #include +#include #ifdef CONFIG_COMPAT_VDSO #define VDSO_DEFAULT 0 -@@ -99,7 +100,7 @@ void syscall32_cpu_init(void) - void enable_sep_cpu(void) - { - int cpu = get_cpu(); -- struct tss_struct *tss = &per_cpu(init_tss, cpu); -+ struct tss_struct *tss = init_tss + cpu; +diff --git a/arch/x86/vdso/vma.c b/arch/x86/vdso/vma.c +index 5a5176d..e570acd 100644 +--- a/arch/x86/vdso/vma.c ++++ b/arch/x86/vdso/vma.c +@@ -16,10 +16,9 @@ + #include + #include + #include ++#include - if (!boot_cpu_has(X86_FEATURE_SEP)) { - put_cpu(); -@@ -167,7 +168,7 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp) + #if defined(CONFIG_X86_64) +-unsigned int __read_mostly vdso64_enabled = 1; +- + extern unsigned short vdso_sync_cpuid; + #endif + +@@ -101,6 +100,11 @@ static int map_vdso(const struct vdso_image *image, bool calculate_addr) + .pages = no_pages, + }; + ++#ifdef CONFIG_PAX_RANDMMAP ++ if (mm->pax_flags & MF_PAX_RANDMMAP) ++ calculate_addr = false; ++#endif ++ + if (calculate_addr) { + addr = vdso_addr(current->mm->start_stack, + image->sym_end_mapping); +@@ -110,13 +114,13 @@ static int map_vdso(const struct vdso_image *image, bool calculate_addr) down_write(&mm->mmap_sem); -- addr = get_unmapped_area(NULL, 0, vdso32_size + VDSO_OFFSET(VDSO_PREV_PAGES), 0, 0); -+ addr = get_unmapped_area(NULL, 0, vdso32_size + VDSO_OFFSET(VDSO_PREV_PAGES), 0, MAP_EXECUTABLE); +- addr = get_unmapped_area(NULL, addr, image->sym_end_mapping, 0, 0); ++ addr = get_unmapped_area(NULL, addr, image->sym_end_mapping, 0, MAP_EXECUTABLE); if (IS_ERR_VALUE(addr)) { ret = addr; goto up_fail; -@@ -175,7 +176,7 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp) - - addr += VDSO_OFFSET(VDSO_PREV_PAGES); + } -- current->mm->context.vdso = (void *)addr; -+ current->mm->context.vdso = addr; +- current->mm->context.vdso = (void __user *)addr; ++ mm->context.vdso = addr; /* * MAYWRITE to allow gdb to COW and set breakpoints -@@ -224,11 +225,11 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp) +@@ -161,15 +165,12 @@ static int map_vdso(const struct vdso_image *image, bool calculate_addr) + hpet_address >> PAGE_SHIFT, + PAGE_SIZE, + pgprot_noncached(PAGE_READONLY)); +- +- if (ret) +- goto up_fail; + } #endif - current_thread_info()->sysenter_return = -- VDSO32_SYMBOL(addr, SYSENTER_RETURN); -+ (void __force_user *)VDSO32_SYMBOL(addr, SYSENTER_RETURN); - - up_fail: + up_fail: if (ret) - current->mm->context.vdso = NULL; + current->mm->context.vdso = 0; up_write(&mm->mmap_sem); + return ret; +@@ -189,8 +190,8 @@ static int load_vdso32(void) -@@ -282,8 +283,14 @@ __initcall(ia32_binfmt_init); - - const char *arch_vma_name(struct vm_area_struct *vma) - { -- if (vma->vm_mm && vma->vm_start == (long)vma->vm_mm->context.vdso) -+ if (vma->vm_mm && vma->vm_start == vma->vm_mm->context.vdso) - return "[vdso]"; -+ -+#ifdef CONFIG_PAX_SEGMEXEC -+ if (vma->vm_mm && vma->vm_mirror && vma->vm_mirror->vm_start == vma->vm_mm->context.vdso) -+ return "[vdso]"; -+#endif -+ - return NULL; - } - -diff --git a/arch/x86/vdso/vma.c b/arch/x86/vdso/vma.c -index 1ad1026..1a08abe 100644 ---- a/arch/x86/vdso/vma.c -+++ b/arch/x86/vdso/vma.c -@@ -17,8 +17,6 @@ - #include + if (selected_vdso32->sym_VDSO32_SYSENTER_RETURN) + current_thread_info()->sysenter_return = +- current->mm->context.vdso + +- selected_vdso32->sym_VDSO32_SYSENTER_RETURN; ++ (void __force_user *)(current->mm->context.vdso + ++ selected_vdso32->sym_VDSO32_SYSENTER_RETURN); - #if defined(CONFIG_X86_64) --unsigned int __read_mostly vdso_enabled = 1; -- - DECLARE_VDSO_IMAGE(vdso); - extern unsigned short vdso_sync_cpuid; - static unsigned vdso_size; -@@ -144,7 +142,6 @@ static unsigned long vdso_addr(unsigned long start, unsigned len) - * unaligned here as a result of stack start randomization. - */ - addr = PAGE_ALIGN(addr); -- addr = align_vdso_addr(addr); - - return addr; + return 0; } -@@ -157,30 +154,31 @@ static int setup_additional_pages(struct linux_binprm *bprm, - unsigned size) +@@ -199,9 +200,6 @@ static int load_vdso32(void) + #ifdef CONFIG_X86_64 + int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp) { - struct mm_struct *mm = current->mm; -- unsigned long addr; -+ unsigned long addr = 0; - int ret; - -- if (!vdso_enabled) +- if (!vdso64_enabled) - return 0; - - down_write(&mm->mmap_sem); -+ -+#ifdef CONFIG_PAX_RANDMMAP -+ if (!(mm->pax_flags & MF_PAX_RANDMMAP)) -+#endif -+ - addr = vdso_addr(mm->start_stack, size); -+ addr = align_vdso_addr(addr); - addr = get_unmapped_area(NULL, addr, size, 0, 0); - if (IS_ERR_VALUE(addr)) { - ret = addr; - goto up_fail; - } - -- current->mm->context.vdso = (void *)addr; -+ mm->context.vdso = addr; + return map_vdso(&vdso_image_64, true); + } - ret = install_special_mapping(mm, addr, size, - VM_READ|VM_EXEC| - VM_MAYREAD|VM_MAYWRITE|VM_MAYEXEC, - pages); -- if (ret) { -- current->mm->context.vdso = NULL; -- goto up_fail; +@@ -210,12 +208,8 @@ int compat_arch_setup_additional_pages(struct linux_binprm *bprm, + int uses_interp) + { + #ifdef CONFIG_X86_X32_ABI +- if (test_thread_flag(TIF_X32)) { +- if (!vdso64_enabled) +- return 0; +- ++ if (test_thread_flag(TIF_X32)) + return map_vdso(&vdso_image_x32, true); - } -+ if (ret) -+ mm->context.vdso = 0; + #endif - up_fail: - up_write(&mm->mmap_sem); -@@ -200,11 +198,4 @@ int x32_setup_additional_pages(struct linux_binprm *bprm, int uses_interp) - vdsox32_size); + return load_vdso32(); +@@ -227,12 +221,3 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp) + return load_vdso32(); } #endif - +-#ifdef CONFIG_X86_64 -static __init int vdso_setup(char *s) -{ -- vdso_enabled = simple_strtoul(s, NULL, 0); +- vdso64_enabled = simple_strtoul(s, NULL, 0); - return 0; -} -__setup("vdso=", vdso_setup); - #endif +-#endif diff --git a/arch/x86/xen/Kconfig b/arch/x86/xen/Kconfig index e88fda8..76ce7ce 100644 --- a/arch/x86/xen/Kconfig @@ -35509,7 +37396,7 @@ index e88fda8..76ce7ce 100644 This is the Linux Xen port. Enabling this will allow the kernel to boot in a paravirtualized environment under the diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c -index c34bfc4..e599673 100644 +index ffb101e..98c0ecf 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c @@ -123,8 +123,6 @@ EXPORT_SYMBOL_GPL(xen_start_info); @@ -35597,7 +37484,7 @@ index c34bfc4..e599673 100644 { if (pm_power_off) pm_power_off(); -@@ -1564,7 +1560,17 @@ asmlinkage __visible void __init xen_start_kernel(void) +@@ -1568,7 +1564,17 @@ asmlinkage __visible void __init xen_start_kernel(void) __userpte_alloc_gfp &= ~__GFP_HIGHMEM; /* Work out if we support NX */ @@ -35616,7 +37503,7 @@ index c34bfc4..e599673 100644 /* Get mfn list */ xen_build_dynamic_phys_to_machine(); -@@ -1592,13 +1598,6 @@ asmlinkage __visible void __init xen_start_kernel(void) +@@ -1596,13 +1602,6 @@ asmlinkage __visible void __init xen_start_kernel(void) machine_ops = xen_machine_ops; @@ -35631,7 +37518,7 @@ index c34bfc4..e599673 100644 #ifdef CONFIG_ACPI_NUMA diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c -index 86e02ea..e3705ca 100644 +index e8a1201..046c66c 100644 --- a/arch/x86/xen/mmu.c +++ b/arch/x86/xen/mmu.c @@ -379,7 +379,7 @@ static pteval_t pte_mfn_to_pfn(pteval_t val) @@ -35666,7 +37553,7 @@ index 86e02ea..e3705ca 100644 set_page_prot(level2_kernel_pgt, PAGE_KERNEL_RO); set_page_prot(level2_fixmap_pgt, PAGE_KERNEL_RO); -@@ -2122,6 +2129,7 @@ static void __init xen_post_allocator_init(void) +@@ -2120,6 +2127,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; @@ -35674,7 +37561,7 @@ index 86e02ea..e3705ca 100644 #endif /* This will work as long as patching hasn't happened yet -@@ -2200,6 +2208,7 @@ static const struct pv_mmu_ops xen_mmu_ops __initconst = { +@@ -2198,6 +2206,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, @@ -35788,7 +37675,7 @@ index 485b695..fda3e7c 100644 mov %rsi,xen_start_info mov $init_thread_union+THREAD_SIZE,%rsp diff --git a/arch/x86/xen/xen-ops.h b/arch/x86/xen/xen-ops.h -index 1cb6f4c..9981524 100644 +index 97d8765..c4526ec 100644 --- a/arch/x86/xen/xen-ops.h +++ b/arch/x86/xen/xen-ops.h @@ -10,8 +10,6 @@ @@ -35861,8 +37748,39 @@ index af00795..2bb8105 100644 #define XCHAL_ICACHE_SIZE 32768 /* I-cache size in bytes or 0 */ #define XCHAL_DCACHE_SIZE 32768 /* D-cache size in bytes or 0 */ +diff --git a/block/bio.c b/block/bio.c +index 0ec61c9..93b94060 100644 +--- a/block/bio.c ++++ b/block/bio.c +@@ -1159,7 +1159,7 @@ struct bio *bio_copy_user_iov(struct request_queue *q, + /* + * Overflow, abort + */ +- if (end < start) ++ if (end < start || end - start > INT_MAX - nr_pages) + return ERR_PTR(-EINVAL); + + nr_pages += end - start; +@@ -1293,7 +1293,7 @@ static struct bio *__bio_map_user_iov(struct request_queue *q, + /* + * Overflow, abort + */ +- if (end < start) ++ if (end < start || end - start > INT_MAX - nr_pages) + return ERR_PTR(-EINVAL); + + nr_pages += end - start; +@@ -1555,7 +1555,7 @@ static void bio_copy_kern_endio(struct bio *bio, int err) + const int read = bio_data_dir(bio) == READ; + struct bio_map_data *bmd = bio->bi_private; + int i; +- char *p = bmd->sgvecs[0].iov_base; ++ char *p = (char __force_kernel *)bmd->sgvecs[0].iov_base; + + bio_for_each_segment_all(bvec, bio, i) { + char *addr = page_address(bvec->bv_page); diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c -index 95ee425..c9c7237 100644 +index 28d227c..d4c0bad 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c @@ -822,7 +822,7 @@ static void blkcg_css_free(struct cgroup_subsys_state *css) @@ -35884,10 +37802,10 @@ index 95ee425..c9c7237 100644 spin_lock_init(&blkcg->lock); INIT_RADIX_TREE(&blkcg->blkg_tree, GFP_ATOMIC); diff --git a/block/blk-iopoll.c b/block/blk-iopoll.c -index c11d24e..e915d24 100644 +index 0736729..2ec3b48 100644 --- a/block/blk-iopoll.c +++ b/block/blk-iopoll.c -@@ -74,7 +74,7 @@ void blk_iopoll_complete(struct blk_iopoll *iopoll) +@@ -74,7 +74,7 @@ void blk_iopoll_complete(struct blk_iopoll *iop) } EXPORT_SYMBOL(blk_iopoll_complete); @@ -35897,10 +37815,10 @@ index c11d24e..e915d24 100644 struct list_head *list = this_cpu_ptr(&blk_cpu_iopoll); int rearm = 0, budget = blk_iopoll_budget; diff --git a/block/blk-map.c b/block/blk-map.c -index f7b22bc..ec2ddf4 100644 +index f890d43..97b0482 100644 --- a/block/blk-map.c +++ b/block/blk-map.c -@@ -302,7 +302,7 @@ int blk_rq_map_kern(struct request_queue *q, struct request *rq, void *kbuf, +@@ -300,7 +300,7 @@ int blk_rq_map_kern(struct request_queue *q, struct request *rq, void *kbuf, if (!len || !kbuf) return -EINVAL; @@ -35923,7 +37841,7 @@ index 53b1737..08177d2e 100644 struct list_head *cpu_list, local_list; diff --git a/block/bsg.c b/block/bsg.c -index 420a5a9..23834aa 100644 +index ff46add..c4ba8ee 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, @@ -35954,7 +37872,7 @@ index 420a5a9..23834aa 100644 if (blk_verify_command(rq->cmd, has_write_perm)) return -EPERM; diff --git a/block/compat_ioctl.c b/block/compat_ioctl.c -index fbd5a67..f24fd95 100644 +index a0926a6..b2b14b2 100644 --- a/block/compat_ioctl.c +++ b/block/compat_ioctl.c @@ -156,7 +156,7 @@ static int compat_cdrom_generic_command(struct block_device *bdev, fmode_t mode, @@ -36033,7 +37951,7 @@ index dc51f46..d5446a8 100644 (u8 *) pte, count) < count) { kfree(pte); diff --git a/block/scsi_ioctl.c b/block/scsi_ioctl.c -index 2648797..92ed21f 100644 +index 14695c6..27a4636 100644 --- a/block/scsi_ioctl.c +++ b/block/scsi_ioctl.c @@ -67,7 +67,7 @@ static int scsi_get_bus(struct request_queue *q, int __user *p) @@ -36045,7 +37963,7 @@ index 2648797..92ed21f 100644 { return jiffies_to_clock_t(q->sg_timeout); } -@@ -224,8 +224,20 @@ EXPORT_SYMBOL(blk_verify_command); +@@ -220,8 +220,20 @@ EXPORT_SYMBOL(blk_verify_command); static int blk_fill_sghdr_rq(struct request_queue *q, struct request *rq, struct sg_io_hdr *hdr, fmode_t mode) { @@ -36067,7 +37985,7 @@ index 2648797..92ed21f 100644 if (blk_verify_command(rq->cmd, mode & FMODE_WRITE)) return -EPERM; -@@ -417,6 +429,8 @@ int sg_scsi_ioctl(struct request_queue *q, struct gendisk *disk, fmode_t mode, +@@ -413,6 +425,8 @@ int sg_scsi_ioctl(struct request_queue *q, struct gendisk *disk, fmode_t mode, int err; unsigned int in_len, out_len, bytes, opcode, cmdlen; char *buffer = NULL, sense[SCSI_SENSE_BUFFERSIZE]; @@ -36076,7 +37994,7 @@ index 2648797..92ed21f 100644 if (!sic) return -EINVAL; -@@ -450,9 +464,18 @@ int sg_scsi_ioctl(struct request_queue *q, struct gendisk *disk, fmode_t mode, +@@ -446,9 +460,18 @@ int sg_scsi_ioctl(struct request_queue *q, struct gendisk *disk, fmode_t mode, */ err = -EFAULT; rq->cmd_len = cmdlen; @@ -36274,10 +38192,10 @@ index 38cb978..352c761 100644 static void delete_gpe_attr_array(void) { diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c -index b986145..82bddb8 100644 +index d72ce04..d6ab3c2 100644 --- a/drivers/ata/libahci.c +++ b/drivers/ata/libahci.c -@@ -1252,7 +1252,7 @@ int ahci_kick_engine(struct ata_port *ap) +@@ -1257,7 +1257,7 @@ int ahci_kick_engine(struct ata_port *ap) } EXPORT_SYMBOL_GPL(ahci_kick_engine); @@ -36287,7 +38205,7 @@ index b986145..82bddb8 100644 unsigned long timeout_msec) { diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c -index 18d97d5..be690af 100644 +index 677c0c1..354b89b 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -98,7 +98,7 @@ static unsigned int ata_dev_set_xfermode(struct ata_device *dev); @@ -36299,7 +38217,7 @@ index 18d97d5..be690af 100644 struct ata_force_param { const char *name; -@@ -4858,7 +4858,7 @@ void ata_qc_free(struct ata_queued_cmd *qc) +@@ -4863,7 +4863,7 @@ void ata_qc_free(struct ata_queued_cmd *qc) struct ata_port *ap; unsigned int tag; @@ -36308,7 +38226,7 @@ index 18d97d5..be690af 100644 ap = qc->ap; qc->flags = 0; -@@ -4874,7 +4874,7 @@ void __ata_qc_complete(struct ata_queued_cmd *qc) +@@ -4879,7 +4879,7 @@ void __ata_qc_complete(struct ata_queued_cmd *qc) struct ata_port *ap; struct ata_link *link; @@ -36317,7 +38235,7 @@ index 18d97d5..be690af 100644 WARN_ON_ONCE(!(qc->flags & ATA_QCFLAG_ACTIVE)); ap = qc->ap; link = qc->dev->link; -@@ -5978,6 +5978,7 @@ static void ata_finalize_port_ops(struct ata_port_operations *ops) +@@ -5983,6 +5983,7 @@ static void ata_finalize_port_ops(struct ata_port_operations *ops) return; spin_lock(&lock); @@ -36325,7 +38243,7 @@ index 18d97d5..be690af 100644 for (cur = ops->inherits; cur; cur = cur->inherits) { void **inherit = (void **)cur; -@@ -5991,8 +5992,9 @@ static void ata_finalize_port_ops(struct ata_port_operations *ops) +@@ -5996,8 +5997,9 @@ static void ata_finalize_port_ops(struct ata_port_operations *ops) if (IS_ERR(*pp)) *pp = NULL; @@ -36336,7 +38254,7 @@ index 18d97d5..be690af 100644 spin_unlock(&lock); } -@@ -6185,7 +6187,7 @@ int ata_host_register(struct ata_host *host, struct scsi_host_template *sht) +@@ -6193,7 +6195,7 @@ int ata_host_register(struct ata_host *host, struct scsi_host_template *sht) /* give ports names and add SCSI hosts */ for (i = 0; i < host->n_ports; i++) { @@ -36346,10 +38264,10 @@ index 18d97d5..be690af 100644 } diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c -index ef8567d..8bdbd03 100644 +index 72691fd..ad104c0 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c -@@ -4147,7 +4147,7 @@ int ata_sas_port_init(struct ata_port *ap) +@@ -4151,7 +4151,7 @@ int ata_sas_port_init(struct ata_port *ap) if (rc) return rc; @@ -36579,7 +38497,7 @@ index 82f2ae0..f205c02 100644 default: /* Hmm. Haven't written the code to handle the others yet... -- REW */ printk (KERN_WARNING "Don't know what to do with RX status %x: %s.\n", diff --git a/drivers/atm/fore200e.c b/drivers/atm/fore200e.c -index 204814e..cede831 100644 +index d4725fc..2d4ea65 100644 --- a/drivers/atm/fore200e.c +++ b/drivers/atm/fore200e.c @@ -931,9 +931,9 @@ fore200e_tx_irq(struct fore200e* fore200e) @@ -36746,7 +38664,7 @@ index 1dc0519..1aadaf7 100644 // free the skb hrz_kfree_skb (skb); diff --git a/drivers/atm/idt77252.c b/drivers/atm/idt77252.c -index 1bdf104..9dc44b1 100644 +index b621f56..1e3a799 100644 --- a/drivers/atm/idt77252.c +++ b/drivers/atm/idt77252.c @@ -812,7 +812,7 @@ drain_scq(struct idt77252_dev *card, struct vc_map *vc) @@ -37004,7 +38922,7 @@ index 4217f29..88f547a 100644 vcc->tx_quota = vcc->tx_quota * 3 / 4; printk("Tx1: vcc->tx_quota = %d \n", (u32)vcc->tx_quota ); diff --git a/drivers/atm/lanai.c b/drivers/atm/lanai.c -index fa7d701..1e404c7 100644 +index fa7d7019..1e404c7 100644 --- a/drivers/atm/lanai.c +++ b/drivers/atm/lanai.c @@ -1303,7 +1303,7 @@ static void lanai_send_one_aal5(struct lanai_dev *lanai, @@ -37446,7 +39364,7 @@ index 8f7ed99..700dd0c 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 ae098a2..0999830 100644 +index eee55c1..b8c9393 100644 --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c @@ -1821,9 +1821,9 @@ int __pm_genpd_remove_callbacks(struct device *dev, bool clear_td) @@ -37493,7 +39411,7 @@ index 95b181d1..c4f0e19 100644 static DEVICE_ATTR(runtime_status, 0444, rtpm_status_show, NULL); diff --git a/drivers/base/power/wakeup.c b/drivers/base/power/wakeup.c -index 2d56f41..8830f19 100644 +index eb1bd2e..2667d3a 100644 --- a/drivers/base/power/wakeup.c +++ b/drivers/base/power/wakeup.c @@ -29,14 +29,14 @@ bool events_check_enabled __read_mostly; @@ -37513,7 +39431,7 @@ index 2d56f41..8830f19 100644 *cnt = (comb >> IN_PROGRESS_BITS); *inpr = comb & MAX_IN_PROGRESS; -@@ -395,7 +395,7 @@ static void wakeup_source_activate(struct wakeup_source *ws) +@@ -401,7 +401,7 @@ static void wakeup_source_activate(struct wakeup_source *ws) ws->start_prevent_time = ws->last_time; /* Increment the counter of events in progress. */ @@ -37522,7 +39440,7 @@ index 2d56f41..8830f19 100644 trace_wakeup_source_activate(ws->name, cec); } -@@ -521,7 +521,7 @@ static void wakeup_source_deactivate(struct wakeup_source *ws) +@@ -527,7 +527,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. */ @@ -37532,10 +39450,10 @@ index 2d56f41..8830f19 100644 split_counters(&cnt, &inpr); diff --git a/drivers/base/syscore.c b/drivers/base/syscore.c -index e8d11b6..7b1b36f 100644 +index dbb8350..4762f4c 100644 --- a/drivers/base/syscore.c +++ b/drivers/base/syscore.c -@@ -21,7 +21,7 @@ static DEFINE_MUTEX(syscore_ops_lock); +@@ -22,7 +22,7 @@ static DEFINE_MUTEX(syscore_ops_lock); void register_syscore_ops(struct syscore_ops *ops) { mutex_lock(&syscore_ops_lock); @@ -37544,7 +39462,7 @@ index e8d11b6..7b1b36f 100644 mutex_unlock(&syscore_ops_lock); } EXPORT_SYMBOL_GPL(register_syscore_ops); -@@ -33,7 +33,7 @@ EXPORT_SYMBOL_GPL(register_syscore_ops); +@@ -34,7 +34,7 @@ EXPORT_SYMBOL_GPL(register_syscore_ops); void unregister_syscore_ops(struct syscore_ops *ops) { mutex_lock(&syscore_ops_lock); @@ -37554,7 +39472,7 @@ index e8d11b6..7b1b36f 100644 } EXPORT_SYMBOL_GPL(unregister_syscore_ops); diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c -index 73894ca..69f64ef 100644 +index 4595c22..d4f6c54 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c @@ -3011,7 +3011,7 @@ static void start_io(ctlr_info_t *h) @@ -37614,7 +39532,7 @@ index 73894ca..69f64ef 100644 h->transMethod = CFGTBL_Trans_Performant; return; -@@ -4325,7 +4325,7 @@ static int cciss_pci_init(ctlr_info_t *h) +@@ -4321,7 +4321,7 @@ static int cciss_pci_init(ctlr_info_t *h) if (prod_index < 0) return -ENODEV; h->product_name = products[prod_index].product_name; @@ -37623,7 +39541,7 @@ index 73894ca..69f64ef 100644 if (cciss_board_disabled(h)) { dev_warn(&h->pdev->dev, "controller appears to be disabled\n"); -@@ -5057,7 +5057,7 @@ reinit_after_soft_reset: +@@ -5053,7 +5053,7 @@ reinit_after_soft_reset: } /* make sure the board interrupts are off */ @@ -37632,7 +39550,7 @@ index 73894ca..69f64ef 100644 rc = cciss_request_irq(h, do_cciss_msix_intr, do_cciss_intx); if (rc) goto clean2; -@@ -5107,7 +5107,7 @@ reinit_after_soft_reset: +@@ -5103,7 +5103,7 @@ reinit_after_soft_reset: * fake ones to scoop up any residual completions. */ spin_lock_irqsave(&h->lock, flags); @@ -37641,7 +39559,7 @@ index 73894ca..69f64ef 100644 spin_unlock_irqrestore(&h->lock, flags); free_irq(h->intr[h->intr_mode], h); rc = cciss_request_irq(h, cciss_msix_discard_completions, -@@ -5127,9 +5127,9 @@ reinit_after_soft_reset: +@@ -5123,9 +5123,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"); @@ -37653,7 +39571,7 @@ index 73894ca..69f64ef 100644 rc = controller_reset_failed(h->cfgtable); if (rc) -@@ -5152,7 +5152,7 @@ reinit_after_soft_reset: +@@ -5148,7 +5148,7 @@ reinit_after_soft_reset: cciss_scsi_setup(h); /* Turn the interrupts on so we can service requests */ @@ -37662,7 +39580,7 @@ index 73894ca..69f64ef 100644 /* Get the firmware version */ inq_buff = kzalloc(sizeof(InquiryData_struct), GFP_KERNEL); -@@ -5224,7 +5224,7 @@ static void cciss_shutdown(struct pci_dev *pdev) +@@ -5220,7 +5220,7 @@ static void cciss_shutdown(struct pci_dev *pdev) kfree(flush_buf); if (return_code != IO_OK) dev_warn(&h->pdev->dev, "Error flushing cache\n"); @@ -37861,7 +39779,7 @@ index be73e9d..7fbf140 100644 cmdlist_t *reqQ; cmdlist_t *cmpQ; diff --git a/drivers/block/drbd/drbd_int.h b/drivers/block/drbd/drbd_int.h -index e7093d4..b364085 100644 +index a76ceb3..3c1a9fd 100644 --- a/drivers/block/drbd/drbd_int.h +++ b/drivers/block/drbd/drbd_int.h @@ -331,7 +331,7 @@ struct drbd_epoch { @@ -37873,7 +39791,7 @@ index e7093d4..b364085 100644 atomic_t active; /* increased on every req. added, and dec on every finished. */ unsigned long flags; }; -@@ -787,7 +787,7 @@ struct drbd_device { +@@ -797,7 +797,7 @@ struct drbd_device { unsigned int al_tr_number; int al_tr_cycle; wait_queue_head_t seq_wait; @@ -37882,7 +39800,7 @@ index e7093d4..b364085 100644 unsigned int peer_seq; spinlock_t peer_seq_lock; unsigned int minor; -@@ -1361,7 +1361,7 @@ static inline int drbd_setsockopt(struct socket *sock, int level, int optname, +@@ -1407,7 +1407,7 @@ static inline int drbd_setsockopt(struct socket *sock, int level, int optname, char __user *uoptval; int err; @@ -37909,7 +39827,7 @@ index 89c497c..9c736ae 100644 /** diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c -index 331e5cc..6d657bce 100644 +index 960645c..6c2724a 100644 --- a/drivers/block/drbd/drbd_main.c +++ b/drivers/block/drbd/drbd_main.c @@ -1322,7 +1322,7 @@ static int _drbd_send_ack(struct drbd_peer_device *peer_device, enum drbd_packet @@ -37930,7 +39848,7 @@ index 331e5cc..6d657bce 100644 dp_flags = bio_flags_to_wire(peer_device->connection, req->master_bio->bi_rw); if (device->state.conn >= C_SYNC_SOURCE && device->state.conn <= C_PAUSED_SYNC_T) -@@ -2658,8 +2658,8 @@ void drbd_destroy_connection(struct kref *kref) +@@ -2670,8 +2670,8 @@ void drbd_destroy_connection(struct kref *kref) struct drbd_connection *connection = container_of(kref, struct drbd_connection, kref); struct drbd_resource *resource = connection->resource; @@ -37942,10 +39860,10 @@ index 331e5cc..6d657bce 100644 idr_destroy(&connection->peer_devices); diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c -index 526414b..4eb8184 100644 +index 3f2e167..d3170e4 100644 --- a/drivers/block/drbd/drbd_nl.c +++ b/drivers/block/drbd/drbd_nl.c -@@ -3505,7 +3505,7 @@ out: +@@ -3616,7 +3616,7 @@ finish: void drbd_bcast_event(struct drbd_device *device, const struct sib_info *sib) { @@ -37954,7 +39872,7 @@ index 526414b..4eb8184 100644 struct sk_buff *msg; struct drbd_genlmsghdr *d_out; unsigned seq; -@@ -3518,7 +3518,7 @@ void drbd_bcast_event(struct drbd_device *device, const struct sib_info *sib) +@@ -3629,7 +3629,7 @@ void drbd_bcast_event(struct drbd_device *device, const struct sib_info *sib) return; } @@ -37964,10 +39882,10 @@ index 526414b..4eb8184 100644 if (!msg) goto failed; diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c -index 68e3992..1aca24a 100644 +index 5b17ec8..6c21e6b 100644 --- a/drivers/block/drbd/drbd_receiver.c +++ b/drivers/block/drbd/drbd_receiver.c -@@ -826,7 +826,7 @@ int drbd_connected(struct drbd_peer_device *peer_device) +@@ -834,7 +834,7 @@ int drbd_connected(struct drbd_peer_device *peer_device) struct drbd_device *device = peer_device->device; int err; @@ -37976,7 +39894,7 @@ index 68e3992..1aca24a 100644 device->peer_seq = 0; device->state_mutex = peer_device->connection->agreed_pro_version < 100 ? -@@ -1188,7 +1188,7 @@ static enum finish_epoch drbd_may_finish_epoch(struct drbd_connection *connectio +@@ -1199,7 +1199,7 @@ static enum finish_epoch drbd_may_finish_epoch(struct drbd_connection *connectio do { next_epoch = NULL; @@ -37985,7 +39903,7 @@ index 68e3992..1aca24a 100644 switch (ev & ~EV_CLEANUP) { case EV_PUT: -@@ -1228,7 +1228,7 @@ static enum finish_epoch drbd_may_finish_epoch(struct drbd_connection *connectio +@@ -1239,7 +1239,7 @@ static enum finish_epoch drbd_may_finish_epoch(struct drbd_connection *connectio rv = FE_DESTROYED; } else { epoch->flags = 0; @@ -37994,7 +39912,7 @@ index 68e3992..1aca24a 100644 /* atomic_set(&epoch->active, 0); is already zero */ if (rv == FE_STILL_LIVE) rv = FE_RECYCLED; -@@ -1456,7 +1456,7 @@ static int receive_Barrier(struct drbd_connection *connection, struct packet_inf +@@ -1490,7 +1490,7 @@ static int receive_Barrier(struct drbd_connection *connection, struct packet_inf conn_wait_active_ee_empty(connection); drbd_flush(connection); @@ -38003,7 +39921,7 @@ index 68e3992..1aca24a 100644 epoch = kmalloc(sizeof(struct drbd_epoch), GFP_NOIO); if (epoch) break; -@@ -1469,11 +1469,11 @@ static int receive_Barrier(struct drbd_connection *connection, struct packet_inf +@@ -1503,11 +1503,11 @@ static int receive_Barrier(struct drbd_connection *connection, struct packet_inf } epoch->flags = 0; @@ -38017,7 +39935,7 @@ index 68e3992..1aca24a 100644 list_add(&epoch->list, &connection->current_epoch->list); connection->current_epoch = epoch; connection->epochs++; -@@ -2182,7 +2182,7 @@ static int receive_Data(struct drbd_connection *connection, struct packet_info * +@@ -2224,7 +2224,7 @@ static int receive_Data(struct drbd_connection *connection, struct packet_info * err = wait_for_and_update_peer_seq(peer_device, peer_seq); drbd_send_ack_dp(peer_device, P_NEG_ACK, p, pi->size); @@ -38026,7 +39944,7 @@ index 68e3992..1aca24a 100644 err2 = drbd_drain_block(peer_device, pi->size); if (!err) err = err2; -@@ -2216,7 +2216,7 @@ static int receive_Data(struct drbd_connection *connection, struct packet_info * +@@ -2266,7 +2266,7 @@ static int receive_Data(struct drbd_connection *connection, struct packet_info * spin_lock(&connection->epoch_lock); peer_req->epoch = connection->current_epoch; @@ -38035,7 +39953,7 @@ index 68e3992..1aca24a 100644 atomic_inc(&peer_req->epoch->active); spin_unlock(&connection->epoch_lock); -@@ -4396,7 +4396,7 @@ struct data_cmd { +@@ -4461,7 +4461,7 @@ struct data_cmd { int expect_payload; size_t pkt_size; int (*fn)(struct drbd_connection *, struct packet_info *); @@ -38044,7 +39962,7 @@ index 68e3992..1aca24a 100644 static struct data_cmd drbd_cmd_handler[] = { [P_DATA] = { 1, sizeof(struct p_data), receive_Data }, -@@ -4506,7 +4506,7 @@ static void conn_disconnect(struct drbd_connection *connection) +@@ -4572,7 +4572,7 @@ static void conn_disconnect(struct drbd_connection *connection) if (!list_empty(&connection->current_epoch->list)) drbd_err(connection, "ASSERTION FAILED: connection->current_epoch->list not empty\n"); /* ok, no more ee's on the fly, it is safe to reset the epoch_size */ @@ -38053,7 +39971,7 @@ index 68e3992..1aca24a 100644 connection->send.seen_any_write_yet = false; drbd_info(connection, "Connection closed\n"); -@@ -5281,7 +5281,7 @@ static int connection_finish_peer_reqs(struct drbd_connection *connection) +@@ -5364,7 +5364,7 @@ static int connection_finish_peer_reqs(struct drbd_connection *connection) struct asender_cmd { size_t pkt_size; int (*fn)(struct drbd_connection *connection, struct packet_info *); @@ -38063,7 +39981,7 @@ index 68e3992..1aca24a 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 f70a230..9dc90d5 100644 +index 6cb1beb..bf490f7 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c @@ -232,7 +232,7 @@ static int __do_lo_send_write(struct file *file, @@ -38075,58 +39993,39 @@ index f70a230..9dc90d5 100644 set_fs(old_fs); file_end_write(file); if (likely(bw == len)) -diff --git a/drivers/block/null_blk.c b/drivers/block/null_blk.c -index 091b9ea..f5428f8 100644 ---- a/drivers/block/null_blk.c -+++ b/drivers/block/null_blk.c -@@ -382,15 +382,25 @@ static int null_init_hctx(struct blk_mq_hw_ctx *hctx, void *data, - return 0; - } +diff --git a/drivers/block/nvme-core.c b/drivers/block/nvme-core.c +index 02351e2..a9ea617 100644 +--- a/drivers/block/nvme-core.c ++++ b/drivers/block/nvme-core.c +@@ -73,7 +73,6 @@ static LIST_HEAD(dev_list); + static struct task_struct *nvme_thread; + static struct workqueue_struct *nvme_workq; + static wait_queue_head_t nvme_kthread_wait; +-static struct notifier_block nvme_nb; + + static void nvme_reset_failed_dev(struct work_struct *ws); + +@@ -2925,6 +2924,10 @@ static struct pci_driver nvme_driver = { + .err_handler = &nvme_err_handler, + }; --static struct blk_mq_ops null_mq_ops = { -- .queue_rq = null_queue_rq, -- .map_queue = blk_mq_map_queue, -+static struct blk_mq_ops null_mq_single_ops = { -+ .queue_rq = null_queue_rq, -+ .map_queue = blk_mq_map_queue, - .init_hctx = null_init_hctx, - .complete = null_softirq_done_fn, -+ .alloc_hctx = blk_mq_alloc_single_hw_queue, -+ .free_hctx = blk_mq_free_single_hw_queue, ++static struct notifier_block nvme_nb = { ++ .notifier_call = &nvme_cpu_notify, +}; + -+static struct blk_mq_ops null_mq_per_node_ops = { -+ .queue_rq = null_queue_rq, -+ .map_queue = blk_mq_map_queue, -+ .init_hctx = null_init_hctx, -+ .alloc_hctx = null_alloc_hctx, -+ .free_hctx = null_free_hctx, - }; - - static struct blk_mq_reg null_mq_reg = { -- .ops = &null_mq_ops, -+ .ops = &null_mq_single_ops, - .queue_depth = 64, - .cmd_size = sizeof(struct nullb_cmd), - .flags = BLK_MQ_F_SHOULD_MERGE, -@@ -521,13 +531,8 @@ static int null_add_dev(void) - null_mq_reg.queue_depth = hw_queue_depth; - null_mq_reg.nr_hw_queues = submit_queues; - -- if (use_per_node_hctx) { -- null_mq_reg.ops->alloc_hctx = null_alloc_hctx; -- null_mq_reg.ops->free_hctx = null_free_hctx; -- } else { -- null_mq_reg.ops->alloc_hctx = blk_mq_alloc_single_hw_queue; -- null_mq_reg.ops->free_hctx = blk_mq_free_single_hw_queue; -- } -+ if (use_per_node_hctx) -+ null_mq_reg.ops = &null_mq_per_node_ops; + static int __init nvme_init(void) + { + int result; +@@ -2941,7 +2944,6 @@ static int __init nvme_init(void) + else if (result > 0) + nvme_major = result; - nullb->q = blk_mq_init_queue(&null_mq_reg, nullb); - } else if (queue_mode == NULL_Q_BIO) { +- nvme_nb.notifier_call = &nvme_cpu_notify; + result = register_hotcpu_notifier(&nvme_nb); + if (result) + goto unregister_blkdev; diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c -index a2af73d..c0b8f61 100644 +index 758ac44..58087fd 100644 --- a/drivers/block/pktcdvd.c +++ b/drivers/block/pktcdvd.c @@ -108,7 +108,7 @@ static int pkt_seq_show(struct seq_file *m, void *p); @@ -38231,18 +40130,18 @@ index f038dba..bb74c08 100644 int err; diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c -index 8a3aff7..d7538c2 100644 +index 898b84b..86f74b9 100644 --- a/drivers/cdrom/cdrom.c +++ b/drivers/cdrom/cdrom.c -@@ -416,7 +416,6 @@ int register_cdrom(struct cdrom_device_info *cdi) +@@ -610,7 +610,6 @@ int register_cdrom(struct cdrom_device_info *cdi) ENSURE(reset, CDC_RESET); ENSURE(generic_packet, CDC_GENERIC_PACKET); cdi->mc_flags = 0; - cdo->n_minors = 0; - cdi->options = CDO_USE_FFLAGS; - - if (autoclose==1 && CDROM_CAN(CDC_CLOSE_TRAY)) -@@ -436,8 +435,11 @@ int register_cdrom(struct cdrom_device_info *cdi) + cdi->options = CDO_USE_FFLAGS; + + if (autoclose == 1 && CDROM_CAN(CDC_CLOSE_TRAY)) +@@ -630,8 +629,11 @@ int register_cdrom(struct cdrom_device_info *cdi) else cdi->cdda_method = CDDA_OLD; @@ -38254,17 +40153,17 @@ index 8a3aff7..d7538c2 100644 + pax_close_kernel(); + } - cdinfo(CD_REG_UNREG, "drive \"/dev/%s\" registered\n", cdi->name); + cd_dbg(CD_REG_UNREG, "drive \"/dev/%s\" registered\n", cdi->name); mutex_lock(&cdrom_mutex); -@@ -458,7 +460,6 @@ void unregister_cdrom(struct cdrom_device_info *cdi) +@@ -652,7 +654,6 @@ void unregister_cdrom(struct cdrom_device_info *cdi) if (cdi->exit) cdi->exit(cdi); - cdi->ops->n_minors--; - cdinfo(CD_REG_UNREG, "drive \"/dev/%s\" unregistered\n", cdi->name); + cd_dbg(CD_REG_UNREG, "drive \"/dev/%s\" unregistered\n", cdi->name); } -@@ -2107,7 +2108,7 @@ static int cdrom_read_cdda_old(struct cdrom_device_info *cdi, __u8 __user *ubuf, +@@ -2126,7 +2127,7 @@ static int cdrom_read_cdda_old(struct cdrom_device_info *cdi, __u8 __user *ubuf, */ nr = nframes; do { @@ -38273,7 +40172,7 @@ index 8a3aff7..d7538c2 100644 if (cgc.buffer) break; -@@ -3429,7 +3430,7 @@ static int cdrom_print_info(const char *header, int val, char *info, +@@ -3434,7 +3435,7 @@ static int cdrom_print_info(const char *header, int val, char *info, struct cdrom_device_info *cdi; int ret; @@ -38283,7 +40182,7 @@ index 8a3aff7..d7538c2 100644 return 1; diff --git a/drivers/cdrom/gdrom.c b/drivers/cdrom/gdrom.c -index 51e75ad..39c4c76 100644 +index 584bc31..e64a12c 100644 --- a/drivers/cdrom/gdrom.c +++ b/drivers/cdrom/gdrom.c @@ -491,7 +491,6 @@ static struct cdrom_device_ops gdrom_ops = { @@ -38424,7 +40323,7 @@ index e6db938..835e3a2 100644 intf->proc_dir = NULL; diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c -index 1c4bb4f..719e873 100644 +index 5d66568..c9d93c3 100644 --- a/drivers/char/ipmi/ipmi_si_intf.c +++ b/drivers/char/ipmi/ipmi_si_intf.c @@ -285,7 +285,7 @@ struct smi_info { @@ -38691,28 +40590,10 @@ index 8320abd..ec48108 100644 if (cmd != SIOCWANDEV) diff --git a/drivers/char/random.c b/drivers/char/random.c -index 2b6e4cd..32033f3 100644 +index 71529e1..822b036 100644 --- a/drivers/char/random.c +++ b/drivers/char/random.c -@@ -270,10 +270,17 @@ - /* - * Configuration information - */ -+#ifdef CONFIG_GRKERNSEC_RANDNET -+#define INPUT_POOL_SHIFT 14 -+#define INPUT_POOL_WORDS (1 << (INPUT_POOL_SHIFT-5)) -+#define OUTPUT_POOL_SHIFT 12 -+#define OUTPUT_POOL_WORDS (1 << (OUTPUT_POOL_SHIFT-5)) -+#else - #define INPUT_POOL_SHIFT 12 - #define INPUT_POOL_WORDS (1 << (INPUT_POOL_SHIFT-5)) - #define OUTPUT_POOL_SHIFT 10 - #define OUTPUT_POOL_WORDS (1 << (OUTPUT_POOL_SHIFT-5)) -+#endif - #define SEC_XFER_SIZE 512 - #define EXTRACT_SIZE 10 - -@@ -284,9 +291,6 @@ +@@ -284,9 +284,6 @@ /* * To allow fractional bits to be tracked, the entropy_count field is * denominated in units of 1/8th bits. @@ -38722,27 +40603,7 @@ index 2b6e4cd..32033f3 100644 */ #define ENTROPY_SHIFT 3 #define ENTROPY_BITS(r) ((r)->entropy_count >> ENTROPY_SHIFT) -@@ -361,12 +365,19 @@ static struct poolinfo { - #define S(x) ilog2(x)+5, (x), (x)*4, (x)*32, (x) << (ENTROPY_SHIFT+5) - int tap1, tap2, tap3, tap4, tap5; - } poolinfo_table[] = { -+#ifdef CONFIG_GRKERNSEC_RANDNET -+ /* x^512 + x^411 + x^308 + x^208 +x^104 + x + 1 -- 225 */ -+ { S(512), 411, 308, 208, 104, 1 }, -+ /* x^128 + x^104 + x^76 + x^51 + x^25 + x + 1 -- 105 */ -+ { S(128), 104, 76, 51, 25, 1 }, -+#else - /* was: x^128 + x^103 + x^76 + x^51 +x^25 + x + 1 */ - /* x^128 + x^104 + x^76 + x^51 +x^25 + x + 1 */ - { S(128), 104, 76, 51, 25, 1 }, - /* was: x^32 + x^26 + x^20 + x^14 + x^7 + x + 1 */ - /* x^32 + x^26 + x^19 + x^14 + x^7 + x + 1 */ - { S(32), 26, 19, 14, 7, 1 }, -+#endif - #if 0 - /* x^2048 + x^1638 + x^1231 + x^819 + x^411 + x + 1 -- 115 */ - { S(2048), 1638, 1231, 819, 411, 1 }, -@@ -433,9 +444,9 @@ struct entropy_store { +@@ -433,9 +430,9 @@ struct entropy_store { }; static void push_to_pool(struct work_struct *work); @@ -38755,7 +40616,7 @@ index 2b6e4cd..32033f3 100644 static struct entropy_store input_pool = { .poolinfo = &poolinfo_table[0], -@@ -524,8 +535,8 @@ static void _mix_pool_bytes(struct entropy_store *r, const void *in, +@@ -524,8 +521,8 @@ static void _mix_pool_bytes(struct entropy_store *r, const void *in, input_rotate = (input_rotate + (i ? 7 : 14)) & 31; } @@ -38766,7 +40627,7 @@ index 2b6e4cd..32033f3 100644 smp_wmb(); if (out) -@@ -632,7 +643,7 @@ retry: +@@ -632,7 +629,7 @@ retry: /* The +2 corresponds to the /4 in the denominator */ do { @@ -38775,44 +40636,7 @@ index 2b6e4cd..32033f3 100644 unsigned int add = ((pool_size - entropy_count)*anfrac*3) >> s; -@@ -641,7 +652,7 @@ retry: - } while (unlikely(entropy_count < pool_size-2 && pnfrac)); - } - -- if (entropy_count < 0) { -+ if (unlikely(entropy_count < 0)) { - pr_warn("random: negative entropy/overflow: pool %s count %d\n", - r->name, entropy_count); - WARN_ON(1); -@@ -980,7 +991,7 @@ static size_t account(struct entropy_store *r, size_t nbytes, int min, - int reserved) - { - int entropy_count, orig; -- size_t ibytes; -+ size_t ibytes, nfrac; - - BUG_ON(r->entropy_count > r->poolinfo->poolfracbits); - -@@ -998,7 +1009,17 @@ retry: - } - if (ibytes < min) - ibytes = 0; -- if ((entropy_count -= ibytes << (ENTROPY_SHIFT + 3)) < 0) -+ -+ if (unlikely(entropy_count < 0)) { -+ pr_warn("random: negative entropy count: pool %s count %d\n", -+ r->name, entropy_count); -+ WARN_ON(1); -+ entropy_count = 0; -+ } -+ nfrac = ibytes << (ENTROPY_SHIFT + 3); -+ if ((size_t) entropy_count > nfrac) -+ entropy_count -= nfrac; -+ else - entropy_count = 0; - - if (cmpxchg(&r->entropy_count, orig, entropy_count) != orig) -@@ -1166,7 +1187,7 @@ static ssize_t extract_entropy_user(struct entropy_store *r, void __user *buf, +@@ -1177,7 +1174,7 @@ static ssize_t extract_entropy_user(struct entropy_store *r, void __user *buf, extract_buf(r, tmp); i = min_t(int, nbytes, EXTRACT_SIZE); @@ -38821,15 +40645,7 @@ index 2b6e4cd..32033f3 100644 ret = -EFAULT; break; } -@@ -1375,6 +1396,7 @@ urandom_read(struct file *file, char __user *buf, size_t nbytes, loff_t *ppos) - "with %d bits of entropy available\n", - current->comm, nonblocking_pool.entropy_total); - -+ nbytes = min_t(size_t, nbytes, INT_MAX >> (ENTROPY_SHIFT + 3)); - ret = extract_entropy_user(&nonblocking_pool, buf, nbytes); - - trace_urandom_read(8 * nbytes, ENTROPY_BITS(&nonblocking_pool), -@@ -1555,7 +1577,7 @@ static char sysctl_bootid[16]; +@@ -1567,7 +1564,7 @@ static char sysctl_bootid[16]; static int proc_do_uuid(struct ctl_table *table, int write, void __user *buffer, size_t *lenp, loff_t *ppos) { @@ -38838,11 +40654,11 @@ index 2b6e4cd..32033f3 100644 unsigned char buf[64], tmp_uuid[16], *uuid; uuid = table->data; -@@ -1585,7 +1607,7 @@ static int proc_do_uuid(struct ctl_table *table, int write, - static int proc_do_entropy(ctl_table *table, int write, +@@ -1597,7 +1594,7 @@ static int proc_do_uuid(struct ctl_table *table, int write, + static int proc_do_entropy(struct ctl_table *table, int write, void __user *buffer, size_t *lenp, loff_t *ppos) { -- ctl_table fake_table; +- struct ctl_table fake_table; + ctl_table_no_const fake_table; int entropy_count; @@ -38890,11 +40706,11 @@ index 7cc1fe22..b602d6b 100644 return 0; diff --git a/drivers/char/tpm/tpm_acpi.c b/drivers/char/tpm/tpm_acpi.c -index b9a57fa..5bb9e38 100644 +index 565a947..dcdc06e 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) - virt = acpi_os_map_memory(start, len); + virt = acpi_os_map_iomem(start, len); if (!virt) { kfree(log->bios_event_log); + log->bios_event_log = NULL; @@ -38905,7 +40721,7 @@ index b9a57fa..5bb9e38 100644 - memcpy_fromio(log->bios_event_log, virt, len); + memcpy_fromio(log->bios_event_log, (const char __force_kernel *)virt, len); - acpi_os_unmap_memory(virt, len); + acpi_os_unmap_iomem(virt, len); return 0; diff --git a/drivers/char/tpm/tpm_eventlog.c b/drivers/char/tpm/tpm_eventlog.c index 59f7cb2..bac8b6d 100644 @@ -38975,7 +40791,7 @@ index 57a078e..c17cde8 100644 composite = kzalloc(sizeof(*composite), GFP_KERNEL); if (!composite) { diff --git a/drivers/clk/socfpga/clk-gate.c b/drivers/clk/socfpga/clk-gate.c -index 501d513..fb0ecf9 100644 +index dd3a78c..386d49c 100644 --- a/drivers/clk/socfpga/clk-gate.c +++ b/drivers/clk/socfpga/clk-gate.c @@ -22,6 +22,7 @@ @@ -38986,7 +40802,7 @@ index 501d513..fb0ecf9 100644 #include "clk.h" -@@ -175,7 +176,7 @@ static int socfpga_clk_prepare(struct clk_hw *hwclk) +@@ -174,7 +175,7 @@ static int socfpga_clk_prepare(struct clk_hw *hwclk) return 0; } @@ -38995,7 +40811,7 @@ index 501d513..fb0ecf9 100644 .prepare = socfpga_clk_prepare, .recalc_rate = socfpga_clk_recalc_rate, .get_parent = socfpga_clk_get_parent, -@@ -209,8 +210,10 @@ static void __init __socfpga_gate_init(struct device_node *node, +@@ -208,8 +209,10 @@ static void __init __socfpga_gate_init(struct device_node *node, socfpga_clk->hw.reg = clk_mgr_base_addr + clk_gate[0]; socfpga_clk->hw.bit_idx = clk_gate[1]; @@ -39009,7 +40825,7 @@ index 501d513..fb0ecf9 100644 rc = of_property_read_u32(node, "fixed-divider", &fixed_div); diff --git a/drivers/clk/socfpga/clk-pll.c b/drivers/clk/socfpga/clk-pll.c -index de6da95..a2e72c0 100644 +index de6da95..c98278b 100644 --- a/drivers/clk/socfpga/clk-pll.c +++ b/drivers/clk/socfpga/clk-pll.c @@ -21,6 +21,7 @@ @@ -39025,7 +40841,7 @@ index de6da95..a2e72c0 100644 } -static struct clk_ops clk_pll_ops = { -+static struct clk_ops_no_const clk_pll_ops __read_only = { ++static clk_ops_no_const clk_pll_ops __read_only = { .recalc_rate = clk_pll_recalc_rate, .get_parent = clk_pll_get_parent, }; @@ -39043,10 +40859,10 @@ index de6da95..a2e72c0 100644 clk = clk_register(NULL, &pll_clk->hw.hw); if (WARN_ON(IS_ERR(clk))) { diff --git a/drivers/cpufreq/acpi-cpufreq.c b/drivers/cpufreq/acpi-cpufreq.c -index 000e4e0..4770351 100644 +index b0c18ed..1713a80 100644 --- a/drivers/cpufreq/acpi-cpufreq.c +++ b/drivers/cpufreq/acpi-cpufreq.c -@@ -676,8 +676,11 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy) +@@ -675,8 +675,11 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy) data->acpi_data = per_cpu_ptr(acpi_perf_data, cpu); per_cpu(acfreq_data, cpu) = data; @@ -39060,7 +40876,7 @@ index 000e4e0..4770351 100644 result = acpi_processor_register_performance(data->acpi_data, cpu); if (result) -@@ -810,7 +813,9 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy) +@@ -809,7 +812,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: @@ -39071,7 +40887,7 @@ index 000e4e0..4770351 100644 break; default: break; -@@ -904,8 +909,10 @@ static void __init acpi_cpufreq_boost_init(void) +@@ -903,8 +908,10 @@ static void __init acpi_cpufreq_boost_init(void) if (!msrs) return; @@ -39085,10 +40901,10 @@ index 000e4e0..4770351 100644 cpu_notifier_register_begin(); diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c -index 558224c..55e3b57 100644 +index 6f02485..13684ae 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c -@@ -2022,7 +2022,7 @@ void cpufreq_unregister_governor(struct cpufreq_governor *governor) +@@ -2100,7 +2100,7 @@ void cpufreq_unregister_governor(struct cpufreq_governor *governor) } mutex_lock(&cpufreq_governor_mutex); @@ -39097,7 +40913,7 @@ index 558224c..55e3b57 100644 mutex_unlock(&cpufreq_governor_mutex); return; } -@@ -2238,7 +2238,7 @@ static int cpufreq_cpu_callback(struct notifier_block *nfb, +@@ -2316,7 +2316,7 @@ static int cpufreq_cpu_callback(struct notifier_block *nfb, return NOTIFY_OK; } @@ -39106,7 +40922,7 @@ index 558224c..55e3b57 100644 .notifier_call = cpufreq_cpu_callback, }; -@@ -2278,13 +2278,17 @@ int cpufreq_boost_trigger_state(int state) +@@ -2356,13 +2356,17 @@ int cpufreq_boost_trigger_state(int state) return 0; write_lock_irqsave(&cpufreq_driver_lock, flags); @@ -39126,7 +40942,7 @@ index 558224c..55e3b57 100644 write_unlock_irqrestore(&cpufreq_driver_lock, flags); pr_err("%s: Cannot %s BOOST\n", -@@ -2340,8 +2344,11 @@ int cpufreq_register_driver(struct cpufreq_driver *driver_data) +@@ -2419,8 +2423,11 @@ int cpufreq_register_driver(struct cpufreq_driver *driver_data) pr_debug("trying to register driver %s\n", driver_data->name); @@ -39140,7 +40956,7 @@ index 558224c..55e3b57 100644 write_lock_irqsave(&cpufreq_driver_lock, flags); if (cpufreq_driver) { -@@ -2356,8 +2363,11 @@ int cpufreq_register_driver(struct cpufreq_driver *driver_data) +@@ -2435,8 +2442,11 @@ int cpufreq_register_driver(struct cpufreq_driver *driver_data) * Check if driver provides function to enable boost - * if not, use cpufreq_boost_set_sw as default */ @@ -39155,10 +40971,10 @@ index 558224c..55e3b57 100644 ret = cpufreq_sysfs_create_file(&boost.attr); if (ret) { diff --git a/drivers/cpufreq/cpufreq_governor.c b/drivers/cpufreq/cpufreq_governor.c -index e1c6433..31203ae 100644 +index 1b44496..b80ff5e 100644 --- a/drivers/cpufreq/cpufreq_governor.c +++ b/drivers/cpufreq/cpufreq_governor.c -@@ -191,7 +191,7 @@ int cpufreq_governor_dbs(struct cpufreq_policy *policy, +@@ -245,7 +245,7 @@ int cpufreq_governor_dbs(struct cpufreq_policy *policy, 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; @@ -39167,7 +40983,7 @@ index e1c6433..31203ae 100644 struct od_dbs_tuners *od_tuners = NULL; struct cs_dbs_tuners *cs_tuners = NULL; struct cpu_dbs_common_info *cpu_cdbs; -@@ -257,7 +257,7 @@ int cpufreq_governor_dbs(struct cpufreq_policy *policy, +@@ -311,7 +311,7 @@ int cpufreq_governor_dbs(struct cpufreq_policy *policy, if ((cdata->governor == GOV_CONSERVATIVE) && (!policy->governor->initialized)) { @@ -39176,7 +40992,7 @@ index e1c6433..31203ae 100644 cpufreq_register_notifier(cs_ops->notifier_block, CPUFREQ_TRANSITION_NOTIFIER); -@@ -277,7 +277,7 @@ int cpufreq_governor_dbs(struct cpufreq_policy *policy, +@@ -331,7 +331,7 @@ int cpufreq_governor_dbs(struct cpufreq_policy *policy, if ((dbs_data->cdata->governor == GOV_CONSERVATIVE) && (policy->governor->initialized == 1)) { @@ -39186,10 +41002,10 @@ index e1c6433..31203ae 100644 cpufreq_unregister_notifier(cs_ops->notifier_block, CPUFREQ_TRANSITION_NOTIFIER); diff --git a/drivers/cpufreq/cpufreq_governor.h b/drivers/cpufreq/cpufreq_governor.h -index bfb9ae1..e1d3a7e 100644 +index cc401d1..8197340 100644 --- a/drivers/cpufreq/cpufreq_governor.h +++ b/drivers/cpufreq/cpufreq_governor.h -@@ -205,7 +205,7 @@ struct common_dbs_data { +@@ -212,7 +212,7 @@ struct common_dbs_data { void (*exit)(struct dbs_data *dbs_data); /* Governor specific ops, see below */ @@ -39198,7 +41014,7 @@ index bfb9ae1..e1d3a7e 100644 }; /* Governor Per policy data */ -@@ -225,7 +225,7 @@ struct od_ops { +@@ -232,7 +232,7 @@ struct od_ops { unsigned int (*powersave_bias_target)(struct cpufreq_policy *policy, unsigned int freq_next, unsigned int relation); void (*freq_increase)(struct cpufreq_policy *policy, unsigned int freq); @@ -39242,10 +41058,10 @@ index 18d4091..434be15 100644 } EXPORT_SYMBOL_GPL(od_unregister_powersave_bias_handler); diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c -index 870eecc..787bbca 100644 +index 86631cb..c34ec78 100644 --- a/drivers/cpufreq/intel_pstate.c +++ b/drivers/cpufreq/intel_pstate.c -@@ -125,10 +125,10 @@ struct pstate_funcs { +@@ -121,10 +121,10 @@ struct pstate_funcs { struct cpu_defaults { struct pstate_adjust_policy pid_policy; struct pstate_funcs funcs; @@ -39258,7 +41074,7 @@ index 870eecc..787bbca 100644 struct perf_limits { int no_turbo; -@@ -530,7 +530,7 @@ static void intel_pstate_set_pstate(struct cpudata *cpu, int pstate) +@@ -526,7 +526,7 @@ static void intel_pstate_set_pstate(struct cpudata *cpu, int pstate) cpu->pstate.current_pstate = pstate; @@ -39267,10 +41083,10 @@ index 870eecc..787bbca 100644 } static inline void intel_pstate_pstate_increase(struct cpudata *cpu, int steps) -@@ -552,12 +552,12 @@ static void intel_pstate_get_cpu_pstates(struct cpudata *cpu) - { - sprintf(cpu->name, "Intel 2nd generation core"); +@@ -546,12 +546,12 @@ static inline void intel_pstate_pstate_decrease(struct cpudata *cpu, int steps) + static void intel_pstate_get_cpu_pstates(struct cpudata *cpu) + { - cpu->pstate.min_pstate = pstate_funcs.get_min(); - cpu->pstate.max_pstate = pstate_funcs.get_max(); - cpu->pstate.turbo_pstate = pstate_funcs.get_turbo(); @@ -39285,7 +41101,7 @@ index 870eecc..787bbca 100644 intel_pstate_set_pstate(cpu, cpu->pstate.min_pstate); } -@@ -847,9 +847,9 @@ static int intel_pstate_msrs_not_valid(void) +@@ -838,9 +838,9 @@ static int intel_pstate_msrs_not_valid(void) rdmsrl(MSR_IA32_APERF, aperf); rdmsrl(MSR_IA32_MPERF, mperf); @@ -39298,7 +41114,7 @@ index 870eecc..787bbca 100644 return -ENODEV; rdmsrl(MSR_IA32_APERF, tmp); -@@ -863,7 +863,7 @@ static int intel_pstate_msrs_not_valid(void) +@@ -854,7 +854,7 @@ static int intel_pstate_msrs_not_valid(void) return 0; } @@ -39307,7 +41123,7 @@ index 870eecc..787bbca 100644 { pid_params.sample_rate_ms = policy->sample_rate_ms; pid_params.p_gain_pct = policy->p_gain_pct; -@@ -875,11 +875,7 @@ static void copy_pid_params(struct pstate_adjust_policy *policy) +@@ -866,11 +866,7 @@ static void copy_pid_params(struct pstate_adjust_policy *policy) static void copy_cpu_funcs(struct pstate_funcs *funcs) { @@ -39463,7 +41279,7 @@ index 9bb42ba..b01b4a2 100644 MODULE_AUTHOR("David S. Miller "); diff --git a/drivers/cpufreq/speedstep-centrino.c b/drivers/cpufreq/speedstep-centrino.c -index 6723f03..3465190 100644 +index 7d4a315..21bb886 100644 --- a/drivers/cpufreq/speedstep-centrino.c +++ b/drivers/cpufreq/speedstep-centrino.c @@ -351,8 +351,11 @@ static int centrino_cpu_init(struct cpufreq_policy *policy) @@ -39481,10 +41297,10 @@ index 6723f03..3465190 100644 if (policy->cpu != 0) return -ENODEV; diff --git a/drivers/cpuidle/driver.c b/drivers/cpuidle/driver.c -index 136d6a2..06e373d 100644 +index 9634f20..e1499c7 100644 --- a/drivers/cpuidle/driver.c +++ b/drivers/cpuidle/driver.c -@@ -202,7 +202,7 @@ static int poll_idle(struct cpuidle_device *dev, +@@ -205,7 +205,7 @@ static int poll_idle(struct cpuidle_device *dev, static void poll_idle_init(struct cpuidle_driver *drv) { @@ -39542,10 +41358,10 @@ index 12fea3e..1e28f47 100644 err = pci_request_regions(pdev, name); if (err) diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c -index 2042ec3..a9ce67f 100644 +index 9f90369..bfcacdb 100644 --- a/drivers/devfreq/devfreq.c +++ b/drivers/devfreq/devfreq.c -@@ -616,7 +616,7 @@ int devfreq_add_governor(struct devfreq_governor *governor) +@@ -673,7 +673,7 @@ int devfreq_add_governor(struct devfreq_governor *governor) goto err_out; } @@ -39554,7 +41370,7 @@ index 2042ec3..a9ce67f 100644 list_for_each_entry(devfreq, &devfreq_list, node) { int ret = 0; -@@ -704,7 +704,7 @@ int devfreq_remove_governor(struct devfreq_governor *governor) +@@ -761,7 +761,7 @@ int devfreq_remove_governor(struct devfreq_governor *governor) } } @@ -39564,7 +41380,7 @@ index 2042ec3..a9ce67f 100644 mutex_unlock(&devfreq_list_lock); diff --git a/drivers/dma/sh/shdma-base.c b/drivers/dma/sh/shdma-base.c -index 5239677..1cb71a8 100644 +index b35007e..55ad549 100644 --- a/drivers/dma/sh/shdma-base.c +++ b/drivers/dma/sh/shdma-base.c @@ -267,8 +267,8 @@ static int shdma_alloc_chan_resources(struct dma_chan *chan) @@ -39579,10 +41395,10 @@ index 5239677..1cb71a8 100644 ret = -ENOMEM; goto edescalloc; diff --git a/drivers/dma/sh/shdmac.c b/drivers/dma/sh/shdmac.c -index dda7e75..0a4c867 100644 +index 146d5df..3c14970 100644 --- a/drivers/dma/sh/shdmac.c +++ b/drivers/dma/sh/shdmac.c -@@ -513,7 +513,7 @@ static int sh_dmae_nmi_handler(struct notifier_block *self, +@@ -514,7 +514,7 @@ static int sh_dmae_nmi_handler(struct notifier_block *self, return ret; } @@ -39823,7 +41639,7 @@ index eb6935c..3cc2bfa 100644 #include diff --git a/drivers/firewire/core.h b/drivers/firewire/core.h -index f477308..2795f24 100644 +index e1480ff6..1a429bd 100644 --- a/drivers/firewire/core.h +++ b/drivers/firewire/core.h @@ -111,6 +111,7 @@ struct fw_card_driver { @@ -39835,10 +41651,10 @@ index f477308..2795f24 100644 void fw_card_initialize(struct fw_card *card, const struct fw_card_driver *driver, struct device *device); diff --git a/drivers/firewire/ohci.c b/drivers/firewire/ohci.c -index 586f2f7..3545ad2 100644 +index a66a321..f6caf20 100644 --- a/drivers/firewire/ohci.c +++ b/drivers/firewire/ohci.c -@@ -2049,10 +2049,12 @@ static void bus_reset_work(struct work_struct *work) +@@ -2056,10 +2056,12 @@ static void bus_reset_work(struct work_struct *work) be32_to_cpu(ohci->next_header)); } @@ -39851,7 +41667,7 @@ index 586f2f7..3545ad2 100644 spin_unlock_irq(&ohci->lock); -@@ -2584,8 +2586,10 @@ static int ohci_enable_phys_dma(struct fw_card *card, +@@ -2591,8 +2593,10 @@ static int ohci_enable_phys_dma(struct fw_card *card, unsigned long flags; int n, ret = 0; @@ -39910,10 +41726,10 @@ index 1491dd4..aa910db 100644 EXPORT_SYMBOL_GPL(cper_next_record_id); diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c -index af20f17..4e4e545 100644 +index dc79346..b39bd69 100644 --- a/drivers/firmware/efi/efi.c +++ b/drivers/firmware/efi/efi.c -@@ -120,14 +120,16 @@ static struct attribute_group efi_subsys_attr_group = { +@@ -122,14 +122,16 @@ static struct attribute_group efi_subsys_attr_group = { }; static struct efivars generic_efivars; @@ -39936,10 +41752,10 @@ index af20f17..4e4e545 100644 return efivars_register(&generic_efivars, &generic_ops, efi_kobj); } diff --git a/drivers/firmware/efi/efivars.c b/drivers/firmware/efi/efivars.c -index 50ea412..caccd6e9 100644 +index 463c565..02a5640 100644 --- a/drivers/firmware/efi/efivars.c +++ b/drivers/firmware/efi/efivars.c -@@ -456,7 +456,7 @@ efivar_create_sysfs_entry(struct efivar_entry *new_var) +@@ -588,7 +588,7 @@ efivar_create_sysfs_entry(struct efivar_entry *new_var) static int create_efivars_bin_attributes(void) { @@ -39965,7 +41781,7 @@ index 2f569aa..c95f4fb 100644 } diff --git a/drivers/gpio/gpio-em.c b/drivers/gpio/gpio-em.c -index 8765bd6..2e5b147 100644 +index cde3605..8b69df7 100644 --- a/drivers/gpio/gpio-em.c +++ b/drivers/gpio/gpio-em.c @@ -278,7 +278,7 @@ static int em_gio_probe(struct platform_device *pdev) @@ -39991,10 +41807,10 @@ index 7030422..42a3fe9 100644 static struct { spinlock_t lock; diff --git a/drivers/gpio/gpio-rcar.c b/drivers/gpio/gpio-rcar.c -index 03c9148..c66e753 100644 +index b6ae89e..ac7349c 100644 --- a/drivers/gpio/gpio-rcar.c +++ b/drivers/gpio/gpio-rcar.c -@@ -355,7 +355,7 @@ static int gpio_rcar_probe(struct platform_device *pdev) +@@ -357,7 +357,7 @@ static int gpio_rcar_probe(struct platform_device *pdev) struct gpio_rcar_priv *p; struct resource *io, *irq; struct gpio_chip *gpio_chip; @@ -40016,11 +41832,42 @@ index 66cbcc1..0c5e622 100644 return -EINVAL; } +diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c +index 2ebc907..01bdd6e 100644 +--- a/drivers/gpio/gpiolib.c ++++ b/drivers/gpio/gpiolib.c +@@ -1482,8 +1482,10 @@ static void gpiochip_irqchip_remove(struct gpio_chip *gpiochip) + } + + if (gpiochip->irqchip) { +- gpiochip->irqchip->irq_request_resources = NULL; +- gpiochip->irqchip->irq_release_resources = NULL; ++ pax_open_kernel(); ++ *(void **)&gpiochip->irqchip->irq_request_resources = NULL; ++ *(void **)&gpiochip->irqchip->irq_release_resources = NULL; ++ pax_close_kernel(); + gpiochip->irqchip = NULL; + } + } +@@ -1549,8 +1551,11 @@ int gpiochip_irqchip_add(struct gpio_chip *gpiochip, + gpiochip->irqchip = NULL; + return -EINVAL; + } +- irqchip->irq_request_resources = gpiochip_irq_reqres; +- irqchip->irq_release_resources = gpiochip_irq_relres; ++ ++ pax_open_kernel(); ++ *(void **)&irqchip->irq_request_resources = gpiochip_irq_reqres; ++ *(void **)&irqchip->irq_release_resources = gpiochip_irq_relres; ++ pax_close_kernel(); + + /* + * Prepare the mapping since the irqchip shall be orthogonal to diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c -index d8b7099..8a314a5 100644 +index fe94cc1..5e697b3 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c -@@ -3500,7 +3500,7 @@ int drm_mode_getproperty_ioctl(struct drm_device *dev, +@@ -3584,7 +3584,7 @@ int drm_mode_getproperty_ioctl(struct drm_device *dev, goto done; } @@ -40030,9 +41877,7 @@ index d8b7099..8a314a5 100644 ret = -EFAULT; goto done; diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c -old mode 100644 -new mode 100755 -index 8218078..9960928a +index 8218078..9960928a 100644 --- a/drivers/gpu/drm/drm_drv.c +++ b/drivers/gpu/drm/drm_drv.c @@ -233,7 +233,7 @@ module_exit(drm_core_exit); @@ -40054,10 +41899,10 @@ index 8218078..9960928a int retcode = -EINVAL; char stack_kdata[128]; diff --git a/drivers/gpu/drm/drm_fops.c b/drivers/gpu/drm/drm_fops.c -index e1eba0b..98f69f9 100644 +index 021fe5d..abc9ce6 100644 --- a/drivers/gpu/drm/drm_fops.c +++ b/drivers/gpu/drm/drm_fops.c -@@ -89,7 +89,7 @@ int drm_open(struct inode *inode, struct file *filp) +@@ -88,7 +88,7 @@ int drm_open(struct inode *inode, struct file *filp) return PTR_ERR(minor); dev = minor->dev; @@ -40066,7 +41911,7 @@ index e1eba0b..98f69f9 100644 need_setup = 1; /* share address_space across all char-devs of a single device */ -@@ -106,7 +106,7 @@ int drm_open(struct inode *inode, struct file *filp) +@@ -105,7 +105,7 @@ int drm_open(struct inode *inode, struct file *filp) return 0; err_undo: @@ -40075,7 +41920,7 @@ index e1eba0b..98f69f9 100644 drm_minor_release(minor); return retcode; } -@@ -430,7 +430,7 @@ int drm_release(struct inode *inode, struct file *filp) +@@ -427,7 +427,7 @@ int drm_release(struct inode *inode, struct file *filp) mutex_lock(&drm_global_mutex); @@ -40084,7 +41929,7 @@ index e1eba0b..98f69f9 100644 if (dev->driver->preclose) dev->driver->preclose(dev, file_priv); -@@ -439,10 +439,10 @@ int drm_release(struct inode *inode, struct file *filp) +@@ -436,10 +436,10 @@ int drm_release(struct inode *inode, struct file *filp) * Begin inline drm_release */ @@ -40097,7 +41942,7 @@ index e1eba0b..98f69f9 100644 /* Release any auth tokens that might point to this file_priv, (do that under the drm_global_mutex) */ -@@ -543,7 +543,7 @@ int drm_release(struct inode *inode, struct file *filp) +@@ -540,7 +540,7 @@ int drm_release(struct inode *inode, struct file *filp) * End inline drm_release */ @@ -40168,10 +42013,10 @@ index 3d2e91c..d31c4c9 100644 item->object = NULL; } diff --git a/drivers/gpu/drm/drm_info.c b/drivers/gpu/drm/drm_info.c -index 7473035..a48b9c5 100644 +index 86feedd..cba70f5 100644 --- a/drivers/gpu/drm/drm_info.c +++ b/drivers/gpu/drm/drm_info.c -@@ -75,10 +75,13 @@ int drm_vm_info(struct seq_file *m, void *data) +@@ -73,10 +73,13 @@ int drm_vm_info(struct seq_file *m, void *data) struct drm_local_map *map; struct drm_map_list *r_list; @@ -40189,7 +42034,7 @@ index 7473035..a48b9c5 100644 const char *type; int i; -@@ -89,7 +92,7 @@ int drm_vm_info(struct seq_file *m, void *data) +@@ -87,7 +90,7 @@ int drm_vm_info(struct seq_file *m, void *data) map = r_list->map; if (!map) continue; @@ -40198,7 +42043,7 @@ index 7473035..a48b9c5 100644 type = "??"; else type = types[map->type]; -@@ -261,7 +264,11 @@ int drm_vma_info(struct seq_file *m, void *data) +@@ -259,7 +262,11 @@ int drm_vma_info(struct seq_file *m, void *data) vma->vm_flags & VM_MAYSHARE ? 's' : 'p', vma->vm_flags & VM_LOCKED ? 'l' : '-', vma->vm_flags & VM_IO ? 'i' : '-', @@ -40263,7 +42108,7 @@ index 2f4c4343..dd12cd2 100644 ret = drm_ioctl(filp, cmd, arg); diff --git a/drivers/gpu/drm/drm_stub.c b/drivers/gpu/drm/drm_stub.c -index 4c24c3a..c903cab 100644 +index 14d1646..99f9d49 100644 --- a/drivers/gpu/drm/drm_stub.c +++ b/drivers/gpu/drm/drm_stub.c @@ -455,7 +455,7 @@ void drm_unplug_dev(struct drm_device *dev) @@ -40276,7 +42121,7 @@ index 4c24c3a..c903cab 100644 } mutex_unlock(&drm_global_mutex); diff --git a/drivers/gpu/drm/drm_sysfs.c b/drivers/gpu/drm/drm_sysfs.c -index c22c309..ae758c3 100644 +index 369b262..09ea3ab 100644 --- a/drivers/gpu/drm/drm_sysfs.c +++ b/drivers/gpu/drm/drm_sysfs.c @@ -505,7 +505,7 @@ static void drm_sysfs_release(struct device *dev) @@ -40304,23 +42149,23 @@ index d4d16ed..8fb0b51 100644 int front_offset; } drm_i810_private_t; diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c -index eedb023..25076a4 100644 +index d443441..ab091dd 100644 --- a/drivers/gpu/drm/i915/i915_dma.c +++ b/drivers/gpu/drm/i915/i915_dma.c -@@ -1280,7 +1280,7 @@ static bool i915_switcheroo_can_switch(struct pci_dev *pdev) - bool can_switch; - - spin_lock(&dev->count_lock); -- can_switch = (dev->open_count == 0); -+ can_switch = (local_read(&dev->open_count) == 0); - spin_unlock(&dev->count_lock); - return can_switch; +@@ -1290,7 +1290,7 @@ static bool i915_switcheroo_can_switch(struct pci_dev *pdev) + * locking inversion with the driver load path. And the access here is + * completely racy anyway. So don't bother with locking for now. + */ +- return dev->open_count == 0; ++ return local_read(&dev->open_count) == 0; } + + static const struct vga_switcheroo_client_ops i915_switcheroo_ops = { diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c -index 20fef6c..76c78fb 100644 +index 3a30133..ef4a743 100644 --- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c +++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c -@@ -886,9 +886,9 @@ i915_gem_check_execbuffer(struct drm_i915_gem_execbuffer2 *exec) +@@ -891,9 +891,9 @@ i915_gem_check_execbuffer(struct drm_i915_gem_execbuffer2 *exec) static int validate_exec_list(struct drm_i915_gem_exec_object2 *exec, @@ -40333,7 +42178,7 @@ index 20fef6c..76c78fb 100644 unsigned relocs_max = UINT_MAX / sizeof(struct drm_i915_gem_relocation_entry); diff --git a/drivers/gpu/drm/i915/i915_ioc32.c b/drivers/gpu/drm/i915/i915_ioc32.c -index 3c59584..500f2e9 100644 +index 2e0613e..a8b94d9 100644 --- a/drivers/gpu/drm/i915/i915_ioc32.c +++ b/drivers/gpu/drm/i915/i915_ioc32.c @@ -181,7 +181,7 @@ static int compat_i915_alloc(struct file *file, unsigned int cmd, @@ -40355,11 +42200,11 @@ index 3c59584..500f2e9 100644 if (nr < DRM_COMMAND_BASE) return drm_compat_ioctl(filp, cmd, arg); -- if (nr < DRM_COMMAND_BASE + DRM_ARRAY_SIZE(i915_compat_ioctls)) +- if (nr < DRM_COMMAND_BASE + ARRAY_SIZE(i915_compat_ioctls)) - fn = i915_compat_ioctls[nr - DRM_COMMAND_BASE]; - - if (fn != NULL) -+ if (nr < DRM_COMMAND_BASE + DRM_ARRAY_SIZE(i915_compat_ioctls)) { ++ if (nr < DRM_COMMAND_BASE + ARRAY_SIZE(i915_compat_ioctls)) { + drm_ioctl_compat_t fn = i915_compat_ioctls[nr - DRM_COMMAND_BASE]; ret = (*fn) (filp, cmd, arg); - else @@ -40368,10 +42213,10 @@ index 3c59584..500f2e9 100644 return ret; diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c -index b91dfbe..b7fb16d 100644 +index f0be855..94e82d9 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c -@@ -11179,13 +11179,13 @@ struct intel_quirk { +@@ -11604,13 +11604,13 @@ struct intel_quirk { int subsystem_vendor; int subsystem_device; void (*hook)(struct drm_device *dev); @@ -40387,7 +42232,7 @@ index b91dfbe..b7fb16d 100644 static int intel_dmi_reverse_brightness(const struct dmi_system_id *id) { -@@ -11193,18 +11193,20 @@ static int intel_dmi_reverse_brightness(const struct dmi_system_id *id) +@@ -11618,18 +11618,20 @@ static int intel_dmi_reverse_brightness(const struct dmi_system_id *id) return 1; } @@ -40435,7 +42280,7 @@ index fe45321..836fdca 100644 unsigned int fb_cpp; diff --git a/drivers/gpu/drm/mga/mga_ioc32.c b/drivers/gpu/drm/mga/mga_ioc32.c -index 86b4bb8..ae237ad 100644 +index 729bfd5..ead8823 100644 --- a/drivers/gpu/drm/mga/mga_ioc32.c +++ b/drivers/gpu/drm/mga/mga_ioc32.c @@ -190,7 +190,7 @@ static int compat_mga_dma_bootstrap(struct file *file, unsigned int cmd, @@ -40457,11 +42302,11 @@ index 86b4bb8..ae237ad 100644 if (nr < DRM_COMMAND_BASE) return drm_compat_ioctl(filp, cmd, arg); -- if (nr < DRM_COMMAND_BASE + DRM_ARRAY_SIZE(mga_compat_ioctls)) +- if (nr < DRM_COMMAND_BASE + ARRAY_SIZE(mga_compat_ioctls)) - fn = mga_compat_ioctls[nr - DRM_COMMAND_BASE]; - - if (fn != NULL) -+ if (nr < DRM_COMMAND_BASE + DRM_ARRAY_SIZE(mga_compat_ioctls)) { ++ if (nr < DRM_COMMAND_BASE + ARRAY_SIZE(mga_compat_ioctls)) { + drm_ioctl_compat_t fn = mga_compat_ioctls[nr - DRM_COMMAND_BASE]; ret = (*fn) (filp, cmd, arg); - else @@ -40535,7 +42380,7 @@ index 7efbafa..19f8087 100644 struct ttm_buffer_object *, struct ttm_mem_reg *, struct ttm_mem_reg *); diff --git a/drivers/gpu/drm/nouveau/nouveau_ioc32.c b/drivers/gpu/drm/nouveau/nouveau_ioc32.c -index c1a7e5a..38b8539 100644 +index 462679a..88e32a7 100644 --- a/drivers/gpu/drm/nouveau/nouveau_ioc32.c +++ b/drivers/gpu/drm/nouveau/nouveau_ioc32.c @@ -50,7 +50,7 @@ long nouveau_compat_ioctl(struct file *filp, unsigned int cmd, @@ -40603,18 +42448,18 @@ index ab0228f..20b756b 100644 int diff --git a/drivers/gpu/drm/nouveau/nouveau_vga.c b/drivers/gpu/drm/nouveau/nouveau_vga.c -index fb84da3..d7ee463 100644 +index 4f4c3fe..2cce716 100644 --- a/drivers/gpu/drm/nouveau/nouveau_vga.c +++ b/drivers/gpu/drm/nouveau/nouveau_vga.c -@@ -67,7 +67,7 @@ nouveau_switcheroo_can_switch(struct pci_dev *pdev) - bool can_switch; - - spin_lock(&dev->count_lock); -- can_switch = (dev->open_count == 0); -+ can_switch = (local_read(&dev->open_count) == 0); - spin_unlock(&dev->count_lock); - return can_switch; +@@ -70,7 +70,7 @@ nouveau_switcheroo_can_switch(struct pci_dev *pdev) + * locking inversion with the driver load path. And the access here is + * completely racy anyway. So don't bother with locking for now. + */ +- return dev->open_count == 0; ++ return local_read(&dev->open_count) == 0; } + + static const struct vga_switcheroo_client_ops diff --git a/drivers/gpu/drm/qxl/qxl_cmd.c b/drivers/gpu/drm/qxl/qxl_cmd.c index eb89653..613cf71 100644 --- a/drivers/gpu/drm/qxl/qxl_cmd.c @@ -40692,7 +42537,7 @@ index 36ed40b..0397633 100644 wait_queue_head_t display_event; wait_queue_head_t cursor_event; diff --git a/drivers/gpu/drm/qxl/qxl_ioctl.c b/drivers/gpu/drm/qxl/qxl_ioctl.c -index 0bb86e6..d41416d 100644 +index b110883..dd06418 100644 --- a/drivers/gpu/drm/qxl/qxl_ioctl.c +++ b/drivers/gpu/drm/qxl/qxl_ioctl.c @@ -181,7 +181,7 @@ static int qxl_process_single_command(struct qxl_device *qdev, @@ -40728,12 +42573,12 @@ index 0bb86e6..d41416d 100644 return -EFAULT; diff --git a/drivers/gpu/drm/qxl/qxl_irq.c b/drivers/gpu/drm/qxl/qxl_irq.c -index 28f84b4..fb3e224 100644 +index 0bf1e20..42a7310 100644 --- a/drivers/gpu/drm/qxl/qxl_irq.c +++ b/drivers/gpu/drm/qxl/qxl_irq.c -@@ -33,19 +33,19 @@ irqreturn_t qxl_irq_handler(int irq, void *arg) - - pending = xchg(&qdev->ram_header->int_pending, 0); +@@ -36,19 +36,19 @@ irqreturn_t qxl_irq_handler(int irq, void *arg) + if (!pending) + return IRQ_NONE; - atomic_inc(&qdev->irq_received); + atomic_inc_unchecked(&qdev->irq_received); @@ -40755,7 +42600,7 @@ index 28f84b4..fb3e224 100644 wake_up_all(&qdev->io_cmd_event); } if (pending & QXL_INTERRUPT_ERROR) { -@@ -82,10 +82,10 @@ int qxl_irq_init(struct qxl_device *qdev) +@@ -85,10 +85,10 @@ int qxl_irq_init(struct qxl_device *qdev) init_waitqueue_head(&qdev->io_cmd_event); INIT_WORK(&qdev->client_monitors_config_work, qxl_client_monitors_config_work_func); @@ -40768,10 +42613,10 @@ index 28f84b4..fb3e224 100644 + atomic_set_unchecked(&qdev->irq_received_cursor, 0); + atomic_set_unchecked(&qdev->irq_received_io_cmd, 0); qdev->irq_received_error = 0; - ret = drm_irq_install(qdev->ddev); + ret = drm_irq_install(qdev->ddev, qdev->ddev->pdev->irq); qdev->ram_header->int_mask = QXL_INTERRUPT_MASK; diff --git a/drivers/gpu/drm/qxl/qxl_ttm.c b/drivers/gpu/drm/qxl/qxl_ttm.c -index d52c275..4e6b43d 100644 +index 71a1bae..cb1f103 100644 --- a/drivers/gpu/drm/qxl/qxl_ttm.c +++ b/drivers/gpu/drm/qxl/qxl_ttm.c @@ -103,7 +103,7 @@ static void qxl_ttm_global_fini(struct qxl_device *qdev) @@ -40783,7 +42628,7 @@ index d52c275..4e6b43d 100644 static const struct vm_operations_struct *ttm_vm_ops; static int qxl_ttm_fault(struct vm_area_struct *vma, struct vm_fault *vmf) -@@ -147,8 +147,10 @@ int qxl_mmap(struct file *filp, struct vm_area_struct *vma) +@@ -145,8 +145,10 @@ int qxl_mmap(struct file *filp, struct vm_area_struct *vma) return r; if (unlikely(ttm_vm_ops == NULL)) { ttm_vm_ops = vma->vm_ops; @@ -40794,7 +42639,7 @@ index d52c275..4e6b43d 100644 } vma->vm_ops = &qxl_ttm_vm_ops; return 0; -@@ -561,25 +563,23 @@ static int qxl_mm_dump_table(struct seq_file *m, void *data) +@@ -555,25 +557,23 @@ static int qxl_mm_dump_table(struct seq_file *m, void *data) static int qxl_ttm_debugfs_init(struct qxl_device *qdev) { #if defined(CONFIG_DEBUG_FS) @@ -40870,7 +42715,7 @@ index 5bf3f5f..7000661 100644 u32 color_fmt; unsigned int front_offset; diff --git a/drivers/gpu/drm/r128/r128_ioc32.c b/drivers/gpu/drm/r128/r128_ioc32.c -index b0d0fd3..a6fbbe4 100644 +index 663f38c..c689495 100644 --- a/drivers/gpu/drm/r128/r128_ioc32.c +++ b/drivers/gpu/drm/r128/r128_ioc32.c @@ -178,7 +178,7 @@ static int compat_r128_getparam(struct file *file, unsigned int cmd, @@ -40892,11 +42737,11 @@ index b0d0fd3..a6fbbe4 100644 if (nr < DRM_COMMAND_BASE) return drm_compat_ioctl(filp, cmd, arg); -- if (nr < DRM_COMMAND_BASE + DRM_ARRAY_SIZE(r128_compat_ioctls)) +- if (nr < DRM_COMMAND_BASE + ARRAY_SIZE(r128_compat_ioctls)) - fn = r128_compat_ioctls[nr - DRM_COMMAND_BASE]; - - if (fn != NULL) -+ if (nr < DRM_COMMAND_BASE + DRM_ARRAY_SIZE(r128_compat_ioctls)) { ++ if (nr < DRM_COMMAND_BASE + ARRAY_SIZE(r128_compat_ioctls)) { + drm_ioctl_compat_t fn = r128_compat_ioctls[nr - DRM_COMMAND_BASE]; ret = (*fn) (filp, cmd, arg); - else @@ -40927,7 +42772,7 @@ index c2ae496..30b5993 100644 return IRQ_HANDLED; } diff --git a/drivers/gpu/drm/r128/r128_state.c b/drivers/gpu/drm/r128/r128_state.c -index e806dac..f81d32f 100644 +index 575e986..66e62ca 100644 --- a/drivers/gpu/drm/r128/r128_state.c +++ b/drivers/gpu/drm/r128/r128_state.c @@ -320,10 +320,10 @@ static void r128_clear_box(drm_r128_private_t *dev_priv, @@ -40965,18 +42810,18 @@ index 4a85bb6..aaea819 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 2cd144c..a01c95a 100644 +index 697add2..9860f5b 100644 --- a/drivers/gpu/drm/radeon/radeon_device.c +++ b/drivers/gpu/drm/radeon/radeon_device.c -@@ -1129,7 +1129,7 @@ static bool radeon_switcheroo_can_switch(struct pci_dev *pdev) - bool can_switch; - - spin_lock(&dev->count_lock); -- can_switch = (dev->open_count == 0); -+ can_switch = (local_read(&dev->open_count) == 0); - spin_unlock(&dev->count_lock); - return can_switch; +@@ -1169,7 +1169,7 @@ static bool radeon_switcheroo_can_switch(struct pci_dev *pdev) + * locking inversion with the driver load path. And the access here is + * completely racy anyway. So don't bother with locking for now. + */ +- return dev->open_count == 0; ++ return local_read(&dev->open_count) == 0; } + + static const struct vga_switcheroo_client_ops radeon_switcheroo_ops = { diff --git a/drivers/gpu/drm/radeon/radeon_drv.h b/drivers/gpu/drm/radeon/radeon_drv.h index dafd812..1bf20c7 100644 --- a/drivers/gpu/drm/radeon/radeon_drv.h @@ -40991,7 +42836,7 @@ index dafd812..1bf20c7 100644 uint32_t irq_enable_reg; uint32_t r500_disp_irq_reg; diff --git a/drivers/gpu/drm/radeon/radeon_ioc32.c b/drivers/gpu/drm/radeon/radeon_ioc32.c -index bdb0f93..5ff558f 100644 +index 0b98ea1..0881827 100644 --- a/drivers/gpu/drm/radeon/radeon_ioc32.c +++ b/drivers/gpu/drm/radeon/radeon_ioc32.c @@ -358,7 +358,7 @@ static int compat_radeon_cp_setparam(struct file *file, unsigned int cmd, @@ -41022,11 +42867,11 @@ index bdb0f93..5ff558f 100644 if (nr < DRM_COMMAND_BASE) return drm_compat_ioctl(filp, cmd, arg); -- if (nr < DRM_COMMAND_BASE + DRM_ARRAY_SIZE(radeon_compat_ioctls)) +- if (nr < DRM_COMMAND_BASE + ARRAY_SIZE(radeon_compat_ioctls)) - fn = radeon_compat_ioctls[nr - DRM_COMMAND_BASE]; - - if (fn != NULL) -+ if (nr < DRM_COMMAND_BASE + DRM_ARRAY_SIZE(radeon_compat_ioctls)) { ++ if (nr < DRM_COMMAND_BASE + ARRAY_SIZE(radeon_compat_ioctls)) { + drm_ioctl_compat_t fn = radeon_compat_ioctls[nr - DRM_COMMAND_BASE]; ret = (*fn) (filp, cmd, arg); - else @@ -41059,7 +42904,7 @@ index 244b19b..c19226d 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 956ab7f..fbd36d8 100644 +index 23bb64f..69d7234 100644 --- a/drivers/gpu/drm/radeon/radeon_state.c +++ b/drivers/gpu/drm/radeon/radeon_state.c @@ -2168,7 +2168,7 @@ static int radeon_cp_clear(struct drm_device *dev, void *data, struct drm_file * @@ -41105,10 +42950,10 @@ index c8a8a51..219dacc 100644 vma->vm_ops = &radeon_ttm_vm_ops; return 0; diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c -index edb871d..a275c6ed 100644 +index ef40381..347463e 100644 --- a/drivers/gpu/drm/tegra/dc.c +++ b/drivers/gpu/drm/tegra/dc.c -@@ -1057,7 +1057,7 @@ static int tegra_dc_debugfs_init(struct tegra_dc *dc, struct drm_minor *minor) +@@ -1173,7 +1173,7 @@ static int tegra_dc_debugfs_init(struct tegra_dc *dc, struct drm_minor *minor) } for (i = 0; i < ARRAY_SIZE(debugfs_files); i++) @@ -41118,10 +42963,10 @@ index edb871d..a275c6ed 100644 err = drm_debugfs_create_files(dc->debugfs_files, ARRAY_SIZE(debugfs_files), diff --git a/drivers/gpu/drm/tegra/dsi.c b/drivers/gpu/drm/tegra/dsi.c -index 0e599f0..c9ea7c7 100644 +index bd56f2a..255af4b 100644 --- a/drivers/gpu/drm/tegra/dsi.c +++ b/drivers/gpu/drm/tegra/dsi.c -@@ -39,7 +39,7 @@ struct tegra_dsi { +@@ -41,7 +41,7 @@ struct tegra_dsi { struct clk *clk_lp; struct clk *clk; @@ -41131,10 +42976,10 @@ index 0e599f0..c9ea7c7 100644 struct dentry *debugfs; diff --git a/drivers/gpu/drm/tegra/hdmi.c b/drivers/gpu/drm/tegra/hdmi.c -index 6928015..c9853e7 100644 +index ba067bb..23afbbd 100644 --- a/drivers/gpu/drm/tegra/hdmi.c +++ b/drivers/gpu/drm/tegra/hdmi.c -@@ -59,7 +59,7 @@ struct tegra_hdmi { +@@ -60,7 +60,7 @@ struct tegra_hdmi { bool stereo; bool dvi; @@ -41461,10 +43306,10 @@ index 6866448..2ad2b34 100644 /* copy over all the bus versions */ if (dev->bus && dev->bus->pm) { diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c -index a5c7927..025a2b4 100644 +index 8ed66fd..38ff772 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c -@@ -2476,7 +2476,7 @@ EXPORT_SYMBOL_GPL(hid_ignore); +@@ -2488,7 +2488,7 @@ EXPORT_SYMBOL_GPL(hid_ignore); int hid_add_device(struct hid_device *hdev) { @@ -41473,7 +43318,7 @@ index a5c7927..025a2b4 100644 int ret; if (WARN_ON(hdev->status & HID_STAT_ADDED)) -@@ -2518,7 +2518,7 @@ int hid_add_device(struct hid_device *hdev) +@@ -2530,7 +2530,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, @@ -41482,6 +43327,51 @@ index a5c7927..025a2b4 100644 hid_debug_register(hdev, dev_name(&hdev->dev)); ret = device_add(&hdev->dev); +diff --git a/drivers/hid/hid-magicmouse.c b/drivers/hid/hid-magicmouse.c +index ecc2cbf..29a74c1 100644 +--- a/drivers/hid/hid-magicmouse.c ++++ b/drivers/hid/hid-magicmouse.c +@@ -290,6 +290,11 @@ static int magicmouse_raw_event(struct hid_device *hdev, + if (size < 4 || ((size - 4) % 9) != 0) + return 0; + npoints = (size - 4) / 9; ++ if (npoints > 15) { ++ hid_warn(hdev, "invalid size value (%d) for TRACKPAD_REPORT_ID\n", ++ size); ++ return 0; ++ } + msc->ntouches = 0; + for (ii = 0; ii < npoints; ii++) + magicmouse_emit_touch(msc, ii, data + ii * 9 + 4); +@@ -307,6 +312,11 @@ static int magicmouse_raw_event(struct hid_device *hdev, + if (size < 6 || ((size - 6) % 8) != 0) + return 0; + npoints = (size - 6) / 8; ++ if (npoints > 15) { ++ hid_warn(hdev, "invalid size value (%d) for MOUSE_REPORT_ID\n", ++ size); ++ return 0; ++ } + msc->ntouches = 0; + for (ii = 0; ii < npoints; ii++) + magicmouse_emit_touch(msc, ii, data + ii * 8 + 6); +diff --git a/drivers/hid/hid-picolcd_core.c b/drivers/hid/hid-picolcd_core.c +index acbb0210..020df3c 100644 +--- a/drivers/hid/hid-picolcd_core.c ++++ b/drivers/hid/hid-picolcd_core.c +@@ -350,6 +350,12 @@ static int picolcd_raw_event(struct hid_device *hdev, + if (!data) + return 1; + ++ if (size > 64) { ++ hid_warn(hdev, "invalid size value (%d) for picolcd raw event\n", ++ size); ++ return 0; ++ } ++ + if (report->id == REPORT_KEY_STATE) { + if (data->input_keys) + ret = picolcd_raw_keypad(data, report, raw_data+1, size-1); diff --git a/drivers/hid/hid-wiimote-debug.c b/drivers/hid/hid-wiimote-debug.c index c13fb5b..55a3802 100644 --- a/drivers/hid/hid-wiimote-debug.c @@ -41496,7 +43386,7 @@ index c13fb5b..55a3802 100644 *off += size; diff --git a/drivers/hid/uhid.c b/drivers/hid/uhid.c -index 0d078c3..cd0962c 100644 +index 0cb92e3..c7d453d 100644 --- a/drivers/hid/uhid.c +++ b/drivers/hid/uhid.c @@ -47,7 +47,7 @@ struct uhid_device { @@ -41517,7 +43407,7 @@ index 0d078c3..cd0962c 100644 ev->u.feature.rnum = rnum; ev->u.feature.rtype = report_type; -@@ -539,7 +539,7 @@ static int uhid_dev_feature_answer(struct uhid_device *uhid, +@@ -538,7 +538,7 @@ static int uhid_dev_feature_answer(struct uhid_device *uhid, spin_lock_irqsave(&uhid->qlock, flags); /* id for old report; drop it silently */ @@ -41527,7 +43417,7 @@ index 0d078c3..cd0962c 100644 if (atomic_read(&uhid->report_done)) goto unlock; diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c -index 602ca86..10a6573 100644 +index 284cf66..084c627 100644 --- a/drivers/hv/channel.c +++ b/drivers/hv/channel.c @@ -365,8 +365,8 @@ int vmbus_establish_gpadl(struct vmbus_channel *channel, void *kbuffer, @@ -41542,7 +43432,7 @@ index 602ca86..10a6573 100644 ret = create_gpadl_header(kbuffer, size, &msginfo, &msgcount); if (ret) diff --git a/drivers/hv/hv.c b/drivers/hv/hv.c -index bcb4950..61dba6c 100644 +index edfc848..d83e195 100644 --- a/drivers/hv/hv.c +++ b/drivers/hv/hv.c @@ -112,7 +112,7 @@ static u64 do_hypercall(u64 control, void *input, void *output) @@ -41649,10 +43539,10 @@ index 5e90c5d..d8fcefb 100644 cap_msg.caps.cap_bits.balloon = 1; cap_msg.caps.cap_bits.hot_add = 1; diff --git a/drivers/hv/hyperv_vmbus.h b/drivers/hv/hyperv_vmbus.h -index 860134d..ea3a79a 100644 +index 22b7507..fc2fc47 100644 --- a/drivers/hv/hyperv_vmbus.h +++ b/drivers/hv/hyperv_vmbus.h -@@ -602,7 +602,7 @@ enum vmbus_connect_state { +@@ -607,7 +607,7 @@ enum vmbus_connect_state { struct vmbus_connection { enum vmbus_connect_state conn_state; @@ -41662,7 +43552,7 @@ index 860134d..ea3a79a 100644 /* * Represents channel interrupts. Each bit position represents a diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c -index 8e53a3c..7a64e44 100644 +index 4d6b269..2e23b86 100644 --- a/drivers/hv/vmbus_drv.c +++ b/drivers/hv/vmbus_drv.c @@ -807,10 +807,10 @@ int vmbus_device_register(struct hv_device *child_device_obj) @@ -41768,7 +43658,7 @@ index 632f1dc..57e6a58 100644 /* Set up read-only sensors */ diff --git a/drivers/hwmon/iio_hwmon.c b/drivers/hwmon/iio_hwmon.c -index 9fbb1b1..efbaa3e 100644 +index 14c82da..09b25d7 100644 --- a/drivers/hwmon/iio_hwmon.c +++ b/drivers/hwmon/iio_hwmon.c @@ -61,7 +61,7 @@ static int iio_hwmon_probe(struct platform_device *pdev) @@ -41780,8 +43670,27 @@ index 9fbb1b1..efbaa3e 100644 int ret, i; int in_i = 1, temp_i = 1, curr_i = 1; enum iio_chan_type type; +diff --git a/drivers/hwmon/nct6683.c b/drivers/hwmon/nct6683.c +index 7710f46..427a28d 100644 +--- a/drivers/hwmon/nct6683.c ++++ b/drivers/hwmon/nct6683.c +@@ -397,11 +397,11 @@ static struct attribute_group * + nct6683_create_attr_group(struct device *dev, struct sensor_template_group *tg, + int repeat) + { +- struct sensor_device_attribute_2 *a2; +- struct sensor_device_attribute *a; ++ sensor_device_attribute_2_no_const *a2; ++ sensor_device_attribute_no_const *a; + struct sensor_device_template **t; + struct sensor_device_attr_u *su; +- struct attribute_group *group; ++ attribute_group_no_const *group; + struct attribute **attrs; + int i, j, count; + diff --git a/drivers/hwmon/nct6775.c b/drivers/hwmon/nct6775.c -index 38d5a63..cf2c2ea 100644 +index 59d9a3f..2298fa4 100644 --- a/drivers/hwmon/nct6775.c +++ b/drivers/hwmon/nct6775.c @@ -944,10 +944,10 @@ static struct attribute_group * @@ -41926,7 +43835,7 @@ index 41fc683..a39cfea 100644 /* Wrapper access functions for multiplexed SMBus */ static DEFINE_MUTEX(amd756_lock); diff --git a/drivers/i2c/busses/i2c-diolan-u2c.c b/drivers/i2c/busses/i2c-diolan-u2c.c -index 721f7eb..0fd2a09 100644 +index b19a310..d6eece0 100644 --- a/drivers/i2c/busses/i2c-diolan-u2c.c +++ b/drivers/i2c/busses/i2c-diolan-u2c.c @@ -98,7 +98,7 @@ MODULE_PARM_DESC(frequency, "I2C clock frequency in hertz"); @@ -41978,10 +43887,10 @@ index 0b510ba..4fbb5085 100644 } } diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c -index ede16aec..e423e8a 100644 +index 4b1f375..770b95f 100644 --- a/drivers/iio/industrialio-core.c +++ b/drivers/iio/industrialio-core.c -@@ -527,7 +527,7 @@ static ssize_t iio_write_channel_info(struct device *dev, +@@ -551,7 +551,7 @@ static ssize_t iio_write_channel_info(struct device *dev, } static @@ -42281,7 +44190,7 @@ index 1f95bba..9530f87 100644 sdata, wqe->wr.wr.atomic.swap); goto send_comp; diff --git a/drivers/infiniband/hw/mlx4/mad.c b/drivers/infiniband/hw/mlx4/mad.c -index fd36ec6..a6a082f 100644 +index 287ad05..5ae7b44d 100644 --- a/drivers/infiniband/hw/mlx4/mad.c +++ b/drivers/infiniband/hw/mlx4/mad.c @@ -98,7 +98,7 @@ __be64 mlx4_ib_gen_node_guid(void) @@ -42307,10 +44216,10 @@ index ed327e6..ca1739e0 100644 ctx->mcg_wq = create_singlethread_workqueue(name); if (!ctx->mcg_wq) diff --git a/drivers/infiniband/hw/mlx4/mlx4_ib.h b/drivers/infiniband/hw/mlx4/mlx4_ib.h -index 66b0b7d..f14836a 100644 +index 369da3c..223e6e9 100644 --- a/drivers/infiniband/hw/mlx4/mlx4_ib.h +++ b/drivers/infiniband/hw/mlx4/mlx4_ib.h -@@ -425,7 +425,7 @@ struct mlx4_ib_demux_ctx { +@@ -426,7 +426,7 @@ struct mlx4_ib_demux_ctx { struct list_head mcg_mgid0_list; struct workqueue_struct *mcg_wq; struct mlx4_ib_demux_pv_ctx **tun; @@ -42417,10 +44326,10 @@ index 415f8e1..e34214e 100644 struct mthca_dev *dev = to_mdev(ibcq->device); struct mthca_cq *cq = to_mcq(ibcq); diff --git a/drivers/infiniband/hw/nes/nes.c b/drivers/infiniband/hw/nes/nes.c -index 353c7b0..c6ce921 100644 +index 3b2a6dc..bce26ff 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"); +@@ -97,7 +97,7 @@ MODULE_PARM_DESC(limit_maxrdreqsz, "Limit max read request size to 256 Bytes"); LIST_HEAD(nes_adapter_list); static LIST_HEAD(nes_dev_list); @@ -42429,7 +44338,7 @@ index 353c7b0..c6ce921 100644 static unsigned int ee_flsh_adapter; static unsigned int sysfs_nonidx_addr; -@@ -269,7 +269,7 @@ static void nes_cqp_rem_ref_callback(struct nes_device *nesdev, struct nes_cqp_r +@@ -278,7 +278,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; @@ -42439,10 +44348,10 @@ index 353c7b0..c6ce921 100644 /* Free the control structures */ diff --git a/drivers/infiniband/hw/nes/nes.h b/drivers/infiniband/hw/nes/nes.h -index 33cc589..3bd6538 100644 +index bd9d132..70d84f4 100644 --- a/drivers/infiniband/hw/nes/nes.h +++ b/drivers/infiniband/hw/nes/nes.h -@@ -177,17 +177,17 @@ extern unsigned int nes_debug_level; +@@ -180,17 +180,17 @@ extern unsigned int nes_debug_level; extern unsigned int wqm_quanta; extern struct list_head nes_adapter_list; @@ -42471,7 +44380,7 @@ index 33cc589..3bd6538 100644 extern u32 mh_detected; extern u32 mh_pauses_sent; extern u32 cm_packets_sent; -@@ -196,16 +196,16 @@ extern u32 cm_packets_created; +@@ -199,16 +199,16 @@ extern u32 cm_packets_created; extern u32 cm_packets_received; extern u32 cm_packets_dropped; extern u32 cm_packets_retrans; @@ -42498,10 +44407,10 @@ 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 dfa9df4..6bf7221 100644 +index 6f09a72..cf4399d 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; +@@ -69,14 +69,14 @@ u32 cm_packets_dropped; u32 cm_packets_retrans; u32 cm_packets_created; u32 cm_packets_received; @@ -42523,7 +44432,7 @@ index dfa9df4..6bf7221 100644 static inline int mini_cm_accelerated(struct nes_cm_core *, struct nes_cm_node *); static struct nes_cm_listener *mini_cm_listen(struct nes_cm_core *, struct nes_vnic *, struct nes_cm_info *); -@@ -134,28 +134,28 @@ static void record_ird_ord(struct nes_cm_node *, u16, u16); +@@ -135,28 +135,28 @@ static void record_ird_ord(struct nes_cm_node *, u16, u16); /* instance of function pointers for client API */ /* set address of this instance to cm_core->cm_ops at cm_core alloc */ static struct nes_cm_ops nes_cm_api = { @@ -42570,7 +44479,7 @@ index dfa9df4..6bf7221 100644 int nes_add_ref_cm_node(struct nes_cm_node *cm_node) { -@@ -1319,7 +1319,7 @@ static int mini_cm_dec_refcnt_listen(struct nes_cm_core *cm_core, +@@ -1436,7 +1436,7 @@ static int mini_cm_dec_refcnt_listen(struct nes_cm_core *cm_core, kfree(listener); listener = NULL; ret = 0; @@ -42579,7 +44488,7 @@ index dfa9df4..6bf7221 100644 } else { spin_unlock_irqrestore(&cm_core->listen_list_lock, flags); } -@@ -1513,7 +1513,7 @@ static struct nes_cm_node *make_cm_node(struct nes_cm_core *cm_core, +@@ -1637,7 +1637,7 @@ static struct nes_cm_node *make_cm_node(struct nes_cm_core *cm_core, cm_node->rem_mac); add_hte_node(cm_core, cm_node); @@ -42588,7 +44497,7 @@ index dfa9df4..6bf7221 100644 return cm_node; } -@@ -1571,7 +1571,7 @@ static int rem_ref_cm_node(struct nes_cm_core *cm_core, +@@ -1698,7 +1698,7 @@ static int rem_ref_cm_node(struct nes_cm_core *cm_core, } atomic_dec(&cm_core->node_cnt); @@ -42597,7 +44506,7 @@ index dfa9df4..6bf7221 100644 nesqp = cm_node->nesqp; if (nesqp) { nesqp->cm_node = NULL; -@@ -1635,7 +1635,7 @@ static int process_options(struct nes_cm_node *cm_node, u8 *optionsloc, +@@ -1762,7 +1762,7 @@ static int process_options(struct nes_cm_node *cm_node, u8 *optionsloc, static void drop_packet(struct sk_buff *skb) { @@ -42606,7 +44515,7 @@ index dfa9df4..6bf7221 100644 dev_kfree_skb_any(skb); } -@@ -1698,7 +1698,7 @@ static void handle_rst_pkt(struct nes_cm_node *cm_node, struct sk_buff *skb, +@@ -1825,7 +1825,7 @@ static void handle_rst_pkt(struct nes_cm_node *cm_node, struct sk_buff *skb, { int reset = 0; /* whether to send reset in case of err.. */ @@ -42615,7 +44524,7 @@ index dfa9df4..6bf7221 100644 nes_debug(NES_DBG_CM, "Received Reset, cm_node = %p, state = %u." " refcnt=%d\n", cm_node, cm_node->state, atomic_read(&cm_node->ref_count)); -@@ -2339,7 +2339,7 @@ static struct nes_cm_node *mini_cm_connect(struct nes_cm_core *cm_core, +@@ -2492,7 +2492,7 @@ static struct nes_cm_node *mini_cm_connect(struct nes_cm_core *cm_core, rem_ref_cm_node(cm_node->cm_core, cm_node); return NULL; } @@ -42624,7 +44533,7 @@ index dfa9df4..6bf7221 100644 loopbackremotenode->loopbackpartner = cm_node; loopbackremotenode->tcp_cntxt.rcv_wscale = NES_CM_DEFAULT_RCV_WND_SCALE; -@@ -2614,7 +2614,7 @@ static int mini_cm_recv_pkt(struct nes_cm_core *cm_core, +@@ -2773,7 +2773,7 @@ static int mini_cm_recv_pkt(struct nes_cm_core *cm_core, nes_queue_mgt_skbs(skb, nesvnic, cm_node->nesqp); else { rem_ref_cm_node(cm_core, cm_node); @@ -42633,7 +44542,7 @@ index dfa9df4..6bf7221 100644 dev_kfree_skb_any(skb); } break; -@@ -2922,7 +2922,7 @@ static int nes_cm_disconn_true(struct nes_qp *nesqp) +@@ -3081,7 +3081,7 @@ static int nes_cm_disconn_true(struct nes_qp *nesqp) if ((cm_id) && (cm_id->event_handler)) { if (issue_disconn) { @@ -42642,7 +44551,7 @@ index dfa9df4..6bf7221 100644 cm_event.event = IW_CM_EVENT_DISCONNECT; cm_event.status = disconn_status; cm_event.local_addr = cm_id->local_addr; -@@ -2944,7 +2944,7 @@ static int nes_cm_disconn_true(struct nes_qp *nesqp) +@@ -3103,7 +3103,7 @@ static int nes_cm_disconn_true(struct nes_qp *nesqp) } if (issue_close) { @@ -42651,7 +44560,7 @@ index dfa9df4..6bf7221 100644 nes_disconnect(nesqp, 1); cm_id->provider_data = nesqp; -@@ -3082,7 +3082,7 @@ int nes_accept(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param) +@@ -3241,7 +3241,7 @@ int nes_accept(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param) nes_debug(NES_DBG_CM, "QP%u, cm_node=%p, jiffies = %lu listener = %p\n", nesqp->hwqp.qp_id, cm_node, jiffies, cm_node->listener); @@ -42660,7 +44569,7 @@ index dfa9df4..6bf7221 100644 nes_debug(NES_DBG_CM, "netdev refcnt = %u.\n", netdev_refcnt_read(nesvnic->netdev)); -@@ -3278,7 +3278,7 @@ int nes_reject(struct iw_cm_id *cm_id, const void *pdata, u8 pdata_len) +@@ -3439,7 +3439,7 @@ int nes_reject(struct iw_cm_id *cm_id, const void *pdata, u8 pdata_len) struct nes_cm_core *cm_core; u8 *start_buff; @@ -42669,7 +44578,7 @@ index dfa9df4..6bf7221 100644 cm_node = (struct nes_cm_node *)cm_id->provider_data; loopback = cm_node->loopbackpartner; cm_core = cm_node->cm_core; -@@ -3340,7 +3340,7 @@ int nes_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param) +@@ -3504,7 +3504,7 @@ int nes_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param) ntohs(raddr->sin_port), ntohl(laddr->sin_addr.s_addr), ntohs(laddr->sin_port)); @@ -42678,7 +44587,7 @@ index dfa9df4..6bf7221 100644 nesqp->active_conn = 1; /* cache the cm_id in the qp */ -@@ -3451,7 +3451,7 @@ int nes_create_listen(struct iw_cm_id *cm_id, int backlog) +@@ -3649,7 +3649,7 @@ int nes_create_listen(struct iw_cm_id *cm_id, int backlog) g_cm_core->api->stop_listener(g_cm_core, (void *)cm_node); return err; } @@ -42687,7 +44596,7 @@ index dfa9df4..6bf7221 100644 } cm_id->add_ref(cm_id); -@@ -3558,7 +3558,7 @@ static void cm_event_connected(struct nes_cm_event *event) +@@ -3756,7 +3756,7 @@ static void cm_event_connected(struct nes_cm_event *event) if (nesqp->destroyed) return; @@ -42696,7 +44605,7 @@ index dfa9df4..6bf7221 100644 nes_debug(NES_DBG_CM, "QP%u attempting to connect to 0x%08X:0x%04X on" " local port 0x%04X. jiffies = %lu.\n", nesqp->hwqp.qp_id, ntohl(raddr->sin_addr.s_addr), -@@ -3741,7 +3741,7 @@ static void cm_event_reset(struct nes_cm_event *event) +@@ -3941,7 +3941,7 @@ static void cm_event_reset(struct nes_cm_event *event) cm_id->add_ref(cm_id); ret = cm_id->event_handler(cm_id, &cm_event); @@ -42705,7 +44614,7 @@ index dfa9df4..6bf7221 100644 cm_event.event = IW_CM_EVENT_CLOSE; cm_event.status = 0; cm_event.provider_data = cm_id->provider_data; -@@ -3781,7 +3781,7 @@ static void cm_event_mpa_req(struct nes_cm_event *event) +@@ -3981,7 +3981,7 @@ static void cm_event_mpa_req(struct nes_cm_event *event) return; cm_id = cm_node->cm_id; @@ -42714,7 +44623,7 @@ index dfa9df4..6bf7221 100644 nes_debug(NES_DBG_CM, "cm_node = %p - cm_id = %p, jiffies = %lu\n", cm_node, cm_id, jiffies); -@@ -3830,7 +3830,7 @@ static void cm_event_mpa_reject(struct nes_cm_event *event) +@@ -4030,7 +4030,7 @@ static void cm_event_mpa_reject(struct nes_cm_event *event) return; cm_id = cm_node->cm_id; @@ -42889,10 +44798,10 @@ index 24c41ba..102d71f 100644 gameport->dev.release = gameport_release_port; if (gameport->parent) diff --git a/drivers/input/input.c b/drivers/input/input.c -index 1c4c0db..6f7abe3 100644 +index 29ca0bb..f4bc2e3 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c -@@ -1772,7 +1772,7 @@ EXPORT_SYMBOL_GPL(input_class); +@@ -1774,7 +1774,7 @@ EXPORT_SYMBOL_GPL(input_class); */ struct input_dev *input_allocate_device(void) { @@ -42901,7 +44810,7 @@ index 1c4c0db..6f7abe3 100644 struct input_dev *dev; dev = kzalloc(sizeof(struct input_dev), GFP_KERNEL); -@@ -1787,7 +1787,7 @@ struct input_dev *input_allocate_device(void) +@@ -1789,7 +1789,7 @@ struct input_dev *input_allocate_device(void) INIT_LIST_HEAD(&dev->node); dev_set_name(&dev->dev, "input%ld", @@ -42945,10 +44854,10 @@ index 603fe0d..f63decc 100644 snprintf(led->name, sizeof(led->name), "xpad%ld", led_no); led->xpad = xpad; diff --git a/drivers/input/misc/ims-pcu.c b/drivers/input/misc/ims-pcu.c -index 5a73639..d586683 100644 +index 719410f..1896169 100644 --- a/drivers/input/misc/ims-pcu.c +++ b/drivers/input/misc/ims-pcu.c -@@ -1850,7 +1850,7 @@ static int ims_pcu_identify_type(struct ims_pcu *pcu, u8 *device_id) +@@ -1851,7 +1851,7 @@ static int ims_pcu_identify_type(struct ims_pcu *pcu, u8 *device_id) static int ims_pcu_init_application_mode(struct ims_pcu *pcu) { @@ -42957,7 +44866,7 @@ index 5a73639..d586683 100644 const struct ims_pcu_device_info *info; int error; -@@ -1881,7 +1881,7 @@ static int ims_pcu_init_application_mode(struct ims_pcu *pcu) +@@ -1882,7 +1882,7 @@ static int ims_pcu_init_application_mode(struct ims_pcu *pcu) } /* Device appears to be operable, complete initialization */ @@ -43050,10 +44959,10 @@ index e5555fc..937986d 100644 /** diff --git a/drivers/iommu/irq_remapping.c b/drivers/iommu/irq_remapping.c -index 228632c9..edfe331 100644 +index 33c4395..e06447e 100644 --- a/drivers/iommu/irq_remapping.c +++ b/drivers/iommu/irq_remapping.c -@@ -356,7 +356,7 @@ int setup_hpet_msi_remapped(unsigned int irq, unsigned int id) +@@ -354,7 +354,7 @@ int setup_hpet_msi_remapped(unsigned int irq, unsigned int id) void panic_if_irq_remap(const char *msg) { if (irq_remapping_enabled) @@ -43062,7 +44971,7 @@ index 228632c9..edfe331 100644 } static void ir_ack_apic_edge(struct irq_data *data) -@@ -377,10 +377,12 @@ static void ir_print_prefix(struct irq_data *data, struct seq_file *p) +@@ -375,10 +375,12 @@ static void ir_print_prefix(struct irq_data *data, struct seq_file *p) void irq_remap_modify_chip_defaults(struct irq_chip *chip) { @@ -43080,10 +44989,10 @@ index 228632c9..edfe331 100644 bool setup_remapped_irq(int irq, struct irq_cfg *cfg, struct irq_chip *chip) diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c -index 57d165e..611997e 100644 +index 7c131cf..035129b 100644 --- a/drivers/irqchip/irq-gic.c +++ b/drivers/irqchip/irq-gic.c -@@ -84,7 +84,7 @@ static u8 gic_cpu_map[NR_GIC_CPU_IF] __read_mostly; +@@ -85,7 +85,7 @@ static u8 gic_cpu_map[NR_GIC_CPU_IF] __read_mostly; * Supported arch specific GIC irq extension. * Default make them NULL. */ @@ -43092,7 +45001,7 @@ index 57d165e..611997e 100644 .irq_eoi = NULL, .irq_mask = NULL, .irq_unmask = NULL, -@@ -336,7 +336,7 @@ static void gic_handle_cascade_irq(unsigned int irq, struct irq_desc *desc) +@@ -337,7 +337,7 @@ static void gic_handle_cascade_irq(unsigned int irq, struct irq_desc *desc) chained_irq_exit(chip, desc); } @@ -43115,7 +45024,7 @@ index 8777065..a4a9967 100644 int ret; int k; diff --git a/drivers/isdn/capi/capi.c b/drivers/isdn/capi/capi.c -index ac6f72b..81150f2 100644 +index f9a87ed..3fdd854 100644 --- a/drivers/isdn/capi/capi.c +++ b/drivers/isdn/capi/capi.c @@ -81,8 +81,8 @@ struct capiminor { @@ -43156,10 +45065,10 @@ index ac6f72b..81150f2 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/bas-gigaset.c b/drivers/isdn/gigaset/bas-gigaset.c -index c44950d..10ac276 100644 +index b7ae0a0..04590fa 100644 --- a/drivers/isdn/gigaset/bas-gigaset.c +++ b/drivers/isdn/gigaset/bas-gigaset.c -@@ -2564,22 +2564,22 @@ static int gigaset_post_reset(struct usb_interface *intf) +@@ -2565,22 +2565,22 @@ static int gigaset_post_reset(struct usb_interface *intf) static const struct gigaset_ops gigops = { @@ -43373,6 +45282,162 @@ index 91d5730..336523e 100644 }; /* The following should better go into a dedicated source file such that +diff --git a/drivers/isdn/i4l/isdn_ppp.c b/drivers/isdn/i4l/isdn_ppp.c +index 62f0688..38ceac5 100644 +--- a/drivers/isdn/i4l/isdn_ppp.c ++++ b/drivers/isdn/i4l/isdn_ppp.c +@@ -378,15 +378,10 @@ isdn_ppp_release(int min, struct file *file) + is->slcomp = NULL; + #endif + #ifdef CONFIG_IPPP_FILTER +- if (is->pass_filter) { +- sk_unattached_filter_destroy(is->pass_filter); +- is->pass_filter = NULL; +- } +- +- if (is->active_filter) { +- sk_unattached_filter_destroy(is->active_filter); +- is->active_filter = NULL; +- } ++ kfree(is->pass_filter); ++ is->pass_filter = NULL; ++ kfree(is->active_filter); ++ is->active_filter = NULL; + #endif + + /* TODO: if this was the previous master: link the stuff to the new master */ +@@ -442,7 +437,7 @@ static int get_filter(void __user *arg, struct sock_filter **p) + { + struct sock_fprog uprog; + struct sock_filter *code = NULL; +- int len; ++ int len, err; + + if (copy_from_user(&uprog, arg, sizeof(uprog))) + return -EFAULT; +@@ -458,6 +453,12 @@ static int get_filter(void __user *arg, struct sock_filter **p) + if (IS_ERR(code)) + return PTR_ERR(code); + ++ err = sk_chk_filter(code, uprog.len); ++ if (err) { ++ kfree(code); ++ return err; ++ } ++ + *p = code; + return uprog.len; + } +@@ -628,53 +629,25 @@ isdn_ppp_ioctl(int min, struct file *file, unsigned int cmd, unsigned long arg) + #ifdef CONFIG_IPPP_FILTER + case PPPIOCSPASS: + { +- struct sock_fprog_kern fprog; + struct sock_filter *code; +- int err, len = get_filter(argp, &code); +- ++ int len = get_filter(argp, &code); + if (len < 0) + return len; +- +- fprog.len = len; +- fprog.filter = code; +- +- if (is->pass_filter) { +- sk_unattached_filter_destroy(is->pass_filter); +- is->pass_filter = NULL; +- } +- if (fprog.filter != NULL) +- err = sk_unattached_filter_create(&is->pass_filter, +- &fprog); +- else +- err = 0; +- kfree(code); +- +- return err; ++ kfree(is->pass_filter); ++ is->pass_filter = code; ++ is->pass_len = len; ++ break; + } + case PPPIOCSACTIVE: + { +- struct sock_fprog_kern fprog; + struct sock_filter *code; +- int err, len = get_filter(argp, &code); +- ++ int len = get_filter(argp, &code); + if (len < 0) + return len; +- +- fprog.len = len; +- fprog.filter = code; +- +- if (is->active_filter) { +- sk_unattached_filter_destroy(is->active_filter); +- is->active_filter = NULL; +- } +- if (fprog.filter != NULL) +- err = sk_unattached_filter_create(&is->active_filter, +- &fprog); +- else +- err = 0; +- kfree(code); +- +- return err; ++ kfree(is->active_filter); ++ is->active_filter = code; ++ is->active_len = len; ++ break; + } + #endif /* CONFIG_IPPP_FILTER */ + default: +@@ -1174,14 +1147,14 @@ isdn_ppp_push_higher(isdn_net_dev *net_dev, isdn_net_local *lp, struct sk_buff * + } + + if (is->pass_filter +- && SK_RUN_FILTER(is->pass_filter, skb) == 0) { ++ && sk_run_filter(skb, is->pass_filter) == 0) { + if (is->debug & 0x2) + printk(KERN_DEBUG "IPPP: inbound frame filtered.\n"); + kfree_skb(skb); + return; + } + if (!(is->active_filter +- && SK_RUN_FILTER(is->active_filter, skb) == 0)) { ++ && sk_run_filter(skb, is->active_filter) == 0)) { + if (is->debug & 0x2) + printk(KERN_DEBUG "IPPP: link-active filter: resetting huptimer.\n"); + lp->huptimer = 0; +@@ -1320,14 +1293,14 @@ isdn_ppp_xmit(struct sk_buff *skb, struct net_device *netdev) + } + + if (ipt->pass_filter +- && SK_RUN_FILTER(ipt->pass_filter, skb) == 0) { ++ && sk_run_filter(skb, ipt->pass_filter) == 0) { + if (ipt->debug & 0x4) + printk(KERN_DEBUG "IPPP: outbound frame filtered.\n"); + kfree_skb(skb); + goto unlock; + } + if (!(ipt->active_filter +- && SK_RUN_FILTER(ipt->active_filter, skb) == 0)) { ++ && sk_run_filter(skb, ipt->active_filter) == 0)) { + if (ipt->debug & 0x4) + printk(KERN_DEBUG "IPPP: link-active filter: resetting huptimer.\n"); + lp->huptimer = 0; +@@ -1517,9 +1490,9 @@ int isdn_ppp_autodial_filter(struct sk_buff *skb, isdn_net_local *lp) + } + + drop |= is->pass_filter +- && SK_RUN_FILTER(is->pass_filter, skb) == 0; ++ && sk_run_filter(skb, is->pass_filter) == 0; + drop |= is->active_filter +- && SK_RUN_FILTER(is->active_filter, skb) == 0; ++ && sk_run_filter(skb, is->active_filter) == 0; + + skb_push(skb, IPPP_MAX_HEADER - 4); + return drop; diff --git a/drivers/isdn/i4l/isdn_tty.c b/drivers/isdn/i4l/isdn_tty.c index 3c5f249..5fac4d0 100644 --- a/drivers/isdn/i4l/isdn_tty.c @@ -43669,7 +45734,7 @@ index 40634b0..4f5855e 100644 // Every interrupt can come to us here // But we must truly tell each apart. diff --git a/drivers/md/bcache/closure.h b/drivers/md/bcache/closure.h -index 7ef7461..5a09dac 100644 +index a08e3ee..df8ade2 100644 --- a/drivers/md/bcache/closure.h +++ b/drivers/md/bcache/closure.h @@ -238,7 +238,7 @@ static inline void closure_set_stopped(struct closure *cl) @@ -43682,10 +45747,10 @@ index 7ef7461..5a09dac 100644 cl->fn = fn; cl->wq = wq; diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c -index 9a8e66a..10cc762 100644 +index 67f8b31..9418f2b 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) +@@ -1775,7 +1775,7 @@ void bitmap_status(struct seq_file *seq, struct bitmap *bitmap) chunk_kb ? "KB" : "B"); if (bitmap->storage.file) { seq_printf(seq, ", file: "); @@ -43850,7 +45915,7 @@ index d1600d2..4c3af3a 100644 schedule_work(&sc->trigger_event); } diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c -index 50601ec..6d3b9dc 100644 +index 5f59f1e..01bd02e 100644 --- a/drivers/md/dm-table.c +++ b/drivers/md/dm-table.c @@ -274,7 +274,7 @@ static struct dm_dev_internal *find_device(struct list_head *l, dev_t dev) @@ -43872,7 +45937,7 @@ index 50601ec..6d3b9dc 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 b086a94..74cb67e 100644 +index e9d33ad..dae9880d 100644 --- a/drivers/md/dm-thin-metadata.c +++ b/drivers/md/dm-thin-metadata.c @@ -404,7 +404,7 @@ static void __setup_btree_details(struct dm_pool_metadata *pmd) @@ -43894,7 +45959,7 @@ index b086a94..74cb67e 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 490ac23..b9790cd 100644 +index 32b958d..34011e8 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c @@ -180,9 +180,9 @@ struct mapped_device { @@ -43909,7 +45974,7 @@ index 490ac23..b9790cd 100644 struct list_head uevent_list; spinlock_t uevent_lock; /* Protect access to uevent_list */ -@@ -1895,8 +1895,8 @@ static struct mapped_device *alloc_dev(int minor) +@@ -1952,8 +1952,8 @@ static struct mapped_device *alloc_dev(int minor) spin_lock_init(&md->deferred_lock); atomic_set(&md->holders, 1); atomic_set(&md->open_count, 0); @@ -43920,7 +45985,7 @@ index 490ac23..b9790cd 100644 INIT_LIST_HEAD(&md->uevent_list); spin_lock_init(&md->uevent_lock); -@@ -2050,7 +2050,7 @@ static void event_callback(void *context) +@@ -2107,7 +2107,7 @@ static void event_callback(void *context) dm_send_uevents(&uevents, &disk_to_dev(md->disk)->kobj); @@ -43929,7 +45994,7 @@ index 490ac23..b9790cd 100644 wake_up(&md->eventq); } -@@ -2743,18 +2743,18 @@ int dm_kobject_uevent(struct mapped_device *md, enum kobject_action action, +@@ -2800,18 +2800,18 @@ int dm_kobject_uevent(struct mapped_device *md, enum kobject_action action, uint32_t dm_next_uevent_seq(struct mapped_device *md) { @@ -43952,7 +46017,7 @@ index 490ac23..b9790cd 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 9a18209..ec4d3ec 100644 +index 32fc19c..cb6eba3 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -194,10 +194,10 @@ EXPORT_SYMBOL_GPL(bio_clone_mddev); @@ -44024,7 +46089,7 @@ index 9a18209..ec4d3ec 100644 INIT_LIST_HEAD(&rdev->same_set); init_waitqueue_head(&rdev->blocked_wait); -@@ -7058,7 +7058,7 @@ static int md_seq_show(struct seq_file *seq, void *v) +@@ -7068,7 +7068,7 @@ static int md_seq_show(struct seq_file *seq, void *v) spin_unlock(&pers_lock); seq_printf(seq, "\n"); @@ -44033,7 +46098,7 @@ index 9a18209..ec4d3ec 100644 return 0; } if (v == (void*)2) { -@@ -7161,7 +7161,7 @@ static int md_seq_open(struct inode *inode, struct file *file) +@@ -7171,7 +7171,7 @@ static int md_seq_open(struct inode *inode, struct file *file) return error; seq = file->private_data; @@ -44042,7 +46107,7 @@ index 9a18209..ec4d3ec 100644 return error; } -@@ -7178,7 +7178,7 @@ static unsigned int mdstat_poll(struct file *filp, poll_table *wait) +@@ -7188,7 +7188,7 @@ static unsigned int mdstat_poll(struct file *filp, poll_table *wait) /* always allow read */ mask = POLLIN | POLLRDNORM; @@ -44051,7 +46116,7 @@ index 9a18209..ec4d3ec 100644 mask |= POLLERR | POLLPRI; return mask; } -@@ -7222,7 +7222,7 @@ static int is_mddev_idle(struct mddev *mddev, int init) +@@ -7232,7 +7232,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]) - @@ -44146,7 +46211,7 @@ index 56e24c0..e1c8e1f 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 cb882aa..9bd076e 100644 +index cb882aa..cb8aeca 100644 --- a/drivers/md/raid10.c +++ b/drivers/md/raid10.c @@ -1949,7 +1949,7 @@ static void end_sync_read(struct bio *bio, int error) @@ -44208,11 +46273,28 @@ index cb882aa..9bd076e 100644 } rdev_dec_pending(rdev, mddev); +@@ -2954,6 +2954,7 @@ static sector_t sync_request(struct mddev *mddev, sector_t sector_nr, + */ + if (test_bit(MD_RECOVERY_RESHAPE, &mddev->recovery)) { + end_reshape(conf); ++ close_sync(conf); + return 0; + } + +@@ -4411,7 +4412,7 @@ read_more: + read_bio->bi_private = r10_bio; + read_bio->bi_end_io = end_sync_read; + read_bio->bi_rw = READ; +- read_bio->bi_flags &= ~(BIO_POOL_MASK - 1); ++ read_bio->bi_flags &= (~0UL << BIO_RESET_BITS); + read_bio->bi_flags |= 1 << BIO_UPTODATE; + read_bio->bi_vcnt = 0; + read_bio->bi_iter.bi_size = 0; diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c -index ad1b9be..b417412 100644 +index 6234b2e..4990801 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c -@@ -1702,6 +1702,10 @@ static int grow_one_stripe(struct r5conf *conf, int hash) +@@ -1731,6 +1731,10 @@ static int grow_one_stripe(struct r5conf *conf, int hash) return 1; } @@ -44223,7 +46305,7 @@ index ad1b9be..b417412 100644 static int grow_stripes(struct r5conf *conf, int num) { struct kmem_cache *sc; -@@ -1713,7 +1717,11 @@ static int grow_stripes(struct r5conf *conf, int num) +@@ -1742,7 +1746,11 @@ static int grow_stripes(struct r5conf *conf, int num) "raid%d-%s", conf->level, mdname(conf->mddev)); else sprintf(conf->cache_name[0], @@ -44235,7 +46317,7 @@ index ad1b9be..b417412 100644 sprintf(conf->cache_name[1], "%s-alt", conf->cache_name[0]); conf->active_name = 0; -@@ -1986,21 +1994,21 @@ static void raid5_end_read_request(struct bio * bi, int error) +@@ -2018,21 +2026,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)); @@ -44261,7 +46343,7 @@ index ad1b9be..b417412 100644 if (test_bit(R5_ReadRepl, &sh->dev[i].flags)) printk_ratelimited( KERN_WARNING -@@ -2028,7 +2036,7 @@ static void raid5_end_read_request(struct bio * bi, int error) +@@ -2060,7 +2068,7 @@ static void raid5_end_read_request(struct bio * bi, int error) mdname(conf->mddev), (unsigned long long)s, bdn); @@ -44270,6 +46352,15 @@ index ad1b9be..b417412 100644 > conf->max_nr_stripes) printk(KERN_WARNING "md/raid:%s: Too many read errors, failing device %s.\n", +@@ -3817,6 +3825,8 @@ static void handle_stripe(struct stripe_head *sh) + set_bit(R5_Wantwrite, &dev->flags); + if (prexor) + continue; ++ if (s.failed > 1) ++ continue; + if (!test_bit(R5_Insync, &dev->flags) || + ((i == sh->pd_idx || i == sh->qd_idx) && + s.failed == 0)) diff --git a/drivers/media/dvb-core/dvbdev.c b/drivers/media/dvb-core/dvbdev.c index 983db75..ef9248c 100644 --- a/drivers/media/dvb-core/dvbdev.c @@ -44415,7 +46506,7 @@ index b713403..53cb5ad 100644 if (done && done != layer->shadow_buf) vb2_buffer_done(&done->vb, VB2_BUF_STATE_DONE); diff --git a/drivers/media/platform/s5p-tv/mixer_video.c b/drivers/media/platform/s5p-tv/mixer_video.c -index a1ce55f..4a3c4d9 100644 +index 8a8dbc8..b74c62d 100644 --- a/drivers/media/platform/s5p-tv/mixer_video.c +++ b/drivers/media/platform/s5p-tv/mixer_video.c @@ -210,7 +210,7 @@ static void mxr_layer_default_geo(struct mxr_layer *layer) @@ -44469,7 +46560,7 @@ index a1ce55f..4a3c4d9 100644 /* retrieve update selection rectangle */ res.left = target->x_offset; -@@ -950,13 +950,13 @@ static int start_streaming(struct vb2_queue *vq, unsigned int count) +@@ -954,13 +954,13 @@ static int start_streaming(struct vb2_queue *vq, unsigned int count) mxr_output_get(mdev); mxr_layer_update_output(layer); @@ -44485,7 +46576,7 @@ index a1ce55f..4a3c4d9 100644 mxr_streamer_get(mdev); return 0; -@@ -1026,7 +1026,7 @@ static int stop_streaming(struct vb2_queue *vq) +@@ -1030,7 +1030,7 @@ static void stop_streaming(struct vb2_queue *vq) spin_unlock_irqrestore(&layer->enq_slock, flags); /* disabling layer in hardware */ @@ -44494,7 +46585,7 @@ index a1ce55f..4a3c4d9 100644 /* remove one streamer */ mxr_streamer_put(mdev); /* allow changes in output configuration */ -@@ -1065,8 +1065,8 @@ void mxr_base_layer_unregister(struct mxr_layer *layer) +@@ -1068,8 +1068,8 @@ void mxr_base_layer_unregister(struct mxr_layer *layer) void mxr_layer_release(struct mxr_layer *layer) { @@ -44505,7 +46596,7 @@ index a1ce55f..4a3c4d9 100644 } void mxr_base_layer_release(struct mxr_layer *layer) -@@ -1092,7 +1092,7 @@ struct mxr_layer *mxr_base_layer_create(struct mxr_device *mdev, +@@ -1095,7 +1095,7 @@ struct mxr_layer *mxr_base_layer_create(struct mxr_device *mdev, layer->mdev = mdev; layer->idx = idx; @@ -44528,7 +46619,7 @@ index c9388c4..ce71ece 100644 .buffer_set = mxr_vp_buffer_set, .stream_set = mxr_vp_stream_set, diff --git a/drivers/media/platform/vivi.c b/drivers/media/platform/vivi.c -index 3890f4f..b5c7511 100644 +index d00bf3d..1301a0c 100644 --- a/drivers/media/platform/vivi.c +++ b/drivers/media/platform/vivi.c @@ -58,8 +58,8 @@ MODULE_AUTHOR("Mauro Carvalho Chehab, Ted Walther and John Sokol"); @@ -44719,7 +46810,7 @@ index ae0f56a..ec71784 100644 /* debug */ static int dvb_usb_dw2102_debug; diff --git a/drivers/media/usb/dvb-usb/technisat-usb2.c b/drivers/media/usb/dvb-usb/technisat-usb2.c -index 98d24ae..bc22415 100644 +index d947e03..87fef42 100644 --- a/drivers/media/usb/dvb-usb/technisat-usb2.c +++ b/drivers/media/usb/dvb-usb/technisat-usb2.c @@ -87,8 +87,11 @@ struct technisat_usb2_state { @@ -44793,13 +46884,13 @@ index 98d24ae..bc22415 100644 + if (led == NULL) + return -ENOMEM; - if (disable_led_control && state != LED_OFF) + if (disable_led_control && state != TECH_LED_OFF) return 0; + led[0] = red ? SET_RED_LED_VENDOR_REQUEST : SET_GREEN_LED_VENDOR_REQUEST; + switch (state) { - case LED_ON: + case TECH_LED_ON: led[1] = 0x82; @@ -263,16 +274,22 @@ static int technisat_usb2_set_led(struct dvb_usb_device *d, int red, enum techni red ? SET_RED_LED_VENDOR_REQUEST : SET_GREEN_LED_VENDOR_REQUEST, @@ -45016,7 +47107,7 @@ index 55c6832..a91c7a6 100644 if ((len - ctrl->minimum) % ctrl->step) return -ERANGE; diff --git a/drivers/media/v4l2-core/v4l2-device.c b/drivers/media/v4l2-core/v4l2-device.c -index 02d1b63..5fd6b16 100644 +index 015f92a..59e311e 100644 --- a/drivers/media/v4l2-core/v4l2-device.c +++ b/drivers/media/v4l2-core/v4l2-device.c @@ -75,9 +75,9 @@ int v4l2_device_put(struct v4l2_device *v4l2_dev) @@ -45032,7 +47123,7 @@ index 02d1b63..5fd6b16 100644 if (basename[len - 1] >= '0' && basename[len - 1] <= '9') diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c -index d9113cc..7de6ccc 100644 +index 16bffd8..3ab516a 100644 --- a/drivers/media/v4l2-core/v4l2-ioctl.c +++ b/drivers/media/v4l2-core/v4l2-ioctl.c @@ -2003,7 +2003,8 @@ struct v4l2_ioctl_info { @@ -45054,44 +47145,44 @@ index d9113cc..7de6ccc 100644 const struct v4l2_ioctl_info *info; void *fh = file->private_data; struct v4l2_fh *vfh = NULL; -@@ -2260,7 +2261,7 @@ done: - } - - static int check_array_args(unsigned int cmd, void *parg, size_t *array_size, -- void * __user *user_ptr, void ***kernel_ptr) -+ void __user **user_ptr, void ***kernel_ptr) - { - int ret = 0; - @@ -2276,7 +2277,7 @@ static int check_array_args(unsigned int cmd, void *parg, size_t *array_size, ret = -EINVAL; break; } - *user_ptr = (void __user *)buf->m.planes; + *user_ptr = (void __force_user *)buf->m.planes; - *kernel_ptr = (void *)&buf->m.planes; + *kernel_ptr = (void **)&buf->m.planes; *array_size = sizeof(struct v4l2_plane) * buf->length; ret = 1; +@@ -2293,7 +2294,7 @@ static int check_array_args(unsigned int cmd, void *parg, size_t *array_size, + ret = -EINVAL; + break; + } +- *user_ptr = (void __user *)edid->edid; ++ *user_ptr = (void __force_user *)edid->edid; + *kernel_ptr = (void **)&edid->edid; + *array_size = edid->blocks * 128; + ret = 1; @@ -2311,7 +2312,7 @@ static int check_array_args(unsigned int cmd, void *parg, size_t *array_size, ret = -EINVAL; break; } - *user_ptr = (void __user *)ctrls->controls; + *user_ptr = (void __force_user *)ctrls->controls; - *kernel_ptr = (void *)&ctrls->controls; + *kernel_ptr = (void **)&ctrls->controls; *array_size = sizeof(struct v4l2_ext_control) * ctrls->count; @@ -2412,7 +2413,7 @@ video_usercopy(struct file *file, unsigned int cmd, unsigned long arg, } if (has_array_args) { -- *kernel_ptr = user_ptr; +- *kernel_ptr = (void __force *)user_ptr; + *kernel_ptr = (void __force_kernel *)user_ptr; if (copy_to_user(user_ptr, mbuf, array_size)) err = -EFAULT; goto out_array_args; diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c -index 570b18a..f880314 100644 +index ebc0af7..baed058 100644 --- a/drivers/message/fusion/mptbase.c +++ b/drivers/message/fusion/mptbase.c @@ -6755,8 +6755,13 @@ static int mpt_iocinfo_proc_show(struct seq_file *m, void *v) @@ -45121,7 +47212,7 @@ index 570b18a..f880314 100644 seq_printf(m, " {CurRepSz=%d} x {CurRepDepth=%d} = %d bytes ^= 0x%x\n", ioc->reply_sz, ioc->reply_depth, ioc->reply_sz*ioc->reply_depth, sz); diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c -index 00d339c..2ea899d 100644 +index 711fcb5..5da1fb0 100644 --- a/drivers/message/fusion/mptsas.c +++ b/drivers/message/fusion/mptsas.c @@ -446,6 +446,23 @@ mptsas_is_end_device(struct mptsas_devinfo * attached) @@ -45173,7 +47264,7 @@ index 00d339c..2ea899d 100644 mptsas_get_port(struct mptsas_phyinfo *phy_info) { diff --git a/drivers/message/fusion/mptscsih.c b/drivers/message/fusion/mptscsih.c -index 727819c..ad74694 100644 +index 2a1c6f2..a04c6a2 100644 --- a/drivers/message/fusion/mptscsih.c +++ b/drivers/message/fusion/mptscsih.c @@ -1271,15 +1271,16 @@ mptscsih_info(struct Scsi_Host *SChost) @@ -45419,7 +47510,7 @@ index a83eed5..62a58a9 100644 if (node && !pdata) { diff --git a/drivers/mfd/tps65910.c b/drivers/mfd/tps65910.c -index 460a014..21d3061 100644 +index f9e42ea..614d240 100644 --- a/drivers/mfd/tps65910.c +++ b/drivers/mfd/tps65910.c @@ -230,7 +230,7 @@ static int tps65910_irq_init(struct tps65910 *tps65910, int irq, @@ -45894,10 +47985,10 @@ index f51b5ba..86614a7 100644 /* * dma onto stack is unsafe/nonportable, but callers to this diff --git a/drivers/mmc/host/dw_mmc.h b/drivers/mmc/host/dw_mmc.h -index 6834977..824ee1b 100644 +index 738fa24..1568451 100644 --- a/drivers/mmc/host/dw_mmc.h +++ b/drivers/mmc/host/dw_mmc.h -@@ -259,5 +259,5 @@ struct dw_mci_drv_data { +@@ -257,5 +257,5 @@ struct dw_mci_drv_data { int (*parse_dt)(struct dw_mci *host); int (*execute_tuning)(struct dw_mci_slot *slot, u32 opcode, struct dw_mci_tuning_data *tuning_data); @@ -45905,11 +47996,11 @@ index 6834977..824ee1b 100644 +} __do_const; #endif /* _DW_MMC_H_ */ diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c -index 771c60a..12cb615 100644 +index 249ab80..9314ce1 100644 --- a/drivers/mmc/host/mmci.c +++ b/drivers/mmc/host/mmci.c -@@ -1570,7 +1570,9 @@ static int mmci_probe(struct amba_device *dev, - mmc->caps2 = plat->capabilities2; +@@ -1507,7 +1507,9 @@ static int mmci_probe(struct amba_device *dev, + mmc->caps |= MMC_CAP_CMD23; if (variant->busy_detect) { - mmci_ops.card_busy = mmci_card_busy; @@ -45920,10 +48011,10 @@ index 771c60a..12cb615 100644 mmc->caps |= MMC_CAP_WAIT_WHILE_BUSY; mmc->max_busy_timeout = 0; diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c -index b841bb7..d82712f5 100644 +index ccec0e3..199f9ce 100644 --- a/drivers/mmc/host/sdhci-esdhc-imx.c +++ b/drivers/mmc/host/sdhci-esdhc-imx.c -@@ -1031,9 +1031,12 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev) +@@ -1034,9 +1034,12 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev) host->mmc->caps |= MMC_CAP_1_8V_DDR; } @@ -45939,13 +48030,13 @@ index b841bb7..d82712f5 100644 if (imx_data->socdata->flags & ESDHC_FLAG_STD_TUNING) writel(readl(host->ioaddr + ESDHC_TUNING_CTRL) | diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c -index d61eb5a..88c0f5d 100644 +index fa5954a..56840e5 100644 --- a/drivers/mmc/host/sdhci-s3c.c +++ b/drivers/mmc/host/sdhci-s3c.c -@@ -657,9 +657,11 @@ static int sdhci_s3c_probe(struct platform_device *pdev) +@@ -584,9 +584,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) { + if (sc->no_divider) { - sdhci_s3c_ops.set_clock = sdhci_cmu_set_clock; - sdhci_s3c_ops.get_min_clock = sdhci_cmu_get_min_clock; - sdhci_s3c_ops.get_max_clock = sdhci_cmu_get_max_clock; @@ -45958,7 +48049,7 @@ index d61eb5a..88c0f5d 100644 /* It supports additional host capabilities if needed */ diff --git a/drivers/mtd/chips/cfi_cmdset_0020.c b/drivers/mtd/chips/cfi_cmdset_0020.c -index 6293855..3415551 100644 +index 423666b..81ff5eb 100644 --- a/drivers/mtd/chips/cfi_cmdset_0020.c +++ b/drivers/mtd/chips/cfi_cmdset_0020.c @@ -666,7 +666,7 @@ cfi_staa_writev(struct mtd_info *mtd, const struct kvec *vecs, @@ -45971,7 +48062,7 @@ index 6293855..3415551 100644 if (!ECCBUF_SIZE) { /* We should fall back to a general writev implementation. diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/denali.c -index c07cd57..61c4fbd 100644 +index 9f2012a..a81c720 100644 --- a/drivers/mtd/nand/denali.c +++ b/drivers/mtd/nand/denali.c @@ -24,6 +24,7 @@ @@ -45983,10 +48074,10 @@ index c07cd57..61c4fbd 100644 #include "denali.h" diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c -index bb77f75..47539b1 100644 +index f638cd8..2cbf586 100644 --- a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c +++ b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c -@@ -370,7 +370,7 @@ void prepare_data_dma(struct gpmi_nand_data *this, enum dma_data_direction dr) +@@ -387,7 +387,7 @@ void prepare_data_dma(struct gpmi_nand_data *this, enum dma_data_direction dr) /* first try to map the upper buffer directly */ if (virt_addr_valid(this->upper_buf) && @@ -46021,7 +48112,7 @@ index cf49c22..971b133 100644 struct sm_sysfs_attribute *vendor_attribute; char *vendor; diff --git a/drivers/net/bonding/bond_netlink.c b/drivers/net/bonding/bond_netlink.c -index f847e16..fc8dbe9 100644 +index 5ab3c18..5c3a836 100644 --- a/drivers/net/bonding/bond_netlink.c +++ b/drivers/net/bonding/bond_netlink.c @@ -542,7 +542,7 @@ nla_put_failure: @@ -46034,10 +48125,10 @@ index f847e16..fc8dbe9 100644 .priv_size = sizeof(struct bonding), .setup = bond_setup, diff --git a/drivers/net/can/Kconfig b/drivers/net/can/Kconfig -index 9e7d95d..d447b88 100644 +index 4168822..f38eeddf 100644 --- a/drivers/net/can/Kconfig +++ b/drivers/net/can/Kconfig -@@ -104,7 +104,7 @@ config CAN_JANZ_ICAN3 +@@ -98,7 +98,7 @@ config CAN_JANZ_ICAN3 config CAN_FLEXCAN tristate "Support for Freescale FLEXCAN based chips" @@ -46047,7 +48138,7 @@ index 9e7d95d..d447b88 100644 Say Y here if you want to support for Freescale FlexCAN. diff --git a/drivers/net/ethernet/8390/ax88796.c b/drivers/net/ethernet/8390/ax88796.c -index 455d4c3..3353ee7 100644 +index 1d162cc..b546a75 100644 --- a/drivers/net/ethernet/8390/ax88796.c +++ b/drivers/net/ethernet/8390/ax88796.c @@ -889,9 +889,11 @@ static int ax_probe(struct platform_device *pdev) @@ -46090,8 +48181,592 @@ index 7330681..7e9e463 100644 /* Scatter/gather IO is not supported, * so it is turned off +diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-common.h b/drivers/net/ethernet/amd/xgbe/xgbe-common.h +index bf462ee8..18b8375 100644 +--- a/drivers/net/ethernet/amd/xgbe/xgbe-common.h ++++ b/drivers/net/ethernet/amd/xgbe/xgbe-common.h +@@ -986,14 +986,14 @@ do { \ + * operations, everything works on mask values. + */ + #define XMDIO_READ(_pdata, _mmd, _reg) \ +- ((_pdata)->hw_if.read_mmd_regs((_pdata), 0, \ ++ ((_pdata)->hw_if->read_mmd_regs((_pdata), 0, \ + MII_ADDR_C45 | (_mmd << 16) | ((_reg) & 0xffff))) + + #define XMDIO_READ_BITS(_pdata, _mmd, _reg, _mask) \ + (XMDIO_READ((_pdata), _mmd, _reg) & _mask) + + #define XMDIO_WRITE(_pdata, _mmd, _reg, _val) \ +- ((_pdata)->hw_if.write_mmd_regs((_pdata), 0, \ ++ ((_pdata)->hw_if->write_mmd_regs((_pdata), 0, \ + MII_ADDR_C45 | (_mmd << 16) | ((_reg) & 0xffff), (_val))) + + #define XMDIO_WRITE_BITS(_pdata, _mmd, _reg, _mask, _val) \ +diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-debugfs.c b/drivers/net/ethernet/amd/xgbe/xgbe-debugfs.c +index 6bb76d5..ded47a8 100644 +--- a/drivers/net/ethernet/amd/xgbe/xgbe-debugfs.c ++++ b/drivers/net/ethernet/amd/xgbe/xgbe-debugfs.c +@@ -273,7 +273,7 @@ static ssize_t xpcs_reg_value_read(struct file *filp, char __user *buffer, + struct xgbe_prv_data *pdata = filp->private_data; + unsigned int value; + +- value = pdata->hw_if.read_mmd_regs(pdata, pdata->debugfs_xpcs_mmd, ++ value = pdata->hw_if->read_mmd_regs(pdata, pdata->debugfs_xpcs_mmd, + pdata->debugfs_xpcs_reg); + + return xgbe_common_read(buffer, count, ppos, value); +@@ -291,7 +291,7 @@ static ssize_t xpcs_reg_value_write(struct file *filp, + if (len < 0) + return len; + +- pdata->hw_if.write_mmd_regs(pdata, pdata->debugfs_xpcs_mmd, ++ pdata->hw_if->write_mmd_regs(pdata, pdata->debugfs_xpcs_mmd, + pdata->debugfs_xpcs_reg, value); + + return len; +diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-desc.c b/drivers/net/ethernet/amd/xgbe/xgbe-desc.c +index 6f1c859..e96ac1a 100644 +--- a/drivers/net/ethernet/amd/xgbe/xgbe-desc.c ++++ b/drivers/net/ethernet/amd/xgbe/xgbe-desc.c +@@ -236,7 +236,7 @@ err_ring: + + static void xgbe_wrapper_tx_descriptor_init(struct xgbe_prv_data *pdata) + { +- struct xgbe_hw_if *hw_if = &pdata->hw_if; ++ struct xgbe_hw_if *hw_if = pdata->hw_if; + struct xgbe_channel *channel; + struct xgbe_ring *ring; + struct xgbe_ring_data *rdata; +@@ -277,7 +277,7 @@ static void xgbe_wrapper_tx_descriptor_init(struct xgbe_prv_data *pdata) + + static void xgbe_wrapper_rx_descriptor_init(struct xgbe_prv_data *pdata) + { +- struct xgbe_hw_if *hw_if = &pdata->hw_if; ++ struct xgbe_hw_if *hw_if = pdata->hw_if; + struct xgbe_channel *channel; + struct xgbe_ring *ring; + struct xgbe_ring_desc *rdesc; +@@ -496,7 +496,7 @@ err_out: + static void xgbe_realloc_skb(struct xgbe_channel *channel) + { + struct xgbe_prv_data *pdata = channel->pdata; +- struct xgbe_hw_if *hw_if = &pdata->hw_if; ++ struct xgbe_hw_if *hw_if = pdata->hw_if; + struct xgbe_ring *ring = channel->rx_ring; + struct xgbe_ring_data *rdata; + struct sk_buff *skb = NULL; +@@ -540,17 +540,12 @@ static void xgbe_realloc_skb(struct xgbe_channel *channel) + DBGPR("<--xgbe_realloc_skb\n"); + } + +-void xgbe_init_function_ptrs_desc(struct xgbe_desc_if *desc_if) +-{ +- DBGPR("-->xgbe_init_function_ptrs_desc\n"); +- +- desc_if->alloc_ring_resources = xgbe_alloc_ring_resources; +- desc_if->free_ring_resources = xgbe_free_ring_resources; +- desc_if->map_tx_skb = xgbe_map_tx_skb; +- desc_if->realloc_skb = xgbe_realloc_skb; +- desc_if->unmap_skb = xgbe_unmap_skb; +- desc_if->wrapper_tx_desc_init = xgbe_wrapper_tx_descriptor_init; +- desc_if->wrapper_rx_desc_init = xgbe_wrapper_rx_descriptor_init; +- +- DBGPR("<--xgbe_init_function_ptrs_desc\n"); +-} ++const struct xgbe_desc_if default_xgbe_desc_if = { ++ .alloc_ring_resources = xgbe_alloc_ring_resources, ++ .free_ring_resources = xgbe_free_ring_resources, ++ .map_tx_skb = xgbe_map_tx_skb, ++ .realloc_skb = xgbe_realloc_skb, ++ .unmap_skb = xgbe_unmap_skb, ++ .wrapper_tx_desc_init = xgbe_wrapper_tx_descriptor_init, ++ .wrapper_rx_desc_init = xgbe_wrapper_rx_descriptor_init, ++}; +diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-dev.c b/drivers/net/ethernet/amd/xgbe/xgbe-dev.c +index 002293b..5ced1dd 100644 +--- a/drivers/net/ethernet/amd/xgbe/xgbe-dev.c ++++ b/drivers/net/ethernet/amd/xgbe/xgbe-dev.c +@@ -2030,7 +2030,7 @@ static void xgbe_powerdown_rx(struct xgbe_prv_data *pdata) + + static int xgbe_init(struct xgbe_prv_data *pdata) + { +- struct xgbe_desc_if *desc_if = &pdata->desc_if; ++ struct xgbe_desc_if *desc_if = pdata->desc_if; + int ret; + + DBGPR("-->xgbe_init\n"); +@@ -2096,87 +2096,82 @@ static int xgbe_init(struct xgbe_prv_data *pdata) + return 0; + } + +-void xgbe_init_function_ptrs_dev(struct xgbe_hw_if *hw_if) +-{ +- DBGPR("-->xgbe_init_function_ptrs\n"); +- +- hw_if->tx_complete = xgbe_tx_complete; +- +- hw_if->set_promiscuous_mode = xgbe_set_promiscuous_mode; +- hw_if->set_all_multicast_mode = xgbe_set_all_multicast_mode; +- hw_if->set_addn_mac_addrs = xgbe_set_addn_mac_addrs; +- hw_if->set_mac_address = xgbe_set_mac_address; +- +- hw_if->enable_rx_csum = xgbe_enable_rx_csum; +- hw_if->disable_rx_csum = xgbe_disable_rx_csum; +- +- hw_if->enable_rx_vlan_stripping = xgbe_enable_rx_vlan_stripping; +- hw_if->disable_rx_vlan_stripping = xgbe_disable_rx_vlan_stripping; +- +- hw_if->read_mmd_regs = xgbe_read_mmd_regs; +- hw_if->write_mmd_regs = xgbe_write_mmd_regs; +- +- hw_if->set_gmii_speed = xgbe_set_gmii_speed; +- hw_if->set_gmii_2500_speed = xgbe_set_gmii_2500_speed; +- hw_if->set_xgmii_speed = xgbe_set_xgmii_speed; +- +- hw_if->enable_tx = xgbe_enable_tx; +- hw_if->disable_tx = xgbe_disable_tx; +- hw_if->enable_rx = xgbe_enable_rx; +- hw_if->disable_rx = xgbe_disable_rx; +- +- hw_if->powerup_tx = xgbe_powerup_tx; +- hw_if->powerdown_tx = xgbe_powerdown_tx; +- hw_if->powerup_rx = xgbe_powerup_rx; +- hw_if->powerdown_rx = xgbe_powerdown_rx; +- +- hw_if->pre_xmit = xgbe_pre_xmit; +- hw_if->dev_read = xgbe_dev_read; +- hw_if->enable_int = xgbe_enable_int; +- hw_if->disable_int = xgbe_disable_int; +- hw_if->init = xgbe_init; +- hw_if->exit = xgbe_exit; ++const struct xgbe_hw_if default_xgbe_hw_if = { ++ .tx_complete = xgbe_tx_complete, ++ ++ .set_promiscuous_mode = xgbe_set_promiscuous_mode, ++ .set_all_multicast_mode = xgbe_set_all_multicast_mode, ++ .set_addn_mac_addrs = xgbe_set_addn_mac_addrs, ++ .set_mac_address = xgbe_set_mac_address, ++ ++ .enable_rx_csum = xgbe_enable_rx_csum, ++ .disable_rx_csum = xgbe_disable_rx_csum, ++ ++ .enable_rx_vlan_stripping = xgbe_enable_rx_vlan_stripping, ++ .disable_rx_vlan_stripping = xgbe_disable_rx_vlan_stripping, ++ ++ .read_mmd_regs = xgbe_read_mmd_regs, ++ .write_mmd_regs = xgbe_write_mmd_regs, ++ ++ .set_gmii_speed = xgbe_set_gmii_speed, ++ .set_gmii_2500_speed = xgbe_set_gmii_2500_speed, ++ .set_xgmii_speed = xgbe_set_xgmii_speed, ++ ++ .enable_tx = xgbe_enable_tx, ++ .disable_tx = xgbe_disable_tx, ++ .enable_rx = xgbe_enable_rx, ++ .disable_rx = xgbe_disable_rx, ++ ++ .powerup_tx = xgbe_powerup_tx, ++ .powerdown_tx = xgbe_powerdown_tx, ++ .powerup_rx = xgbe_powerup_rx, ++ .powerdown_rx = xgbe_powerdown_rx, ++ ++ .pre_xmit = xgbe_pre_xmit, ++ .dev_read = xgbe_dev_read, ++ .enable_int = xgbe_enable_int, ++ .disable_int = xgbe_disable_int, ++ .init = xgbe_init, ++ .exit = xgbe_exit, + + /* Descriptor related Sequences have to be initialized here */ +- hw_if->tx_desc_init = xgbe_tx_desc_init; +- hw_if->rx_desc_init = xgbe_rx_desc_init; +- hw_if->tx_desc_reset = xgbe_tx_desc_reset; +- hw_if->rx_desc_reset = xgbe_rx_desc_reset; +- hw_if->is_last_desc = xgbe_is_last_desc; +- hw_if->is_context_desc = xgbe_is_context_desc; ++ .tx_desc_init = xgbe_tx_desc_init, ++ .rx_desc_init = xgbe_rx_desc_init, ++ .tx_desc_reset = xgbe_tx_desc_reset, ++ .rx_desc_reset = xgbe_rx_desc_reset, ++ .is_last_desc = xgbe_is_last_desc, ++ .is_context_desc = xgbe_is_context_desc, + + /* For FLOW ctrl */ +- hw_if->config_tx_flow_control = xgbe_config_tx_flow_control; +- hw_if->config_rx_flow_control = xgbe_config_rx_flow_control; ++ .config_tx_flow_control = xgbe_config_tx_flow_control, ++ .config_rx_flow_control = xgbe_config_rx_flow_control, + + /* For RX coalescing */ +- hw_if->config_rx_coalesce = xgbe_config_rx_coalesce; +- hw_if->config_tx_coalesce = xgbe_config_tx_coalesce; +- hw_if->usec_to_riwt = xgbe_usec_to_riwt; +- hw_if->riwt_to_usec = xgbe_riwt_to_usec; ++ .config_rx_coalesce = xgbe_config_rx_coalesce, ++ .config_tx_coalesce = xgbe_config_tx_coalesce, ++ .usec_to_riwt = xgbe_usec_to_riwt, ++ .riwt_to_usec = xgbe_riwt_to_usec, + + /* For RX and TX threshold config */ +- hw_if->config_rx_threshold = xgbe_config_rx_threshold; +- hw_if->config_tx_threshold = xgbe_config_tx_threshold; ++ .config_rx_threshold = xgbe_config_rx_threshold, ++ .config_tx_threshold = xgbe_config_tx_threshold, + + /* For RX and TX Store and Forward Mode config */ +- hw_if->config_rsf_mode = xgbe_config_rsf_mode; +- hw_if->config_tsf_mode = xgbe_config_tsf_mode; ++ .config_rsf_mode = xgbe_config_rsf_mode, ++ .config_tsf_mode = xgbe_config_tsf_mode, + + /* For TX DMA Operating on Second Frame config */ +- hw_if->config_osp_mode = xgbe_config_osp_mode; ++ .config_osp_mode = xgbe_config_osp_mode, + + /* For RX and TX PBL config */ +- hw_if->config_rx_pbl_val = xgbe_config_rx_pbl_val; +- hw_if->get_rx_pbl_val = xgbe_get_rx_pbl_val; +- hw_if->config_tx_pbl_val = xgbe_config_tx_pbl_val; +- hw_if->get_tx_pbl_val = xgbe_get_tx_pbl_val; +- hw_if->config_pblx8 = xgbe_config_pblx8; ++ .config_rx_pbl_val = xgbe_config_rx_pbl_val, ++ .get_rx_pbl_val = xgbe_get_rx_pbl_val, ++ .config_tx_pbl_val = xgbe_config_tx_pbl_val, ++ .get_tx_pbl_val = xgbe_get_tx_pbl_val, ++ .config_pblx8 = xgbe_config_pblx8, + + /* For MMC statistics support */ +- hw_if->tx_mmc_int = xgbe_tx_mmc_int; +- hw_if->rx_mmc_int = xgbe_rx_mmc_int; +- hw_if->read_mmc_stats = xgbe_read_mmc_stats; +- +- DBGPR("<--xgbe_init_function_ptrs\n"); +-} ++ .tx_mmc_int = xgbe_tx_mmc_int, ++ .rx_mmc_int = xgbe_rx_mmc_int, ++ .read_mmc_stats = xgbe_read_mmc_stats, ++}; +diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c +index cfe3d93..07a78ae 100644 +--- a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c ++++ b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c +@@ -153,7 +153,7 @@ static int xgbe_calc_rx_buf_size(struct net_device *netdev, unsigned int mtu) + + static void xgbe_enable_rx_tx_ints(struct xgbe_prv_data *pdata) + { +- struct xgbe_hw_if *hw_if = &pdata->hw_if; ++ struct xgbe_hw_if *hw_if = pdata->hw_if; + struct xgbe_channel *channel; + unsigned int i; + +@@ -170,7 +170,7 @@ static void xgbe_enable_rx_tx_ints(struct xgbe_prv_data *pdata) + + static void xgbe_disable_rx_tx_ints(struct xgbe_prv_data *pdata) + { +- struct xgbe_hw_if *hw_if = &pdata->hw_if; ++ struct xgbe_hw_if *hw_if = pdata->hw_if; + struct xgbe_channel *channel; + unsigned int i; + +@@ -188,7 +188,7 @@ static void xgbe_disable_rx_tx_ints(struct xgbe_prv_data *pdata) + static irqreturn_t xgbe_isr(int irq, void *data) + { + struct xgbe_prv_data *pdata = data; +- struct xgbe_hw_if *hw_if = &pdata->hw_if; ++ struct xgbe_hw_if *hw_if = pdata->hw_if; + struct xgbe_channel *channel; + unsigned int dma_isr, dma_ch_isr; + unsigned int mac_isr; +@@ -403,7 +403,7 @@ static void xgbe_napi_disable(struct xgbe_prv_data *pdata) + + void xgbe_init_tx_coalesce(struct xgbe_prv_data *pdata) + { +- struct xgbe_hw_if *hw_if = &pdata->hw_if; ++ struct xgbe_hw_if *hw_if = pdata->hw_if; + + DBGPR("-->xgbe_init_tx_coalesce\n"); + +@@ -417,7 +417,7 @@ void xgbe_init_tx_coalesce(struct xgbe_prv_data *pdata) + + void xgbe_init_rx_coalesce(struct xgbe_prv_data *pdata) + { +- struct xgbe_hw_if *hw_if = &pdata->hw_if; ++ struct xgbe_hw_if *hw_if = pdata->hw_if; + + DBGPR("-->xgbe_init_rx_coalesce\n"); + +@@ -431,7 +431,7 @@ void xgbe_init_rx_coalesce(struct xgbe_prv_data *pdata) + + static void xgbe_free_tx_skbuff(struct xgbe_prv_data *pdata) + { +- struct xgbe_desc_if *desc_if = &pdata->desc_if; ++ struct xgbe_desc_if *desc_if = pdata->desc_if; + struct xgbe_channel *channel; + struct xgbe_ring *ring; + struct xgbe_ring_data *rdata; +@@ -456,7 +456,7 @@ static void xgbe_free_tx_skbuff(struct xgbe_prv_data *pdata) + + static void xgbe_free_rx_skbuff(struct xgbe_prv_data *pdata) + { +- struct xgbe_desc_if *desc_if = &pdata->desc_if; ++ struct xgbe_desc_if *desc_if = pdata->desc_if; + struct xgbe_channel *channel; + struct xgbe_ring *ring; + struct xgbe_ring_data *rdata; +@@ -482,7 +482,7 @@ static void xgbe_free_rx_skbuff(struct xgbe_prv_data *pdata) + int xgbe_powerdown(struct net_device *netdev, unsigned int caller) + { + struct xgbe_prv_data *pdata = netdev_priv(netdev); +- struct xgbe_hw_if *hw_if = &pdata->hw_if; ++ struct xgbe_hw_if *hw_if = pdata->hw_if; + unsigned long flags; + + DBGPR("-->xgbe_powerdown\n"); +@@ -520,7 +520,7 @@ int xgbe_powerdown(struct net_device *netdev, unsigned int caller) + int xgbe_powerup(struct net_device *netdev, unsigned int caller) + { + struct xgbe_prv_data *pdata = netdev_priv(netdev); +- struct xgbe_hw_if *hw_if = &pdata->hw_if; ++ struct xgbe_hw_if *hw_if = pdata->hw_if; + unsigned long flags; + + DBGPR("-->xgbe_powerup\n"); +@@ -557,7 +557,7 @@ int xgbe_powerup(struct net_device *netdev, unsigned int caller) + + static int xgbe_start(struct xgbe_prv_data *pdata) + { +- struct xgbe_hw_if *hw_if = &pdata->hw_if; ++ struct xgbe_hw_if *hw_if = pdata->hw_if; + struct net_device *netdev = pdata->netdev; + + DBGPR("-->xgbe_start\n"); +@@ -583,7 +583,7 @@ static int xgbe_start(struct xgbe_prv_data *pdata) + + static void xgbe_stop(struct xgbe_prv_data *pdata) + { +- struct xgbe_hw_if *hw_if = &pdata->hw_if; ++ struct xgbe_hw_if *hw_if = pdata->hw_if; + struct net_device *netdev = pdata->netdev; + + DBGPR("-->xgbe_stop\n"); +@@ -603,7 +603,7 @@ static void xgbe_stop(struct xgbe_prv_data *pdata) + + static void xgbe_restart_dev(struct xgbe_prv_data *pdata, unsigned int reset) + { +- struct xgbe_hw_if *hw_if = &pdata->hw_if; ++ struct xgbe_hw_if *hw_if = pdata->hw_if; + + DBGPR("-->xgbe_restart_dev\n"); + +@@ -741,8 +741,8 @@ static void xgbe_packet_info(struct xgbe_ring *ring, struct sk_buff *skb, + static int xgbe_open(struct net_device *netdev) + { + struct xgbe_prv_data *pdata = netdev_priv(netdev); +- struct xgbe_hw_if *hw_if = &pdata->hw_if; +- struct xgbe_desc_if *desc_if = &pdata->desc_if; ++ struct xgbe_hw_if *hw_if = pdata->hw_if; ++ struct xgbe_desc_if *desc_if = pdata->desc_if; + int ret; + + DBGPR("-->xgbe_open\n"); +@@ -804,8 +804,8 @@ err_clk: + static int xgbe_close(struct net_device *netdev) + { + struct xgbe_prv_data *pdata = netdev_priv(netdev); +- struct xgbe_hw_if *hw_if = &pdata->hw_if; +- struct xgbe_desc_if *desc_if = &pdata->desc_if; ++ struct xgbe_hw_if *hw_if = pdata->hw_if; ++ struct xgbe_desc_if *desc_if = pdata->desc_if; + + DBGPR("-->xgbe_close\n"); + +@@ -835,8 +835,8 @@ static int xgbe_close(struct net_device *netdev) + static int xgbe_xmit(struct sk_buff *skb, struct net_device *netdev) + { + struct xgbe_prv_data *pdata = netdev_priv(netdev); +- struct xgbe_hw_if *hw_if = &pdata->hw_if; +- struct xgbe_desc_if *desc_if = &pdata->desc_if; ++ struct xgbe_hw_if *hw_if = pdata->hw_if; ++ struct xgbe_desc_if *desc_if = pdata->desc_if; + struct xgbe_channel *channel; + struct xgbe_ring *ring; + struct xgbe_packet_data *packet; +@@ -903,7 +903,7 @@ tx_netdev_return: + static void xgbe_set_rx_mode(struct net_device *netdev) + { + struct xgbe_prv_data *pdata = netdev_priv(netdev); +- struct xgbe_hw_if *hw_if = &pdata->hw_if; ++ struct xgbe_hw_if *hw_if = pdata->hw_if; + unsigned int pr_mode, am_mode; + + DBGPR("-->xgbe_set_rx_mode\n"); +@@ -930,7 +930,7 @@ static void xgbe_set_rx_mode(struct net_device *netdev) + static int xgbe_set_mac_address(struct net_device *netdev, void *addr) + { + struct xgbe_prv_data *pdata = netdev_priv(netdev); +- struct xgbe_hw_if *hw_if = &pdata->hw_if; ++ struct xgbe_hw_if *hw_if = pdata->hw_if; + struct sockaddr *saddr = addr; + + DBGPR("-->xgbe_set_mac_address\n"); +@@ -976,7 +976,7 @@ static struct rtnl_link_stats64 *xgbe_get_stats64(struct net_device *netdev, + + DBGPR("-->%s\n", __func__); + +- pdata->hw_if.read_mmc_stats(pdata); ++ pdata->hw_if->read_mmc_stats(pdata); + + s->rx_packets = pstats->rxframecount_gb; + s->rx_bytes = pstats->rxoctetcount_gb; +@@ -1020,7 +1020,7 @@ static int xgbe_set_features(struct net_device *netdev, + netdev_features_t features) + { + struct xgbe_prv_data *pdata = netdev_priv(netdev); +- struct xgbe_hw_if *hw_if = &pdata->hw_if; ++ struct xgbe_hw_if *hw_if = pdata->hw_if; + unsigned int rxcsum_enabled, rxvlan_enabled; + + rxcsum_enabled = !!(pdata->netdev_features & NETIF_F_RXCSUM); +@@ -1072,8 +1072,8 @@ struct net_device_ops *xgbe_get_netdev_ops(void) + static int xgbe_tx_poll(struct xgbe_channel *channel) + { + struct xgbe_prv_data *pdata = channel->pdata; +- struct xgbe_hw_if *hw_if = &pdata->hw_if; +- struct xgbe_desc_if *desc_if = &pdata->desc_if; ++ struct xgbe_hw_if *hw_if = pdata->hw_if; ++ struct xgbe_desc_if *desc_if = pdata->desc_if; + struct xgbe_ring *ring = channel->tx_ring; + struct xgbe_ring_data *rdata; + struct xgbe_ring_desc *rdesc; +@@ -1124,8 +1124,8 @@ static int xgbe_tx_poll(struct xgbe_channel *channel) + static int xgbe_rx_poll(struct xgbe_channel *channel, int budget) + { + struct xgbe_prv_data *pdata = channel->pdata; +- struct xgbe_hw_if *hw_if = &pdata->hw_if; +- struct xgbe_desc_if *desc_if = &pdata->desc_if; ++ struct xgbe_hw_if *hw_if = pdata->hw_if; ++ struct xgbe_desc_if *desc_if = pdata->desc_if; + struct xgbe_ring *ring = channel->rx_ring; + struct xgbe_ring_data *rdata; + struct xgbe_packet_data *packet; +diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c b/drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c +index 8909f2b..719e767 100644 +--- a/drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c ++++ b/drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c +@@ -202,7 +202,7 @@ static void xgbe_get_ethtool_stats(struct net_device *netdev, + + DBGPR("-->%s\n", __func__); + +- pdata->hw_if.read_mmc_stats(pdata); ++ pdata->hw_if->read_mmc_stats(pdata); + for (i = 0; i < XGBE_STATS_COUNT; i++) { + stat = (u8 *)pdata + xgbe_gstring_stats[i].stat_offset; + *data++ = *(u64 *)stat; +@@ -387,7 +387,7 @@ static int xgbe_get_coalesce(struct net_device *netdev, + struct ethtool_coalesce *ec) + { + struct xgbe_prv_data *pdata = netdev_priv(netdev); +- struct xgbe_hw_if *hw_if = &pdata->hw_if; ++ struct xgbe_hw_if *hw_if = pdata->hw_if; + unsigned int riwt; + + DBGPR("-->xgbe_get_coalesce\n"); +@@ -410,7 +410,7 @@ static int xgbe_set_coalesce(struct net_device *netdev, + struct ethtool_coalesce *ec) + { + struct xgbe_prv_data *pdata = netdev_priv(netdev); +- struct xgbe_hw_if *hw_if = &pdata->hw_if; ++ struct xgbe_hw_if *hw_if = pdata->hw_if; + unsigned int rx_frames, rx_riwt, rx_usecs; + unsigned int tx_frames, tx_usecs; + +diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-main.c b/drivers/net/ethernet/amd/xgbe/xgbe-main.c +index 5a1891f..1b7888e 100644 +--- a/drivers/net/ethernet/amd/xgbe/xgbe-main.c ++++ b/drivers/net/ethernet/amd/xgbe/xgbe-main.c +@@ -210,12 +210,6 @@ static void xgbe_default_config(struct xgbe_prv_data *pdata) + DBGPR("<--xgbe_default_config\n"); + } + +-static void xgbe_init_all_fptrs(struct xgbe_prv_data *pdata) +-{ +- xgbe_init_function_ptrs_dev(&pdata->hw_if); +- xgbe_init_function_ptrs_desc(&pdata->desc_if); +-} +- + static int xgbe_probe(struct platform_device *pdev) + { + struct xgbe_prv_data *pdata; +@@ -306,9 +300,8 @@ static int xgbe_probe(struct platform_device *pdev) + netdev->base_addr = (unsigned long)pdata->xgmac_regs; + + /* Set all the function pointers */ +- xgbe_init_all_fptrs(pdata); +- hw_if = &pdata->hw_if; +- desc_if = &pdata->desc_if; ++ hw_if = pdata->hw_if = &default_xgbe_hw_if; ++ desc_if = pdata->desc_if = &default_xgbe_desc_if; + + /* Issue software reset to device */ + hw_if->exit(pdata); +diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c b/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c +index ea7a5d6..d10a742 100644 +--- a/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c ++++ b/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c +@@ -128,7 +128,7 @@ + static int xgbe_mdio_read(struct mii_bus *mii, int prtad, int mmd_reg) + { + struct xgbe_prv_data *pdata = mii->priv; +- struct xgbe_hw_if *hw_if = &pdata->hw_if; ++ struct xgbe_hw_if *hw_if = pdata->hw_if; + int mmd_data; + + DBGPR_MDIO("-->xgbe_mdio_read: prtad=%#x mmd_reg=%#x\n", +@@ -145,7 +145,7 @@ static int xgbe_mdio_write(struct mii_bus *mii, int prtad, int mmd_reg, + u16 mmd_val) + { + struct xgbe_prv_data *pdata = mii->priv; +- struct xgbe_hw_if *hw_if = &pdata->hw_if; ++ struct xgbe_hw_if *hw_if = pdata->hw_if; + int mmd_data = mmd_val; + + DBGPR_MDIO("-->xgbe_mdio_write: prtad=%#x mmd_reg=%#x mmd_data=%#x\n", +@@ -161,7 +161,7 @@ static int xgbe_mdio_write(struct mii_bus *mii, int prtad, int mmd_reg, + static void xgbe_adjust_link(struct net_device *netdev) + { + struct xgbe_prv_data *pdata = netdev_priv(netdev); +- struct xgbe_hw_if *hw_if = &pdata->hw_if; ++ struct xgbe_hw_if *hw_if = pdata->hw_if; + struct phy_device *phydev = pdata->phydev; + unsigned long flags; + int new_state = 0; +diff --git a/drivers/net/ethernet/amd/xgbe/xgbe.h b/drivers/net/ethernet/amd/xgbe/xgbe.h +index ab06271..a560fa7 100644 +--- a/drivers/net/ethernet/amd/xgbe/xgbe.h ++++ b/drivers/net/ethernet/amd/xgbe/xgbe.h +@@ -527,8 +527,8 @@ struct xgbe_prv_data { + + int irq_number; + +- struct xgbe_hw_if hw_if; +- struct xgbe_desc_if desc_if; ++ const struct xgbe_hw_if *hw_if; ++ const struct xgbe_desc_if *desc_if; + + /* Rings for Tx/Rx on a DMA channel */ + struct xgbe_channel *channel; +@@ -611,6 +611,9 @@ struct xgbe_prv_data { + #endif + }; + ++extern const struct xgbe_hw_if default_xgbe_hw_if; ++extern const struct xgbe_desc_if default_xgbe_desc_if; ++ + /* Function prototypes*/ + + void xgbe_init_function_ptrs_dev(struct xgbe_hw_if *); diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h -index 3448cc0..67b2dc4 100644 +index 571427c..e9fe9e7 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h @@ -1058,7 +1058,7 @@ static inline u8 bnx2x_get_path_func_num(struct bnx2x *bp) @@ -46104,7 +48779,7 @@ index 3448cc0..67b2dc4 100644 /* multicast configuration controlling object */ bnx2x_init_mcast_obj(bp, &bp->mcast_obj, bp->fp->cl_id, bp->fp->cid, diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c -index 31297266..944cf6e 100644 +index b193604..8873bfd 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c @@ -2329,15 +2329,14 @@ int bnx2x_config_rx_mode(struct bnx2x *bp, @@ -46129,7 +48804,7 @@ index 31297266..944cf6e 100644 } diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h -index 80f6c79..fb7d12d 100644 +index 718ecd2..2183b2f 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h @@ -1340,8 +1340,7 @@ int bnx2x_vlan_mac_move(struct bnx2x *bp, @@ -46143,7 +48818,7 @@ index 80f6c79..fb7d12d 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 04321e5..b51cdc4 100644 +index 461acca..2b546ba 100644 --- a/drivers/net/ethernet/broadcom/tg3.h +++ b/drivers/net/ethernet/broadcom/tg3.h @@ -150,6 +150,7 @@ @@ -46187,10 +48862,10 @@ index 8cffcdf..aadf043 100644 #define L2T_SKB_CB(skb) ((struct l2t_skb_cb *)(skb)->cb) diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c -index 24e16e3..bfe6ef2 100644 +index a83271c..cf00874 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c -@@ -2139,7 +2139,7 @@ static void get_regs(struct net_device *dev, struct ethtool_regs *regs, +@@ -2174,7 +2174,7 @@ static void get_regs(struct net_device *dev, struct ethtool_regs *regs, int i; struct adapter *ap = netdev2adap(dev); @@ -46222,10 +48897,10 @@ index c05b66d..ed69872 100644 break; } diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c -index dc19bc5..f2d4548 100644 +index 1e187fb..d024547 100644 --- a/drivers/net/ethernet/emulex/benet/be_main.c +++ b/drivers/net/ethernet/emulex/benet/be_main.c -@@ -535,7 +535,7 @@ static void accumulate_16bit_val(u32 *acc, u16 val) +@@ -533,7 +533,7 @@ static void accumulate_16bit_val(u32 *acc, u16 val) if (wrapped) newacc += 65536; @@ -46235,7 +48910,7 @@ index dc19bc5..f2d4548 100644 static void populate_erx_stats(struct be_adapter *adapter, diff --git a/drivers/net/ethernet/faraday/ftgmac100.c b/drivers/net/ethernet/faraday/ftgmac100.c -index 68069ea..c4484f6 100644 +index c77fa4a..7fd42fc 100644 --- a/drivers/net/ethernet/faraday/ftgmac100.c +++ b/drivers/net/ethernet/faraday/ftgmac100.c @@ -30,6 +30,8 @@ @@ -46248,7 +48923,7 @@ index 68069ea..c4484f6 100644 #include "ftgmac100.h" diff --git a/drivers/net/ethernet/faraday/ftmac100.c b/drivers/net/ethernet/faraday/ftmac100.c -index 8be5b40..081bc1b 100644 +index 4ff1adc..0ea6bf4 100644 --- a/drivers/net/ethernet/faraday/ftmac100.c +++ b/drivers/net/ethernet/faraday/ftmac100.c @@ -31,6 +31,8 @@ @@ -46261,10 +48936,10 @@ index 8be5b40..081bc1b 100644 #include "ftmac100.h" diff --git a/drivers/net/ethernet/intel/i40e/i40e_ptp.c b/drivers/net/ethernet/intel/i40e/i40e_ptp.c -index e61e637..9117795 100644 +index 101f439..59e7ec6 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_ptp.c +++ b/drivers/net/ethernet/intel/i40e/i40e_ptp.c -@@ -436,7 +436,7 @@ void i40e_ptp_set_increment(struct i40e_pf *pf) +@@ -401,7 +401,7 @@ void i40e_ptp_set_increment(struct i40e_pf *pf) wr32(hw, I40E_PRTTSYN_INC_H, incval >> 32); /* Update the base adjustement value. */ @@ -46274,10 +48949,10 @@ index e61e637..9117795 100644 } diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c -index 8902ae6..e7bcdce 100644 +index 68f87ec..241dbe3 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c -@@ -771,7 +771,7 @@ void ixgbe_ptp_start_cyclecounter(struct ixgbe_adapter *adapter) +@@ -792,7 +792,7 @@ void ixgbe_ptp_start_cyclecounter(struct ixgbe_adapter *adapter) } /* update the base incval used to calculate frequency adjustment */ @@ -46287,10 +48962,10 @@ index 8902ae6..e7bcdce 100644 /* need lock to prevent incorrect read while modifying cyclecounter */ diff --git a/drivers/net/ethernet/neterion/vxge/vxge-config.c b/drivers/net/ethernet/neterion/vxge/vxge-config.c -index 089b713..28d87ae 100644 +index 2bbd01f..e8baa64 100644 --- a/drivers/net/ethernet/neterion/vxge/vxge-config.c +++ b/drivers/net/ethernet/neterion/vxge/vxge-config.c -@@ -3461,7 +3461,10 @@ __vxge_hw_fifo_create(struct __vxge_hw_vpath_handle *vp, +@@ -3457,7 +3457,10 @@ __vxge_hw_fifo_create(struct __vxge_hw_vpath_handle *vp, struct __vxge_hw_fifo *fifo; struct vxge_hw_fifo_config *config; u32 txdl_size, txdl_per_memblock; @@ -46302,7 +48977,7 @@ index 089b713..28d87ae 100644 struct __vxge_hw_virtualpath *vpath; if ((vp == NULL) || (attr == NULL)) { -@@ -3544,8 +3547,6 @@ __vxge_hw_fifo_create(struct __vxge_hw_vpath_handle *vp, +@@ -3540,8 +3543,6 @@ __vxge_hw_fifo_create(struct __vxge_hw_vpath_handle *vp, goto exit; } @@ -46311,8 +48986,44 @@ index 089b713..28d87ae 100644 fifo->mempool = __vxge_hw_mempool_create(vpath->hldev, fifo->config->memblock_size, +diff --git a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c +index 73e6683..464e910 100644 +--- a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c ++++ b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c +@@ -120,6 +120,10 @@ static void pch_gbe_mdio_write(struct net_device *netdev, int addr, int reg, + int data); + static void pch_gbe_set_multi(struct net_device *netdev); + ++static struct sock_filter ptp_filter[] = { ++ PTP_FILTER ++}; ++ + static int pch_ptp_match(struct sk_buff *skb, u16 uid_hi, u32 uid_lo, u16 seqid) + { + u8 *data = skb->data; +@@ -127,7 +131,7 @@ static int pch_ptp_match(struct sk_buff *skb, u16 uid_hi, u32 uid_lo, u16 seqid) + u16 *hi, *id; + u32 lo; + +- if (ptp_classify_raw(skb) == PTP_CLASS_NONE) ++ if (sk_run_filter(skb, ptp_filter) == PTP_CLASS_NONE) + return 0; + + offset = ETH_HLEN + IPV4_HLEN(data) + UDP_HLEN; +@@ -2631,6 +2635,11 @@ static int pch_gbe_probe(struct pci_dev *pdev, + + adapter->ptp_pdev = pci_get_bus_and_slot(adapter->pdev->bus->number, + PCI_DEVFN(12, 4)); ++ if (ptp_filter_init(ptp_filter, ARRAY_SIZE(ptp_filter))) { ++ dev_err(&pdev->dev, "Bad ptp filter\n"); ++ ret = -EINVAL; ++ goto err_free_netdev; ++ } + + netdev->netdev_ops = &pch_gbe_netdev_ops; + netdev->watchdog_timeo = PCH_GBE_WATCHDOG_PERIOD; diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c -index ba20c72..f30c0fe 100644 +index f33559b..c7f50ac 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c @@ -2176,7 +2176,9 @@ int qlcnic_83xx_configure_opmode(struct qlcnic_adapter *adapter) @@ -46358,10 +49069,10 @@ index be7d7a6..a8983f8 100644 default: dev_err(&adapter->pdev->dev, "Invalid Virtual NIC opmode\n"); diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_minidump.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_minidump.c -index 37b979b..50f5b95 100644 +index e46fc39..abe135b 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_minidump.c +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_minidump.c -@@ -1217,7 +1217,7 @@ flash_temp: +@@ -1228,7 +1228,7 @@ flash_temp: int qlcnic_dump_fw(struct qlcnic_adapter *adapter) { struct qlcnic_fw_dump *fw_dump = &adapter->ahw->fw_dump; @@ -46371,10 +49082,10 @@ index 37b979b..50f5b95 100644 u32 entry_offset, dump, no_entries, buf_offset = 0; int i, k, ops_cnt, ops_index, dump_size = 0; diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c -index aa1c079..2b1a3e8 100644 +index 61623e9..ac97c27 100644 --- a/drivers/net/ethernet/realtek/r8169.c +++ b/drivers/net/ethernet/realtek/r8169.c -@@ -758,22 +758,22 @@ struct rtl8169_private { +@@ -759,22 +759,22 @@ struct rtl8169_private { struct mdio_ops { void (*write)(struct rtl8169_private *, int, int); int (*read)(struct rtl8169_private *, int); @@ -46429,11 +49140,94 @@ index 50617c5..b13724c 100644 } /* To mask all all interrupts.*/ +diff --git a/drivers/net/ethernet/ti/cpts.c b/drivers/net/ethernet/ti/cpts.c +index 6b56f85..50e285f 100644 +--- a/drivers/net/ethernet/ti/cpts.c ++++ b/drivers/net/ethernet/ti/cpts.c +@@ -33,6 +33,10 @@ + + #ifdef CONFIG_TI_CPTS + ++static struct sock_filter ptp_filter[] = { ++ PTP_FILTER ++}; ++ + #define cpts_read32(c, r) __raw_readl(&c->reg->r) + #define cpts_write32(c, v, r) __raw_writel(v, &c->reg->r) + +@@ -296,7 +300,7 @@ static u64 cpts_find_ts(struct cpts *cpts, struct sk_buff *skb, int ev_type) + u64 ns = 0; + struct cpts_event *event; + struct list_head *this, *next; +- unsigned int class = ptp_classify_raw(skb); ++ unsigned int class = sk_run_filter(skb, ptp_filter); + unsigned long flags; + u16 seqid; + u8 mtype; +@@ -367,6 +371,10 @@ int cpts_register(struct device *dev, struct cpts *cpts, + int err, i; + unsigned long flags; + ++ if (ptp_filter_init(ptp_filter, ARRAY_SIZE(ptp_filter))) { ++ pr_err("cpts: bad ptp filter\n"); ++ return -EINVAL; ++ } + cpts->info = cpts_info; + cpts->clock = ptp_clock_register(&cpts->info, dev); + if (IS_ERR(cpts->clock)) { +diff --git a/drivers/net/ethernet/xscale/Kconfig b/drivers/net/ethernet/xscale/Kconfig +index b81bc9f..3f43101 100644 +--- a/drivers/net/ethernet/xscale/Kconfig ++++ b/drivers/net/ethernet/xscale/Kconfig +@@ -23,7 +23,6 @@ config IXP4XX_ETH + tristate "Intel IXP4xx Ethernet support" + depends on ARM && ARCH_IXP4XX && IXP4XX_NPE && IXP4XX_QMGR + select PHYLIB +- select NET_PTP_CLASSIFY + ---help--- + Say Y here if you want to use built-in Ethernet ports + on IXP4xx processor. +diff --git a/drivers/net/ethernet/xscale/ixp4xx_eth.c b/drivers/net/ethernet/xscale/ixp4xx_eth.c +index f7e0f0f..25283f1 100644 +--- a/drivers/net/ethernet/xscale/ixp4xx_eth.c ++++ b/drivers/net/ethernet/xscale/ixp4xx_eth.c +@@ -256,6 +256,10 @@ static int ports_open; + static struct port *npe_port_tab[MAX_NPES]; + static struct dma_pool *dma_pool; + ++static struct sock_filter ptp_filter[] = { ++ PTP_FILTER ++}; ++ + static int ixp_ptp_match(struct sk_buff *skb, u16 uid_hi, u32 uid_lo, u16 seqid) + { + u8 *data = skb->data; +@@ -263,7 +267,7 @@ static int ixp_ptp_match(struct sk_buff *skb, u16 uid_hi, u32 uid_lo, u16 seqid) + u16 *hi, *id; + u32 lo; + +- if (ptp_classify_raw(skb) != PTP_CLASS_V1_IPV4) ++ if (sk_run_filter(skb, ptp_filter) != PTP_CLASS_V1_IPV4) + return 0; + + offset = ETH_HLEN + IPV4_HLEN(data) + UDP_HLEN; +@@ -1409,6 +1413,11 @@ static int eth_init_one(struct platform_device *pdev) + char phy_id[MII_BUS_ID_SIZE + 3]; + int err; + ++ if (ptp_filter_init(ptp_filter, ARRAY_SIZE(ptp_filter))) { ++ pr_err("ixp4xx_eth: bad ptp filter\n"); ++ return -EINVAL; ++ } ++ + if (!(dev = alloc_etherdev(sizeof(struct port)))) + return -ENOMEM; + diff --git a/drivers/net/hyperv/hyperv_net.h b/drivers/net/hyperv/hyperv_net.h -index d18f711d..5755800 100644 +index 6cc37c1..fdd9d77 100644 --- a/drivers/net/hyperv/hyperv_net.h +++ b/drivers/net/hyperv/hyperv_net.h -@@ -101,7 +101,7 @@ struct rndis_device { +@@ -170,7 +170,7 @@ struct rndis_device { enum rndis_device_state state; bool link_state; @@ -46443,10 +49237,10 @@ index d18f711d..5755800 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 143a98c..d54fbaa 100644 +index 99c527a..6a2ce38 100644 --- a/drivers/net/hyperv/rndis_filter.c +++ b/drivers/net/hyperv/rndis_filter.c -@@ -100,7 +100,7 @@ static struct rndis_request *get_rndis_request(struct rndis_device *dev, +@@ -102,7 +102,7 @@ static struct rndis_request *get_rndis_request(struct rndis_device *dev, * template */ set = &rndis_msg->msg.set_req; @@ -46455,7 +49249,7 @@ index 143a98c..d54fbaa 100644 /* Add to the request list */ spin_lock_irqsave(&dev->request_lock, flags); -@@ -834,7 +834,7 @@ static void rndis_filter_halt_device(struct rndis_device *dev) +@@ -930,7 +930,7 @@ static void rndis_filter_halt_device(struct rndis_device *dev) /* Setup the rndis set */ halt = &request->request_msg.msg.halt_req; @@ -46478,10 +49272,19 @@ index 78f18be..1d19c62 100644 priv = netdev_priv(dev); priv->phy = phy; diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c -index 7eec598..90b8428 100644 +index ef8a5c2..76877d6 100644 --- a/drivers/net/macvlan.c +++ b/drivers/net/macvlan.c -@@ -984,13 +984,15 @@ static const struct nla_policy macvlan_policy[IFLA_MACVLAN_MAX + 1] = { +@@ -264,7 +264,7 @@ static void macvlan_broadcast_enqueue(struct macvlan_port *port, + free_nskb: + kfree_skb(nskb); + err: +- atomic_long_inc(&skb->dev->rx_dropped); ++ atomic_long_inc_unchecked(&skb->dev->rx_dropped); + } + + /* called under rcu_read_lock() from netif_receive_skb */ +@@ -1134,13 +1134,15 @@ static const struct nla_policy macvlan_policy[IFLA_MACVLAN_MAX + 1] = { int macvlan_link_register(struct rtnl_link_ops *ops) { /* common fields */ @@ -46504,7 +49307,7 @@ index 7eec598..90b8428 100644 return rtnl_link_register(ops); }; -@@ -1044,7 +1046,7 @@ static int macvlan_device_event(struct notifier_block *unused, +@@ -1220,7 +1222,7 @@ static int macvlan_device_event(struct notifier_block *unused, return NOTIFY_DONE; } @@ -46535,28 +49338,184 @@ index 3381c4f..dea5fd5 100644 .notifier_call = macvtap_device_event, }; +diff --git a/drivers/net/phy/dp83640.c b/drivers/net/phy/dp83640.c +index 9408157..d53b924 100644 +--- a/drivers/net/phy/dp83640.c ++++ b/drivers/net/phy/dp83640.c +@@ -27,7 +27,6 @@ + #include + #include + #include +-#include + #include + #include + #include diff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_generic.c -index e3923eb..2a0373b 100644 +index d5b77ef..72ff14b 100644 --- a/drivers/net/ppp/ppp_generic.c +++ b/drivers/net/ppp/ppp_generic.c -@@ -1012,7 +1012,6 @@ ppp_net_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) - void __user *addr = (void __user *) ifr->ifr_ifru.ifru_data; - struct ppp_stats stats; - struct ppp_comp_stats cstats; -- char *vers; +@@ -143,8 +143,9 @@ struct ppp { + struct sk_buff_head mrq; /* MP: receive reconstruction queue */ + #endif /* CONFIG_PPP_MULTILINK */ + #ifdef CONFIG_PPP_FILTER +- struct sk_filter *pass_filter; /* filter for packets to pass */ +- struct sk_filter *active_filter;/* filter for pkts to reset idle */ ++ struct sock_filter *pass_filter; /* filter for packets to pass */ ++ struct sock_filter *active_filter;/* filter for pkts to reset idle */ ++ unsigned pass_len, active_len; + #endif /* CONFIG_PPP_FILTER */ + struct net *ppp_net; /* the net we belong to */ + struct ppp_link_stats stats64; /* 64 bit network stats */ +@@ -539,7 +540,7 @@ static int get_filter(void __user *arg, struct sock_filter **p) + { + struct sock_fprog uprog; + struct sock_filter *code = NULL; +- int len; ++ int len, err; - switch (cmd) { - case SIOCGPPPSTATS: -@@ -1034,8 +1033,7 @@ ppp_net_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) - break; + if (copy_from_user(&uprog, arg, sizeof(uprog))) + return -EFAULT; +@@ -554,6 +555,12 @@ static int get_filter(void __user *arg, struct sock_filter **p) + if (IS_ERR(code)) + return PTR_ERR(code); - case SIOCGPPPVER: -- vers = PPP_VERSION; -- if (copy_to_user(addr, vers, strlen(vers) + 1)) -+ if (copy_to_user(addr, PPP_VERSION, sizeof(PPP_VERSION))) - break; - err = 0; ++ err = sk_chk_filter(code, uprog.len); ++ if (err) { ++ kfree(code); ++ return err; ++ } ++ + *p = code; + return uprog.len; + } +@@ -748,52 +755,28 @@ static long ppp_ioctl(struct file *file, unsigned int cmd, unsigned long arg) + case PPPIOCSPASS: + { + struct sock_filter *code; +- + err = get_filter(argp, &code); + if (err >= 0) { +- struct sock_fprog_kern fprog = { +- .len = err, +- .filter = code, +- }; +- + ppp_lock(ppp); +- if (ppp->pass_filter) { +- sk_unattached_filter_destroy(ppp->pass_filter); +- ppp->pass_filter = NULL; +- } +- if (fprog.filter != NULL) +- err = sk_unattached_filter_create(&ppp->pass_filter, +- &fprog); +- else +- err = 0; +- kfree(code); ++ kfree(ppp->pass_filter); ++ ppp->pass_filter = code; ++ ppp->pass_len = err; + ppp_unlock(ppp); ++ err = 0; + } break; + } + case PPPIOCSACTIVE: + { + struct sock_filter *code; +- + err = get_filter(argp, &code); + if (err >= 0) { +- struct sock_fprog_kern fprog = { +- .len = err, +- .filter = code, +- }; +- + ppp_lock(ppp); +- if (ppp->active_filter) { +- sk_unattached_filter_destroy(ppp->active_filter); +- ppp->active_filter = NULL; +- } +- if (fprog.filter != NULL) +- err = sk_unattached_filter_create(&ppp->active_filter, +- &fprog); +- else +- err = 0; +- kfree(code); ++ kfree(ppp->active_filter); ++ ppp->active_filter = code; ++ ppp->active_len = err; + ppp_unlock(ppp); ++ err = 0; + } + break; + } +@@ -1201,7 +1184,7 @@ ppp_send_frame(struct ppp *ppp, struct sk_buff *skb) + a four-byte PPP header on each packet */ + *skb_push(skb, 2) = 1; + if (ppp->pass_filter && +- SK_RUN_FILTER(ppp->pass_filter, skb) == 0) { ++ sk_run_filter(skb, ppp->pass_filter) == 0) { + if (ppp->debug & 1) + netdev_printk(KERN_DEBUG, ppp->dev, + "PPP: outbound frame " +@@ -1211,7 +1194,7 @@ ppp_send_frame(struct ppp *ppp, struct sk_buff *skb) + } + /* if this packet passes the active filter, record the time */ + if (!(ppp->active_filter && +- SK_RUN_FILTER(ppp->active_filter, skb) == 0)) ++ sk_run_filter(skb, ppp->active_filter) == 0)) + ppp->last_xmit = jiffies; + skb_pull(skb, 2); + #else +@@ -1835,7 +1818,7 @@ ppp_receive_nonmp_frame(struct ppp *ppp, struct sk_buff *skb) + + *skb_push(skb, 2) = 0; + if (ppp->pass_filter && +- SK_RUN_FILTER(ppp->pass_filter, skb) == 0) { ++ sk_run_filter(skb, ppp->pass_filter) == 0) { + if (ppp->debug & 1) + netdev_printk(KERN_DEBUG, ppp->dev, + "PPP: inbound frame " +@@ -1844,7 +1827,7 @@ ppp_receive_nonmp_frame(struct ppp *ppp, struct sk_buff *skb) + return; + } + if (!(ppp->active_filter && +- SK_RUN_FILTER(ppp->active_filter, skb) == 0)) ++ sk_run_filter(skb, ppp->active_filter) == 0)) + ppp->last_recv = jiffies; + __skb_pull(skb, 2); + } else +@@ -2689,10 +2672,6 @@ ppp_create_interface(struct net *net, int unit, int *retp) + ppp->minseq = -1; + skb_queue_head_init(&ppp->mrq); + #endif /* CONFIG_PPP_MULTILINK */ +-#ifdef CONFIG_PPP_FILTER +- ppp->pass_filter = NULL; +- ppp->active_filter = NULL; +-#endif /* CONFIG_PPP_FILTER */ + + /* + * drum roll: don't forget to set +@@ -2823,15 +2802,10 @@ static void ppp_destroy_interface(struct ppp *ppp) + skb_queue_purge(&ppp->mrq); + #endif /* CONFIG_PPP_MULTILINK */ + #ifdef CONFIG_PPP_FILTER +- if (ppp->pass_filter) { +- sk_unattached_filter_destroy(ppp->pass_filter); +- ppp->pass_filter = NULL; +- } +- +- if (ppp->active_filter) { +- sk_unattached_filter_destroy(ppp->active_filter); +- ppp->active_filter = NULL; +- } ++ kfree(ppp->pass_filter); ++ ppp->pass_filter = NULL; ++ kfree(ppp->active_filter); ++ ppp->active_filter = NULL; + #endif /* CONFIG_PPP_FILTER */ + + kfree_skb(ppp->xmit_pending); diff --git a/drivers/net/slip/slhc.c b/drivers/net/slip/slhc.c index 1252d9c..80e660b 100644 --- a/drivers/net/slip/slhc.c @@ -46571,7 +49530,7 @@ index 1252d9c..80e660b 100644 /* We've got a compressed packet; read the change byte */ diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c -index ce4989b..b40b328 100644 +index b4958c7..277cb96 100644 --- a/drivers/net/team/team.c +++ b/drivers/net/team/team.c @@ -2868,7 +2868,7 @@ static int team_device_event(struct notifier_block *unused, @@ -46583,11 +49542,61 @@ index ce4989b..b40b328 100644 .notifier_call = team_device_event, }; +diff --git a/drivers/net/team/team_mode_loadbalance.c b/drivers/net/team/team_mode_loadbalance.c +index a58dfeb..dbde341 100644 +--- a/drivers/net/team/team_mode_loadbalance.c ++++ b/drivers/net/team/team_mode_loadbalance.c +@@ -49,7 +49,7 @@ struct lb_port_mapping { + struct lb_priv_ex { + struct team *team; + struct lb_port_mapping tx_hash_to_port_mapping[LB_TX_HASHTABLE_SIZE]; +- struct sock_fprog_kern *orig_fprog; ++ struct sock_fprog *orig_fprog; + struct { + unsigned int refresh_interval; /* in tenths of second */ + struct delayed_work refresh_dw; +@@ -241,15 +241,15 @@ static int lb_bpf_func_get(struct team *team, struct team_gsetter_ctx *ctx) + return 0; + } + +-static int __fprog_create(struct sock_fprog_kern **pfprog, u32 data_len, ++static int __fprog_create(struct sock_fprog **pfprog, u32 data_len, + const void *data) + { +- struct sock_fprog_kern *fprog; ++ struct sock_fprog *fprog; + struct sock_filter *filter = (struct sock_filter *) data; + + if (data_len % sizeof(struct sock_filter)) + return -EINVAL; +- fprog = kmalloc(sizeof(*fprog), GFP_KERNEL); ++ fprog = kmalloc(sizeof(struct sock_fprog), GFP_KERNEL); + if (!fprog) + return -ENOMEM; + fprog->filter = kmemdup(filter, data_len, GFP_KERNEL); +@@ -262,7 +262,7 @@ static int __fprog_create(struct sock_fprog_kern **pfprog, u32 data_len, + return 0; + } + +-static void __fprog_destroy(struct sock_fprog_kern *fprog) ++static void __fprog_destroy(struct sock_fprog *fprog) + { + kfree(fprog->filter); + kfree(fprog); +@@ -273,7 +273,7 @@ static int lb_bpf_func_set(struct team *team, struct team_gsetter_ctx *ctx) + struct lb_priv *lb_priv = get_lb_priv(team); + struct sk_filter *fp = NULL; + struct sk_filter *orig_fp; +- struct sock_fprog_kern *fprog = NULL; ++ struct sock_fprog *fprog = NULL; + int err; + + if (ctx->data.bin_val.len) { diff --git a/drivers/net/tun.c b/drivers/net/tun.c -index ee328ba..c4a0041 100644 +index 98bad1f..f197d7a 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c -@@ -1876,7 +1876,7 @@ unlock: +@@ -1854,7 +1854,7 @@ unlock: } static long __tun_chr_ioctl(struct file *file, unsigned int cmd, @@ -46596,7 +49605,7 @@ index ee328ba..c4a0041 100644 { struct tun_file *tfile = file->private_data; struct tun_struct *tun; -@@ -1889,6 +1889,9 @@ static long __tun_chr_ioctl(struct file *file, unsigned int cmd, +@@ -1867,6 +1867,9 @@ static long __tun_chr_ioctl(struct file *file, unsigned int cmd, unsigned int ifindex; int ret; @@ -46607,7 +49616,7 @@ index ee328ba..c4a0041 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 660bd5e..ac59452 100644 +index a4272ed..cdd69ff 100644 --- a/drivers/net/usb/hso.c +++ b/drivers/net/usb/hso.c @@ -71,7 +71,7 @@ @@ -46619,7 +49628,7 @@ index 660bd5e..ac59452 100644 #define MOD_AUTHOR "Option Wireless" #define MOD_DESCRIPTION "USB High Speed Option driver" -@@ -1179,7 +1179,7 @@ static void put_rxbuf_data_and_resubmit_ctrl_urb(struct hso_serial *serial) +@@ -1177,7 +1177,7 @@ static void put_rxbuf_data_and_resubmit_ctrl_urb(struct hso_serial *serial) struct urb *urb; urb = serial->rx_urb[0]; @@ -46628,7 +49637,7 @@ index 660bd5e..ac59452 100644 count = put_rxbuf_data(urb, serial); if (count == -1) return; -@@ -1217,7 +1217,7 @@ static void hso_std_serial_read_bulk_callback(struct urb *urb) +@@ -1215,7 +1215,7 @@ static void hso_std_serial_read_bulk_callback(struct urb *urb) DUMP1(urb->transfer_buffer, urb->actual_length); /* Anyone listening? */ @@ -46637,7 +49646,7 @@ index 660bd5e..ac59452 100644 return; if (serial->parent->port_spec & HSO_INFO_CRC_BUG) -@@ -1287,8 +1287,7 @@ static int hso_serial_open(struct tty_struct *tty, struct file *filp) +@@ -1277,8 +1277,7 @@ static int hso_serial_open(struct tty_struct *tty, struct file *filp) tty_port_tty_set(&serial->port, tty); /* check for port already opened, if not set the termios */ @@ -46647,7 +49656,7 @@ index 660bd5e..ac59452 100644 serial->rx_state = RX_IDLE; /* Force default termio settings */ _hso_serial_set_termios(tty, NULL); -@@ -1300,7 +1299,7 @@ static int hso_serial_open(struct tty_struct *tty, struct file *filp) +@@ -1288,7 +1287,7 @@ static int hso_serial_open(struct tty_struct *tty, struct file *filp) result = hso_start_serial_device(serial->parent, GFP_KERNEL); if (result) { hso_stop_serial_device(serial->parent); @@ -46656,7 +49665,7 @@ index 660bd5e..ac59452 100644 kref_put(&serial->parent->ref, hso_serial_ref_free); } } else { -@@ -1337,10 +1336,10 @@ static void hso_serial_close(struct tty_struct *tty, struct file *filp) +@@ -1325,10 +1324,10 @@ static void hso_serial_close(struct tty_struct *tty, struct file *filp) /* reset the rts and dtr */ /* do the actual close */ @@ -46670,7 +49679,7 @@ index 660bd5e..ac59452 100644 tty_port_tty_set(&serial->port, NULL); if (!usb_gone) hso_stop_serial_device(serial->parent); -@@ -1416,7 +1415,7 @@ static void hso_serial_set_termios(struct tty_struct *tty, struct ktermios *old) +@@ -1403,7 +1402,7 @@ static void hso_serial_set_termios(struct tty_struct *tty, struct ktermios *old) /* the actual setup */ spin_lock_irqsave(&serial->serial_lock, flags); @@ -46679,7 +49688,7 @@ index 660bd5e..ac59452 100644 _hso_serial_set_termios(tty, old); else tty->termios = *old; -@@ -1885,7 +1884,7 @@ static void intr_callback(struct urb *urb) +@@ -1872,7 +1871,7 @@ static void intr_callback(struct urb *urb) D1("Pending read interrupt on port %d\n", i); spin_lock(&serial->serial_lock); if (serial->rx_state == RX_IDLE && @@ -46688,7 +49697,7 @@ index 660bd5e..ac59452 100644 /* Setup and send a ctrl req read on * port i */ if (!serial->rx_urb_filled[0]) { -@@ -3061,7 +3060,7 @@ static int hso_resume(struct usb_interface *iface) +@@ -3045,7 +3044,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)) { @@ -46698,7 +49707,7 @@ index 660bd5e..ac59452 100644 hso_start_serial_device(serial_table[i], GFP_NOIO); hso_kick_transmit(dev2ser(serial_table[i])); diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c -index 3fbfb08..2c16265 100644 +index 3eab74c..fb6097c 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers/net/usb/r8152.c @@ -567,7 +567,7 @@ struct r8152 { @@ -46733,7 +49742,7 @@ index a2515887..6d13233 100644 /* we will have to manufacture ethernet headers, prepare template */ diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c -index 8a852b5..668a4b6 100644 +index 7d9f84a..7f690da 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -47,7 +47,7 @@ module_param(gso, bool, 0444); @@ -46746,10 +49755,10 @@ index 8a852b5..668a4b6 100644 #define VIRTNET_DRIVER_VERSION "1.0.0" diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c -index 77dcf92..549924a 100644 +index 9f79192..838cf95 100644 --- a/drivers/net/vxlan.c +++ b/drivers/net/vxlan.c -@@ -2839,7 +2839,7 @@ nla_put_failure: +@@ -2838,7 +2838,7 @@ nla_put_failure: return -EMSGSIZE; } @@ -46758,7 +49767,7 @@ index 77dcf92..549924a 100644 .kind = "vxlan", .maxtype = IFLA_VXLAN_MAX, .policy = vxlan_policy, -@@ -2886,7 +2886,7 @@ static int vxlan_lowerdev_event(struct notifier_block *unused, +@@ -2885,7 +2885,7 @@ static int vxlan_lowerdev_event(struct notifier_block *unused, return NOTIFY_DONE; } @@ -46883,24 +49892,6 @@ index 5920c99..ff2e4a5 100644 }; static void -diff --git a/drivers/net/wan/x25_asy.c b/drivers/net/wan/x25_asy.c -index 5895f19..fa9fdfa 100644 ---- a/drivers/net/wan/x25_asy.c -+++ b/drivers/net/wan/x25_asy.c -@@ -122,8 +122,12 @@ static int x25_asy_change_mtu(struct net_device *dev, int newmtu) - { - struct x25_asy *sl = netdev_priv(dev); - unsigned char *xbuff, *rbuff; -- int len = 2 * newmtu; -+ int len; - -+ if (newmtu > 65534) -+ return -EINVAL; -+ -+ len = 2 * newmtu; - xbuff = kmalloc(len + 4, GFP_ATOMIC); - rbuff = kmalloc(len + 4, GFP_ATOMIC); - diff --git a/drivers/net/wan/z85230.c b/drivers/net/wan/z85230.c index feacc3b..5bac0de 100644 --- a/drivers/net/wan/z85230.c @@ -46980,7 +49971,7 @@ index 64747d4..17c4cf3 100644 /* Only super-user can write RIDs */ diff --git a/drivers/net/wireless/at76c50x-usb.c b/drivers/net/wireless/at76c50x-usb.c -index 99b3bfa..9559372 100644 +index d48776e..373d049 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) @@ -46993,7 +49984,7 @@ index 99b3bfa..9559372 100644 return msecs_to_jiffies((s->poll_timeout[2] << 16) | (s->poll_timeout[1] << 8) diff --git a/drivers/net/wireless/ath/ath10k/htc.c b/drivers/net/wireless/ath/ath10k/htc.c -index 7f1bccd..ca2ffca 100644 +index e493db4..2c1853a 100644 --- a/drivers/net/wireless/ath/ath10k/htc.c +++ b/drivers/net/wireless/ath/ath10k/htc.c @@ -840,7 +840,10 @@ void ath10k_htc_stop(struct ath10k_htc *htc) @@ -47293,7 +50284,7 @@ index dc1d20c..f7a4f06 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 d2fe259..0c4c682 100644 +index 0ffb6ff..c0b7f0e 100644 --- a/drivers/net/wireless/iwlwifi/dvm/debugfs.c +++ b/drivers/net/wireless/iwlwifi/dvm/debugfs.c @@ -188,7 +188,7 @@ static ssize_t iwl_dbgfs_sram_write(struct file *file, @@ -47401,7 +50392,7 @@ index d2fe259..0c4c682 100644 int rts; if (!priv->cfg->ht_params) -@@ -2205,7 +2205,7 @@ static ssize_t iwl_dbgfs_echo_test_write(struct file *file, +@@ -2204,7 +2204,7 @@ static ssize_t iwl_dbgfs_echo_test_write(struct file *file, { struct iwl_priv *priv = file->private_data; char buf[8]; @@ -47410,7 +50401,7 @@ index d2fe259..0c4c682 100644 memset(buf, 0, sizeof(buf)); buf_size = min(count, sizeof(buf) - 1); -@@ -2239,7 +2239,7 @@ static ssize_t iwl_dbgfs_log_event_write(struct file *file, +@@ -2238,7 +2238,7 @@ static ssize_t iwl_dbgfs_log_event_write(struct file *file, struct iwl_priv *priv = file->private_data; u32 event_log_flag; char buf[8]; @@ -47419,7 +50410,7 @@ index d2fe259..0c4c682 100644 /* check that the interface is up */ if (!iwl_is_ready(priv)) -@@ -2293,7 +2293,7 @@ static ssize_t iwl_dbgfs_calib_disabled_write(struct file *file, +@@ -2292,7 +2292,7 @@ static ssize_t iwl_dbgfs_calib_disabled_write(struct file *file, struct iwl_priv *priv = file->private_data; char buf[8]; u32 calib_disabled; @@ -47428,32 +50419,11 @@ index d2fe259..0c4c682 100644 memset(buf, 0, sizeof(buf)); buf_size = min(count, sizeof(buf) - 1); -diff --git a/drivers/net/wireless/iwlwifi/dvm/main.c b/drivers/net/wireless/iwlwifi/dvm/main.c -index 6a6df71..eb5c93a 100644 ---- a/drivers/net/wireless/iwlwifi/dvm/main.c -+++ b/drivers/net/wireless/iwlwifi/dvm/main.c -@@ -1127,7 +1127,7 @@ static void iwl_option_config(struct iwl_priv *priv) - static int iwl_eeprom_init_hw_params(struct iwl_priv *priv) - { - struct iwl_nvm_data *data = priv->nvm_data; -- char *debug_msg; -+ static const char debug_msg[] = "Device SKU: 24GHz %s %s, 52GHz %s %s, 11.n %s %s\n"; - - if (data->sku_cap_11n_enable && - !priv->cfg->ht_params) { -@@ -1141,7 +1141,6 @@ static int iwl_eeprom_init_hw_params(struct iwl_priv *priv) - return -EINVAL; - } - -- debug_msg = "Device SKU: 24GHz %s %s, 52GHz %s %s, 11.n %s %s\n"; - IWL_DEBUG_INFO(priv, debug_msg, - data->sku_cap_band_24GHz_enable ? "" : "NOT", "enabled", - data->sku_cap_band_52GHz_enable ? "" : "NOT", "enabled", diff --git a/drivers/net/wireless/iwlwifi/pcie/trans.c b/drivers/net/wireless/iwlwifi/pcie/trans.c -index 295b24c..cb4f823 100644 +index 788085b..0bc852a 100644 --- a/drivers/net/wireless/iwlwifi/pcie/trans.c +++ b/drivers/net/wireless/iwlwifi/pcie/trans.c -@@ -1558,7 +1558,7 @@ static ssize_t iwl_dbgfs_interrupt_write(struct file *file, +@@ -1598,7 +1598,7 @@ static ssize_t iwl_dbgfs_interrupt_write(struct file *file, struct isr_statistics *isr_stats = &trans_pcie->isr_stats; char buf[8]; @@ -47462,7 +50432,7 @@ index 295b24c..cb4f823 100644 u32 reset_flag; memset(buf, 0, sizeof(buf)); -@@ -1579,7 +1579,7 @@ static ssize_t iwl_dbgfs_csr_write(struct file *file, +@@ -1619,7 +1619,7 @@ static ssize_t iwl_dbgfs_csr_write(struct file *file, { struct iwl_trans *trans = file->private_data; char buf[8]; @@ -47472,10 +50442,10 @@ index 295b24c..cb4f823 100644 memset(buf, 0, sizeof(buf)); diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c -index 9d7a52f..2729a99 100644 +index a312c65..162b13a 100644 --- a/drivers/net/wireless/mac80211_hwsim.c +++ b/drivers/net/wireless/mac80211_hwsim.c -@@ -2570,20 +2570,20 @@ static int __init init_mac80211_hwsim(void) +@@ -2573,20 +2573,20 @@ static int __init init_mac80211_hwsim(void) if (channels < 1) return -EINVAL; @@ -47511,7 +50481,7 @@ index 9d7a52f..2729a99 100644 spin_lock_init(&hwsim_radio_lock); INIT_LIST_HEAD(&hwsim_radios); diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c -index 39d22a1..4ec8612 100644 +index d2a9a08..0cb175d 100644 --- a/drivers/net/wireless/rndis_wlan.c +++ b/drivers/net/wireless/rndis_wlan.c @@ -1236,7 +1236,7 @@ static int set_rts_threshold(struct usbnet *usbdev, u32 rts_threshold) @@ -47524,7 +50494,7 @@ index 39d22a1..4ec8612 100644 tmp = cpu_to_le32(rts_threshold); diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h -index 5d45a1a..6f5f041 100644 +index d13f25c..2573994 100644 --- a/drivers/net/wireless/rt2x00/rt2x00.h +++ b/drivers/net/wireless/rt2x00/rt2x00.h @@ -375,7 +375,7 @@ struct rt2x00_intf { @@ -47805,10 +50775,10 @@ index 61be1d9..dec05d7 100644 }; diff --git a/drivers/parport/procfs.c b/drivers/parport/procfs.c -index 92ed045..62d39bd7 100644 +index 3b47080..6cd05dd 100644 --- a/drivers/parport/procfs.c +++ b/drivers/parport/procfs.c -@@ -64,7 +64,7 @@ static int do_active_device(ctl_table *table, int write, +@@ -64,7 +64,7 @@ static int do_active_device(struct ctl_table *table, int write, *ppos += len; @@ -47817,7 +50787,7 @@ index 92ed045..62d39bd7 100644 } #ifdef CONFIG_PARPORT_1284 -@@ -106,7 +106,7 @@ static int do_autoprobe(ctl_table *table, int write, +@@ -106,7 +106,7 @@ static int do_autoprobe(struct ctl_table *table, int write, *ppos += len; @@ -47842,7 +50812,7 @@ index 8dcccff..35d701d 100644 return retval; diff --git a/drivers/pci/hotplug/cpcihp_generic.c b/drivers/pci/hotplug/cpcihp_generic.c -index 7536eef..52dc8fa 100644 +index 04fcd78..39e83f1 100644 --- a/drivers/pci/hotplug/cpcihp_generic.c +++ b/drivers/pci/hotplug/cpcihp_generic.c @@ -73,7 +73,6 @@ static u16 port; @@ -47873,7 +50843,7 @@ index 7536eef..52dc8fa 100644 status = cpci_hp_register_controller(&generic_hpc); diff --git a/drivers/pci/hotplug/cpcihp_zt5550.c b/drivers/pci/hotplug/cpcihp_zt5550.c -index e8c4a7c..7046f5c 100644 +index 6757b3e..d3bad62 100644 --- a/drivers/pci/hotplug/cpcihp_zt5550.c +++ b/drivers/pci/hotplug/cpcihp_zt5550.c @@ -59,7 +59,6 @@ @@ -47918,10 +50888,10 @@ index e8c4a7c..7046f5c 100644 info("using ENUM# polling mode"); } diff --git a/drivers/pci/hotplug/cpqphp_nvram.c b/drivers/pci/hotplug/cpqphp_nvram.c -index 76ba8a1..20ca857 100644 +index 0968a9b..5a00edf 100644 --- a/drivers/pci/hotplug/cpqphp_nvram.c +++ b/drivers/pci/hotplug/cpqphp_nvram.c -@@ -428,9 +428,13 @@ static u32 store_HRT (void __iomem *rom_start) +@@ -427,9 +427,13 @@ static u32 store_HRT (void __iomem *rom_start) void compaq_nvram_init (void __iomem *rom_start) { @@ -47936,10 +50906,10 @@ index 76ba8a1..20ca857 100644 /* initialize our int15 lock */ diff --git a/drivers/pci/hotplug/pci_hotplug_core.c b/drivers/pci/hotplug/pci_hotplug_core.c -index cfa92a9..29539c5 100644 +index 56d8486..f26113f 100644 --- a/drivers/pci/hotplug/pci_hotplug_core.c +++ b/drivers/pci/hotplug/pci_hotplug_core.c -@@ -441,8 +441,10 @@ int __pci_hp_register(struct hotplug_slot *slot, struct pci_bus *bus, +@@ -436,8 +436,10 @@ int __pci_hp_register(struct hotplug_slot *slot, struct pci_bus *bus, return -EINVAL; } @@ -47953,7 +50923,7 @@ index cfa92a9..29539c5 100644 mutex_lock(&pci_hp_mutex); /* diff --git a/drivers/pci/hotplug/pciehp_core.c b/drivers/pci/hotplug/pciehp_core.c -index 0e0a2ff..29dff57 100644 +index a2297db..7c7d161 100644 --- a/drivers/pci/hotplug/pciehp_core.c +++ b/drivers/pci/hotplug/pciehp_core.c @@ -92,7 +92,7 @@ static int init_slot(struct controller *ctrl) @@ -47966,10 +50936,10 @@ index 0e0a2ff..29dff57 100644 int retval = -ENOMEM; diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c -index fb02fc2..83dc2c3 100644 +index 13f3d30..363cb44 100644 --- a/drivers/pci/msi.c +++ b/drivers/pci/msi.c -@@ -524,8 +524,8 @@ static int populate_msi_sysfs(struct pci_dev *pdev) +@@ -523,8 +523,8 @@ static int populate_msi_sysfs(struct pci_dev *pdev) { struct attribute **msi_attrs; struct attribute *msi_attr; @@ -47980,7 +50950,7 @@ index fb02fc2..83dc2c3 100644 const struct attribute_group **msi_irq_groups; struct msi_desc *entry; int ret = -ENOMEM; -@@ -589,7 +589,7 @@ error_attrs: +@@ -584,7 +584,7 @@ error_attrs: count = 0; msi_attr = msi_attrs[count]; while (msi_attr) { @@ -47990,10 +50960,10 @@ index fb02fc2..83dc2c3 100644 kfree(msi_dev_attr); ++count; diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c -index 4e0acef..bd98e31 100644 +index 9ff0a90..e819dda 100644 --- a/drivers/pci/pci-sysfs.c +++ b/drivers/pci/pci-sysfs.c -@@ -1101,7 +1101,7 @@ static int pci_create_attr(struct pci_dev *pdev, int num, int write_combine) +@@ -1134,7 +1134,7 @@ static int pci_create_attr(struct pci_dev *pdev, int num, int write_combine) { /* allocate attribute structure, piggyback attribute name */ int name_len = write_combine ? 13 : 10; @@ -48002,7 +50972,7 @@ index 4e0acef..bd98e31 100644 int retval; res_attr = kzalloc(sizeof(*res_attr) + name_len, GFP_ATOMIC); -@@ -1286,7 +1286,7 @@ static struct device_attribute reset_attr = __ATTR(reset, 0200, NULL, reset_stor +@@ -1311,7 +1311,7 @@ static struct device_attribute reset_attr = __ATTR(reset, 0200, NULL, reset_stor static int pci_create_capabilities_sysfs(struct pci_dev *dev) { int retval; @@ -48011,7 +50981,7 @@ index 4e0acef..bd98e31 100644 /* If the device has VPD, try to expose it in sysfs. */ if (dev->vpd) { -@@ -1333,7 +1333,7 @@ int __must_check pci_create_sysfs_dev_files (struct pci_dev *pdev) +@@ -1358,7 +1358,7 @@ int __must_check pci_create_sysfs_dev_files(struct pci_dev *pdev) { int retval; int rom_size = 0; @@ -48021,7 +50991,7 @@ index 4e0acef..bd98e31 100644 if (!sysfs_initialized) return -EACCES; diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h -index 6bd0822..35bc2b3 100644 +index 0601890..dc15007 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -91,7 +91,7 @@ struct pci_vpd_ops { @@ -48051,12 +51021,12 @@ index e1e7026..d28dd33 100644 #define ASPM_STATE_ALL (ASPM_STATE_L0S | ASPM_STATE_L1) diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c -index ef09f5f..49ac62f 100644 +index e3cf8a2..be1baf0 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c -@@ -175,7 +175,7 @@ int __pci_read_base(struct pci_dev *dev, enum pci_bar_type type, +@@ -176,7 +176,7 @@ int __pci_read_base(struct pci_dev *dev, enum pci_bar_type type, struct pci_bus_region region, inverted_region; - bool bar_too_big = false, bar_disabled = false; + bool bar_too_big = false, bar_too_high = false, bar_invalid = false; - mask = type ? PCI_ROM_ADDRESS_MASK : ~0; + mask = type ? (u32)PCI_ROM_ADDRESS_MASK : ~0; @@ -48064,7 +51034,7 @@ index ef09f5f..49ac62f 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 46d1378..30e452b 100644 +index 3f155e7..0f4b1f0 100644 --- a/drivers/pci/proc.c +++ b/drivers/pci/proc.c @@ -434,7 +434,16 @@ static const struct file_operations proc_bus_pci_dev_operations = { @@ -48085,10 +51055,10 @@ index 46d1378..30e452b 100644 &proc_bus_pci_dev_operations); proc_initialized = 1; diff --git a/drivers/platform/chrome/chromeos_laptop.c b/drivers/platform/chrome/chromeos_laptop.c -index 7f3aad0..7d604bb 100644 +index 7f1a2e2..bc4b405 100644 --- a/drivers/platform/chrome/chromeos_laptop.c +++ b/drivers/platform/chrome/chromeos_laptop.c -@@ -406,7 +406,7 @@ static struct chromeos_laptop cr48 = { +@@ -395,7 +395,7 @@ static struct chromeos_laptop cr48 = { .callback = chromeos_laptop_dmi_matched, \ .driver_data = (void *)&board_ @@ -48098,10 +51068,10 @@ index 7f3aad0..7d604bb 100644 .ident = "Samsung Series 5 550", .matches = { diff --git a/drivers/platform/x86/alienware-wmi.c b/drivers/platform/x86/alienware-wmi.c -index 541f951..4dfd598 100644 +index 297b664..ab91e39 100644 --- a/drivers/platform/x86/alienware-wmi.c +++ b/drivers/platform/x86/alienware-wmi.c -@@ -132,7 +132,7 @@ struct wmax_led_args { +@@ -133,7 +133,7 @@ struct wmax_led_args { } __packed; static struct platform_device *platform_device; @@ -48110,7 +51080,7 @@ index 541f951..4dfd598 100644 static struct attribute **zone_attrs; static struct platform_zone *zone_data; -@@ -143,7 +143,7 @@ static struct platform_driver platform_driver = { +@@ -144,7 +144,7 @@ static struct platform_driver platform_driver = { } }; @@ -48120,10 +51090,10 @@ index 541f951..4dfd598 100644 }; diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c -index c5e082f..d6307a0 100644 +index 3c6cced..12e0771 100644 --- a/drivers/platform/x86/asus-wmi.c +++ b/drivers/platform/x86/asus-wmi.c -@@ -1595,6 +1595,10 @@ static int show_dsts(struct seq_file *m, void *data) +@@ -1592,6 +1592,10 @@ static int show_dsts(struct seq_file *m, void *data) int err; u32 retval = -1; @@ -48134,7 +51104,7 @@ index c5e082f..d6307a0 100644 err = asus_wmi_get_devstate(asus, asus->debug.dev_id, &retval); if (err < 0) -@@ -1611,6 +1615,10 @@ static int show_devs(struct seq_file *m, void *data) +@@ -1608,6 +1612,10 @@ static int show_devs(struct seq_file *m, void *data) int err; u32 retval = -1; @@ -48145,7 +51115,7 @@ index c5e082f..d6307a0 100644 err = asus_wmi_set_devstate(asus->debug.dev_id, asus->debug.ctrl_param, &retval); -@@ -1635,6 +1643,10 @@ static int show_call(struct seq_file *m, void *data) +@@ -1632,6 +1640,10 @@ static int show_call(struct seq_file *m, void *data) union acpi_object *obj; acpi_status status; @@ -48253,7 +51223,7 @@ index 9c5a074..06c976a 100644 static ssize_t sony_nc_smart_conn_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 15e61c1..40a39c7 100644 +index d82f196..5458f34 100644 --- a/drivers/platform/x86/thinkpad_acpi.c +++ b/drivers/platform/x86/thinkpad_acpi.c @@ -2094,7 +2094,7 @@ static int hotkey_mask_get(void) @@ -48337,28 +51307,6 @@ index 438d4c7..ca8a2fb 100644 + + pax_close_kernel(); } -diff --git a/drivers/pnp/resource.c b/drivers/pnp/resource.c -index 01712cb..782e822 100644 ---- a/drivers/pnp/resource.c -+++ b/drivers/pnp/resource.c -@@ -360,7 +360,7 @@ int pnp_check_irq(struct pnp_dev *dev, struct resource *res) - return 1; - - /* check if the resource is valid */ -- if (*irq < 0 || *irq > 15) -+ if (*irq > 15) - return 0; - - /* check if the resource is reserved */ -@@ -424,7 +424,7 @@ int pnp_check_dma(struct pnp_dev *dev, struct resource *res) - return 1; - - /* check if the resource is valid */ -- if (*dma < 0 || *dma == 4 || *dma > 7) -+ if (*dma == 4 || *dma > 7) - return 0; - - /* check if the resource is reserved */ diff --git a/drivers/power/pda_power.c b/drivers/power/pda_power.c index 0c52e2a..3421ab7 100644 --- a/drivers/power/pda_power.c @@ -48404,7 +51352,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 2660664..75fcb04 100644 +index 5a5a24e..f7a3754 100644 --- a/drivers/power/power_supply_core.c +++ b/drivers/power/power_supply_core.c @@ -28,7 +28,10 @@ EXPORT_SYMBOL_GPL(power_supply_class); @@ -48419,7 +51367,7 @@ index 2660664..75fcb04 100644 static bool __power_supply_is_supplied_by(struct power_supply *supplier, struct power_supply *supply) -@@ -628,7 +631,7 @@ static int __init power_supply_class_init(void) +@@ -639,7 +642,7 @@ static int __init power_supply_class_init(void) return PTR_ERR(power_supply_class); power_supply_class->dev_uevent = power_supply_uevent; @@ -48641,6 +51589,18 @@ index 84419af..268ede8 100644 power_zone->zone_dev_attrs[count++] = &dev_attr_energy_uj.attr; } +diff --git a/drivers/ptp/Kconfig b/drivers/ptp/Kconfig +index ee3de34..bec7285 100644 +--- a/drivers/ptp/Kconfig ++++ b/drivers/ptp/Kconfig +@@ -8,7 +8,6 @@ config PTP_1588_CLOCK + tristate "PTP clock support" + depends on NET + select PPS +- select NET_PTP_CLASSIFY + help + The IEEE 1588 standard defines a method to precisely + synchronize distributed clocks over Ethernet networks. The diff --git a/drivers/ptp/ptp_private.h b/drivers/ptp/ptp_private.h index 9c5d414..c7900ce 100644 --- a/drivers/ptp/ptp_private.h @@ -48668,10 +51628,10 @@ index 302e626..12579af 100644 da->attr.name = info->pin_config[i].name; da->attr.mode = 0644; diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c -index 9a09f3c..450b523 100644 +index 4c1f999..11078c9 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c -@@ -3380,7 +3380,7 @@ regulator_register(const struct regulator_desc *regulator_desc, +@@ -3391,7 +3391,7 @@ regulator_register(const struct regulator_desc *regulator_desc, { const struct regulation_constraints *constraints = NULL; const struct regulator_init_data *init_data; @@ -48680,8 +51640,8 @@ index 9a09f3c..450b523 100644 struct regulator_dev *rdev; struct device *dev; int ret, i; -@@ -3450,7 +3450,7 @@ regulator_register(const struct regulator_desc *regulator_desc, - rdev->dev.of_node = config->of_node; +@@ -3461,7 +3461,7 @@ regulator_register(const struct regulator_desc *regulator_desc, + rdev->dev.of_node = of_node_get(config->of_node); rdev->dev.parent = dev; dev_set_name(&rdev->dev, "regulator.%d", - atomic_inc_return(®ulator_no) - 1); @@ -48745,10 +51705,10 @@ index f374fa5..26f0683 100644 mc13xxx_data = mc13xxx_parse_regulators_dt(pdev, mc13892_regulators, ARRAY_SIZE(mc13892_regulators)); diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c -index 0963c93..ea29cce 100644 +index b0e4a3e..e5dc11e 100644 --- a/drivers/rtc/rtc-cmos.c +++ b/drivers/rtc/rtc-cmos.c -@@ -777,7 +777,9 @@ cmos_do_probe(struct device *dev, struct resource *ports, int rtc_irq) +@@ -789,7 +789,9 @@ cmos_do_probe(struct device *dev, struct resource *ports, int rtc_irq) hpet_rtc_timer_init(); /* export at least the first block of NVRAM */ @@ -48808,47 +51768,6 @@ index 11880c1..b823aa4 100644 ret = sysfs_create_bin_file(&pdev->dev.kobj, &m48t59_nvram_attr); if (ret) -diff --git a/drivers/scsi/aic7xxx/aic79xx_pci.c b/drivers/scsi/aic7xxx/aic79xx_pci.c -index 14b5f8d..cc9bd26 100644 ---- a/drivers/scsi/aic7xxx/aic79xx_pci.c -+++ b/drivers/scsi/aic7xxx/aic79xx_pci.c -@@ -827,7 +827,7 @@ ahd_pci_intr(struct ahd_softc *ahd) - for (bit = 0; bit < 8; bit++) { - - if ((pci_status[i] & (0x1 << bit)) != 0) { -- static const char *s; -+ const char *s; - - s = pci_status_strings[bit]; - if (i == 7/*TARG*/ && bit == 3) -@@ -887,23 +887,15 @@ ahd_pci_split_intr(struct ahd_softc *ahd, u_int intstat) - - for (bit = 0; bit < 8; bit++) { - -- if ((split_status[i] & (0x1 << bit)) != 0) { -- static const char *s; -- -- s = split_status_strings[bit]; -- printk(s, ahd_name(ahd), -+ if ((split_status[i] & (0x1 << bit)) != 0) -+ printk(split_status_strings[bit], ahd_name(ahd), - split_status_source[i]); -- } - - if (i > 1) - continue; - -- if ((sg_split_status[i] & (0x1 << bit)) != 0) { -- static const char *s; -- -- s = split_status_strings[bit]; -- printk(s, ahd_name(ahd), "SG"); -- } -+ if ((sg_split_status[i] & (0x1 << bit)) != 0) -+ printk(split_status_strings[bit], ahd_name(ahd), "SG"); - } - } - /* diff --git a/drivers/scsi/bfa/bfa_fcpim.h b/drivers/scsi/bfa/bfa_fcpim.h index e693af6..2e525b6 100644 --- a/drivers/scsi/bfa/bfa_fcpim.h @@ -49044,10 +51963,10 @@ index 3cbb57a..95e47a3 100644 /* These three are default values which can be overridden */ diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c -index fda6cf1..7a6b5d8 100644 +index 489e83b..193815b 100644 --- a/drivers/scsi/hpsa.c +++ b/drivers/scsi/hpsa.c -@@ -699,10 +699,10 @@ static inline u32 next_command(struct ctlr_info *h, u8 q) +@@ -701,10 +701,10 @@ static inline u32 next_command(struct ctlr_info *h, u8 q) unsigned long flags; if (h->transMethod & CFGTBL_Trans_io_accel1) @@ -49060,7 +51979,7 @@ index fda6cf1..7a6b5d8 100644 if ((rq->head[rq->current_entry] & 1) == rq->wraparound) { a = rq->head[rq->current_entry]; -@@ -5460,7 +5460,7 @@ static void start_io(struct ctlr_info *h) +@@ -5455,7 +5455,7 @@ static void start_io(struct ctlr_info *h, unsigned long *flags) while (!list_empty(&h->reqQ)) { c = list_entry(h->reqQ.next, struct CommandList, list); /* can't do anything if fifo is full */ @@ -49069,16 +51988,16 @@ index fda6cf1..7a6b5d8 100644 h->fifo_recently_full = 1; dev_warn(&h->pdev->dev, "fifo full\n"); break; -@@ -5484,7 +5484,7 @@ static void start_io(struct ctlr_info *h) +@@ -5477,7 +5477,7 @@ static void start_io(struct ctlr_info *h, unsigned long *flags) /* Tell the controller execute command */ - spin_unlock_irqrestore(&h->lock, flags); + spin_unlock_irqrestore(&h->lock, *flags); - h->access.submit_command(h, c); + h->access->submit_command(h, c); - spin_lock_irqsave(&h->lock, flags); + spin_lock_irqsave(&h->lock, *flags); } - spin_unlock_irqrestore(&h->lock, flags); -@@ -5492,17 +5492,17 @@ static void start_io(struct ctlr_info *h) + } +@@ -5493,17 +5493,17 @@ static void lock_and_start_io(struct ctlr_info *h) static inline unsigned long get_next_completion(struct ctlr_info *h, u8 q) { @@ -49099,7 +52018,7 @@ index fda6cf1..7a6b5d8 100644 (h->interrupts_enabled == 0); } -@@ -6456,7 +6456,7 @@ static int hpsa_pci_init(struct ctlr_info *h) +@@ -6459,7 +6459,7 @@ static int hpsa_pci_init(struct ctlr_info *h) if (prod_index < 0) return -ENODEV; h->product_name = products[prod_index].product_name; @@ -49108,16 +52027,16 @@ index fda6cf1..7a6b5d8 100644 pci_disable_link_state(h->pdev, PCIE_LINK_STATE_L0S | PCIE_LINK_STATE_L1 | PCIE_LINK_STATE_CLKPM); -@@ -6735,7 +6735,7 @@ static void controller_lockup_detected(struct ctlr_info *h) - { +@@ -6781,7 +6781,7 @@ static void controller_lockup_detected(struct ctlr_info *h) unsigned long flags; + u32 lockup_detected; - h->access.set_intr_mask(h, HPSA_INTR_OFF); + h->access->set_intr_mask(h, HPSA_INTR_OFF); spin_lock_irqsave(&h->lock, flags); - h->lockup_detected = readl(h->vaddr + SA5_SCRATCHPAD_OFFSET); - spin_unlock_irqrestore(&h->lock, flags); -@@ -6963,7 +6963,7 @@ reinit_after_soft_reset: + lockup_detected = readl(h->vaddr + SA5_SCRATCHPAD_OFFSET); + if (!lockup_detected) { +@@ -7022,7 +7022,7 @@ reinit_after_soft_reset: } /* make sure the board interrupts are off */ @@ -49126,7 +52045,7 @@ index fda6cf1..7a6b5d8 100644 if (hpsa_request_irq(h, do_hpsa_intr_msi, do_hpsa_intr_intx)) goto clean2; -@@ -6998,7 +6998,7 @@ reinit_after_soft_reset: +@@ -7057,7 +7057,7 @@ reinit_after_soft_reset: * fake ones to scoop up any residual completions. */ spin_lock_irqsave(&h->lock, flags); @@ -49135,7 +52054,7 @@ index fda6cf1..7a6b5d8 100644 spin_unlock_irqrestore(&h->lock, flags); free_irqs(h); rc = hpsa_request_irq(h, hpsa_msix_discard_completions, -@@ -7017,9 +7017,9 @@ reinit_after_soft_reset: +@@ -7076,9 +7076,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"); @@ -49147,7 +52066,7 @@ index fda6cf1..7a6b5d8 100644 rc = controller_reset_failed(h->cfgtable); if (rc) -@@ -7045,7 +7045,7 @@ reinit_after_soft_reset: +@@ -7104,7 +7104,7 @@ reinit_after_soft_reset: h->drv_req_rescan = 0; /* Turn the interrupts on so we can service requests */ @@ -49156,7 +52075,7 @@ index fda6cf1..7a6b5d8 100644 hpsa_hba_inquiry(h); hpsa_register_scsi(h); /* hook ourselves into SCSI subsystem */ -@@ -7114,7 +7114,7 @@ static void hpsa_shutdown(struct pci_dev *pdev) +@@ -7169,7 +7169,7 @@ static void hpsa_shutdown(struct pci_dev *pdev) * To write all data in the battery backed cache to disks */ hpsa_flush_cache(h); @@ -49165,7 +52084,7 @@ index fda6cf1..7a6b5d8 100644 hpsa_free_irqs_and_disable_msix(h); } -@@ -7232,7 +7232,7 @@ static void hpsa_enter_performant_mode(struct ctlr_info *h, u32 trans_support) +@@ -7287,7 +7287,7 @@ static void hpsa_enter_performant_mode(struct ctlr_info *h, u32 trans_support) CFGTBL_Trans_enable_directed_msix | (trans_support & (CFGTBL_Trans_io_accel1 | CFGTBL_Trans_io_accel2)); @@ -49174,7 +52093,16 @@ index fda6cf1..7a6b5d8 100644 /* This is a bit complicated. There are 8 registers on * the controller which we write to to tell it 8 different -@@ -7297,12 +7297,12 @@ static void hpsa_enter_performant_mode(struct ctlr_info *h, u32 trans_support) +@@ -7329,7 +7329,7 @@ static void hpsa_enter_performant_mode(struct ctlr_info *h, u32 trans_support) + * perform the superfluous readl() after each command submission. + */ + if (trans_support & (CFGTBL_Trans_io_accel1 | CFGTBL_Trans_io_accel2)) +- access = SA5_performant_access_no_read; ++ access = &SA5_performant_access_no_read; + + /* Controller spec: zero out this buffer. */ + for (i = 0; i < h->nreply_queues; i++) +@@ -7359,12 +7359,12 @@ static void hpsa_enter_performant_mode(struct ctlr_info *h, u32 trans_support) * enable outbound interrupt coalescing in accelerator mode; */ if (trans_support & CFGTBL_Trans_io_accel1) { @@ -49190,10 +52118,10 @@ index fda6cf1..7a6b5d8 100644 writel(4, &h->cfgtable->HostWrite.CoalIntCount); } diff --git a/drivers/scsi/hpsa.h b/drivers/scsi/hpsa.h -index 44235a2..962e91b 100644 +index 24472ce..8782caf 100644 --- a/drivers/scsi/hpsa.h +++ b/drivers/scsi/hpsa.h -@@ -128,7 +128,7 @@ struct ctlr_info { +@@ -127,7 +127,7 @@ struct ctlr_info { unsigned int msix_vector; unsigned int msi_vector; int intr_mode; /* either PERF_MODE_INT or SIMPLE_MODE_INT */ @@ -49202,7 +52130,7 @@ index 44235a2..962e91b 100644 char hba_mode_enabled; /* queue and queue Info */ -@@ -541,35 +541,35 @@ static unsigned long SA5_ioaccel_mode1_completed(struct ctlr_info *h, u8 q) +@@ -536,43 +536,43 @@ static unsigned long SA5_ioaccel_mode1_completed(struct ctlr_info *h, u8 q) } static struct access_method SA5_access = { @@ -49257,6 +52185,19 @@ index 44235a2..962e91b 100644 + .command_completed = SA5_performant_completed, }; + static struct access_method SA5_performant_access_no_read = { +- SA5_submit_command_no_read, +- SA5_performant_intr_mask, +- SA5_fifo_full, +- SA5_performant_intr_pending, +- SA5_performant_completed, ++ .submit_command = SA5_submit_command_no_read, ++ .set_intr_mask = SA5_performant_intr_mask, ++ .fifo_full = SA5_fifo_full, ++ .intr_pending = SA5_performant_intr_pending, ++ .command_completed = SA5_performant_completed, + }; + struct board_type { diff --git a/drivers/scsi/libfc/fc_exch.c b/drivers/scsi/libfc/fc_exch.c index 1b3a094..068e683 100644 @@ -49417,7 +52358,7 @@ index 766098a..1c6c971 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 94a3caf..a118dec 100644 +index 434e903..5a4a79b 100644 --- a/drivers/scsi/lpfc/lpfc.h +++ b/drivers/scsi/lpfc/lpfc.h @@ -430,7 +430,7 @@ struct lpfc_vport { @@ -49429,7 +52370,7 @@ index 94a3caf..a118dec 100644 #endif uint8_t stat_data_enabled; uint8_t stat_data_blocked; -@@ -879,8 +879,8 @@ struct lpfc_hba { +@@ -880,8 +880,8 @@ struct lpfc_hba { struct timer_list fabric_block_timer; unsigned long bit_flags; #define FABRIC_COMANDS_BLOCKED 0 @@ -49440,7 +52381,7 @@ index 94a3caf..a118dec 100644 unsigned long last_rsrc_error_time; unsigned long last_ramp_down_time; #ifdef CONFIG_SCSI_LPFC_DEBUG_FS -@@ -915,7 +915,7 @@ struct lpfc_hba { +@@ -916,7 +916,7 @@ struct lpfc_hba { struct dentry *debug_slow_ring_trc; struct lpfc_debugfs_trc *slow_ring_trc; @@ -49450,7 +52391,7 @@ index 94a3caf..a118dec 100644 struct dentry *idiag_root; struct dentry *idiag_pci_cfg; diff --git a/drivers/scsi/lpfc/lpfc_debugfs.c b/drivers/scsi/lpfc/lpfc_debugfs.c -index 828c08e..e3378e0 100644 +index b0aedce..89c6ca6 100644 --- a/drivers/scsi/lpfc/lpfc_debugfs.c +++ b/drivers/scsi/lpfc/lpfc_debugfs.c @@ -106,7 +106,7 @@ MODULE_PARM_DESC(lpfc_debugfs_mask_disc_trc, @@ -49533,10 +52474,10 @@ index 828c08e..e3378e0 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 635eeb3..038aef6 100644 +index 06f9a5b..82812092 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c -@@ -11194,8 +11194,10 @@ lpfc_init(void) +@@ -11296,8 +11296,10 @@ lpfc_init(void) "misc_register returned with status %d", error); if (lpfc_enable_npiv) { @@ -49550,7 +52491,7 @@ index 635eeb3..038aef6 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 462453e..c0023a6 100644 +index 2df11da..e660a2c 100644 --- a/drivers/scsi/lpfc/lpfc_scsi.c +++ b/drivers/scsi/lpfc/lpfc_scsi.c @@ -382,7 +382,7 @@ lpfc_rampdown_queue_depth(struct lpfc_hba *phba) @@ -49585,7 +52526,7 @@ index 462453e..c0023a6 100644 /** diff --git a/drivers/scsi/mpt2sas/mpt2sas_scsih.c b/drivers/scsi/mpt2sas/mpt2sas_scsih.c -index 6fd7d40..b444223 100644 +index 5055f92..376cd98 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_scsih.c +++ b/drivers/scsi/mpt2sas/mpt2sas_scsih.c @@ -1557,7 +1557,7 @@ _scsih_get_resync(struct device *dev) @@ -49606,7 +52547,7 @@ index 6fd7d40..b444223 100644 unsigned long flags; Mpi2RaidVolPage0_t vol_pg0; Mpi2ConfigReply_t mpi_reply; -@@ -6637,7 +6637,7 @@ _scsih_sas_ir_operation_status_event(struct MPT2SAS_ADAPTER *ioc, +@@ -6631,7 +6631,7 @@ _scsih_sas_ir_operation_status_event(struct MPT2SAS_ADAPTER *ioc, struct fw_event_work *fw_event) { Mpi2EventDataIrOperationStatus_t *event_data = fw_event->event_data; @@ -49615,7 +52556,7 @@ index 6fd7d40..b444223 100644 unsigned long flags; u16 handle; -@@ -7108,7 +7108,7 @@ _scsih_scan_for_devices_after_reset(struct MPT2SAS_ADAPTER *ioc) +@@ -7102,7 +7102,7 @@ _scsih_scan_for_devices_after_reset(struct MPT2SAS_ADAPTER *ioc) u64 sas_address; struct _sas_device *sas_device; struct _sas_node *expander_device; @@ -49732,7 +52673,7 @@ 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 07befcf..c0bff13 100644 +index 16fe519..3b1ec82 100644 --- a/drivers/scsi/qla2xxx/qla_attr.c +++ b/drivers/scsi/qla2xxx/qla_attr.c @@ -2188,7 +2188,7 @@ qla24xx_vport_disable(struct fc_vport *fc_vport, bool disable) @@ -49754,10 +52695,10 @@ index 07befcf..c0bff13 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 e665e81..16e84e6 100644 +index d48dea8..0845f78 100644 --- a/drivers/scsi/qla2xxx/qla_gbl.h +++ b/drivers/scsi/qla2xxx/qla_gbl.h -@@ -557,8 +557,8 @@ extern void qla2x00_get_sym_node_name(scsi_qla_host_t *, uint8_t *); +@@ -569,8 +569,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; @@ -49769,10 +52710,10 @@ index e665e81..16e84e6 100644 extern void qla2x00_free_sysfs_attr(scsi_qla_host_t *, bool); 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 19e99cc..b3c0b7b 100644 +index d96bfb5..d7afe90 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c -@@ -1493,8 +1493,10 @@ qla2x00_config_dma_addressing(struct qla_hw_data *ha) +@@ -1490,8 +1490,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; @@ -49786,7 +52727,7 @@ index 19e99cc..b3c0b7b 100644 } } diff --git a/drivers/scsi/qla4xxx/ql4_def.h b/drivers/scsi/qla4xxx/ql4_def.h -index 73a5022..4e0797c 100644 +index 8f6d0fb..1b21097 100644 --- a/drivers/scsi/qla4xxx/ql4_def.h +++ b/drivers/scsi/qla4xxx/ql4_def.h @@ -305,7 +305,7 @@ struct ddb_entry { @@ -49799,10 +52740,10 @@ index 73a5022..4e0797c 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 459b9f7..2930a68 100644 +index 3202063..f9f0ff6 100644 --- a/drivers/scsi/qla4xxx/ql4_os.c +++ b/drivers/scsi/qla4xxx/ql4_os.c -@@ -4499,12 +4499,12 @@ static void qla4xxx_check_relogin_flash_ddb(struct iscsi_cls_session *cls_sess) +@@ -4494,12 +4494,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 */ @@ -49817,7 +52758,7 @@ index 459b9f7..2930a68 100644 ddb_entry->default_time2wait + 4)); set_bit(DPC_RELOGIN_DEVICE, &ha->dpc_flags); atomic_set(&ddb_entry->retry_relogin_timer, -@@ -6609,7 +6609,7 @@ static void qla4xxx_setup_flash_ddb_entry(struct scsi_qla_host *ha, +@@ -6607,7 +6607,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); @@ -49840,10 +52781,10 @@ index 88d46fe..7351be5 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 9db097a..ca5c291 100644 +index 3f50dfc..86af487 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c -@@ -1464,7 +1464,7 @@ static void scsi_kill_request(struct request *req, struct request_queue *q) +@@ -1423,7 +1423,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; @@ -49852,7 +52793,7 @@ index 9db097a..ca5c291 100644 /* * SCSI request completion path will do scsi_device_unbusy(), -@@ -1490,9 +1490,9 @@ static void scsi_softirq_done(struct request *rq) +@@ -1449,9 +1449,9 @@ static void scsi_softirq_done(struct request *rq) INIT_LIST_HEAD(&cmd->eh_entry); @@ -49891,7 +52832,7 @@ index e51add0..1e06a96 100644 /* * TODO: need to fixup sg_tablesize, max_segment_size, diff --git a/drivers/scsi/scsi_transport_fc.c b/drivers/scsi/scsi_transport_fc.c -index f80908f..22aba76 100644 +index 521f583..6b15966 100644 --- a/drivers/scsi/scsi_transport_fc.c +++ b/drivers/scsi/scsi_transport_fc.c @@ -498,7 +498,7 @@ static DECLARE_TRANSPORT_CLASS(fc_vport_class, @@ -49993,10 +52934,10 @@ index 13e8983..d306a68 100644 transport_setup_device(&rport->dev); diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c -index bffbd4b..cb1b68a 100644 +index 6825eda..be470c4 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c -@@ -2971,7 +2971,7 @@ static int sd_probe(struct device *dev) +@@ -2954,7 +2954,7 @@ static int sd_probe(struct device *dev) sdkp->disk = gd; sdkp->index = index; atomic_set(&sdkp->openers, 0); @@ -50006,7 +52947,7 @@ index bffbd4b..cb1b68a 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 df5e961..df6b97f 100644 +index 53268aab..17c2764 100644 --- a/drivers/scsi/sg.c +++ b/drivers/scsi/sg.c @@ -1102,7 +1102,7 @@ sg_ioctl(struct file *filp, unsigned int cmd_in, unsigned long arg) @@ -50019,7 +52960,7 @@ index df5e961..df6b97f 100644 return blk_trace_startstop(sdp->device->request_queue, 1); case BLKTRACESTOP: diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c -index 939edf4..3f50423 100644 +index d4f9670..d37b662 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -2204,7 +2204,7 @@ int spi_bus_unlock(struct spi_master *master) @@ -50032,7 +52973,7 @@ index 939edf4..3f50423 100644 static u8 *buf; diff --git a/drivers/staging/android/timed_output.c b/drivers/staging/android/timed_output.c -index 2c61783..4d49e4e 100644 +index c341ac1..bf9799f 100644 --- a/drivers/staging/android/timed_output.c +++ b/drivers/staging/android/timed_output.c @@ -25,7 +25,7 @@ @@ -50076,10 +53017,10 @@ index fe47cd3..19a1bd1 100644 static struct tty_driver *gdm_driver[TTY_MAX_COUNT]; static struct gdm *gdm_table[TTY_MAX_COUNT][GDM_TTY_MINOR]; diff --git a/drivers/staging/imx-drm/imx-drm-core.c b/drivers/staging/imx-drm/imx-drm-core.c -index c270c9a..94ddf82 100644 +index def8280..e3fd96a 100644 --- a/drivers/staging/imx-drm/imx-drm-core.c +++ b/drivers/staging/imx-drm/imx-drm-core.c -@@ -362,7 +362,7 @@ int imx_drm_add_crtc(struct drm_device *drm, struct drm_crtc *crtc, +@@ -355,7 +355,7 @@ int imx_drm_add_crtc(struct drm_device *drm, struct drm_crtc *crtc, if (imxdrm->pipes >= MAX_CRTC) return -EINVAL; @@ -50167,7 +53108,7 @@ index 750cac4..e4d751f 100644 srpc_service_t ping_test_service; void ping_init_test_service(void) diff --git a/drivers/staging/lustre/lustre/include/lustre_dlm.h b/drivers/staging/lustre/lustre/include/lustre_dlm.h -index 3e25f00..0d59cf5 100644 +index 0c6b784..c64235c 100644 --- a/drivers/staging/lustre/lustre/include/lustre_dlm.h +++ b/drivers/staging/lustre/lustre/include/lustre_dlm.h @@ -1141,7 +1141,7 @@ struct ldlm_callback_suite { @@ -50180,10 +53121,10 @@ index 3e25f00..0d59cf5 100644 /* ldlm_lockd.c */ int ldlm_del_waiting_lock(struct ldlm_lock *lock); diff --git a/drivers/staging/lustre/lustre/include/obd.h b/drivers/staging/lustre/lustre/include/obd.h -index 72cf3fe..4beac19 100644 +index d5c4613..a341678 100644 --- a/drivers/staging/lustre/lustre/include/obd.h +++ b/drivers/staging/lustre/lustre/include/obd.h -@@ -1427,7 +1427,7 @@ struct md_ops { +@@ -1439,7 +1439,7 @@ struct md_ops { * lprocfs_alloc_md_stats() in obdclass/lprocfs_status.c. Also, add a * wrapper function in include/linux/obd_class.h. */ @@ -50237,10 +53178,10 @@ index e947b91..f408990 100644 dummy.data = &backoff; dummy.proc_handler = &proc_dointvec; diff --git a/drivers/staging/lustre/lustre/libcfs/module.c b/drivers/staging/lustre/lustre/libcfs/module.c -index 24ae26d..9d09cab 100644 +index b16ee08..a3db5c6 100644 --- a/drivers/staging/lustre/lustre/libcfs/module.c +++ b/drivers/staging/lustre/lustre/libcfs/module.c -@@ -313,11 +313,11 @@ out: +@@ -314,11 +314,11 @@ out: struct cfs_psdev_ops libcfs_psdev_ops = { @@ -50258,7 +53199,7 @@ index 24ae26d..9d09cab 100644 extern int insert_proc(void); diff --git a/drivers/staging/lustre/lustre/llite/dir.c b/drivers/staging/lustre/lustre/llite/dir.c -index 7fbc18e..f982071 100644 +index ae6f61a..03c3d5d 100644 --- a/drivers/staging/lustre/lustre/llite/dir.c +++ b/drivers/staging/lustre/lustre/llite/dir.c @@ -660,7 +660,7 @@ int ll_dir_setdirstripe(struct inode *dir, struct lmv_user_md *lump, @@ -50355,7 +53296,7 @@ index a0f4868..139f1fb 100644 dev_kfree_skb_irq(skb); } diff --git a/drivers/staging/octeon/ethernet.c b/drivers/staging/octeon/ethernet.c -index ff7214a..6dd90f0 100644 +index da9dd6b..8e3e0f5 100644 --- a/drivers/staging/octeon/ethernet.c +++ b/drivers/staging/octeon/ethernet.c @@ -247,11 +247,11 @@ static struct net_device_stats *cvm_oct_common_get_stats(struct net_device *dev) @@ -50375,10 +53316,10 @@ index ff7214a..6dd90f0 100644 } diff --git a/drivers/staging/rtl8188eu/include/hal_intf.h b/drivers/staging/rtl8188eu/include/hal_intf.h -index c274b34..f84de76 100644 +index c59fccd..79f8fc2 100644 --- a/drivers/staging/rtl8188eu/include/hal_intf.h +++ b/drivers/staging/rtl8188eu/include/hal_intf.h -@@ -271,7 +271,7 @@ struct hal_ops { +@@ -267,7 +267,7 @@ struct hal_ops { s32 (*c2h_handler)(struct adapter *padapter, struct c2h_evt_hdr *c2h_evt); c2h_id_filter c2h_id_filter_ccx; @@ -50413,45 +53354,6 @@ index dc23395..cf7e9b1 100644 struct io_req { struct list_head list; -diff --git a/drivers/staging/rtl8723au/include/hal_intf.h b/drivers/staging/rtl8723au/include/hal_intf.h -index d183f4b..3f4903d 100644 ---- a/drivers/staging/rtl8723au/include/hal_intf.h -+++ b/drivers/staging/rtl8723au/include/hal_intf.h -@@ -251,7 +251,7 @@ struct hal_ops { - void (*hal_reset_security_engine)(struct rtw_adapter *adapter); - s32 (*c2h_handler)(struct rtw_adapter *padapter, struct c2h_evt_hdr *c2h_evt); - c2h_id_filter c2h_id_filter_ccx; --}; -+} __no_const; - - enum rt_eeprom_type { - EEPROM_93C46, -diff --git a/drivers/staging/rtl8723au/include/rtw_io.h b/drivers/staging/rtl8723au/include/rtw_io.h -index 8d39d800..3f21c0c 100644 ---- a/drivers/staging/rtl8723au/include/rtw_io.h -+++ b/drivers/staging/rtl8723au/include/rtw_io.h -@@ -130,7 +130,7 @@ struct _io_ops - void (*_read_port_cancel)(struct intf_hdl *pintfhdl); - void (*_write_port_cancel)(struct intf_hdl *pintfhdl); - --}; -+} __no_const; - - struct io_req { - struct list_head list; -diff --git a/drivers/staging/sbe-2t3e3/netdev.c b/drivers/staging/sbe-2t3e3/netdev.c -index fe6c951..72935ba 100644 ---- a/drivers/staging/sbe-2t3e3/netdev.c -+++ b/drivers/staging/sbe-2t3e3/netdev.c -@@ -51,7 +51,7 @@ static int t3e3_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) - t3e3_if_config(sc, cmd_2t3e3, (char *)¶m, &resp, &rlen); - - if (rlen) -- if (copy_to_user(data, &resp, rlen)) -+ if (rlen > sizeof resp || copy_to_user(data, &resp, rlen)) - return -EFAULT; - - return 0; diff --git a/drivers/staging/usbip/vhci.h b/drivers/staging/usbip/vhci.h index a863a98..d272795 100644 --- a/drivers/staging/usbip/vhci.h @@ -50466,7 +53368,7 @@ index a863a98..d272795 100644 /* * NOTE: diff --git a/drivers/staging/usbip/vhci_hcd.c b/drivers/staging/usbip/vhci_hcd.c -index 70e1755..de41855 100644 +index 0007d30..c06a693 100644 --- a/drivers/staging/usbip/vhci_hcd.c +++ b/drivers/staging/usbip/vhci_hcd.c @@ -439,7 +439,7 @@ static void vhci_tx_urb(struct urb *urb) @@ -50478,7 +53380,7 @@ index 70e1755..de41855 100644 if (priv->seqnum == 0xffff) dev_info(&urb->dev->dev, "seqnum max\n"); -@@ -685,7 +685,7 @@ static int vhci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status) +@@ -686,7 +686,7 @@ static int vhci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status) return -ENOMEM; } @@ -50487,7 +53389,7 @@ index 70e1755..de41855 100644 if (unlink->seqnum == 0xffff) pr_info("seqnum max\n"); -@@ -889,7 +889,7 @@ static int vhci_start(struct usb_hcd *hcd) +@@ -891,7 +891,7 @@ static int vhci_start(struct usb_hcd *hcd) vdev->rhport = rhport; } @@ -50510,10 +53412,10 @@ index d07fcb5..358e1e1 100644 return; } diff --git a/drivers/staging/vt6655/hostap.c b/drivers/staging/vt6655/hostap.c -index 6eecd53..29317c6 100644 +index 317c2a8..ffeb4ef 100644 --- a/drivers/staging/vt6655/hostap.c +++ b/drivers/staging/vt6655/hostap.c -@@ -69,14 +69,13 @@ static int msglevel = MSG_LEVEL_INFO; +@@ -68,14 +68,13 @@ static int msglevel = MSG_LEVEL_INFO; * */ @@ -50530,40 +53432,10 @@ index 6eecd53..29317c6 100644 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%s: Enabling hostapd mode\n", dev->name); -@@ -88,6 +87,8 @@ static int hostap_enable_hostapd(PSDevice pDevice, int rtnl_locked) +@@ -87,6 +86,8 @@ static int hostap_enable_hostapd(PSDevice pDevice, int rtnl_locked) *apdev_priv = *pDevice; eth_hw_addr_inherit(pDevice->apdev, dev); -+ /* only half broken now */ -+ apdev_netdev_ops.ndo_start_xmit = pDevice->tx_80211; - pDevice->apdev->netdev_ops = &apdev_netdev_ops; - - pDevice->apdev->type = ARPHRD_IEEE80211; -diff --git a/drivers/staging/vt6656/hostap.c b/drivers/staging/vt6656/hostap.c -index 67ba48b..24e602f 100644 ---- a/drivers/staging/vt6656/hostap.c -+++ b/drivers/staging/vt6656/hostap.c -@@ -60,14 +60,13 @@ static int msglevel =MSG_LEVEL_INFO; - * - */ - -+static net_device_ops_no_const apdev_netdev_ops; -+ - static int hostap_enable_hostapd(struct vnt_private *pDevice, int rtnl_locked) - { - 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, -- }; - - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%s: Enabling hostapd mode\n", dev->name); - -@@ -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); - + /* only half broken now */ + apdev_netdev_ops.ndo_start_xmit = pDevice->tx_80211; pDevice->apdev->netdev_ops = &apdev_netdev_ops; @@ -50592,7 +53464,7 @@ index e7e9372..161f530 100644 login->tgt_agt = sbp_target_agent_register(login); if (IS_ERR(login->tgt_agt)) { diff --git a/drivers/target/target_core_device.c b/drivers/target/target_core_device.c -index 6ea95d2..88607b4 100644 +index 98da901..bb443e8 100644 --- a/drivers/target/target_core_device.c +++ b/drivers/target/target_core_device.c @@ -1525,7 +1525,7 @@ struct se_device *target_alloc_device(struct se_hba *hba, const char *name) @@ -50605,7 +53477,7 @@ index 6ea95d2..88607b4 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 14772e9..42d9f63 100644 +index 7fa62fc..abdd041 100644 --- a/drivers/target/target_core_transport.c +++ b/drivers/target/target_core_transport.c @@ -1165,7 +1165,7 @@ transport_check_alloc_task_attr(struct se_cmd *cmd) @@ -50614,11 +53486,11 @@ index 14772e9..42d9f63 100644 */ - cmd->se_ordered_id = atomic_inc_return(&dev->dev_ordered_id); + cmd->se_ordered_id = atomic_inc_return_unchecked(&dev->dev_ordered_id); - smp_mb__after_atomic_inc(); + smp_mb__after_atomic(); 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/thermal/of-thermal.c b/drivers/thermal/of-thermal.c -index 04b1be7..5eff86d 100644 +index 4b2b999..cad9fa5 100644 --- a/drivers/thermal/of-thermal.c +++ b/drivers/thermal/of-thermal.c @@ -30,6 +30,7 @@ @@ -50682,7 +53554,7 @@ index a57bb5a..1f727d33 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 0ff7fda..dbc7d52 100644 +index 4fcec1d..5a036f7 100644 --- a/drivers/tty/hvc/hvc_console.c +++ b/drivers/tty/hvc/hvc_console.c @@ -342,7 +342,7 @@ static int hvc_open(struct tty_struct *tty, struct file * filp) @@ -51108,7 +53980,7 @@ index 2ebe47b..3205833 100644 dlci->modem_rx = 0; diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c -index 0391f17..31fa586 100644 +index f44f1ba..a8d5915 100644 --- a/drivers/tty/n_tty.c +++ b/drivers/tty/n_tty.c @@ -115,7 +115,7 @@ struct n_tty_data { @@ -51207,6 +54079,21 @@ index 1274499..f541382 100644 &soft->is_intr_type[intr_type].is_num_intrs); this_mir = this_ir = pending_intrs(soft, intr_type); +diff --git a/drivers/tty/serial/kgdb_nmi.c b/drivers/tty/serial/kgdb_nmi.c +index cfadf29..8cf4595 100644 +--- a/drivers/tty/serial/kgdb_nmi.c ++++ b/drivers/tty/serial/kgdb_nmi.c +@@ -51,7 +51,9 @@ static int kgdb_nmi_console_setup(struct console *co, char *options) + * I/O utilities that messages sent to the console will automatically + * be displayed on the dbg_io. + */ +- dbg_io_ops->is_console = true; ++ pax_open_kernel(); ++ *(int *)&dbg_io_ops->is_console = true; ++ pax_close_kernel(); + + return 0; + } diff --git a/drivers/tty/serial/kgdboc.c b/drivers/tty/serial/kgdboc.c index a260cde..6b2b5ce 100644 --- a/drivers/tty/serial/kgdboc.c @@ -51314,10 +54201,10 @@ index a260cde..6b2b5ce 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/msm_serial.c b/drivers/tty/serial/msm_serial.c -index 7307dc4..ce4fe90 100644 +index 72000a6..a190bc4 100644 --- a/drivers/tty/serial/msm_serial.c +++ b/drivers/tty/serial/msm_serial.c -@@ -1026,7 +1026,7 @@ static struct uart_driver msm_uart_driver = { +@@ -981,7 +981,7 @@ static struct uart_driver msm_uart_driver = { .cons = MSM_CONSOLE, }; @@ -51326,7 +54213,7 @@ index 7307dc4..ce4fe90 100644 static const struct of_device_id msm_uartdm_table[] = { { .compatible = "qcom,msm-uartdm-v1.1", .data = (void *)UARTDM_1P1 }, -@@ -1045,7 +1045,7 @@ static int __init msm_serial_probe(struct platform_device *pdev) +@@ -1000,7 +1000,7 @@ static int msm_serial_probe(struct platform_device *pdev) int irq; if (pdev->id == -1) @@ -51336,10 +54223,10 @@ index 7307dc4..ce4fe90 100644 if (unlikely(pdev->id < 0 || pdev->id >= UART_NR)) return -ENXIO; diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c -index 1f5505e..a1a767d 100644 +index c1d3ebd..f618a93 100644 --- a/drivers/tty/serial/samsung.c +++ b/drivers/tty/serial/samsung.c -@@ -463,11 +463,16 @@ static void s3c24xx_serial_shutdown(struct uart_port *port) +@@ -486,11 +486,16 @@ static void s3c24xx_serial_shutdown(struct uart_port *port) } } @@ -51353,10 +54240,10 @@ index 1f5505e..a1a767d 100644 + if (s3c24xx_serial_has_interrupt_mask(port)) + return s3c64xx_serial_startup(port); + - dbg("s3c24xx_serial_startup: port=%p (%08lx,%p)\n", - port->mapbase, port->membase); + dbg("s3c24xx_serial_startup: port=%p (%08llx,%p)\n", + port, (unsigned long long)port->mapbase, port->membase); -@@ -1141,10 +1146,6 @@ static int s3c24xx_serial_init_port(struct s3c24xx_uart_port *ourport, +@@ -1164,10 +1169,6 @@ static int s3c24xx_serial_init_port(struct s3c24xx_uart_port *ourport, /* setup info for port */ port->dev = &platdev->dev; @@ -51368,10 +54255,10 @@ index 1f5505e..a1a767d 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 b68550d..a62d7f8 100644 +index ef2fb36..238d80c 100644 --- a/drivers/tty/serial/serial_core.c +++ b/drivers/tty/serial/serial_core.c -@@ -1329,7 +1329,7 @@ static void uart_close(struct tty_struct *tty, struct file *filp) +@@ -1336,7 +1336,7 @@ static void uart_close(struct tty_struct *tty, struct file *filp) pr_debug("uart_close(%d) called\n", uport ? uport->line : -1); @@ -51380,7 +54267,7 @@ index b68550d..a62d7f8 100644 return; /* -@@ -1456,7 +1456,7 @@ static void uart_hangup(struct tty_struct *tty) +@@ -1463,7 +1463,7 @@ static void uart_hangup(struct tty_struct *tty) uart_flush_buffer(tty); uart_shutdown(tty, state); spin_lock_irqsave(&port->lock, flags); @@ -51389,7 +54276,7 @@ index b68550d..a62d7f8 100644 clear_bit(ASYNCB_NORMAL_ACTIVE, &port->flags); spin_unlock_irqrestore(&port->lock, flags); tty_port_tty_set(port, NULL); -@@ -1554,7 +1554,7 @@ static int uart_open(struct tty_struct *tty, struct file *filp) +@@ -1561,7 +1561,7 @@ static int uart_open(struct tty_struct *tty, struct file *filp) goto end; } @@ -51398,7 +54285,7 @@ index b68550d..a62d7f8 100644 if (!state->uart_port || state->uart_port->flags & UPF_DEAD) { retval = -ENXIO; goto err_dec_count; -@@ -1594,7 +1594,7 @@ static int uart_open(struct tty_struct *tty, struct file *filp) +@@ -1601,7 +1601,7 @@ static int uart_open(struct tty_struct *tty, struct file *filp) end: return retval; err_dec_count: @@ -51797,10 +54684,10 @@ index 53ba853..3c30f6d 100644 if (!retval) port->flags |= ASYNC_NORMAL_ACTIVE; diff --git a/drivers/tty/sysrq.c b/drivers/tty/sysrq.c -index ce396ec..04a37be 100644 +index 454b658..57b1430 100644 --- a/drivers/tty/sysrq.c +++ b/drivers/tty/sysrq.c -@@ -1075,7 +1075,7 @@ EXPORT_SYMBOL(unregister_sysrq_key); +@@ -1084,7 +1084,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) { @@ -52208,7 +55095,7 @@ index 2a3bbdf..91d72cf 100644 file->f_version = event_count; return POLLIN | POLLRDNORM; diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c -index 257876e..4304364 100644 +index 0b59731..46ee7d1 100644 --- a/drivers/usb/core/devio.c +++ b/drivers/usb/core/devio.c @@ -187,7 +187,7 @@ static ssize_t usbdev_read(struct file *file, char __user *buf, size_t nbytes, @@ -52248,10 +55135,10 @@ index 257876e..4304364 100644 dev->rawdescriptors[i] + (*ppos - pos), min(len, alloclen))) { diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c -index 9c4e292..b89877f 100644 +index bec31e2..b8091cd 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c -@@ -1550,7 +1550,7 @@ int usb_hcd_submit_urb (struct urb *urb, gfp_t mem_flags) +@@ -1554,7 +1554,7 @@ int usb_hcd_submit_urb (struct urb *urb, gfp_t mem_flags) */ usb_get_urb(urb); atomic_inc(&urb->use_count); @@ -52260,7 +55147,7 @@ index 9c4e292..b89877f 100644 usbmon_urb_submit(&hcd->self, urb); /* NOTE requirements on root-hub callers (usbfs and the hub -@@ -1577,7 +1577,7 @@ int usb_hcd_submit_urb (struct urb *urb, gfp_t mem_flags) +@@ -1581,7 +1581,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); @@ -52270,7 +55157,7 @@ index 9c4e292..b89877f 100644 wake_up(&usb_kill_urb_queue); usb_put_urb(urb); diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c -index 229a73f..ef86f98 100644 +index 27f2171..e3dfc22 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c @@ -27,6 +27,7 @@ @@ -52281,7 +55168,7 @@ index 229a73f..ef86f98 100644 #include #include -@@ -4512,6 +4513,10 @@ static void hub_port_connect_change(struct usb_hub *hub, int port1, +@@ -4644,6 +4645,10 @@ static void hub_port_connect(struct usb_hub *hub, int port1, u16 portstatus, goto done; return; } @@ -52350,10 +55237,10 @@ index 4d11449..f4ccabf 100644 INIT_LIST_HEAD(&dev->ep0.urb_list); dev->ep0.desc.bLength = USB_DT_ENDPOINT_SIZE; diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c -index 85f398d..d375bbe 100644 +index dab7927..6f53afc 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c -@@ -550,8 +550,6 @@ static int __dwc3_gadget_ep_enable(struct dwc3_ep *dep, +@@ -615,8 +615,6 @@ static int __dwc3_gadget_ep_enable(struct dwc3_ep *dep, if (!usb_endpoint_xfer_isoc(desc)) return 0; @@ -52513,10 +55400,10 @@ index 7a55fea..cc0ed4f 100644 #include "u_uac1.h" diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c -index 7ae0c4d..35521b7 100644 +index 6130b75..3b60008 100644 --- a/drivers/usb/host/ehci-hub.c +++ b/drivers/usb/host/ehci-hub.c -@@ -780,7 +780,7 @@ static struct urb *request_single_step_set_feature_urb( +@@ -771,7 +771,7 @@ static struct urb *request_single_step_set_feature_urb( urb->transfer_flags = URB_DIR_IN; usb_get_urb(urb); atomic_inc(&urb->use_count); @@ -52525,7 +55412,7 @@ index 7ae0c4d..35521b7 100644 urb->setup_dma = dma_map_single( hcd->self.controller, urb->setup_packet, -@@ -847,7 +847,7 @@ static int ehset_single_step_set_feature(struct usb_hcd *hcd, int port) +@@ -838,7 +838,7 @@ static int ehset_single_step_set_feature(struct usb_hcd *hcd, int port) urb->status = -EINPROGRESS; usb_get_urb(urb); atomic_inc(&urb->use_count); @@ -52565,11 +55452,11 @@ index d0d8fad..668ef7b 100644 } diff --git a/drivers/usb/misc/appledisplay.c b/drivers/usb/misc/appledisplay.c -index ba6a5d6..f88f7f3 100644 +index b3d245e..99549ed 100644 --- a/drivers/usb/misc/appledisplay.c +++ b/drivers/usb/misc/appledisplay.c -@@ -83,7 +83,7 @@ struct appledisplay { - spinlock_t lock; +@@ -84,7 +84,7 @@ struct appledisplay { + struct mutex sysfslock; /* concurrent read and write */ }; -static atomic_t count_displays = ATOMIC_INIT(0); @@ -52577,7 +55464,7 @@ index ba6a5d6..f88f7f3 100644 static struct workqueue_struct *wq; static void appledisplay_complete(struct urb *urb) -@@ -281,7 +281,7 @@ static int appledisplay_probe(struct usb_interface *iface, +@@ -288,7 +288,7 @@ static int appledisplay_probe(struct usb_interface *iface, /* Register backlight device */ snprintf(bl_name, sizeof(bl_name), "appledisplay%d", @@ -52675,10 +55562,10 @@ index 3e2e4ed..060c9b8 100644 /* Return the xfer's ID. */ diff --git a/drivers/vfio/vfio.c b/drivers/vfio/vfio.c -index 512f479..7e041d0 100644 +index f018d8d..ccab63f 100644 --- a/drivers/vfio/vfio.c +++ b/drivers/vfio/vfio.c -@@ -487,7 +487,7 @@ static int vfio_group_nb_add_dev(struct vfio_group *group, struct device *dev) +@@ -481,7 +481,7 @@ static int vfio_group_nb_add_dev(struct vfio_group *group, struct device *dev) return 0; /* TODO Prevent device auto probing */ @@ -52865,37 +55752,10 @@ index 900aa4e..6d49418 100644 } EXPORT_SYMBOL_GPL(fb_deferred_io_cleanup); diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbdev/core/fbmem.c -index b6d5008..5bca7bf 100644 +index b5e85f6..290f8c7 100644 --- a/drivers/video/fbdev/core/fbmem.c +++ b/drivers/video/fbdev/core/fbmem.c -@@ -433,7 +433,7 @@ static void fb_do_show_logo(struct fb_info *info, struct fb_image *image, - image->dx += image->width + 8; - } - } else if (rotate == FB_ROTATE_UD) { -- for (x = 0; x < num && image->dx >= 0; x++) { -+ for (x = 0; x < num && (__s32)image->dx >= 0; x++) { - info->fbops->fb_imageblit(info, image); - image->dx -= image->width + 8; - } -@@ -445,7 +445,7 @@ static void fb_do_show_logo(struct fb_info *info, struct fb_image *image, - image->dy += image->height + 8; - } - } else if (rotate == FB_ROTATE_CCW) { -- for (x = 0; x < num && image->dy >= 0; x++) { -+ for (x = 0; x < num && (__s32)image->dy >= 0; x++) { - info->fbops->fb_imageblit(info, image); - image->dy -= image->height + 8; - } -@@ -1179,7 +1179,7 @@ static long do_fb_ioctl(struct fb_info *info, unsigned int cmd, - return -EFAULT; - if (con2fb.console < 1 || con2fb.console > MAX_NR_CONSOLES) - return -EINVAL; -- if (con2fb.framebuffer < 0 || con2fb.framebuffer >= FB_MAX) -+ if (con2fb.framebuffer >= FB_MAX) - return -EINVAL; - if (!registered_fb[con2fb.framebuffer]) - request_module("fb%d", con2fb.framebuffer); -@@ -1300,7 +1300,7 @@ static int do_fscreeninfo_to_user(struct fb_fix_screeninfo *fix, +@@ -1301,7 +1301,7 @@ static int do_fscreeninfo_to_user(struct fb_fix_screeninfo *fix, __u32 data; int err; @@ -56222,7 +59082,7 @@ index fef20db..d28b1ab 100644 return -ENOMEM; return 0; diff --git a/fs/9p/vfs_addr.c b/fs/9p/vfs_addr.c -index c71e886..61d3d44b 100644 +index cc1cfae..41158ad 100644 --- a/fs/9p/vfs_addr.c +++ b/fs/9p/vfs_addr.c @@ -187,7 +187,7 @@ static int v9fs_vfs_writepage_locked(struct page *page) @@ -56235,7 +59095,7 @@ index c71e886..61d3d44b 100644 if (retval > 0) retval = 0; diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c -index 53161ec..e261d8a 100644 +index 7fa4f7a..a7ebf8c 100644 --- a/fs/9p/vfs_inode.c +++ b/fs/9p/vfs_inode.c @@ -1312,7 +1312,7 @@ static void *v9fs_vfs_follow_link(struct dentry *dentry, struct nameidata *nd) @@ -56283,10 +59143,18 @@ index 2946712..f737435 100644 &data); if (!inode) { diff --git a/fs/aio.c b/fs/aio.c -index e609e15..c9fcd97 100644 +index 1c9c5f0..c935d6e 100644 --- a/fs/aio.c +++ b/fs/aio.c -@@ -380,7 +380,7 @@ static int aio_setup_ring(struct kioctx *ctx) +@@ -141,6 +141,7 @@ struct kioctx { + + struct { + unsigned tail; ++ unsigned completed_events; + spinlock_t completion_lock; + } ____cacheline_aligned_in_smp; + +@@ -380,7 +381,7 @@ static int aio_setup_ring(struct kioctx *ctx) size += sizeof(struct io_event) * nr_events; nr_pages = PFN_UP(size); @@ -56295,6 +59163,135 @@ index e609e15..c9fcd97 100644 return -EINVAL; file = aio_private_file(ctx, nr_pages); +@@ -880,6 +881,68 @@ out: + return ret; + } + ++/* refill_reqs_available ++ * Updates the reqs_available reference counts used for tracking the ++ * number of free slots in the completion ring. This can be called ++ * from aio_complete() (to optimistically update reqs_available) or ++ * from aio_get_req() (the we're out of events case). It must be ++ * called holding ctx->completion_lock. ++ */ ++static void refill_reqs_available(struct kioctx *ctx, unsigned head, ++ unsigned tail) ++{ ++ unsigned events_in_ring, completed; ++ ++ /* Clamp head since userland can write to it. */ ++ head %= ctx->nr_events; ++ if (head <= tail) ++ events_in_ring = tail - head; ++ else ++ events_in_ring = ctx->nr_events - (head - tail); ++ ++ completed = ctx->completed_events; ++ if (events_in_ring < completed) ++ completed -= events_in_ring; ++ else ++ completed = 0; ++ ++ if (!completed) ++ return; ++ ++ ctx->completed_events -= completed; ++ put_reqs_available(ctx, completed); ++} ++ ++/* user_refill_reqs_available ++ * Called to refill reqs_available when aio_get_req() encounters an ++ * out of space in the completion ring. ++ */ ++static void user_refill_reqs_available(struct kioctx *ctx) ++{ ++ spin_lock_irq(&ctx->completion_lock); ++ if (ctx->completed_events) { ++ struct aio_ring *ring; ++ unsigned head; ++ ++ /* Access of ring->head may race with aio_read_events_ring() ++ * here, but that's okay since whether we read the old version ++ * or the new version, and either will be valid. The important ++ * part is that head cannot pass tail since we prevent ++ * aio_complete() from updating tail by holding ++ * ctx->completion_lock. Even if head is invalid, the check ++ * against ctx->completed_events below will make sure we do the ++ * safe/right thing. ++ */ ++ ring = kmap_atomic(ctx->ring_pages[0]); ++ head = ring->head; ++ kunmap_atomic(ring); ++ ++ refill_reqs_available(ctx, head, ctx->tail); ++ } ++ ++ spin_unlock_irq(&ctx->completion_lock); ++} ++ + /* aio_get_req + * Allocate a slot for an aio request. + * Returns NULL if no requests are free. +@@ -888,8 +951,11 @@ static inline struct kiocb *aio_get_req(struct kioctx *ctx) + { + struct kiocb *req; + +- if (!get_reqs_available(ctx)) +- return NULL; ++ if (!get_reqs_available(ctx)) { ++ user_refill_reqs_available(ctx); ++ if (!get_reqs_available(ctx)) ++ return NULL; ++ } + + req = kmem_cache_alloc(kiocb_cachep, GFP_KERNEL|__GFP_ZERO); + if (unlikely(!req)) +@@ -948,8 +1014,8 @@ void aio_complete(struct kiocb *iocb, long res, long res2) + struct kioctx *ctx = iocb->ki_ctx; + struct aio_ring *ring; + struct io_event *ev_page, *event; ++ unsigned tail, pos, head; + unsigned long flags; +- unsigned tail, pos; + + /* + * Special case handling for sync iocbs: +@@ -1010,10 +1076,14 @@ void aio_complete(struct kiocb *iocb, long res, long res2) + ctx->tail = tail; + + ring = kmap_atomic(ctx->ring_pages[0]); ++ head = ring->head; + ring->tail = tail; + kunmap_atomic(ring); + flush_dcache_page(ctx->ring_pages[0]); + ++ ctx->completed_events++; ++ if (ctx->completed_events > 1) ++ refill_reqs_available(ctx, head, tail); + spin_unlock_irqrestore(&ctx->completion_lock, flags); + + pr_debug("added to ring %p at [%u]\n", iocb, tail); +@@ -1028,7 +1098,6 @@ void aio_complete(struct kiocb *iocb, long res, long res2) + + /* everything turned out well, dispose of the aiocb. */ + kiocb_free(iocb); +- put_reqs_available(ctx, 1); + + /* + * We have to order our ring_info tail store above and test +@@ -1065,6 +1134,12 @@ static long aio_read_events_ring(struct kioctx *ctx, + tail = ring->tail; + kunmap_atomic(ring); + ++ /* ++ * Ensure that once we've read the current tail pointer, that ++ * we also see the events that were stored up to the tail. ++ */ ++ smp_rmb(); ++ + pr_debug("h%u t%u m%u\n", head, tail, ctx->nr_events); + + if (head == tail) diff --git a/fs/attr.c b/fs/attr.c index 6530ced..4a827e2 100644 --- a/fs/attr.c @@ -56456,7 +59453,7 @@ index ca0ba15..0fa3257 100644 fd_offset + ex.a_text); if (error != N_DATADDR(ex)) { diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c -index aa3cb62..bc53934 100644 +index 3892c1a..4e27c04 100644 --- a/fs/binfmt_elf.c +++ b/fs/binfmt_elf.c @@ -34,6 +34,7 @@ @@ -57164,7 +60161,7 @@ index aa3cb62..bc53934 100644 load_bias); if (!IS_ERR((void *)elf_entry)) { /* -@@ -1122,7 +1602,7 @@ static bool always_dump_vma(struct vm_area_struct *vma) +@@ -1130,7 +1610,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, @@ -57173,7 +60170,7 @@ index aa3cb62..bc53934 100644 { #define FILTER(type) (mm_flags & (1UL << MMF_DUMP_##type)) -@@ -1160,7 +1640,7 @@ static unsigned long vma_dump_size(struct vm_area_struct *vma, +@@ -1168,7 +1648,7 @@ static unsigned long vma_dump_size(struct vm_area_struct *vma, if (vma->vm_file == NULL) return 0; @@ -57182,7 +60179,7 @@ index aa3cb62..bc53934 100644 goto whole; /* -@@ -1367,9 +1847,9 @@ static void fill_auxv_note(struct memelfnote *note, struct mm_struct *mm) +@@ -1375,9 +1855,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; @@ -57194,7 +60191,7 @@ index aa3cb62..bc53934 100644 fill_note(note, "CORE", NT_AUXV, i * sizeof(elf_addr_t), auxv); } -@@ -1378,7 +1858,7 @@ static void fill_siginfo_note(struct memelfnote *note, user_siginfo_t *csigdata, +@@ -1386,7 +1866,7 @@ static void fill_siginfo_note(struct memelfnote *note, user_siginfo_t *csigdata, { mm_segment_t old_fs = get_fs(); set_fs(KERNEL_DS); @@ -57203,7 +60200,7 @@ index aa3cb62..bc53934 100644 set_fs(old_fs); fill_note(note, "CORE", NT_SIGINFO, sizeof(*csigdata), csigdata); } -@@ -2002,14 +2482,14 @@ static void fill_extnum_info(struct elfhdr *elf, struct elf_shdr *shdr4extnum, +@@ -2010,14 +2490,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, @@ -57220,7 +60217,7 @@ index aa3cb62..bc53934 100644 return size; } -@@ -2100,7 +2580,7 @@ static int elf_core_dump(struct coredump_params *cprm) +@@ -2108,7 +2588,7 @@ static int elf_core_dump(struct coredump_params *cprm) dataoff = offset = roundup(offset, ELF_EXEC_PAGESIZE); @@ -57229,7 +60226,7 @@ index aa3cb62..bc53934 100644 offset += elf_core_extra_data_size(); e_shoff = offset; -@@ -2128,7 +2608,7 @@ static int elf_core_dump(struct coredump_params *cprm) +@@ -2136,7 +2616,7 @@ static int elf_core_dump(struct coredump_params *cprm) phdr.p_offset = offset; phdr.p_vaddr = vma->vm_start; phdr.p_paddr = 0; @@ -57238,7 +60235,7 @@ index aa3cb62..bc53934 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; -@@ -2161,7 +2641,7 @@ static int elf_core_dump(struct coredump_params *cprm) +@@ -2169,7 +2649,7 @@ static int elf_core_dump(struct coredump_params *cprm) unsigned long addr; unsigned long end; @@ -57247,7 +60244,7 @@ index aa3cb62..bc53934 100644 for (addr = vma->vm_start; addr < end; addr += PAGE_SIZE) { struct page *page; -@@ -2202,6 +2682,167 @@ out: +@@ -2210,6 +2690,167 @@ out: #endif /* CONFIG_ELF_CORE */ @@ -57415,42 +60412,11 @@ index aa3cb62..bc53934 100644 static int __init init_elf_binfmt(void) { register_binfmt(&elf_format); -diff --git a/fs/bio.c b/fs/bio.c -index 6f0362b..26a7496 100644 ---- a/fs/bio.c -+++ b/fs/bio.c -@@ -1144,7 +1144,7 @@ struct bio *bio_copy_user_iov(struct request_queue *q, - /* - * Overflow, abort - */ -- if (end < start) -+ if (end < start || end - start > INT_MAX - nr_pages) - return ERR_PTR(-EINVAL); - - nr_pages += end - start; -@@ -1278,7 +1278,7 @@ static struct bio *__bio_map_user_iov(struct request_queue *q, - /* - * Overflow, abort - */ -- if (end < start) -+ if (end < start || end - start > INT_MAX - nr_pages) - return ERR_PTR(-EINVAL); - - nr_pages += end - start; -@@ -1540,7 +1540,7 @@ static void bio_copy_kern_endio(struct bio *bio, int err) - const int read = bio_data_dir(bio) == READ; - struct bio_map_data *bmd = bio->bi_private; - int i; -- char *p = bmd->sgvecs[0].iov_base; -+ char *p = (char __force_kernel *)bmd->sgvecs[0].iov_base; - - bio_for_each_segment_all(bvec, bio, i) { - char *addr = page_address(bvec->bv_page); diff --git a/fs/block_dev.c b/fs/block_dev.c -index 552a8d1..d51ccf3 100644 +index 6d72746..536d1db 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c -@@ -637,7 +637,7 @@ static bool bd_may_claim(struct block_device *bdev, struct block_device *whole, +@@ -701,7 +701,7 @@ static bool bd_may_claim(struct block_device *bdev, struct block_device *whole, else if (bdev->bd_contains == bdev) return true; /* is a whole device which isn't held */ @@ -57460,10 +60426,10 @@ index 552a8d1..d51ccf3 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 1bcfcdb..e942132 100644 +index aeab453..48dbafc 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c -@@ -1216,9 +1216,12 @@ static noinline int __btrfs_cow_block(struct btrfs_trans_handle *trans, +@@ -1184,9 +1184,12 @@ static noinline int __btrfs_cow_block(struct btrfs_trans_handle *trans, free_extent_buffer(buf); add_root_to_dirty_list(root); } else { @@ -57480,10 +60446,10 @@ index 1bcfcdb..e942132 100644 WARN_ON(trans->transid != btrfs_header_generation(parent)); diff --git a/fs/btrfs/delayed-inode.c b/fs/btrfs/delayed-inode.c -index 33e561a..16df7ae 100644 +index a2e90f8..5135e5f 100644 --- a/fs/btrfs/delayed-inode.c +++ b/fs/btrfs/delayed-inode.c -@@ -459,7 +459,7 @@ static int __btrfs_add_delayed_deletion_item(struct btrfs_delayed_node *node, +@@ -462,7 +462,7 @@ static int __btrfs_add_delayed_deletion_item(struct btrfs_delayed_node *node, static void finish_one_item(struct btrfs_delayed_root *delayed_root) { @@ -57492,7 +60458,7 @@ index 33e561a..16df7ae 100644 if ((atomic_dec_return(&delayed_root->items) < BTRFS_DELAYED_BACKGROUND || seq % BTRFS_DELAYED_BATCH == 0) && waitqueue_active(&delayed_root->wait)) -@@ -1409,7 +1409,7 @@ void btrfs_assert_delayed_root_empty(struct btrfs_root *root) +@@ -1412,7 +1412,7 @@ void btrfs_assert_delayed_root_empty(struct btrfs_root *root) static int could_end_wait(struct btrfs_delayed_root *delayed_root, int seq) { @@ -57501,7 +60467,7 @@ index 33e561a..16df7ae 100644 if (val < seq || val >= seq + BTRFS_DELAYED_BATCH) return 1; -@@ -1433,7 +1433,7 @@ void btrfs_balance_delayed_items(struct btrfs_root *root) +@@ -1436,7 +1436,7 @@ void btrfs_balance_delayed_items(struct btrfs_root *root) int seq; int ret; @@ -57533,10 +60499,10 @@ index f70119f..ab5894d 100644 spin_lock_init(&delayed_root->lock); init_waitqueue_head(&delayed_root->wait); diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c -index 2f6d7b1..f186382 100644 +index 47aceb4..7d28b1c 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c -@@ -3575,9 +3575,12 @@ static long btrfs_ioctl_space_info(struct btrfs_root *root, void __user *arg) +@@ -3965,9 +3965,12 @@ static long btrfs_ioctl_space_info(struct btrfs_root *root, void __user *arg) for (i = 0; i < num_types; i++) { struct btrfs_space_info *tmp; @@ -57549,7 +60515,7 @@ index 2f6d7b1..f186382 100644 info = NULL; rcu_read_lock(); list_for_each_entry_rcu(tmp, &root->fs_info->space_info, -@@ -3599,10 +3602,7 @@ static long btrfs_ioctl_space_info(struct btrfs_root *root, void __user *arg) +@@ -3989,10 +3992,7 @@ static long btrfs_ioctl_space_info(struct btrfs_root *root, void __user *arg) memcpy(dest, &space, sizeof(space)); dest++; space_args.total_spaces++; @@ -57561,7 +60527,7 @@ index 2f6d7b1..f186382 100644 up_read(&info->groups_sem); } diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c -index 9601d25..2896d6c 100644 +index 8e16bca..6eabd9e 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -270,7 +270,7 @@ void __btrfs_abort_transaction(struct btrfs_trans_handle *trans, @@ -57574,10 +60540,10 @@ index 9601d25..2896d6c 100644 wake_up(&root->fs_info->transaction_wait); wake_up(&root->fs_info->transaction_blocked_wait); diff --git a/fs/btrfs/sysfs.c b/fs/btrfs/sysfs.c -index 4825cd2..b2fe768 100644 +index 7869936..7e153dc 100644 --- a/fs/btrfs/sysfs.c +++ b/fs/btrfs/sysfs.c -@@ -438,7 +438,7 @@ static int addrm_unknown_feature_attrs(struct btrfs_fs_info *fs_info, bool add) +@@ -475,7 +475,7 @@ static int addrm_unknown_feature_attrs(struct btrfs_fs_info *fs_info, bool add) for (set = 0; set < FEAT_MAX; set++) { int i; struct attribute *attrs[2]; @@ -57586,60 +60552,24 @@ index 4825cd2..b2fe768 100644 .name = "features", .attrs = attrs, }; -diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c -index e2f45fc..b036909 100644 ---- a/fs/btrfs/tree-log.c -+++ b/fs/btrfs/tree-log.c -@@ -2533,7 +2533,7 @@ int btrfs_sync_log(struct btrfs_trans_handle *trans, - blk_finish_plug(&plug); - btrfs_abort_transaction(trans, root, ret); - btrfs_free_logged_extents(log, log_transid); -- ACCESS_ONCE(root->fs_info->last_trans_log_full_commit) = -+ ACCESS_ONCE_RW(root->fs_info->last_trans_log_full_commit) = - trans->transid; - mutex_unlock(&root->log_mutex); - goto out; -@@ -2577,7 +2577,7 @@ int btrfs_sync_log(struct btrfs_trans_handle *trans, - list_del_init(&root_log_ctx.list); - - blk_finish_plug(&plug); -- ACCESS_ONCE(root->fs_info->last_trans_log_full_commit) = -+ ACCESS_ONCE_RW(root->fs_info->last_trans_log_full_commit) = - trans->transid; - if (ret != -ENOSPC) { - btrfs_abort_transaction(trans, root, ret); -@@ -2622,7 +2622,7 @@ int btrfs_sync_log(struct btrfs_trans_handle *trans, - * now that we've moved on to the tree of log tree roots, - * check the full commit flag again - */ -- if (ACCESS_ONCE(root->fs_info->last_trans_log_full_commit) == -+ if (ACCESS_ONCE_RW(root->fs_info->last_trans_log_full_commit) == - trans->transid) { - blk_finish_plug(&plug); - btrfs_wait_marked_extents(log, &log->dirty_log_pages, mark); -@@ -2637,7 +2637,7 @@ int btrfs_sync_log(struct btrfs_trans_handle *trans, - EXTENT_DIRTY | EXTENT_NEW); - blk_finish_plug(&plug); - if (ret) { -- ACCESS_ONCE(root->fs_info->last_trans_log_full_commit) = -+ ACCESS_ONCE_RW(root->fs_info->last_trans_log_full_commit) = - trans->transid; - btrfs_abort_transaction(trans, root, ret); - btrfs_free_logged_extents(log, log_transid); -@@ -2667,7 +2667,7 @@ int btrfs_sync_log(struct btrfs_trans_handle *trans, - */ - ret = write_ctree_super(trans, root->fs_info->tree_root, 1); - if (ret) { -- ACCESS_ONCE(root->fs_info->last_trans_log_full_commit) = -+ ACCESS_ONCE_RW(root->fs_info->last_trans_log_full_commit) = - trans->transid; - btrfs_abort_transaction(trans, root, ret); - goto out_wake_log_root; +diff --git a/fs/btrfs/tree-log.h b/fs/btrfs/tree-log.h +index 7f5b41b..e589c13 100644 +--- a/fs/btrfs/tree-log.h ++++ b/fs/btrfs/tree-log.h +@@ -41,7 +41,7 @@ static inline void btrfs_init_log_ctx(struct btrfs_log_ctx *ctx) + static inline void btrfs_set_log_full_commit(struct btrfs_fs_info *fs_info, + struct btrfs_trans_handle *trans) + { +- ACCESS_ONCE(fs_info->last_trans_log_full_commit) = trans->transid; ++ ACCESS_ONCE_RW(fs_info->last_trans_log_full_commit) = trans->transid; + } + + static inline int btrfs_need_log_full_commit(struct btrfs_fs_info *fs_info, diff --git a/fs/buffer.c b/fs/buffer.c -index 9ddb9fc..7aa2487 100644 +index eba6e4f..af1182c 100644 --- a/fs/buffer.c +++ b/fs/buffer.c -@@ -3428,7 +3428,7 @@ void __init buffer_init(void) +@@ -3429,7 +3429,7 @@ void __init buffer_init(void) bh_cachep = kmem_cache_create("buffer_head", sizeof(struct buffer_head), 0, (SLAB_RECLAIM_ACCOUNT|SLAB_PANIC| @@ -57649,7 +60579,7 @@ index 9ddb9fc..7aa2487 100644 /* diff --git a/fs/cachefiles/bind.c b/fs/cachefiles/bind.c -index 5b99baf..47fffb5 100644 +index d749731..dd333a6 100644 --- a/fs/cachefiles/bind.c +++ b/fs/cachefiles/bind.c @@ -39,13 +39,11 @@ int cachefiles_daemon_bind(struct cachefiles_cache *cache, char *args) @@ -57669,7 +60599,7 @@ index 5b99baf..47fffb5 100644 cache->brun_percent < 100); diff --git a/fs/cachefiles/daemon.c b/fs/cachefiles/daemon.c -index 0a1467b..6a53245 100644 +index b078d30..db23012 100644 --- a/fs/cachefiles/daemon.c +++ b/fs/cachefiles/daemon.c @@ -196,7 +196,7 @@ static ssize_t cachefiles_daemon_read(struct file *file, char __user *_buffer, @@ -57690,7 +60620,7 @@ index 0a1467b..6a53245 100644 return -EOPNOTSUPP; /* drag the command string into the kernel so we can parse it */ -@@ -386,7 +386,7 @@ static int cachefiles_daemon_fstop(struct cachefiles_cache *cache, char *args) +@@ -385,7 +385,7 @@ static int cachefiles_daemon_fstop(struct cachefiles_cache *cache, char *args) if (args[0] != '%' || args[1] != '\0') return -EINVAL; @@ -57699,7 +60629,7 @@ index 0a1467b..6a53245 100644 return cachefiles_daemon_range_error(cache, args); cache->fstop_percent = fstop; -@@ -458,7 +458,7 @@ static int cachefiles_daemon_bstop(struct cachefiles_cache *cache, char *args) +@@ -457,7 +457,7 @@ static int cachefiles_daemon_bstop(struct cachefiles_cache *cache, char *args) if (args[0] != '%' || args[1] != '\0') return -EINVAL; @@ -57709,10 +60639,10 @@ index 0a1467b..6a53245 100644 cache->bstop_percent = bstop; diff --git a/fs/cachefiles/internal.h b/fs/cachefiles/internal.h -index 5349473..d6c0b93 100644 +index 3d50998..0550d67 100644 --- a/fs/cachefiles/internal.h +++ b/fs/cachefiles/internal.h -@@ -59,7 +59,7 @@ struct cachefiles_cache { +@@ -66,7 +66,7 @@ struct cachefiles_cache { wait_queue_head_t daemon_pollwq; /* poll waitqueue for daemon */ struct rb_root active_nodes; /* active nodes (can't be culled) */ rwlock_t active_lock; /* lock for active_nodes */ @@ -57721,7 +60651,7 @@ index 5349473..d6c0b93 100644 unsigned frun_percent; /* when to stop culling (% files) */ unsigned fcull_percent; /* when to start culling (% files) */ unsigned fstop_percent; /* when to stop allocating (% files) */ -@@ -171,19 +171,19 @@ extern int cachefiles_check_in_use(struct cachefiles_cache *cache, +@@ -178,19 +178,19 @@ extern int cachefiles_check_in_use(struct cachefiles_cache *cache, * proc.c */ #ifdef CONFIG_CACHEFILES_HISTOGRAM @@ -57747,10 +60677,10 @@ index 5349473..d6c0b93 100644 #else diff --git a/fs/cachefiles/namei.c b/fs/cachefiles/namei.c -index c0a6817..ea811166 100644 +index 5bf2b41..85b93f9 100644 --- a/fs/cachefiles/namei.c +++ b/fs/cachefiles/namei.c -@@ -317,7 +317,7 @@ try_again: +@@ -312,7 +312,7 @@ try_again: /* first step is to make up a grave dentry in the graveyard */ sprintf(nbuffer, "%08x%08x", (uint32_t) get_seconds(), @@ -57803,10 +60733,33 @@ index 4b1fb5c..0d2a699 100644 kunmap(page); file_end_write(file); diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c -index c29d6ae..a56c4ae 100644 +index c29d6ae..719b9bb 100644 --- a/fs/ceph/dir.c +++ b/fs/ceph/dir.c -@@ -250,7 +250,7 @@ static int ceph_readdir(struct file *file, struct dir_context *ctx) +@@ -129,6 +129,8 @@ static int __dcache_readdir(struct file *file, struct dir_context *ctx, + struct dentry *dentry, *last; + struct ceph_dentry_info *di; + int err = 0; ++ char d_name[DNAME_INLINE_LEN]; ++ const unsigned char *name; + + /* claim ref on last dentry we returned */ + last = fi->dentry; +@@ -192,7 +194,12 @@ more: + + dout(" %llu (%llu) dentry %p %.*s %p\n", di->offset, ctx->pos, + dentry, dentry->d_name.len, dentry->d_name.name, dentry->d_inode); +- if (!dir_emit(ctx, dentry->d_name.name, ++ name = dentry->d_name.name; ++ if (name == dentry->d_iname) { ++ memcpy(d_name, name, dentry->d_name.len); ++ name = d_name; ++ } ++ if (!dir_emit(ctx, name, + dentry->d_name.len, + ceph_translate_ino(dentry->d_sb, dentry->d_inode->i_ino), + dentry->d_inode->i_mode >> 12)) { +@@ -250,7 +257,7 @@ static int ceph_readdir(struct file *file, struct dir_context *ctx) struct ceph_fs_client *fsc = ceph_inode_to_client(inode); struct ceph_mds_client *mdsc = fsc->mdsc; unsigned frag = fpos_frag(ctx->pos); @@ -57882,10 +60835,10 @@ index f3ac415..3d2420c 100644 server->ops->print_stats(m, tcon); } diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c -index 5be1f997..fa1015a1 100644 +index 8883980..c8ade72 100644 --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c -@@ -1068,7 +1068,7 @@ cifs_init_request_bufs(void) +@@ -1072,7 +1072,7 @@ cifs_init_request_bufs(void) */ cifs_req_cachep = kmem_cache_create("cifs_request", CIFSMaxBufSize + max_hdr_size, 0, @@ -57894,7 +60847,7 @@ index 5be1f997..fa1015a1 100644 if (cifs_req_cachep == NULL) return -ENOMEM; -@@ -1095,7 +1095,7 @@ cifs_init_request_bufs(void) +@@ -1099,7 +1099,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", @@ -57903,7 +60856,7 @@ index 5be1f997..fa1015a1 100644 NULL); if (cifs_sm_req_cachep == NULL) { mempool_destroy(cifs_req_poolp); -@@ -1180,8 +1180,8 @@ init_cifs(void) +@@ -1184,8 +1184,8 @@ init_cifs(void) atomic_set(&bufAllocCount, 0); atomic_set(&smBufAllocCount, 0); #ifdef CONFIG_CIFS_STATS2 @@ -57915,10 +60868,10 @@ index 5be1f997..fa1015a1 100644 atomic_set(&midCount, 0); diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h -index 30f6e92..e915ba5 100644 +index de6aed8..a0a76fd 100644 --- a/fs/cifs/cifsglob.h +++ b/fs/cifs/cifsglob.h -@@ -806,35 +806,35 @@ struct cifs_tcon { +@@ -807,35 +807,35 @@ struct cifs_tcon { __u16 Flags; /* optional support bits */ enum statusEnum tidStatus; #ifdef CONFIG_CIFS_STATS @@ -57978,7 +60931,7 @@ index 30f6e92..e915ba5 100644 } smb2_stats; #endif /* CONFIG_CIFS_SMB2 */ } stats; -@@ -1170,7 +1170,7 @@ convert_delimiter(char *path, char delim) +@@ -1172,7 +1172,7 @@ convert_delimiter(char *path, char delim) } #ifdef CONFIG_CIFS_STATS @@ -57987,7 +60940,7 @@ index 30f6e92..e915ba5 100644 static inline void cifs_stats_bytes_written(struct cifs_tcon *tcon, unsigned int bytes) -@@ -1536,8 +1536,8 @@ GLOBAL_EXTERN atomic_t tconInfoReconnectCount; +@@ -1538,8 +1538,8 @@ GLOBAL_EXTERN atomic_t tconInfoReconnectCount; /* Various Debug counters */ GLOBAL_EXTERN atomic_t bufAllocCount; /* current number allocated */ #ifdef CONFIG_CIFS_STATS2 @@ -57999,7 +60952,7 @@ index 30f6e92..e915ba5 100644 GLOBAL_EXTERN atomic_t smBufAllocCount; GLOBAL_EXTERN atomic_t midCount; diff --git a/fs/cifs/file.c b/fs/cifs/file.c -index 5ed03e0..e9a3a6c 100644 +index e90a1e9..908699d 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c @@ -1900,10 +1900,14 @@ static int cifs_writepages(struct address_space *mapping, @@ -58152,7 +61105,7 @@ index d1fdfa8..94558f8 100644 } diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c -index 35ddc3e..563e809 100644 +index 787844b..8e7bc7d 100644 --- a/fs/cifs/smb2ops.c +++ b/fs/cifs/smb2ops.c @@ -364,8 +364,8 @@ smb2_clear_stats(struct cifs_tcon *tcon) @@ -58273,10 +61226,10 @@ index 35ddc3e..563e809 100644 } diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c -index 1fb6ad2..758e171 100644 +index b0b260d..c8927e1 100644 --- a/fs/cifs/smb2pdu.c +++ b/fs/cifs/smb2pdu.c -@@ -2097,8 +2097,7 @@ SMB2_query_directory(const unsigned int xid, struct cifs_tcon *tcon, +@@ -2105,8 +2105,7 @@ SMB2_query_directory(const unsigned int xid, struct cifs_tcon *tcon, default: cifs_dbg(VFS, "info level %u isn't supported\n", srch_inf->info_level); @@ -58465,7 +61418,7 @@ index 4d24d17..4f8c09e 100644 /* diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c -index e822890..59374d5 100644 +index e822890..fed89d9 100644 --- a/fs/compat_ioctl.c +++ b/fs/compat_ioctl.c @@ -621,7 +621,7 @@ static int serial_struct_ioctl(unsigned fd, unsigned cmd, @@ -58483,7 +61436,7 @@ index e822890..59374d5 100644 return -EFAULT; - if (get_user(datap, &umsgs[i].buf) || - put_user(compat_ptr(datap), &tmsgs[i].buf)) -+ if (get_user(datap, (u8 __user * __user *)&umsgs[i].buf) || ++ if (get_user(datap, (compat_caddr_t __user *)&umsgs[i].buf) || + put_user(compat_ptr(datap), (u8 __user * __user *)&tmsgs[i].buf)) return -EFAULT; } @@ -58509,7 +61462,7 @@ index e822890..59374d5 100644 return 1; if (a < b) diff --git a/fs/configfs/dir.c b/fs/configfs/dir.c -index e081acb..911df21 100644 +index 668dcab..daebcd6 100644 --- a/fs/configfs/dir.c +++ b/fs/configfs/dir.c @@ -1548,7 +1548,8 @@ static int configfs_readdir(struct file *file, struct dir_context *ctx) @@ -58537,7 +61490,7 @@ index e081acb..911df21 100644 /* * We'll have a dentry and an inode for diff --git a/fs/coredump.c b/fs/coredump.c -index 0b2528f..836c55f 100644 +index a93f7e6..d58bcbe 100644 --- a/fs/coredump.c +++ b/fs/coredump.c @@ -442,8 +442,8 @@ static void wait_for_dump_helpers(struct file *file) @@ -58643,7 +61596,7 @@ index 0b2528f..836c55f 100644 return 0; while (nr) { diff --git a/fs/dcache.c b/fs/dcache.c -index e99c6f5..2838bf58 100644 +index 06f6585..f95a6d1 100644 --- a/fs/dcache.c +++ b/fs/dcache.c @@ -1445,7 +1445,7 @@ struct dentry *__d_alloc(struct super_block *sb, const struct qstr *name) @@ -58666,7 +61619,7 @@ index e99c6f5..2838bf58 100644 dcache_init(); inode_init(); diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c -index 8c41b52..145b1b9 100644 +index 16a46b6..41696fd 100644 --- a/fs/debugfs/inode.c +++ b/fs/debugfs/inode.c @@ -416,7 +416,11 @@ EXPORT_SYMBOL_GPL(debugfs_create_file); @@ -58708,7 +61661,7 @@ index e4141f2..d8263e8 100644 i += packet_length_size; if (copy_to_user(&buf[i], msg_ctx->msg, msg_ctx->msg_size)) diff --git a/fs/exec.c b/fs/exec.c -index 238b7aa..a421d91 100644 +index a3d33fe..49e9bc9 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -56,8 +56,20 @@ @@ -59025,7 +61978,7 @@ index 238b7aa..a421d91 100644 tsk->mm->vmacache_seqnum = 0; vmacache_flush(tsk); task_unlock(tsk); -@@ -1246,7 +1325,7 @@ static void check_unsafe_exec(struct linux_binprm *bprm) +@@ -1247,7 +1326,7 @@ static void check_unsafe_exec(struct linux_binprm *bprm) } rcu_read_unlock(); @@ -59034,7 +61987,7 @@ index 238b7aa..a421d91 100644 bprm->unsafe |= LSM_UNSAFE_SHARE; else p->fs->in_exec = 1; -@@ -1422,6 +1501,31 @@ static int exec_binprm(struct linux_binprm *bprm) +@@ -1423,6 +1502,31 @@ static int exec_binprm(struct linux_binprm *bprm) return ret; } @@ -59066,7 +62019,7 @@ index 238b7aa..a421d91 100644 /* * sys_execve() executes a new program. */ -@@ -1429,6 +1533,11 @@ static int do_execve_common(struct filename *filename, +@@ -1430,6 +1534,11 @@ static int do_execve_common(struct filename *filename, struct user_arg_ptr argv, struct user_arg_ptr envp) { @@ -59078,7 +62031,7 @@ index 238b7aa..a421d91 100644 struct linux_binprm *bprm; struct file *file; struct files_struct *displaced; -@@ -1437,6 +1546,8 @@ static int do_execve_common(struct filename *filename, +@@ -1438,6 +1547,8 @@ static int do_execve_common(struct filename *filename, if (IS_ERR(filename)) return PTR_ERR(filename); @@ -59087,7 +62040,7 @@ index 238b7aa..a421d91 100644 /* * We move the actual failure in case of RLIMIT_NPROC excess from * set*uid() to execve() because too many poorly written programs -@@ -1474,11 +1585,21 @@ static int do_execve_common(struct filename *filename, +@@ -1475,11 +1586,21 @@ static int do_execve_common(struct filename *filename, if (IS_ERR(file)) goto out_unmark; @@ -59109,7 +62062,7 @@ index 238b7aa..a421d91 100644 retval = bprm_mm_init(bprm); if (retval) goto out_unmark; -@@ -1495,24 +1616,70 @@ static int do_execve_common(struct filename *filename, +@@ -1496,24 +1617,70 @@ static int do_execve_common(struct filename *filename, if (retval < 0) goto out; @@ -59184,7 +62137,7 @@ index 238b7aa..a421d91 100644 current->fs->in_exec = 0; current->in_execve = 0; acct_update_integrals(current); -@@ -1523,6 +1690,14 @@ static int do_execve_common(struct filename *filename, +@@ -1524,6 +1691,14 @@ static int do_execve_common(struct filename *filename, put_files_struct(displaced); return retval; @@ -59199,7 +62152,7 @@ index 238b7aa..a421d91 100644 out: if (bprm->mm) { acct_arg_size(bprm, 0); -@@ -1614,3 +1789,312 @@ COMPAT_SYSCALL_DEFINE3(execve, const char __user *, filename, +@@ -1615,3 +1790,312 @@ COMPAT_SYSCALL_DEFINE3(execve, const char __user *, filename, return compat_do_execve(getname(filename), argv, envp); } #endif @@ -59597,10 +62550,10 @@ index c6874be..f8a6ae8 100644 static int diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c -index 5c56785..77698a2 100644 +index fca3820..e1ea241 100644 --- a/fs/ext4/balloc.c +++ b/fs/ext4/balloc.c -@@ -534,8 +534,8 @@ static int ext4_has_free_clusters(struct ext4_sb_info *sbi, +@@ -553,8 +553,8 @@ static int ext4_has_free_clusters(struct ext4_sb_info *sbi, /* Hm, nope. Are (enough) root reserved clusters available? */ if (uid_eq(sbi->s_resuid, current_fsuid()) || (!gid_eq(sbi->s_resgid, GLOBAL_ROOT_GID) && in_group_p(sbi->s_resgid)) || @@ -59612,10 +62565,10 @@ index 5c56785..77698a2 100644 if (free_clusters >= (nclusters + dirty_clusters + resv_clusters)) diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h -index f542e48..c0275f5 100644 +index 1bbe7c3..c7442e2 100644 --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h -@@ -1274,19 +1274,19 @@ struct ext4_sb_info { +@@ -1276,19 +1276,19 @@ struct ext4_sb_info { unsigned long s_mb_last_start; /* stats for buddy allocator */ @@ -59645,26 +62598,11 @@ index f542e48..c0275f5 100644 atomic_t s_lock_busy; /* locality groups */ -diff --git a/fs/ext4/indirect.c b/fs/ext4/indirect.c -index e6574d7..c30cbe2 100644 ---- a/fs/ext4/indirect.c -+++ b/fs/ext4/indirect.c -@@ -1345,8 +1345,8 @@ static int free_hole_blocks(handle_t *handle, struct inode *inode, - if (level == 0 || - (bh && all_zeroes((__le32 *)bh->b_data, - (__le32 *)bh->b_data + addr_per_block))) { -- ext4_free_data(handle, inode, parent_bh, &blk, &blk+1); -- *i_data = 0; -+ ext4_free_data(handle, inode, parent_bh, -+ i_data, i_data + 1); - } - brelse(bh); - bh = NULL; diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c -index 2735a72..d083044 100644 +index c3e7418..f62cab3 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c -@@ -1889,7 +1889,7 @@ void ext4_mb_simple_scan_group(struct ext4_allocation_context *ac, +@@ -1901,7 +1901,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) @@ -59673,7 +62611,7 @@ index 2735a72..d083044 100644 break; } -@@ -2199,7 +2199,7 @@ repeat: +@@ -2211,7 +2211,7 @@ repeat: ac->ac_status = AC_STATUS_CONTINUE; ac->ac_flags |= EXT4_MB_HINT_FIRST; cr = 3; @@ -59682,7 +62620,7 @@ index 2735a72..d083044 100644 goto repeat; } } -@@ -2707,25 +2707,25 @@ int ext4_mb_release(struct super_block *sb) +@@ -2717,25 +2717,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)", @@ -59718,7 +62656,7 @@ index 2735a72..d083044 100644 } free_percpu(sbi->s_locality_groups); -@@ -3179,16 +3179,16 @@ static void ext4_mb_collect_stats(struct ext4_allocation_context *ac) +@@ -3191,16 +3191,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) { @@ -59741,7 +62679,7 @@ index 2735a72..d083044 100644 } if (ac->ac_op == EXT4_MB_HISTORY_ALLOC) -@@ -3593,7 +3593,7 @@ ext4_mb_new_inode_pa(struct ext4_allocation_context *ac) +@@ -3627,7 +3627,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); @@ -59750,7 +62688,7 @@ index 2735a72..d083044 100644 ei = EXT4_I(ac->ac_inode); grp = ext4_get_group_info(sb, ac->ac_b_ex.fe_group); -@@ -3653,7 +3653,7 @@ ext4_mb_new_group_pa(struct ext4_allocation_context *ac) +@@ -3687,7 +3687,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); @@ -59759,7 +62697,7 @@ index 2735a72..d083044 100644 grp = ext4_get_group_info(sb, ac->ac_b_ex.fe_group); lg = ac->ac_lg; -@@ -3742,7 +3742,7 @@ ext4_mb_release_inode_pa(struct ext4_buddy *e4b, struct buffer_head *bitmap_bh, +@@ -3776,7 +3776,7 @@ ext4_mb_release_inode_pa(struct ext4_buddy *e4b, struct buffer_head *bitmap_bh, * from the bitmap and continue. */ } @@ -59768,7 +62706,7 @@ index 2735a72..d083044 100644 return err; } -@@ -3760,7 +3760,7 @@ ext4_mb_release_group_pa(struct ext4_buddy *e4b, +@@ -3794,7 +3794,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); @@ -59778,7 +62716,7 @@ index 2735a72..d083044 100644 return 0; diff --git a/fs/ext4/mmp.c b/fs/ext4/mmp.c -index 04434ad..6404663 100644 +index 32bce84..112d969 100644 --- a/fs/ext4/mmp.c +++ b/fs/ext4/mmp.c @@ -113,7 +113,7 @@ static int read_mmp_block(struct super_block *sb, struct buffer_head **bh, @@ -59791,10 +62729,10 @@ index 04434ad..6404663 100644 "MMP failure info: last update time: %llu, last update " "node: %s, last update device: %s\n", diff --git a/fs/ext4/super.c b/fs/ext4/super.c -index 29a403c..f58dbdb 100644 +index beeb5c4..998c28d 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c -@@ -1275,7 +1275,7 @@ static ext4_fsblk_t get_sb_block(void **data) +@@ -1276,7 +1276,7 @@ static ext4_fsblk_t get_sb_block(void **data) } #define DEFAULT_JOURNAL_IOPRIO (IOPRIO_PRIO_VALUE(IOPRIO_CLASS_BE, 3)) @@ -59803,7 +62741,7 @@ index 29a403c..f58dbdb 100644 "Contact linux-ext4@vger.kernel.org if you think we should keep it.\n"; #ifdef CONFIG_QUOTA -@@ -2453,7 +2453,7 @@ struct ext4_attr { +@@ -2464,7 +2464,7 @@ struct ext4_attr { int offset; int deprecated_val; } u; @@ -59813,10 +62751,10 @@ index 29a403c..f58dbdb 100644 static int parse_strtoull(const char *buf, unsigned long long max, unsigned long long *value) diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c -index 4eec399..1d9444c 100644 +index e738733..9843a6c 100644 --- a/fs/ext4/xattr.c +++ b/fs/ext4/xattr.c -@@ -383,7 +383,7 @@ static int +@@ -386,7 +386,7 @@ static int ext4_xattr_list_entries(struct dentry *dentry, struct ext4_xattr_entry *entry, char *buffer, size_t buffer_size) { @@ -59825,7 +62763,7 @@ index 4eec399..1d9444c 100644 for (; !IS_LAST_ENTRY(entry); entry = EXT4_XATTR_NEXT(entry)) { const struct xattr_handler *handler = -@@ -400,9 +400,10 @@ ext4_xattr_list_entries(struct dentry *dentry, struct ext4_xattr_entry *entry, +@@ -403,9 +403,10 @@ ext4_xattr_list_entries(struct dentry *dentry, struct ext4_xattr_entry *entry, buffer += size; } rest -= size; @@ -59885,7 +62823,7 @@ index 999ff5c..ac037c9 100644 goto out_err; } diff --git a/fs/file.c b/fs/file.c -index 8f294cf..d0f3872 100644 +index 66923fe..2849783 100644 --- a/fs/file.c +++ b/fs/file.c @@ -16,6 +16,7 @@ @@ -59896,7 +62834,7 @@ index 8f294cf..d0f3872 100644 #include #include #include -@@ -144,7 +145,7 @@ out: +@@ -139,7 +140,7 @@ out: * Return <0 error code on error; 1 on successful completion. * The files->file_lock should be held on entry, and will be held on exit. */ @@ -59905,7 +62843,7 @@ index 8f294cf..d0f3872 100644 __releases(files->file_lock) __acquires(files->file_lock) { -@@ -189,7 +190,7 @@ static int expand_fdtable(struct files_struct *files, int nr) +@@ -184,7 +185,7 @@ static int expand_fdtable(struct files_struct *files, int nr) * expanded and execution may have blocked. * The files->file_lock should be held on entry, and will be held on exit. */ @@ -59914,7 +62852,7 @@ index 8f294cf..d0f3872 100644 { struct fdtable *fdt; -@@ -804,6 +805,7 @@ int replace_fd(unsigned fd, struct file *file, unsigned flags) +@@ -799,6 +800,7 @@ int replace_fd(unsigned fd, struct file *file, unsigned flags) if (!file) return __close_fd(files, fd); @@ -59922,7 +62860,7 @@ index 8f294cf..d0f3872 100644 if (fd >= rlimit(RLIMIT_NOFILE)) return -EBADF; -@@ -830,6 +832,7 @@ SYSCALL_DEFINE3(dup3, unsigned int, oldfd, unsigned int, newfd, int, flags) +@@ -825,6 +827,7 @@ SYSCALL_DEFINE3(dup3, unsigned int, oldfd, unsigned int, newfd, int, flags) if (unlikely(oldfd == newfd)) return -EINVAL; @@ -59930,7 +62868,7 @@ index 8f294cf..d0f3872 100644 if (newfd >= rlimit(RLIMIT_NOFILE)) return -EBADF; -@@ -885,6 +888,7 @@ SYSCALL_DEFINE1(dup, unsigned int, fildes) +@@ -880,6 +883,7 @@ SYSCALL_DEFINE1(dup, unsigned int, fildes) int f_dupfd(unsigned int from, struct file *file, unsigned flags) { int err; @@ -60042,7 +62980,7 @@ index 7dca743..543d620 100644 .seq = SEQCNT_ZERO(init_fs.seq), .umask = 0022, diff --git a/fs/fscache/cookie.c b/fs/fscache/cookie.c -index 29d7feb..303644d 100644 +index aec01be..cf81ff9 100644 --- a/fs/fscache/cookie.c +++ b/fs/fscache/cookie.c @@ -19,7 +19,7 @@ @@ -60187,10 +63125,10 @@ index 29d7feb..303644d 100644 __fscache_use_cookie(cookie); if (fscache_submit_op(object, op) < 0) diff --git a/fs/fscache/internal.h b/fs/fscache/internal.h -index 4226f66..0fb3f45 100644 +index bc6c08f..09c0d96 100644 --- a/fs/fscache/internal.h +++ b/fs/fscache/internal.h -@@ -133,8 +133,8 @@ extern void fscache_operation_gc(struct work_struct *); +@@ -139,8 +139,8 @@ extern void fscache_operation_gc(struct work_struct *); extern int fscache_wait_for_deferred_lookup(struct fscache_cookie *); extern int fscache_wait_for_operation_activation(struct fscache_object *, struct fscache_operation *, @@ -60201,7 +63139,7 @@ index 4226f66..0fb3f45 100644 void (*)(struct fscache_operation *)); extern void fscache_invalidate_writes(struct fscache_cookie *); -@@ -153,101 +153,101 @@ extern void fscache_proc_cleanup(void); +@@ -159,101 +159,101 @@ extern void fscache_proc_cleanup(void); * stats.c */ #ifdef CONFIG_FSCACHE_STATS @@ -60384,7 +63322,7 @@ index 4226f66..0fb3f45 100644 extern atomic_t fscache_n_cop_alloc_object; extern atomic_t fscache_n_cop_lookup_object; -@@ -272,6 +272,11 @@ static inline void fscache_stat(atomic_t *stat) +@@ -278,6 +278,11 @@ static inline void fscache_stat(atomic_t *stat) atomic_inc(stat); } @@ -60396,7 +63334,7 @@ index 4226f66..0fb3f45 100644 static inline void fscache_stat_d(atomic_t *stat) { atomic_dec(stat); -@@ -284,6 +289,7 @@ extern const struct file_operations fscache_stats_fops; +@@ -290,6 +295,7 @@ extern const struct file_operations fscache_stats_fops; #define __fscache_stat(stat) (NULL) #define fscache_stat(stat) do {} while (0) @@ -60520,7 +63458,7 @@ index d3b4539..ed0c659 100644 object->cache->ops->update_object(object); fscache_stat_d(&fscache_n_cop_update_object); diff --git a/fs/fscache/operation.c b/fs/fscache/operation.c -index 318071a..379938b 100644 +index e7b87a0..a85d47a 100644 --- a/fs/fscache/operation.c +++ b/fs/fscache/operation.c @@ -17,7 +17,7 @@ @@ -60541,7 +63479,7 @@ index 318071a..379938b 100644 switch (op->flags & FSCACHE_OP_TYPE) { case FSCACHE_OP_ASYNC: _debug("queue async"); -@@ -73,7 +73,7 @@ static void fscache_run_op(struct fscache_object *object, +@@ -72,7 +72,7 @@ static void fscache_run_op(struct fscache_object *object, wake_up_bit(&op->flags, FSCACHE_OP_WAITING); if (op->processor) fscache_enqueue_operation(op); @@ -60550,7 +63488,7 @@ index 318071a..379938b 100644 } /* -@@ -105,11 +105,11 @@ int fscache_submit_exclusive_op(struct fscache_object *object, +@@ -104,11 +104,11 @@ int fscache_submit_exclusive_op(struct fscache_object *object, if (object->n_in_progress > 0) { atomic_inc(&op->usage); list_add_tail(&op->pend_link, &object->pending_ops); @@ -60564,7 +63502,7 @@ index 318071a..379938b 100644 fscache_start_operations(object); } else { ASSERTCMP(object->n_in_progress, ==, 0); -@@ -125,7 +125,7 @@ int fscache_submit_exclusive_op(struct fscache_object *object, +@@ -124,7 +124,7 @@ int fscache_submit_exclusive_op(struct fscache_object *object, object->n_exclusive++; /* reads and writes must wait */ atomic_inc(&op->usage); list_add_tail(&op->pend_link, &object->pending_ops); @@ -60573,7 +63511,7 @@ index 318071a..379938b 100644 ret = 0; } else { /* If we're in any other state, there must have been an I/O -@@ -212,11 +212,11 @@ int fscache_submit_op(struct fscache_object *object, +@@ -211,11 +211,11 @@ int fscache_submit_op(struct fscache_object *object, if (object->n_exclusive > 0) { atomic_inc(&op->usage); list_add_tail(&op->pend_link, &object->pending_ops); @@ -60587,7 +63525,7 @@ index 318071a..379938b 100644 fscache_start_operations(object); } else { ASSERTCMP(object->n_exclusive, ==, 0); -@@ -228,10 +228,10 @@ int fscache_submit_op(struct fscache_object *object, +@@ -227,10 +227,10 @@ int fscache_submit_op(struct fscache_object *object, object->n_ops++; atomic_inc(&op->usage); list_add_tail(&op->pend_link, &object->pending_ops); @@ -60600,7 +63538,7 @@ index 318071a..379938b 100644 op->state = FSCACHE_OP_ST_CANCELLED; ret = -ENOBUFS; } else if (!test_bit(FSCACHE_IOERROR, &object->cache->flags)) { -@@ -310,7 +310,7 @@ int fscache_cancel_op(struct fscache_operation *op, +@@ -309,7 +309,7 @@ int fscache_cancel_op(struct fscache_operation *op, ret = -EBUSY; if (op->state == FSCACHE_OP_ST_PENDING) { ASSERT(!list_empty(&op->pend_link)); @@ -60609,7 +63547,7 @@ index 318071a..379938b 100644 list_del_init(&op->pend_link); if (do_cancel) do_cancel(op); -@@ -342,7 +342,7 @@ void fscache_cancel_all_ops(struct fscache_object *object) +@@ -341,7 +341,7 @@ void fscache_cancel_all_ops(struct fscache_object *object) while (!list_empty(&object->pending_ops)) { op = list_entry(object->pending_ops.next, struct fscache_operation, pend_link); @@ -60618,7 +63556,7 @@ index 318071a..379938b 100644 list_del_init(&op->pend_link); ASSERTCMP(op->state, ==, FSCACHE_OP_ST_PENDING); -@@ -414,7 +414,7 @@ void fscache_put_operation(struct fscache_operation *op) +@@ -413,7 +413,7 @@ void fscache_put_operation(struct fscache_operation *op) op->state, ==, FSCACHE_OP_ST_CANCELLED); op->state = FSCACHE_OP_ST_DEAD; @@ -60627,7 +63565,7 @@ index 318071a..379938b 100644 if (op->release) { op->release(op); -@@ -433,7 +433,7 @@ void fscache_put_operation(struct fscache_operation *op) +@@ -432,7 +432,7 @@ void fscache_put_operation(struct fscache_operation *op) * lock, and defer it otherwise */ if (!spin_trylock(&object->lock)) { _debug("defer put"); @@ -60636,7 +63574,7 @@ index 318071a..379938b 100644 cache = object->cache; spin_lock(&cache->op_gc_list_lock); -@@ -486,7 +486,7 @@ void fscache_operation_gc(struct work_struct *work) +@@ -485,7 +485,7 @@ void fscache_operation_gc(struct work_struct *work) _debug("GC DEFERRED REL OBJ%x OP%x", object->debug_id, op->debug_id); @@ -60646,7 +63584,7 @@ index 318071a..379938b 100644 ASSERTCMP(atomic_read(&op->usage), ==, 0); ASSERTCMP(op->state, ==, FSCACHE_OP_ST_DEAD); diff --git a/fs/fscache/page.c b/fs/fscache/page.c -index 7f5c658..6c1e164 100644 +index ed70714..67f4982 100644 --- a/fs/fscache/page.c +++ b/fs/fscache/page.c @@ -61,7 +61,7 @@ try_again: @@ -61429,10 +64367,10 @@ index 40d13c7..ddf52b9 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 13b691a..1ffca5ae 100644 +index 966ace8..030a03a 100644 --- a/fs/fuse/cuse.c +++ b/fs/fuse/cuse.c -@@ -607,10 +607,12 @@ static int __init cuse_init(void) +@@ -611,10 +611,12 @@ static int __init cuse_init(void) INIT_LIST_HEAD(&cuse_conntbl[i]); /* inherit and extend fuse_dev_operations */ @@ -61450,10 +64388,10 @@ index 13b691a..1ffca5ae 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 aac71ce..fcd6a1b 100644 +index ca88731..8e9c55d 100644 --- a/fs/fuse/dev.c +++ b/fs/fuse/dev.c -@@ -1323,7 +1323,7 @@ static ssize_t fuse_dev_splice_read(struct file *in, loff_t *ppos, +@@ -1318,7 +1318,7 @@ static ssize_t fuse_dev_splice_read(struct file *in, loff_t *ppos, ret = 0; pipe_lock(pipe); @@ -61462,7 +64400,7 @@ index aac71ce..fcd6a1b 100644 send_sig(SIGPIPE, current, 0); if (!ret) ret = -EPIPE; -@@ -1352,7 +1352,7 @@ static ssize_t fuse_dev_splice_read(struct file *in, loff_t *ppos, +@@ -1347,7 +1347,7 @@ static ssize_t fuse_dev_splice_read(struct file *in, loff_t *ppos, page_nr++; ret += buf->len; @@ -61472,10 +64410,10 @@ index aac71ce..fcd6a1b 100644 } diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c -index 4219835..3473b7e 100644 +index 0c60482..025724f 100644 --- a/fs/fuse/dir.c +++ b/fs/fuse/dir.c -@@ -1478,7 +1478,7 @@ static char *read_link(struct dentry *dentry) +@@ -1485,7 +1485,7 @@ static char *read_link(struct dentry *dentry) return link; } @@ -61485,7 +64423,7 @@ index 4219835..3473b7e 100644 if (!IS_ERR(link)) free_page((unsigned long) link); diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c -index 9c470fd..aae410e 100644 +index bb529f3..454c253 100644 --- a/fs/hostfs/hostfs_kern.c +++ b/fs/hostfs/hostfs_kern.c @@ -898,7 +898,7 @@ static void *hostfs_follow_link(struct dentry *dentry, struct nameidata *nd) @@ -61498,10 +64436,10 @@ index 9c470fd..aae410e 100644 __putname(s); } diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c -index e19d4c0..8a357a9 100644 +index 1e2872b..7aea000 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, +@@ -154,6 +154,7 @@ hugetlb_get_unmapped_area(struct file *file, unsigned long addr, struct mm_struct *mm = current->mm; struct vm_area_struct *vma; struct hstate *h = hstate_file(file); @@ -61509,7 +64447,7 @@ index e19d4c0..8a357a9 100644 struct vm_unmapped_area_info info; if (len & ~huge_page_mask(h)) -@@ -165,17 +166,26 @@ hugetlb_get_unmapped_area(struct file *file, unsigned long addr, +@@ -167,17 +168,26 @@ hugetlb_get_unmapped_area(struct file *file, unsigned long addr, return addr; } @@ -61538,7 +64476,7 @@ index e19d4c0..8a357a9 100644 info.high_limit = TASK_SIZE; info.align_mask = PAGE_MASK & ~huge_page_mask(h); info.align_offset = 0; -@@ -921,7 +931,7 @@ static struct file_system_type hugetlbfs_fs_type = { +@@ -919,7 +929,7 @@ static struct file_system_type hugetlbfs_fs_type = { }; MODULE_ALIAS_FS("hugetlbfs"); @@ -61548,7 +64486,7 @@ index e19d4c0..8a357a9 100644 static int can_do_hugetlb_shm(void) { diff --git a/fs/inode.c b/fs/inode.c -index d2fb2f2..a6444b0 100644 +index 6eecb7f..abec305 100644 --- a/fs/inode.c +++ b/fs/inode.c @@ -839,16 +839,20 @@ unsigned int get_next_ino(void) @@ -61604,10 +64542,10 @@ index a6597d6..41b30ec 100644 /* diff --git a/fs/jfs/super.c b/fs/jfs/super.c -index 97f7fda..09bd33d 100644 +index adf8cb0..bb935fa 100644 --- a/fs/jfs/super.c +++ b/fs/jfs/super.c -@@ -885,7 +885,7 @@ static int __init init_jfs_fs(void) +@@ -893,7 +893,7 @@ static int __init init_jfs_fs(void) jfs_inode_cachep = kmem_cache_create("jfs_ip", sizeof(struct jfs_inode_info), 0, @@ -61630,10 +64568,10 @@ index a693f5b..82276a1 100644 unsigned long hash = init_name_hash(); unsigned int len = strlen(name); diff --git a/fs/kernfs/file.c b/fs/kernfs/file.c -index 5e9a80c..3853a24 100644 +index d895b4b..0b8af77 100644 --- a/fs/kernfs/file.c +++ b/fs/kernfs/file.c -@@ -33,7 +33,7 @@ static DEFINE_MUTEX(kernfs_open_file_mutex); +@@ -34,7 +34,7 @@ static DEFINE_MUTEX(kernfs_open_file_mutex); struct kernfs_open_node { atomic_t refcnt; @@ -61642,7 +64580,7 @@ index 5e9a80c..3853a24 100644 wait_queue_head_t poll; struct list_head files; /* goes through kernfs_open_file.list */ }; -@@ -149,7 +149,7 @@ static int kernfs_seq_show(struct seq_file *sf, void *v) +@@ -163,7 +163,7 @@ static int kernfs_seq_show(struct seq_file *sf, void *v) { struct kernfs_open_file *of = sf->private; @@ -61651,7 +64589,7 @@ index 5e9a80c..3853a24 100644 return of->kn->attr.ops->seq_show(sf, v); } -@@ -361,12 +361,12 @@ static int kernfs_vma_page_mkwrite(struct vm_area_struct *vma, +@@ -375,12 +375,12 @@ static int kernfs_vma_page_mkwrite(struct vm_area_struct *vma, return ret; } @@ -61667,7 +64605,7 @@ index 5e9a80c..3853a24 100644 if (!of->vm_ops) return -EINVAL; -@@ -567,7 +567,7 @@ static int kernfs_get_open_node(struct kernfs_node *kn, +@@ -581,7 +581,7 @@ static int kernfs_get_open_node(struct kernfs_node *kn, return -ENOMEM; atomic_set(&new_on->refcnt, 0); @@ -61676,7 +64614,7 @@ index 5e9a80c..3853a24 100644 init_waitqueue_head(&new_on->poll); INIT_LIST_HEAD(&new_on->files); goto retry; -@@ -773,7 +773,7 @@ static unsigned int kernfs_fop_poll(struct file *filp, poll_table *wait) +@@ -787,7 +787,7 @@ static unsigned int kernfs_fop_poll(struct file *filp, poll_table *wait) kernfs_put_active(kn); @@ -61685,15 +64623,15 @@ index 5e9a80c..3853a24 100644 goto trigger; return DEFAULT_POLLMASK; -@@ -798,7 +798,7 @@ void kernfs_notify(struct kernfs_node *kn) - if (!WARN_ON(kernfs_type(kn) != KERNFS_FILE)) { - on = kn->attr.open; - if (on) { -- atomic_inc(&on->event); -+ atomic_inc_unchecked(&on->event); - wake_up_interruptible(&on->poll); - } +@@ -818,7 +818,7 @@ repeat: + + on = kn->attr.open; + if (on) { +- atomic_inc(&on->event); ++ atomic_inc_unchecked(&on->event); + wake_up_interruptible(&on->poll); } + diff --git a/fs/kernfs/symlink.c b/fs/kernfs/symlink.c index 8a19889..4c3069a 100644 --- a/fs/kernfs/symlink.c @@ -61708,10 +64646,10 @@ index 8a19889..4c3069a 100644 free_page((unsigned long)page); } diff --git a/fs/libfs.c b/fs/libfs.c -index a184424..944ddce 100644 +index 88e3e00..979c262 100644 --- a/fs/libfs.c +++ b/fs/libfs.c -@@ -159,6 +159,9 @@ int dcache_readdir(struct file *file, struct dir_context *ctx) +@@ -160,6 +160,9 @@ int dcache_readdir(struct file *file, struct dir_context *ctx) for (p = q->next; p != &dentry->d_subdirs; p = p->next) { struct dentry *next = list_entry(p, struct dentry, d_u.d_child); @@ -61721,7 +64659,7 @@ index a184424..944ddce 100644 spin_lock_nested(&next->d_lock, DENTRY_D_LOCK_NESTED); if (!simple_positive(next)) { spin_unlock(&next->d_lock); -@@ -167,7 +170,12 @@ int dcache_readdir(struct file *file, struct dir_context *ctx) +@@ -168,7 +171,12 @@ int dcache_readdir(struct file *file, struct dir_context *ctx) spin_unlock(&next->d_lock); spin_unlock(&dentry->d_lock); @@ -61735,7 +64673,7 @@ index a184424..944ddce 100644 next->d_inode->i_ino, dt_type(next->d_inode))) return 0; spin_lock(&dentry->d_lock); -@@ -999,7 +1007,7 @@ EXPORT_SYMBOL(noop_fsync); +@@ -1027,7 +1035,7 @@ EXPORT_SYMBOL(noop_fsync); void kfree_put_link(struct dentry *dentry, struct nameidata *nd, void *cookie) { @@ -61763,18 +64701,19 @@ index acd3947..1f896e2 100644 memcpy(c->data, &cookie, 4); c->len=4; diff --git a/fs/locks.c b/fs/locks.c -index e390bd9..c79870e 100644 +index 717fbc4..74628c3 100644 --- a/fs/locks.c +++ b/fs/locks.c -@@ -2315,16 +2315,16 @@ void locks_remove_file(struct file *filp) +@@ -2327,7 +2327,7 @@ void locks_remove_file(struct file *filp) locks_remove_posix(filp, (fl_owner_t)filp); if (filp->f_op->flock) { - struct file_lock fl = { + struct file_lock flock = { + .fl_owner = (fl_owner_t)filp, .fl_pid = current->tgid, .fl_file = filp, - .fl_flags = FL_FLOCK, +@@ -2335,9 +2335,9 @@ void locks_remove_file(struct file *filp) .fl_type = F_UNLCK, .fl_end = OFFSET_MAX, }; @@ -61810,7 +64749,7 @@ index d55297f..f5b28c5 100644 #define MNT_NS_INTERNAL ERR_PTR(-EINVAL) /* distinct from any mnt_namespace */ diff --git a/fs/namei.c b/fs/namei.c -index 985c6f3..5f520b67 100644 +index 9eb787e..5f520b67 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -330,17 +330,32 @@ int generic_permission(struct inode *inode, int mask) @@ -61945,19 +64884,7 @@ index 985c6f3..5f520b67 100644 return retval; } -@@ -2256,9 +2287,10 @@ done: - goto out; - } - path->dentry = dentry; -- path->mnt = mntget(nd->path.mnt); -+ path->mnt = nd->path.mnt; - if (should_follow_link(dentry, nd->flags & LOOKUP_FOLLOW)) - return 1; -+ mntget(path->mnt); - follow_mount(path); - error = 0; - out: -@@ -2569,6 +2601,13 @@ static int may_open(struct path *path, int acc_mode, int flag) +@@ -2570,6 +2601,13 @@ static int may_open(struct path *path, int acc_mode, int flag) if (flag & O_NOATIME && !inode_owner_or_capable(inode)) return -EPERM; @@ -61971,7 +64898,7 @@ index 985c6f3..5f520b67 100644 return 0; } -@@ -2800,7 +2839,7 @@ looked_up: +@@ -2801,7 +2839,7 @@ looked_up: * cleared otherwise prior to returning. */ static int lookup_open(struct nameidata *nd, struct path *path, @@ -61980,7 +64907,7 @@ index 985c6f3..5f520b67 100644 const struct open_flags *op, bool got_write, int *opened) { -@@ -2835,6 +2874,17 @@ static int lookup_open(struct nameidata *nd, struct path *path, +@@ -2836,6 +2874,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; @@ -61998,7 +64925,7 @@ index 985c6f3..5f520b67 100644 if (!IS_POSIXACL(dir->d_inode)) mode &= ~current_umask(); /* -@@ -2856,6 +2906,8 @@ static int lookup_open(struct nameidata *nd, struct path *path, +@@ -2857,6 +2906,8 @@ static int lookup_open(struct nameidata *nd, struct path *path, nd->flags & LOOKUP_EXCL); if (error) goto out_dput; @@ -62007,7 +64934,7 @@ index 985c6f3..5f520b67 100644 } out_no_open: path->dentry = dentry; -@@ -2870,7 +2922,7 @@ out_dput: +@@ -2871,7 +2922,7 @@ out_dput: /* * Handle the last step of open() */ @@ -62016,7 +64943,7 @@ index 985c6f3..5f520b67 100644 struct file *file, const struct open_flags *op, int *opened, struct filename *name) { -@@ -2920,6 +2972,15 @@ static int do_last(struct nameidata *nd, struct path *path, +@@ -2921,6 +2972,15 @@ static int do_last(struct nameidata *nd, struct path *path, if (error) return error; @@ -62032,7 +64959,7 @@ index 985c6f3..5f520b67 100644 audit_inode(name, dir, LOOKUP_PARENT); error = -EISDIR; /* trailing slashes? */ -@@ -2939,7 +3000,7 @@ retry_lookup: +@@ -2940,7 +3000,7 @@ retry_lookup: */ } mutex_lock(&dir->d_inode->i_mutex); @@ -62041,7 +64968,7 @@ index 985c6f3..5f520b67 100644 mutex_unlock(&dir->d_inode->i_mutex); if (error <= 0) { -@@ -2963,11 +3024,28 @@ retry_lookup: +@@ -2964,11 +3024,28 @@ retry_lookup: goto finish_open_created; } @@ -62071,7 +64998,7 @@ index 985c6f3..5f520b67 100644 /* * If atomic_open() acquired write access it is dropped now due to -@@ -3008,6 +3086,11 @@ finish_lookup: +@@ -3009,6 +3086,11 @@ finish_lookup: } } BUG_ON(inode != path->dentry->d_inode); @@ -62083,7 +65010,7 @@ index 985c6f3..5f520b67 100644 return 1; } -@@ -3017,7 +3100,6 @@ finish_lookup: +@@ -3018,7 +3100,6 @@ finish_lookup: save_parent.dentry = nd->path.dentry; save_parent.mnt = mntget(path->mnt); nd->path.dentry = path->dentry; @@ -62091,7 +65018,7 @@ index 985c6f3..5f520b67 100644 } nd->inode = inode; /* Why this, you ask? _Now_ we might have grown LOOKUP_JUMPED... */ -@@ -3027,7 +3109,18 @@ finish_open: +@@ -3028,7 +3109,18 @@ finish_open: path_put(&save_parent); return error; } @@ -62110,7 +65037,7 @@ index 985c6f3..5f520b67 100644 error = -EISDIR; if ((open_flag & O_CREAT) && d_is_dir(nd->path.dentry)) goto out; -@@ -3190,7 +3283,7 @@ static struct file *path_openat(int dfd, struct filename *pathname, +@@ -3191,7 +3283,7 @@ static struct file *path_openat(int dfd, struct filename *pathname, if (unlikely(error)) goto out; @@ -62119,7 +65046,7 @@ index 985c6f3..5f520b67 100644 while (unlikely(error > 0)) { /* trailing symlink */ struct path link = path; void *cookie; -@@ -3208,7 +3301,7 @@ static struct file *path_openat(int dfd, struct filename *pathname, +@@ -3209,7 +3301,7 @@ static struct file *path_openat(int dfd, struct filename *pathname, error = follow_link(&link, nd, &cookie); if (unlikely(error)) break; @@ -62128,7 +65055,7 @@ index 985c6f3..5f520b67 100644 put_link(nd, &link, cookie); } out: -@@ -3308,9 +3401,11 @@ struct dentry *kern_path_create(int dfd, const char *pathname, +@@ -3309,9 +3401,11 @@ struct dentry *kern_path_create(int dfd, const char *pathname, goto unlock; error = -EEXIST; @@ -62142,7 +65069,7 @@ index 985c6f3..5f520b67 100644 /* * Special case - lookup gave negative, but... we had foo/bar/ * From the vfs_mknod() POV we just have a negative dentry - -@@ -3362,6 +3457,20 @@ struct dentry *user_path_create(int dfd, const char __user *pathname, +@@ -3363,6 +3457,20 @@ struct dentry *user_path_create(int dfd, const char __user *pathname, } EXPORT_SYMBOL(user_path_create); @@ -62163,7 +65090,7 @@ index 985c6f3..5f520b67 100644 int vfs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, dev_t dev) { int error = may_create(dir, dentry); -@@ -3425,6 +3534,17 @@ retry: +@@ -3426,6 +3534,17 @@ retry: if (!IS_POSIXACL(path.dentry->d_inode)) mode &= ~current_umask(); @@ -62181,7 +65108,7 @@ index 985c6f3..5f520b67 100644 error = security_path_mknod(&path, dentry, mode, dev); if (error) goto out; -@@ -3441,6 +3561,8 @@ retry: +@@ -3442,6 +3561,8 @@ retry: break; } out: @@ -62190,7 +65117,7 @@ index 985c6f3..5f520b67 100644 done_path_create(&path, dentry); if (retry_estale(error, lookup_flags)) { lookup_flags |= LOOKUP_REVAL; -@@ -3494,9 +3616,16 @@ retry: +@@ -3495,9 +3616,16 @@ retry: if (!IS_POSIXACL(path.dentry->d_inode)) mode &= ~current_umask(); @@ -62207,7 +65134,7 @@ index 985c6f3..5f520b67 100644 done_path_create(&path, dentry); if (retry_estale(error, lookup_flags)) { lookup_flags |= LOOKUP_REVAL; -@@ -3579,6 +3708,8 @@ static long do_rmdir(int dfd, const char __user *pathname) +@@ -3580,6 +3708,8 @@ static long do_rmdir(int dfd, const char __user *pathname) struct filename *name; struct dentry *dentry; struct nameidata nd; @@ -62216,7 +65143,7 @@ index 985c6f3..5f520b67 100644 unsigned int lookup_flags = 0; retry: name = user_path_parent(dfd, pathname, &nd, lookup_flags); -@@ -3611,10 +3742,21 @@ retry: +@@ -3612,10 +3742,21 @@ retry: error = -ENOENT; goto exit3; } @@ -62238,7 +65165,7 @@ index 985c6f3..5f520b67 100644 exit3: dput(dentry); exit2: -@@ -3705,6 +3847,8 @@ static long do_unlinkat(int dfd, const char __user *pathname) +@@ -3706,6 +3847,8 @@ static long do_unlinkat(int dfd, const char __user *pathname) struct nameidata nd; struct inode *inode = NULL; struct inode *delegated_inode = NULL; @@ -62247,7 +65174,7 @@ index 985c6f3..5f520b67 100644 unsigned int lookup_flags = 0; retry: name = user_path_parent(dfd, pathname, &nd, lookup_flags); -@@ -3731,10 +3875,22 @@ retry_deleg: +@@ -3732,10 +3875,22 @@ retry_deleg: if (d_is_negative(dentry)) goto slashes; ihold(inode); @@ -62270,7 +65197,7 @@ index 985c6f3..5f520b67 100644 exit2: dput(dentry); } -@@ -3823,9 +3979,17 @@ retry: +@@ -3824,9 +3979,17 @@ retry: if (IS_ERR(dentry)) goto out_putname; @@ -62288,7 +65215,7 @@ index 985c6f3..5f520b67 100644 done_path_create(&path, dentry); if (retry_estale(error, lookup_flags)) { lookup_flags |= LOOKUP_REVAL; -@@ -3929,6 +4093,7 @@ SYSCALL_DEFINE5(linkat, int, olddfd, const char __user *, oldname, +@@ -3930,6 +4093,7 @@ SYSCALL_DEFINE5(linkat, int, olddfd, const char __user *, oldname, struct dentry *new_dentry; struct path old_path, new_path; struct inode *delegated_inode = NULL; @@ -62296,7 +65223,7 @@ index 985c6f3..5f520b67 100644 int how = 0; int error; -@@ -3952,7 +4117,7 @@ retry: +@@ -3953,7 +4117,7 @@ retry: if (error) return error; @@ -62305,7 +65232,7 @@ index 985c6f3..5f520b67 100644 (how & LOOKUP_REVAL)); error = PTR_ERR(new_dentry); if (IS_ERR(new_dentry)) -@@ -3964,11 +4129,28 @@ retry: +@@ -3965,11 +4129,28 @@ retry: error = may_linkat(&old_path); if (unlikely(error)) goto out_dput; @@ -62334,7 +65261,7 @@ index 985c6f3..5f520b67 100644 done_path_create(&new_path, new_dentry); if (delegated_inode) { error = break_deleg_wait(&delegated_inode); -@@ -4278,6 +4460,12 @@ retry_deleg: +@@ -4279,6 +4460,12 @@ retry_deleg: if (new_dentry == trap) goto exit5; @@ -62347,7 +65274,7 @@ index 985c6f3..5f520b67 100644 error = security_path_rename(&oldnd.path, old_dentry, &newnd.path, new_dentry, flags); if (error) -@@ -4285,6 +4473,9 @@ retry_deleg: +@@ -4286,6 +4473,9 @@ retry_deleg: error = vfs_rename(old_dir->d_inode, old_dentry, new_dir->d_inode, new_dentry, &delegated_inode, flags); @@ -62357,7 +65284,7 @@ index 985c6f3..5f520b67 100644 exit5: dput(new_dentry); exit4: -@@ -4327,14 +4518,24 @@ SYSCALL_DEFINE2(rename, const char __user *, oldname, const char __user *, newna +@@ -4328,14 +4518,24 @@ SYSCALL_DEFINE2(rename, const char __user *, oldname, const char __user *, newna int readlink_copy(char __user *buffer, int buflen, const char *link) { @@ -62525,10 +65452,10 @@ index f4ccfe6..a5cf064 100644 static struct callback_op callback_ops[]; diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c -index c79f3e7..d61d671 100644 +index 9927913..faffc5c 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c -@@ -1209,16 +1209,16 @@ static int nfs_size_need_update(const struct inode *inode, const struct nfs_fatt +@@ -1219,16 +1219,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); } @@ -62549,10 +65476,10 @@ index c79f3e7..d61d671 100644 void nfs_fattr_init(struct nfs_fattr *fattr) diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c -index 95e3720..46c23fa 100644 +index 8f029db..3688b84 100644 --- a/fs/nfsd/nfs4proc.c +++ b/fs/nfsd/nfs4proc.c -@@ -1169,7 +1169,7 @@ struct nfsd4_operation { +@@ -1157,7 +1157,7 @@ struct nfsd4_operation { nfsd4op_rsize op_rsize_bop; stateid_getter op_get_currentstateid; stateid_setter op_set_currentstateid; @@ -62562,10 +65489,10 @@ index 95e3720..46c23fa 100644 static struct nfsd4_operation nfsd4_ops[]; diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c -index 3297158..7bb8436 100644 +index 944275c..6fc40a7 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c -@@ -1541,7 +1541,7 @@ nfsd4_decode_notsupp(struct nfsd4_compoundargs *argp, void *p) +@@ -1539,7 +1539,7 @@ nfsd4_decode_notsupp(struct nfsd4_compoundargs *argp, void *p) typedef __be32(*nfsd4_dec)(struct nfsd4_compoundargs *argp, void *); @@ -62575,10 +65502,10 @@ index 3297158..7bb8436 100644 [OP_CLOSE] = (nfsd4_dec)nfsd4_decode_close, [OP_COMMIT] = (nfsd4_dec)nfsd4_decode_commit, diff --git a/fs/nfsd/nfscache.c b/fs/nfsd/nfscache.c -index f8f060f..c4ba09a 100644 +index 6040da8..4348565 100644 --- a/fs/nfsd/nfscache.c +++ b/fs/nfsd/nfscache.c -@@ -519,14 +519,17 @@ nfsd_cache_update(struct svc_rqst *rqstp, int cachetype, __be32 *statp) +@@ -518,17 +518,20 @@ 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; @@ -62598,21 +65525,34 @@ index f8f060f..c4ba09a 100644 + } /* Don't cache excessive amounts of data and XDR failures */ - if (!statp || len > (256 >> 2)) { +- if (!statp || len > (256 >> 2)) { ++ if (!statp || len > (256 >> 2) || len < 0) { + nfsd_reply_cache_free(rp); + return; + } +@@ -536,7 +539,7 @@ nfsd_cache_update(struct svc_rqst *rqstp, int cachetype, __be32 *statp) + switch (cachetype) { + case RC_REPLSTAT: + if (len != 1) +- printk("nfsd: RC_REPLSTAT/reply len %d!\n",len); ++ printk("nfsd: RC_REPLSTAT/reply len %ld!\n",len); + rp->c_replstat = *statp; + break; + case RC_REPLBUFF: diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c -index 16f0673..1c2c30ab 100644 +index 140c496..e9cbf14 100644 --- a/fs/nfsd/vfs.c +++ b/fs/nfsd/vfs.c -@@ -843,7 +843,7 @@ nfsd_vfs_read(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file *file, - } else { - oldfs = get_fs(); - set_fs(KERNEL_DS); -- host_err = vfs_readv(file, (struct iovec __user *)vec, vlen, &offset); -+ host_err = vfs_readv(file, (struct iovec __force_user *)vec, vlen, &offset); - set_fs(oldfs); - } +@@ -855,7 +855,7 @@ int nfsd_readv(struct file *file, loff_t offset, struct kvec *vec, int vlen, -@@ -934,7 +934,7 @@ nfsd_vfs_write(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file *file, + oldfs = get_fs(); + set_fs(KERNEL_DS); +- host_err = vfs_readv(file, (struct iovec __user *)vec, vlen, &offset); ++ host_err = vfs_readv(file, (struct iovec __force_user *)vec, vlen, &offset); + set_fs(oldfs); + return nfsd_finish_read(file, count, host_err); + } +@@ -943,7 +943,7 @@ nfsd_vfs_write(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file *file, /* Write the data. */ oldfs = get_fs(); set_fs(KERNEL_DS); @@ -62621,7 +65561,7 @@ index 16f0673..1c2c30ab 100644 set_fs(oldfs); if (host_err < 0) goto out_nfserr; -@@ -1479,7 +1479,7 @@ nfsd_readlink(struct svc_rqst *rqstp, struct svc_fh *fhp, char *buf, int *lenp) +@@ -1482,7 +1482,7 @@ nfsd_readlink(struct svc_rqst *rqstp, struct svc_fh *fhp, char *buf, int *lenp) */ oldfs = get_fs(); set_fs(KERNEL_DS); @@ -62631,7 +65571,7 @@ index 16f0673..1c2c30ab 100644 if (host_err < 0) diff --git a/fs/nls/nls_base.c b/fs/nls/nls_base.c -index 52ccd34..43a53b1 100644 +index 52ccd34..7a6b202 100644 --- a/fs/nls/nls_base.c +++ b/fs/nls/nls_base.c @@ -234,21 +234,25 @@ EXPORT_SYMBOL(utf16s_to_utf8s); @@ -62683,6 +65623,24 @@ index 52ccd34..43a53b1 100644 spin_unlock(&nls_lock); return 0; } +@@ -272,7 +278,7 @@ int unregister_nls(struct nls_table * nls) + return -EINVAL; + } + +-static struct nls_table *find_nls(char *charset) ++static struct nls_table *find_nls(const char *charset) + { + struct nls_table *nls; + spin_lock(&nls_lock); +@@ -288,7 +294,7 @@ static struct nls_table *find_nls(char *charset) + return nls; + } + +-struct nls_table *load_nls(char *charset) ++struct nls_table *load_nls(const char *charset) + { + return try_then_request_module(find_nls(charset), "nls_%s", charset); + } diff --git a/fs/nls/nls_euc-jp.c b/fs/nls/nls_euc-jp.c index 162b3f1..6076a7c 100644 --- a/fs/nls/nls_euc-jp.c @@ -62718,10 +65676,10 @@ index a80a741..7b96e1b 100644 } diff --git a/fs/notify/fanotify/fanotify_user.c b/fs/notify/fanotify/fanotify_user.c -index 732648b..d3b017f 100644 +index 3fdc8a3..5888623 100644 --- a/fs/notify/fanotify/fanotify_user.c +++ b/fs/notify/fanotify/fanotify_user.c -@@ -203,8 +203,8 @@ static ssize_t copy_event_to_user(struct fsnotify_group *group, +@@ -216,8 +216,8 @@ static ssize_t copy_event_to_user(struct fsnotify_group *group, fd = fanotify_event_metadata.fd; ret = -EFAULT; @@ -62768,7 +65726,7 @@ index 9e38daf..5727cae 100644 "inode 0x%lx or driver bug.", vdir->i_ino); goto err_out; diff --git a/fs/ntfs/file.c b/fs/ntfs/file.c -index db9bd8a..8338fb6 100644 +index 5c9e2c8..96e4ba0 100644 --- a/fs/ntfs/file.c +++ b/fs/ntfs/file.c @@ -1282,7 +1282,7 @@ static inline size_t ntfs_copy_from_user(struct page **pages, @@ -62781,7 +65739,7 @@ index db9bd8a..8338fb6 100644 do { len = PAGE_CACHE_SIZE - ofs; diff --git a/fs/ntfs/super.c b/fs/ntfs/super.c -index 9de2491..3306095 100644 +index 6c3296e..c0b99f0 100644 --- a/fs/ntfs/super.c +++ b/fs/ntfs/super.c @@ -688,7 +688,7 @@ static struct buffer_head *read_ntfs_boot_sector(struct super_block *sb, @@ -62825,7 +65783,7 @@ index 0440134..d52c93a 100644 bail: if (handle) diff --git a/fs/ocfs2/ocfs2.h b/fs/ocfs2/ocfs2.h -index 8d64a97..c37665d 100644 +index bbec539..7b266d5 100644 --- a/fs/ocfs2/ocfs2.h +++ b/fs/ocfs2/ocfs2.h @@ -236,11 +236,11 @@ enum ocfs2_vol_state @@ -62904,7 +65862,7 @@ index 0cb889a..6a26b24 100644 } } diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c -index a7cdd56..c583144 100644 +index ddb662b..f701c83 100644 --- a/fs/ocfs2/super.c +++ b/fs/ocfs2/super.c @@ -300,11 +300,11 @@ static int ocfs2_osb_dump(struct ocfs2_super *osb, char *buf, int len) @@ -62924,7 +65882,7 @@ index a7cdd56..c583144 100644 out += snprintf(buf + out, len - out, "%10s => State: %u Descriptor: %llu Size: %u bits " -@@ -2104,11 +2104,11 @@ static int ocfs2_initialize_super(struct super_block *sb, +@@ -2100,11 +2100,11 @@ static int ocfs2_initialize_super(struct super_block *sb, mutex_init(&osb->system_file_mutex); @@ -62942,7 +65900,7 @@ index a7cdd56..c583144 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 9d64679..75f925c 100644 +index d6fd3ac..6ccf474 100644 --- a/fs/open.c +++ b/fs/open.c @@ -32,6 +32,8 @@ @@ -62972,7 +65930,7 @@ index 9d64679..75f925c 100644 if (!error) error = do_truncate(dentry, length, ATTR_MTIME|ATTR_CTIME, f.file); sb_end_write(inode->i_sb); -@@ -381,6 +387,9 @@ retry: +@@ -380,6 +386,9 @@ retry: if (__mnt_is_readonly(path.mnt)) res = -EROFS; @@ -62982,7 +65940,7 @@ index 9d64679..75f925c 100644 out_path_release: path_put(&path); if (retry_estale(res, lookup_flags)) { -@@ -412,6 +421,8 @@ retry: +@@ -411,6 +420,8 @@ retry: if (error) goto dput_and_out; @@ -62991,7 +65949,7 @@ index 9d64679..75f925c 100644 set_fs_pwd(current->fs, &path); dput_and_out: -@@ -441,6 +452,13 @@ SYSCALL_DEFINE1(fchdir, unsigned int, fd) +@@ -440,6 +451,13 @@ SYSCALL_DEFINE1(fchdir, unsigned int, fd) goto out_putf; error = inode_permission(inode, MAY_EXEC | MAY_CHDIR); @@ -63005,7 +65963,7 @@ index 9d64679..75f925c 100644 if (!error) set_fs_pwd(current->fs, &f.file->f_path); out_putf: -@@ -470,7 +488,13 @@ retry: +@@ -469,7 +487,13 @@ retry: if (error) goto dput_and_out; @@ -63019,7 +65977,7 @@ index 9d64679..75f925c 100644 error = 0; dput_and_out: path_put(&path); -@@ -494,6 +518,16 @@ static int chmod_common(struct path *path, umode_t mode) +@@ -493,6 +517,16 @@ static int chmod_common(struct path *path, umode_t mode) return error; retry_deleg: mutex_lock(&inode->i_mutex); @@ -63036,7 +65994,7 @@ index 9d64679..75f925c 100644 error = security_path_chmod(path, mode); if (error) goto out_unlock; -@@ -559,6 +593,9 @@ static int chown_common(struct path *path, uid_t user, gid_t group) +@@ -558,6 +592,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); @@ -63046,7 +66004,7 @@ index 9d64679..75f925c 100644 newattrs.ia_valid = ATTR_CTIME; if (user != (uid_t) -1) { if (!uid_valid(uid)) -@@ -978,6 +1015,7 @@ long do_sys_open(int dfd, const char __user *filename, int flags, umode_t mode) +@@ -983,6 +1020,7 @@ long do_sys_open(int dfd, const char __user *filename, int flags, umode_t mode) } else { fsnotify_open(f); fd_install(fd, f); @@ -63055,7 +66013,7 @@ index 9d64679..75f925c 100644 } putname(tmp); diff --git a/fs/pipe.c b/fs/pipe.c -index 034bffa..6c6b522 100644 +index 21981e5..3d5f55c 100644 --- a/fs/pipe.c +++ b/fs/pipe.c @@ -56,7 +56,7 @@ unsigned int pipe_min_size = PAGE_SIZE; @@ -63076,7 +66034,7 @@ index 034bffa..6c6b522 100644 mutex_unlock(&pipe->mutex); } EXPORT_SYMBOL(pipe_unlock); -@@ -342,9 +342,9 @@ pipe_read(struct kiocb *iocb, const struct iovec *_iov, +@@ -292,9 +292,9 @@ pipe_read(struct kiocb *iocb, struct iov_iter *to) } if (bufs) /* More to do? */ continue; @@ -63088,8 +66046,8 @@ index 034bffa..6c6b522 100644 /* syscall merging: Usually we must not sleep * if O_NONBLOCK is set, or if we got some data. * But if a writer sleeps in kernel space, then -@@ -406,7 +406,7 @@ pipe_write(struct kiocb *iocb, const struct iovec *_iov, - ret = 0; +@@ -351,7 +351,7 @@ pipe_write(struct kiocb *iocb, struct iov_iter *from) + __pipe_lock(pipe); - if (!pipe->readers) { @@ -63097,7 +66055,7 @@ index 034bffa..6c6b522 100644 send_sig(SIGPIPE, current, 0); ret = -EPIPE; goto out; -@@ -461,7 +461,7 @@ redo1: +@@ -387,7 +387,7 @@ pipe_write(struct kiocb *iocb, struct iov_iter *from) for (;;) { int bufs; @@ -63106,7 +66064,7 @@ index 034bffa..6c6b522 100644 send_sig(SIGPIPE, current, 0); if (!ret) ret = -EPIPE; -@@ -552,9 +552,9 @@ redo2: +@@ -455,9 +455,9 @@ pipe_write(struct kiocb *iocb, struct iov_iter *from) kill_fasync(&pipe->fasync_readers, SIGIO, POLL_IN); do_wakeup = 0; } @@ -63118,7 +66076,7 @@ index 034bffa..6c6b522 100644 } out: __pipe_unlock(pipe); -@@ -609,7 +609,7 @@ pipe_poll(struct file *filp, poll_table *wait) +@@ -512,7 +512,7 @@ pipe_poll(struct file *filp, poll_table *wait) mask = 0; if (filp->f_mode & FMODE_READ) { mask = (nrbufs > 0) ? POLLIN | POLLRDNORM : 0; @@ -63127,7 +66085,7 @@ index 034bffa..6c6b522 100644 mask |= POLLHUP; } -@@ -619,7 +619,7 @@ pipe_poll(struct file *filp, poll_table *wait) +@@ -522,7 +522,7 @@ pipe_poll(struct file *filp, poll_table *wait) * Most Unices do not set POLLERR for FIFOs but on Linux they * behave exactly like pipes for poll(). */ @@ -63136,7 +66094,7 @@ index 034bffa..6c6b522 100644 mask |= POLLERR; } -@@ -631,7 +631,7 @@ static void put_pipe_info(struct inode *inode, struct pipe_inode_info *pipe) +@@ -534,7 +534,7 @@ static void put_pipe_info(struct inode *inode, struct pipe_inode_info *pipe) int kill = 0; spin_lock(&inode->i_lock); @@ -63145,7 +66103,7 @@ index 034bffa..6c6b522 100644 inode->i_pipe = NULL; kill = 1; } -@@ -648,11 +648,11 @@ pipe_release(struct inode *inode, struct file *file) +@@ -551,11 +551,11 @@ pipe_release(struct inode *inode, struct file *file) __pipe_lock(pipe); if (file->f_mode & FMODE_READ) @@ -63160,7 +66118,7 @@ index 034bffa..6c6b522 100644 wake_up_interruptible_sync_poll(&pipe->wait, POLLIN | POLLOUT | POLLRDNORM | POLLWRNORM | POLLERR | POLLHUP); kill_fasync(&pipe->fasync_readers, SIGIO, POLL_IN); kill_fasync(&pipe->fasync_writers, SIGIO, POLL_OUT); -@@ -717,7 +717,7 @@ void free_pipe_info(struct pipe_inode_info *pipe) +@@ -620,7 +620,7 @@ void free_pipe_info(struct pipe_inode_info *pipe) kfree(pipe); } @@ -63169,7 +66127,7 @@ index 034bffa..6c6b522 100644 /* * pipefs_dname() is called from d_path(). -@@ -747,8 +747,9 @@ static struct inode * get_pipe_inode(void) +@@ -650,8 +650,9 @@ static struct inode * get_pipe_inode(void) goto fail_iput; inode->i_pipe = pipe; @@ -63181,7 +66139,7 @@ index 034bffa..6c6b522 100644 inode->i_fop = &pipefifo_fops; /* -@@ -927,17 +928,17 @@ static int fifo_open(struct inode *inode, struct file *filp) +@@ -830,17 +831,17 @@ static int fifo_open(struct inode *inode, struct file *filp) spin_lock(&inode->i_lock); if (inode->i_pipe) { pipe = inode->i_pipe; @@ -63202,7 +66160,7 @@ index 034bffa..6c6b522 100644 spin_unlock(&inode->i_lock); free_pipe_info(pipe); pipe = inode->i_pipe; -@@ -962,10 +963,10 @@ static int fifo_open(struct inode *inode, struct file *filp) +@@ -865,10 +866,10 @@ static int fifo_open(struct inode *inode, struct file *filp) * opened, even when there is no process writing the FIFO. */ pipe->r_counter++; @@ -63215,7 +66173,7 @@ index 034bffa..6c6b522 100644 if ((filp->f_flags & O_NONBLOCK)) { /* suppress POLLHUP until we have * seen a writer */ -@@ -984,14 +985,14 @@ static int fifo_open(struct inode *inode, struct file *filp) +@@ -887,14 +888,14 @@ static int fifo_open(struct inode *inode, struct file *filp) * errno=ENXIO when there is no process reading the FIFO. */ ret = -ENXIO; @@ -63233,7 +66191,7 @@ index 034bffa..6c6b522 100644 if (wait_for_partner(pipe, &pipe->r_counter)) goto err_wr; } -@@ -1005,11 +1006,11 @@ static int fifo_open(struct inode *inode, struct file *filp) +@@ -908,11 +909,11 @@ static int fifo_open(struct inode *inode, struct file *filp) * the process can at least talk to itself. */ @@ -63248,7 +66206,7 @@ index 034bffa..6c6b522 100644 wake_up_partner(pipe); break; -@@ -1023,13 +1024,13 @@ static int fifo_open(struct inode *inode, struct file *filp) +@@ -926,13 +927,13 @@ static int fifo_open(struct inode *inode, struct file *filp) return 0; err_rd: @@ -64617,7 +67575,7 @@ index 5dbadec..473af2f 100644 } diff --git a/fs/proc/stat.c b/fs/proc/stat.c -index 9d231e9..2e1b51a 100644 +index bf2d03f..f058f9c 100644 --- a/fs/proc/stat.c +++ b/fs/proc/stat.c @@ -11,6 +11,7 @@ @@ -64734,7 +67692,7 @@ index 9d231e9..2e1b51a 100644 seq_printf(p, "softirq %llu", (unsigned long long)sum_softirq); diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c -index c4b2646..84f0d7b 100644 +index cfa63ee..fce112e 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c @@ -13,12 +13,19 @@ @@ -64834,7 +67792,7 @@ index c4b2646..84f0d7b 100644 goto done; } -@@ -322,8 +350,9 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma, int is_pid) +@@ -328,8 +356,9 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma, int is_pid) * Thread stack in /proc/PID/task/TID/maps or * the main process stack. */ @@ -64846,7 +67804,7 @@ index c4b2646..84f0d7b 100644 name = "[stack]"; } else { /* Thread stack in /proc/PID/maps */ -@@ -347,6 +376,13 @@ static int show_map(struct seq_file *m, void *v, int is_pid) +@@ -353,6 +382,13 @@ static int show_map(struct seq_file *m, void *v, int is_pid) struct proc_maps_private *priv = m->private; struct task_struct *task = priv->task; @@ -64860,7 +67818,7 @@ index c4b2646..84f0d7b 100644 show_map_vma(m, vma, is_pid); if (m->count < m->size) /* vma is copied successfully */ -@@ -587,12 +623,23 @@ static int show_smap(struct seq_file *m, void *v, int is_pid) +@@ -593,12 +629,23 @@ static int show_smap(struct seq_file *m, void *v, int is_pid) .private = &mss, }; @@ -64889,7 +67847,7 @@ index c4b2646..84f0d7b 100644 show_map_vma(m, vma, is_pid); seq_printf(m, -@@ -610,7 +657,11 @@ static int show_smap(struct seq_file *m, void *v, int is_pid) +@@ -616,7 +663,11 @@ static int show_smap(struct seq_file *m, void *v, int is_pid) "KernelPageSize: %8lu kB\n" "MMUPageSize: %8lu kB\n" "Locked: %8lu kB\n", @@ -64901,7 +67859,7 @@ index c4b2646..84f0d7b 100644 mss.resident >> 10, (unsigned long)(mss.pss >> (10 + PSS_SHIFT)), mss.shared_clean >> 10, -@@ -1388,6 +1439,13 @@ static int show_numa_map(struct seq_file *m, void *v, int is_pid) +@@ -1398,6 +1449,13 @@ static int show_numa_map(struct seq_file *m, void *v, int is_pid) char buffer[64]; int nid; @@ -64915,7 +67873,7 @@ index c4b2646..84f0d7b 100644 if (!mm) return 0; -@@ -1405,11 +1463,15 @@ static int show_numa_map(struct seq_file *m, void *v, int is_pid) +@@ -1415,11 +1473,15 @@ static int show_numa_map(struct seq_file *m, void *v, int is_pid) mpol_to_str(buffer, sizeof(buffer), pol); mpol_cond_put(pol); @@ -64926,11 +67884,11 @@ index c4b2646..84f0d7b 100644 +#endif if (file) { - seq_printf(m, " file="); + seq_puts(m, " file="); - seq_path(m, &file->f_path, "\n\t= "); + seq_path(m, &file->f_path, "\n\t\\= "); } else if (vma->vm_start <= mm->brk && vma->vm_end >= mm->start_brk) { - seq_printf(m, " heap"); + seq_puts(m, " heap"); } else { diff --git a/fs/proc/task_nommu.c b/fs/proc/task_nommu.c index 678455d..ebd3245 100644 @@ -64955,7 +67913,7 @@ index 678455d..ebd3245 100644 pid_t tid = vm_is_stack(priv->task, vma, is_pid); diff --git a/fs/proc/vmcore.c b/fs/proc/vmcore.c -index 6a8e785..41f2a6c 100644 +index 382aa89..6b03974 100644 --- a/fs/proc/vmcore.c +++ b/fs/proc/vmcore.c @@ -105,9 +105,13 @@ static ssize_t read_from_oldmem(char *buf, size_t count, @@ -65047,10 +68005,10 @@ index 72d2917..c917c12 100644 if (!msg_head) { printk(KERN_ERR diff --git a/fs/read_write.c b/fs/read_write.c -index 31c6efa..a068805 100644 +index 009d854..16ce214 100644 --- a/fs/read_write.c +++ b/fs/read_write.c -@@ -450,7 +450,7 @@ ssize_t __kernel_write(struct file *file, const char *buf, size_t count, loff_t +@@ -495,7 +495,7 @@ ssize_t __kernel_write(struct file *file, const char *buf, size_t count, loff_t old_fs = get_fs(); set_fs(get_ds()); @@ -65060,10 +68018,10 @@ index 31c6efa..a068805 100644 count = MAX_RW_COUNT; if (file->f_op->write) diff --git a/fs/readdir.c b/fs/readdir.c -index 5b53d99..a6c3049 100644 +index 33fd922..e0d6094 100644 --- a/fs/readdir.c +++ b/fs/readdir.c -@@ -17,6 +17,7 @@ +@@ -18,6 +18,7 @@ #include #include #include @@ -65071,7 +68029,7 @@ index 5b53d99..a6c3049 100644 #include -@@ -69,6 +70,7 @@ struct old_linux_dirent { +@@ -71,6 +72,7 @@ struct old_linux_dirent { struct readdir_callback { struct dir_context ctx; struct old_linux_dirent __user * dirent; @@ -65079,7 +68037,7 @@ index 5b53d99..a6c3049 100644 int result; }; -@@ -86,6 +88,10 @@ static int fillonedir(void * __buf, const char * name, int namlen, loff_t offset +@@ -88,6 +90,10 @@ static int fillonedir(void * __buf, const char * name, int namlen, loff_t offset buf->result = -EOVERFLOW; return -EOVERFLOW; } @@ -65090,7 +68048,7 @@ index 5b53d99..a6c3049 100644 buf->result++; dirent = buf->dirent; if (!access_ok(VERIFY_WRITE, dirent, -@@ -117,6 +123,7 @@ SYSCALL_DEFINE3(old_readdir, unsigned int, fd, +@@ -119,6 +125,7 @@ SYSCALL_DEFINE3(old_readdir, unsigned int, fd, if (!f.file) return -EBADF; @@ -65098,7 +68056,7 @@ index 5b53d99..a6c3049 100644 error = iterate_dir(f.file, &buf.ctx); if (buf.result) error = buf.result; -@@ -142,6 +149,7 @@ struct getdents_callback { +@@ -144,6 +151,7 @@ struct getdents_callback { struct dir_context ctx; struct linux_dirent __user * current_dir; struct linux_dirent __user * previous; @@ -65106,7 +68064,7 @@ index 5b53d99..a6c3049 100644 int count; int error; }; -@@ -163,6 +171,10 @@ static int filldir(void * __buf, const char * name, int namlen, loff_t offset, +@@ -165,6 +173,10 @@ static int filldir(void * __buf, const char * name, int namlen, loff_t offset, buf->error = -EOVERFLOW; return -EOVERFLOW; } @@ -65117,7 +68075,7 @@ index 5b53d99..a6c3049 100644 dirent = buf->previous; if (dirent) { if (__put_user(offset, &dirent->d_off)) -@@ -208,6 +220,7 @@ SYSCALL_DEFINE3(getdents, unsigned int, fd, +@@ -210,6 +222,7 @@ SYSCALL_DEFINE3(getdents, unsigned int, fd, if (!f.file) return -EBADF; @@ -65125,7 +68083,7 @@ index 5b53d99..a6c3049 100644 error = iterate_dir(f.file, &buf.ctx); if (error >= 0) error = buf.error; -@@ -226,6 +239,7 @@ struct getdents_callback64 { +@@ -228,6 +241,7 @@ struct getdents_callback64 { struct dir_context ctx; struct linux_dirent64 __user * current_dir; struct linux_dirent64 __user * previous; @@ -65133,7 +68091,7 @@ index 5b53d99..a6c3049 100644 int count; int error; }; -@@ -241,6 +255,10 @@ static int filldir64(void * __buf, const char * name, int namlen, loff_t offset, +@@ -243,6 +257,10 @@ static int filldir64(void * __buf, const char * name, int namlen, loff_t offset, buf->error = -EINVAL; /* only used if we fail.. */ if (reclen > buf->count) return -EINVAL; @@ -65144,7 +68102,7 @@ index 5b53d99..a6c3049 100644 dirent = buf->previous; if (dirent) { if (__put_user(offset, &dirent->d_off)) -@@ -288,6 +306,7 @@ SYSCALL_DEFINE3(getdents64, unsigned int, fd, +@@ -290,6 +308,7 @@ SYSCALL_DEFINE3(getdents64, unsigned int, fd, if (!f.file) return -EBADF; @@ -65153,23 +68111,23 @@ index 5b53d99..a6c3049 100644 if (error >= 0) error = buf.error; diff --git a/fs/reiserfs/do_balan.c b/fs/reiserfs/do_balan.c -index 9a3c68c..767933e 100644 +index 54fdf19..987862b 100644 --- a/fs/reiserfs/do_balan.c +++ b/fs/reiserfs/do_balan.c -@@ -1546,7 +1546,7 @@ void do_balance(struct tree_balance *tb, /* tree_balance structure */ +@@ -1872,7 +1872,7 @@ void do_balance(struct tree_balance *tb, struct item_head *ih, return; } -- atomic_inc(&(fs_generation(tb->tb_sb))); -+ atomic_inc_unchecked(&(fs_generation(tb->tb_sb))); +- atomic_inc(&fs_generation(tb->tb_sb)); ++ atomic_inc_unchecked(&fs_generation(tb->tb_sb)); do_balance_starts(tb); - /* balance leaf returns 0 except if combining L R and S into + /* diff --git a/fs/reiserfs/item_ops.c b/fs/reiserfs/item_ops.c -index ee382ef..f4eb6eb5 100644 +index cfaee91..b9d0d60 100644 --- a/fs/reiserfs/item_ops.c +++ b/fs/reiserfs/item_ops.c -@@ -725,18 +725,18 @@ static void errcatch_print_vi(struct virtual_item *vi) +@@ -724,18 +724,18 @@ static void errcatch_print_vi(struct virtual_item *vi) } static struct item_operations errcatch_ops = { @@ -65198,7 +68156,7 @@ index ee382ef..f4eb6eb5 100644 + .print_vi = errcatch_print_vi }; - ////////////////////////////////////////////////////////////////////////////// + #if ! (TYPE_STAT_DATA == 0 && TYPE_INDIRECT == 1 && TYPE_DIRECT == 2 && TYPE_DIRENTRY == 3) diff --git a/fs/reiserfs/procfs.c b/fs/reiserfs/procfs.c index 02b0b7d..c85018b 100644 --- a/fs/reiserfs/procfs.c @@ -65213,20 +68171,20 @@ index 02b0b7d..c85018b 100644 SF(s_do_balance), SF(s_unneeded_left_neighbor), SF(s_good_search_by_key_reada), SF(s_bmaps), diff --git a/fs/reiserfs/reiserfs.h b/fs/reiserfs/reiserfs.h -index 83d4eac..04e39a7 100644 +index bf53888..227f5ae 100644 --- a/fs/reiserfs/reiserfs.h +++ b/fs/reiserfs/reiserfs.h -@@ -453,7 +453,7 @@ struct reiserfs_sb_info { +@@ -573,7 +573,7 @@ struct reiserfs_sb_info { /* Comment? -Hans */ wait_queue_head_t s_wait; - /* To be obsoleted soon by per buffer seals.. -Hans */ -- atomic_t s_generation_counter; // increased by one every time the -+ atomic_unchecked_t s_generation_counter; // increased by one every time the - // tree gets re-balanced - unsigned long s_properties; /* File system properties. Currently holds - on-disk FS format */ -@@ -1972,7 +1972,7 @@ static inline loff_t max_reiserfs_offset(struct inode *inode) - #define REISERFS_USER_MEM 1 /* reiserfs user memory mode */ + /* increased by one every time the tree gets re-balanced */ +- atomic_t s_generation_counter; ++ atomic_unchecked_t s_generation_counter; + + /* File system properties. Currently holds on-disk FS format */ + unsigned long s_properties; +@@ -2294,7 +2294,7 @@ static inline loff_t max_reiserfs_offset(struct inode *inode) + #define REISERFS_USER_MEM 1 /* user memory mode */ #define fs_generation(s) (REISERFS_SB(s)->s_generation_counter) -#define get_generation(s) atomic_read (&fs_generation(s)) @@ -65255,19 +68213,33 @@ index 467bb1c..cf9d65a 100644 return -EINVAL; diff --git a/fs/seq_file.c b/fs/seq_file.c -index 1d641bb..c2f4743 100644 +index 3857b72..0b7281e 100644 --- a/fs/seq_file.c +++ b/fs/seq_file.c -@@ -10,6 +10,8 @@ - #include +@@ -12,6 +12,8 @@ #include #include + #include +#include +#include #include #include -@@ -60,6 +62,9 @@ int seq_open(struct file *file, const struct seq_operations *op) +@@ -34,12 +36,7 @@ static void seq_set_overflow(struct seq_file *m) + + static void *seq_buf_alloc(unsigned long size) + { +- void *buf; +- +- buf = kmalloc(size, GFP_KERNEL | __GFP_NOWARN); +- if (!buf && size > PAGE_SIZE) +- buf = vmalloc(size); +- return buf; ++ return kmalloc(size, GFP_KERNEL | GFP_USERCOPY); + } + + /** +@@ -72,6 +69,9 @@ int seq_open(struct file *file, const struct seq_operations *op) #ifdef CONFIG_USER_NS p->user_ns = file->f_cred->user_ns; #endif @@ -65277,7 +68249,7 @@ index 1d641bb..c2f4743 100644 /* * Wrappers around seq_open(e.g. swaps_open) need to be -@@ -82,6 +87,16 @@ int seq_open(struct file *file, const struct seq_operations *op) +@@ -94,6 +94,16 @@ int seq_open(struct file *file, const struct seq_operations *op) } EXPORT_SYMBOL(seq_open); @@ -65294,25 +68266,7 @@ index 1d641bb..c2f4743 100644 static int traverse(struct seq_file *m, loff_t offset) { loff_t pos = 0, index; -@@ -96,7 +111,7 @@ static int traverse(struct seq_file *m, loff_t offset) - return 0; - } - if (!m->buf) { -- m->buf = kmalloc(m->size = PAGE_SIZE, GFP_KERNEL); -+ m->buf = kmalloc(m->size = PAGE_SIZE, GFP_KERNEL | GFP_USERCOPY); - if (!m->buf) - return -ENOMEM; - } -@@ -137,7 +152,7 @@ Eoverflow: - m->op->stop(m, p); - kfree(m->buf); - m->count = 0; -- m->buf = kmalloc(m->size <<= 1, GFP_KERNEL); -+ m->buf = kmalloc(m->size <<= 1, GFP_KERNEL | GFP_USERCOPY); - return !m->buf ? -ENOMEM : -EAGAIN; - } - -@@ -153,7 +168,7 @@ Eoverflow: +@@ -165,7 +175,7 @@ Eoverflow: ssize_t seq_read(struct file *file, char __user *buf, size_t size, loff_t *ppos) { struct seq_file *m = file->private_data; @@ -65321,25 +68275,7 @@ index 1d641bb..c2f4743 100644 loff_t pos; size_t n; void *p; -@@ -192,7 +207,7 @@ ssize_t seq_read(struct file *file, char __user *buf, size_t size, loff_t *ppos) - - /* grab buffer if we didn't have one */ - if (!m->buf) { -- m->buf = kmalloc(m->size = PAGE_SIZE, GFP_KERNEL); -+ m->buf = kmalloc(m->size = PAGE_SIZE, GFP_KERNEL | GFP_USERCOPY); - if (!m->buf) - goto Enomem; - } -@@ -234,7 +249,7 @@ ssize_t seq_read(struct file *file, char __user *buf, size_t size, loff_t *ppos) - m->op->stop(m, p); - kfree(m->buf); - m->count = 0; -- m->buf = kmalloc(m->size <<= 1, GFP_KERNEL); -+ m->buf = kmalloc(m->size <<= 1, GFP_KERNEL | GFP_USERCOPY); - if (!m->buf) - goto Enomem; - m->version = 0; -@@ -584,7 +599,7 @@ static void single_stop(struct seq_file *p, void *v) +@@ -596,7 +606,7 @@ static void single_stop(struct seq_file *p, void *v) int single_open(struct file *file, int (*show)(struct seq_file *, void *), void *data) { @@ -65348,7 +68284,7 @@ index 1d641bb..c2f4743 100644 int res = -ENOMEM; if (op) { -@@ -620,6 +635,17 @@ int single_open_size(struct file *file, int (*show)(struct seq_file *, void *), +@@ -632,6 +642,17 @@ int single_open_size(struct file *file, int (*show)(struct seq_file *, void *), } EXPORT_SYMBOL(single_open_size); @@ -65367,10 +68303,10 @@ index 1d641bb..c2f4743 100644 { const struct seq_operations *op = ((struct seq_file *)file->private_data)->op; diff --git a/fs/splice.c b/fs/splice.c -index e246954..bd4f5b5 100644 +index f5cb9ba..8ddb1e9 100644 --- a/fs/splice.c +++ b/fs/splice.c -@@ -192,7 +192,7 @@ ssize_t splice_to_pipe(struct pipe_inode_info *pipe, +@@ -193,7 +193,7 @@ ssize_t splice_to_pipe(struct pipe_inode_info *pipe, pipe_lock(pipe); for (;;) { @@ -65379,7 +68315,7 @@ index e246954..bd4f5b5 100644 send_sig(SIGPIPE, current, 0); if (!ret) ret = -EPIPE; -@@ -215,7 +215,7 @@ ssize_t splice_to_pipe(struct pipe_inode_info *pipe, +@@ -216,7 +216,7 @@ ssize_t splice_to_pipe(struct pipe_inode_info *pipe, page_nr++; ret += buf->len; @@ -65388,7 +68324,7 @@ index e246954..bd4f5b5 100644 do_wakeup = 1; if (!--spd->nr_pages) -@@ -246,9 +246,9 @@ ssize_t splice_to_pipe(struct pipe_inode_info *pipe, +@@ -247,9 +247,9 @@ ssize_t splice_to_pipe(struct pipe_inode_info *pipe, do_wakeup = 0; } @@ -65400,7 +68336,7 @@ index e246954..bd4f5b5 100644 } pipe_unlock(pipe); -@@ -575,7 +575,7 @@ static ssize_t kernel_readv(struct file *file, const struct iovec *vec, +@@ -576,7 +576,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() */ @@ -65409,7 +68345,7 @@ index e246954..bd4f5b5 100644 set_fs(old_fs); return res; -@@ -590,7 +590,7 @@ ssize_t kernel_write(struct file *file, const char *buf, size_t count, +@@ -591,7 +591,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() */ @@ -65418,7 +68354,7 @@ index e246954..bd4f5b5 100644 set_fs(old_fs); return res; -@@ -643,7 +643,7 @@ ssize_t default_file_splice_read(struct file *in, loff_t *ppos, +@@ -644,7 +644,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); @@ -65427,7 +68363,7 @@ index e246954..bd4f5b5 100644 vec[i].iov_len = this_len; spd.pages[i] = page; spd.nr_pages++; -@@ -839,7 +839,7 @@ int splice_from_pipe_feed(struct pipe_inode_info *pipe, struct splice_desc *sd, +@@ -783,7 +783,7 @@ static int splice_from_pipe_feed(struct pipe_inode_info *pipe, struct splice_des ops->release(pipe, buf); pipe->curbuf = (pipe->curbuf + 1) & (pipe->buffers - 1); pipe->nrbufs--; @@ -65436,8 +68372,8 @@ index e246954..bd4f5b5 100644 sd->need_wakeup = true; } -@@ -864,10 +864,10 @@ EXPORT_SYMBOL(splice_from_pipe_feed); - int splice_from_pipe_next(struct pipe_inode_info *pipe, struct splice_desc *sd) +@@ -807,10 +807,10 @@ static int splice_from_pipe_feed(struct pipe_inode_info *pipe, struct splice_des + static int splice_from_pipe_next(struct pipe_inode_info *pipe, struct splice_desc *sd) { while (!pipe->nrbufs) { - if (!pipe->writers) @@ -65449,7 +68385,16 @@ index e246954..bd4f5b5 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, +@@ -1040,7 +1040,7 @@ iter_file_splice_write(struct pipe_inode_info *pipe, struct file *out, + ops->release(pipe, buf); + pipe->curbuf = (pipe->curbuf + 1) & (pipe->buffers - 1); + pipe->nrbufs--; +- if (pipe->files) ++ if (atomic_read(&pipe->files)) + sd.need_wakeup = true; + } else { + buf->offset += ret; +@@ -1200,7 +1200,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. */ @@ -65458,7 +68403,7 @@ index e246954..bd4f5b5 100644 current->splice_pipe = pipe; } -@@ -1485,6 +1485,7 @@ static int get_iovec_page_array(const struct iovec __user *iov, +@@ -1496,6 +1496,7 @@ static int get_iovec_page_array(const struct iovec __user *iov, partial[buffers].offset = off; partial[buffers].len = plen; @@ -65466,7 +68411,7 @@ index e246954..bd4f5b5 100644 off = 0; len -= plen; -@@ -1721,9 +1722,9 @@ static int ipipe_prep(struct pipe_inode_info *pipe, unsigned int flags) +@@ -1732,9 +1733,9 @@ static int ipipe_prep(struct pipe_inode_info *pipe, unsigned int flags) ret = -ERESTARTSYS; break; } @@ -65478,7 +68423,7 @@ index e246954..bd4f5b5 100644 if (flags & SPLICE_F_NONBLOCK) { ret = -EAGAIN; break; -@@ -1755,7 +1756,7 @@ static int opipe_prep(struct pipe_inode_info *pipe, unsigned int flags) +@@ -1766,7 +1767,7 @@ static int opipe_prep(struct pipe_inode_info *pipe, unsigned int flags) pipe_lock(pipe); while (pipe->nrbufs >= pipe->buffers) { @@ -65487,7 +68432,7 @@ index e246954..bd4f5b5 100644 send_sig(SIGPIPE, current, 0); ret = -EPIPE; break; -@@ -1768,9 +1769,9 @@ static int opipe_prep(struct pipe_inode_info *pipe, unsigned int flags) +@@ -1779,9 +1780,9 @@ static int opipe_prep(struct pipe_inode_info *pipe, unsigned int flags) ret = -ERESTARTSYS; break; } @@ -65499,7 +68444,7 @@ index e246954..bd4f5b5 100644 } pipe_unlock(pipe); -@@ -1806,14 +1807,14 @@ retry: +@@ -1817,14 +1818,14 @@ retry: pipe_double_lock(ipipe, opipe); do { @@ -65516,7 +68461,7 @@ index e246954..bd4f5b5 100644 break; /* -@@ -1910,7 +1911,7 @@ static int link_pipe(struct pipe_inode_info *ipipe, +@@ -1921,7 +1922,7 @@ static int link_pipe(struct pipe_inode_info *ipipe, pipe_double_lock(ipipe, opipe); do { @@ -65525,7 +68470,7 @@ index e246954..bd4f5b5 100644 send_sig(SIGPIPE, current, 0); if (!ret) ret = -EPIPE; -@@ -1955,7 +1956,7 @@ static int link_pipe(struct pipe_inode_info *ipipe, +@@ -1966,7 +1967,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 */ @@ -65634,7 +68579,7 @@ index 69d4889..a810bd4 100644 if (sbi->s_bytesex == BYTESEX_PDP) return PDP_swab((__force __u32)n); diff --git a/fs/ubifs/io.c b/fs/ubifs/io.c -index e18b988..f1d4ad0f 100644 +index 2290d58..7791371 100644 --- a/fs/ubifs/io.c +++ b/fs/ubifs/io.c @@ -155,7 +155,7 @@ int ubifs_leb_change(struct ubifs_info *c, int lnum, const void *buf, int len) @@ -65707,7 +68652,7 @@ index aa138d6..5f3a811 100644 error = notify_change(path->dentry, &newattrs, &delegated_inode); mutex_unlock(&inode->i_mutex); diff --git a/fs/xattr.c b/fs/xattr.c -index 3377dff..f394815 100644 +index c69e6d4..cc56af5 100644 --- a/fs/xattr.c +++ b/fs/xattr.c @@ -227,6 +227,27 @@ int vfs_xattr_cmp(struct dentry *dentry, const char *xattr_name, @@ -65859,10 +68804,10 @@ index 3377dff..f394815 100644 } fdput(f); diff --git a/fs/xfs/xfs_bmap.c b/fs/xfs/xfs_bmap.c -index f0efc7e..ba72910 100644 +index 75c3fe5..b0f6bbe 100644 --- a/fs/xfs/xfs_bmap.c +++ b/fs/xfs/xfs_bmap.c -@@ -584,7 +584,7 @@ xfs_bmap_validate_ret( +@@ -583,7 +583,7 @@ xfs_bmap_validate_ret( #else #define xfs_bmap_check_leaf_extents(cur, ip, whichfork) do { } while (0) @@ -65872,10 +68817,10 @@ index f0efc7e..ba72910 100644 /* diff --git a/fs/xfs/xfs_dir2_readdir.c b/fs/xfs/xfs_dir2_readdir.c -index aead369..0dfecfd 100644 +index 48e99af..54ebae3 100644 --- a/fs/xfs/xfs_dir2_readdir.c +++ b/fs/xfs/xfs_dir2_readdir.c -@@ -160,7 +160,12 @@ xfs_dir2_sf_getdents( +@@ -159,7 +159,12 @@ xfs_dir2_sf_getdents( ino = dp->d_ops->sf_get_ino(sfp, sfep); filetype = dp->d_ops->sf_get_ftype(sfep); ctx->pos = off & 0x7fffffff; @@ -65883,14 +68828,14 @@ index aead369..0dfecfd 100644 + if (dp->i_df.if_u1.if_data == dp->i_df.if_u2.if_inline_data) { + char name[sfep->namelen]; + memcpy(name, sfep->name, sfep->namelen); -+ if (!dir_emit(ctx, name, sfep->namelen, ino, xfs_dir3_get_dtype(mp, filetype))) ++ if (!dir_emit(ctx, name, sfep->namelen, ino, xfs_dir3_get_dtype(dp->i_mount, filetype))) + return 0; + } else if (!dir_emit(ctx, (char *)sfep->name, sfep->namelen, ino, - xfs_dir3_get_dtype(mp, filetype))) + xfs_dir3_get_dtype(dp->i_mount, filetype))) return 0; sfep = dp->d_ops->sf_nextentry(sfp, sfep); diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c -index 6152cbe..f0f9eaa 100644 +index 8bc1bbc..0d6911b 100644 --- a/fs/xfs/xfs_ioctl.c +++ b/fs/xfs/xfs_ioctl.c @@ -122,7 +122,7 @@ xfs_find_handle( @@ -65904,10 +68849,10 @@ index 6152cbe..f0f9eaa 100644 diff --git a/grsecurity/Kconfig b/grsecurity/Kconfig new file mode 100644 -index 0000000..bfd482c +index 0000000..27cec32 --- /dev/null +++ b/grsecurity/Kconfig -@@ -0,0 +1,1176 @@ +@@ -0,0 +1,1166 @@ +# +# grecurity configuration +# @@ -66840,16 +69785,6 @@ index 0000000..bfd482c +menu "Network Protections" +depends on GRKERNSEC + -+config GRKERNSEC_RANDNET -+ bool "Larger entropy pools" -+ default y if GRKERNSEC_CONFIG_AUTO -+ help -+ If you say Y here, the entropy pools used for many features of Linux -+ and grsecurity will be doubled in size. Since several grsecurity -+ features use additional randomness, it is recommended that you say Y -+ here. Saying Y here has a similar effect as modifying -+ /proc/sys/kernel/random/poolsize. -+ +config GRKERNSEC_BLACKHOLE + bool "TCP/UDP blackhole and LAST_ACK DoS prevention" + default y if GRKERNSEC_CONFIG_AUTO @@ -69965,10 +72900,10 @@ index 0000000..18ffbbd +} diff --git a/grsecurity/gracl_cap.c b/grsecurity/gracl_cap.c new file mode 100644 -index 0000000..bdd51ea +index 0000000..1a94c11 --- /dev/null +++ b/grsecurity/gracl_cap.c -@@ -0,0 +1,110 @@ +@@ -0,0 +1,127 @@ +#include +#include +#include @@ -69979,6 +72914,29 @@ index 0000000..bdd51ea +extern const char *captab_log[]; +extern int captab_log_entries; + ++int gr_learn_cap(const struct task_struct *task, const struct cred *cred, const int cap) ++{ ++ struct acl_subject_label *curracl; ++ ++ if (!gr_acl_is_enabled()) ++ return 1; ++ ++ curracl = task->acl; ++ ++ if (curracl->mode & (GR_LEARN | GR_INHERITLEARN)) { ++ security_learn(GR_LEARN_AUDIT_MSG, task->role->rolename, ++ task->role->roletype, GR_GLOBAL_UID(cred->uid), ++ GR_GLOBAL_GID(cred->gid), task->exec_file ? ++ gr_to_filename(task->exec_file->f_path.dentry, ++ task->exec_file->f_path.mnt) : curracl->filename, ++ curracl->filename, 0UL, ++ 0UL, "", (unsigned long) cap, &task->signal->saved_ip); ++ return 1; ++ } ++ ++ return 0; ++} ++ +int gr_task_acl_is_capable(const struct task_struct *task, const struct cred *cred, const int cap) +{ + struct acl_subject_label *curracl; @@ -70015,19 +72973,13 @@ index 0000000..bdd51ea + return 1; + } + -+ curracl = task->acl; -+ -+ if ((curracl->mode & (GR_LEARN | GR_INHERITLEARN)) -+ && cap_raised(cred->cap_effective, cap)) { -+ security_learn(GR_LEARN_AUDIT_MSG, task->role->rolename, -+ task->role->roletype, GR_GLOBAL_UID(cred->uid), -+ GR_GLOBAL_GID(cred->gid), task->exec_file ? -+ gr_to_filename(task->exec_file->f_path.dentry, -+ task->exec_file->f_path.mnt) : curracl->filename, -+ curracl->filename, 0UL, -+ 0UL, "", (unsigned long) cap, &task->signal->saved_ip); ++ /* only learn the capability use if the process has the capability in the ++ general case, the two uses in sys.c of gr_learn_cap are an exception ++ to this rule to ensure any role transition involves what the full-learned ++ policy believes in a privileged process ++ */ ++ if (cap_raised(cred->cap_effective, cap) && gr_learn_cap(task, cred, cap)) + return 1; -+ } + + if ((cap >= 0) && (cap < captab_log_entries) && cap_raised(cred->cap_effective, cap) && !cap_raised(cap_audit, cap)) + gr_log_cap(GR_DONT_AUDIT, GR_CAP_ACL_MSG, task, captab_log[cap]); @@ -71413,7 +74365,7 @@ index 0000000..25f54ef +}; diff --git a/grsecurity/gracl_policy.c b/grsecurity/gracl_policy.c new file mode 100644 -index 0000000..361a099 +index 0000000..3f8ade0 --- /dev/null +++ b/grsecurity/gracl_policy.c @@ -0,0 +1,1782 @@ @@ -71472,9 +74424,9 @@ index 0000000..361a099 +extern int chkpw(struct gr_arg *entry, unsigned char *salt, unsigned char *sum); +extern void gr_clear_learn_entries(void); + -+static struct gr_arg gr_usermode; -+static unsigned char gr_system_salt[GR_SALT_LEN]; -+static unsigned char gr_system_sum[GR_SHA_LEN]; ++struct gr_arg *gr_usermode __read_only; ++unsigned char *gr_system_salt __read_only; ++unsigned char *gr_system_sum __read_only; + +static unsigned int gr_auth_attempts = 0; +static unsigned long gr_auth_expires = 0UL; @@ -72716,8 +75668,8 @@ index 0000000..361a099 +{ + int error = 0; + -+ memcpy(&gr_system_salt, args->salt, sizeof(gr_system_salt)); -+ memcpy(&gr_system_sum, args->sum, sizeof(gr_system_sum)); ++ memcpy(gr_system_salt, args->salt, GR_SALT_LEN); ++ memcpy(gr_system_sum, args->sum, GR_SHA_LEN); + + if (init_variables(args, false)) { + gr_log_str(GR_DONT_AUDIT_GOOD, GR_INITF_ACL_MSG, GR_VERSION); @@ -72944,11 +75896,11 @@ index 0000000..361a099 + if (error) + goto out; + -+ error = copy_gr_arg(uwrap.arg, &gr_usermode); ++ error = copy_gr_arg(uwrap.arg, gr_usermode); + if (error) + goto out; + -+ if (gr_usermode.mode != GR_SPROLE && gr_usermode.mode != GR_SPROLEPAM && ++ if (gr_usermode->mode != GR_SPROLE && gr_usermode->mode != GR_SPROLEPAM && + gr_auth_attempts >= CONFIG_GRKERNSEC_ACL_MAXTRIES && + time_after(gr_auth_expires, get_seconds())) { + error = -EBUSY; @@ -72960,8 +75912,8 @@ index 0000000..361a099 + locking + */ + -+ if (gr_usermode.mode != GR_SPROLE && gr_usermode.mode != GR_STATUS && -+ gr_usermode.mode != GR_UNSPROLE && gr_usermode.mode != GR_SPROLEPAM && ++ if (gr_usermode->mode != GR_SPROLE && gr_usermode->mode != GR_STATUS && ++ gr_usermode->mode != GR_UNSPROLE && gr_usermode->mode != GR_SPROLEPAM && + gr_is_global_nonroot(current_uid())) { + error = -EPERM; + goto out; @@ -72969,15 +75921,15 @@ index 0000000..361a099 + + /* ensure pw and special role name are null terminated */ + -+ gr_usermode.pw[GR_PW_LEN - 1] = '\0'; -+ gr_usermode.sp_role[GR_SPROLE_LEN - 1] = '\0'; ++ gr_usermode->pw[GR_PW_LEN - 1] = '\0'; ++ gr_usermode->sp_role[GR_SPROLE_LEN - 1] = '\0'; + + /* Okay. + * We have our enough of the argument structure..(we have yet + * to copy_from_user the tables themselves) . Copy the tables + * only if we need them, i.e. for loading operations. */ + -+ switch (gr_usermode.mode) { ++ switch (gr_usermode->mode) { + case GR_STATUS: + if (gr_acl_is_enabled()) { + error = 1; @@ -72987,12 +75939,12 @@ index 0000000..361a099 + error = 2; + goto out; + case GR_SHUTDOWN: -+ if (gr_acl_is_enabled() && !(chkpw(&gr_usermode, (unsigned char *)&gr_system_salt, (unsigned char *)&gr_system_sum))) { ++ if (gr_acl_is_enabled() && !(chkpw(gr_usermode, gr_system_salt, gr_system_sum))) { + stop_machine(gr_rbac_disable, NULL, NULL); + free_variables(false); -+ memset(&gr_usermode, 0, sizeof(gr_usermode)); -+ memset(&gr_system_salt, 0, sizeof(gr_system_salt)); -+ memset(&gr_system_sum, 0, sizeof(gr_system_sum)); ++ memset(gr_usermode, 0, sizeof(struct gr_arg)); ++ memset(gr_system_salt, 0, GR_SALT_LEN); ++ memset(gr_system_sum, 0, GR_SHA_LEN); + gr_log_noargs(GR_DONT_AUDIT_GOOD, GR_SHUTS_ACL_MSG); + } else if (gr_acl_is_enabled()) { + gr_log_noargs(GR_DONT_AUDIT, GR_SHUTF_ACL_MSG); @@ -73003,7 +75955,7 @@ index 0000000..361a099 + } + break; + case GR_ENABLE: -+ if (!gr_acl_is_enabled() && !(error2 = gracl_init(&gr_usermode))) ++ if (!gr_acl_is_enabled() && !(error2 = gracl_init(gr_usermode))) + gr_log_str(GR_DONT_AUDIT_GOOD, GR_ENABLE_ACL_MSG, GR_VERSION); + else { + if (gr_acl_is_enabled()) @@ -73019,8 +75971,8 @@ index 0000000..361a099 + if (!gr_acl_is_enabled()) { + gr_log_str(GR_DONT_AUDIT_GOOD, GR_RELOADI_ACL_MSG, GR_VERSION); + error = -EAGAIN; -+ } else if (!(chkpw(&gr_usermode, (unsigned char *)&gr_system_salt, (unsigned char *)&gr_system_sum))) { -+ error2 = gracl_reload(&gr_usermode, oldmode); ++ } else if (!(chkpw(gr_usermode, gr_system_salt, gr_system_sum))) { ++ error2 = gracl_reload(gr_usermode, oldmode); + if (!error2) + gr_log_str(GR_DONT_AUDIT_GOOD, GR_RELOAD_ACL_MSG, GR_VERSION); + else { @@ -73039,20 +75991,20 @@ index 0000000..361a099 + break; + } + -+ if (!(chkpw(&gr_usermode, (unsigned char *)&gr_system_salt, (unsigned char *)&gr_system_sum))) { ++ if (!(chkpw(gr_usermode, gr_system_salt, gr_system_sum))) { + gr_log_noargs(GR_DONT_AUDIT_GOOD, GR_SEGVMODS_ACL_MSG); -+ if (gr_usermode.segv_device && gr_usermode.segv_inode) { ++ if (gr_usermode->segv_device && gr_usermode->segv_inode) { + struct acl_subject_label *segvacl; + segvacl = -+ lookup_acl_subj_label(gr_usermode.segv_inode, -+ gr_usermode.segv_device, ++ lookup_acl_subj_label(gr_usermode->segv_inode, ++ gr_usermode->segv_device, + current->role); + if (segvacl) { + segvacl->crashes = 0; + segvacl->expires = 0; + } -+ } else if (gr_find_uid(gr_usermode.segv_uid) >= 0) { -+ gr_remove_uid(gr_usermode.segv_uid); ++ } else if (gr_find_uid(gr_usermode->segv_uid) >= 0) { ++ gr_remove_uid(gr_usermode->segv_uid); + } + } else { + gr_log_noargs(GR_DONT_AUDIT, GR_SEGVMODF_ACL_MSG); @@ -73079,11 +76031,11 @@ index 0000000..361a099 + } + + if (lookup_special_role_auth -+ (gr_usermode.mode, gr_usermode.sp_role, &sprole_salt, &sprole_sum) ++ (gr_usermode->mode, gr_usermode->sp_role, &sprole_salt, &sprole_sum) + && ((!sprole_salt && !sprole_sum) -+ || !(chkpw(&gr_usermode, sprole_salt, sprole_sum)))) { ++ || !(chkpw(gr_usermode, sprole_salt, sprole_sum)))) { + char *p = ""; -+ assign_special_role(gr_usermode.sp_role); ++ assign_special_role(gr_usermode->sp_role); + read_lock(&tasklist_lock); + if (current->real_parent) + p = current->real_parent->role->rolename; @@ -73091,7 +76043,7 @@ index 0000000..361a099 + gr_log_str_int(GR_DONT_AUDIT_GOOD, GR_SPROLES_ACL_MSG, + p, acl_sp_role_value); + } else { -+ gr_log_str(GR_DONT_AUDIT, GR_SPROLEF_ACL_MSG, gr_usermode.sp_role); ++ gr_log_str(GR_DONT_AUDIT, GR_SPROLEF_ACL_MSG, gr_usermode->sp_role); + error = -EPERM; + if(!(current->role->auth_attempts++)) + current->role->expires = get_seconds() + CONFIG_GRKERNSEC_ACL_TIMEOUT; @@ -73125,7 +76077,7 @@ index 0000000..361a099 + } + break; + default: -+ gr_log_int(GR_DONT_AUDIT, GR_INVMODE_ACL_MSG, gr_usermode.mode); ++ gr_log_int(GR_DONT_AUDIT, GR_INVMODE_ACL_MSG, gr_usermode->mode); + error = -EINVAL; + break; + } @@ -74058,10 +77010,10 @@ index 0000000..baa635c +} diff --git a/grsecurity/grsec_disabled.c b/grsecurity/grsec_disabled.c new file mode 100644 -index 0000000..de31e65 +index 0000000..2d3bcb7 --- /dev/null +++ b/grsecurity/grsec_disabled.c -@@ -0,0 +1,434 @@ +@@ -0,0 +1,440 @@ +#include +#include +#include @@ -74103,6 +77055,12 @@ index 0000000..de31e65 + return 0; +} + ++int ++gr_learn_cap(const struct task_struct *task, const struct cred *cred, const int cap) ++{ ++ return 0; ++} ++ +void +gr_handle_proc_create(const struct dentry *dentry, const struct inode *inode) +{ @@ -74498,10 +77456,10 @@ index 0000000..de31e65 +#endif diff --git a/grsecurity/grsec_exec.c b/grsecurity/grsec_exec.c new file mode 100644 -index 0000000..f35f454 +index 0000000..14638ff --- /dev/null +++ b/grsecurity/grsec_exec.c -@@ -0,0 +1,187 @@ +@@ -0,0 +1,188 @@ +#include +#include +#include @@ -74636,7 +77594,8 @@ index 0000000..f35f454 + "CAP_MAC_OVERRIDE", + "CAP_MAC_ADMIN", + "CAP_SYSLOG", -+ "CAP_WAKE_ALARM" ++ "CAP_WAKE_ALARM", ++ "CAP_BLOCK_SUSPEND" +}; + +int captab_log_entries = sizeof(captab_log)/sizeof(captab_log[0]); @@ -74750,10 +77709,10 @@ index 0000000..8ca18bf +} diff --git a/grsecurity/grsec_init.c b/grsecurity/grsec_init.c new file mode 100644 -index 0000000..ae6c028 +index 0000000..b7cb191 --- /dev/null +++ b/grsecurity/grsec_init.c -@@ -0,0 +1,272 @@ +@@ -0,0 +1,286 @@ +#include +#include +#include @@ -74833,6 +77792,10 @@ index 0000000..ae6c028 +char *gr_alert_log_buf; +char *gr_audit_log_buf; + ++extern struct gr_arg *gr_usermode; ++extern unsigned char *gr_system_salt; ++extern unsigned char *gr_system_sum; ++ +void __init +grsecurity_init(void) +{ @@ -74873,6 +77836,16 @@ index 0000000..ae6c028 + return; + } + ++ /* allocate memory for authentication structure */ ++ gr_usermode = kmalloc(sizeof(struct gr_arg), GFP_KERNEL); ++ gr_system_salt = kmalloc(GR_SALT_LEN, GFP_KERNEL); ++ gr_system_sum = kmalloc(GR_SHA_LEN, GFP_KERNEL); ++ ++ if (!gr_usermode || !gr_system_salt || !gr_system_sum) { ++ panic("Unable to allocate grsecurity authentication structure"); ++ return; ++ } ++ +#ifdef CONFIG_GRKERNSEC_IO +#if !defined(CONFIG_GRKERNSEC_SYSCTL_DISTRO) + grsec_disable_privio = 1; @@ -76835,10 +79808,10 @@ index 0000000..ae02d8e +EXPORT_SYMBOL_GPL(gr_handle_new_usb); diff --git a/grsecurity/grsum.c b/grsecurity/grsum.c new file mode 100644 -index 0000000..9f7b1ac +index 0000000..158b330 --- /dev/null +++ b/grsecurity/grsum.c -@@ -0,0 +1,61 @@ +@@ -0,0 +1,64 @@ +#include +#include +#include @@ -76855,47 +79828,50 @@ index 0000000..9f7b1ac +int +chkpw(struct gr_arg *entry, unsigned char *salt, unsigned char *sum) +{ -+ char *p; + struct crypto_hash *tfm; + struct hash_desc desc; -+ struct scatterlist sg; -+ unsigned char temp_sum[GR_SHA_LEN]; -+ volatile int retval = 0; ++ struct scatterlist sg[2]; ++ unsigned char temp_sum[GR_SHA_LEN] __attribute__((aligned(__alignof__(unsigned long)))); ++ unsigned long *tmpsumptr = (unsigned long *)temp_sum; ++ unsigned long *sumptr = (unsigned long *)sum; ++ int cryptres; ++ int retval = 1; ++ volatile int mismatched = 0; + volatile int dummy = 0; + unsigned int i; + -+ sg_init_table(&sg, 1); -+ + tfm = crypto_alloc_hash("sha256", 0, CRYPTO_ALG_ASYNC); + if (IS_ERR(tfm)) { + /* should never happen, since sha256 should be built in */ ++ memset(entry->pw, 0, GR_PW_LEN); + return 1; + } + ++ sg_init_table(sg, 2); ++ sg_set_buf(&sg[0], salt, GR_SALT_LEN); ++ sg_set_buf(&sg[1], entry->pw, strlen(entry->pw)); ++ + desc.tfm = tfm; + desc.flags = 0; + -+ crypto_hash_init(&desc); -+ -+ p = salt; -+ sg_set_buf(&sg, p, GR_SALT_LEN); -+ crypto_hash_update(&desc, &sg, sg.length); -+ -+ p = entry->pw; -+ sg_set_buf(&sg, p, strlen(p)); -+ -+ crypto_hash_update(&desc, &sg, sg.length); -+ -+ crypto_hash_final(&desc, temp_sum); ++ cryptres = crypto_hash_digest(&desc, sg, GR_SALT_LEN + strlen(entry->pw), ++ temp_sum); + + memset(entry->pw, 0, GR_PW_LEN); + -+ for (i = 0; i < GR_SHA_LEN; i++) -+ if (sum[i] != temp_sum[i]) -+ retval = 1; ++ if (cryptres) ++ goto out; ++ ++ for (i = 0; i < GR_SHA_LEN/sizeof(tmpsumptr[0]); i++) ++ if (sumptr[i] != tmpsumptr[i]) ++ mismatched = 1; + else + dummy = 1; // waste a cycle + ++ if (!mismatched) ++ retval = dummy - 1; ++ ++out: + crypto_free_hash(tfm); + + return retval; @@ -77269,10 +80245,10 @@ index b7babf0..97f4c4f 100644 + #endif /* _ASM_GENERIC_ATOMIC_LONG_H */ diff --git a/include/asm-generic/atomic.h b/include/asm-generic/atomic.h -index 33bd2de..f31bff97 100644 +index 9c79e76..9f7827d 100644 --- a/include/asm-generic/atomic.h +++ b/include/asm-generic/atomic.h -@@ -153,7 +153,7 @@ static inline int __atomic_add_unless(atomic_t *v, int a, int u) +@@ -154,7 +154,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 @@ -77310,10 +80286,10 @@ index b18ce4f..2ee2843 100644 + #endif /* _ASM_GENERIC_ATOMIC64_H */ diff --git a/include/asm-generic/barrier.h b/include/asm-generic/barrier.h -index 6f692f8..2ad9dd2 100644 +index 1402fa8..025a736 100644 --- a/include/asm-generic/barrier.h +++ b/include/asm-generic/barrier.h -@@ -66,7 +66,7 @@ +@@ -74,7 +74,7 @@ do { \ compiletime_assert_atomic_type(*p); \ smp_mb(); \ @@ -77551,10 +80527,10 @@ 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 a8015a7..7a4407b 100644 +index 53b2acc..f4568e7 100644 --- a/include/asm-generic/pgtable.h +++ b/include/asm-generic/pgtable.h -@@ -815,6 +815,22 @@ static inline void pmdp_set_numa(struct mm_struct *mm, unsigned long addr, +@@ -819,6 +819,22 @@ static inline void pmdp_set_numa(struct mm_struct *mm, unsigned long addr, } #endif /* CONFIG_NUMA_BALANCING */ @@ -77603,10 +80579,10 @@ index 72d8803..cb9749c 100644 + #endif /* __ASM_GENERIC_UACCESS_H */ diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h -index 146e4ff..f4f9609 100644 +index c1c0b0c..05c9588 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h -@@ -251,6 +251,7 @@ +@@ -231,6 +231,7 @@ .rodata : AT(ADDR(.rodata) - LOAD_OFFSET) { \ VMLINUX_SYMBOL(__start_rodata) = .; \ *(.rodata) *(.rodata.*) \ @@ -77614,7 +80590,7 @@ index 146e4ff..f4f9609 100644 *(__vermagic) /* Kernel version magic */ \ . = ALIGN(8); \ VMLINUX_SYMBOL(__start___tracepoints_ptrs) = .; \ -@@ -737,17 +738,18 @@ +@@ -719,17 +720,18 @@ * section in the linker script will go there too. @phdr should have * a leading colon. * @@ -77651,7 +80627,7 @@ index 016c2f1..c4baa98 100644 struct crypto_instance { struct crypto_alg alg; diff --git a/include/drm/drmP.h b/include/drm/drmP.h -index a7c2a86..078f1b6 100644 +index 8af71a8..7fe6c19 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h @@ -68,6 +68,7 @@ @@ -77662,7 +80638,7 @@ index a7c2a86..078f1b6 100644 #include #include #include -@@ -268,10 +269,12 @@ do { \ +@@ -261,10 +262,12 @@ do { \ * \param cmd command. * \param arg argument. */ @@ -77677,7 +80653,7 @@ index a7c2a86..078f1b6 100644 unsigned long arg); #define DRM_IOCTL_NR(n) _IOC_NR(n) -@@ -287,10 +290,10 @@ typedef int drm_ioctl_compat_t(struct file *filp, unsigned int cmd, +@@ -280,10 +283,10 @@ typedef int drm_ioctl_compat_t(struct file *filp, unsigned int cmd, struct drm_ioctl_desc { unsigned int cmd; int flags; @@ -77690,7 +80666,7 @@ index a7c2a86..078f1b6 100644 /** * Creates a driver or general drm_ioctl_desc array entry for the given -@@ -1001,7 +1004,8 @@ struct drm_info_list { +@@ -983,7 +986,8 @@ struct drm_info_list { int (*show)(struct seq_file*, void*); /** show callback */ u32 driver_features; /**< Required driver features for this entry */ void *data; @@ -77700,17 +80676,17 @@ index a7c2a86..078f1b6 100644 /** * debugfs node structure. This structure represents a debugfs file. -@@ -1083,7 +1087,7 @@ struct drm_device { +@@ -1067,7 +1071,7 @@ struct drm_device { /** \name Usage Counters */ /*@{ */ -- int open_count; /**< Outstanding files open */ -+ local_t open_count; /**< Outstanding files open */ +- int open_count; /**< Outstanding files open, protected by drm_global_mutex. */ ++ local_t open_count; /**< Outstanding files open, protected by drm_global_mutex. */ + spinlock_t buf_lock; /**< For drm_device::buf_use and a few other things. */ int buf_use; /**< Buffers in use -- cannot alloc */ atomic_t buf_alloc; /**< Buffer allocation in progress */ - /*@} */ diff --git a/include/drm/drm_crtc_helper.h b/include/drm/drm_crtc_helper.h -index 36a5feb..d9f01aa 100644 +index a3d75fe..6802f9c 100644 --- a/include/drm/drm_crtc_helper.h +++ b/include/drm/drm_crtc_helper.h @@ -109,7 +109,7 @@ struct drm_encoder_helper_funcs { @@ -77723,7 +80699,7 @@ index 36a5feb..d9f01aa 100644 /** * drm_connector_helper_funcs - helper operations for connectors diff --git a/include/drm/i915_pciids.h b/include/drm/i915_pciids.h -index 012d58f..d0a0642 100644 +index a70d456..6ea07cd 100644 --- a/include/drm/i915_pciids.h +++ b/include/drm/i915_pciids.h @@ -37,7 +37,7 @@ @@ -77834,10 +80810,10 @@ index 61f29e5..e67c658 100644 extern void __register_binfmt(struct linux_binfmt *fmt, int insert); diff --git a/include/linux/bitops.h b/include/linux/bitops.h -index be5fd38..d71192a 100644 +index cbc5833..8123ebc 100644 --- a/include/linux/bitops.h +++ b/include/linux/bitops.h -@@ -102,7 +102,7 @@ static inline __u64 ror64(__u64 word, unsigned int shift) +@@ -122,7 +122,7 @@ static inline __u64 ror64(__u64 word, unsigned int shift) * @word: value to rotate * @shift: bits to roll */ @@ -77846,7 +80822,7 @@ index be5fd38..d71192a 100644 { return (word << shift) | (word >> (32 - shift)); } -@@ -112,7 +112,7 @@ static inline __u32 rol32(__u32 word, unsigned int shift) +@@ -132,7 +132,7 @@ static inline __u32 rol32(__u32 word, unsigned int shift) * @word: value to rotate * @shift: bits to roll */ @@ -77855,7 +80831,7 @@ index be5fd38..d71192a 100644 { return (word >> shift) | (word << (32 - shift)); } -@@ -168,7 +168,7 @@ static inline __s32 sign_extend32(__u32 value, int index) +@@ -188,7 +188,7 @@ static inline __s32 sign_extend32(__u32 value, int index) return (__s32)(value << shift) >> shift; } @@ -77865,10 +80841,10 @@ index be5fd38..d71192a 100644 if (sizeof(l) == 4) return fls(l); diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h -index 0d84981..bb741c0 100644 +index 8699bcf..279485d 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h -@@ -1584,7 +1584,7 @@ struct block_device_operations { +@@ -1625,7 +1625,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; @@ -77954,10 +80930,10 @@ index 4ce9056..86caac6 100644 extern struct cleancache_ops * cleancache_register_ops(struct cleancache_ops *ops); diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h -index 5119174..8e264f8 100644 +index 0c287db..5efa775 100644 --- a/include/linux/clk-provider.h +++ b/include/linux/clk-provider.h -@@ -174,6 +174,7 @@ struct clk_ops { +@@ -180,6 +180,7 @@ struct clk_ops { void (*init)(struct clk_hw *hw); int (*debug_init)(struct clk_hw *hw, struct dentry *dentry); }; @@ -78027,7 +81003,7 @@ index 2507fd2..55203f8 100644 * Mark a position in code as unreachable. This can be used to * suppress control flow warnings after asm blocks that transfer diff --git a/include/linux/compiler.h b/include/linux/compiler.h -index ee7239e..7c11769 100644 +index d5ad7b1..3b74638 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h @@ -5,11 +5,14 @@ @@ -78153,7 +81129,7 @@ index ee7239e..7c11769 100644 /* Simple shorthand for a section definition */ #ifndef __section # define __section(S) __attribute__ ((__section__(#S))) -@@ -369,7 +435,8 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect); +@@ -378,7 +444,8 @@ 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. */ @@ -78204,10 +81180,10 @@ index 34025df..d94bbbc 100644 /* * Users often need to create attribute structures for their configurable diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h -index 5ae5100..b809662 100644 +index 8f8ae95..b9b0e6d 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h -@@ -200,6 +200,7 @@ struct global_attr { +@@ -202,6 +202,7 @@ struct global_attr { ssize_t (*store)(struct kobject *a, struct attribute *b, const char *c, size_t count); }; @@ -78215,7 +81191,7 @@ index 5ae5100..b809662 100644 #define define_one_global_ro(_name) \ static struct global_attr _name = \ -@@ -242,7 +243,7 @@ struct cpufreq_driver { +@@ -268,7 +269,7 @@ struct cpufreq_driver { bool boost_supported; bool boost_enabled; int (*set_boost) (int state); @@ -78225,7 +81201,7 @@ index 5ae5100..b809662 100644 /* flags */ #define CPUFREQ_STICKY (1 << 0) /* driver isn't removed even if diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h -index b0238cb..db89e1e 100644 +index 25e0df6..952dffd 100644 --- a/include/linux/cpuidle.h +++ b/include/linux/cpuidle.h @@ -50,7 +50,8 @@ struct cpuidle_state { @@ -78238,7 +81214,7 @@ index b0238cb..db89e1e 100644 /* Idle State Flags */ #define CPUIDLE_FLAG_TIME_VALID (0x01) /* is residency time measurable? */ -@@ -211,7 +212,7 @@ struct cpuidle_governor { +@@ -209,7 +210,7 @@ struct cpuidle_governor { void (*reflect) (struct cpuidle_device *dev, int index); struct module *owner; @@ -78248,7 +81224,7 @@ index b0238cb..db89e1e 100644 #ifdef CONFIG_CPU_IDLE extern int cpuidle_register_governor(struct cpuidle_governor *gov); diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h -index d08e4d2..95fad61 100644 +index 2997af6..424ddc1 100644 --- a/include/linux/cpumask.h +++ b/include/linux/cpumask.h @@ -118,17 +118,17 @@ static inline unsigned int cpumask_first(const struct cpumask *srcp) @@ -78272,7 +81248,7 @@ index d08e4d2..95fad61 100644 const struct cpumask *srcp, const struct cpumask *andp) { -@@ -167,7 +167,7 @@ static inline unsigned int cpumask_first(const struct cpumask *srcp) +@@ -174,7 +174,7 @@ static inline unsigned int cpumask_first(const struct cpumask *srcp) * * Returns >= nr_cpu_ids if no further cpus set. */ @@ -78281,7 +81257,7 @@ index d08e4d2..95fad61 100644 { /* -1 is a legal arg here. */ if (n != -1) -@@ -182,7 +182,7 @@ static inline unsigned int cpumask_next(int n, const struct cpumask *srcp) +@@ -189,7 +189,7 @@ static inline unsigned int cpumask_next(int n, const struct cpumask *srcp) * * Returns >= nr_cpu_ids if no further cpus unset. */ @@ -78290,15 +81266,15 @@ index d08e4d2..95fad61 100644 { /* -1 is a legal arg here. */ if (n != -1) -@@ -190,7 +190,7 @@ static inline unsigned int cpumask_next_zero(int n, const struct cpumask *srcp) +@@ -197,7 +197,7 @@ static inline unsigned int cpumask_next_zero(int n, const struct cpumask *srcp) return find_next_zero_bit(cpumask_bits(srcp), nr_cpumask_bits, n+1); } -int cpumask_next_and(int n, const struct cpumask *, const struct cpumask *); +int cpumask_next_and(int n, const struct cpumask *, const struct cpumask *) __intentional_overflow(-1); int cpumask_any_but(const struct cpumask *mask, unsigned int cpu); + int cpumask_set_cpu_local_first(int i, int numa_node, cpumask_t *dstp); - /** diff --git a/include/linux/cred.h b/include/linux/cred.h index f61d6c8..d372d95 100644 --- a/include/linux/cred.h @@ -78408,7 +81384,7 @@ index 7925bf0..d5143d2 100644 #define large_malloc(a) vmalloc(a) diff --git a/include/linux/devfreq.h b/include/linux/devfreq.h -index d48dc00..211ee54 100644 +index f1863dc..5c26074 100644 --- a/include/linux/devfreq.h +++ b/include/linux/devfreq.h @@ -114,7 +114,7 @@ struct devfreq_governor { @@ -78421,7 +81397,7 @@ index d48dc00..211ee54 100644 /** * struct devfreq - Device devfreq structure diff --git a/include/linux/device.h b/include/linux/device.h -index d1d1c05..a90fdb0 100644 +index af424ac..fd46ddf 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -310,7 +310,7 @@ struct subsys_interface { @@ -78457,10 +81433,10 @@ index d1d1c05..a90fdb0 100644 ssize_t device_show_ulong(struct device *dev, struct device_attribute *attr, char *buf); diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h -index fd4aee2..1f28db9 100644 +index 931b709..89b2d89 100644 --- a/include/linux/dma-mapping.h +++ b/include/linux/dma-mapping.h -@@ -54,7 +54,7 @@ struct dma_map_ops { +@@ -60,7 +60,7 @@ struct dma_map_ops { u64 (*get_required_mask)(struct device *dev); #endif int is_phys; @@ -78470,7 +81446,7 @@ index fd4aee2..1f28db9 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 72cb0dd..7fe9a4b 100644 +index d2c5cc7..d193394 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h @@ -1147,9 +1147,9 @@ struct dma_pinned_list { @@ -78486,10 +81462,10 @@ index 72cb0dd..7fe9a4b 100644 unsigned int offset, size_t len); diff --git a/include/linux/efi.h b/include/linux/efi.h -index 6c100ff..e3289b4 100644 +index 41bbf8b..bd3a718 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h -@@ -1009,6 +1009,7 @@ struct efivar_operations { +@@ -1027,6 +1027,7 @@ struct efivar_operations { efi_set_variable_t *set_variable; efi_query_variable_store_t *query_variable_store; }; @@ -78537,7 +81513,7 @@ index a729120..6ede2c9 100644 return (long) ptr; } diff --git a/include/linux/extcon.h b/include/linux/extcon.h -index f488145..3b6b04e 100644 +index 36f49c4..a2a1f4c 100644 --- a/include/linux/extcon.h +++ b/include/linux/extcon.h @@ -135,7 +135,7 @@ struct extcon_dev { @@ -78550,10 +81526,10 @@ index f488145..3b6b04e 100644 /** diff --git a/include/linux/fb.h b/include/linux/fb.h -index fe6ac95..898d41d 100644 +index b6bfda9..1f13487 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h -@@ -304,7 +304,7 @@ struct fb_ops { +@@ -305,7 +305,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); @@ -78575,6 +81551,534 @@ index 230f87b..1fd0485 100644 void do_close_on_exec(struct files_struct *); int iterate_fd(struct files_struct *, unsigned, int (*)(const void *, struct file *, unsigned), +diff --git a/include/linux/filter.h b/include/linux/filter.h +index a7e3c48..e568c8e 100644 +--- a/include/linux/filter.h ++++ b/include/linux/filter.h +@@ -9,330 +9,28 @@ + #include + #include + +-/* Internally used and optimized filter representation with extended +- * instruction set based on top of classic BPF. +- */ +- +-/* instruction classes */ +-#define BPF_ALU64 0x07 /* alu mode in double word width */ +- +-/* ld/ldx fields */ +-#define BPF_DW 0x18 /* double word */ +-#define BPF_XADD 0xc0 /* exclusive add */ +- +-/* alu/jmp fields */ +-#define BPF_MOV 0xb0 /* mov reg to reg */ +-#define BPF_ARSH 0xc0 /* sign extending arithmetic shift right */ +- +-/* change endianness of a register */ +-#define BPF_END 0xd0 /* flags for endianness conversion: */ +-#define BPF_TO_LE 0x00 /* convert to little-endian */ +-#define BPF_TO_BE 0x08 /* convert to big-endian */ +-#define BPF_FROM_LE BPF_TO_LE +-#define BPF_FROM_BE BPF_TO_BE +- +-#define BPF_JNE 0x50 /* jump != */ +-#define BPF_JSGT 0x60 /* SGT is signed '>', GT in x86 */ +-#define BPF_JSGE 0x70 /* SGE is signed '>=', GE in x86 */ +-#define BPF_CALL 0x80 /* function call */ +-#define BPF_EXIT 0x90 /* function return */ +- +-/* Register numbers */ +-enum { +- BPF_REG_0 = 0, +- BPF_REG_1, +- BPF_REG_2, +- BPF_REG_3, +- BPF_REG_4, +- BPF_REG_5, +- BPF_REG_6, +- BPF_REG_7, +- BPF_REG_8, +- BPF_REG_9, +- BPF_REG_10, +- __MAX_BPF_REG, +-}; +- +-/* BPF has 10 general purpose 64-bit registers and stack frame. */ +-#define MAX_BPF_REG __MAX_BPF_REG +- +-/* ArgX, context and stack frame pointer register positions. Note, +- * Arg1, Arg2, Arg3, etc are used as argument mappings of function +- * calls in BPF_CALL instruction. +- */ +-#define BPF_REG_ARG1 BPF_REG_1 +-#define BPF_REG_ARG2 BPF_REG_2 +-#define BPF_REG_ARG3 BPF_REG_3 +-#define BPF_REG_ARG4 BPF_REG_4 +-#define BPF_REG_ARG5 BPF_REG_5 +-#define BPF_REG_CTX BPF_REG_6 +-#define BPF_REG_FP BPF_REG_10 +- +-/* Additional register mappings for converted user programs. */ +-#define BPF_REG_A BPF_REG_0 +-#define BPF_REG_X BPF_REG_7 +-#define BPF_REG_TMP BPF_REG_8 +- +-/* BPF program can access up to 512 bytes of stack space. */ +-#define MAX_BPF_STACK 512 +- +-/* Helper macros for filter block array initializers. */ +- +-/* ALU ops on registers, bpf_add|sub|...: dst_reg += src_reg */ +- +-#define BPF_ALU64_REG(OP, DST, SRC) \ +- ((struct sock_filter_int) { \ +- .code = BPF_ALU64 | BPF_OP(OP) | BPF_X, \ +- .dst_reg = DST, \ +- .src_reg = SRC, \ +- .off = 0, \ +- .imm = 0 }) +- +-#define BPF_ALU32_REG(OP, DST, SRC) \ +- ((struct sock_filter_int) { \ +- .code = BPF_ALU | BPF_OP(OP) | BPF_X, \ +- .dst_reg = DST, \ +- .src_reg = SRC, \ +- .off = 0, \ +- .imm = 0 }) +- +-/* ALU ops on immediates, bpf_add|sub|...: dst_reg += imm32 */ +- +-#define BPF_ALU64_IMM(OP, DST, IMM) \ +- ((struct sock_filter_int) { \ +- .code = BPF_ALU64 | BPF_OP(OP) | BPF_K, \ +- .dst_reg = DST, \ +- .src_reg = 0, \ +- .off = 0, \ +- .imm = IMM }) +- +-#define BPF_ALU32_IMM(OP, DST, IMM) \ +- ((struct sock_filter_int) { \ +- .code = BPF_ALU | BPF_OP(OP) | BPF_K, \ +- .dst_reg = DST, \ +- .src_reg = 0, \ +- .off = 0, \ +- .imm = IMM }) +- +-/* Endianess conversion, cpu_to_{l,b}e(), {l,b}e_to_cpu() */ +- +-#define BPF_ENDIAN(TYPE, DST, LEN) \ +- ((struct sock_filter_int) { \ +- .code = BPF_ALU | BPF_END | BPF_SRC(TYPE), \ +- .dst_reg = DST, \ +- .src_reg = 0, \ +- .off = 0, \ +- .imm = LEN }) +- +-/* Short form of mov, dst_reg = src_reg */ +- +-#define BPF_MOV64_REG(DST, SRC) \ +- ((struct sock_filter_int) { \ +- .code = BPF_ALU64 | BPF_MOV | BPF_X, \ +- .dst_reg = DST, \ +- .src_reg = SRC, \ +- .off = 0, \ +- .imm = 0 }) +- +-#define BPF_MOV32_REG(DST, SRC) \ +- ((struct sock_filter_int) { \ +- .code = BPF_ALU | BPF_MOV | BPF_X, \ +- .dst_reg = DST, \ +- .src_reg = SRC, \ +- .off = 0, \ +- .imm = 0 }) +- +-/* Short form of mov, dst_reg = imm32 */ +- +-#define BPF_MOV64_IMM(DST, IMM) \ +- ((struct sock_filter_int) { \ +- .code = BPF_ALU64 | BPF_MOV | BPF_K, \ +- .dst_reg = DST, \ +- .src_reg = 0, \ +- .off = 0, \ +- .imm = IMM }) +- +-#define BPF_MOV32_IMM(DST, IMM) \ +- ((struct sock_filter_int) { \ +- .code = BPF_ALU | BPF_MOV | BPF_K, \ +- .dst_reg = DST, \ +- .src_reg = 0, \ +- .off = 0, \ +- .imm = IMM }) +- +-/* Short form of mov based on type, BPF_X: dst_reg = src_reg, BPF_K: dst_reg = imm32 */ +- +-#define BPF_MOV64_RAW(TYPE, DST, SRC, IMM) \ +- ((struct sock_filter_int) { \ +- .code = BPF_ALU64 | BPF_MOV | BPF_SRC(TYPE), \ +- .dst_reg = DST, \ +- .src_reg = SRC, \ +- .off = 0, \ +- .imm = IMM }) +- +-#define BPF_MOV32_RAW(TYPE, DST, SRC, IMM) \ +- ((struct sock_filter_int) { \ +- .code = BPF_ALU | BPF_MOV | BPF_SRC(TYPE), \ +- .dst_reg = DST, \ +- .src_reg = SRC, \ +- .off = 0, \ +- .imm = IMM }) +- +-/* Direct packet access, R0 = *(uint *) (skb->data + imm32) */ +- +-#define BPF_LD_ABS(SIZE, IMM) \ +- ((struct sock_filter_int) { \ +- .code = BPF_LD | BPF_SIZE(SIZE) | BPF_ABS, \ +- .dst_reg = 0, \ +- .src_reg = 0, \ +- .off = 0, \ +- .imm = IMM }) +- +-/* Indirect packet access, R0 = *(uint *) (skb->data + src_reg + imm32) */ +- +-#define BPF_LD_IND(SIZE, SRC, IMM) \ +- ((struct sock_filter_int) { \ +- .code = BPF_LD | BPF_SIZE(SIZE) | BPF_IND, \ +- .dst_reg = 0, \ +- .src_reg = SRC, \ +- .off = 0, \ +- .imm = IMM }) +- +-/* Memory load, dst_reg = *(uint *) (src_reg + off16) */ +- +-#define BPF_LDX_MEM(SIZE, DST, SRC, OFF) \ +- ((struct sock_filter_int) { \ +- .code = BPF_LDX | BPF_SIZE(SIZE) | BPF_MEM, \ +- .dst_reg = DST, \ +- .src_reg = SRC, \ +- .off = OFF, \ +- .imm = 0 }) +- +-/* Memory store, *(uint *) (dst_reg + off16) = src_reg */ +- +-#define BPF_STX_MEM(SIZE, DST, SRC, OFF) \ +- ((struct sock_filter_int) { \ +- .code = BPF_STX | BPF_SIZE(SIZE) | BPF_MEM, \ +- .dst_reg = DST, \ +- .src_reg = SRC, \ +- .off = OFF, \ +- .imm = 0 }) +- +-/* Memory store, *(uint *) (dst_reg + off16) = imm32 */ +- +-#define BPF_ST_MEM(SIZE, DST, OFF, IMM) \ +- ((struct sock_filter_int) { \ +- .code = BPF_ST | BPF_SIZE(SIZE) | BPF_MEM, \ +- .dst_reg = DST, \ +- .src_reg = 0, \ +- .off = OFF, \ +- .imm = IMM }) +- +-/* Conditional jumps against registers, if (dst_reg 'op' src_reg) goto pc + off16 */ +- +-#define BPF_JMP_REG(OP, DST, SRC, OFF) \ +- ((struct sock_filter_int) { \ +- .code = BPF_JMP | BPF_OP(OP) | BPF_X, \ +- .dst_reg = DST, \ +- .src_reg = SRC, \ +- .off = OFF, \ +- .imm = 0 }) +- +-/* Conditional jumps against immediates, if (dst_reg 'op' imm32) goto pc + off16 */ +- +-#define BPF_JMP_IMM(OP, DST, IMM, OFF) \ +- ((struct sock_filter_int) { \ +- .code = BPF_JMP | BPF_OP(OP) | BPF_K, \ +- .dst_reg = DST, \ +- .src_reg = 0, \ +- .off = OFF, \ +- .imm = IMM }) +- +-/* Function call */ +- +-#define BPF_EMIT_CALL(FUNC) \ +- ((struct sock_filter_int) { \ +- .code = BPF_JMP | BPF_CALL, \ +- .dst_reg = 0, \ +- .src_reg = 0, \ +- .off = 0, \ +- .imm = ((FUNC) - __bpf_call_base) }) +- +-/* Raw code statement block */ +- +-#define BPF_RAW_INSN(CODE, DST, SRC, OFF, IMM) \ +- ((struct sock_filter_int) { \ +- .code = CODE, \ +- .dst_reg = DST, \ +- .src_reg = SRC, \ +- .off = OFF, \ +- .imm = IMM }) +- +-/* Program exit */ +- +-#define BPF_EXIT_INSN() \ +- ((struct sock_filter_int) { \ +- .code = BPF_JMP | BPF_EXIT, \ +- .dst_reg = 0, \ +- .src_reg = 0, \ +- .off = 0, \ +- .imm = 0 }) +- +-#define bytes_to_bpf_size(bytes) \ +-({ \ +- int bpf_size = -EINVAL; \ +- \ +- if (bytes == sizeof(u8)) \ +- bpf_size = BPF_B; \ +- else if (bytes == sizeof(u16)) \ +- bpf_size = BPF_H; \ +- else if (bytes == sizeof(u32)) \ +- bpf_size = BPF_W; \ +- else if (bytes == sizeof(u64)) \ +- bpf_size = BPF_DW; \ +- \ +- bpf_size; \ +-}) +- +-/* Macro to invoke filter function. */ +-#define SK_RUN_FILTER(filter, ctx) (*filter->bpf_func)(ctx, filter->insnsi) +- +-struct sock_filter_int { +- __u8 code; /* opcode */ +- __u8 dst_reg:4; /* dest register */ +- __u8 src_reg:4; /* source register */ +- __s16 off; /* signed offset */ +- __s32 imm; /* signed immediate constant */ +-}; +- + #ifdef CONFIG_COMPAT +-/* A struct sock_filter is architecture independent. */ ++/* ++ * A struct sock_filter is architecture independent. ++ */ + struct compat_sock_fprog { + u16 len; +- compat_uptr_t filter; /* struct sock_filter * */ ++ compat_uptr_t filter; /* struct sock_filter * */ + }; + #endif + +-struct sock_fprog_kern { +- u16 len; +- struct sock_filter *filter; +-}; +- + struct sk_buff; + struct sock; +-struct seccomp_data; + +-struct sk_filter { ++struct sk_filter ++{ + atomic_t refcnt; +- u32 jited:1, /* Is our filter JIT'ed? */ +- len:31; /* Number of filter blocks */ +- struct sock_fprog_kern *orig_prog; /* Original BPF program */ ++ unsigned int len; /* Number of filter blocks */ + struct rcu_head rcu; + unsigned int (*bpf_func)(const struct sk_buff *skb, +- const struct sock_filter_int *filter); ++ const struct sock_filter *filter); + union { +- struct sock_filter insns[0]; +- struct sock_filter_int insnsi[0]; ++ struct sock_filter insns[0]; + struct work_struct work; + }; + }; +@@ -343,76 +41,25 @@ static inline unsigned int sk_filter_size(unsigned int proglen) + offsetof(struct sk_filter, insns[proglen])); + } + +-#define sk_filter_proglen(fprog) \ +- (fprog->len * sizeof(fprog->filter[0])) +- +-int sk_filter(struct sock *sk, struct sk_buff *skb); +- +-void sk_filter_select_runtime(struct sk_filter *fp); +-void sk_filter_free(struct sk_filter *fp); +- +-int sk_convert_filter(struct sock_filter *prog, int len, +- struct sock_filter_int *new_prog, int *new_len); +- +-int sk_unattached_filter_create(struct sk_filter **pfp, +- struct sock_fprog_kern *fprog); +-void sk_unattached_filter_destroy(struct sk_filter *fp); +- +-int sk_attach_filter(struct sock_fprog *fprog, struct sock *sk); +-int sk_detach_filter(struct sock *sk); +- +-int sk_chk_filter(struct sock_filter *filter, unsigned int flen); +-int sk_get_filter(struct sock *sk, struct sock_filter __user *filter, +- unsigned int len); +- +-void sk_filter_charge(struct sock *sk, struct sk_filter *fp); +-void sk_filter_uncharge(struct sock *sk, struct sk_filter *fp); +- +-u64 __bpf_call_base(u64 r1, u64 r2, u64 r3, u64 r4, u64 r5); +-void bpf_int_jit_compile(struct sk_filter *fp); +- +-#define BPF_ANC BIT(15) +- +-static inline u16 bpf_anc_helper(const struct sock_filter *ftest) +-{ +- BUG_ON(ftest->code & BPF_ANC); +- +- switch (ftest->code) { +- case BPF_LD | BPF_W | BPF_ABS: +- case BPF_LD | BPF_H | BPF_ABS: +- case BPF_LD | BPF_B | BPF_ABS: +-#define BPF_ANCILLARY(CODE) case SKF_AD_OFF + SKF_AD_##CODE: \ +- return BPF_ANC | SKF_AD_##CODE +- switch (ftest->k) { +- BPF_ANCILLARY(PROTOCOL); +- BPF_ANCILLARY(PKTTYPE); +- BPF_ANCILLARY(IFINDEX); +- BPF_ANCILLARY(NLATTR); +- BPF_ANCILLARY(NLATTR_NEST); +- BPF_ANCILLARY(MARK); +- BPF_ANCILLARY(QUEUE); +- BPF_ANCILLARY(HATYPE); +- BPF_ANCILLARY(RXHASH); +- BPF_ANCILLARY(CPU); +- BPF_ANCILLARY(ALU_XOR_X); +- BPF_ANCILLARY(VLAN_TAG); +- BPF_ANCILLARY(VLAN_TAG_PRESENT); +- BPF_ANCILLARY(PAY_OFFSET); +- BPF_ANCILLARY(RANDOM); +- } +- /* Fallthrough. */ +- default: +- return ftest->code; +- } +-} ++extern int sk_filter(struct sock *sk, struct sk_buff *skb); ++extern unsigned int sk_run_filter(const struct sk_buff *skb, ++ const struct sock_filter *filter); ++extern int sk_unattached_filter_create(struct sk_filter **pfp, ++ struct sock_fprog *fprog); ++extern void sk_unattached_filter_destroy(struct sk_filter *fp); ++extern int sk_attach_filter(struct sock_fprog *fprog, struct sock *sk); ++extern int sk_detach_filter(struct sock *sk); ++extern int sk_chk_filter(struct sock_filter *filter, unsigned int flen); ++extern int sk_get_filter(struct sock *sk, struct sock_filter __user *filter, unsigned len); ++extern void sk_decode_filter(struct sock_filter *filt, struct sock_filter *to); + + #ifdef CONFIG_BPF_JIT + #include + #include + #include + +-void bpf_jit_compile(struct sk_filter *fp); +-void bpf_jit_free(struct sk_filter *fp); ++extern void bpf_jit_compile(struct sk_filter *fp); ++extern void bpf_jit_free(struct sk_filter *fp); + + static inline void bpf_jit_dump(unsigned int flen, unsigned int proglen, + u32 pass, void *image) +@@ -423,22 +70,90 @@ static inline void bpf_jit_dump(unsigned int flen, unsigned int proglen, + print_hex_dump(KERN_ERR, "JIT code: ", DUMP_PREFIX_OFFSET, + 16, 1, image, proglen, false); + } ++#define SK_RUN_FILTER(FILTER, SKB) (*FILTER->bpf_func)(SKB, FILTER->insns) + #else + #include +- + static inline void bpf_jit_compile(struct sk_filter *fp) + { + } +- + static inline void bpf_jit_free(struct sk_filter *fp) + { + kfree(fp); + } +-#endif /* CONFIG_BPF_JIT */ ++#define SK_RUN_FILTER(FILTER, SKB) sk_run_filter(SKB, FILTER->insns) ++#endif + + static inline int bpf_tell_extensions(void) + { + return SKF_AD_MAX; + } + ++enum { ++ BPF_S_RET_K = 1, ++ BPF_S_RET_A, ++ BPF_S_ALU_ADD_K, ++ BPF_S_ALU_ADD_X, ++ BPF_S_ALU_SUB_K, ++ BPF_S_ALU_SUB_X, ++ BPF_S_ALU_MUL_K, ++ BPF_S_ALU_MUL_X, ++ BPF_S_ALU_DIV_X, ++ BPF_S_ALU_MOD_K, ++ BPF_S_ALU_MOD_X, ++ BPF_S_ALU_AND_K, ++ BPF_S_ALU_AND_X, ++ BPF_S_ALU_OR_K, ++ BPF_S_ALU_OR_X, ++ BPF_S_ALU_XOR_K, ++ BPF_S_ALU_XOR_X, ++ BPF_S_ALU_LSH_K, ++ BPF_S_ALU_LSH_X, ++ BPF_S_ALU_RSH_K, ++ BPF_S_ALU_RSH_X, ++ BPF_S_ALU_NEG, ++ BPF_S_LD_W_ABS, ++ BPF_S_LD_H_ABS, ++ BPF_S_LD_B_ABS, ++ BPF_S_LD_W_LEN, ++ BPF_S_LD_W_IND, ++ BPF_S_LD_H_IND, ++ BPF_S_LD_B_IND, ++ BPF_S_LD_IMM, ++ BPF_S_LDX_W_LEN, ++ BPF_S_LDX_B_MSH, ++ BPF_S_LDX_IMM, ++ BPF_S_MISC_TAX, ++ BPF_S_MISC_TXA, ++ BPF_S_ALU_DIV_K, ++ BPF_S_LD_MEM, ++ BPF_S_LDX_MEM, ++ BPF_S_ST, ++ BPF_S_STX, ++ BPF_S_JMP_JA, ++ BPF_S_JMP_JEQ_K, ++ BPF_S_JMP_JEQ_X, ++ BPF_S_JMP_JGE_K, ++ BPF_S_JMP_JGE_X, ++ BPF_S_JMP_JGT_K, ++ BPF_S_JMP_JGT_X, ++ BPF_S_JMP_JSET_K, ++ BPF_S_JMP_JSET_X, ++ /* Ancillary data */ ++ BPF_S_ANC_PROTOCOL, ++ BPF_S_ANC_PKTTYPE, ++ BPF_S_ANC_IFINDEX, ++ BPF_S_ANC_NLATTR, ++ BPF_S_ANC_NLATTR_NEST, ++ BPF_S_ANC_MARK, ++ BPF_S_ANC_QUEUE, ++ BPF_S_ANC_HATYPE, ++ BPF_S_ANC_RXHASH, ++ BPF_S_ANC_CPU, ++ BPF_S_ANC_ALU_XOR_X, ++ BPF_S_ANC_SECCOMP_LD_W, ++ BPF_S_ANC_VLAN_TAG, ++ BPF_S_ANC_VLAN_TAG_PRESENT, ++ BPF_S_ANC_PAY_OFFSET, ++}; ++ + #endif /* __LINUX_FILTER_H__ */ diff --git a/include/linux/frontswap.h b/include/linux/frontswap.h index 8293262..2b3b8bd 100644 --- a/include/linux/frontswap.h @@ -78589,10 +82093,10 @@ index 8293262..2b3b8bd 100644 extern bool frontswap_enabled; extern struct frontswap_ops * diff --git a/include/linux/fs.h b/include/linux/fs.h -index 8780312..425cc22 100644 +index e11d60c..901317a 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h -@@ -398,7 +398,7 @@ struct address_space { +@@ -401,7 +401,7 @@ struct address_space { spinlock_t private_lock; /* for use by the address_space */ struct list_head private_list; /* ditto */ void *private_data; /* ditto */ @@ -78601,7 +82105,7 @@ index 8780312..425cc22 100644 /* * On most architectures that alignment is already the case; but * must be enforced here for CRIS, to let the least significant bit -@@ -441,7 +441,7 @@ struct block_device { +@@ -444,7 +444,7 @@ struct block_device { int bd_fsfreeze_count; /* Mutex for freeze */ struct mutex bd_fsfreeze_mutex; @@ -78610,7 +82114,7 @@ index 8780312..425cc22 100644 /* * Radix-tree tags, for tagging dirty and writeback pages within the pagecache -@@ -585,7 +585,7 @@ struct inode { +@@ -588,7 +588,7 @@ struct inode { #endif void *i_private; /* fs or device private pointer */ @@ -78619,7 +82123,7 @@ index 8780312..425cc22 100644 static inline int inode_unhashed(struct inode *inode) { -@@ -778,7 +778,7 @@ struct file { +@@ -781,7 +781,7 @@ struct file { struct list_head f_tfile_llink; #endif /* #ifdef CONFIG_EPOLL */ struct address_space *f_mapping; @@ -78628,7 +82132,7 @@ index 8780312..425cc22 100644 struct file_handle { __u32 handle_bytes; -@@ -906,7 +906,7 @@ struct file_lock { +@@ -909,7 +909,7 @@ struct file_lock { int state; /* state of grant or error if -ve */ } afs; } fl_u; @@ -78637,7 +82141,7 @@ index 8780312..425cc22 100644 /* The following constant reflects the upper bound of the file/locking space */ #ifndef OFFSET_MAX -@@ -1255,7 +1255,7 @@ struct super_block { +@@ -1258,7 +1258,7 @@ struct super_block { struct list_lru s_dentry_lru ____cacheline_aligned_in_smp; struct list_lru s_inode_lru ____cacheline_aligned_in_smp; struct rcu_head rcu; @@ -78646,7 +82150,7 @@ index 8780312..425cc22 100644 extern struct timespec current_fs_time(struct super_block *sb); -@@ -1477,7 +1477,8 @@ struct file_operations { +@@ -1484,7 +1484,8 @@ struct file_operations { long (*fallocate)(struct file *file, int mode, loff_t offset, loff_t len); int (*show_fdinfo)(struct seq_file *m, struct file *f); @@ -78656,7 +82160,7 @@ index 8780312..425cc22 100644 struct inode_operations { struct dentry * (*lookup) (struct inode *,struct dentry *, unsigned int); -@@ -2757,4 +2758,14 @@ static inline bool dir_relax(struct inode *inode) +@@ -2769,4 +2770,14 @@ static inline bool dir_relax(struct inode *inode) return !IS_DEADDIR(inode); } @@ -78760,7 +82264,7 @@ index 1c804b0..1432c2b 100644 /* diff --git a/include/linux/genhd.h b/include/linux/genhd.h -index 9f3c275..8bdff5d 100644 +index ec274e0..e678159 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h @@ -194,7 +194,7 @@ struct gendisk { @@ -78795,10 +82299,10 @@ index c0894dd..2fbf10c 100644 }; diff --git a/include/linux/gfp.h b/include/linux/gfp.h -index 39b81dc..819dc51 100644 +index 6eb1fb3..30fe7e4 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h -@@ -36,6 +36,13 @@ struct vm_area_struct; +@@ -34,6 +34,13 @@ struct vm_area_struct; #define ___GFP_NO_KSWAPD 0x400000u #define ___GFP_OTHER_NODE 0x800000u #define ___GFP_WRITE 0x1000000u @@ -78812,15 +82316,15 @@ index 39b81dc..819dc51 100644 /* If the above are modified, __GFP_BITS_SHIFT may need updating */ /* -@@ -93,6 +100,7 @@ struct vm_area_struct; +@@ -90,6 +97,7 @@ struct vm_area_struct; + #define __GFP_NO_KSWAPD ((__force gfp_t)___GFP_NO_KSWAPD) #define __GFP_OTHER_NODE ((__force gfp_t)___GFP_OTHER_NODE) /* On behalf of other node */ - #define __GFP_KMEMCG ((__force gfp_t)___GFP_KMEMCG) /* Allocation comes from a memcg-accounted resource */ #define __GFP_WRITE ((__force gfp_t)___GFP_WRITE) /* Allocator intends to dirty page */ +#define __GFP_USERCOPY ((__force gfp_t)___GFP_USERCOPY)/* Allocator intends to copy page to/from userland */ /* * This may seem redundant, but it's a way of annotating false positives vs. -@@ -100,7 +108,7 @@ struct vm_area_struct; +@@ -97,7 +105,7 @@ struct vm_area_struct; */ #define __GFP_NOTRACK_FALSE_POSITIVE (__GFP_NOTRACK) @@ -78829,7 +82333,7 @@ index 39b81dc..819dc51 100644 #define __GFP_BITS_MASK ((__force gfp_t)((1 << __GFP_BITS_SHIFT) - 1)) /* This equals 0, but use constants in case they ever change */ -@@ -158,6 +166,8 @@ struct vm_area_struct; +@@ -155,6 +163,8 @@ struct vm_area_struct; /* 4GB DMA on some platforms */ #define GFP_DMA32 __GFP_DMA32 @@ -79867,10 +83371,10 @@ index 0000000..b02ba9d +#define GR_MSRWRITE_MSG "denied write to CPU MSR by " diff --git a/include/linux/grsecurity.h b/include/linux/grsecurity.h new file mode 100644 -index 0000000..13ac2e2 +index 0000000..10b9635 --- /dev/null +++ b/include/linux/grsecurity.h -@@ -0,0 +1,249 @@ +@@ -0,0 +1,254 @@ +#ifndef GR_SECURITY_H +#define GR_SECURITY_H +#include @@ -79882,6 +83386,9 @@ index 0000000..13ac2e2 +#if defined(CONFIG_GRKERNSEC_PROC_USER) && defined(CONFIG_GRKERNSEC_PROC_USERGROUP) +#error "CONFIG_GRKERNSEC_PROC_USER and CONFIG_GRKERNSEC_PROC_USERGROUP cannot both be enabled." +#endif ++#if defined(CONFIG_GRKERNSEC_PROC) && !defined(CONFIG_GRKERNSEC_PROC_USER) && !defined(CONFIG_GRKERNSEC_PROC_USERGROUP) ++#error "CONFIG_GRKERNSEC_PROC enabled, but neither CONFIG_GRKERNSEC_PROC_USER nor CONFIG_GRKERNSEC_PROC_USERGROUP enabled" ++#endif +#if defined(CONFIG_PAX_NOEXEC) && !defined(CONFIG_PAX_PAGEEXEC) && !defined(CONFIG_PAX_SEGMEXEC) && !defined(CONFIG_PAX_KERNEXEC) +#error "CONFIG_PAX_NOEXEC enabled, but PAGEEXEC, SEGMEXEC, and KERNEXEC are disabled." +#endif @@ -79907,6 +83414,8 @@ index 0000000..13ac2e2 +int gr_check_user_change(kuid_t real, kuid_t effective, kuid_t fs); +int gr_check_group_change(kgid_t real, kgid_t effective, kgid_t fs); + ++int gr_learn_cap(const struct task_struct *task, const struct cred *cred, const int cap); ++ +void gr_del_task_from_ip_table(struct task_struct *p); + +int gr_pid_is_chrooted(struct task_struct *p); @@ -80244,7 +83753,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 a3ba270..a1b6604 100644 +index 2df8e8d..3e1280d 100644 --- a/include/linux/init.h +++ b/include/linux/init.h @@ -37,9 +37,17 @@ @@ -80301,10 +83810,10 @@ index 6df7f9f..d0bf699 100644 .files = &init_files, \ .signal = &init_signals, \ diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h -index 051c850..431f83a 100644 +index 698ad05..8601bb7 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h -@@ -412,8 +412,8 @@ extern const char * const softirq_to_name[NR_SOFTIRQS]; +@@ -418,8 +418,8 @@ extern const char * const softirq_to_name[NR_SOFTIRQS]; struct softirq_action { @@ -80315,7 +83824,7 @@ index 051c850..431f83a 100644 asmlinkage void do_softirq(void); asmlinkage void __do_softirq(void); -@@ -427,7 +427,7 @@ static inline void do_softirq_own_stack(void) +@@ -433,7 +433,7 @@ static inline void do_softirq_own_stack(void) } #endif @@ -80364,7 +83873,7 @@ index 35e7eca..6afb7ad 100644 extern struct ipc_namespace init_ipc_ns; extern atomic_t nr_ipc_ns; diff --git a/include/linux/irq.h b/include/linux/irq.h -index 5c57efb..965a62b 100644 +index 0d998d8..3a1c782 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h @@ -344,7 +344,8 @@ struct irq_chip { @@ -80378,10 +83887,10 @@ index 5c57efb..965a62b 100644 /* * irq_chip specific flags diff --git a/include/linux/irqchip/arm-gic.h b/include/linux/irqchip/arm-gic.h -index 7ed92d0..589abf5 100644 +index 45e2d8c..26d85da 100644 --- a/include/linux/irqchip/arm-gic.h +++ b/include/linux/irqchip/arm-gic.h -@@ -73,9 +73,11 @@ +@@ -75,9 +75,11 @@ #ifndef __ASSEMBLY__ @@ -80394,6 +83903,22 @@ index 7ed92d0..589abf5 100644 void gic_init_bases(unsigned int, int, void __iomem *, void __iomem *, u32 offset, struct device_node *); +diff --git a/include/linux/isdn_ppp.h b/include/linux/isdn_ppp.h +index 8e10f57..d5f62bc 100644 +--- a/include/linux/isdn_ppp.h ++++ b/include/linux/isdn_ppp.h +@@ -180,8 +180,9 @@ struct ippp_struct { + struct slcompress *slcomp; + #endif + #ifdef CONFIG_IPPP_FILTER +- struct sk_filter *pass_filter; /* filter for packets to pass */ +- struct sk_filter *active_filter; /* filter for pkts to reset idle */ ++ struct sock_filter *pass_filter; /* filter for packets to pass */ ++ struct sock_filter *active_filter; /* filter for pkts to reset idle */ ++ unsigned pass_len, active_len; + #endif + unsigned long debug; + struct isdn_ppp_compressor *compressor,*decompressor; diff --git a/include/linux/jiffies.h b/include/linux/jiffies.h index 1f44466..b481806 100644 --- a/include/linux/jiffies.h @@ -80530,10 +84055,10 @@ index 0555cc6..40116ce 100644 char **envp; int wait; diff --git a/include/linux/kobject.h b/include/linux/kobject.h -index f896a33..f2eb10f 100644 +index 2d61b90..a1d0a13 100644 --- a/include/linux/kobject.h +++ b/include/linux/kobject.h -@@ -116,7 +116,7 @@ struct kobj_type { +@@ -118,7 +118,7 @@ struct kobj_type { struct attribute **default_attrs; const struct kobj_ns_type_operations *(*child_ns_type)(struct kobject *kobj); const void *(*namespace)(struct kobject *kobj); @@ -80542,7 +84067,7 @@ index f896a33..f2eb10f 100644 struct kobj_uevent_env { char *argv[3]; -@@ -140,6 +140,7 @@ struct kobj_attribute { +@@ -142,6 +142,7 @@ struct kobj_attribute { ssize_t (*store)(struct kobject *kobj, struct kobj_attribute *attr, const char *buf, size_t count); }; @@ -80550,7 +84075,7 @@ index f896a33..f2eb10f 100644 extern const struct sysfs_ops kobj_sysfs_ops; -@@ -167,7 +168,7 @@ struct kset { +@@ -169,7 +170,7 @@ struct kset { spinlock_t list_lock; struct kobject kobj; const struct kset_uevent_ops *uevent_ops; @@ -80586,10 +84111,10 @@ index 484604d..0f6c5b6 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 7d21cf9..bc0c81f 100644 +index ec4e3bd..14db03a 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h -@@ -466,7 +466,7 @@ static inline void kvm_irqfd_exit(void) +@@ -468,7 +468,7 @@ static inline void kvm_irqfd_exit(void) { } #endif @@ -80598,7 +84123,7 @@ index 7d21cf9..bc0c81f 100644 struct module *module); void kvm_exit(void); -@@ -632,7 +632,7 @@ int kvm_arch_vcpu_ioctl_set_guest_debug(struct kvm_vcpu *vcpu, +@@ -634,7 +634,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); @@ -80608,10 +84133,10 @@ index 7d21cf9..bc0c81f 100644 int kvm_arch_vcpu_init(struct kvm_vcpu *vcpu); diff --git a/include/linux/libata.h b/include/linux/libata.h -index 5ab4e3a..2fe237b 100644 +index 92abb49..e7fff2a 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h -@@ -975,7 +975,7 @@ struct ata_port_operations { +@@ -976,7 +976,7 @@ struct ata_port_operations { * fields must be pointers. */ const struct ata_port_operations *inherits; @@ -80740,7 +84265,7 @@ index f230a97..714c006 100644 static inline int vma_dup_policy(struct vm_area_struct *src, struct vm_area_struct *dst) diff --git a/include/linux/mm.h b/include/linux/mm.h -index d677706..673408c 100644 +index e03dd29..eaf923c 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -127,6 +127,11 @@ extern unsigned int kobjsize(const void *objp); @@ -80763,10 +84288,10 @@ index d677706..673408c 100644 - void *buf, int len, int write); + ssize_t (*access)(struct vm_area_struct *vma, unsigned long addr, + void *buf, size_t len, int write); - #ifdef CONFIG_NUMA - /* - * set_policy() op must add a reference to any non-NULL @new mempolicy -@@ -268,6 +273,7 @@ struct vm_operations_struct { + + /* Called by the /proc/PID/maps code to ask the vma whether it + * has a special name. Returning non-NULL will also cause this +@@ -274,6 +279,7 @@ struct vm_operations_struct { int (*remap_pages)(struct vm_area_struct *vma, unsigned long addr, unsigned long size, pgoff_t pgoff); }; @@ -80774,7 +84299,7 @@ index d677706..673408c 100644 struct mmu_gather; struct inode; -@@ -1133,8 +1139,8 @@ int follow_pfn(struct vm_area_struct *vma, unsigned long address, +@@ -1144,8 +1150,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); @@ -80785,7 +84310,7 @@ index d677706..673408c 100644 static inline void unmap_shared_mapping_range(struct address_space *mapping, loff_t const holebegin, loff_t const holelen) -@@ -1173,9 +1179,9 @@ static inline int fixup_user_fault(struct task_struct *tsk, +@@ -1184,9 +1190,9 @@ static inline int fixup_user_fault(struct task_struct *tsk, } #endif @@ -80798,7 +84323,7 @@ index d677706..673408c 100644 long __get_user_pages(struct task_struct *tsk, struct mm_struct *mm, unsigned long start, unsigned long nr_pages, -@@ -1208,34 +1214,6 @@ int set_page_dirty_lock(struct page *page); +@@ -1219,34 +1225,6 @@ int set_page_dirty_lock(struct page *page); int clear_page_dirty_for_io(struct page *page); int get_cmdline(struct task_struct *task, char *buffer, int buflen); @@ -80833,7 +84358,7 @@ index d677706..673408c 100644 extern pid_t vm_is_stack(struct task_struct *task, struct vm_area_struct *vma, int in_group); -@@ -1335,6 +1313,15 @@ static inline void sync_mm_rss(struct mm_struct *mm) +@@ -1346,6 +1324,15 @@ static inline void sync_mm_rss(struct mm_struct *mm) } #endif @@ -80849,7 +84374,7 @@ index d677706..673408c 100644 int vma_wants_writenotify(struct vm_area_struct *vma); extern pte_t *__get_locked_pte(struct mm_struct *mm, unsigned long addr, -@@ -1353,8 +1340,15 @@ static inline int __pud_alloc(struct mm_struct *mm, pgd_t *pgd, +@@ -1364,8 +1351,15 @@ static inline int __pud_alloc(struct mm_struct *mm, pgd_t *pgd, { return 0; } @@ -80865,7 +84390,7 @@ index d677706..673408c 100644 #endif #ifdef __PAGETABLE_PMD_FOLDED -@@ -1363,8 +1357,15 @@ static inline int __pmd_alloc(struct mm_struct *mm, pud_t *pud, +@@ -1374,8 +1368,15 @@ static inline int __pmd_alloc(struct mm_struct *mm, pud_t *pud, { return 0; } @@ -80881,7 +84406,7 @@ index d677706..673408c 100644 #endif int __pte_alloc(struct mm_struct *mm, struct vm_area_struct *vma, -@@ -1382,11 +1383,23 @@ static inline pud_t *pud_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long a +@@ -1393,11 +1394,23 @@ static inline pud_t *pud_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long a NULL: pud_offset(pgd, address); } @@ -80905,7 +84430,7 @@ index d677706..673408c 100644 #endif /* CONFIG_MMU && !__ARCH_HAS_4LEVEL_HACK */ #if USE_SPLIT_PTE_PTLOCKS -@@ -1783,7 +1796,7 @@ extern int install_special_mapping(struct mm_struct *mm, +@@ -1796,7 +1809,7 @@ extern int install_special_mapping(struct mm_struct *mm, unsigned long addr, unsigned long len, unsigned long flags, struct page **pages); @@ -80914,7 +84439,7 @@ index d677706..673408c 100644 extern unsigned long mmap_region(struct file *file, unsigned long addr, unsigned long len, vm_flags_t vm_flags, unsigned long pgoff); -@@ -1791,6 +1804,7 @@ extern unsigned long do_mmap_pgoff(struct file *file, unsigned long addr, +@@ -1804,6 +1817,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); @@ -80922,7 +84447,7 @@ index d677706..673408c 100644 #ifdef CONFIG_MMU extern int __mm_populate(unsigned long addr, unsigned long len, -@@ -1819,10 +1833,11 @@ struct vm_unmapped_area_info { +@@ -1832,10 +1846,11 @@ struct vm_unmapped_area_info { unsigned long high_limit; unsigned long align_mask; unsigned long align_offset; @@ -80936,7 +84461,7 @@ index d677706..673408c 100644 /* * Search for an unmapped address range. -@@ -1834,7 +1849,7 @@ extern unsigned long unmapped_area_topdown(struct vm_unmapped_area_info *info); +@@ -1847,7 +1862,7 @@ extern unsigned long unmapped_area_topdown(struct vm_unmapped_area_info *info); * - satisfies (begin_addr & align_mask) == (align_offset & align_mask) */ static inline unsigned long @@ -80945,7 +84470,7 @@ index d677706..673408c 100644 { if (!(info->flags & VM_UNMAPPED_AREA_TOPDOWN)) return unmapped_area(info); -@@ -1896,6 +1911,10 @@ extern struct vm_area_struct * find_vma(struct mm_struct * mm, unsigned long add +@@ -1909,6 +1924,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); @@ -80956,7 +84481,7 @@ index d677706..673408c 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) -@@ -1924,15 +1943,6 @@ static inline struct vm_area_struct *find_exact_vma(struct mm_struct *mm, +@@ -1937,15 +1956,6 @@ static inline struct vm_area_struct *find_exact_vma(struct mm_struct *mm, return vma; } @@ -80972,7 +84497,7 @@ index d677706..673408c 100644 #ifdef CONFIG_NUMA_BALANCING unsigned long change_prot_numa(struct vm_area_struct *vma, unsigned long start, unsigned long end); -@@ -1984,6 +1994,11 @@ void vm_stat_account(struct mm_struct *, unsigned long, struct file *, long); +@@ -1997,6 +2007,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) { @@ -80984,7 +84509,7 @@ index d677706..673408c 100644 mm->total_vm += pages; } #endif /* CONFIG_PROC_FS */ -@@ -2065,7 +2080,7 @@ extern int unpoison_memory(unsigned long pfn); +@@ -2078,7 +2093,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); @@ -80993,7 +84518,7 @@ index d677706..673408c 100644 extern int soft_offline_page(struct page *page, int flags); #if defined(CONFIG_TRANSPARENT_HUGEPAGE) || defined(CONFIG_HUGETLBFS) -@@ -2100,5 +2115,11 @@ void __init setup_nr_node_ids(void); +@@ -2113,5 +2128,11 @@ void __init setup_nr_node_ids(void); static inline void setup_nr_node_ids(void) {} #endif @@ -81006,7 +84531,7 @@ index d677706..673408c 100644 #endif /* __KERNEL__ */ #endif /* _LINUX_MM_H */ diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h -index 8967e20..61f7900 100644 +index 96c5750..15668ba 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h @@ -308,7 +308,9 @@ struct vm_area_struct { @@ -81070,10 +84595,10 @@ index c5d5278..f0b68c8 100644 } diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h -index 835aa3d..676b387 100644 +index 6cbd1b6..b1d2f99 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h -@@ -406,7 +406,7 @@ struct zone { +@@ -412,7 +412,7 @@ struct zone { unsigned long flags; /* zone flags, see below */ /* Zone statistics */ @@ -81295,7 +84820,7 @@ index 560ca53..ef621ef 100644 } #endif diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h -index 204a677..e9b486a 100644 +index b1990c5..2a6e611 100644 --- a/include/linux/moduleparam.h +++ b/include/linux/moduleparam.h @@ -293,7 +293,7 @@ static inline void __kernel_param_unlock(void) @@ -81371,10 +84896,10 @@ index 17d8339..81656c0 100644 struct iovec; struct kvec; diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h -index b42d07b..7f45ae2 100644 +index 66f9a04..056078d 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h -@@ -1146,6 +1146,7 @@ struct net_device_ops { +@@ -1145,6 +1145,7 @@ struct net_device_ops { void *priv); int (*ndo_get_lock_subclass)(struct net_device *dev); }; @@ -81382,7 +84907,7 @@ index b42d07b..7f45ae2 100644 /** * enum net_device_priv_flags - &struct net_device priv_flags -@@ -1313,11 +1314,11 @@ struct net_device { +@@ -1312,11 +1313,11 @@ struct net_device { struct net_device_stats stats; /* dropped packets by core network, Do not use this in drivers */ @@ -81439,7 +84964,7 @@ index 0000000..33f4af8 + +#endif diff --git a/include/linux/nls.h b/include/linux/nls.h -index 520681b..1d67ed2 100644 +index 520681b..2b7fabb 100644 --- a/include/linux/nls.h +++ b/include/linux/nls.h @@ -31,7 +31,7 @@ struct nls_table { @@ -81451,6 +84976,15 @@ index 520681b..1d67ed2 100644 /* this value hold the maximum octet of charset */ #define NLS_MAX_CHARSET_SIZE 6 /* for UTF-8 */ +@@ -46,7 +46,7 @@ enum utf16_endian { + /* nls_base.c */ + extern int __register_nls(struct nls_table *, struct module *); + extern int unregister_nls(struct nls_table *); +-extern struct nls_table *load_nls(char *); ++extern struct nls_table *load_nls(const char *); + extern void unload_nls(struct nls_table *); + extern struct nls_table *load_nls_default(void); + #define register_nls(nls) __register_nls((nls), THIS_MODULE) diff --git a/include/linux/notifier.h b/include/linux/notifier.h index d14a4c3..a078786 100644 --- a/include/linux/notifier.h @@ -81530,10 +85064,10 @@ index 5f2e559..7d59314 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 3ef6ea1..ed1a248 100644 +index 707617a..28a2e7e 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h -@@ -328,8 +328,8 @@ struct perf_event { +@@ -339,8 +339,8 @@ struct perf_event { enum perf_event_active_state state; unsigned int attach_state; @@ -81544,7 +85078,7 @@ index 3ef6ea1..ed1a248 100644 /* * These are the total time in nanoseconds that the event -@@ -380,8 +380,8 @@ struct perf_event { +@@ -391,8 +391,8 @@ struct perf_event { * These accumulate total time (in nanoseconds) that children * events have been enabled and running, respectively. */ @@ -81555,7 +85089,7 @@ index 3ef6ea1..ed1a248 100644 /* * Protect attach/detach and child_list: -@@ -710,7 +710,7 @@ static inline void perf_callchain_store(struct perf_callchain_entry *entry, u64 +@@ -722,7 +722,7 @@ static inline void perf_callchain_store(struct perf_callchain_entry *entry, u64 entry->ip[entry->nr++] = ip; } @@ -81564,7 +85098,7 @@ index 3ef6ea1..ed1a248 100644 extern int sysctl_perf_event_mlock; extern int sysctl_perf_event_sample_rate; extern int sysctl_perf_cpu_time_max_percent; -@@ -725,19 +725,24 @@ extern int perf_cpu_time_max_percent_handler(struct ctl_table *table, int write, +@@ -737,19 +737,24 @@ extern int perf_cpu_time_max_percent_handler(struct ctl_table *table, int write, loff_t *ppos); @@ -81592,7 +85126,7 @@ index 3ef6ea1..ed1a248 100644 } extern void perf_event_init(void); -@@ -867,7 +872,7 @@ struct perf_pmu_events_attr { +@@ -880,7 +885,7 @@ struct perf_pmu_events_attr { struct device_attribute attr; u64 id; const char *event_str; @@ -81634,10 +85168,10 @@ index eb8b8ac..62649e1 100644 unsigned int w_counter; struct page *tmp_page; diff --git a/include/linux/pm.h b/include/linux/pm.h -index d915d03..0531037 100644 +index 72c0fe0..26918ed 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h -@@ -600,6 +600,7 @@ extern int dev_pm_put_subsys_data(struct device *dev); +@@ -620,6 +620,7 @@ extern int dev_pm_put_subsys_data(struct device *dev); struct dev_pm_domain { struct dev_pm_ops ops; }; @@ -81664,10 +85198,10 @@ index 7c1d252..0e7061d 100644 struct generic_pm_domain { diff --git a/include/linux/pm_runtime.h b/include/linux/pm_runtime.h -index 2a5897a..4f9af63 100644 +index 43fd671..08c96ee 100644 --- a/include/linux/pm_runtime.h +++ b/include/linux/pm_runtime.h -@@ -113,7 +113,7 @@ static inline bool pm_runtime_callbacks_present(struct device *dev) +@@ -118,7 +118,7 @@ static inline bool pm_runtime_callbacks_present(struct device *dev) static inline void pm_runtime_mark_last_busy(struct device *dev) { @@ -81803,10 +85337,10 @@ index de83b4e..c4b997d 100644 #define preempt_set_need_resched() \ do { \ diff --git a/include/linux/printk.h b/include/linux/printk.h -index 8752f75..2b80c0f 100644 +index 319ff7e..608849a 100644 --- a/include/linux/printk.h +++ b/include/linux/printk.h -@@ -110,6 +110,8 @@ static inline __printf(1, 2) __cold +@@ -121,6 +121,8 @@ static inline __printf(1, 2) __cold void early_printk(const char *s, ...) { } #endif @@ -81815,7 +85349,7 @@ index 8752f75..2b80c0f 100644 #ifdef CONFIG_PRINTK asmlinkage __printf(5, 0) int vprintk_emit(int facility, int level, -@@ -144,7 +146,6 @@ extern bool printk_timed_ratelimit(unsigned long *caller_jiffies, +@@ -155,7 +157,6 @@ extern bool printk_timed_ratelimit(unsigned long *caller_jiffies, extern int printk_delay_msec; extern int dmesg_restrict; @@ -81824,7 +85358,7 @@ index 8752f75..2b80c0f 100644 extern void wake_up_klogd(void); diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h -index 608e60a..79cfb18 100644 +index 9d117f6..d832b31 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h @@ -17,8 +17,11 @@ extern void proc_flush_task(struct task_struct *); @@ -81859,7 +85393,7 @@ index 608e60a..79cfb18 100644 extern void proc_set_size(struct proc_dir_entry *, loff_t); extern void proc_set_user(struct proc_dir_entry *, kuid_t, kgid_t); extern void *PDE_DATA(const struct inode *); -@@ -52,8 +68,12 @@ static inline struct proc_dir_entry *proc_symlink(const char *name, +@@ -56,8 +72,12 @@ static inline struct proc_dir_entry *proc_symlink(const char *name, struct proc_dir_entry *parent,const char *dest) { return NULL;} static inline struct proc_dir_entry *proc_mkdir(const char *name, struct proc_dir_entry *parent) {return NULL;} @@ -81872,7 +85406,7 @@ index 608e60a..79cfb18 100644 static inline struct proc_dir_entry *proc_mkdir_mode(const char *name, umode_t mode, struct proc_dir_entry *parent) { return NULL; } #define proc_create(name, mode, parent, proc_fops) ({NULL;}) -@@ -73,7 +93,7 @@ static inline int remove_proc_subtree(const char *name, struct proc_dir_entry *p +@@ -77,7 +97,7 @@ static inline int remove_proc_subtree(const char *name, struct proc_dir_entry *p static inline struct proc_dir_entry *proc_net_mkdir( struct net *net, const char *name, struct proc_dir_entry *parent) { @@ -81894,8 +85428,146 @@ index 34a1e10..70f6bde 100644 struct proc_ns { void *ns; +diff --git a/include/linux/ptp_classify.h b/include/linux/ptp_classify.h +index 7dfed71..1dc420b 100644 +--- a/include/linux/ptp_classify.h ++++ b/include/linux/ptp_classify.h +@@ -23,8 +23,15 @@ + #ifndef _PTP_CLASSIFY_H_ + #define _PTP_CLASSIFY_H_ + ++#include ++#include + #include +-#include ++#include ++#ifdef __KERNEL__ ++#include ++#else ++#include ++#endif + + #define PTP_CLASS_NONE 0x00 /* not a PTP event message */ + #define PTP_CLASS_V1 0x01 /* protocol version 1 */ +@@ -37,7 +44,7 @@ + #define PTP_CLASS_PMASK 0xf0 /* mask for the packet type field */ + + #define PTP_CLASS_V1_IPV4 (PTP_CLASS_V1 | PTP_CLASS_IPV4) +-#define PTP_CLASS_V1_IPV6 (PTP_CLASS_V1 | PTP_CLASS_IPV6) /* probably DNE */ ++#define PTP_CLASS_V1_IPV6 (PTP_CLASS_V1 | PTP_CLASS_IPV6) /*probably DNE*/ + #define PTP_CLASS_V2_IPV4 (PTP_CLASS_V2 | PTP_CLASS_IPV4) + #define PTP_CLASS_V2_IPV6 (PTP_CLASS_V2 | PTP_CLASS_IPV6) + #define PTP_CLASS_V2_L2 (PTP_CLASS_V2 | PTP_CLASS_L2) +@@ -46,34 +53,88 @@ + #define PTP_EV_PORT 319 + #define PTP_GEN_BIT 0x08 /* indicates general message, if set in message type */ + ++#define OFF_ETYPE 12 ++#define OFF_IHL 14 ++#define OFF_FRAG 20 ++#define OFF_PROTO4 23 ++#define OFF_NEXT 6 ++#define OFF_UDP_DST 2 ++ + #define OFF_PTP_SOURCE_UUID 22 /* PTPv1 only */ + #define OFF_PTP_SEQUENCE_ID 30 + #define OFF_PTP_CONTROL 32 /* PTPv1 only */ + +-/* Below defines should actually be removed at some point in time. */ ++#define IPV4_HLEN(data) (((struct iphdr *)(data + OFF_IHL))->ihl << 2) ++ + #define IP6_HLEN 40 + #define UDP_HLEN 8 +-#define OFF_IHL 14 ++ ++#define RELOFF_DST4 (ETH_HLEN + OFF_UDP_DST) ++#define OFF_DST6 (ETH_HLEN + IP6_HLEN + OFF_UDP_DST) + #define OFF_PTP6 (ETH_HLEN + IP6_HLEN + UDP_HLEN) +-#define IPV4_HLEN(data) (((struct iphdr *)(data + OFF_IHL))->ihl << 2) + +-#if defined(CONFIG_NET_PTP_CLASSIFY) +-/** +- * ptp_classify_raw - classify a PTP packet +- * @skb: buffer +- * +- * Runs a minimal BPF dissector to classify a network packet to +- * determine the PTP class. In case the skb does not contain any +- * PTP protocol data, PTP_CLASS_NONE will be returned, otherwise +- * PTP_CLASS_V1_IPV{4,6}, PTP_CLASS_V2_IPV{4,6} or +- * PTP_CLASS_V2_{L2,VLAN}, depending on the packet content. +- */ +-unsigned int ptp_classify_raw(const struct sk_buff *skb); ++#define OP_AND (BPF_ALU | BPF_AND | BPF_K) ++#define OP_JEQ (BPF_JMP | BPF_JEQ | BPF_K) ++#define OP_JSET (BPF_JMP | BPF_JSET | BPF_K) ++#define OP_LDB (BPF_LD | BPF_B | BPF_ABS) ++#define OP_LDH (BPF_LD | BPF_H | BPF_ABS) ++#define OP_LDHI (BPF_LD | BPF_H | BPF_IND) ++#define OP_LDX (BPF_LDX | BPF_B | BPF_MSH) ++#define OP_OR (BPF_ALU | BPF_OR | BPF_K) ++#define OP_RETA (BPF_RET | BPF_A) ++#define OP_RETK (BPF_RET | BPF_K) + +-void __init ptp_classifier_init(void); +-#else +-static inline void ptp_classifier_init(void) ++static inline int ptp_filter_init(struct sock_filter *f, int len) + { ++ if (OP_LDH == f[0].code) ++ return sk_chk_filter(f, len); ++ else ++ return 0; + } ++ ++#define PTP_FILTER \ ++ {OP_LDH, 0, 0, OFF_ETYPE }, /* */ \ ++ {OP_JEQ, 0, 12, ETH_P_IP }, /* f goto L20 */ \ ++ {OP_LDB, 0, 0, OFF_PROTO4 }, /* */ \ ++ {OP_JEQ, 0, 9, IPPROTO_UDP }, /* f goto L10 */ \ ++ {OP_LDH, 0, 0, OFF_FRAG }, /* */ \ ++ {OP_JSET, 7, 0, 0x1fff }, /* t goto L11 */ \ ++ {OP_LDX, 0, 0, OFF_IHL }, /* */ \ ++ {OP_LDHI, 0, 0, RELOFF_DST4 }, /* */ \ ++ {OP_JEQ, 0, 4, PTP_EV_PORT }, /* f goto L12 */ \ ++ {OP_LDHI, 0, 0, ETH_HLEN + UDP_HLEN }, /* */ \ ++ {OP_AND, 0, 0, PTP_CLASS_VMASK }, /* */ \ ++ {OP_OR, 0, 0, PTP_CLASS_IPV4 }, /* */ \ ++ {OP_RETA, 0, 0, 0 }, /* */ \ ++/*L1x*/ {OP_RETK, 0, 0, PTP_CLASS_NONE }, /* */ \ ++/*L20*/ {OP_JEQ, 0, 9, ETH_P_IPV6 }, /* f goto L40 */ \ ++ {OP_LDB, 0, 0, ETH_HLEN + OFF_NEXT }, /* */ \ ++ {OP_JEQ, 0, 6, IPPROTO_UDP }, /* f goto L30 */ \ ++ {OP_LDH, 0, 0, OFF_DST6 }, /* */ \ ++ {OP_JEQ, 0, 4, PTP_EV_PORT }, /* f goto L31 */ \ ++ {OP_LDH, 0, 0, OFF_PTP6 }, /* */ \ ++ {OP_AND, 0, 0, PTP_CLASS_VMASK }, /* */ \ ++ {OP_OR, 0, 0, PTP_CLASS_IPV6 }, /* */ \ ++ {OP_RETA, 0, 0, 0 }, /* */ \ ++/*L3x*/ {OP_RETK, 0, 0, PTP_CLASS_NONE }, /* */ \ ++/*L40*/ {OP_JEQ, 0, 9, ETH_P_8021Q }, /* f goto L50 */ \ ++ {OP_LDH, 0, 0, OFF_ETYPE + 4 }, /* */ \ ++ {OP_JEQ, 0, 15, ETH_P_1588 }, /* f goto L60 */ \ ++ {OP_LDB, 0, 0, ETH_HLEN + VLAN_HLEN }, /* */ \ ++ {OP_AND, 0, 0, PTP_GEN_BIT }, /* */ \ ++ {OP_JEQ, 0, 12, 0 }, /* f goto L6x */ \ ++ {OP_LDH, 0, 0, ETH_HLEN + VLAN_HLEN }, /* */ \ ++ {OP_AND, 0, 0, PTP_CLASS_VMASK }, /* */ \ ++ {OP_OR, 0, 0, PTP_CLASS_VLAN }, /* */ \ ++ {OP_RETA, 0, 0, 0 }, /* */ \ ++/*L50*/ {OP_JEQ, 0, 7, ETH_P_1588 }, /* f goto L61 */ \ ++ {OP_LDB, 0, 0, ETH_HLEN }, /* */ \ ++ {OP_AND, 0, 0, PTP_GEN_BIT }, /* */ \ ++ {OP_JEQ, 0, 4, 0 }, /* f goto L6x */ \ ++ {OP_LDH, 0, 0, ETH_HLEN }, /* */ \ ++ {OP_AND, 0, 0, PTP_CLASS_VMASK }, /* */ \ ++ {OP_OR, 0, 0, PTP_CLASS_L2 }, /* */ \ ++ {OP_RETA, 0, 0, 0 }, /* */ \ ++/*L6x*/ {OP_RETK, 0, 0, PTP_CLASS_NONE }, ++ + #endif +-#endif /* _PTP_CLASSIFY_H_ */ diff --git a/include/linux/quota.h b/include/linux/quota.h -index cc7494a..1e27036 100644 +index 0f3c5d3..bc559e3 100644 --- a/include/linux/quota.h +++ b/include/linux/quota.h @@ -70,7 +70,7 @@ struct kqid { /* Type in which we store the quota identifier */ @@ -81908,7 +85580,7 @@ index cc7494a..1e27036 100644 extern bool qid_valid(struct kqid qid); diff --git a/include/linux/random.h b/include/linux/random.h -index 57fbbff..2331f3f 100644 +index 57fbbff..2170304 100644 --- a/include/linux/random.h +++ b/include/linux/random.h @@ -9,9 +9,19 @@ @@ -81958,6 +85630,15 @@ index 57fbbff..2331f3f 100644 /** * prandom_u32_max - returns a pseudo-random number in interval [0, ep_ro) * @ep_ro: right open interval endpoint +@@ -49,7 +64,7 @@ void prandom_bytes_state(struct rnd_state *state, void *buf, int nbytes); + * + * Returns: pseudo-random number in interval [0, ep_ro) + */ +-static inline u32 prandom_u32_max(u32 ep_ro) ++static inline u32 __intentional_overflow(-1) prandom_u32_max(u32 ep_ro) + { + return (u32)(((u64) prandom_u32() * ep_ro) >> 32); + } diff --git a/include/linux/rbtree_augmented.h b/include/linux/rbtree_augmented.h index fea49b5..2ac22bb 100644 --- a/include/linux/rbtree_augmented.h @@ -82112,10 +85793,10 @@ index 6bda06f..bf39a9b 100644 #define RIO_RESOURCE_MEM 0x00000100 #define RIO_RESOURCE_DOORBELL 0x00000200 diff --git a/include/linux/rmap.h b/include/linux/rmap.h -index b66c211..13d2915 100644 +index be57450..31cf65e 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) +@@ -144,8 +144,8 @@ static inline void anon_vma_unlock_read(struct anon_vma *anon_vma) void anon_vma_init(void); /* create anon_vma_cachep */ int anon_vma_prepare(struct vm_area_struct *); void unlink_anon_vmas(struct vm_area_struct *); @@ -82152,7 +85833,7 @@ index a964f72..b475afb 100644 } diff --git a/include/linux/sched.h b/include/linux/sched.h -index 221b2bd..e2e5f82 100644 +index 0376b05..82054c2 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -131,6 +131,7 @@ struct fs_struct; @@ -82163,7 +85844,7 @@ index 221b2bd..e2e5f82 100644 #define VMACACHE_BITS 2 #define VMACACHE_SIZE (1U << VMACACHE_BITS) -@@ -380,7 +381,7 @@ extern char __sched_text_start[], __sched_text_end[]; +@@ -374,7 +375,7 @@ extern char __sched_text_start[], __sched_text_end[]; extern int in_sched_functions(unsigned long addr); #define MAX_SCHEDULE_TIMEOUT LONG_MAX @@ -82172,7 +85853,7 @@ index 221b2bd..e2e5f82 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); -@@ -391,6 +392,19 @@ struct nsproxy; +@@ -385,6 +386,19 @@ struct nsproxy; struct user_namespace; #ifdef CONFIG_MMU @@ -82192,7 +85873,7 @@ index 221b2bd..e2e5f82 100644 extern void arch_pick_mmap_layout(struct mm_struct *mm); extern unsigned long arch_get_unmapped_area(struct file *, unsigned long, unsigned long, -@@ -688,6 +702,17 @@ struct signal_struct { +@@ -682,6 +696,17 @@ struct signal_struct { #ifdef CONFIG_TASKSTATS struct taskstats *stats; #endif @@ -82210,7 +85891,7 @@ index 221b2bd..e2e5f82 100644 #ifdef CONFIG_AUDIT unsigned audit_tty; unsigned audit_tty_log_passwd; -@@ -714,7 +739,7 @@ struct signal_struct { +@@ -708,7 +733,7 @@ struct signal_struct { struct mutex cred_guard_mutex; /* guard against foreign influences on * credential calculations * (notably. ptrace) */ @@ -82219,7 +85900,7 @@ index 221b2bd..e2e5f82 100644 /* * Bits in flags field of signal_struct. -@@ -768,6 +793,14 @@ struct user_struct { +@@ -761,6 +786,14 @@ struct user_struct { struct key *session_keyring; /* UID's default session keyring */ #endif @@ -82234,7 +85915,7 @@ index 221b2bd..e2e5f82 100644 /* Hash table maintenance information */ struct hlist_node uidhash_node; kuid_t uid; -@@ -775,7 +808,7 @@ struct user_struct { +@@ -768,7 +801,7 @@ struct user_struct { #ifdef CONFIG_PERF_EVENTS atomic_long_t locked_vm; #endif @@ -82243,7 +85924,7 @@ index 221b2bd..e2e5f82 100644 extern int uids_sysfs_init(void); -@@ -1179,6 +1212,9 @@ enum perf_event_task_context { +@@ -1224,6 +1257,9 @@ enum perf_event_task_context { struct task_struct { volatile long state; /* -1 unrunnable, 0 runnable, >0 stopped */ void *stack; @@ -82253,7 +85934,7 @@ index 221b2bd..e2e5f82 100644 atomic_t usage; unsigned int flags; /* per process flags, defined below */ unsigned int ptrace; -@@ -1304,8 +1340,8 @@ struct task_struct { +@@ -1349,8 +1385,8 @@ struct task_struct { struct list_head thread_node; struct completion *vfork_done; /* for vfork() */ @@ -82264,7 +85945,7 @@ index 221b2bd..e2e5f82 100644 cputime_t utime, stime, utimescaled, stimescaled; cputime_t gtime; -@@ -1330,11 +1366,6 @@ struct task_struct { +@@ -1375,11 +1411,6 @@ struct task_struct { struct task_cputime cputime_expires; struct list_head cpu_timers[3]; @@ -82276,7 +85957,7 @@ index 221b2bd..e2e5f82 100644 char comm[TASK_COMM_LEN]; /* executable name excluding path - access with [gs]et_task_comm (which lock it with task_lock()) -@@ -1351,6 +1382,10 @@ struct task_struct { +@@ -1396,6 +1427,10 @@ struct task_struct { #endif /* CPU-specific state of this task */ struct thread_struct thread; @@ -82287,7 +85968,7 @@ index 221b2bd..e2e5f82 100644 /* filesystem information */ struct fs_struct *fs; /* open file information */ -@@ -1427,6 +1462,10 @@ struct task_struct { +@@ -1472,6 +1507,10 @@ struct task_struct { gfp_t lockdep_reclaim_gfp; #endif @@ -82298,7 +85979,7 @@ index 221b2bd..e2e5f82 100644 /* journalling filesystem info */ void *journal_info; -@@ -1465,6 +1504,10 @@ struct task_struct { +@@ -1510,6 +1549,10 @@ struct task_struct { /* cg_list protected by css_set_lock and tsk->alloc_lock */ struct list_head cg_list; #endif @@ -82309,7 +85990,7 @@ index 221b2bd..e2e5f82 100644 #ifdef CONFIG_FUTEX struct robust_list_head __user *robust_list; #ifdef CONFIG_COMPAT -@@ -1610,7 +1653,78 @@ struct task_struct { +@@ -1655,7 +1698,78 @@ struct task_struct { unsigned int sequential_io; unsigned int sequential_io_avg; #endif @@ -82389,7 +86070,7 @@ index 221b2bd..e2e5f82 100644 /* Future-safe accessor for struct task_struct's cpus_allowed. */ #define tsk_cpus_allowed(tsk) (&(tsk)->cpus_allowed) -@@ -1692,7 +1806,7 @@ struct pid_namespace; +@@ -1737,7 +1851,7 @@ struct pid_namespace; pid_t __task_pid_nr_ns(struct task_struct *task, enum pid_type type, struct pid_namespace *ns); @@ -82398,7 +86079,7 @@ index 221b2bd..e2e5f82 100644 { return tsk->pid; } -@@ -2039,6 +2153,25 @@ extern u64 sched_clock_cpu(int cpu); +@@ -2084,6 +2198,25 @@ extern u64 sched_clock_cpu(int cpu); extern void sched_clock_init(void); @@ -82424,7 +86105,7 @@ index 221b2bd..e2e5f82 100644 #ifndef CONFIG_HAVE_UNSTABLE_SCHED_CLOCK static inline void sched_clock_tick(void) { -@@ -2172,7 +2305,9 @@ void yield(void); +@@ -2217,7 +2350,9 @@ void yield(void); extern struct exec_domain default_exec_domain; union thread_union { @@ -82434,7 +86115,7 @@ index 221b2bd..e2e5f82 100644 unsigned long stack[THREAD_SIZE/sizeof(long)]; }; -@@ -2205,6 +2340,7 @@ extern struct pid_namespace init_pid_ns; +@@ -2250,6 +2385,7 @@ extern struct pid_namespace init_pid_ns; */ extern struct task_struct *find_task_by_vpid(pid_t nr); @@ -82442,16 +86123,16 @@ index 221b2bd..e2e5f82 100644 extern struct task_struct *find_task_by_pid_ns(pid_t nr, struct pid_namespace *ns); -@@ -2367,7 +2503,7 @@ extern void __cleanup_sighand(struct sighand_struct *); +@@ -2412,7 +2548,7 @@ extern void __cleanup_sighand(struct sighand_struct *); extern void exit_itimers(struct signal_struct *); extern void flush_itimer_signals(void); -extern void do_group_exit(int); +extern __noreturn void do_group_exit(int); - extern int allow_signal(int); - extern int disallow_signal(int); -@@ -2568,9 +2704,9 @@ static inline unsigned long *end_of_stack(struct task_struct *p) + extern int do_execve(struct filename *, + const char __user * const __user *, +@@ -2614,9 +2750,9 @@ static inline unsigned long *end_of_stack(struct task_struct *p) #endif @@ -82464,10 +86145,10 @@ index 221b2bd..e2e5f82 100644 return (obj >= stack) && (obj < (stack + THREAD_SIZE)); } diff --git a/include/linux/sched/sysctl.h b/include/linux/sched/sysctl.h -index 8045a55..c959cd5 100644 +index 596a0e0..bea77ec 100644 --- a/include/linux/sched/sysctl.h +++ b/include/linux/sched/sysctl.h -@@ -30,6 +30,7 @@ enum { sysctl_hung_task_timeout_secs = 0 }; +@@ -34,6 +34,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; @@ -82475,8 +86156,20 @@ index 8045a55..c959cd5 100644 extern unsigned int sysctl_sched_latency; extern unsigned int sysctl_sched_min_granularity; +diff --git a/include/linux/seccomp.h b/include/linux/seccomp.h +index 4054b09..6f19cfd 100644 +--- a/include/linux/seccomp.h ++++ b/include/linux/seccomp.h +@@ -76,6 +76,7 @@ static inline int seccomp_mode(struct seccomp *s) + #ifdef CONFIG_SECCOMP_FILTER + extern void put_seccomp_filter(struct task_struct *tsk); + extern void get_seccomp_filter(struct task_struct *tsk); ++extern u32 seccomp_bpf_load(int off); + #else /* CONFIG_SECCOMP_FILTER */ + static inline void put_seccomp_filter(struct task_struct *tsk) + { diff --git a/include/linux/security.h b/include/linux/security.h -index 6478ce3..5e6ad6e 100644 +index 9c6b972..7e7c704 100644 --- a/include/linux/security.h +++ b/include/linux/security.h @@ -27,6 +27,7 @@ @@ -82557,10 +86250,10 @@ index 52e0097..383f21d 100644 int single_release(struct inode *, struct file *); void *__seq_open_private(struct file *, const struct seq_operations *, int); diff --git a/include/linux/shm.h b/include/linux/shm.h -index 1e2cd2e..0288750 100644 +index 57d7770..0936af6 100644 --- a/include/linux/shm.h +++ b/include/linux/shm.h -@@ -21,6 +21,10 @@ struct shmid_kernel /* private to the kernel */ +@@ -20,6 +20,10 @@ struct shmid_kernel /* private to the kernel */ /* The task created the shm object. NULL if the task is dead. */ struct task_struct *shm_creator; @@ -82571,11 +86264,24 @@ index 1e2cd2e..0288750 100644 }; /* shm_mode upper byte flags */ +diff --git a/include/linux/signal.h b/include/linux/signal.h +index c9e6536..923b302 100644 +--- a/include/linux/signal.h ++++ b/include/linux/signal.h +@@ -293,7 +293,7 @@ static inline void allow_signal(int sig) + * know it'll be handled, so that they don't get converted to + * SIGKILL or just silently dropped. + */ +- kernel_sigaction(sig, (__force __sighandler_t)2); ++ kernel_sigaction(sig, (__force_user __sighandler_t)2); + } + + static inline void disallow_signal(int sig) diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h -index 08074a8..e2ae280 100644 +index ec89301..4fd29a6 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h -@@ -717,7 +717,7 @@ bool skb_try_coalesce(struct sk_buff *to, struct sk_buff *from, +@@ -725,7 +725,7 @@ bool skb_try_coalesce(struct sk_buff *to, struct sk_buff *from, struct sk_buff *__alloc_skb(unsigned int size, gfp_t priority, int flags, int node); struct sk_buff *build_skb(void *data, unsigned int frag_size); @@ -82584,7 +86290,7 @@ index 08074a8..e2ae280 100644 gfp_t priority) { return __alloc_skb(size, priority, 0, NUMA_NO_NODE); -@@ -1825,7 +1825,7 @@ static inline u32 skb_inner_network_header_len(const struct sk_buff *skb) +@@ -1839,7 +1839,7 @@ static inline u32 skb_inner_network_header_len(const struct sk_buff *skb) return skb->inner_transport_header - skb->inner_network_header; } @@ -82593,7 +86299,7 @@ index 08074a8..e2ae280 100644 { return skb_network_header(skb) - skb->data; } -@@ -1885,7 +1885,7 @@ static inline int pskb_network_may_pull(struct sk_buff *skb, unsigned int len) +@@ -1911,7 +1911,7 @@ static inline void skb_pop_rcv_encapsulation(struct sk_buff *skb) * NET_IP_ALIGN(2) + ethernet_header(14) + IP_header(20/40) + ports(8) */ #ifndef NET_SKB_PAD @@ -82602,7 +86308,7 @@ index 08074a8..e2ae280 100644 #endif int ___pskb_trim(struct sk_buff *skb, unsigned int len); -@@ -2484,7 +2484,7 @@ struct sk_buff *skb_recv_datagram(struct sock *sk, unsigned flags, int noblock, +@@ -2518,7 +2518,7 @@ struct sk_buff *skb_recv_datagram(struct sock *sk, unsigned flags, int noblock, int *err); unsigned int datagram_poll(struct file *file, struct socket *sock, struct poll_table_struct *wait); @@ -82611,7 +86317,16 @@ index 08074a8..e2ae280 100644 struct iovec *to, int size); int skb_copy_and_csum_datagram_iovec(struct sk_buff *skb, int hlen, struct iovec *iov); -@@ -2776,6 +2776,9 @@ static inline void nf_reset(struct sk_buff *skb) +@@ -2664,6 +2664,8 @@ static inline ktime_t net_invalid_timestamp(void) + return ktime_set(0, 0); + } + ++void skb_timestamping_init(void); ++ + #ifdef CONFIG_NETWORK_PHY_TIMESTAMPING + + void skb_clone_tx_timestamp(struct sk_buff *skb); +@@ -2907,6 +2909,9 @@ static inline void nf_reset(struct sk_buff *skb) nf_bridge_put(skb->nf_bridge); skb->nf_bridge = NULL; #endif @@ -82622,7 +86337,7 @@ index 08074a8..e2ae280 100644 static inline void nf_reset_trace(struct sk_buff *skb) diff --git a/include/linux/slab.h b/include/linux/slab.h -index 307bfbe..a999cf3 100644 +index 1d9abb7..b1e8b10 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h @@ -14,15 +14,29 @@ @@ -82673,7 +86388,7 @@ index 307bfbe..a999cf3 100644 #include -@@ -142,6 +159,8 @@ void * __must_check krealloc(const void *, size_t, gfp_t); +@@ -144,6 +161,8 @@ void * __must_check krealloc(const void *, size_t, gfp_t); void kfree(const void *); void kzfree(const void *); size_t ksize(const void *); @@ -82682,7 +86397,7 @@ index 307bfbe..a999cf3 100644 /* * Some archs want to perform DMA into kmalloc caches and need a guaranteed -@@ -174,7 +193,7 @@ struct kmem_cache { +@@ -176,7 +195,7 @@ struct kmem_cache { unsigned int align; /* Alignment as calculated */ unsigned long flags; /* Active flags on the slab */ const char *name; /* Slab name for sysfs */ @@ -82691,7 +86406,7 @@ index 307bfbe..a999cf3 100644 void (*ctor)(void *); /* Called on object slot creation */ struct list_head list; /* List of all slab caches on the system */ }; -@@ -259,6 +278,10 @@ extern struct kmem_cache *kmalloc_caches[KMALLOC_SHIFT_HIGH + 1]; +@@ -261,6 +280,10 @@ extern struct kmem_cache *kmalloc_caches[KMALLOC_SHIFT_HIGH + 1]; extern struct kmem_cache *kmalloc_dma_caches[KMALLOC_SHIFT_HIGH + 1]; #endif @@ -82702,7 +86417,7 @@ index 307bfbe..a999cf3 100644 /* * Figure out which kmalloc slab an allocation of a certain size * belongs to. -@@ -267,7 +290,7 @@ extern struct kmem_cache *kmalloc_dma_caches[KMALLOC_SHIFT_HIGH + 1]; +@@ -269,7 +292,7 @@ extern struct kmem_cache *kmalloc_dma_caches[KMALLOC_SHIFT_HIGH + 1]; * 2 = 120 .. 192 bytes * n = 2^(n-1) .. 2^n -1 */ @@ -82711,7 +86426,7 @@ index 307bfbe..a999cf3 100644 { if (!size) return 0; -@@ -310,11 +333,11 @@ static __always_inline int kmalloc_index(size_t size) +@@ -312,11 +335,11 @@ static __always_inline int kmalloc_index(size_t size) } #endif /* !CONFIG_SLOB */ @@ -82771,10 +86486,10 @@ index d82abd4..408c3a0 100644 int inuse; /* Offset to metadata */ int align; /* Alignment */ diff --git a/include/linux/smp.h b/include/linux/smp.h -index 633f5ed..6c3dc3f 100644 +index 34347f2..8739978 100644 --- a/include/linux/smp.h +++ b/include/linux/smp.h -@@ -176,7 +176,9 @@ static inline void kick_all_cpus_sync(void) { } +@@ -174,7 +174,9 @@ static inline void kick_all_cpus_sync(void) { } #endif #define get_cpu() ({ preempt_disable(); smp_processor_id(); }) @@ -82858,10 +86573,10 @@ index 70736b9..37f33db 100644 #ifdef __KERNEL__ diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h -index 04e7632..2e2a8a3 100644 +index 1bc7cd0..7912dc2 100644 --- a/include/linux/sunrpc/svc.h +++ b/include/linux/sunrpc/svc.h -@@ -412,7 +412,7 @@ struct svc_procedure { +@@ -417,7 +417,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 */ @@ -82871,7 +86586,7 @@ index 04e7632..2e2a8a3 100644 /* * Function prototypes. diff --git a/include/linux/sunrpc/svc_rdma.h b/include/linux/sunrpc/svc_rdma.h -index 0b8e3e6..33e0a01 100644 +index 5cf99a0..c0a1b98 100644 --- a/include/linux/sunrpc/svc_rdma.h +++ b/include/linux/sunrpc/svc_rdma.h @@ -53,15 +53,15 @@ extern unsigned int svcrdma_ord; @@ -82913,7 +86628,7 @@ index 8d71d65..f79586e 100644 #define SVC_GARBAGE 1 #define SVC_SYSERR 2 diff --git a/include/linux/swiotlb.h b/include/linux/swiotlb.h -index a5ffd32..0935dea 100644 +index e7a018e..49f8b17 100644 --- a/include/linux/swiotlb.h +++ b/include/linux/swiotlb.h @@ -60,7 +60,8 @@ extern void @@ -82927,7 +86642,7 @@ index a5ffd32..0935dea 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 a4a0588..752870e 100644 +index b0881a0..559a440 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h @@ -98,10 +98,16 @@ struct sigaltstack; @@ -83018,7 +86733,7 @@ index 14a8ff2..fa95f3a 100644 struct ctl_node { struct rb_node node; diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h -index 5ffaa34..fe3e31c 100644 +index f97d0db..c1187dc 100644 --- a/include/linux/sysfs.h +++ b/include/linux/sysfs.h @@ -34,7 +34,8 @@ struct attribute { @@ -83073,10 +86788,10 @@ index 387fa7d..3fcde6b 100644 #ifdef CONFIG_MAGIC_SYSRQ diff --git a/include/linux/thread_info.h b/include/linux/thread_info.h -index fddbe20..a0e76ab 100644 +index ff307b5..f1a4468 100644 --- a/include/linux/thread_info.h +++ b/include/linux/thread_info.h -@@ -161,6 +161,13 @@ static inline bool test_and_clear_restore_sigmask(void) +@@ -145,6 +145,13 @@ static inline bool test_and_clear_restore_sigmask(void) #error "no set_restore_sigmask() provided and default one won't work" #endif @@ -83144,10 +86859,10 @@ index 756a609..89db85e 100644 extern struct list_head tty_drivers; diff --git a/include/linux/tty_ldisc.h b/include/linux/tty_ldisc.h -index add26da..22c00bef 100644 +index 00c9d68..bc0188b 100644 --- a/include/linux/tty_ldisc.h +++ b/include/linux/tty_ldisc.h -@@ -212,7 +212,7 @@ struct tty_ldisc_ops { +@@ -215,7 +215,7 @@ struct tty_ldisc_ops { struct module *owner; @@ -83157,10 +86872,10 @@ index add26da..22c00bef 100644 struct tty_ldisc { diff --git a/include/linux/types.h b/include/linux/types.h -index 4d118ba..c3ee9bf 100644 +index a0bb704..f511c77 100644 --- a/include/linux/types.h +++ b/include/linux/types.h -@@ -176,10 +176,26 @@ typedef struct { +@@ -177,10 +177,26 @@ typedef struct { int counter; } atomic_t; @@ -83272,10 +86987,10 @@ index 99c1b4d..562e6f3 100644 static inline void put_unaligned_le16(u16 val, void *p) diff --git a/include/linux/usb.h b/include/linux/usb.h -index 6b7ec37..4428419 100644 +index d2465bc..5256de4 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h -@@ -569,7 +569,7 @@ struct usb_device { +@@ -571,7 +571,7 @@ struct usb_device { int maxchild; u32 quirks; @@ -83284,7 +86999,7 @@ index 6b7ec37..4428419 100644 unsigned long active_duration; -@@ -1653,7 +1653,7 @@ void usb_buffer_unmap_sg(const struct usb_device *dev, int is_in, +@@ -1655,7 +1655,7 @@ void usb_buffer_unmap_sg(const struct usb_device *dev, int is_in, extern int usb_control_msg(struct usb_device *dev, unsigned int pipe, __u8 request, __u8 requesttype, __u16 value, __u16 index, @@ -83443,10 +87158,10 @@ index 4b8a891..e9a2863 100644 /* * Internals. Dont't use.. diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h -index 45c9cd1..20bd0bf 100644 +index 82e7db7..f8ce3d0 100644 --- a/include/linux/vmstat.h +++ b/include/linux/vmstat.h -@@ -102,18 +102,18 @@ static inline void vm_events_fold_cpu(int cpu) +@@ -108,18 +108,18 @@ static inline void vm_events_fold_cpu(int cpu) /* * Zone based page accounting with per cpu differentials. */ @@ -83470,7 +87185,7 @@ index 45c9cd1..20bd0bf 100644 #ifdef CONFIG_SMP if (x < 0) x = 0; -@@ -121,10 +121,10 @@ static inline unsigned long global_page_state(enum zone_stat_item item) +@@ -127,10 +127,10 @@ static inline unsigned long global_page_state(enum zone_stat_item item) return x; } @@ -83483,7 +87198,7 @@ index 45c9cd1..20bd0bf 100644 #ifdef CONFIG_SMP if (x < 0) x = 0; -@@ -141,7 +141,7 @@ static inline unsigned long zone_page_state(struct zone *zone, +@@ -147,7 +147,7 @@ static inline unsigned long zone_page_state(struct zone *zone, static inline unsigned long zone_page_state_snapshot(struct zone *zone, enum zone_stat_item item) { @@ -83492,7 +87207,7 @@ index 45c9cd1..20bd0bf 100644 #ifdef CONFIG_SMP int cpu; -@@ -228,14 +228,14 @@ static inline void __mod_zone_page_state(struct zone *zone, +@@ -234,14 +234,14 @@ static inline void __mod_zone_page_state(struct zone *zone, static inline void __inc_zone_state(struct zone *zone, enum zone_stat_item item) { @@ -83569,7 +87284,7 @@ index eec6e46..82d5641 100644 /* * Newer version of video_device, handled by videodev2.c diff --git a/include/media/v4l2-device.h b/include/media/v4l2-device.h -index c9b1593..a572459 100644 +index ffb69da..040393e 100644 --- a/include/media/v4l2-device.h +++ b/include/media/v4l2-device.h @@ -95,7 +95,7 @@ int __must_check v4l2_device_register(struct device *dev, struct v4l2_device *v4 @@ -83696,42 +87411,31 @@ index 7a43138..bc76865 100644 /** inet_connection_sock - INET connection oriented sock * diff --git a/include/net/inetpeer.h b/include/net/inetpeer.h -index 058271b..1a44af7 100644 +index 01d590e..f69c61d 100644 --- a/include/net/inetpeer.h +++ b/include/net/inetpeer.h -@@ -47,8 +47,8 @@ struct inet_peer { +@@ -47,7 +47,7 @@ struct inet_peer { */ union { struct { - atomic_t rid; /* Frag reception counter */ -- atomic_t ip_id_count; /* IP ID for the next packet */ + atomic_unchecked_t rid; /* Frag reception counter */ -+ atomic_unchecked_t ip_id_count; /* IP ID for the next packet */ }; struct rcu_head rcu; struct inet_peer *gc_next; -@@ -179,7 +179,7 @@ static inline int inet_getid(struct inet_peer *p, int more) - { - more++; - inet_peer_refcheck(p); -- return atomic_add_return(more, &p->ip_id_count) - more; -+ return atomic_add_return_unchecked(more, &p->ip_id_count) - more; - } - - #endif /* _NET_INETPEER_H */ diff --git a/include/net/ip.h b/include/net/ip.h -index 3ec2b0f..72435b6 100644 +index 7596eb2..f7f5fad 100644 --- a/include/net/ip.h +++ b/include/net/ip.h -@@ -220,7 +220,7 @@ static inline void snmp_mib_free(void __percpu *ptr[SNMP_ARRAY_SZ]) +@@ -309,7 +309,7 @@ static inline unsigned int ip_skb_dst_mtu(const struct sk_buff *skb) + } + } - void inet_get_local_port_range(struct net *net, int *low, int *high); +-u32 ip_idents_reserve(u32 hash, int segs); ++u32 ip_idents_reserve(u32 hash, int segs) __intentional_overflow(-1); + void __ip_select_ident(struct iphdr *iph, int segs); --extern unsigned long *sysctl_local_reserved_ports; -+extern unsigned long sysctl_local_reserved_ports[65536 / 8 / sizeof(unsigned long)]; - static inline int inet_is_reserved_local_port(int port) - { - return test_bit(port, sysctl_local_reserved_ports); + static inline void ip_select_ident_segs(struct sk_buff *skb, struct sock *sk, int segs) diff --git a/include/net/ip_fib.h b/include/net/ip_fib.h index 9922093..a1755d6 100644 --- a/include/net/ip_fib.h @@ -83746,7 +87450,7 @@ index 9922093..a1755d6 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 5679d92..2e7a690 100644 +index 624a8a5..b1e2a24 100644 --- a/include/net/ip_vs.h +++ b/include/net/ip_vs.h @@ -558,7 +558,7 @@ struct ip_vs_conn { @@ -83874,20 +87578,20 @@ index 567c681..cd73ac02 100644 struct llc_sap_state { u8 curr_state; diff --git a/include/net/mac80211.h b/include/net/mac80211.h -index 8248e39..7610eec 100644 +index 421b6ec..5a03729 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h -@@ -4467,7 +4467,7 @@ struct rate_control_ops { - void (*add_sta_debugfs)(void *priv, void *priv_sta, - struct dentry *dir); +@@ -4588,7 +4588,7 @@ struct rate_control_ops { void (*remove_sta_debugfs)(void *priv, void *priv_sta); + + u32 (*get_expected_throughput)(void *priv_sta); -}; +} __do_const; 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 7277caf..fd095bc 100644 +index 47f4254..fd095bc 100644 --- a/include/net/neighbour.h +++ b/include/net/neighbour.h @@ -163,7 +163,7 @@ struct neigh_ops { @@ -83899,15 +87603,7 @@ index 7277caf..fd095bc 100644 struct pneigh_entry { struct pneigh_entry *next; -@@ -203,7 +203,6 @@ struct neigh_table { - void (*proxy_redo)(struct sk_buff *skb); - char *id; - struct neigh_parms parms; -- /* HACK. gc_* should follow parms without a gap! */ - int gc_interval; - int gc_thresh1; - int gc_thresh2; -@@ -218,7 +217,7 @@ struct neigh_table { +@@ -217,7 +217,7 @@ struct neigh_table { struct neigh_statistics __percpu *stats; struct neigh_hash_table __rcu *nht; struct pneigh_entry **phash_buckets; @@ -83917,7 +87613,7 @@ index 7277caf..fd095bc 100644 static inline int neigh_parms_family(struct neigh_parms *p) { diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h -index 5f9eb26..85699c4 100644 +index 361d260..903d15f 100644 --- a/include/net/net_namespace.h +++ b/include/net/net_namespace.h @@ -129,8 +129,8 @@ struct net { @@ -83980,7 +87676,7 @@ index 5f9eb26..85699c4 100644 } #else static inline int rt_genid_ipv6(struct net *net) -@@ -382,12 +386,12 @@ static inline void rt_genid_bump_all(struct net *net) +@@ -390,12 +394,12 @@ static inline void rt_genid_bump_all(struct net *net) static inline int fnhe_genid(struct net *net) { @@ -84048,19 +87744,19 @@ index 773cce3..6a11852 100644 }; diff --git a/include/net/netns/ipv4.h b/include/net/netns/ipv4.h -index b2704fd0..421d717 100644 +index aec5e12..807233f 100644 --- a/include/net/netns/ipv4.h +++ b/include/net/netns/ipv4.h -@@ -79,7 +79,7 @@ struct netns_ipv4 { +@@ -82,7 +82,7 @@ struct netns_ipv4 { struct ping_group_range ping_group_range; - atomic_t dev_addr_genid; + atomic_unchecked_t dev_addr_genid; - #ifdef CONFIG_IP_MROUTE - #ifndef CONFIG_IP_MROUTE_MULTIPLE_TABLES -@@ -89,6 +89,6 @@ struct netns_ipv4 { + #ifdef CONFIG_SYSCTL + unsigned long *sysctl_local_reserved_ports; +@@ -96,6 +96,6 @@ struct netns_ipv4 { struct fib_rules_ops *mr_rules_ops; #endif #endif @@ -84069,10 +87765,10 @@ index b2704fd0..421d717 100644 }; #endif diff --git a/include/net/netns/ipv6.h b/include/net/netns/ipv6.h -index 21edaf1..4c5faae 100644 +index 19d3446..3c87195 100644 --- a/include/net/netns/ipv6.h +++ b/include/net/netns/ipv6.h -@@ -73,8 +73,8 @@ struct netns_ipv6 { +@@ -74,8 +74,8 @@ struct netns_ipv6 { struct fib_rules_ops *mr6_rules_ops; #endif #endif @@ -84110,7 +87806,7 @@ index 026479b..d9b2829 100644 struct pingfakehdr { diff --git a/include/net/protocol.h b/include/net/protocol.h -index a7e986b..dc67bce 100644 +index d6fcc1f..ca277058 100644 --- a/include/net/protocol.h +++ b/include/net/protocol.h @@ -49,7 +49,7 @@ struct net_protocol { @@ -84182,7 +87878,7 @@ index 7f4eeb3..37e8fe1 100644 /* Get the size of a DATA chunk payload. */ diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h -index 0dfcc92..7967849 100644 +index f38588bf..94c1795 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h @@ -507,7 +507,7 @@ struct sctp_pf { @@ -84195,10 +87891,10 @@ index 0dfcc92..7967849 100644 /* Structure to track chunk fragments that have been acked, but peer diff --git a/include/net/sock.h b/include/net/sock.h -index 21569cf..dd60300 100644 +index 1563507..20d5d0e 100644 --- a/include/net/sock.h +++ b/include/net/sock.h -@@ -348,7 +348,7 @@ struct sock { +@@ -349,7 +349,7 @@ struct sock { unsigned int sk_napi_id; unsigned int sk_ll_usec; #endif @@ -84207,7 +87903,7 @@ index 21569cf..dd60300 100644 int sk_rcvbuf; struct sk_filter __rcu *sk_filter; -@@ -1036,7 +1036,7 @@ struct proto { +@@ -1038,7 +1038,7 @@ struct proto { void (*destroy_cgroup)(struct mem_cgroup *memcg); struct cg_proto *(*proto_cgroup)(struct mem_cgroup *memcg); #endif @@ -84216,7 +87912,7 @@ index 21569cf..dd60300 100644 /* * Bits in struct cg_proto.flags -@@ -1223,7 +1223,7 @@ static inline u64 memcg_memory_allocated_read(struct cg_proto *prot) +@@ -1225,7 +1225,7 @@ static inline u64 memcg_memory_allocated_read(struct cg_proto *prot) return ret >> PAGE_SHIFT; } @@ -84225,7 +87921,7 @@ index 21569cf..dd60300 100644 sk_memory_allocated(const struct sock *sk) { struct proto *prot = sk->sk_prot; -@@ -1368,7 +1368,7 @@ struct sock_iocb { +@@ -1370,7 +1370,7 @@ struct sock_iocb { struct scm_cookie *scm; struct msghdr *msg, async_msg; struct kiocb *kiocb; @@ -84234,18 +87930,41 @@ index 21569cf..dd60300 100644 static inline struct sock_iocb *kiocb_to_siocb(struct kiocb *iocb) { -@@ -1728,8 +1728,8 @@ sk_dst_get(struct sock *sk) +@@ -1623,6 +1623,33 @@ void sk_common_release(struct sock *sk); + /* Initialise core socket variables */ + void sock_init_data(struct socket *sock, struct sock *sk); - rcu_read_lock(); - dst = rcu_dereference(sk->sk_dst_cache); -- if (dst) -- dst_hold(dst); -+ if (dst && !atomic_inc_not_zero(&dst->__refcnt)) -+ dst = NULL; - rcu_read_unlock(); - return dst; - } -@@ -1803,7 +1803,7 @@ static inline void sk_nocaps_add(struct sock *sk, netdev_features_t flags) ++void sk_filter_release_rcu(struct rcu_head *rcu); ++ ++/** ++ * sk_filter_release - release a socket filter ++ * @fp: filter to remove ++ * ++ * Remove a filter from a socket and release its resources. ++ */ ++ ++static inline void sk_filter_release(struct sk_filter *fp) ++{ ++ if (atomic_dec_and_test(&fp->refcnt)) ++ call_rcu(&fp->rcu, sk_filter_release_rcu); ++} ++ ++static inline void sk_filter_uncharge(struct sock *sk, struct sk_filter *fp) ++{ ++ atomic_sub(sk_filter_size(fp->len), &sk->sk_omem_alloc); ++ sk_filter_release(fp); ++} ++ ++static inline void sk_filter_charge(struct sock *sk, struct sk_filter *fp) ++{ ++ atomic_inc(&fp->refcnt); ++ atomic_add(sk_filter_size(fp->len), &sk->sk_omem_alloc); ++} ++ + /* + * Socket reference counting postulates. + * +@@ -1805,7 +1832,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, @@ -84254,7 +87973,7 @@ index 21569cf..dd60300 100644 int copy, int offset) { if (skb->ip_summed == CHECKSUM_NONE) { -@@ -2065,7 +2065,7 @@ static inline void sk_stream_moderate_sndbuf(struct sock *sk) +@@ -2067,7 +2094,7 @@ static inline void sk_stream_moderate_sndbuf(struct sock *sk) } } @@ -84264,19 +87983,19 @@ index 21569cf..dd60300 100644 /** * sk_page_frag - return an appropriate page_frag diff --git a/include/net/tcp.h b/include/net/tcp.h -index 87d8774..cf214f8 100644 +index 7286db8..f1aa7dc 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h -@@ -541,7 +541,7 @@ void tcp_retransmit_timer(struct sock *sk); +@@ -535,7 +535,7 @@ void tcp_retransmit_timer(struct sock *sk); void tcp_xmit_retransmit_queue(struct sock *); void tcp_simple_retransmit(struct sock *); int tcp_trim_head(struct sock *, struct sk_buff *, u32); --int tcp_fragment(struct sock *, struct sk_buff *, u32, unsigned int); -+int __intentional_overflow(3) tcp_fragment(struct sock *, struct sk_buff *, u32, unsigned int); +-int tcp_fragment(struct sock *, struct sk_buff *, u32, unsigned int, gfp_t); ++int __intentional_overflow(3) tcp_fragment(struct sock *, struct sk_buff *, u32, unsigned int, gfp_t); void tcp_send_probe0(struct sock *); void tcp_send_partial(struct sock *); -@@ -715,8 +715,8 @@ struct tcp_skb_cb { +@@ -708,8 +708,8 @@ struct tcp_skb_cb { struct inet6_skb_parm h6; #endif } header; /* For incoming frames */ @@ -84287,7 +88006,7 @@ index 87d8774..cf214f8 100644 __u32 when; /* used to compute rtt's */ __u8 tcp_flags; /* TCP header flags. (tcp[13]) */ -@@ -730,7 +730,7 @@ struct tcp_skb_cb { +@@ -723,7 +723,7 @@ struct tcp_skb_cb { __u8 ip_dsfield; /* IPv4 tos or IPv6 dsfield */ /* 1 byte hole */ @@ -84297,7 +88016,7 @@ index 87d8774..cf214f8 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 116e9c7..3070537 100644 +index 721e9c3b..3c81bbf 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h @@ -285,7 +285,6 @@ struct xfrm_dst; @@ -84344,7 +88063,7 @@ index 116e9c7..3070537 100644 u32 priority; u32 index; struct xfrm_mark mark; -@@ -1180,6 +1179,7 @@ static inline void xfrm_sk_free_policy(struct sock *sk) +@@ -1167,6 +1166,7 @@ static inline void xfrm_sk_free_policy(struct sock *sk) } void xfrm_garbage_collect(struct net *net); @@ -84352,7 +88071,7 @@ index 116e9c7..3070537 100644 #else -@@ -1218,6 +1218,9 @@ static inline int xfrm6_policy_check_reverse(struct sock *sk, int dir, +@@ -1205,6 +1205,9 @@ static inline int xfrm6_policy_check_reverse(struct sock *sk, int dir, static inline void xfrm_garbage_collect(struct net *net) { } @@ -84441,10 +88160,10 @@ index ae6c3b8..fd748ac 100644 /** * struct snd_compr: Compressed device diff --git a/include/sound/soc.h b/include/sound/soc.h -index 0b83168..d67280a 100644 +index ed9e2d7..aad0887 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h -@@ -782,7 +782,7 @@ struct snd_soc_codec_driver { +@@ -798,7 +798,7 @@ struct snd_soc_codec_driver { /* probe ordering - for components with runtime dependencies */ int probe_order; int remove_order; @@ -84453,7 +88172,7 @@ index 0b83168..d67280a 100644 /* SoC platform interface */ struct snd_soc_platform_driver { -@@ -828,7 +828,7 @@ struct snd_soc_platform_driver { +@@ -845,7 +845,7 @@ struct snd_soc_platform_driver { unsigned int (*read)(struct snd_soc_platform *, unsigned int); int (*write)(struct snd_soc_platform *, unsigned int, unsigned int); int (*bespoke_trigger)(struct snd_pcm_substream *, int); @@ -84799,10 +88518,10 @@ index 6d67213..552fdd9 100644 enum { diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h -index ea468ee..4d367a5 100644 +index 168ff50..a921df2 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h -@@ -1248,7 +1248,7 @@ struct v4l2_ext_control { +@@ -1253,7 +1253,7 @@ struct v4l2_ext_control { union { __s32 value; __s64 value64; @@ -84857,10 +88576,10 @@ index 30f5362..8ed8ac9 100644 void *pmi_pal; u8 *vbe_state_orig; /* diff --git a/init/Kconfig b/init/Kconfig -index 9d3585b..ad45d34 100644 +index 9d76b99..d378b1e 100644 --- a/init/Kconfig +++ b/init/Kconfig -@@ -1093,6 +1093,7 @@ endif # CGROUPS +@@ -1105,6 +1105,7 @@ endif # CGROUPS config CHECKPOINT_RESTORE bool "Checkpoint/restore support" if EXPERT @@ -84868,7 +88587,7 @@ index 9d3585b..ad45d34 100644 default n help Enables additional kernel features in a sake of checkpoint/restore. -@@ -1570,7 +1571,7 @@ config SLUB_DEBUG +@@ -1589,7 +1590,7 @@ config SLUB_DEBUG config COMPAT_BRK bool "Disable heap randomization" @@ -84877,7 +88596,7 @@ index 9d3585b..ad45d34 100644 help Randomizing heap placement makes heap exploits harder, but it also breaks ancient binaries (including anything libc5 based). -@@ -1858,7 +1859,7 @@ config INIT_ALL_POSSIBLE +@@ -1877,7 +1878,7 @@ config INIT_ALL_POSSIBLE config STOP_MACHINE bool default y @@ -85227,10 +88946,10 @@ index a8497fa..35b3c90 100644 next_state = Reset; return 0; diff --git a/init/main.c b/init/main.c -index 48655ce..d0113e4 100644 +index e8ae1fe..f60f98c 100644 --- a/init/main.c +++ b/init/main.c -@@ -97,6 +97,8 @@ extern void radix_tree_init(void); +@@ -98,6 +98,8 @@ extern void radix_tree_init(void); static inline void mark_rodata_ro(void) { } #endif @@ -85239,7 +88958,7 @@ index 48655ce..d0113e4 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 -@@ -158,6 +160,75 @@ static int __init set_reset_devices(char *str) +@@ -159,6 +161,75 @@ static int __init set_reset_devices(char *str) __setup("reset_devices", set_reset_devices); @@ -85315,15 +89034,25 @@ index 48655ce..d0113e4 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; -@@ -688,25 +759,24 @@ int __init_or_module do_one_initcall(initcall_t fn) +@@ -727,7 +798,7 @@ static bool __init_or_module initcall_blacklisted(initcall_t fn) + struct blacklist_entry *entry; + char *fn_name; + +- fn_name = kasprintf(GFP_KERNEL, "%pf", fn); ++ fn_name = kasprintf(GFP_KERNEL, "%pX", fn); + if (!fn_name) + return false; + +@@ -779,7 +850,7 @@ int __init_or_module do_one_initcall(initcall_t fn) { int count = preempt_count(); int ret; - char msgbuf[64]; + const char *msg1 = "", *msg2 = ""; - if (initcall_debug) - ret = do_one_initcall_debug(fn); + if (initcall_blacklisted(fn)) + return -EPERM; +@@ -789,18 +860,17 @@ int __init_or_module do_one_initcall(initcall_t fn) else ret = fn(); @@ -85346,7 +89075,7 @@ index 48655ce..d0113e4 100644 return ret; } -@@ -813,8 +883,8 @@ static int run_init_process(const char *init_filename) +@@ -907,8 +977,8 @@ static int run_init_process(const char *init_filename) { argv_init[0] = init_filename; return do_execve(getname_kernel(init_filename), @@ -85357,7 +89086,7 @@ index 48655ce..d0113e4 100644 } static int try_to_run_init_process(const char *init_filename) -@@ -831,6 +901,10 @@ static int try_to_run_init_process(const char *init_filename) +@@ -925,6 +995,10 @@ static int try_to_run_init_process(const char *init_filename) return ret; } @@ -85368,7 +89097,7 @@ index 48655ce..d0113e4 100644 static noinline void __init kernel_init_freeable(void); static int __ref kernel_init(void *unused) -@@ -855,6 +929,11 @@ static int __ref kernel_init(void *unused) +@@ -949,6 +1023,11 @@ static int __ref kernel_init(void *unused) ramdisk_execute_command, ret); } @@ -85380,7 +89109,7 @@ index 48655ce..d0113e4 100644 /* * We try each of these until one succeeds. * -@@ -910,7 +989,7 @@ static noinline void __init kernel_init_freeable(void) +@@ -1004,7 +1083,7 @@ static noinline void __init kernel_init_freeable(void) do_basic_setup(); /* Open the /dev/console on the rootfs, this should never fail */ @@ -85389,7 +89118,7 @@ index 48655ce..d0113e4 100644 pr_err("Warning: unable to open an initial console.\n"); (void) sys_dup(0); -@@ -923,11 +1002,13 @@ static noinline void __init kernel_init_freeable(void) +@@ -1017,11 +1096,13 @@ static noinline void __init kernel_init_freeable(void) if (!ramdisk_execute_command) ramdisk_execute_command = "/init"; @@ -85405,7 +89134,7 @@ index 48655ce..d0113e4 100644 * Ok, we have completed the initial bootup, and * we're essentially up and running. Get rid of the diff --git a/ipc/compat.c b/ipc/compat.c -index 45d035d..e4a7f99 100644 +index b5ef4f7..ff31d87 100644 --- a/ipc/compat.c +++ b/ipc/compat.c @@ -396,7 +396,7 @@ COMPAT_SYSCALL_DEFINE6(ipc, u32, call, int, first, int, second, @@ -85418,11 +89147,11 @@ index 45d035d..e4a7f99 100644 case SHMDT: return sys_shmdt(compat_ptr(ptr)); diff --git a/ipc/ipc_sysctl.c b/ipc/ipc_sysctl.c -index 998d31b..30c24df 100644 +index c3f0326..d4e0579 100644 --- a/ipc/ipc_sysctl.c +++ b/ipc/ipc_sysctl.c -@@ -30,7 +30,7 @@ static void *get_ipc(ctl_table *table) - static int proc_ipc_dointvec(ctl_table *table, int write, +@@ -30,7 +30,7 @@ static void *get_ipc(struct ctl_table *table) + static int proc_ipc_dointvec(struct ctl_table *table, int write, void __user *buffer, size_t *lenp, loff_t *ppos) { - struct ctl_table ipc_table; @@ -85430,8 +89159,8 @@ index 998d31b..30c24df 100644 memcpy(&ipc_table, table, sizeof(ipc_table)); ipc_table.data = get_ipc(table); -@@ -41,7 +41,7 @@ static int proc_ipc_dointvec(ctl_table *table, int write, - static int proc_ipc_dointvec_minmax(ctl_table *table, int write, +@@ -41,7 +41,7 @@ static int proc_ipc_dointvec(struct ctl_table *table, int write, + static int proc_ipc_dointvec_minmax(struct ctl_table *table, int write, void __user *buffer, size_t *lenp, loff_t *ppos) { - struct ctl_table ipc_table; @@ -85439,8 +89168,8 @@ index 998d31b..30c24df 100644 memcpy(&ipc_table, table, sizeof(ipc_table)); ipc_table.data = get_ipc(table); -@@ -65,7 +65,7 @@ static int proc_ipc_dointvec_minmax_orphans(ctl_table *table, int write, - static int proc_ipc_callback_dointvec_minmax(ctl_table *table, int write, +@@ -65,7 +65,7 @@ static int proc_ipc_dointvec_minmax_orphans(struct ctl_table *table, int write, + static int proc_ipc_callback_dointvec_minmax(struct ctl_table *table, int write, void __user *buffer, size_t *lenp, loff_t *ppos) { - struct ctl_table ipc_table; @@ -85448,8 +89177,8 @@ index 998d31b..30c24df 100644 size_t lenp_bef = *lenp; int rc; -@@ -88,7 +88,7 @@ static int proc_ipc_callback_dointvec_minmax(ctl_table *table, int write, - static int proc_ipc_doulongvec_minmax(ctl_table *table, int write, +@@ -88,7 +88,7 @@ static int proc_ipc_callback_dointvec_minmax(struct ctl_table *table, int write, + static int proc_ipc_doulongvec_minmax(struct ctl_table *table, int write, void __user *buffer, size_t *lenp, loff_t *ppos) { - struct ctl_table ipc_table; @@ -85458,7 +89187,7 @@ index 998d31b..30c24df 100644 ipc_table.data = get_ipc(table); @@ -122,7 +122,7 @@ static void ipc_auto_callback(int val) - static int proc_ipcauto_dointvec_minmax(ctl_table *table, int write, + static int proc_ipcauto_dointvec_minmax(struct ctl_table *table, int write, void __user *buffer, size_t *lenp, loff_t *ppos) { - struct ctl_table ipc_table; @@ -85467,11 +89196,11 @@ index 998d31b..30c24df 100644 int oldval; int rc; diff --git a/ipc/mq_sysctl.c b/ipc/mq_sysctl.c -index 5bb8bfe..a38ec05 100644 +index 68d4e95..1477ded 100644 --- a/ipc/mq_sysctl.c +++ b/ipc/mq_sysctl.c -@@ -25,7 +25,7 @@ static void *get_mq(ctl_table *table) - static int proc_mq_dointvec(ctl_table *table, int write, +@@ -25,7 +25,7 @@ static void *get_mq(struct ctl_table *table) + static int proc_mq_dointvec(struct ctl_table *table, int write, void __user *buffer, size_t *lenp, loff_t *ppos) { - struct ctl_table mq_table; @@ -85479,8 +89208,8 @@ index 5bb8bfe..a38ec05 100644 memcpy(&mq_table, table, sizeof(mq_table)); mq_table.data = get_mq(table); -@@ -35,7 +35,7 @@ static int proc_mq_dointvec(ctl_table *table, int write, - static int proc_mq_dointvec_minmax(ctl_table *table, int write, +@@ -35,7 +35,7 @@ static int proc_mq_dointvec(struct ctl_table *table, int write, + static int proc_mq_dointvec_minmax(struct ctl_table *table, int write, void __user *buffer, size_t *lenp, loff_t *ppos) { - struct ctl_table mq_table; @@ -85500,69 +89229,8 @@ index 4fcf39a..d3cc2ec 100644 spin_lock(&mq_lock); 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 6498531..b0ff3c8 100644 ---- a/ipc/msg.c -+++ b/ipc/msg.c -@@ -303,18 +303,19 @@ static inline int msg_security(struct kern_ipc_perm *ipcp, int msgflg) - return security_msg_queue_associate(msq, msgflg); - } - -+static struct ipc_ops msg_ops = { -+ .getnew = newque, -+ .associate = msg_security, -+ .more_checks = NULL -+}; -+ - SYSCALL_DEFINE2(msgget, key_t, key, int, msgflg) - { - struct ipc_namespace *ns; -- struct ipc_ops msg_ops; - struct ipc_params msg_params; - - ns = current->nsproxy->ipc_ns; - -- msg_ops.getnew = newque; -- msg_ops.associate = msg_security; -- msg_ops.more_checks = NULL; -- - msg_params.key = key; - msg_params.flg = msgflg; - -diff --git a/ipc/sem.c b/ipc/sem.c -index bee5554..e9af81dd 100644 ---- a/ipc/sem.c -+++ b/ipc/sem.c -@@ -561,10 +561,15 @@ static inline int sem_more_checks(struct kern_ipc_perm *ipcp, - return 0; - } - -+static struct ipc_ops sem_ops = { -+ .getnew = newary, -+ .associate = sem_security, -+ .more_checks = sem_more_checks -+}; -+ - SYSCALL_DEFINE3(semget, key_t, key, int, nsems, int, semflg) - { - struct ipc_namespace *ns; -- struct ipc_ops sem_ops; - struct ipc_params sem_params; - - ns = current->nsproxy->ipc_ns; -@@ -572,10 +577,6 @@ SYSCALL_DEFINE3(semget, key_t, key, int, nsems, int, semflg) - if (nsems < 0 || nsems > ns->sc_semmsl) - return -EINVAL; - -- sem_ops.getnew = newary; -- sem_ops.associate = sem_security; -- sem_ops.more_checks = sem_more_checks; -- - sem_params.key = key; - sem_params.flg = semflg; - sem_params.u.nsems = nsems; diff --git a/ipc/shm.c b/ipc/shm.c -index 7645961..afc7f02 100644 +index 89fc354..cf56786 100644 --- a/ipc/shm.c +++ b/ipc/shm.c @@ -72,6 +72,14 @@ static void shm_destroy(struct ipc_namespace *ns, struct shmid_kernel *shp); @@ -85580,7 +89248,7 @@ index 7645961..afc7f02 100644 void shm_init_ns(struct ipc_namespace *ns) { ns->shm_ctlmax = SHMMAX; -@@ -553,6 +561,14 @@ static int newseg(struct ipc_namespace *ns, struct ipc_params *params) +@@ -557,6 +565,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(); @@ -85595,32 +89263,7 @@ index 7645961..afc7f02 100644 shp->shm_segsz = size; shp->shm_nattch = 0; shp->shm_file = file; -@@ -606,18 +622,19 @@ static inline int shm_more_checks(struct kern_ipc_perm *ipcp, - return 0; - } - -+static struct ipc_ops shm_ops = { -+ .getnew = newseg, -+ .associate = shm_security, -+ .more_checks = shm_more_checks -+}; -+ - SYSCALL_DEFINE3(shmget, key_t, key, size_t, size, int, shmflg) - { - struct ipc_namespace *ns; -- struct ipc_ops shm_ops; - struct ipc_params shm_params; - - ns = current->nsproxy->ipc_ns; - -- shm_ops.getnew = newseg; -- shm_ops.associate = shm_security; -- shm_ops.more_checks = shm_more_checks; -- - shm_params.key = key; - shm_params.flg = shmflg; - shm_params.u.size = size; -@@ -1088,6 +1105,12 @@ long do_shmat(int shmid, char __user *shmaddr, int shmflg, ulong *raddr, +@@ -1092,6 +1108,12 @@ long do_shmat(int shmid, char __user *shmaddr, int shmflg, ulong *raddr, f_mode = FMODE_READ | FMODE_WRITE; } if (shmflg & SHM_EXEC) { @@ -85633,7 +89276,7 @@ index 7645961..afc7f02 100644 prot |= PROT_EXEC; acc_mode |= S_IXUGO; } -@@ -1112,6 +1135,15 @@ long do_shmat(int shmid, char __user *shmaddr, int shmflg, ulong *raddr, +@@ -1116,6 +1138,15 @@ long do_shmat(int shmid, char __user *shmaddr, int shmflg, ulong *raddr, if (err) goto out_unlock; @@ -85649,7 +89292,7 @@ index 7645961..afc7f02 100644 ipc_lock_object(&shp->shm_perm); /* check if shm_destroy() is tearing down shp */ -@@ -1124,6 +1156,9 @@ long do_shmat(int shmid, char __user *shmaddr, int shmflg, ulong *raddr, +@@ -1128,6 +1159,9 @@ long do_shmat(int shmid, char __user *shmaddr, int shmflg, ulong *raddr, path = shp->shm_file->f_path; path_get(&path); shp->shm_nattch++; @@ -85660,7 +89303,7 @@ index 7645961..afc7f02 100644 ipc_unlock_object(&shp->shm_perm); rcu_read_unlock(); diff --git a/ipc/util.c b/ipc/util.c -index 2eb0d1e..0308564 100644 +index 27d74e6..8be0be2 100644 --- a/ipc/util.c +++ b/ipc/util.c @@ -71,6 +71,8 @@ struct ipc_proc_iface { @@ -85681,10 +89324,10 @@ index 2eb0d1e..0308564 100644 + return -1; + /* is there some bit set in requested_mode but not in granted_mode? */ - if ((requested_mode & ~granted_mode & 0007) && + if ((requested_mode & ~granted_mode & 0007) && !ns_capable(ns->user_ns, CAP_IPC_OWNER)) diff --git a/kernel/acct.c b/kernel/acct.c -index 8d6e145..33e0b1e 100644 +index 808a86f..da69695 100644 --- a/kernel/acct.c +++ b/kernel/acct.c @@ -556,7 +556,7 @@ static void do_acct_process(struct bsd_acct_struct *acct, @@ -85697,7 +89340,7 @@ index 8d6e145..33e0b1e 100644 current->signal->rlim[RLIMIT_FSIZE].rlim_cur = flim; set_fs(fs); diff --git a/kernel/audit.c b/kernel/audit.c -index 47845c5..bd9dd5b 100644 +index 3ef2e0e..8873765 100644 --- a/kernel/audit.c +++ b/kernel/audit.c @@ -122,7 +122,7 @@ u32 audit_sig_sid = 0; @@ -85727,7 +89370,7 @@ index 47845c5..bd9dd5b 100644 audit_rate_limit, audit_backlog_limit); audit_panic(message); -@@ -808,7 +808,7 @@ static int audit_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh) +@@ -840,7 +840,7 @@ static int audit_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh) s.pid = audit_pid; s.rate_limit = audit_rate_limit; s.backlog_limit = audit_backlog_limit; @@ -85759,10 +89402,10 @@ index 21eae3c..66db239 100644 task->sessionid = sessionid; task->loginuid = loginuid; diff --git a/kernel/capability.c b/kernel/capability.c -index 24663b3..b926ae1 100644 +index a5cf13c..07a2647 100644 --- a/kernel/capability.c +++ b/kernel/capability.c -@@ -193,6 +193,9 @@ SYSCALL_DEFINE2(capget, cap_user_header_t, header, cap_user_data_t, dataptr) +@@ -192,6 +192,9 @@ SYSCALL_DEFINE2(capget, cap_user_header_t, header, cap_user_data_t, dataptr) * before modification is attempted and the application * fails. */ @@ -85772,7 +89415,7 @@ index 24663b3..b926ae1 100644 if (copy_to_user(dataptr, kdata, tocopy * sizeof(struct __user_cap_data_struct))) { return -EFAULT; -@@ -294,10 +297,11 @@ bool has_ns_capability(struct task_struct *t, +@@ -293,10 +296,11 @@ bool has_ns_capability(struct task_struct *t, int ret; rcu_read_lock(); @@ -85786,7 +89429,7 @@ index 24663b3..b926ae1 100644 } /** -@@ -334,10 +338,10 @@ bool has_ns_capability_noaudit(struct task_struct *t, +@@ -333,10 +337,10 @@ bool has_ns_capability_noaudit(struct task_struct *t, int ret; rcu_read_lock(); @@ -85799,7 +89442,7 @@ index 24663b3..b926ae1 100644 } /** -@@ -375,7 +379,7 @@ bool ns_capable(struct user_namespace *ns, int cap) +@@ -374,7 +378,7 @@ bool ns_capable(struct user_namespace *ns, int cap) BUG(); } @@ -85808,7 +89451,7 @@ index 24663b3..b926ae1 100644 current->flags |= PF_SUPERPRIV; return true; } -@@ -383,6 +387,21 @@ bool ns_capable(struct user_namespace *ns, int cap) +@@ -382,6 +386,21 @@ bool ns_capable(struct user_namespace *ns, int cap) } EXPORT_SYMBOL(ns_capable); @@ -85857,10 +89500,25 @@ index 24663b3..b926ae1 100644 +} +EXPORT_SYMBOL(capable_wrt_inode_uidgid_nolog); diff --git a/kernel/cgroup.c b/kernel/cgroup.c -index 073226b..969c746 100644 +index 70776ae..09c4988 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c -@@ -4808,7 +4808,7 @@ static int cgroup_css_links_read(struct seq_file *seq, void *v) +@@ -5146,6 +5146,14 @@ static void cgroup_release_agent(struct work_struct *work) + release_list); + list_del_init(&cgrp->release_list); + raw_spin_unlock(&release_list_lock); ++ ++ /* ++ * don't bother calling call_usermodehelper if we haven't ++ * configured a binary to execute ++ */ ++ if (cgrp->root->release_agent_path[0] == '\0') ++ goto continue_free; ++ + pathbuf = kmalloc(PATH_MAX, GFP_KERNEL); + if (!pathbuf) + goto continue_free; +@@ -5336,7 +5344,7 @@ static int cgroup_css_links_read(struct seq_file *seq, void *v) struct task_struct *task; int count = 0; @@ -85870,7 +89528,7 @@ index 073226b..969c746 100644 list_for_each_entry(task, &cset->tasks, cg_list) { if (count++ > MAX_TASKS_SHOWN_PER_CSS) diff --git a/kernel/compat.c b/kernel/compat.c -index e40b043..3da8f51 100644 +index 633394f..bdfa969 100644 --- a/kernel/compat.c +++ b/kernel/compat.c @@ -13,6 +13,7 @@ @@ -86194,7 +89852,7 @@ index e0573a4..26c0fd3 100644 /** diff --git a/kernel/debug/debug_core.c b/kernel/debug/debug_core.c -index 2956c8d..cfe1e2e 100644 +index 1adf62b..7736e06 100644 --- a/kernel/debug/debug_core.c +++ b/kernel/debug/debug_core.c @@ -124,7 +124,7 @@ static DEFINE_RAW_SPINLOCK(dbg_slave_lock); @@ -86258,7 +89916,7 @@ index 2956c8d..cfe1e2e 100644 } EXPORT_SYMBOL_GPL(kgdb_schedule_breakpoint); diff --git a/kernel/debug/kdb/kdb_main.c b/kernel/debug/kdb/kdb_main.c -index 0b097c8..11dd5c5 100644 +index 2f7c760..95b6a66 100644 --- a/kernel/debug/kdb/kdb_main.c +++ b/kernel/debug/kdb/kdb_main.c @@ -1977,7 +1977,7 @@ static int kdb_lsmod(int argc, const char **argv) @@ -86280,10 +89938,10 @@ index 0b097c8..11dd5c5 100644 #ifdef CONFIG_MODULE_UNLOAD { diff --git a/kernel/events/core.c b/kernel/events/core.c -index 440eefc..0909f02 100644 +index 6b17ac1..00fd505 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c -@@ -158,8 +158,15 @@ static struct srcu_struct pmus_srcu; +@@ -160,8 +160,15 @@ static struct srcu_struct pmus_srcu; * 0 - disallow raw tracepoint access for unpriv * 1 - disallow cpu events for unpriv * 2 - disallow kernel profiling for unpriv @@ -86300,7 +89958,7 @@ index 440eefc..0909f02 100644 /* Minimum for 512 kiB + 1 user control page */ int sysctl_perf_event_mlock __read_mostly = 512 + (PAGE_SIZE / 1024); /* 'free' kiB per user */ -@@ -185,7 +192,7 @@ void update_perf_cpu_limits(void) +@@ -187,7 +194,7 @@ void update_perf_cpu_limits(void) tmp *= sysctl_perf_cpu_time_max_percent; do_div(tmp, 100); @@ -86309,7 +89967,7 @@ index 440eefc..0909f02 100644 } static int perf_rotate_context(struct perf_cpu_context *cpuctx); -@@ -291,7 +298,7 @@ void perf_sample_event_took(u64 sample_len_ns) +@@ -293,7 +300,7 @@ void perf_sample_event_took(u64 sample_len_ns) } } @@ -86318,7 +89976,7 @@ index 440eefc..0909f02 100644 static void cpu_ctx_sched_out(struct perf_cpu_context *cpuctx, enum event_type_t event_type); -@@ -3002,7 +3009,7 @@ static void __perf_event_read(void *info) +@@ -3023,7 +3030,7 @@ static void __perf_event_read(void *info) static inline u64 perf_event_count(struct perf_event *event) { @@ -86327,7 +89985,7 @@ index 440eefc..0909f02 100644 } static u64 perf_event_read(struct perf_event *event) -@@ -3361,9 +3368,9 @@ u64 perf_event_read_value(struct perf_event *event, u64 *enabled, u64 *running) +@@ -3399,9 +3406,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 + @@ -86339,7 +89997,7 @@ index 440eefc..0909f02 100644 list_for_each_entry(child, &event->child_list, child_list) { total += perf_event_read(child); -@@ -3792,10 +3799,10 @@ void perf_event_update_userpage(struct perf_event *event) +@@ -3830,10 +3837,10 @@ void perf_event_update_userpage(struct perf_event *event) userpg->offset -= local64_read(&event->hw.prev_count); userpg->time_enabled = enabled + @@ -86352,7 +90010,7 @@ index 440eefc..0909f02 100644 arch_perf_update_userpage(userpg, now); -@@ -4359,7 +4366,7 @@ perf_output_sample_ustack(struct perf_output_handle *handle, u64 dump_size, +@@ -4397,7 +4404,7 @@ perf_output_sample_ustack(struct perf_output_handle *handle, u64 dump_size, /* Data. */ sp = perf_user_stack_pointer(regs); @@ -86361,7 +90019,7 @@ index 440eefc..0909f02 100644 dyn_size = dump_size - rem; perf_output_skip(handle, rem); -@@ -4450,11 +4457,11 @@ static void perf_output_read_one(struct perf_output_handle *handle, +@@ -4488,11 +4495,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 + @@ -86375,7 +90033,7 @@ index 440eefc..0909f02 100644 } if (read_format & PERF_FORMAT_ID) values[n++] = primary_event_id(event); -@@ -6733,7 +6740,7 @@ perf_event_alloc(struct perf_event_attr *attr, int cpu, +@@ -6801,7 +6808,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)); @@ -86384,7 +90042,7 @@ index 440eefc..0909f02 100644 event->state = PERF_EVENT_STATE_INACTIVE; -@@ -7015,6 +7022,11 @@ SYSCALL_DEFINE5(perf_event_open, +@@ -7080,6 +7087,11 @@ SYSCALL_DEFINE5(perf_event_open, if (flags & ~PERF_FLAG_ALL) return -EINVAL; @@ -86396,7 +90054,7 @@ index 440eefc..0909f02 100644 err = perf_copy_attr(attr_uptr, &attr); if (err) return err; -@@ -7353,10 +7365,10 @@ static void sync_child_event(struct perf_event *child_event, +@@ -7432,10 +7444,10 @@ static void sync_child_event(struct perf_event *child_event, /* * Add back the child's count to the parent's count: */ @@ -86455,10 +90113,10 @@ index 569b2187..19940d9 100644 /* Callchain handling */ extern struct perf_callchain_entry * diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c -index 04709b6..d330828 100644 +index 6f3254e..e4c1fe4 100644 --- a/kernel/events/uprobes.c +++ b/kernel/events/uprobes.c -@@ -1666,7 +1666,7 @@ static int is_trap_at_addr(struct mm_struct *mm, unsigned long vaddr) +@@ -1670,7 +1670,7 @@ static int is_trap_at_addr(struct mm_struct *mm, unsigned long vaddr) { struct page *page; uprobe_opcode_t opcode; @@ -86468,7 +90126,7 @@ index 04709b6..d330828 100644 pagefault_disable(); result = __copy_from_user_inatomic(&opcode, (void __user*)vaddr, diff --git a/kernel/exit.c b/kernel/exit.c -index 6ed6a1d..edecb0e 100644 +index e5c4668..592d2e5 100644 --- a/kernel/exit.c +++ b/kernel/exit.c @@ -173,6 +173,10 @@ void release_task(struct task_struct * p) @@ -86482,16 +90140,7 @@ index 6ed6a1d..edecb0e 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(); -@@ -330,7 +334,7 @@ int allow_signal(int sig) - * know it'll be handled, so that they don't get converted to - * SIGKILL or just silently dropped. - */ -- current->sighand->action[(sig)-1].sa.sa_handler = (void __user *)2; -+ current->sighand->action[(sig)-1].sa.sa_handler = (__force void __user *)2; - recalc_sigpending(); - spin_unlock_irq(¤t->sighand->siglock); - return 0; -@@ -699,6 +703,8 @@ void do_exit(long code) +@@ -664,6 +668,8 @@ void do_exit(long code) struct task_struct *tsk = current; int group_dead; @@ -86500,7 +90149,7 @@ index 6ed6a1d..edecb0e 100644 profile_task_exit(tsk); WARN_ON(blk_needs_flush_plug(tsk)); -@@ -715,7 +721,6 @@ void do_exit(long code) +@@ -680,7 +686,6 @@ void do_exit(long code) * mm_release()->clear_child_tid() from writing to a user-controlled * kernel address. */ @@ -86508,7 +90157,7 @@ index 6ed6a1d..edecb0e 100644 ptrace_event(PTRACE_EVENT_EXIT, code); -@@ -774,6 +779,9 @@ void do_exit(long code) +@@ -739,6 +744,9 @@ void do_exit(long code) tsk->exit_code = code; taskstats_exit(tsk, group_dead); @@ -86518,7 +90167,7 @@ index 6ed6a1d..edecb0e 100644 exit_mm(tsk); if (group_dead) -@@ -893,7 +901,7 @@ SYSCALL_DEFINE1(exit, int, error_code) +@@ -858,7 +866,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). */ @@ -86528,7 +90177,7 @@ index 6ed6a1d..edecb0e 100644 { struct signal_struct *sig = current->signal; diff --git a/kernel/fork.c b/kernel/fork.c -index 68b9226..0700bf6 100644 +index 6a13c46..a623c8e 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -183,6 +183,48 @@ void thread_info_cache_init(void) @@ -86965,7 +90614,7 @@ index 68b9226..0700bf6 100644 else new_fs = fs; diff --git a/kernel/futex.c b/kernel/futex.c -index de938d2..c566038 100644 +index b632b5f..ca00da9 100644 --- a/kernel/futex.c +++ b/kernel/futex.c @@ -202,7 +202,7 @@ struct futex_pi_state { @@ -87041,10 +90690,10 @@ index 55c8c93..9ba7ad6 100644 { compat_uptr_t base = ptr_to_compat(entry); diff --git a/kernel/gcov/base.c b/kernel/gcov/base.c -index f45b75b..bfac6d5 100644 +index b358a80..fc25240 100644 --- a/kernel/gcov/base.c +++ b/kernel/gcov/base.c -@@ -108,11 +108,6 @@ void gcov_enable_events(void) +@@ -114,11 +114,6 @@ void gcov_enable_events(void) } #ifdef CONFIG_MODULES @@ -87056,7 +90705,7 @@ index f45b75b..bfac6d5 100644 /* Update list and generate events when modules are unloaded. */ static int gcov_module_notifier(struct notifier_block *nb, unsigned long event, void *data) -@@ -127,7 +122,7 @@ static int gcov_module_notifier(struct notifier_block *nb, unsigned long event, +@@ -133,7 +128,7 @@ static int gcov_module_notifier(struct notifier_block *nb, unsigned long event, /* Remove entries located in module from linked list. */ while ((info = gcov_info_next(info))) { @@ -87066,10 +90715,10 @@ index f45b75b..bfac6d5 100644 if (gcov_events_enabled) gcov_event(GCOV_REMOVE, info); diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c -index e0501fe..312edd6 100644 +index 3ab2899..c6ad010 100644 --- a/kernel/hrtimer.c +++ b/kernel/hrtimer.c -@@ -1448,7 +1448,7 @@ void hrtimer_peek_ahead_timers(void) +@@ -1449,7 +1449,7 @@ void hrtimer_peek_ahead_timers(void) local_irq_restore(flags); } @@ -87264,10 +90913,10 @@ index e30ac0f..3528cac 100644 /* diff --git a/kernel/kexec.c b/kernel/kexec.c -index 28c5706..bfc8388 100644 +index 4b8f0c9..fffd0df 100644 --- a/kernel/kexec.c +++ b/kernel/kexec.c -@@ -1046,7 +1046,8 @@ COMPAT_SYSCALL_DEFINE4(kexec_load, compat_ulong_t, entry, +@@ -1045,7 +1045,8 @@ COMPAT_SYSCALL_DEFINE4(kexec_load, compat_ulong_t, entry, compat_ulong_t, flags) { struct compat_kexec_segment in; @@ -87278,7 +90927,7 @@ index 28c5706..bfc8388 100644 /* Don't allow clients that don't understand the native diff --git a/kernel/kmod.c b/kernel/kmod.c -index 6b375af..eaff670 100644 +index 8637e04..8b1d0d8 100644 --- a/kernel/kmod.c +++ b/kernel/kmod.c @@ -75,7 +75,7 @@ static void free_modprobe_argv(struct subprocess_info *info) @@ -87449,7 +91098,7 @@ index 6b375af..eaff670 100644 if (info->cleanup) (*info->cleanup)(info); kfree(info); -@@ -303,7 +374,7 @@ static int wait_for_helper(void *data) +@@ -300,7 +371,7 @@ static int wait_for_helper(void *data) * * Thus the __user pointer cast is valid here. */ @@ -87458,7 +91107,7 @@ index 6b375af..eaff670 100644 /* * If ret is 0, either ____call_usermodehelper failed and the -@@ -542,7 +613,12 @@ struct subprocess_info *call_usermodehelper_setup(char *path, char **argv, +@@ -539,7 +610,12 @@ struct subprocess_info *call_usermodehelper_setup(char *path, char **argv, goto out; INIT_WORK(&sub_info->work, __call_usermodehelper); @@ -87471,7 +91120,7 @@ index 6b375af..eaff670 100644 sub_info->argv = argv; sub_info->envp = envp; -@@ -650,7 +726,7 @@ EXPORT_SYMBOL(call_usermodehelper); +@@ -647,7 +723,7 @@ EXPORT_SYMBOL(call_usermodehelper); static int proc_cap_handler(struct ctl_table *table, int write, void __user *buffer, size_t *lenp, loff_t *ppos) { @@ -87481,7 +91130,7 @@ index 6b375af..eaff670 100644 kernel_cap_t new_cap; int err, i; diff --git a/kernel/kprobes.c b/kernel/kprobes.c -index ceeadfc..11c18b6 100644 +index 734e9a7..0a313b8 100644 --- a/kernel/kprobes.c +++ b/kernel/kprobes.c @@ -31,6 +31,9 @@ @@ -87494,7 +91143,7 @@ index ceeadfc..11c18b6 100644 #include #include #include -@@ -135,12 +138,12 @@ enum kprobe_slot_state { +@@ -122,12 +125,12 @@ enum kprobe_slot_state { static void *alloc_insn_page(void) { @@ -87509,7 +91158,7 @@ index ceeadfc..11c18b6 100644 } struct kprobe_insn_cache kprobe_insn_slots = { -@@ -2151,11 +2154,11 @@ static void __kprobes report_probe(struct seq_file *pi, struct kprobe *p, +@@ -2176,11 +2179,11 @@ static void report_probe(struct seq_file *pi, struct kprobe *p, kprobe_type = "k"; if (sym) @@ -87524,10 +91173,10 @@ index ceeadfc..11c18b6 100644 if (!pp) diff --git a/kernel/ksysfs.c b/kernel/ksysfs.c -index 2495a9b..071b906 100644 +index 6683cce..daf8999 100644 --- a/kernel/ksysfs.c +++ b/kernel/ksysfs.c -@@ -49,6 +49,8 @@ static ssize_t uevent_helper_store(struct kobject *kobj, +@@ -50,6 +50,8 @@ static ssize_t uevent_helper_store(struct kobject *kobj, { if (count+1 > UEVENT_HELPER_PATH_LEN) return -ENOENT; @@ -87536,7 +91185,7 @@ index 2495a9b..071b906 100644 memcpy(uevent_helper, buf, count); uevent_helper[count] = '\0'; if (count && uevent_helper[count-1] == '\n') -@@ -175,7 +177,7 @@ static ssize_t notes_read(struct file *filp, struct kobject *kobj, +@@ -176,7 +178,7 @@ static ssize_t notes_read(struct file *filp, struct kobject *kobj, return count; } @@ -87627,19 +91276,19 @@ index ef43ac4..2720dfa 100644 seq_printf(m, "%40s %14lu %29s %pS\n", name, stats->contending_point[i], diff --git a/kernel/locking/mcs_spinlock.c b/kernel/locking/mcs_spinlock.c -index 838dc9e..760e158 100644 +index be9ee15..39d6233 100644 --- a/kernel/locking/mcs_spinlock.c +++ b/kernel/locking/mcs_spinlock.c -@@ -71,7 +71,7 @@ bool osq_lock(struct optimistic_spin_queue **lock) - if (likely(prev == NULL)) - return true; +@@ -102,7 +102,7 @@ bool osq_lock(struct optimistic_spin_queue *lock) + prev = decode_cpu(old); + node->prev = prev; - ACCESS_ONCE(prev->next) = node; + ACCESS_ONCE_RW(prev->next) = node; /* * Normally @prev is untouchable after the above store; because at that -@@ -143,8 +143,8 @@ unqueue: +@@ -174,8 +174,8 @@ unqueue: * it will wait in Step-A. */ @@ -87650,8 +91299,8 @@ index 838dc9e..760e158 100644 return false; } -@@ -165,13 +165,13 @@ void osq_unlock(struct optimistic_spin_queue **lock) - */ +@@ -197,13 +197,13 @@ void osq_unlock(struct optimistic_spin_queue *lock) + node = this_cpu_ptr(&osq_node); next = xchg(&node->next, NULL); if (next) { - ACCESS_ONCE(next->locked) = 1; @@ -87667,7 +91316,7 @@ index 838dc9e..760e158 100644 #endif diff --git a/kernel/locking/mcs_spinlock.h b/kernel/locking/mcs_spinlock.h -index a2dbac4..e02a34a 100644 +index 74356dc..48dd5e1 100644 --- a/kernel/locking/mcs_spinlock.h +++ b/kernel/locking/mcs_spinlock.h @@ -81,7 +81,7 @@ void mcs_spin_lock(struct mcs_spinlock **lock, struct mcs_spinlock *node) @@ -87728,7 +91377,7 @@ index 0799fd3..d06ae3b 100644 extern void debug_mutex_init(struct mutex *lock, const char *name, struct lock_class_key *key); diff --git a/kernel/locking/mutex.c b/kernel/locking/mutex.c -index bc73d33..6f308aa 100644 +index acca2c1..ddeaea8 100644 --- a/kernel/locking/mutex.c +++ b/kernel/locking/mutex.c @@ -490,7 +490,7 @@ slowpath: @@ -87853,7 +91502,7 @@ index 1d96dd0..994ff19 100644 default: diff --git a/kernel/module.c b/kernel/module.c -index 079c461..741f79c 100644 +index 81e727c..a8ea6f9 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -61,6 +61,7 @@ @@ -88492,8 +92141,26 @@ index 079c461..741f79c 100644 /* Copy relocated percpu area over. */ percpu_modcopy(mod, (void *)info->sechdrs[info->index.pcpu].sh_addr, -@@ -3024,16 +3158,16 @@ static int do_init_module(struct module *mod) - MODULE_STATE_COMING, mod); +@@ -3079,11 +3213,12 @@ static int do_init_module(struct module *mod) + mod->strtab = mod->core_strtab; + #endif + unset_module_init_ro_nx(mod); +- module_free(mod, mod->module_init); +- mod->module_init = NULL; +- mod->init_size = 0; +- mod->init_ro_size = 0; +- mod->init_text_size = 0; ++ module_free(mod, mod->module_init_rw); ++ module_free_exec(mod, mod->module_init_rx); ++ mod->module_init_rw = NULL; ++ mod->module_init_rx = NULL; ++ mod->init_size_rw = 0; ++ mod->init_size_rx = 0; + mutex_unlock(&module_mutex); + wake_up_all(&module_wq); + +@@ -3151,16 +3286,16 @@ static int complete_formation(struct module *mod, struct load_info *info) + module_bug_finalize(info->hdr, info->sechdrs, mod); /* Set RO and NX regions for core */ - set_section_ro_nx(mod->module_core, @@ -88515,27 +92182,9 @@ index 079c461..741f79c 100644 + mod->init_size_rx, + mod->init_size_rx); - do_mod_ctors(mod); - /* Start the module */ -@@ -3094,11 +3228,12 @@ static int do_init_module(struct module *mod) - mod->strtab = mod->core_strtab; - #endif - unset_module_init_ro_nx(mod); -- module_free(mod, mod->module_init); -- mod->module_init = NULL; -- mod->init_size = 0; -- mod->init_ro_size = 0; -- mod->init_text_size = 0; -+ module_free(mod, mod->module_init_rw); -+ module_free_exec(mod, mod->module_init_rx); -+ mod->module_init_rw = NULL; -+ mod->module_init_rx = NULL; -+ mod->init_size_rw = 0; -+ mod->init_size_rx = 0; - mutex_unlock(&module_mutex); - wake_up_all(&module_wq); - -@@ -3241,9 +3376,38 @@ static int load_module(struct load_info *info, const char __user *uargs, + /* Mark state as coming so strong_try_module_get() ignores us, + * but kallsyms etc. can see us. */ +@@ -3244,9 +3379,38 @@ static int load_module(struct load_info *info, const char __user *uargs, if (err) goto free_unload; @@ -88574,7 +92223,7 @@ index 079c461..741f79c 100644 /* Fix up syms, so that st_value is a pointer to location. */ err = simplify_symbols(mod, info); if (err < 0) -@@ -3259,13 +3423,6 @@ static int load_module(struct load_info *info, const char __user *uargs, +@@ -3262,13 +3426,6 @@ static int load_module(struct load_info *info, const char __user *uargs, flush_module_icache(mod); @@ -88588,7 +92237,7 @@ index 079c461..741f79c 100644 dynamic_debug_setup(info->debug, info->num_debug); /* Ftrace init must be called in the MODULE_STATE_UNFORMED state */ -@@ -3303,11 +3460,10 @@ static int load_module(struct load_info *info, const char __user *uargs, +@@ -3311,11 +3468,10 @@ static int load_module(struct load_info *info, const char __user *uargs, ddebug_cleanup: dynamic_debug_remove(info->debug); synchronize_sched(); @@ -88601,7 +92250,7 @@ index 079c461..741f79c 100644 free_unload: module_unload_free(mod); unlink_mod: -@@ -3390,10 +3546,16 @@ static const char *get_ksymbol(struct module *mod, +@@ -3398,10 +3554,16 @@ static const char *get_ksymbol(struct module *mod, unsigned long nextval; /* At worse, next value is at end of module */ @@ -88621,7 +92270,7 @@ index 079c461..741f79c 100644 /* Scan for closest preceding symbol, and next symbol. (ELF starts real symbols at 1). */ -@@ -3644,7 +3806,7 @@ static int m_show(struct seq_file *m, void *p) +@@ -3652,7 +3814,7 @@ static int m_show(struct seq_file *m, void *p) return 0; seq_printf(m, "%s %u", @@ -88630,7 +92279,7 @@ index 079c461..741f79c 100644 print_unload_info(m, mod); /* Informative for users. */ -@@ -3653,7 +3815,7 @@ static int m_show(struct seq_file *m, void *p) +@@ -3661,7 +3823,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. */ @@ -88639,7 +92288,7 @@ index 079c461..741f79c 100644 /* Taints info */ if (mod->taints) -@@ -3689,7 +3851,17 @@ static const struct file_operations proc_modules_operations = { +@@ -3697,7 +3859,17 @@ static const struct file_operations proc_modules_operations = { static int __init proc_modules_init(void) { @@ -88657,7 +92306,7 @@ index 079c461..741f79c 100644 return 0; } module_init(proc_modules_init); -@@ -3750,14 +3922,14 @@ struct module *__module_address(unsigned long addr) +@@ -3758,14 +3930,14 @@ struct module *__module_address(unsigned long addr) { struct module *mod; @@ -88675,7 +92324,7 @@ index 079c461..741f79c 100644 return mod; } return NULL; -@@ -3792,11 +3964,20 @@ bool is_module_text_address(unsigned long addr) +@@ -3800,11 +3972,20 @@ bool is_module_text_address(unsigned long addr) */ struct module *__module_text_address(unsigned long addr) { @@ -88700,7 +92349,7 @@ index 079c461..741f79c 100644 } return mod; diff --git a/kernel/notifier.c b/kernel/notifier.c -index db4c8b0..ad011c5 100644 +index 4803da6..1c5eea6 100644 --- a/kernel/notifier.c +++ b/kernel/notifier.c @@ -5,6 +5,7 @@ @@ -88778,10 +92427,10 @@ index 161402f..598814c 100644 atomic_set(&pd->refcnt, 0); pd->pinst = pinst; diff --git a/kernel/panic.c b/kernel/panic.c -index d02fa9f..9faec0a 100644 +index 62e16ce..9db5047b 100644 --- a/kernel/panic.c +++ b/kernel/panic.c -@@ -52,7 +52,7 @@ EXPORT_SYMBOL(panic_blink); +@@ -53,7 +53,7 @@ EXPORT_SYMBOL(panic_blink); /* * Stop ourself in panic -- architecture code may override this */ @@ -88790,7 +92439,7 @@ index d02fa9f..9faec0a 100644 { while (1) cpu_relax(); -@@ -408,7 +408,7 @@ static void warn_slowpath_common(const char *file, int line, void *caller, +@@ -420,7 +420,7 @@ static void warn_slowpath_common(const char *file, int line, void *caller, disable_trace_on_warning(); pr_warn("------------[ cut here ]------------\n"); @@ -88799,7 +92448,7 @@ index d02fa9f..9faec0a 100644 raw_smp_processor_id(), current->pid, file, line, caller); if (args) -@@ -462,7 +462,8 @@ EXPORT_SYMBOL(warn_slowpath_null); +@@ -474,7 +474,8 @@ EXPORT_SYMBOL(warn_slowpath_null); */ __visible void __stack_chk_fail(void) { @@ -89016,7 +92665,7 @@ index 424c2d4..679242f 100644 } diff --git a/kernel/power/Kconfig b/kernel/power/Kconfig -index 2fac9cc..56fef29 100644 +index 9a83d78..128bfc0 100644 --- a/kernel/power/Kconfig +++ b/kernel/power/Kconfig @@ -24,6 +24,8 @@ config HIBERNATE_CALLBACKS @@ -89029,10 +92678,10 @@ index 2fac9cc..56fef29 100644 select LZO_COMPRESS select LZO_DECOMPRESS diff --git a/kernel/power/process.c b/kernel/power/process.c -index 06ec886..9dba35e 100644 +index 4ee194e..925778f 100644 --- a/kernel/power/process.c +++ b/kernel/power/process.c -@@ -34,6 +34,7 @@ static int try_to_freeze_tasks(bool user_only) +@@ -35,6 +35,7 @@ static int try_to_freeze_tasks(bool user_only) unsigned int elapsed_msecs; bool wakeup = false; int sleep_usecs = USEC_PER_MSEC; @@ -89040,7 +92689,7 @@ index 06ec886..9dba35e 100644 do_gettimeofday(&start); -@@ -44,13 +45,20 @@ static int try_to_freeze_tasks(bool user_only) +@@ -45,13 +46,20 @@ static int try_to_freeze_tasks(bool user_only) while (true) { todo = 0; @@ -89062,7 +92711,7 @@ index 06ec886..9dba35e 100644 } while_each_thread(g, p); read_unlock(&tasklist_lock); -@@ -59,7 +67,7 @@ static int try_to_freeze_tasks(bool user_only) +@@ -60,7 +68,7 @@ static int try_to_freeze_tasks(bool user_only) todo += wq_busy; } @@ -89072,10 +92721,10 @@ index 06ec886..9dba35e 100644 if (pm_wakeup_pending()) { diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c -index 221229c..c76ca0a 100644 +index 13e839d..8a71f12 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c -@@ -385,6 +385,11 @@ static int check_syslog_permissions(int type, bool from_file) +@@ -480,6 +480,11 @@ static int check_syslog_permissions(int type, bool from_file) if (from_file && type != SYSLOG_ACTION_OPEN) return 0; @@ -89088,7 +92737,7 @@ index 221229c..c76ca0a 100644 if (capable(CAP_SYSLOG)) return 0; diff --git a/kernel/profile.c b/kernel/profile.c -index cb980f0..ccd8782 100644 +index 54bf5ba..df6e0a2 100644 --- a/kernel/profile.c +++ b/kernel/profile.c @@ -37,7 +37,7 @@ struct profile_hit { @@ -89100,7 +92749,7 @@ index cb980f0..ccd8782 100644 static unsigned long prof_len, prof_shift; int prof_on __read_mostly; -@@ -260,7 +260,7 @@ static void profile_flip_buffers(void) +@@ -256,7 +256,7 @@ static void profile_flip_buffers(void) hits[i].pc = 0; continue; } @@ -89109,7 +92758,7 @@ index cb980f0..ccd8782 100644 hits[i].hits = hits[i].pc = 0; } } -@@ -321,9 +321,9 @@ static void do_profile_hits(int type, void *__pc, unsigned int nr_hits) +@@ -317,9 +317,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: */ @@ -89121,7 +92770,7 @@ index cb980f0..ccd8782 100644 hits[i].pc = hits[i].hits = 0; } out: -@@ -398,7 +398,7 @@ static void do_profile_hits(int type, void *__pc, unsigned int nr_hits) +@@ -394,7 +394,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; @@ -89130,7 +92779,7 @@ index cb980f0..ccd8782 100644 } #endif /* !CONFIG_SMP */ -@@ -494,7 +494,7 @@ read_profile(struct file *file, char __user *buf, size_t count, loff_t *ppos) +@@ -490,7 +490,7 @@ read_profile(struct file *file, char __user *buf, size_t count, loff_t *ppos) return -EFAULT; buf++; p++; count--; read++; } @@ -89139,7 +92788,7 @@ index cb980f0..ccd8782 100644 if (copy_to_user(buf, (void *)pnt, count)) return -EFAULT; read += count; -@@ -525,7 +525,7 @@ static ssize_t write_profile(struct file *file, const char __user *buf, +@@ -521,7 +521,7 @@ static ssize_t write_profile(struct file *file, const char __user *buf, } #endif profile_discard_flip_buffers(); @@ -89244,10 +92893,10 @@ index adf9862..9d86345 100644 } diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c -index bd30bc6..dce23da 100644 +index 948a769..5ca842b 100644 --- a/kernel/rcu/rcutorture.c +++ b/kernel/rcu/rcutorture.c -@@ -122,12 +122,12 @@ static DEFINE_PER_CPU(long [RCU_TORTURE_PIPE_LEN + 1], +@@ -124,12 +124,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 }; @@ -89266,7 +92915,7 @@ index bd30bc6..dce23da 100644 static long n_rcu_torture_barrier_error; static long n_rcu_torture_boost_ktrerror; static long n_rcu_torture_boost_rterror; -@@ -186,11 +186,11 @@ rcu_torture_alloc(void) +@@ -200,11 +200,11 @@ rcu_torture_alloc(void) spin_lock_bh(&rcu_torture_lock); if (list_empty(&rcu_torture_freelist)) { @@ -89280,7 +92929,7 @@ index bd30bc6..dce23da 100644 p = rcu_torture_freelist.next; list_del_init(p); spin_unlock_bh(&rcu_torture_lock); -@@ -203,7 +203,7 @@ rcu_torture_alloc(void) +@@ -217,7 +217,7 @@ rcu_torture_alloc(void) static void rcu_torture_free(struct rcu_torture *p) { @@ -89289,7 +92938,7 @@ index bd30bc6..dce23da 100644 spin_lock_bh(&rcu_torture_lock); list_add_tail(&p->rtort_free, &rcu_torture_freelist); spin_unlock_bh(&rcu_torture_lock); -@@ -287,7 +287,7 @@ rcu_torture_cb(struct rcu_head *p) +@@ -301,7 +301,7 @@ rcu_torture_pipe_update_one(struct rcu_torture *rp) i = rp->rtort_pipe_count; if (i > RCU_TORTURE_PIPE_LEN) i = RCU_TORTURE_PIPE_LEN; @@ -89297,26 +92946,17 @@ index bd30bc6..dce23da 100644 + atomic_inc_unchecked(&rcu_torture_wcount[i]); if (++rp->rtort_pipe_count >= RCU_TORTURE_PIPE_LEN) { rp->rtort_mbtest = 0; - rcu_torture_free(rp); -@@ -714,7 +714,7 @@ rcu_torture_writer(void *arg) + return true; +@@ -808,7 +808,7 @@ rcu_torture_writer(void *arg) i = old_rp->rtort_pipe_count; if (i > RCU_TORTURE_PIPE_LEN) i = RCU_TORTURE_PIPE_LEN; - atomic_inc(&rcu_torture_wcount[i]); + atomic_inc_unchecked(&rcu_torture_wcount[i]); old_rp->rtort_pipe_count++; - if (gp_normal == gp_exp) - exp = !!(torture_random(&rand) & 0x80); -@@ -732,7 +732,7 @@ rcu_torture_writer(void *arg) - i = rp->rtort_pipe_count; - if (i > RCU_TORTURE_PIPE_LEN) - i = RCU_TORTURE_PIPE_LEN; -- atomic_inc(&rcu_torture_wcount[i]); -+ atomic_inc_unchecked(&rcu_torture_wcount[i]); - if (++rp->rtort_pipe_count >= - RCU_TORTURE_PIPE_LEN) { - rp->rtort_mbtest = 0; -@@ -825,7 +825,7 @@ static void rcu_torture_timer(unsigned long unused) + switch (synctype[torture_random(&rand) % nsynctypes]) { + case RTWS_DEF_FREE: +@@ -926,7 +926,7 @@ static void rcu_torture_timer(unsigned long unused) return; } if (p->rtort_mbtest == 0) @@ -89325,7 +92965,7 @@ index bd30bc6..dce23da 100644 spin_lock(&rand_lock); cur_ops->read_delay(&rand); n_rcu_torture_timers++; -@@ -895,7 +895,7 @@ rcu_torture_reader(void *arg) +@@ -996,7 +996,7 @@ rcu_torture_reader(void *arg) continue; } if (p->rtort_mbtest == 0) @@ -89334,7 +92974,7 @@ index bd30bc6..dce23da 100644 cur_ops->read_delay(&rand); preempt_disable(); pipe_count = p->rtort_pipe_count; -@@ -950,15 +950,15 @@ rcu_torture_printk(char *page) +@@ -1054,15 +1054,15 @@ rcu_torture_printk(char *page) } page += sprintf(page, "%s%s ", torture_type, TORTURE_FLAG); page += sprintf(page, @@ -89355,7 +92995,7 @@ index bd30bc6..dce23da 100644 n_rcu_torture_boost_ktrerror, n_rcu_torture_boost_rterror); page += sprintf(page, "rtbf: %ld rtb: %ld nt: %ld ", -@@ -971,14 +971,14 @@ rcu_torture_printk(char *page) +@@ -1075,14 +1075,14 @@ rcu_torture_printk(char *page) n_barrier_attempts, n_rcu_torture_barrier_error); page += sprintf(page, "\n%s%s ", torture_type, TORTURE_FLAG); @@ -89372,7 +93012,7 @@ index bd30bc6..dce23da 100644 WARN_ON_ONCE(1); } page += sprintf(page, "Reader Pipe: "); -@@ -992,7 +992,7 @@ rcu_torture_printk(char *page) +@@ -1096,7 +1096,7 @@ rcu_torture_printk(char *page) page += sprintf(page, "Free-Block Circulation: "); for (i = 0; i < RCU_TORTURE_PIPE_LEN + 1; i++) { page += sprintf(page, " %d", @@ -89381,7 +93021,7 @@ index bd30bc6..dce23da 100644 } page += sprintf(page, "\n"); if (cur_ops->stats) -@@ -1341,7 +1341,7 @@ rcu_torture_cleanup(void) +@@ -1461,7 +1461,7 @@ rcu_torture_cleanup(void) rcu_torture_stats_print(); /* -After- the stats thread is stopped! */ @@ -89390,7 +93030,7 @@ index bd30bc6..dce23da 100644 rcu_torture_print_module_parms(cur_ops, "End of test: FAILURE"); else if (torture_onoff_failures()) rcu_torture_print_module_parms(cur_ops, -@@ -1460,18 +1460,18 @@ rcu_torture_init(void) +@@ -1584,18 +1584,18 @@ rcu_torture_init(void) rcu_torture_current = NULL; rcu_torture_current_version = 0; @@ -89453,36 +93093,70 @@ index d9efcc1..ea543e9 100644 { __rcu_process_callbacks(&rcu_sched_ctrlblk); __rcu_process_callbacks(&rcu_bh_ctrlblk); +diff --git a/kernel/rcu/tiny_plugin.h b/kernel/rcu/tiny_plugin.h +index 858c565..7efd915 100644 +--- a/kernel/rcu/tiny_plugin.h ++++ b/kernel/rcu/tiny_plugin.h +@@ -152,17 +152,17 @@ static void check_cpu_stall(struct rcu_ctrlblk *rcp) + dump_stack(); + } + if (*rcp->curtail && ULONG_CMP_GE(j, js)) +- ACCESS_ONCE(rcp->jiffies_stall) = jiffies + ++ ACCESS_ONCE_RW(rcp->jiffies_stall) = jiffies + + 3 * rcu_jiffies_till_stall_check() + 3; + else if (ULONG_CMP_GE(j, js)) +- ACCESS_ONCE(rcp->jiffies_stall) = jiffies + rcu_jiffies_till_stall_check(); ++ ACCESS_ONCE_RW(rcp->jiffies_stall) = jiffies + rcu_jiffies_till_stall_check(); + } + + static void reset_cpu_stall_ticks(struct rcu_ctrlblk *rcp) + { + rcp->ticks_this_gp = 0; + rcp->gp_start = jiffies; +- ACCESS_ONCE(rcp->jiffies_stall) = jiffies + rcu_jiffies_till_stall_check(); ++ ACCESS_ONCE_RW(rcp->jiffies_stall) = jiffies + rcu_jiffies_till_stall_check(); + } + + static void check_cpu_stalls(void) diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c -index 0c47e30..a084591 100644 +index 625d0b0..0bce4d6 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c -@@ -388,9 +388,9 @@ static void rcu_eqs_enter_common(struct rcu_dynticks *rdtp, long long oldval, +@@ -263,7 +263,7 @@ static void rcu_momentary_dyntick_idle(void) + */ + rdtp = this_cpu_ptr(&rcu_dynticks); + smp_mb__before_atomic(); /* Earlier stuff before QS. */ +- atomic_add(2, &rdtp->dynticks); /* QS. */ ++ atomic_add_unchecked(2, &rdtp->dynticks); /* QS. */ + smp_mb__after_atomic(); /* Later stuff after QS. */ + break; + } +@@ -523,9 +523,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. */ + smp_mb__before_atomic(); /* See above. */ - atomic_inc(&rdtp->dynticks); + atomic_inc_unchecked(&rdtp->dynticks); - smp_mb__after_atomic_inc(); /* Force ordering with next sojourn. */ + smp_mb__after_atomic(); /* Force ordering with next sojourn. */ - WARN_ON_ONCE(atomic_read(&rdtp->dynticks) & 0x1); + WARN_ON_ONCE(atomic_read_unchecked(&rdtp->dynticks) & 0x1); /* * It is illegal to enter an extended quiescent state while -@@ -508,10 +508,10 @@ static void rcu_eqs_exit_common(struct rcu_dynticks *rdtp, long long oldval, +@@ -643,10 +643,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. */ + smp_mb__before_atomic(); /* Force ordering w/previous sojourn. */ - atomic_inc(&rdtp->dynticks); + atomic_inc_unchecked(&rdtp->dynticks); /* CPUs seeing atomic_inc() must see later RCU read-side crit sects */ - smp_mb__after_atomic_inc(); /* See above. */ + smp_mb__after_atomic(); /* See above. */ - WARN_ON_ONCE(!(atomic_read(&rdtp->dynticks) & 0x1)); + WARN_ON_ONCE(!(atomic_read_unchecked(&rdtp->dynticks) & 0x1)); rcu_cleanup_after_idle(smp_processor_id()); trace_rcu_dyntick(TPS("End"), oldval, rdtp->dynticks_nesting); if (!user && !is_idle_task(current)) { -@@ -632,14 +632,14 @@ void rcu_nmi_enter(void) +@@ -767,14 +767,14 @@ void rcu_nmi_enter(void) struct rcu_dynticks *rdtp = this_cpu_ptr(&rcu_dynticks); if (rdtp->dynticks_nmi_nesting == 0 && @@ -89490,29 +93164,29 @@ index 0c47e30..a084591 100644 + (atomic_read_unchecked(&rdtp->dynticks) & 0x1)) return; rdtp->dynticks_nmi_nesting++; - smp_mb__before_atomic_inc(); /* Force delay from prior write. */ + smp_mb__before_atomic(); /* Force delay from prior write. */ - atomic_inc(&rdtp->dynticks); + atomic_inc_unchecked(&rdtp->dynticks); /* CPUs seeing atomic_inc() must see later RCU read-side crit sects */ - smp_mb__after_atomic_inc(); /* See above. */ + smp_mb__after_atomic(); /* See above. */ - WARN_ON_ONCE(!(atomic_read(&rdtp->dynticks) & 0x1)); + WARN_ON_ONCE(!(atomic_read_unchecked(&rdtp->dynticks) & 0x1)); } /** -@@ -658,9 +658,9 @@ void rcu_nmi_exit(void) +@@ -793,9 +793,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. */ + smp_mb__before_atomic(); /* See above. */ - atomic_inc(&rdtp->dynticks); + atomic_inc_unchecked(&rdtp->dynticks); - smp_mb__after_atomic_inc(); /* Force delay to next write. */ + smp_mb__after_atomic(); /* Force delay to next write. */ - WARN_ON_ONCE(atomic_read(&rdtp->dynticks) & 0x1); + WARN_ON_ONCE(atomic_read_unchecked(&rdtp->dynticks) & 0x1); } /** -@@ -673,7 +673,7 @@ void rcu_nmi_exit(void) +@@ -808,7 +808,7 @@ void rcu_nmi_exit(void) */ bool notrace __rcu_is_watching(void) { @@ -89521,17 +93195,17 @@ index 0c47e30..a084591 100644 } /** -@@ -756,7 +756,7 @@ static int rcu_is_cpu_rrupt_from_idle(void) +@@ -891,7 +891,7 @@ static int rcu_is_cpu_rrupt_from_idle(void) static int dyntick_save_progress_counter(struct rcu_data *rdp, bool *isidle, unsigned long *maxj) { - rdp->dynticks_snap = atomic_add_return(0, &rdp->dynticks->dynticks); + rdp->dynticks_snap = atomic_add_return_unchecked(0, &rdp->dynticks->dynticks); rcu_sysidle_check_cpu(rdp, isidle, maxj); - return (rdp->dynticks_snap & 0x1) == 0; - } -@@ -779,7 +779,7 @@ static int rcu_implicit_dynticks_qs(struct rcu_data *rdp, - unsigned int curr; + if ((rdp->dynticks_snap & 0x1) == 0) { + trace_rcu_fqs(rdp->rsp->name, rdp->gpnum, rdp->cpu, TPS("dti")); +@@ -920,7 +920,7 @@ static int rcu_implicit_dynticks_qs(struct rcu_data *rdp, + int *rcrmp; unsigned int snap; - curr = (unsigned int)atomic_add_return(0, &rdp->dynticks->dynticks); @@ -89539,7 +93213,65 @@ index 0c47e30..a084591 100644 snap = (unsigned int)rdp->dynticks_snap; /* -@@ -1449,9 +1449,9 @@ static int rcu_gp_init(struct rcu_state *rsp) +@@ -983,10 +983,10 @@ static int rcu_implicit_dynticks_qs(struct rcu_data *rdp, + rdp->rsp->gp_start + jiffies_till_sched_qs) || + ULONG_CMP_GE(jiffies, rdp->rsp->jiffies_resched)) { + if (!(ACCESS_ONCE(*rcrmp) & rdp->rsp->flavor_mask)) { +- ACCESS_ONCE(rdp->cond_resched_completed) = ++ ACCESS_ONCE_RW(rdp->cond_resched_completed) = + ACCESS_ONCE(rdp->mynode->completed); + smp_mb(); /* ->cond_resched_completed before *rcrmp. */ +- ACCESS_ONCE(*rcrmp) = ++ ACCESS_ONCE_RW(*rcrmp) = + ACCESS_ONCE(*rcrmp) + rdp->rsp->flavor_mask; + resched_cpu(rdp->cpu); /* Force CPU into scheduler. */ + rdp->rsp->jiffies_resched += 5; /* Enable beating. */ +@@ -1008,7 +1008,7 @@ static void record_gp_stall_check_time(struct rcu_state *rsp) + rsp->gp_start = j; + smp_wmb(); /* Record start time before stall time. */ + j1 = rcu_jiffies_till_stall_check(); +- ACCESS_ONCE(rsp->jiffies_stall) = j + j1; ++ ACCESS_ONCE_RW(rsp->jiffies_stall) = j + j1; + rsp->jiffies_resched = j + j1 / 2; + } + +@@ -1052,7 +1052,7 @@ static void print_other_cpu_stall(struct rcu_state *rsp) + raw_spin_unlock_irqrestore(&rnp->lock, flags); + return; + } +- ACCESS_ONCE(rsp->jiffies_stall) = jiffies + 3 * rcu_jiffies_till_stall_check() + 3; ++ ACCESS_ONCE_RW(rsp->jiffies_stall) = jiffies + 3 * rcu_jiffies_till_stall_check() + 3; + raw_spin_unlock_irqrestore(&rnp->lock, flags); + + /* +@@ -1130,7 +1130,7 @@ static void print_cpu_stall(struct rcu_state *rsp) + + raw_spin_lock_irqsave(&rnp->lock, flags); + if (ULONG_CMP_GE(jiffies, ACCESS_ONCE(rsp->jiffies_stall))) +- ACCESS_ONCE(rsp->jiffies_stall) = jiffies + ++ ACCESS_ONCE_RW(rsp->jiffies_stall) = jiffies + + 3 * rcu_jiffies_till_stall_check() + 3; + raw_spin_unlock_irqrestore(&rnp->lock, flags); + +@@ -1214,7 +1214,7 @@ void rcu_cpu_stall_reset(void) + struct rcu_state *rsp; + + for_each_rcu_flavor(rsp) +- ACCESS_ONCE(rsp->jiffies_stall) = jiffies + ULONG_MAX / 2; ++ ACCESS_ONCE_RW(rsp->jiffies_stall) = jiffies + ULONG_MAX / 2; + } + + /* +@@ -1594,7 +1594,7 @@ static int rcu_gp_init(struct rcu_state *rsp) + raw_spin_unlock_irq(&rnp->lock); + return 0; + } +- ACCESS_ONCE(rsp->gp_flags) = 0; /* Clear all flags: New grace period. */ ++ ACCESS_ONCE_RW(rsp->gp_flags) = 0; /* Clear all flags: New grace period. */ + + if (WARN_ON_ONCE(rcu_gp_in_progress(rsp))) { + /* +@@ -1635,9 +1635,9 @@ static int rcu_gp_init(struct rcu_state *rsp) rdp = this_cpu_ptr(rsp->rda); rcu_preempt_check_blocked_tasks(rnp); rnp->qsmask = rnp->qsmaskinit; @@ -89549,9 +93281,18 @@ index 0c47e30..a084591 100644 - ACCESS_ONCE(rnp->completed) = rsp->completed; + ACCESS_ONCE_RW(rnp->completed) = rsp->completed; if (rnp == rdp->mynode) - __note_gp_changes(rsp, rnp, rdp); + (void)__note_gp_changes(rsp, rnp, rdp); rcu_preempt_boost_start_gp(rnp); -@@ -1545,7 +1545,7 @@ static void rcu_gp_cleanup(struct rcu_state *rsp) +@@ -1687,7 +1687,7 @@ static int rcu_gp_fqs(struct rcu_state *rsp, int fqs_state_in) + if (ACCESS_ONCE(rsp->gp_flags) & RCU_GP_FLAG_FQS) { + raw_spin_lock_irq(&rnp->lock); + smp_mb__after_unlock_lock(); +- ACCESS_ONCE(rsp->gp_flags) &= ~RCU_GP_FLAG_FQS; ++ ACCESS_ONCE_RW(rsp->gp_flags) &= ~RCU_GP_FLAG_FQS; + raw_spin_unlock_irq(&rnp->lock); + } + return fqs_state; +@@ -1732,7 +1732,7 @@ static void rcu_gp_cleanup(struct rcu_state *rsp) rcu_for_each_node_breadth_first(rsp, rnp) { raw_spin_lock_irq(&rnp->lock); smp_mb__after_unlock_lock(); @@ -89559,8 +93300,8 @@ index 0c47e30..a084591 100644 + ACCESS_ONCE_RW(rnp->completed) = rsp->gpnum; rdp = this_cpu_ptr(rsp->rda); if (rnp == rdp->mynode) - __note_gp_changes(rsp, rnp, rdp); -@@ -1560,7 +1560,7 @@ static void rcu_gp_cleanup(struct rcu_state *rsp) + needgp = __note_gp_changes(rsp, rnp, rdp) || needgp; +@@ -1747,14 +1747,14 @@ static void rcu_gp_cleanup(struct rcu_state *rsp) rcu_nocb_gp_set(rnp, nocb); /* Declare grace period done. */ @@ -89569,7 +93310,24 @@ index 0c47e30..a084591 100644 trace_rcu_grace_period(rsp->name, rsp->completed, TPS("end")); rsp->fqs_state = RCU_GP_IDLE; rdp = this_cpu_ptr(rsp->rda); -@@ -1912,7 +1912,7 @@ rcu_send_cbs_to_orphanage(int cpu, struct rcu_state *rsp, + /* Advance CBs to reduce false positives below. */ + needgp = rcu_advance_cbs(rsp, rnp, rdp) || needgp; + if (needgp || cpu_needs_another_gp(rsp, rdp)) { +- ACCESS_ONCE(rsp->gp_flags) = RCU_GP_FLAG_INIT; ++ ACCESS_ONCE_RW(rsp->gp_flags) = RCU_GP_FLAG_INIT; + trace_rcu_grace_period(rsp->name, + ACCESS_ONCE(rsp->gpnum), + TPS("newreq")); +@@ -1879,7 +1879,7 @@ rcu_start_gp_advanced(struct rcu_state *rsp, struct rcu_node *rnp, + */ + return false; + } +- ACCESS_ONCE(rsp->gp_flags) = RCU_GP_FLAG_INIT; ++ ACCESS_ONCE_RW(rsp->gp_flags) = RCU_GP_FLAG_INIT; + trace_rcu_grace_period(rsp->name, ACCESS_ONCE(rsp->gpnum), + TPS("newreq")); + +@@ -2100,7 +2100,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; @@ -89578,7 +93336,7 @@ index 0c47e30..a084591 100644 } /* -@@ -2159,7 +2159,7 @@ static void rcu_do_batch(struct rcu_state *rsp, struct rcu_data *rdp) +@@ -2347,7 +2347,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; @@ -89587,7 +93345,7 @@ index 0c47e30..a084591 100644 rdp->n_cbs_invoked += count; /* Reinstate batch limit if we have worked down the excess. */ -@@ -2304,7 +2304,7 @@ static void force_quiescent_state(struct rcu_state *rsp) +@@ -2492,7 +2492,7 @@ static void force_quiescent_state(struct rcu_state *rsp) if (rnp_old != NULL) raw_spin_unlock(&rnp_old->fqslock); if (ret) { @@ -89596,7 +93354,7 @@ index 0c47e30..a084591 100644 return; } rnp_old = rnp; -@@ -2316,7 +2316,7 @@ static void force_quiescent_state(struct rcu_state *rsp) +@@ -2504,11 +2504,11 @@ static void force_quiescent_state(struct rcu_state *rsp) smp_mb__after_unlock_lock(); raw_spin_unlock(&rnp_old->fqslock); if (ACCESS_ONCE(rsp->gp_flags) & RCU_GP_FLAG_FQS) { @@ -89605,7 +93363,12 @@ index 0c47e30..a084591 100644 raw_spin_unlock_irqrestore(&rnp_old->lock, flags); return; /* Someone beat us to it. */ } -@@ -2362,7 +2362,7 @@ __rcu_process_callbacks(struct rcu_state *rsp) +- ACCESS_ONCE(rsp->gp_flags) |= RCU_GP_FLAG_FQS; ++ ACCESS_ONCE_RW(rsp->gp_flags) |= RCU_GP_FLAG_FQS; + raw_spin_unlock_irqrestore(&rnp_old->lock, flags); + wake_up(&rsp->gp_wq); /* Memory barrier implied by wake_up() path. */ + } +@@ -2553,7 +2553,7 @@ __rcu_process_callbacks(struct rcu_state *rsp) /* * Do RCU core processing for the current CPU. */ @@ -89614,7 +93377,7 @@ index 0c47e30..a084591 100644 { struct rcu_state *rsp; -@@ -2470,7 +2470,7 @@ __call_rcu(struct rcu_head *head, void (*func)(struct rcu_head *rcu), +@@ -2665,7 +2665,7 @@ __call_rcu(struct rcu_head *head, void (*func)(struct rcu_head *rcu), WARN_ON_ONCE((unsigned long)head & 0x3); /* Misaligned rcu_head! */ if (debug_rcu_head_queue(head)) { /* Probable double call_rcu(), so leak the callback. */ @@ -89623,7 +93386,7 @@ index 0c47e30..a084591 100644 WARN_ONCE(1, "__call_rcu(): Leaked duplicate callback\n"); return; } -@@ -2498,7 +2498,7 @@ __call_rcu(struct rcu_head *head, void (*func)(struct rcu_head *rcu), +@@ -2693,7 +2693,7 @@ __call_rcu(struct rcu_head *head, void (*func)(struct rcu_head *rcu), local_irq_restore(flags); return; } @@ -89632,7 +93395,7 @@ index 0c47e30..a084591 100644 if (lazy) rdp->qlen_lazy++; else -@@ -2759,11 +2759,11 @@ void synchronize_sched_expedited(void) +@@ -2968,11 +2968,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. */ @@ -89646,7 +93409,7 @@ index 0c47e30..a084591 100644 return; } -@@ -2771,7 +2771,7 @@ void synchronize_sched_expedited(void) +@@ -2980,7 +2980,7 @@ void synchronize_sched_expedited(void) * Take a ticket. Note that atomic_inc_return() implies a * full memory barrier. */ @@ -89655,7 +93418,7 @@ index 0c47e30..a084591 100644 firstsnap = snap; get_online_cpus(); WARN_ON_ONCE(cpu_is_offline(raw_smp_processor_id())); -@@ -2784,14 +2784,14 @@ void synchronize_sched_expedited(void) +@@ -2993,14 +2993,14 @@ void synchronize_sched_expedited(void) synchronize_sched_expedited_cpu_stop, NULL) == -EAGAIN) { put_online_cpus(); @@ -89666,13 +93429,13 @@ index 0c47e30..a084591 100644 s = atomic_long_read(&rsp->expedited_done); if (ULONG_CMP_GE((ulong)s, (ulong)firstsnap)) { /* ensure test happens before caller kfree */ - smp_mb__before_atomic_inc(); /* ^^^ */ + smp_mb__before_atomic(); /* ^^^ */ - atomic_long_inc(&rsp->expedited_workdone1); + atomic_long_inc_unchecked(&rsp->expedited_workdone1); return; } -@@ -2800,7 +2800,7 @@ void synchronize_sched_expedited(void) +@@ -3009,7 +3009,7 @@ void synchronize_sched_expedited(void) udelay(trycount * num_online_cpus()); } else { wait_rcu_gp(call_rcu_sched); @@ -89681,16 +93444,16 @@ index 0c47e30..a084591 100644 return; } -@@ -2809,7 +2809,7 @@ void synchronize_sched_expedited(void) +@@ -3018,7 +3018,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(); /* ^^^ */ + smp_mb__before_atomic(); /* ^^^ */ - atomic_long_inc(&rsp->expedited_workdone2); + atomic_long_inc_unchecked(&rsp->expedited_workdone2); return; } -@@ -2821,10 +2821,10 @@ void synchronize_sched_expedited(void) +@@ -3030,10 +3030,10 @@ void synchronize_sched_expedited(void) * period works for us. */ get_online_cpus(); @@ -89703,7 +93466,7 @@ index 0c47e30..a084591 100644 /* * Everyone up to our most recent fetch is covered by our grace -@@ -2833,16 +2833,16 @@ void synchronize_sched_expedited(void) +@@ -3042,16 +3042,16 @@ void synchronize_sched_expedited(void) * than we did already did their update. */ do { @@ -89712,7 +93475,7 @@ index 0c47e30..a084591 100644 s = atomic_long_read(&rsp->expedited_done); if (ULONG_CMP_GE((ulong)s, (ulong)snap)) { /* ensure test happens before caller kfree */ - smp_mb__before_atomic_inc(); /* ^^^ */ + smp_mb__before_atomic(); /* ^^^ */ - atomic_long_inc(&rsp->expedited_done_lost); + atomic_long_inc_unchecked(&rsp->expedited_done_lost); break; @@ -89723,7 +93486,7 @@ index 0c47e30..a084591 100644 put_online_cpus(); } -@@ -3048,7 +3048,7 @@ static void _rcu_barrier(struct rcu_state *rsp) +@@ -3257,7 +3257,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. */ @@ -89732,7 +93495,7 @@ index 0c47e30..a084591 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. */ -@@ -3098,7 +3098,7 @@ static void _rcu_barrier(struct rcu_state *rsp) +@@ -3307,7 +3307,7 @@ static void _rcu_barrier(struct rcu_state *rsp) /* Increment ->n_barrier_done to prevent duplicate work. */ smp_mb(); /* Keep increment after above mechanism. */ @@ -89741,7 +93504,7 @@ index 0c47e30..a084591 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. */ -@@ -3143,10 +3143,10 @@ rcu_boot_init_percpu_data(int cpu, struct rcu_state *rsp) +@@ -3352,10 +3352,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; @@ -89754,7 +93517,7 @@ index 0c47e30..a084591 100644 rdp->cpu = cpu; rdp->rsp = rsp; rcu_boot_init_nocb_percpu_data(rdp); -@@ -3180,8 +3180,8 @@ rcu_init_percpu_data(int cpu, struct rcu_state *rsp, int preemptible) +@@ -3388,8 +3388,8 @@ rcu_init_percpu_data(int cpu, struct rcu_state *rsp) init_callback_list(rdp); /* Re-enable callbacks on this CPU. */ rdp->dynticks->dynticks_nesting = DYNTICK_TASK_EXIT_IDLE; rcu_sysidle_init_percpu_data(rdp->dynticks); @@ -89766,7 +93529,7 @@ index 0c47e30..a084591 100644 /* Add CPU to rcu_node bitmasks. */ diff --git a/kernel/rcu/tree.h b/kernel/rcu/tree.h -index 75dc3c3..b95d624 100644 +index 0f69a79..c85c2dc 100644 --- a/kernel/rcu/tree.h +++ b/kernel/rcu/tree.h @@ -87,11 +87,11 @@ struct rcu_dynticks { @@ -89783,7 +93546,7 @@ index 75dc3c3..b95d624 100644 /* "Idle" excludes userspace execution. */ unsigned long dynticks_idle_jiffies; /* End of last non-NMI non-idle period. */ -@@ -431,17 +431,17 @@ struct rcu_state { +@@ -435,17 +435,17 @@ struct rcu_state { /* _rcu_barrier(). */ /* End of fields guarded by barrier_mutex. */ @@ -89813,10 +93576,10 @@ index 75dc3c3..b95d624 100644 unsigned long jiffies_force_qs; /* Time at which to invoke */ /* force_quiescent_state(). */ diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h -index 962d1d5..c6c62d12d 100644 +index 02ac0fb..4aa4a36 100644 --- a/kernel/rcu/tree_plugin.h +++ b/kernel/rcu/tree_plugin.h -@@ -758,7 +758,7 @@ static int rcu_preempted_readers_exp(struct rcu_node *rnp) +@@ -735,7 +735,7 @@ static int rcu_preempted_readers_exp(struct rcu_node *rnp) static int sync_rcu_preempt_exp_done(struct rcu_node *rnp) { return !rcu_preempted_readers_exp(rnp) && @@ -89825,7 +93588,7 @@ index 962d1d5..c6c62d12d 100644 } /* -@@ -920,7 +920,7 @@ void synchronize_rcu_expedited(void) +@@ -897,7 +897,7 @@ void synchronize_rcu_expedited(void) /* Clean up and exit. */ smp_mb(); /* ensure expedited GP seen before counter increment. */ @@ -89834,7 +93597,7 @@ index 962d1d5..c6c62d12d 100644 unlock_mb_ret: mutex_unlock(&sync_rcu_preempt_exp_mutex); mb_ret: -@@ -1496,7 +1496,7 @@ static void rcu_boost_kthread_setaffinity(struct rcu_node *rnp, int outgoingcpu) +@@ -1447,7 +1447,7 @@ static void rcu_boost_kthread_setaffinity(struct rcu_node *rnp, int outgoingcpu) free_cpumask_var(cm); } @@ -89843,7 +93606,7 @@ index 962d1d5..c6c62d12d 100644 .store = &rcu_cpu_kthread_task, .thread_should_run = rcu_cpu_kthread_should_run, .thread_fn = rcu_cpu_kthread, -@@ -1972,7 +1972,7 @@ static void print_cpu_stall_info(struct rcu_state *rsp, int cpu) +@@ -1926,7 +1926,7 @@ static void print_cpu_stall_info(struct rcu_state *rsp, int cpu) print_cpu_stall_fast_no_hz(fast_no_hz, cpu); pr_err("\t%d: (%lu %s) idle=%03x/%llx/%d softirq=%u/%u %s\n", cpu, ticks_value, ticks_title, @@ -89852,7 +93615,7 @@ index 962d1d5..c6c62d12d 100644 rdtp->dynticks_nesting, rdtp->dynticks_nmi_nesting, rdp->softirq_snap, kstat_softirqs_cpu(RCU_SOFTIRQ, cpu), fast_no_hz); -@@ -2138,7 +2138,7 @@ static void __call_rcu_nocb_enqueue(struct rcu_data *rdp, +@@ -2079,7 +2079,7 @@ static void __call_rcu_nocb_enqueue(struct rcu_data *rdp, /* Enqueue the callback on the nocb list and update counts. */ old_rhpp = xchg(&rdp->nocb_tail, rhtp); @@ -89861,7 +93624,7 @@ index 962d1d5..c6c62d12d 100644 atomic_long_add(rhcount, &rdp->nocb_q_count); atomic_long_add(rhcount_lazy, &rdp->nocb_q_count_lazy); -@@ -2311,12 +2311,12 @@ static int rcu_nocb_kthread(void *arg) +@@ -2255,12 +2255,12 @@ static int rcu_nocb_kthread(void *arg) * Extract queued callbacks, update counts, and wait * for a grace period to elapse. */ @@ -89877,7 +93640,7 @@ index 962d1d5..c6c62d12d 100644 rcu_nocb_wait_gp(rdp); /* Each pass through the following loop invokes a callback. */ -@@ -2342,8 +2342,8 @@ static int rcu_nocb_kthread(void *arg) +@@ -2286,8 +2286,8 @@ static int rcu_nocb_kthread(void *arg) list = next; } trace_rcu_batch_end(rdp->rsp->name, c, !!list, 0, 0, 1); @@ -89888,7 +93651,7 @@ index 962d1d5..c6c62d12d 100644 rdp->n_nocbs_invoked += c; } return 0; -@@ -2360,7 +2360,7 @@ static void do_nocb_deferred_wakeup(struct rcu_data *rdp) +@@ -2304,7 +2304,7 @@ static void do_nocb_deferred_wakeup(struct rcu_data *rdp) { if (!rcu_nocb_need_deferred_wakeup(rdp)) return; @@ -89897,7 +93660,7 @@ index 962d1d5..c6c62d12d 100644 wake_up(&rdp->nocb_wq); trace_rcu_nocb_wake(rdp->rsp->name, rdp->cpu, TPS("DeferredWakeEmpty")); } -@@ -2386,7 +2386,7 @@ static void __init rcu_spawn_nocb_kthreads(struct rcu_state *rsp) +@@ -2330,7 +2330,7 @@ static void __init rcu_spawn_nocb_kthreads(struct rcu_state *rsp) t = kthread_run(rcu_nocb_kthread, rdp, "rcuo%c/%d", rsp->abbr, cpu); BUG_ON(IS_ERR(t)); @@ -89906,34 +93669,34 @@ index 962d1d5..c6c62d12d 100644 } } -@@ -2522,11 +2522,11 @@ static void rcu_sysidle_enter(struct rcu_dynticks *rdtp, int irq) +@@ -2461,11 +2461,11 @@ static void rcu_sysidle_enter(struct rcu_dynticks *rdtp, int irq) /* Record start of fully idle period. */ j = jiffies; - ACCESS_ONCE(rdtp->dynticks_idle_jiffies) = j; + ACCESS_ONCE_RW(rdtp->dynticks_idle_jiffies) = j; - smp_mb__before_atomic_inc(); + smp_mb__before_atomic(); - atomic_inc(&rdtp->dynticks_idle); + atomic_inc_unchecked(&rdtp->dynticks_idle); - smp_mb__after_atomic_inc(); + smp_mb__after_atomic(); - WARN_ON_ONCE(atomic_read(&rdtp->dynticks_idle) & 0x1); + WARN_ON_ONCE(atomic_read_unchecked(&rdtp->dynticks_idle) & 0x1); } /* -@@ -2591,9 +2591,9 @@ static void rcu_sysidle_exit(struct rcu_dynticks *rdtp, int irq) +@@ -2530,9 +2530,9 @@ static void rcu_sysidle_exit(struct rcu_dynticks *rdtp, int irq) /* Record end of idle period. */ - smp_mb__before_atomic_inc(); + smp_mb__before_atomic(); - atomic_inc(&rdtp->dynticks_idle); + atomic_inc_unchecked(&rdtp->dynticks_idle); - smp_mb__after_atomic_inc(); + smp_mb__after_atomic(); - WARN_ON_ONCE(!(atomic_read(&rdtp->dynticks_idle) & 0x1)); + WARN_ON_ONCE(!(atomic_read_unchecked(&rdtp->dynticks_idle) & 0x1)); /* * If we are the timekeeping CPU, we are permitted to be non-idle -@@ -2634,7 +2634,7 @@ static void rcu_sysidle_check_cpu(struct rcu_data *rdp, bool *isidle, +@@ -2573,7 +2573,7 @@ static void rcu_sysidle_check_cpu(struct rcu_data *rdp, bool *isidle, WARN_ON_ONCE(smp_processor_id() != tick_do_timer_cpu); /* Pick up current idle and NMI-nesting counter and check. */ @@ -89942,7 +93705,7 @@ index 962d1d5..c6c62d12d 100644 if (cur & 0x1) { *isidle = false; /* We are not idle! */ return; -@@ -2697,7 +2697,7 @@ static void rcu_sysidle(unsigned long j) +@@ -2622,7 +2622,7 @@ static void rcu_sysidle(unsigned long j) case RCU_SYSIDLE_NOT: /* First time all are idle, so note a short idle period. */ @@ -89951,16 +93714,16 @@ index 962d1d5..c6c62d12d 100644 break; case RCU_SYSIDLE_SHORT: -@@ -2734,7 +2734,7 @@ static void rcu_sysidle(unsigned long j) - static void rcu_sysidle_cancel(void) +@@ -2660,7 +2660,7 @@ static void rcu_sysidle_cancel(void) { smp_mb(); -- ACCESS_ONCE(full_sysidle_state) = RCU_SYSIDLE_NOT; -+ ACCESS_ONCE_RW(full_sysidle_state) = RCU_SYSIDLE_NOT; + if (full_sysidle_state > RCU_SYSIDLE_SHORT) +- ACCESS_ONCE(full_sysidle_state) = RCU_SYSIDLE_NOT; ++ ACCESS_ONCE_RW(full_sysidle_state) = RCU_SYSIDLE_NOT; } /* -@@ -2782,7 +2782,7 @@ static void rcu_sysidle_cb(struct rcu_head *rhp) +@@ -2708,7 +2708,7 @@ static void rcu_sysidle_cb(struct rcu_head *rhp) smp_mb(); /* grace period precedes setting inuse. */ rshp = container_of(rhp, struct rcu_sysidle_head, rh); @@ -90011,7 +93774,7 @@ index 5cdc62e..cc52e88 100644 } diff --git a/kernel/rcu/update.c b/kernel/rcu/update.c -index 4c0a9b0..7e81362 100644 +index bc78835..7691a45 100644 --- a/kernel/rcu/update.c +++ b/kernel/rcu/update.c @@ -311,10 +311,10 @@ int rcu_jiffies_till_stall_check(void) @@ -90028,7 +93791,7 @@ index 4c0a9b0..7e81362 100644 } return till_stall_check * HZ + RCU_STALL_DELAY_DELTA; diff --git a/kernel/resource.c b/kernel/resource.c -index 8957d68..770cbe4 100644 +index 3c2237a..4568d96 100644 --- a/kernel/resource.c +++ b/kernel/resource.c @@ -152,8 +152,18 @@ static const struct file_operations proc_iomem_operations = { @@ -90104,10 +93867,10 @@ index a63f4dc..349bbb0 100644 unsigned long timeout) { diff --git a/kernel/sched/core.c b/kernel/sched/core.c -index 084d17f..e416b9f 100644 +index 0acf96b..80ba955 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -1775,7 +1775,7 @@ void set_numabalancing_state(bool enabled) +@@ -1849,7 +1849,7 @@ void set_numabalancing_state(bool enabled) int sysctl_numa_balancing(struct ctl_table *table, int write, void __user *buffer, size_t *lenp, loff_t *ppos) { @@ -90116,7 +93879,7 @@ index 084d17f..e416b9f 100644 int err; int state = numabalancing_enabled; -@@ -2238,8 +2238,10 @@ context_switch(struct rq *rq, struct task_struct *prev, +@@ -2312,8 +2312,10 @@ context_switch(struct rq *rq, struct task_struct *prev, next->active_mm = oldmm; atomic_inc(&oldmm->mm_count); enter_lazy_tlb(oldmm, next); @@ -90128,26 +93891,26 @@ index 084d17f..e416b9f 100644 if (!prev->mm) { prev->active_mm = NULL; -@@ -3004,6 +3006,8 @@ int can_nice(const struct task_struct *p, const int nice) +@@ -3081,6 +3083,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; + int nice_rlim = nice_to_rlimit(nice); + gr_learn_resource(p, RLIMIT_NICE, nice_rlim, 1); + return (nice_rlim <= task_rlimit(p, RLIMIT_NICE) || capable(CAP_SYS_NICE)); } -@@ -3037,7 +3041,8 @@ SYSCALL_DEFINE1(nice, int, increment) - if (nice > MAX_NICE) - nice = MAX_NICE; +@@ -3107,7 +3111,8 @@ SYSCALL_DEFINE1(nice, int, increment) + nice = task_nice(current) + increment; + nice = clamp_val(nice, MIN_NICE, MAX_NICE); - if (increment < 0 && !can_nice(current, nice)) + if (increment < 0 && (!can_nice(current, nice) || + gr_handle_chroot_nice())) return -EPERM; retval = security_task_setnice(current, nice); -@@ -3310,6 +3315,7 @@ recheck: +@@ -3380,6 +3385,7 @@ recheck: if (policy != p->policy && !rlim_rtprio) return -EPERM; @@ -90155,7 +93918,7 @@ index 084d17f..e416b9f 100644 /* can't increase priority */ if (attr->sched_priority > p->rt_priority && attr->sched_priority > rlim_rtprio) -@@ -4708,6 +4714,7 @@ void idle_task_exit(void) +@@ -4772,6 +4778,7 @@ void idle_task_exit(void) if (mm != &init_mm) { switch_mm(mm, &init_mm, current); @@ -90163,7 +93926,7 @@ index 084d17f..e416b9f 100644 finish_arch_post_lock_switch(); } mmdrop(mm); -@@ -4803,7 +4810,7 @@ static void migrate_tasks(unsigned int dead_cpu) +@@ -4867,7 +4874,7 @@ static void migrate_tasks(unsigned int dead_cpu) #if defined(CONFIG_SCHED_DEBUG) && defined(CONFIG_SYSCTL) @@ -90172,7 +93935,7 @@ index 084d17f..e416b9f 100644 { .procname = "sched_domain", .mode = 0555, -@@ -4820,17 +4827,17 @@ static struct ctl_table sd_ctl_root[] = { +@@ -4884,17 +4891,17 @@ static struct ctl_table sd_ctl_root[] = { {} }; @@ -90194,7 +93957,7 @@ index 084d17f..e416b9f 100644 /* * In the intermediate directories, both the child directory and -@@ -4838,22 +4845,25 @@ static void sd_free_ctl_entry(struct ctl_table **tablep) +@@ -4902,22 +4909,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. */ @@ -90226,7 +93989,7 @@ index 084d17f..e416b9f 100644 const char *procname, void *data, int maxlen, umode_t mode, proc_handler *proc_handler, bool load_idx) -@@ -4873,7 +4883,7 @@ set_table_entry(struct ctl_table *entry, +@@ -4937,7 +4947,7 @@ set_table_entry(struct ctl_table *entry, static struct ctl_table * sd_alloc_ctl_domain_table(struct sched_domain *sd) { @@ -90235,7 +93998,7 @@ index 084d17f..e416b9f 100644 if (table == NULL) return NULL; -@@ -4911,9 +4921,9 @@ sd_alloc_ctl_domain_table(struct sched_domain *sd) +@@ -4975,9 +4985,9 @@ sd_alloc_ctl_domain_table(struct sched_domain *sd) return table; } @@ -90247,7 +94010,7 @@ index 084d17f..e416b9f 100644 struct sched_domain *sd; int domain_num = 0, i; char buf[32]; -@@ -4940,11 +4950,13 @@ static struct ctl_table_header *sd_sysctl_header; +@@ -5004,11 +5014,13 @@ static struct ctl_table_header *sd_sysctl_header; static void register_sched_domain_sysctl(void) { int i, cpu_num = num_possible_cpus(); @@ -90262,7 +94025,7 @@ index 084d17f..e416b9f 100644 if (entry == NULL) return; -@@ -4967,8 +4979,12 @@ static void unregister_sched_domain_sysctl(void) +@@ -5031,8 +5043,12 @@ static void unregister_sched_domain_sysctl(void) if (sd_sysctl_header) unregister_sysctl_table(sd_sysctl_header); sd_sysctl_header = NULL; @@ -90278,10 +94041,10 @@ index 084d17f..e416b9f 100644 #else static void register_sched_domain_sysctl(void) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c -index 8cbe2d2..61f20a1 100644 +index fea7d33..84faa94 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c -@@ -1806,7 +1806,7 @@ void task_numa_fault(int last_cpupid, int mem_node, int pages, int flags) +@@ -1857,7 +1857,7 @@ void task_numa_fault(int last_cpupid, int mem_node, int pages, int flags) static void reset_ptenuma_scan(struct task_struct *p) { @@ -90290,7 +94053,7 @@ index 8cbe2d2..61f20a1 100644 p->mm->numa_scan_offset = 0; } -@@ -7181,7 +7181,7 @@ static void nohz_idle_balance(struct rq *this_rq, enum cpu_idle_type idle) { } +@@ -7289,7 +7289,7 @@ static void nohz_idle_balance(struct rq *this_rq, 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). */ @@ -90300,10 +94063,10 @@ index 8cbe2d2..61f20a1 100644 struct rq *this_rq = this_rq(); enum cpu_idle_type idle = this_rq->idle_balance ? diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h -index 369b4d6..fa4eb3b 100644 +index 31cc02e..734fb85 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h -@@ -1157,7 +1157,7 @@ struct sched_class { +@@ -1153,7 +1153,7 @@ struct sched_class { #ifdef CONFIG_FAIR_GROUP_SCHED void (*task_move_group) (struct task_struct *p, int on_rq); #endif @@ -90312,8 +94075,351 @@ index 369b4d6..fa4eb3b 100644 static inline void put_prev_task(struct rq *rq, struct task_struct *prev) { +diff --git a/kernel/seccomp.c b/kernel/seccomp.c +index 301bbc2..eda2da3 100644 +--- a/kernel/seccomp.c ++++ b/kernel/seccomp.c +@@ -39,7 +39,7 @@ + * is only needed for handling filters shared across tasks. + * @prev: points to a previously installed, or inherited, filter + * @len: the number of instructions in the program +- * @insnsi: the BPF program instructions to evaluate ++ * @insns: the BPF program instructions to evaluate + * + * seccomp_filter objects are organized in a tree linked via the @prev + * pointer. For any task, it appears to be a singly-linked list starting +@@ -54,32 +54,61 @@ + struct seccomp_filter { + atomic_t usage; + struct seccomp_filter *prev; +- struct sk_filter *prog; ++ unsigned short len; /* Instruction count */ ++ struct sock_filter insns[]; + }; + + /* Limit any path through the tree to 256KB worth of instructions. */ + #define MAX_INSNS_PER_PATH ((1 << 18) / sizeof(struct sock_filter)) + +-/* ++/** ++ * get_u32 - returns a u32 offset into data ++ * @data: a unsigned 64 bit value ++ * @index: 0 or 1 to return the first or second 32-bits ++ * ++ * This inline exists to hide the length of unsigned long. If a 32-bit ++ * unsigned long is passed in, it will be extended and the top 32-bits will be ++ * 0. If it is a 64-bit unsigned long, then whatever data is resident will be ++ * properly returned. ++ * + * Endianness is explicitly ignored and left for BPF program authors to manage + * as per the specific architecture. + */ +-static void populate_seccomp_data(struct seccomp_data *sd) ++static inline u32 get_u32(u64 data, int index) + { +- struct task_struct *task = current; +- struct pt_regs *regs = task_pt_regs(task); +- unsigned long args[6]; ++ return ((u32 *)&data)[index]; ++} + +- sd->nr = syscall_get_nr(task, regs); +- sd->arch = syscall_get_arch(); +- syscall_get_arguments(task, regs, 0, 6, args); +- sd->args[0] = args[0]; +- sd->args[1] = args[1]; +- sd->args[2] = args[2]; +- sd->args[3] = args[3]; +- sd->args[4] = args[4]; +- sd->args[5] = args[5]; +- sd->instruction_pointer = KSTK_EIP(task); ++/* Helper for bpf_load below. */ ++#define BPF_DATA(_name) offsetof(struct seccomp_data, _name) ++/** ++ * bpf_load: checks and returns a pointer to the requested offset ++ * @off: offset into struct seccomp_data to load from ++ * ++ * Returns the requested 32-bits of data. ++ * seccomp_check_filter() should assure that @off is 32-bit aligned ++ * and not out of bounds. Failure to do so is a BUG. ++ */ ++u32 seccomp_bpf_load(int off) ++{ ++ struct pt_regs *regs = task_pt_regs(current); ++ if (off == BPF_DATA(nr)) ++ return syscall_get_nr(current, regs); ++ if (off == BPF_DATA(arch)) ++ return syscall_get_arch(); ++ if (off >= BPF_DATA(args[0]) && off < BPF_DATA(args[6])) { ++ unsigned long value; ++ int arg = (off - BPF_DATA(args[0])) / sizeof(u64); ++ int index = !!(off % sizeof(u64)); ++ syscall_get_arguments(current, regs, arg, 1, &value); ++ return get_u32(value, index); ++ } ++ if (off == BPF_DATA(instruction_pointer)) ++ return get_u32(KSTK_EIP(current), 0); ++ if (off == BPF_DATA(instruction_pointer) + sizeof(u32)) ++ return get_u32(KSTK_EIP(current), 1); ++ /* seccomp_check_filter should make this impossible. */ ++ BUG(); + } + + /** +@@ -103,59 +132,59 @@ static int seccomp_check_filter(struct sock_filter *filter, unsigned int flen) + u32 k = ftest->k; + + switch (code) { +- case BPF_LD | BPF_W | BPF_ABS: +- ftest->code = BPF_LDX | BPF_W | BPF_ABS; ++ case BPF_S_LD_W_ABS: ++ ftest->code = BPF_S_ANC_SECCOMP_LD_W; + /* 32-bit aligned and not out of bounds. */ + if (k >= sizeof(struct seccomp_data) || k & 3) + return -EINVAL; + continue; +- case BPF_LD | BPF_W | BPF_LEN: +- ftest->code = BPF_LD | BPF_IMM; ++ case BPF_S_LD_W_LEN: ++ ftest->code = BPF_S_LD_IMM; + ftest->k = sizeof(struct seccomp_data); + continue; +- case BPF_LDX | BPF_W | BPF_LEN: +- ftest->code = BPF_LDX | BPF_IMM; ++ case BPF_S_LDX_W_LEN: ++ ftest->code = BPF_S_LDX_IMM; + ftest->k = sizeof(struct seccomp_data); + continue; + /* Explicitly include allowed calls. */ +- case BPF_RET | BPF_K: +- case BPF_RET | BPF_A: +- case BPF_ALU | BPF_ADD | BPF_K: +- case BPF_ALU | BPF_ADD | BPF_X: +- case BPF_ALU | BPF_SUB | BPF_K: +- case BPF_ALU | BPF_SUB | BPF_X: +- case BPF_ALU | BPF_MUL | BPF_K: +- case BPF_ALU | BPF_MUL | BPF_X: +- case BPF_ALU | BPF_DIV | BPF_K: +- case BPF_ALU | BPF_DIV | BPF_X: +- case BPF_ALU | BPF_AND | BPF_K: +- case BPF_ALU | BPF_AND | BPF_X: +- case BPF_ALU | BPF_OR | BPF_K: +- case BPF_ALU | BPF_OR | BPF_X: +- case BPF_ALU | BPF_XOR | BPF_K: +- case BPF_ALU | BPF_XOR | BPF_X: +- case BPF_ALU | BPF_LSH | BPF_K: +- case BPF_ALU | BPF_LSH | BPF_X: +- case BPF_ALU | BPF_RSH | BPF_K: +- case BPF_ALU | BPF_RSH | BPF_X: +- case BPF_ALU | BPF_NEG: +- case BPF_LD | BPF_IMM: +- case BPF_LDX | BPF_IMM: +- case BPF_MISC | BPF_TAX: +- case BPF_MISC | BPF_TXA: +- case BPF_LD | BPF_MEM: +- case BPF_LDX | BPF_MEM: +- case BPF_ST: +- case BPF_STX: +- case BPF_JMP | BPF_JA: +- case BPF_JMP | BPF_JEQ | BPF_K: +- case BPF_JMP | BPF_JEQ | BPF_X: +- case BPF_JMP | BPF_JGE | BPF_K: +- case BPF_JMP | BPF_JGE | BPF_X: +- case BPF_JMP | BPF_JGT | BPF_K: +- case BPF_JMP | BPF_JGT | BPF_X: +- case BPF_JMP | BPF_JSET | BPF_K: +- case BPF_JMP | BPF_JSET | BPF_X: ++ case BPF_S_RET_K: ++ case BPF_S_RET_A: ++ case BPF_S_ALU_ADD_K: ++ case BPF_S_ALU_ADD_X: ++ case BPF_S_ALU_SUB_K: ++ case BPF_S_ALU_SUB_X: ++ case BPF_S_ALU_MUL_K: ++ case BPF_S_ALU_MUL_X: ++ case BPF_S_ALU_DIV_X: ++ case BPF_S_ALU_AND_K: ++ case BPF_S_ALU_AND_X: ++ case BPF_S_ALU_OR_K: ++ case BPF_S_ALU_OR_X: ++ case BPF_S_ALU_XOR_K: ++ case BPF_S_ALU_XOR_X: ++ case BPF_S_ALU_LSH_K: ++ case BPF_S_ALU_LSH_X: ++ case BPF_S_ALU_RSH_K: ++ case BPF_S_ALU_RSH_X: ++ case BPF_S_ALU_NEG: ++ case BPF_S_LD_IMM: ++ case BPF_S_LDX_IMM: ++ case BPF_S_MISC_TAX: ++ case BPF_S_MISC_TXA: ++ case BPF_S_ALU_DIV_K: ++ case BPF_S_LD_MEM: ++ case BPF_S_LDX_MEM: ++ case BPF_S_ST: ++ case BPF_S_STX: ++ case BPF_S_JMP_JA: ++ case BPF_S_JMP_JEQ_K: ++ case BPF_S_JMP_JEQ_X: ++ case BPF_S_JMP_JGE_K: ++ case BPF_S_JMP_JGE_X: ++ case BPF_S_JMP_JGT_K: ++ case BPF_S_JMP_JGT_X: ++ case BPF_S_JMP_JSET_K: ++ case BPF_S_JMP_JSET_X: + continue; + default: + return -EINVAL; +@@ -173,22 +202,18 @@ static int seccomp_check_filter(struct sock_filter *filter, unsigned int flen) + static u32 seccomp_run_filters(int syscall) + { + struct seccomp_filter *f; +- struct seccomp_data sd; + u32 ret = SECCOMP_RET_ALLOW; + + /* Ensure unexpected behavior doesn't result in failing open. */ + if (WARN_ON(current->seccomp.filter == NULL)) + return SECCOMP_RET_KILL; + +- populate_seccomp_data(&sd); +- + /* + * All filters in the list are evaluated and the lowest BPF return + * value always takes priority (ignoring the DATA). + */ + for (f = current->seccomp.filter; f; f = f->prev) { +- u32 cur_ret = SK_RUN_FILTER(f->prog, (void *)&sd); +- ++ u32 cur_ret = sk_run_filter(NULL, f->insns); + if ((cur_ret & SECCOMP_RET_ACTION) < (ret & SECCOMP_RET_ACTION)) + ret = cur_ret; + } +@@ -206,20 +231,18 @@ static long seccomp_attach_filter(struct sock_fprog *fprog) + struct seccomp_filter *filter; + unsigned long fp_size = fprog->len * sizeof(struct sock_filter); + unsigned long total_insns = fprog->len; +- struct sock_filter *fp; +- int new_len; + long ret; + + if (fprog->len == 0 || fprog->len > BPF_MAXINSNS) + return -EINVAL; + + for (filter = current->seccomp.filter; filter; filter = filter->prev) +- total_insns += filter->prog->len + 4; /* include a 4 instr penalty */ ++ total_insns += filter->len + 4; /* include a 4 instr penalty */ + if (total_insns > MAX_INSNS_PER_PATH) + return -ENOMEM; + + /* +- * Installing a seccomp filter requires that the task has ++ * Installing a seccomp filter requires that the task have + * CAP_SYS_ADMIN in its namespace or be running with no_new_privs. + * This avoids scenarios where unprivileged tasks can affect the + * behavior of privileged children. +@@ -229,51 +252,28 @@ static long seccomp_attach_filter(struct sock_fprog *fprog) + CAP_SYS_ADMIN) != 0) + return -EACCES; + +- fp = kzalloc(fp_size, GFP_KERNEL|__GFP_NOWARN); +- if (!fp) +- return -ENOMEM; +- +- /* Copy the instructions from fprog. */ +- ret = -EFAULT; +- if (copy_from_user(fp, fprog->filter, fp_size)) +- goto free_prog; +- +- /* Check and rewrite the fprog via the skb checker */ +- ret = sk_chk_filter(fp, fprog->len); +- if (ret) +- goto free_prog; +- +- /* Check and rewrite the fprog for seccomp use */ +- ret = seccomp_check_filter(fp, fprog->len); +- if (ret) +- goto free_prog; +- +- /* Convert 'sock_filter' insns to 'sock_filter_int' insns */ +- ret = sk_convert_filter(fp, fprog->len, NULL, &new_len); +- if (ret) +- goto free_prog; +- + /* Allocate a new seccomp_filter */ +- ret = -ENOMEM; +- filter = kzalloc(sizeof(struct seccomp_filter), ++ filter = kzalloc(sizeof(struct seccomp_filter) + fp_size, + GFP_KERNEL|__GFP_NOWARN); + if (!filter) +- goto free_prog; +- +- filter->prog = kzalloc(sk_filter_size(new_len), +- GFP_KERNEL|__GFP_NOWARN); +- if (!filter->prog) +- goto free_filter; +- +- ret = sk_convert_filter(fp, fprog->len, filter->prog->insnsi, &new_len); +- if (ret) +- goto free_filter_prog; +- kfree(fp); +- ++ return -ENOMEM; + atomic_set(&filter->usage, 1); +- filter->prog->len = new_len; ++ filter->len = fprog->len; + +- sk_filter_select_runtime(filter->prog); ++ /* Copy the instructions from fprog. */ ++ ret = -EFAULT; ++ if (copy_from_user(filter->insns, fprog->filter, fp_size)) ++ goto fail; ++ ++ /* Check and rewrite the fprog via the skb checker */ ++ ret = sk_chk_filter(filter->insns, filter->len); ++ if (ret) ++ goto fail; ++ ++ /* Check and rewrite the fprog for seccomp use */ ++ ret = seccomp_check_filter(filter->insns, filter->len); ++ if (ret) ++ goto fail; + + /* + * If there is an existing filter, make it the prev and don't drop its +@@ -282,13 +282,8 @@ static long seccomp_attach_filter(struct sock_fprog *fprog) + filter->prev = current->seccomp.filter; + current->seccomp.filter = filter; + return 0; +- +-free_filter_prog: +- kfree(filter->prog); +-free_filter: ++fail: + kfree(filter); +-free_prog: +- kfree(fp); + return ret; + } + +@@ -298,7 +293,7 @@ free_prog: + * + * Returns 0 on success and non-zero otherwise. + */ +-static long seccomp_attach_user_filter(char __user *user_filter) ++long seccomp_attach_user_filter(char __user *user_filter) + { + struct sock_fprog fprog; + long ret = -EFAULT; +@@ -337,7 +332,6 @@ void put_seccomp_filter(struct task_struct *tsk) + while (orig && atomic_dec_and_test(&orig->usage)) { + struct seccomp_filter *freeme = orig; + orig = orig->prev; +- sk_filter_free(freeme->prog); + kfree(freeme); + } + } diff --git a/kernel/signal.c b/kernel/signal.c -index 6ea13c0..31e3b25 100644 +index a4077e9..f0d4e5c 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -53,12 +53,12 @@ static struct kmem_cache *sigqueue_cachep; @@ -90340,7 +94446,7 @@ index 6ea13c0..31e3b25 100644 handler = sig_handler(t, sig); -@@ -371,6 +371,9 @@ __sigqueue_alloc(int sig, struct task_struct *t, gfp_t flags, int override_rlimi +@@ -372,6 +372,9 @@ __sigqueue_alloc(int sig, struct task_struct *t, gfp_t flags, int override_rlimi atomic_inc(&user->sigpending); rcu_read_unlock(); @@ -90350,7 +94456,7 @@ index 6ea13c0..31e3b25 100644 if (override_rlimit || atomic_read(&user->sigpending) <= task_rlimit(t, RLIMIT_SIGPENDING)) { -@@ -498,7 +501,7 @@ flush_signal_handlers(struct task_struct *t, int force_default) +@@ -499,7 +502,7 @@ flush_signal_handlers(struct task_struct *t, int force_default) int unhandled_signal(struct task_struct *tsk, int sig) { @@ -90359,7 +94465,7 @@ index 6ea13c0..31e3b25 100644 if (is_global_init(tsk)) return 1; if (handler != SIG_IGN && handler != SIG_DFL) -@@ -818,6 +821,13 @@ static int check_kill_permission(int sig, struct siginfo *info, +@@ -793,6 +796,13 @@ static int check_kill_permission(int sig, struct siginfo *info, } } @@ -90373,7 +94479,7 @@ index 6ea13c0..31e3b25 100644 return security_task_kill(t, info, sig, 0); } -@@ -1201,7 +1211,7 @@ __group_send_sig_info(int sig, struct siginfo *info, struct task_struct *p) +@@ -1176,7 +1186,7 @@ __group_send_sig_info(int sig, struct siginfo *info, struct task_struct *p) return send_signal(sig, info, p, 1); } @@ -90382,7 +94488,7 @@ index 6ea13c0..31e3b25 100644 specific_send_sig_info(int sig, struct siginfo *info, struct task_struct *t) { return send_signal(sig, info, t, 0); -@@ -1238,6 +1248,7 @@ force_sig_info(int sig, struct siginfo *info, struct task_struct *t) +@@ -1213,6 +1223,7 @@ force_sig_info(int sig, struct siginfo *info, struct task_struct *t) unsigned long int flags; int ret, blocked, ignored; struct k_sigaction *action; @@ -90390,7 +94496,7 @@ index 6ea13c0..31e3b25 100644 spin_lock_irqsave(&t->sighand->siglock, flags); action = &t->sighand->action[sig-1]; -@@ -1252,9 +1263,18 @@ force_sig_info(int sig, struct siginfo *info, struct task_struct *t) +@@ -1227,9 +1238,18 @@ force_sig_info(int sig, struct siginfo *info, struct task_struct *t) } if (action->sa.sa_handler == SIG_DFL) t->signal->flags &= ~SIGNAL_UNKILLABLE; @@ -90409,7 +94515,7 @@ index 6ea13c0..31e3b25 100644 return ret; } -@@ -1321,8 +1341,11 @@ int group_send_sig_info(int sig, struct siginfo *info, struct task_struct *p) +@@ -1296,8 +1316,11 @@ int group_send_sig_info(int sig, struct siginfo *info, struct task_struct *p) ret = check_kill_permission(sig, info, p); rcu_read_unlock(); @@ -90422,7 +94528,7 @@ index 6ea13c0..31e3b25 100644 return ret; } -@@ -2928,7 +2951,15 @@ do_send_specific(pid_t tgid, pid_t pid, int sig, struct siginfo *info) +@@ -2903,7 +2926,15 @@ do_send_specific(pid_t tgid, pid_t pid, int sig, struct siginfo *info) int error = -ESRCH; rcu_read_lock(); @@ -90439,7 +94545,7 @@ index 6ea13c0..31e3b25 100644 if (p && (tgid <= 0 || task_tgid_vnr(p) == tgid)) { error = check_kill_permission(sig, info, p); /* -@@ -3241,8 +3272,8 @@ COMPAT_SYSCALL_DEFINE2(sigaltstack, +@@ -3236,8 +3267,8 @@ COMPAT_SYSCALL_DEFINE2(sigaltstack, } seg = get_fs(); set_fs(KERNEL_DS); @@ -90473,7 +94579,7 @@ index eb89e18..a4e6792 100644 mutex_unlock(&smpboot_threads_lock); put_online_cpus(); diff --git a/kernel/softirq.c b/kernel/softirq.c -index 92f24f5..db41501 100644 +index 5918d22..e95d1926 100644 --- a/kernel/softirq.c +++ b/kernel/softirq.c @@ -53,7 +53,7 @@ irq_cpustat_t irq_stat[NR_CPUS] ____cacheline_aligned; @@ -90485,7 +94591,7 @@ index 92f24f5..db41501 100644 DEFINE_PER_CPU(struct task_struct *, ksoftirqd); -@@ -268,7 +268,7 @@ restart: +@@ -266,7 +266,7 @@ restart: kstat_incr_softirqs_this_cpu(vec_nr); trace_softirq_entry(vec_nr); @@ -90494,7 +94600,7 @@ index 92f24f5..db41501 100644 trace_softirq_exit(vec_nr); if (unlikely(prev_count != preempt_count())) { pr_err("huh, entered softirq %u %s %p with preempt_count %08x, exited with %08x?\n", -@@ -428,7 +428,7 @@ void __raise_softirq_irqoff(unsigned int nr) +@@ -426,7 +426,7 @@ void __raise_softirq_irqoff(unsigned int nr) or_softirq_pending(1UL << nr); } @@ -90503,7 +94609,7 @@ index 92f24f5..db41501 100644 { softirq_vec[nr].action = action; } -@@ -480,7 +480,7 @@ void __tasklet_hi_schedule_first(struct tasklet_struct *t) +@@ -478,7 +478,7 @@ void __tasklet_hi_schedule_first(struct tasklet_struct *t) } EXPORT_SYMBOL(__tasklet_hi_schedule_first); @@ -90512,7 +94618,7 @@ index 92f24f5..db41501 100644 { struct tasklet_struct *list; -@@ -516,7 +516,7 @@ static void tasklet_action(struct softirq_action *a) +@@ -514,7 +514,7 @@ static void tasklet_action(struct softirq_action *a) } } @@ -90521,7 +94627,7 @@ index 92f24f5..db41501 100644 { struct tasklet_struct *list; -@@ -743,7 +743,7 @@ static struct notifier_block cpu_nfb = { +@@ -741,7 +741,7 @@ static struct notifier_block cpu_nfb = { .notifier_call = cpu_callback }; @@ -90531,7 +94637,7 @@ index 92f24f5..db41501 100644 .thread_should_run = ksoftirqd_should_run, .thread_fn = run_ksoftirqd, diff --git a/kernel/sys.c b/kernel/sys.c -index fba0f29..84400e2 100644 +index 66a751e..a42497e 100644 --- a/kernel/sys.c +++ b/kernel/sys.c @@ -148,6 +148,12 @@ static int set_one_prio(struct task_struct *p, int niceval, int error) @@ -90547,17 +94653,28 @@ index fba0f29..84400e2 100644 no_nice = security_task_setnice(p, niceval); if (no_nice) { error = no_nice; -@@ -351,6 +357,9 @@ SYSCALL_DEFINE2(setregid, gid_t, rgid, gid_t, egid) +@@ -351,6 +357,20 @@ SYSCALL_DEFINE2(setregid, gid_t, rgid, gid_t, egid) goto error; } + if (gr_check_group_change(new->gid, new->egid, INVALID_GID)) + goto error; ++ ++ if (!gid_eq(new->gid, old->gid)) { ++ /* make sure we generate a learn log for what will ++ end up being a role transition after a full-learning ++ policy is generated ++ CAP_SETGID is required to perform a transition ++ we may not log a CAP_SETGID check above, e.g. ++ in the case where new rgid = old egid ++ */ ++ gr_learn_cap(current, new, CAP_SETGID); ++ } + if (rgid != (gid_t) -1 || (egid != (gid_t) -1 && !gid_eq(kegid, old->gid))) new->sgid = new->egid; -@@ -386,6 +395,10 @@ SYSCALL_DEFINE1(setgid, gid_t, gid) +@@ -386,6 +406,10 @@ SYSCALL_DEFINE1(setgid, gid_t, gid) old = current_cred(); retval = -EPERM; @@ -90568,7 +94685,7 @@ index fba0f29..84400e2 100644 if (ns_capable(old->user_ns, CAP_SETGID)) new->gid = new->egid = new->sgid = new->fsgid = kgid; else if (gid_eq(kgid, old->gid) || gid_eq(kgid, old->sgid)) -@@ -403,7 +416,7 @@ error: +@@ -403,7 +427,7 @@ error: /* * change the user struct in a credentials set to match the new UID */ @@ -90577,7 +94694,7 @@ index fba0f29..84400e2 100644 { struct user_struct *new_user; -@@ -483,6 +496,9 @@ SYSCALL_DEFINE2(setreuid, uid_t, ruid, uid_t, euid) +@@ -483,7 +507,18 @@ SYSCALL_DEFINE2(setreuid, uid_t, ruid, uid_t, euid) goto error; } @@ -90585,9 +94702,18 @@ index fba0f29..84400e2 100644 + goto error; + if (!uid_eq(new->uid, old->uid)) { ++ /* make sure we generate a learn log for what will ++ end up being a role transition after a full-learning ++ policy is generated ++ CAP_SETUID is required to perform a transition ++ we may not log a CAP_SETUID check above, e.g. ++ in the case where new ruid = old euid ++ */ ++ gr_learn_cap(current, new, CAP_SETUID); retval = set_user(new); if (retval < 0) -@@ -533,6 +549,12 @@ SYSCALL_DEFINE1(setuid, uid_t, uid) + goto error; +@@ -533,6 +568,12 @@ SYSCALL_DEFINE1(setuid, uid_t, uid) old = current_cred(); retval = -EPERM; @@ -90600,7 +94726,7 @@ index fba0f29..84400e2 100644 if (ns_capable(old->user_ns, CAP_SETUID)) { new->suid = new->uid = kuid; if (!uid_eq(kuid, old->uid)) { -@@ -602,6 +624,9 @@ SYSCALL_DEFINE3(setresuid, uid_t, ruid, uid_t, euid, uid_t, suid) +@@ -602,6 +643,9 @@ SYSCALL_DEFINE3(setresuid, uid_t, ruid, uid_t, euid, uid_t, suid) goto error; } @@ -90610,7 +94736,7 @@ index fba0f29..84400e2 100644 if (ruid != (uid_t) -1) { new->uid = kruid; if (!uid_eq(kruid, old->uid)) { -@@ -684,6 +709,9 @@ SYSCALL_DEFINE3(setresgid, gid_t, rgid, gid_t, egid, gid_t, sgid) +@@ -684,6 +728,9 @@ SYSCALL_DEFINE3(setresgid, gid_t, rgid, gid_t, egid, gid_t, sgid) goto error; } @@ -90620,7 +94746,7 @@ index fba0f29..84400e2 100644 if (rgid != (gid_t) -1) new->gid = krgid; if (egid != (gid_t) -1) -@@ -745,12 +773,16 @@ SYSCALL_DEFINE1(setfsuid, uid_t, uid) +@@ -745,12 +792,16 @@ SYSCALL_DEFINE1(setfsuid, uid_t, uid) uid_eq(kuid, old->suid) || uid_eq(kuid, old->fsuid) || ns_capable(old->user_ns, CAP_SETUID)) { if (!uid_eq(kuid, old->fsuid)) { @@ -90637,7 +94763,7 @@ index fba0f29..84400e2 100644 abort_creds(new); return old_fsuid; -@@ -783,12 +815,16 @@ SYSCALL_DEFINE1(setfsgid, gid_t, gid) +@@ -783,12 +834,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) || ns_capable(old->user_ns, CAP_SETGID)) { @@ -90654,7 +94780,7 @@ index fba0f29..84400e2 100644 abort_creds(new); return old_fsgid; -@@ -1167,19 +1203,19 @@ SYSCALL_DEFINE1(olduname, struct oldold_utsname __user *, name) +@@ -1167,19 +1222,19 @@ SYSCALL_DEFINE1(olduname, struct oldold_utsname __user *, name) return -EFAULT; down_read(&uts_sem); @@ -90679,7 +94805,7 @@ index fba0f29..84400e2 100644 __OLD_UTS_LEN); error |= __put_user(0, name->machine + __OLD_UTS_LEN); up_read(&uts_sem); -@@ -1381,6 +1417,13 @@ int do_prlimit(struct task_struct *tsk, unsigned int resource, +@@ -1381,6 +1436,13 @@ int do_prlimit(struct task_struct *tsk, unsigned int resource, */ new_rlim->rlim_cur = 1; } @@ -90694,7 +94820,7 @@ index fba0f29..84400e2 100644 if (!retval) { if (old_rlim) diff --git a/kernel/sysctl.c b/kernel/sysctl.c -index 0e0373f..69f5181 100644 +index 75b22e2..65c0ac8 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -94,7 +94,6 @@ @@ -90735,7 +94861,7 @@ index 0e0373f..69f5181 100644 #endif /* this is needed for the proc_doulongvec_minmax of vm_dirty_bytes */ -@@ -178,10 +178,8 @@ static int proc_taint(struct ctl_table *table, int write, +@@ -181,10 +181,8 @@ static int proc_taint(struct ctl_table *table, int write, void __user *buffer, size_t *lenp, loff_t *ppos); #endif @@ -90746,7 +94872,7 @@ index 0e0373f..69f5181 100644 static int proc_dointvec_minmax_coredump(struct ctl_table *table, int write, void __user *buffer, size_t *lenp, loff_t *ppos); -@@ -212,6 +210,8 @@ static int sysrq_sysctl_handler(ctl_table *table, int write, +@@ -215,6 +213,8 @@ static int sysrq_sysctl_handler(struct ctl_table *table, int write, #endif @@ -90755,7 +94881,7 @@ index 0e0373f..69f5181 100644 static struct ctl_table kern_table[]; static struct ctl_table vm_table[]; static struct ctl_table fs_table[]; -@@ -226,6 +226,20 @@ extern struct ctl_table epoll_table[]; +@@ -229,6 +229,20 @@ extern struct ctl_table epoll_table[]; int sysctl_legacy_va_layout; #endif @@ -90776,7 +94902,7 @@ index 0e0373f..69f5181 100644 /* The default sysctl tables: */ static struct ctl_table sysctl_base_table[] = { -@@ -274,6 +288,22 @@ static int max_extfrag_threshold = 1000; +@@ -277,6 +291,22 @@ static int max_extfrag_threshold = 1000; #endif static struct ctl_table kern_table[] = { @@ -90799,7 +94925,7 @@ index 0e0373f..69f5181 100644 { .procname = "sched_child_runs_first", .data = &sysctl_sched_child_runs_first, -@@ -629,7 +659,7 @@ static struct ctl_table kern_table[] = { +@@ -641,7 +671,7 @@ static struct ctl_table kern_table[] = { .data = &modprobe_path, .maxlen = KMOD_PATH_LEN, .mode = 0644, @@ -90808,7 +94934,7 @@ index 0e0373f..69f5181 100644 }, { .procname = "modules_disabled", -@@ -796,16 +826,20 @@ static struct ctl_table kern_table[] = { +@@ -808,16 +838,20 @@ static struct ctl_table kern_table[] = { .extra1 = &zero, .extra2 = &one, }, @@ -90830,7 +94956,7 @@ index 0e0373f..69f5181 100644 { .procname = "ngroups_max", .data = &ngroups_max, -@@ -1050,10 +1084,17 @@ static struct ctl_table kern_table[] = { +@@ -1073,10 +1107,17 @@ static struct ctl_table kern_table[] = { */ { .procname = "perf_event_paranoid", @@ -90851,7 +94977,7 @@ index 0e0373f..69f5181 100644 }, { .procname = "perf_event_mlock_kb", -@@ -1315,6 +1356,13 @@ static struct ctl_table vm_table[] = { +@@ -1338,6 +1379,13 @@ static struct ctl_table vm_table[] = { .proc_handler = proc_dointvec_minmax, .extra1 = &zero, }, @@ -90865,8 +94991,8 @@ index 0e0373f..69f5181 100644 #else { .procname = "nr_trim_pages", -@@ -1779,6 +1827,16 @@ int proc_dostring(struct ctl_table *table, int write, - buffer, lenp, ppos); +@@ -1827,6 +1875,16 @@ int proc_dostring(struct ctl_table *table, int write, + (char __user *)buffer, lenp, ppos); } +int proc_dostring_modpriv(struct ctl_table *table, int write, @@ -90882,7 +95008,7 @@ index 0e0373f..69f5181 100644 static size_t proc_skip_spaces(char **buf) { size_t ret; -@@ -1884,6 +1942,8 @@ static int proc_put_long(void __user **buf, size_t *size, unsigned long val, +@@ -1932,6 +1990,8 @@ static int proc_put_long(void __user **buf, size_t *size, unsigned long val, len = strlen(tmp); if (len > *size) len = *size; @@ -90891,7 +95017,7 @@ index 0e0373f..69f5181 100644 if (copy_to_user(*buf, tmp, len)) return -EFAULT; *size -= len; -@@ -2048,7 +2108,7 @@ int proc_dointvec(struct ctl_table *table, int write, +@@ -2109,7 +2169,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) { @@ -90900,7 +95026,7 @@ index 0e0373f..69f5181 100644 unsigned long tmptaint = get_taint(); int err; -@@ -2076,7 +2136,6 @@ static int proc_taint(struct ctl_table *table, int write, +@@ -2137,7 +2197,6 @@ static int proc_taint(struct ctl_table *table, int write, return err; } @@ -90908,7 +95034,7 @@ index 0e0373f..69f5181 100644 static int proc_dointvec_minmax_sysadmin(struct ctl_table *table, int write, void __user *buffer, size_t *lenp, loff_t *ppos) { -@@ -2085,7 +2144,6 @@ static int proc_dointvec_minmax_sysadmin(struct ctl_table *table, int write, +@@ -2146,7 +2205,6 @@ static int proc_dointvec_minmax_sysadmin(struct ctl_table *table, int write, return proc_dointvec_minmax(table, write, buffer, lenp, ppos); } @@ -90916,7 +95042,7 @@ index 0e0373f..69f5181 100644 struct do_proc_dointvec_minmax_conv_param { int *min; -@@ -2632,6 +2690,12 @@ int proc_dostring(struct ctl_table *table, int write, +@@ -2706,6 +2764,12 @@ int proc_dostring(struct ctl_table *table, int write, return -ENOSYS; } @@ -90929,7 +95055,7 @@ index 0e0373f..69f5181 100644 int proc_dointvec(struct ctl_table *table, int write, void __user *buffer, size_t *lenp, loff_t *ppos) { -@@ -2688,5 +2752,6 @@ EXPORT_SYMBOL(proc_dointvec_minmax); +@@ -2762,5 +2826,6 @@ EXPORT_SYMBOL(proc_dointvec_minmax); EXPORT_SYMBOL(proc_dointvec_userhz_jiffies); EXPORT_SYMBOL(proc_dointvec_ms_jiffies); EXPORT_SYMBOL(proc_dostring); @@ -90980,10 +95106,10 @@ index 7c7964c..2a0d412 100644 update_vsyscall_tz(); if (firsttime) { diff --git a/kernel/time/alarmtimer.c b/kernel/time/alarmtimer.c -index 88c9c65..7497ebc 100644 +index fe75444..190c528 100644 --- a/kernel/time/alarmtimer.c +++ b/kernel/time/alarmtimer.c -@@ -795,7 +795,7 @@ static int __init alarmtimer_init(void) +@@ -811,7 +811,7 @@ static int __init alarmtimer_init(void) struct platform_device *pdev; int error = 0; int i; @@ -90993,7 +95119,7 @@ index 88c9c65..7497ebc 100644 .clock_get = alarm_clock_get, .timer_create = alarm_timer_create, diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c -index f7df8ea..0810193 100644 +index 32d8d6a..11486af 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c @@ -15,6 +15,7 @@ @@ -91153,10 +95279,10 @@ index 3bb01a3..0e7760e 100644 struct timer_list timer; unsigned long expire; diff --git a/kernel/torture.c b/kernel/torture.c -index acc9afc..4f9eb49 100644 +index 40bb511..91190b9 100644 --- a/kernel/torture.c +++ b/kernel/torture.c -@@ -489,7 +489,7 @@ static int torture_shutdown_notify(struct notifier_block *unused1, +@@ -484,7 +484,7 @@ static int torture_shutdown_notify(struct notifier_block *unused1, mutex_lock(&fullstop_mutex); if (ACCESS_ONCE(fullstop) == FULLSTOP_DONTSTOP) { VERBOSE_TOROUT_STRING("Unscheduled system shutdown detected"); @@ -91165,10 +95291,14 @@ index acc9afc..4f9eb49 100644 } else { pr_warn("Concurrent rmmod and shutdown illegal!\n"); } -@@ -551,11 +551,11 @@ static int torture_stutter(void *arg) - do { +@@ -551,14 +551,14 @@ static int torture_stutter(void *arg) if (!torture_must_stop()) { - schedule_timeout_interruptible(stutter); + if (stutter > 1) { + schedule_timeout_interruptible(stutter - 1); +- ACCESS_ONCE(stutter_pause_test) = 2; ++ ACCESS_ONCE_RW(stutter_pause_test) = 2; + } + schedule_timeout_interruptible(1); - ACCESS_ONCE(stutter_pause_test) = 1; + ACCESS_ONCE_RW(stutter_pause_test) = 1; } @@ -91179,7 +95309,7 @@ index acc9afc..4f9eb49 100644 torture_shutdown_absorb("torture_stutter"); } while (!torture_must_stop()); torture_kthread_stopping("torture_stutter"); -@@ -636,7 +636,7 @@ bool torture_cleanup(void) +@@ -645,7 +645,7 @@ bool torture_cleanup(void) schedule_timeout_uninterruptible(10); return true; } @@ -91220,10 +95350,10 @@ index c1bd4ad..4b861dc 100644 ret = -EIO; diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c -index 4a54a25..7ca9c89 100644 +index ac9d1da..ce98b35 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c -@@ -1960,12 +1960,17 @@ ftrace_code_disable(struct module *mod, struct dyn_ftrace *rec) +@@ -1920,12 +1920,17 @@ ftrace_code_disable(struct module *mod, struct dyn_ftrace *rec) if (unlikely(ftrace_disabled)) return 0; @@ -91243,7 +95373,7 @@ index 4a54a25..7ca9c89 100644 } /* -@@ -4195,8 +4200,10 @@ static int ftrace_process_locs(struct module *mod, +@@ -4126,8 +4131,10 @@ static int ftrace_process_locs(struct module *mod, if (!count) return 0; @@ -91254,36 +95384,8 @@ index 4a54a25..7ca9c89 100644 start_pg = ftrace_allocate_pages(count); if (!start_pg) -@@ -4908,8 +4915,6 @@ ftrace_enable_sysctl(struct ctl_table *table, int write, - #ifdef CONFIG_FUNCTION_GRAPH_TRACER - - static int ftrace_graph_active; --static struct notifier_block ftrace_suspend_notifier; -- - int ftrace_graph_entry_stub(struct ftrace_graph_ent *trace) - { - return 0; -@@ -5085,6 +5090,10 @@ static void update_function_graph_func(void) - ftrace_graph_entry = ftrace_graph_entry_test; - } - -+static struct notifier_block ftrace_suspend_notifier = { -+ .notifier_call = ftrace_suspend_notifier_call -+}; -+ - int register_ftrace_graph(trace_func_graph_ret_t retfunc, - trace_func_graph_ent_t entryfunc) - { -@@ -5098,7 +5107,6 @@ int register_ftrace_graph(trace_func_graph_ret_t retfunc, - goto out; - } - -- ftrace_suspend_notifier.notifier_call = ftrace_suspend_notifier_call; - register_pm_notifier(&ftrace_suspend_notifier); - - ftrace_graph_active++; diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c -index 7c56c3d..9980576 100644 +index ff70271..4242e69 100644 --- a/kernel/trace/ring_buffer.c +++ b/kernel/trace/ring_buffer.c @@ -352,9 +352,9 @@ struct buffer_data_page { @@ -91309,7 +95411,31 @@ index 7c56c3d..9980576 100644 local_t dropped_events; local_t committing; local_t commits; -@@ -995,8 +995,8 @@ static int rb_tail_page_update(struct ring_buffer_per_cpu *cpu_buffer, +@@ -626,8 +626,22 @@ int ring_buffer_poll_wait(struct ring_buffer *buffer, int cpu, + work = &cpu_buffer->irq_work; + } + +- work->waiters_pending = true; + poll_wait(filp, &work->waiters, poll_table); ++ work->waiters_pending = true; ++ /* ++ * There's a tight race between setting the waiters_pending and ++ * checking if the ring buffer is empty. Once the waiters_pending bit ++ * is set, the next event will wake the task up, but we can get stuck ++ * if there's only a single event in. ++ * ++ * FIXME: Ideally, we need a memory barrier on the writer side as well, ++ * but adding a memory barrier to all events will cause too much of a ++ * performance hit in the fast path. We only need a memory barrier when ++ * the buffer goes from empty to having content. But as this race is ++ * extremely small, and it's not a problem if another event comes in, we ++ * will fix it later. ++ */ ++ smp_mb(); + + if ((cpu == RING_BUFFER_ALL_CPUS && !ring_buffer_empty(buffer)) || + (cpu != RING_BUFFER_ALL_CPUS && !ring_buffer_empty_cpu(buffer, cpu))) +@@ -991,8 +1005,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. */ @@ -91320,7 +95446,7 @@ index 7c56c3d..9980576 100644 /* * Just make sure we have seen our old_write and synchronize -@@ -1024,8 +1024,8 @@ static int rb_tail_page_update(struct ring_buffer_per_cpu *cpu_buffer, +@@ -1020,8 +1034,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. */ @@ -91331,7 +95457,7 @@ index 7c56c3d..9980576 100644 /* * No need to worry about races with clearing out the commit. -@@ -1392,12 +1392,12 @@ static void rb_reset_cpu(struct ring_buffer_per_cpu *cpu_buffer); +@@ -1388,12 +1402,12 @@ static void rb_reset_cpu(struct ring_buffer_per_cpu *cpu_buffer); static inline unsigned long rb_page_entries(struct buffer_page *bpage) { @@ -91346,7 +95472,7 @@ index 7c56c3d..9980576 100644 } static int -@@ -1492,7 +1492,7 @@ rb_remove_pages(struct ring_buffer_per_cpu *cpu_buffer, unsigned int nr_pages) +@@ -1488,7 +1502,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. */ @@ -91355,7 +95481,7 @@ index 7c56c3d..9980576 100644 local_sub(BUF_PAGE_SIZE, &cpu_buffer->entries_bytes); } -@@ -2070,7 +2070,7 @@ rb_handle_head_page(struct ring_buffer_per_cpu *cpu_buffer, +@@ -2066,7 +2080,7 @@ rb_handle_head_page(struct ring_buffer_per_cpu *cpu_buffer, * it is our responsibility to update * the counters. */ @@ -91364,7 +95490,7 @@ index 7c56c3d..9980576 100644 local_sub(BUF_PAGE_SIZE, &cpu_buffer->entries_bytes); /* -@@ -2220,7 +2220,7 @@ rb_reset_tail(struct ring_buffer_per_cpu *cpu_buffer, +@@ -2216,7 +2230,7 @@ rb_reset_tail(struct ring_buffer_per_cpu *cpu_buffer, if (tail == BUF_PAGE_SIZE) tail_page->real_end = 0; @@ -91373,7 +95499,7 @@ index 7c56c3d..9980576 100644 return; } -@@ -2255,7 +2255,7 @@ rb_reset_tail(struct ring_buffer_per_cpu *cpu_buffer, +@@ -2251,7 +2265,7 @@ rb_reset_tail(struct ring_buffer_per_cpu *cpu_buffer, rb_event_set_padding(event); /* Set the write back to the previous setting */ @@ -91382,7 +95508,7 @@ index 7c56c3d..9980576 100644 return; } -@@ -2267,7 +2267,7 @@ rb_reset_tail(struct ring_buffer_per_cpu *cpu_buffer, +@@ -2263,7 +2277,7 @@ rb_reset_tail(struct ring_buffer_per_cpu *cpu_buffer, /* Set write to end of buffer */ length = (tail + length) - BUF_PAGE_SIZE; @@ -91391,7 +95517,7 @@ index 7c56c3d..9980576 100644 } /* -@@ -2293,7 +2293,7 @@ rb_move_tail(struct ring_buffer_per_cpu *cpu_buffer, +@@ -2289,7 +2303,7 @@ rb_move_tail(struct ring_buffer_per_cpu *cpu_buffer, * about it. */ if (unlikely(next_page == commit_page)) { @@ -91400,7 +95526,7 @@ index 7c56c3d..9980576 100644 goto out_reset; } -@@ -2349,7 +2349,7 @@ rb_move_tail(struct ring_buffer_per_cpu *cpu_buffer, +@@ -2345,7 +2359,7 @@ rb_move_tail(struct ring_buffer_per_cpu *cpu_buffer, cpu_buffer->tail_page) && (cpu_buffer->commit_page == cpu_buffer->reader_page))) { @@ -91409,7 +95535,7 @@ index 7c56c3d..9980576 100644 goto out_reset; } } -@@ -2397,7 +2397,7 @@ __rb_reserve_next(struct ring_buffer_per_cpu *cpu_buffer, +@@ -2393,7 +2407,7 @@ __rb_reserve_next(struct ring_buffer_per_cpu *cpu_buffer, length += RB_LEN_TIME_EXTEND; tail_page = cpu_buffer->tail_page; @@ -91418,7 +95544,7 @@ index 7c56c3d..9980576 100644 /* set write to only the index of the write */ write &= RB_WRITE_MASK; -@@ -2421,7 +2421,7 @@ __rb_reserve_next(struct ring_buffer_per_cpu *cpu_buffer, +@@ -2417,7 +2431,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); @@ -91427,7 +95553,7 @@ index 7c56c3d..9980576 100644 /* * If this is the first commit on the page, then update -@@ -2454,7 +2454,7 @@ rb_try_to_discard(struct ring_buffer_per_cpu *cpu_buffer, +@@ -2450,7 +2464,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 = @@ -91436,7 +95562,7 @@ index 7c56c3d..9980576 100644 unsigned long event_length = rb_event_length(event); /* * This is on the tail page. It is possible that -@@ -2464,7 +2464,7 @@ rb_try_to_discard(struct ring_buffer_per_cpu *cpu_buffer, +@@ -2460,7 +2474,7 @@ rb_try_to_discard(struct ring_buffer_per_cpu *cpu_buffer, */ old_index += write_mask; new_index += write_mask; @@ -91445,7 +95571,7 @@ index 7c56c3d..9980576 100644 if (index == old_index) { /* update counters */ local_sub(event_length, &cpu_buffer->entries_bytes); -@@ -2856,7 +2856,7 @@ rb_decrement_entry(struct ring_buffer_per_cpu *cpu_buffer, +@@ -2852,7 +2866,7 @@ rb_decrement_entry(struct ring_buffer_per_cpu *cpu_buffer, /* Do the likely case first */ if (likely(bpage->page == (void *)addr)) { @@ -91454,7 +95580,7 @@ index 7c56c3d..9980576 100644 return; } -@@ -2868,7 +2868,7 @@ rb_decrement_entry(struct ring_buffer_per_cpu *cpu_buffer, +@@ -2864,7 +2878,7 @@ rb_decrement_entry(struct ring_buffer_per_cpu *cpu_buffer, start = bpage; do { if (bpage->page == (void *)addr) { @@ -91463,7 +95589,7 @@ index 7c56c3d..9980576 100644 return; } rb_inc_page(cpu_buffer, &bpage); -@@ -3152,7 +3152,7 @@ static inline unsigned long +@@ -3148,7 +3162,7 @@ static inline unsigned long rb_num_of_entries(struct ring_buffer_per_cpu *cpu_buffer) { return local_read(&cpu_buffer->entries) - @@ -91472,7 +95598,7 @@ index 7c56c3d..9980576 100644 } /** -@@ -3241,7 +3241,7 @@ unsigned long ring_buffer_overrun_cpu(struct ring_buffer *buffer, int cpu) +@@ -3237,7 +3251,7 @@ unsigned long ring_buffer_overrun_cpu(struct ring_buffer *buffer, int cpu) return 0; cpu_buffer = buffer->buffers[cpu]; @@ -91481,7 +95607,7 @@ index 7c56c3d..9980576 100644 return ret; } -@@ -3264,7 +3264,7 @@ ring_buffer_commit_overrun_cpu(struct ring_buffer *buffer, int cpu) +@@ -3260,7 +3274,7 @@ ring_buffer_commit_overrun_cpu(struct ring_buffer *buffer, int cpu) return 0; cpu_buffer = buffer->buffers[cpu]; @@ -91490,7 +95616,7 @@ index 7c56c3d..9980576 100644 return ret; } -@@ -3349,7 +3349,7 @@ unsigned long ring_buffer_overruns(struct ring_buffer *buffer) +@@ -3345,7 +3359,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]; @@ -91499,7 +95625,7 @@ index 7c56c3d..9980576 100644 } return overruns; -@@ -3525,8 +3525,8 @@ rb_get_reader_page(struct ring_buffer_per_cpu *cpu_buffer) +@@ -3521,8 +3535,8 @@ rb_get_reader_page(struct ring_buffer_per_cpu *cpu_buffer) /* * Reset the reader page to size zero. */ @@ -91510,7 +95636,7 @@ index 7c56c3d..9980576 100644 local_set(&cpu_buffer->reader_page->page->commit, 0); cpu_buffer->reader_page->real_end = 0; -@@ -3560,7 +3560,7 @@ rb_get_reader_page(struct ring_buffer_per_cpu *cpu_buffer) +@@ -3556,7 +3570,7 @@ rb_get_reader_page(struct ring_buffer_per_cpu *cpu_buffer) * want to compare with the last_overrun. */ smp_mb(); @@ -91519,7 +95645,7 @@ index 7c56c3d..9980576 100644 /* * Here's the tricky part. -@@ -4130,8 +4130,8 @@ rb_reset_cpu(struct ring_buffer_per_cpu *cpu_buffer) +@@ -4126,8 +4140,8 @@ rb_reset_cpu(struct ring_buffer_per_cpu *cpu_buffer) cpu_buffer->head_page = list_entry(cpu_buffer->pages, struct buffer_page, list); @@ -91530,7 +95656,7 @@ index 7c56c3d..9980576 100644 local_set(&cpu_buffer->head_page->page->commit, 0); cpu_buffer->head_page->read = 0; -@@ -4141,14 +4141,14 @@ rb_reset_cpu(struct ring_buffer_per_cpu *cpu_buffer) +@@ -4137,14 +4151,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); @@ -91549,7 +95675,7 @@ index 7c56c3d..9980576 100644 local_set(&cpu_buffer->dropped_events, 0); local_set(&cpu_buffer->entries, 0); local_set(&cpu_buffer->committing, 0); -@@ -4553,8 +4553,8 @@ int ring_buffer_read_page(struct ring_buffer *buffer, +@@ -4549,8 +4563,8 @@ int ring_buffer_read_page(struct ring_buffer *buffer, rb_init_page(bpage); bpage = reader->page; reader->page = *data_page; @@ -91561,10 +95687,10 @@ index 7c56c3d..9980576 100644 *data_page = bpage; diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c -index 39a1226..2dc2b43 100644 +index 291397e..db3836d 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c -@@ -3447,7 +3447,7 @@ int trace_keep_overwrite(struct tracer *tracer, u32 mask, int set) +@@ -3510,7 +3510,7 @@ int trace_keep_overwrite(struct tracer *tracer, u32 mask, int set) return 0; } @@ -91574,10 +95700,10 @@ index 39a1226..2dc2b43 100644 /* do nothing if flag is already set */ if (!!(trace_flags & mask) == !!enabled) diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h -index 99676cd..670b9e8 100644 +index 9258f5a..9b1e41e 100644 --- a/kernel/trace/trace.h +++ b/kernel/trace/trace.h -@@ -1264,7 +1264,7 @@ extern const char *__stop___tracepoint_str[]; +@@ -1278,7 +1278,7 @@ extern const char *__stop___tracepoint_str[]; void trace_printk_init_buffers(void); void trace_printk_start_comm(void); int trace_keep_overwrite(struct tracer *tracer, u32 mask, int set); @@ -91587,10 +95713,10 @@ index 99676cd..670b9e8 100644 /* * Normal trace_printk() and friends allocates special buffers diff --git a/kernel/trace/trace_clock.c b/kernel/trace/trace_clock.c -index 26dc348..8708ca7 100644 +index 57b67b1..66082a9 100644 --- a/kernel/trace/trace_clock.c +++ b/kernel/trace/trace_clock.c -@@ -123,7 +123,7 @@ u64 notrace trace_clock_global(void) +@@ -124,7 +124,7 @@ u64 notrace trace_clock_global(void) return now; } @@ -91599,7 +95725,7 @@ index 26dc348..8708ca7 100644 /* * trace_clock_counter(): simply an atomic counter. -@@ -132,5 +132,5 @@ static atomic64_t trace_counter; +@@ -133,5 +133,5 @@ static atomic64_t trace_counter; */ u64 notrace trace_clock_counter(void) { @@ -91607,10 +95733,10 @@ index 26dc348..8708ca7 100644 + return atomic64_inc_return_unchecked(&trace_counter); } diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c -index 3ddfd8f..41a10fe 100644 +index 2de5362..c4c7003 100644 --- a/kernel/trace/trace_events.c +++ b/kernel/trace/trace_events.c -@@ -1718,7 +1718,6 @@ __trace_early_add_new_event(struct ftrace_event_call *call, +@@ -1722,7 +1722,6 @@ __trace_early_add_new_event(struct ftrace_event_call *call, return 0; } @@ -91659,10 +95785,10 @@ index 0abd9b8..6a663a2 100644 } entry = ring_buffer_event_data(event); diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c -index a436de1..f64dde2 100644 +index f3dad80..d291d61 100644 --- a/kernel/trace/trace_output.c +++ b/kernel/trace/trace_output.c -@@ -294,7 +294,7 @@ int trace_seq_path(struct trace_seq *s, const struct path *path) +@@ -322,7 +322,7 @@ int trace_seq_path(struct trace_seq *s, const struct path *path) p = d_path(path, s->buffer + s->len, PAGE_SIZE - s->len); if (!IS_ERR(p)) { @@ -91671,7 +95797,7 @@ index a436de1..f64dde2 100644 if (p) { s->len = p - s->buffer; return 1; -@@ -939,14 +939,16 @@ int register_ftrace_event(struct trace_event *event) +@@ -980,14 +980,16 @@ int register_ftrace_event(struct trace_event *event) goto out; } @@ -91693,10 +95819,10 @@ index a436de1..f64dde2 100644 key = event->type & (EVENT_HASHSIZE - 1); diff --git a/kernel/trace/trace_stack.c b/kernel/trace/trace_stack.c -index 21b320e..40607bc 100644 +index 8a4e5cb..64f270d 100644 --- a/kernel/trace/trace_stack.c +++ b/kernel/trace/trace_stack.c -@@ -69,7 +69,7 @@ check_stack(unsigned long ip, unsigned long *stack) +@@ -91,7 +91,7 @@ check_stack(unsigned long ip, unsigned long *stack) return; /* we do not handle interrupt stacks yet */ @@ -91706,7 +95832,7 @@ index 21b320e..40607bc 100644 local_irq_save(flags); diff --git a/kernel/user_namespace.c b/kernel/user_namespace.c -index bf71b4b..04dee68 100644 +index fcc0256..aee880f 100644 --- a/kernel/user_namespace.c +++ b/kernel/user_namespace.c @@ -82,6 +82,21 @@ int create_user_ns(struct cred *new) @@ -91731,7 +95857,7 @@ index bf71b4b..04dee68 100644 ns = kmem_cache_zalloc(user_ns_cachep, GFP_KERNEL); if (!ns) return -ENOMEM; -@@ -865,7 +880,7 @@ static int userns_install(struct nsproxy *nsproxy, void *ns) +@@ -872,7 +887,7 @@ static int userns_install(struct nsproxy *nsproxy, void *ns) if (atomic_read(¤t->mm->mm_users) > 1) return -EINVAL; @@ -91741,11 +95867,11 @@ index bf71b4b..04dee68 100644 if (!ns_capable(user_ns, CAP_SYS_ADMIN)) diff --git a/kernel/utsname_sysctl.c b/kernel/utsname_sysctl.c -index 4f69f9a..7c6f8f8 100644 +index c8eac43..4b5f08f 100644 --- a/kernel/utsname_sysctl.c +++ b/kernel/utsname_sysctl.c -@@ -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, +@@ -47,7 +47,7 @@ static void put_uts(struct ctl_table *table, int write, void *which) + static int proc_do_uts_string(struct ctl_table *table, int write, void __user *buffer, size_t *lenp, loff_t *ppos) { - struct ctl_table uts_table; @@ -91754,10 +95880,10 @@ index 4f69f9a..7c6f8f8 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 30e4822..dd2b854 100644 +index c3319bd..67efc3c 100644 --- a/kernel/watchdog.c +++ b/kernel/watchdog.c -@@ -479,7 +479,7 @@ static int watchdog_nmi_enable(unsigned int cpu) { return 0; } +@@ -518,7 +518,7 @@ static int watchdog_nmi_enable(unsigned int cpu) { return 0; } static void watchdog_nmi_disable(unsigned int cpu) { return; } #endif /* CONFIG_HARDLOCKUP_DETECTOR */ @@ -91767,10 +95893,10 @@ index 30e4822..dd2b854 100644 .thread_should_run = watchdog_should_run, .thread_fn = watchdog, diff --git a/kernel/workqueue.c b/kernel/workqueue.c -index 7ba5897..c8ed1f2 100644 +index 35974ac..43c9e87 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c -@@ -4710,7 +4710,7 @@ static void rebind_workers(struct worker_pool *pool) +@@ -4576,7 +4576,7 @@ static void rebind_workers(struct worker_pool *pool) WARN_ON_ONCE(!(worker_flags & WORKER_UNBOUND)); worker_flags |= WORKER_REBOUND; worker_flags &= ~WORKER_UNBOUND; @@ -91780,10 +95906,10 @@ index 7ba5897..c8ed1f2 100644 spin_unlock_irq(&pool->lock); diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug -index 819ac51..1c8a65e 100644 +index 7a638aa..20db901 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug -@@ -853,7 +853,7 @@ config DEBUG_MUTEXES +@@ -858,7 +858,7 @@ config DEBUG_MUTEXES config DEBUG_WW_MUTEX_SLOWPATH bool "Wait/wound mutex debugging: Slowpath testing" @@ -91792,7 +95918,7 @@ index 819ac51..1c8a65e 100644 select DEBUG_LOCK_ALLOC select DEBUG_SPINLOCK select DEBUG_MUTEXES -@@ -866,7 +866,7 @@ config DEBUG_WW_MUTEX_SLOWPATH +@@ -871,7 +871,7 @@ config DEBUG_WW_MUTEX_SLOWPATH config DEBUG_LOCK_ALLOC bool "Lock debugging: detect incorrect freeing of live locks" @@ -91801,7 +95927,7 @@ index 819ac51..1c8a65e 100644 select DEBUG_SPINLOCK select DEBUG_MUTEXES select LOCKDEP -@@ -880,7 +880,7 @@ config DEBUG_LOCK_ALLOC +@@ -885,7 +885,7 @@ config DEBUG_LOCK_ALLOC config PROVE_LOCKING bool "Lock debugging: prove locking correctness" @@ -91810,7 +95936,7 @@ index 819ac51..1c8a65e 100644 select LOCKDEP select DEBUG_SPINLOCK select DEBUG_MUTEXES -@@ -931,7 +931,7 @@ config LOCKDEP +@@ -936,7 +936,7 @@ config LOCKDEP config LOCK_STAT bool "Lock usage statistics" @@ -91819,7 +95945,7 @@ index 819ac51..1c8a65e 100644 select LOCKDEP select DEBUG_SPINLOCK select DEBUG_MUTEXES -@@ -1403,6 +1403,7 @@ config LATENCYTOP +@@ -1418,6 +1418,7 @@ config LATENCYTOP depends on DEBUG_KERNEL depends on STACKTRACE_SUPPORT depends on PROC_FS @@ -91827,7 +95953,7 @@ index 819ac51..1c8a65e 100644 select FRAME_POINTER if !MIPS && !PPC && !S390 && !MICROBLAZE && !ARM_UNWIND && !ARC select KALLSYMS select KALLSYMS_ALL -@@ -1419,7 +1420,7 @@ config ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS +@@ -1434,7 +1435,7 @@ config ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS config DEBUG_STRICT_USER_COPY_CHECKS bool "Strict user copy size checks" depends on ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS @@ -91836,7 +95962,7 @@ index 819ac51..1c8a65e 100644 help Enabling this option turns a certain set of sanity checks for user copy operations into compile time failures. -@@ -1538,7 +1539,7 @@ endmenu # runtime tests +@@ -1554,7 +1555,7 @@ endmenu # runtime tests config PROVIDE_OHCI1394_DMA_INIT bool "Remote debugging over FireWire early on boot" @@ -91846,11 +95972,19 @@ index 819ac51..1c8a65e 100644 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 diff --git a/lib/Makefile b/lib/Makefile -index 0cd7b68..e149e37 100644 +index ba967a1..2cc869a 100644 --- a/lib/Makefile +++ b/lib/Makefile -@@ -52,7 +52,7 @@ obj-$(CONFIG_GENERIC_HWEIGHT) += hweight.o - obj-$(CONFIG_BTREE) += btree.o +@@ -33,7 +33,6 @@ obj-y += kstrtox.o + obj-$(CONFIG_TEST_KSTRTOX) += test-kstrtox.o + obj-$(CONFIG_TEST_MODULE) += test_module.o + obj-$(CONFIG_TEST_USER_COPY) += test_user_copy.o +-obj-$(CONFIG_TEST_BPF) += test_bpf.o + + ifeq ($(CONFIG_DEBUG_KOBJECT),y) + CFLAGS_kobject.o += -DDEBUG +@@ -54,7 +53,7 @@ obj-$(CONFIG_BTREE) += btree.o + obj-$(CONFIG_INTERVAL_TREE) += interval_tree.o obj-$(CONFIG_ASSOCIATIVE_ARRAY) += assoc_array.o obj-$(CONFIG_DEBUG_PREEMPT) += smp_processor_id.o -obj-$(CONFIG_DEBUG_LIST) += list_debug.o @@ -91858,6 +95992,19 @@ index 0cd7b68..e149e37 100644 obj-$(CONFIG_DEBUG_OBJECTS) += debugobjects.o ifneq ($(CONFIG_HAVE_DEC_LOCK),y) +diff --git a/lib/assoc_array.c b/lib/assoc_array.c +index c0b1007..ae146f0 100644 +--- a/lib/assoc_array.c ++++ b/lib/assoc_array.c +@@ -1735,7 +1735,7 @@ ascend_old_tree: + gc_complete: + edit->set[0].to = new_root; + assoc_array_apply_edit(edit); +- edit->array->nr_leaves_on_tree = nr_leaves_on_tree; ++ array->nr_leaves_on_tree = nr_leaves_on_tree; + return 0; + + enomem: diff --git a/lib/average.c b/lib/average.c index 114d1be..ab0350c 100644 --- a/lib/average.c @@ -91912,10 +96059,10 @@ index 06f7e4f..f3cf2b0 100644 } EXPORT_SYMBOL(bitmap_parselist_user); diff --git a/lib/bug.c b/lib/bug.c -index 1686034..a9c00c8 100644 +index d1d7c78..b354235 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) +@@ -137,6 +137,8 @@ enum bug_trap_type report_bug(unsigned long bugaddr, struct pt_regs *regs) return BUG_TRAP_TYPE_NONE; bug = find_bug(bugaddr); @@ -91925,10 +96072,10 @@ index 1686034..a9c00c8 100644 file = NULL; line = 0; diff --git a/lib/debugobjects.c b/lib/debugobjects.c -index e0731c3..ad66444 100644 +index 547f7f9..a6d4ba0 100644 --- a/lib/debugobjects.c +++ b/lib/debugobjects.c -@@ -286,7 +286,7 @@ static void debug_object_is_on_stack(void *addr, int onstack) +@@ -289,7 +289,7 @@ static void debug_object_is_on_stack(void *addr, int onstack) if (limit > 4) return; @@ -92294,10 +96441,10 @@ index 963b703..438bc51 100644 /** * percpu_ref_init - initialize a percpu refcount diff --git a/lib/radix-tree.c b/lib/radix-tree.c -index 9599aa7..9cf6c72 100644 +index 3291a8e..346a91e 100644 --- a/lib/radix-tree.c +++ b/lib/radix-tree.c -@@ -66,7 +66,7 @@ struct radix_tree_preload { +@@ -67,7 +67,7 @@ struct radix_tree_preload { int nr; struct radix_tree_node *nodes[RADIX_TREE_PRELOAD_SIZE]; }; @@ -92373,10 +96520,10 @@ index a28df52..3d55877 100644 unsigned long c; diff --git a/lib/swiotlb.c b/lib/swiotlb.c -index b604b83..c0547f6 100644 +index 4abda07..b9d3765 100644 --- a/lib/swiotlb.c +++ b/lib/swiotlb.c -@@ -674,7 +674,7 @@ EXPORT_SYMBOL(swiotlb_alloc_coherent); +@@ -682,7 +682,7 @@ EXPORT_SYMBOL(swiotlb_alloc_coherent); void swiotlb_free_coherent(struct device *hwdev, size_t size, void *vaddr, @@ -92385,6 +96532,1941 @@ index b604b83..c0547f6 100644 { phys_addr_t paddr = dma_to_phys(hwdev, dev_addr); +diff --git a/lib/test_bpf.c b/lib/test_bpf.c +deleted file mode 100644 +index c579e0f..0000000 +--- a/lib/test_bpf.c ++++ /dev/null +@@ -1,1929 +0,0 @@ +-/* +- * Testsuite for BPF interpreter and BPF JIT compiler +- * +- * Copyright (c) 2011-2014 PLUMgrid, http://plumgrid.com +- * +- * This program is free software; you can redistribute it and/or +- * modify it under the terms of version 2 of the GNU General Public +- * License as published by the Free Software Foundation. +- * +- * This program is distributed in the hope that it will be useful, but +- * WITHOUT ANY WARRANTY; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +- * General Public License for more details. +- */ +- +-#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt +- +-#include +-#include +-#include +-#include +-#include +-#include +- +-/* General test specific settings */ +-#define MAX_SUBTESTS 3 +-#define MAX_TESTRUNS 10000 +-#define MAX_DATA 128 +-#define MAX_INSNS 512 +-#define MAX_K 0xffffFFFF +- +-/* Few constants used to init test 'skb' */ +-#define SKB_TYPE 3 +-#define SKB_MARK 0x1234aaaa +-#define SKB_HASH 0x1234aaab +-#define SKB_QUEUE_MAP 123 +-#define SKB_VLAN_TCI 0xffff +-#define SKB_DEV_IFINDEX 577 +-#define SKB_DEV_TYPE 588 +- +-/* Redefine REGs to make tests less verbose */ +-#define R0 BPF_REG_0 +-#define R1 BPF_REG_1 +-#define R2 BPF_REG_2 +-#define R3 BPF_REG_3 +-#define R4 BPF_REG_4 +-#define R5 BPF_REG_5 +-#define R6 BPF_REG_6 +-#define R7 BPF_REG_7 +-#define R8 BPF_REG_8 +-#define R9 BPF_REG_9 +-#define R10 BPF_REG_10 +- +-/* Flags that can be passed to test cases */ +-#define FLAG_NO_DATA BIT(0) +-#define FLAG_EXPECTED_FAIL BIT(1) +- +-enum { +- CLASSIC = BIT(6), /* Old BPF instructions only. */ +- INTERNAL = BIT(7), /* Extended instruction set. */ +-}; +- +-#define TEST_TYPE_MASK (CLASSIC | INTERNAL) +- +-struct bpf_test { +- const char *descr; +- union { +- struct sock_filter insns[MAX_INSNS]; +- struct sock_filter_int insns_int[MAX_INSNS]; +- } u; +- __u8 aux; +- __u8 data[MAX_DATA]; +- struct { +- int data_size; +- __u32 result; +- } test[MAX_SUBTESTS]; +-}; +- +-static struct bpf_test tests[] = { +- { +- "TAX", +- .u.insns = { +- BPF_STMT(BPF_LD | BPF_IMM, 1), +- BPF_STMT(BPF_MISC | BPF_TAX, 0), +- BPF_STMT(BPF_LD | BPF_IMM, 2), +- BPF_STMT(BPF_ALU | BPF_ADD | BPF_X, 0), +- BPF_STMT(BPF_ALU | BPF_NEG, 0), /* A == -3 */ +- BPF_STMT(BPF_MISC | BPF_TAX, 0), +- BPF_STMT(BPF_LD | BPF_LEN, 0), +- BPF_STMT(BPF_ALU | BPF_ADD | BPF_X, 0), +- BPF_STMT(BPF_MISC | BPF_TAX, 0), /* X == len - 3 */ +- BPF_STMT(BPF_LD | BPF_B | BPF_IND, 1), +- BPF_STMT(BPF_RET | BPF_A, 0) +- }, +- CLASSIC, +- { 10, 20, 30, 40, 50 }, +- { { 2, 10 }, { 3, 20 }, { 4, 30 } }, +- }, +- { +- "TXA", +- .u.insns = { +- BPF_STMT(BPF_LDX | BPF_LEN, 0), +- BPF_STMT(BPF_MISC | BPF_TXA, 0), +- BPF_STMT(BPF_ALU | BPF_ADD | BPF_X, 0), +- BPF_STMT(BPF_RET | BPF_A, 0) /* A == len * 2 */ +- }, +- CLASSIC, +- { 10, 20, 30, 40, 50 }, +- { { 1, 2 }, { 3, 6 }, { 4, 8 } }, +- }, +- { +- "ADD_SUB_MUL_K", +- .u.insns = { +- BPF_STMT(BPF_LD | BPF_IMM, 1), +- BPF_STMT(BPF_ALU | BPF_ADD | BPF_K, 2), +- BPF_STMT(BPF_LDX | BPF_IMM, 3), +- BPF_STMT(BPF_ALU | BPF_SUB | BPF_X, 0), +- BPF_STMT(BPF_ALU | BPF_ADD | BPF_K, 0xffffffff), +- BPF_STMT(BPF_ALU | BPF_MUL | BPF_K, 3), +- BPF_STMT(BPF_RET | BPF_A, 0) +- }, +- CLASSIC | FLAG_NO_DATA, +- { }, +- { { 0, 0xfffffffd } } +- }, +- { +- "DIV_KX", +- .u.insns = { +- BPF_STMT(BPF_LD | BPF_IMM, 8), +- BPF_STMT(BPF_ALU | BPF_DIV | BPF_K, 2), +- BPF_STMT(BPF_MISC | BPF_TAX, 0), +- BPF_STMT(BPF_LD | BPF_IMM, 0xffffffff), +- BPF_STMT(BPF_ALU | BPF_DIV | BPF_X, 0), +- BPF_STMT(BPF_MISC | BPF_TAX, 0), +- BPF_STMT(BPF_LD | BPF_IMM, 0xffffffff), +- BPF_STMT(BPF_ALU | BPF_DIV | BPF_K, 0x70000000), +- BPF_STMT(BPF_ALU | BPF_ADD | BPF_X, 0), +- BPF_STMT(BPF_RET | BPF_A, 0) +- }, +- CLASSIC | FLAG_NO_DATA, +- { }, +- { { 0, 0x40000001 } } +- }, +- { +- "AND_OR_LSH_K", +- .u.insns = { +- BPF_STMT(BPF_LD | BPF_IMM, 0xff), +- BPF_STMT(BPF_ALU | BPF_AND | BPF_K, 0xf0), +- BPF_STMT(BPF_ALU | BPF_LSH | BPF_K, 27), +- BPF_STMT(BPF_MISC | BPF_TAX, 0), +- BPF_STMT(BPF_LD | BPF_IMM, 0xf), +- BPF_STMT(BPF_ALU | BPF_OR | BPF_K, 0xf0), +- BPF_STMT(BPF_ALU | BPF_ADD | BPF_X, 0), +- BPF_STMT(BPF_RET | BPF_A, 0) +- }, +- CLASSIC | FLAG_NO_DATA, +- { }, +- { { 0, 0x800000ff }, { 1, 0x800000ff } }, +- }, +- { +- "LD_IMM_0", +- .u.insns = { +- BPF_STMT(BPF_LD | BPF_IMM, 0), /* ld #0 */ +- BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, 0, 1, 0), +- BPF_STMT(BPF_RET | BPF_K, 0), +- BPF_STMT(BPF_RET | BPF_K, 1), +- }, +- CLASSIC, +- { }, +- { { 1, 1 } }, +- }, +- { +- "LD_IND", +- .u.insns = { +- BPF_STMT(BPF_LDX | BPF_LEN, 0), +- BPF_STMT(BPF_LD | BPF_H | BPF_IND, MAX_K), +- BPF_STMT(BPF_RET | BPF_K, 1) +- }, +- CLASSIC, +- { }, +- { { 1, 0 }, { 10, 0 }, { 60, 0 } }, +- }, +- { +- "LD_ABS", +- .u.insns = { +- BPF_STMT(BPF_LD | BPF_W | BPF_ABS, 1000), +- BPF_STMT(BPF_RET | BPF_K, 1) +- }, +- CLASSIC, +- { }, +- { { 1, 0 }, { 10, 0 }, { 60, 0 } }, +- }, +- { +- "LD_ABS_LL", +- .u.insns = { +- BPF_STMT(BPF_LD | BPF_B | BPF_ABS, SKF_LL_OFF), +- BPF_STMT(BPF_MISC | BPF_TAX, 0), +- BPF_STMT(BPF_LD | BPF_B | BPF_ABS, SKF_LL_OFF + 1), +- BPF_STMT(BPF_ALU | BPF_ADD | BPF_X, 0), +- BPF_STMT(BPF_RET | BPF_A, 0) +- }, +- CLASSIC, +- { 1, 2, 3 }, +- { { 1, 0 }, { 2, 3 } }, +- }, +- { +- "LD_IND_LL", +- .u.insns = { +- BPF_STMT(BPF_LD | BPF_IMM, SKF_LL_OFF - 1), +- BPF_STMT(BPF_LDX | BPF_LEN, 0), +- BPF_STMT(BPF_ALU | BPF_ADD | BPF_X, 0), +- BPF_STMT(BPF_MISC | BPF_TAX, 0), +- BPF_STMT(BPF_LD | BPF_B | BPF_IND, 0), +- BPF_STMT(BPF_RET | BPF_A, 0) +- }, +- CLASSIC, +- { 1, 2, 3, 0xff }, +- { { 1, 1 }, { 3, 3 }, { 4, 0xff } }, +- }, +- { +- "LD_ABS_NET", +- .u.insns = { +- BPF_STMT(BPF_LD | BPF_B | BPF_ABS, SKF_NET_OFF), +- BPF_STMT(BPF_MISC | BPF_TAX, 0), +- BPF_STMT(BPF_LD | BPF_B | BPF_ABS, SKF_NET_OFF + 1), +- BPF_STMT(BPF_ALU | BPF_ADD | BPF_X, 0), +- BPF_STMT(BPF_RET | BPF_A, 0) +- }, +- CLASSIC, +- { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3 }, +- { { 15, 0 }, { 16, 3 } }, +- }, +- { +- "LD_IND_NET", +- .u.insns = { +- BPF_STMT(BPF_LD | BPF_IMM, SKF_NET_OFF - 15), +- BPF_STMT(BPF_LDX | BPF_LEN, 0), +- BPF_STMT(BPF_ALU | BPF_ADD | BPF_X, 0), +- BPF_STMT(BPF_MISC | BPF_TAX, 0), +- BPF_STMT(BPF_LD | BPF_B | BPF_IND, 0), +- BPF_STMT(BPF_RET | BPF_A, 0) +- }, +- CLASSIC, +- { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3 }, +- { { 14, 0 }, { 15, 1 }, { 17, 3 } }, +- }, +- { +- "LD_PKTTYPE", +- .u.insns = { +- BPF_STMT(BPF_LD | BPF_W | BPF_ABS, +- SKF_AD_OFF + SKF_AD_PKTTYPE), +- BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, SKB_TYPE, 1, 0), +- BPF_STMT(BPF_RET | BPF_K, 1), +- BPF_STMT(BPF_LD | BPF_W | BPF_ABS, +- SKF_AD_OFF + SKF_AD_PKTTYPE), +- BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, SKB_TYPE, 1, 0), +- BPF_STMT(BPF_RET | BPF_K, 1), +- BPF_STMT(BPF_LD | BPF_W | BPF_ABS, +- SKF_AD_OFF + SKF_AD_PKTTYPE), +- BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, SKB_TYPE, 1, 0), +- BPF_STMT(BPF_RET | BPF_K, 1), +- BPF_STMT(BPF_RET | BPF_A, 0) +- }, +- CLASSIC, +- { }, +- { { 1, 3 }, { 10, 3 } }, +- }, +- { +- "LD_MARK", +- .u.insns = { +- BPF_STMT(BPF_LD | BPF_W | BPF_ABS, +- SKF_AD_OFF + SKF_AD_MARK), +- BPF_STMT(BPF_RET | BPF_A, 0) +- }, +- CLASSIC, +- { }, +- { { 1, SKB_MARK}, { 10, SKB_MARK} }, +- }, +- { +- "LD_RXHASH", +- .u.insns = { +- BPF_STMT(BPF_LD | BPF_W | BPF_ABS, +- SKF_AD_OFF + SKF_AD_RXHASH), +- BPF_STMT(BPF_RET | BPF_A, 0) +- }, +- CLASSIC, +- { }, +- { { 1, SKB_HASH}, { 10, SKB_HASH} }, +- }, +- { +- "LD_QUEUE", +- .u.insns = { +- BPF_STMT(BPF_LD | BPF_W | BPF_ABS, +- SKF_AD_OFF + SKF_AD_QUEUE), +- BPF_STMT(BPF_RET | BPF_A, 0) +- }, +- CLASSIC, +- { }, +- { { 1, SKB_QUEUE_MAP }, { 10, SKB_QUEUE_MAP } }, +- }, +- { +- "LD_PROTOCOL", +- .u.insns = { +- BPF_STMT(BPF_LD | BPF_B | BPF_ABS, 1), +- BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, 20, 1, 0), +- BPF_STMT(BPF_RET | BPF_K, 0), +- BPF_STMT(BPF_LD | BPF_W | BPF_ABS, +- SKF_AD_OFF + SKF_AD_PROTOCOL), +- BPF_STMT(BPF_MISC | BPF_TAX, 0), +- BPF_STMT(BPF_LD | BPF_B | BPF_ABS, 2), +- BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, 30, 1, 0), +- BPF_STMT(BPF_RET | BPF_K, 0), +- BPF_STMT(BPF_MISC | BPF_TXA, 0), +- BPF_STMT(BPF_RET | BPF_A, 0) +- }, +- CLASSIC, +- { 10, 20, 30 }, +- { { 10, ETH_P_IP }, { 100, ETH_P_IP } }, +- }, +- { +- "LD_VLAN_TAG", +- .u.insns = { +- BPF_STMT(BPF_LD | BPF_W | BPF_ABS, +- SKF_AD_OFF + SKF_AD_VLAN_TAG), +- BPF_STMT(BPF_RET | BPF_A, 0) +- }, +- CLASSIC, +- { }, +- { +- { 1, SKB_VLAN_TCI & ~VLAN_TAG_PRESENT }, +- { 10, SKB_VLAN_TCI & ~VLAN_TAG_PRESENT } +- }, +- }, +- { +- "LD_VLAN_TAG_PRESENT", +- .u.insns = { +- BPF_STMT(BPF_LD | BPF_W | BPF_ABS, +- SKF_AD_OFF + SKF_AD_VLAN_TAG_PRESENT), +- BPF_STMT(BPF_RET | BPF_A, 0) +- }, +- CLASSIC, +- { }, +- { +- { 1, !!(SKB_VLAN_TCI & VLAN_TAG_PRESENT) }, +- { 10, !!(SKB_VLAN_TCI & VLAN_TAG_PRESENT) } +- }, +- }, +- { +- "LD_IFINDEX", +- .u.insns = { +- BPF_STMT(BPF_LD | BPF_W | BPF_ABS, +- SKF_AD_OFF + SKF_AD_IFINDEX), +- BPF_STMT(BPF_RET | BPF_A, 0) +- }, +- CLASSIC, +- { }, +- { { 1, SKB_DEV_IFINDEX }, { 10, SKB_DEV_IFINDEX } }, +- }, +- { +- "LD_HATYPE", +- .u.insns = { +- BPF_STMT(BPF_LD | BPF_W | BPF_ABS, +- SKF_AD_OFF + SKF_AD_HATYPE), +- BPF_STMT(BPF_RET | BPF_A, 0) +- }, +- CLASSIC, +- { }, +- { { 1, SKB_DEV_TYPE }, { 10, SKB_DEV_TYPE } }, +- }, +- { +- "LD_CPU", +- .u.insns = { +- BPF_STMT(BPF_LD | BPF_W | BPF_ABS, +- SKF_AD_OFF + SKF_AD_CPU), +- BPF_STMT(BPF_MISC | BPF_TAX, 0), +- BPF_STMT(BPF_LD | BPF_W | BPF_ABS, +- SKF_AD_OFF + SKF_AD_CPU), +- BPF_STMT(BPF_ALU | BPF_SUB | BPF_X, 0), +- BPF_STMT(BPF_RET | BPF_A, 0) +- }, +- CLASSIC, +- { }, +- { { 1, 0 }, { 10, 0 } }, +- }, +- { +- "LD_NLATTR", +- .u.insns = { +- BPF_STMT(BPF_LDX | BPF_IMM, 2), +- BPF_STMT(BPF_MISC | BPF_TXA, 0), +- BPF_STMT(BPF_LDX | BPF_IMM, 3), +- BPF_STMT(BPF_LD | BPF_W | BPF_ABS, +- SKF_AD_OFF + SKF_AD_NLATTR), +- BPF_STMT(BPF_RET | BPF_A, 0) +- }, +- CLASSIC, +-#ifdef __BIG_ENDIAN +- { 0xff, 0xff, 0, 4, 0, 2, 0, 4, 0, 3 }, +-#else +- { 0xff, 0xff, 4, 0, 2, 0, 4, 0, 3, 0 }, +-#endif +- { { 4, 0 }, { 20, 6 } }, +- }, +- { +- "LD_NLATTR_NEST", +- .u.insns = { +- BPF_STMT(BPF_LD | BPF_IMM, 2), +- BPF_STMT(BPF_LDX | BPF_IMM, 3), +- BPF_STMT(BPF_LD | BPF_W | BPF_ABS, +- SKF_AD_OFF + SKF_AD_NLATTR_NEST), +- BPF_STMT(BPF_LD | BPF_IMM, 2), +- BPF_STMT(BPF_LD | BPF_W | BPF_ABS, +- SKF_AD_OFF + SKF_AD_NLATTR_NEST), +- BPF_STMT(BPF_LD | BPF_IMM, 2), +- BPF_STMT(BPF_LD | BPF_W | BPF_ABS, +- SKF_AD_OFF + SKF_AD_NLATTR_NEST), +- BPF_STMT(BPF_LD | BPF_IMM, 2), +- BPF_STMT(BPF_LD | BPF_W | BPF_ABS, +- SKF_AD_OFF + SKF_AD_NLATTR_NEST), +- BPF_STMT(BPF_LD | BPF_IMM, 2), +- BPF_STMT(BPF_LD | BPF_W | BPF_ABS, +- SKF_AD_OFF + SKF_AD_NLATTR_NEST), +- BPF_STMT(BPF_LD | BPF_IMM, 2), +- BPF_STMT(BPF_LD | BPF_W | BPF_ABS, +- SKF_AD_OFF + SKF_AD_NLATTR_NEST), +- BPF_STMT(BPF_LD | BPF_IMM, 2), +- BPF_STMT(BPF_LD | BPF_W | BPF_ABS, +- SKF_AD_OFF + SKF_AD_NLATTR_NEST), +- BPF_STMT(BPF_LD | BPF_IMM, 2), +- BPF_STMT(BPF_LD | BPF_W | BPF_ABS, +- SKF_AD_OFF + SKF_AD_NLATTR_NEST), +- BPF_STMT(BPF_RET | BPF_A, 0) +- }, +- CLASSIC, +-#ifdef __BIG_ENDIAN +- { 0xff, 0xff, 0, 12, 0, 1, 0, 4, 0, 2, 0, 4, 0, 3 }, +-#else +- { 0xff, 0xff, 12, 0, 1, 0, 4, 0, 2, 0, 4, 0, 3, 0 }, +-#endif +- { { 4, 0 }, { 20, 10 } }, +- }, +- { +- "LD_PAYLOAD_OFF", +- .u.insns = { +- BPF_STMT(BPF_LD | BPF_W | BPF_ABS, +- SKF_AD_OFF + SKF_AD_PAY_OFFSET), +- BPF_STMT(BPF_LD | BPF_W | BPF_ABS, +- SKF_AD_OFF + SKF_AD_PAY_OFFSET), +- BPF_STMT(BPF_LD | BPF_W | BPF_ABS, +- SKF_AD_OFF + SKF_AD_PAY_OFFSET), +- BPF_STMT(BPF_LD | BPF_W | BPF_ABS, +- SKF_AD_OFF + SKF_AD_PAY_OFFSET), +- BPF_STMT(BPF_LD | BPF_W | BPF_ABS, +- SKF_AD_OFF + SKF_AD_PAY_OFFSET), +- BPF_STMT(BPF_RET | BPF_A, 0) +- }, +- CLASSIC, +- /* 00:00:00:00:00:00 > 00:00:00:00:00:00, ethtype IPv4 (0x0800), +- * length 98: 127.0.0.1 > 127.0.0.1: ICMP echo request, +- * id 9737, seq 1, length 64 +- */ +- { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +- 0x08, 0x00, +- 0x45, 0x00, 0x00, 0x54, 0xac, 0x8b, 0x40, 0x00, 0x40, +- 0x01, 0x90, 0x1b, 0x7f, 0x00, 0x00, 0x01 }, +- { { 30, 0 }, { 100, 42 } }, +- }, +- { +- "LD_ANC_XOR", +- .u.insns = { +- BPF_STMT(BPF_LD | BPF_IMM, 10), +- BPF_STMT(BPF_LDX | BPF_IMM, 300), +- BPF_STMT(BPF_LD | BPF_W | BPF_ABS, +- SKF_AD_OFF + SKF_AD_ALU_XOR_X), +- BPF_STMT(BPF_RET | BPF_A, 0) +- }, +- CLASSIC, +- { }, +- { { 4, 10 ^ 300 }, { 20, 10 ^ 300 } }, +- }, +- { +- "SPILL_FILL", +- .u.insns = { +- BPF_STMT(BPF_LDX | BPF_LEN, 0), +- BPF_STMT(BPF_LD | BPF_IMM, 2), +- BPF_STMT(BPF_ALU | BPF_RSH, 1), +- BPF_STMT(BPF_ALU | BPF_XOR | BPF_X, 0), +- BPF_STMT(BPF_ST, 1), /* M1 = 1 ^ len */ +- BPF_STMT(BPF_ALU | BPF_XOR | BPF_K, 0x80000000), +- BPF_STMT(BPF_ST, 2), /* M2 = 1 ^ len ^ 0x80000000 */ +- BPF_STMT(BPF_STX, 15), /* M3 = len */ +- BPF_STMT(BPF_LDX | BPF_MEM, 1), +- BPF_STMT(BPF_LD | BPF_MEM, 2), +- BPF_STMT(BPF_ALU | BPF_XOR | BPF_X, 0), +- BPF_STMT(BPF_LDX | BPF_MEM, 15), +- BPF_STMT(BPF_ALU | BPF_XOR | BPF_X, 0), +- BPF_STMT(BPF_RET | BPF_A, 0) +- }, +- CLASSIC, +- { }, +- { { 1, 0x80000001 }, { 2, 0x80000002 }, { 60, 0x80000000 ^ 60 } } +- }, +- { +- "JEQ", +- .u.insns = { +- BPF_STMT(BPF_LDX | BPF_LEN, 0), +- BPF_STMT(BPF_LD | BPF_B | BPF_ABS, 2), +- BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_X, 0, 0, 1), +- BPF_STMT(BPF_RET | BPF_K, 1), +- BPF_STMT(BPF_RET | BPF_K, MAX_K) +- }, +- CLASSIC, +- { 3, 3, 3, 3, 3 }, +- { { 1, 0 }, { 3, 1 }, { 4, MAX_K } }, +- }, +- { +- "JGT", +- .u.insns = { +- BPF_STMT(BPF_LDX | BPF_LEN, 0), +- BPF_STMT(BPF_LD | BPF_B | BPF_ABS, 2), +- BPF_JUMP(BPF_JMP | BPF_JGT | BPF_X, 0, 0, 1), +- BPF_STMT(BPF_RET | BPF_K, 1), +- BPF_STMT(BPF_RET | BPF_K, MAX_K) +- }, +- CLASSIC, +- { 4, 4, 4, 3, 3 }, +- { { 2, 0 }, { 3, 1 }, { 4, MAX_K } }, +- }, +- { +- "JGE", +- .u.insns = { +- BPF_STMT(BPF_LDX | BPF_LEN, 0), +- BPF_STMT(BPF_LD | BPF_B | BPF_IND, MAX_K), +- BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 1, 1, 0), +- BPF_STMT(BPF_RET | BPF_K, 10), +- BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 2, 1, 0), +- BPF_STMT(BPF_RET | BPF_K, 20), +- BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 3, 1, 0), +- BPF_STMT(BPF_RET | BPF_K, 30), +- BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 4, 1, 0), +- BPF_STMT(BPF_RET | BPF_K, 40), +- BPF_STMT(BPF_RET | BPF_K, MAX_K) +- }, +- CLASSIC, +- { 1, 2, 3, 4, 5 }, +- { { 1, 20 }, { 3, 40 }, { 5, MAX_K } }, +- }, +- { +- "JSET", +- .u.insns = { +- BPF_JUMP(BPF_JMP | BPF_JA, 0, 0, 0), +- BPF_JUMP(BPF_JMP | BPF_JA, 1, 1, 1), +- BPF_JUMP(BPF_JMP | BPF_JA, 0, 0, 0), +- BPF_JUMP(BPF_JMP | BPF_JA, 0, 0, 0), +- BPF_STMT(BPF_LDX | BPF_LEN, 0), +- BPF_STMT(BPF_MISC | BPF_TXA, 0), +- BPF_STMT(BPF_ALU | BPF_SUB | BPF_K, 4), +- BPF_STMT(BPF_MISC | BPF_TAX, 0), +- BPF_STMT(BPF_LD | BPF_W | BPF_IND, 0), +- BPF_JUMP(BPF_JMP | BPF_JSET | BPF_K, 1, 0, 1), +- BPF_STMT(BPF_RET | BPF_K, 10), +- BPF_JUMP(BPF_JMP | BPF_JSET | BPF_K, 0x80000000, 0, 1), +- BPF_STMT(BPF_RET | BPF_K, 20), +- BPF_JUMP(BPF_JMP | BPF_JSET | BPF_K, 0xffffff, 1, 0), +- BPF_STMT(BPF_RET | BPF_K, 30), +- BPF_JUMP(BPF_JMP | BPF_JSET | BPF_K, 0xffffff, 1, 0), +- BPF_STMT(BPF_RET | BPF_K, 30), +- BPF_JUMP(BPF_JMP | BPF_JSET | BPF_K, 0xffffff, 1, 0), +- BPF_STMT(BPF_RET | BPF_K, 30), +- BPF_JUMP(BPF_JMP | BPF_JSET | BPF_K, 0xffffff, 1, 0), +- BPF_STMT(BPF_RET | BPF_K, 30), +- BPF_JUMP(BPF_JMP | BPF_JSET | BPF_K, 0xffffff, 1, 0), +- BPF_STMT(BPF_RET | BPF_K, 30), +- BPF_STMT(BPF_RET | BPF_K, MAX_K) +- }, +- CLASSIC, +- { 0, 0xAA, 0x55, 1 }, +- { { 4, 10 }, { 5, 20 }, { 6, MAX_K } }, +- }, +- { +- "tcpdump port 22", +- .u.insns = { +- BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 12), +- BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, 0x86dd, 0, 8), /* IPv6 */ +- BPF_STMT(BPF_LD | BPF_B | BPF_ABS, 20), +- BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, 0x84, 2, 0), +- BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, 0x6, 1, 0), +- BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, 0x11, 0, 17), +- BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 54), +- BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, 22, 14, 0), +- BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 56), +- BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, 22, 12, 13), +- BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, 0x0800, 0, 12), /* IPv4 */ +- BPF_STMT(BPF_LD | BPF_B | BPF_ABS, 23), +- BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, 0x84, 2, 0), +- BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, 0x6, 1, 0), +- BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, 0x11, 0, 8), +- BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 20), +- BPF_JUMP(BPF_JMP | BPF_JSET | BPF_K, 0x1fff, 6, 0), +- BPF_STMT(BPF_LDX | BPF_B | BPF_MSH, 14), +- BPF_STMT(BPF_LD | BPF_H | BPF_IND, 14), +- BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, 22, 2, 0), +- BPF_STMT(BPF_LD | BPF_H | BPF_IND, 16), +- BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, 22, 0, 1), +- BPF_STMT(BPF_RET | BPF_K, 0xffff), +- BPF_STMT(BPF_RET | BPF_K, 0), +- }, +- CLASSIC, +- /* 3c:07:54:43:e5:76 > 10:bf:48:d6:43:d6, ethertype IPv4(0x0800) +- * length 114: 10.1.1.149.49700 > 10.1.2.10.22: Flags [P.], +- * seq 1305692979:1305693027, ack 3650467037, win 65535, +- * options [nop,nop,TS val 2502645400 ecr 3971138], length 48 +- */ +- { 0x10, 0xbf, 0x48, 0xd6, 0x43, 0xd6, +- 0x3c, 0x07, 0x54, 0x43, 0xe5, 0x76, +- 0x08, 0x00, +- 0x45, 0x10, 0x00, 0x64, 0x75, 0xb5, +- 0x40, 0x00, 0x40, 0x06, 0xad, 0x2e, /* IP header */ +- 0x0a, 0x01, 0x01, 0x95, /* ip src */ +- 0x0a, 0x01, 0x02, 0x0a, /* ip dst */ +- 0xc2, 0x24, +- 0x00, 0x16 /* dst port */ }, +- { { 10, 0 }, { 30, 0 }, { 100, 65535 } }, +- }, +- { +- "tcpdump complex", +- .u.insns = { +- /* tcpdump -nei eth0 'tcp port 22 and (((ip[2:2] - +- * ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0) and +- * (len > 115 or len < 30000000000)' -d +- */ +- BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 12), +- BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, 0x86dd, 30, 0), +- BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, 0x800, 0, 29), +- BPF_STMT(BPF_LD | BPF_B | BPF_ABS, 23), +- BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, 0x6, 0, 27), +- BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 20), +- BPF_JUMP(BPF_JMP | BPF_JSET | BPF_K, 0x1fff, 25, 0), +- BPF_STMT(BPF_LDX | BPF_B | BPF_MSH, 14), +- BPF_STMT(BPF_LD | BPF_H | BPF_IND, 14), +- BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, 22, 2, 0), +- BPF_STMT(BPF_LD | BPF_H | BPF_IND, 16), +- BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, 22, 0, 20), +- BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 16), +- BPF_STMT(BPF_ST, 1), +- BPF_STMT(BPF_LD | BPF_B | BPF_ABS, 14), +- BPF_STMT(BPF_ALU | BPF_AND | BPF_K, 0xf), +- BPF_STMT(BPF_ALU | BPF_LSH | BPF_K, 2), +- BPF_STMT(BPF_MISC | BPF_TAX, 0x5), /* libpcap emits K on TAX */ +- BPF_STMT(BPF_LD | BPF_MEM, 1), +- BPF_STMT(BPF_ALU | BPF_SUB | BPF_X, 0), +- BPF_STMT(BPF_ST, 5), +- BPF_STMT(BPF_LDX | BPF_B | BPF_MSH, 14), +- BPF_STMT(BPF_LD | BPF_B | BPF_IND, 26), +- BPF_STMT(BPF_ALU | BPF_AND | BPF_K, 0xf0), +- BPF_STMT(BPF_ALU | BPF_RSH | BPF_K, 2), +- BPF_STMT(BPF_MISC | BPF_TAX, 0x9), /* libpcap emits K on TAX */ +- BPF_STMT(BPF_LD | BPF_MEM, 5), +- BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_X, 0, 4, 0), +- BPF_STMT(BPF_LD | BPF_LEN, 0), +- BPF_JUMP(BPF_JMP | BPF_JGT | BPF_K, 0x73, 1, 0), +- BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 0xfc23ac00, 1, 0), +- BPF_STMT(BPF_RET | BPF_K, 0xffff), +- BPF_STMT(BPF_RET | BPF_K, 0), +- }, +- CLASSIC, +- { 0x10, 0xbf, 0x48, 0xd6, 0x43, 0xd6, +- 0x3c, 0x07, 0x54, 0x43, 0xe5, 0x76, +- 0x08, 0x00, +- 0x45, 0x10, 0x00, 0x64, 0x75, 0xb5, +- 0x40, 0x00, 0x40, 0x06, 0xad, 0x2e, /* IP header */ +- 0x0a, 0x01, 0x01, 0x95, /* ip src */ +- 0x0a, 0x01, 0x02, 0x0a, /* ip dst */ +- 0xc2, 0x24, +- 0x00, 0x16 /* dst port */ }, +- { { 10, 0 }, { 30, 0 }, { 100, 65535 } }, +- }, +- { +- "RET_A", +- .u.insns = { +- /* check that unitialized X and A contain zeros */ +- BPF_STMT(BPF_MISC | BPF_TXA, 0), +- BPF_STMT(BPF_RET | BPF_A, 0) +- }, +- CLASSIC, +- { }, +- { {1, 0}, {2, 0} }, +- }, +- { +- "INT: ADD trivial", +- .u.insns_int = { +- BPF_ALU64_IMM(BPF_MOV, R1, 1), +- BPF_ALU64_IMM(BPF_ADD, R1, 2), +- BPF_ALU64_IMM(BPF_MOV, R2, 3), +- BPF_ALU64_REG(BPF_SUB, R1, R2), +- BPF_ALU64_IMM(BPF_ADD, R1, -1), +- BPF_ALU64_IMM(BPF_MUL, R1, 3), +- BPF_ALU64_REG(BPF_MOV, R0, R1), +- BPF_EXIT_INSN(), +- }, +- INTERNAL, +- { }, +- { { 0, 0xfffffffd } } +- }, +- { +- "INT: MUL_X", +- .u.insns_int = { +- BPF_ALU64_IMM(BPF_MOV, R0, -1), +- BPF_ALU64_IMM(BPF_MOV, R1, -1), +- BPF_ALU64_IMM(BPF_MOV, R2, 3), +- BPF_ALU64_REG(BPF_MUL, R1, R2), +- BPF_JMP_IMM(BPF_JEQ, R1, 0xfffffffd, 1), +- BPF_EXIT_INSN(), +- BPF_ALU64_IMM(BPF_MOV, R0, 1), +- BPF_EXIT_INSN(), +- }, +- INTERNAL, +- { }, +- { { 0, 1 } } +- }, +- { +- "INT: MUL_X2", +- .u.insns_int = { +- BPF_ALU32_IMM(BPF_MOV, R0, -1), +- BPF_ALU32_IMM(BPF_MOV, R1, -1), +- BPF_ALU32_IMM(BPF_MOV, R2, 3), +- BPF_ALU64_REG(BPF_MUL, R1, R2), +- BPF_ALU64_IMM(BPF_RSH, R1, 8), +- BPF_JMP_IMM(BPF_JEQ, R1, 0x2ffffff, 1), +- BPF_EXIT_INSN(), +- BPF_ALU32_IMM(BPF_MOV, R0, 1), +- BPF_EXIT_INSN(), +- }, +- INTERNAL, +- { }, +- { { 0, 1 } } +- }, +- { +- "INT: MUL32_X", +- .u.insns_int = { +- BPF_ALU32_IMM(BPF_MOV, R0, -1), +- BPF_ALU64_IMM(BPF_MOV, R1, -1), +- BPF_ALU32_IMM(BPF_MOV, R2, 3), +- BPF_ALU32_REG(BPF_MUL, R1, R2), +- BPF_ALU64_IMM(BPF_RSH, R1, 8), +- BPF_JMP_IMM(BPF_JEQ, R1, 0xffffff, 1), +- BPF_EXIT_INSN(), +- BPF_ALU32_IMM(BPF_MOV, R0, 1), +- BPF_EXIT_INSN(), +- }, +- INTERNAL, +- { }, +- { { 0, 1 } } +- }, +- { +- /* Have to test all register combinations, since +- * JITing of different registers will produce +- * different asm code. +- */ +- "INT: ADD 64-bit", +- .u.insns_int = { +- BPF_ALU64_IMM(BPF_MOV, R0, 0), +- BPF_ALU64_IMM(BPF_MOV, R1, 1), +- BPF_ALU64_IMM(BPF_MOV, R2, 2), +- BPF_ALU64_IMM(BPF_MOV, R3, 3), +- BPF_ALU64_IMM(BPF_MOV, R4, 4), +- BPF_ALU64_IMM(BPF_MOV, R5, 5), +- BPF_ALU64_IMM(BPF_MOV, R6, 6), +- BPF_ALU64_IMM(BPF_MOV, R7, 7), +- BPF_ALU64_IMM(BPF_MOV, R8, 8), +- BPF_ALU64_IMM(BPF_MOV, R9, 9), +- BPF_ALU64_IMM(BPF_ADD, R0, 20), +- BPF_ALU64_IMM(BPF_ADD, R1, 20), +- BPF_ALU64_IMM(BPF_ADD, R2, 20), +- BPF_ALU64_IMM(BPF_ADD, R3, 20), +- BPF_ALU64_IMM(BPF_ADD, R4, 20), +- BPF_ALU64_IMM(BPF_ADD, R5, 20), +- BPF_ALU64_IMM(BPF_ADD, R6, 20), +- BPF_ALU64_IMM(BPF_ADD, R7, 20), +- BPF_ALU64_IMM(BPF_ADD, R8, 20), +- BPF_ALU64_IMM(BPF_ADD, R9, 20), +- BPF_ALU64_IMM(BPF_SUB, R0, 10), +- BPF_ALU64_IMM(BPF_SUB, R1, 10), +- BPF_ALU64_IMM(BPF_SUB, R2, 10), +- BPF_ALU64_IMM(BPF_SUB, R3, 10), +- BPF_ALU64_IMM(BPF_SUB, R4, 10), +- BPF_ALU64_IMM(BPF_SUB, R5, 10), +- BPF_ALU64_IMM(BPF_SUB, R6, 10), +- BPF_ALU64_IMM(BPF_SUB, R7, 10), +- BPF_ALU64_IMM(BPF_SUB, R8, 10), +- BPF_ALU64_IMM(BPF_SUB, R9, 10), +- BPF_ALU64_REG(BPF_ADD, R0, R0), +- BPF_ALU64_REG(BPF_ADD, R0, R1), +- BPF_ALU64_REG(BPF_ADD, R0, R2), +- BPF_ALU64_REG(BPF_ADD, R0, R3), +- BPF_ALU64_REG(BPF_ADD, R0, R4), +- BPF_ALU64_REG(BPF_ADD, R0, R5), +- BPF_ALU64_REG(BPF_ADD, R0, R6), +- BPF_ALU64_REG(BPF_ADD, R0, R7), +- BPF_ALU64_REG(BPF_ADD, R0, R8), +- BPF_ALU64_REG(BPF_ADD, R0, R9), /* R0 == 155 */ +- BPF_JMP_IMM(BPF_JEQ, R0, 155, 1), +- BPF_EXIT_INSN(), +- BPF_ALU64_REG(BPF_ADD, R1, R0), +- BPF_ALU64_REG(BPF_ADD, R1, R1), +- BPF_ALU64_REG(BPF_ADD, R1, R2), +- BPF_ALU64_REG(BPF_ADD, R1, R3), +- BPF_ALU64_REG(BPF_ADD, R1, R4), +- BPF_ALU64_REG(BPF_ADD, R1, R5), +- BPF_ALU64_REG(BPF_ADD, R1, R6), +- BPF_ALU64_REG(BPF_ADD, R1, R7), +- BPF_ALU64_REG(BPF_ADD, R1, R8), +- BPF_ALU64_REG(BPF_ADD, R1, R9), /* R1 == 456 */ +- BPF_JMP_IMM(BPF_JEQ, R1, 456, 1), +- BPF_EXIT_INSN(), +- BPF_ALU64_REG(BPF_ADD, R2, R0), +- BPF_ALU64_REG(BPF_ADD, R2, R1), +- BPF_ALU64_REG(BPF_ADD, R2, R2), +- BPF_ALU64_REG(BPF_ADD, R2, R3), +- BPF_ALU64_REG(BPF_ADD, R2, R4), +- BPF_ALU64_REG(BPF_ADD, R2, R5), +- BPF_ALU64_REG(BPF_ADD, R2, R6), +- BPF_ALU64_REG(BPF_ADD, R2, R7), +- BPF_ALU64_REG(BPF_ADD, R2, R8), +- BPF_ALU64_REG(BPF_ADD, R2, R9), /* R2 == 1358 */ +- BPF_JMP_IMM(BPF_JEQ, R2, 1358, 1), +- BPF_EXIT_INSN(), +- BPF_ALU64_REG(BPF_ADD, R3, R0), +- BPF_ALU64_REG(BPF_ADD, R3, R1), +- BPF_ALU64_REG(BPF_ADD, R3, R2), +- BPF_ALU64_REG(BPF_ADD, R3, R3), +- BPF_ALU64_REG(BPF_ADD, R3, R4), +- BPF_ALU64_REG(BPF_ADD, R3, R5), +- BPF_ALU64_REG(BPF_ADD, R3, R6), +- BPF_ALU64_REG(BPF_ADD, R3, R7), +- BPF_ALU64_REG(BPF_ADD, R3, R8), +- BPF_ALU64_REG(BPF_ADD, R3, R9), /* R3 == 4063 */ +- BPF_JMP_IMM(BPF_JEQ, R3, 4063, 1), +- BPF_EXIT_INSN(), +- BPF_ALU64_REG(BPF_ADD, R4, R0), +- BPF_ALU64_REG(BPF_ADD, R4, R1), +- BPF_ALU64_REG(BPF_ADD, R4, R2), +- BPF_ALU64_REG(BPF_ADD, R4, R3), +- BPF_ALU64_REG(BPF_ADD, R4, R4), +- BPF_ALU64_REG(BPF_ADD, R4, R5), +- BPF_ALU64_REG(BPF_ADD, R4, R6), +- BPF_ALU64_REG(BPF_ADD, R4, R7), +- BPF_ALU64_REG(BPF_ADD, R4, R8), +- BPF_ALU64_REG(BPF_ADD, R4, R9), /* R4 == 12177 */ +- BPF_JMP_IMM(BPF_JEQ, R4, 12177, 1), +- BPF_EXIT_INSN(), +- BPF_ALU64_REG(BPF_ADD, R5, R0), +- BPF_ALU64_REG(BPF_ADD, R5, R1), +- BPF_ALU64_REG(BPF_ADD, R5, R2), +- BPF_ALU64_REG(BPF_ADD, R5, R3), +- BPF_ALU64_REG(BPF_ADD, R5, R4), +- BPF_ALU64_REG(BPF_ADD, R5, R5), +- BPF_ALU64_REG(BPF_ADD, R5, R6), +- BPF_ALU64_REG(BPF_ADD, R5, R7), +- BPF_ALU64_REG(BPF_ADD, R5, R8), +- BPF_ALU64_REG(BPF_ADD, R5, R9), /* R5 == 36518 */ +- BPF_JMP_IMM(BPF_JEQ, R5, 36518, 1), +- BPF_EXIT_INSN(), +- BPF_ALU64_REG(BPF_ADD, R6, R0), +- BPF_ALU64_REG(BPF_ADD, R6, R1), +- BPF_ALU64_REG(BPF_ADD, R6, R2), +- BPF_ALU64_REG(BPF_ADD, R6, R3), +- BPF_ALU64_REG(BPF_ADD, R6, R4), +- BPF_ALU64_REG(BPF_ADD, R6, R5), +- BPF_ALU64_REG(BPF_ADD, R6, R6), +- BPF_ALU64_REG(BPF_ADD, R6, R7), +- BPF_ALU64_REG(BPF_ADD, R6, R8), +- BPF_ALU64_REG(BPF_ADD, R6, R9), /* R6 == 109540 */ +- BPF_JMP_IMM(BPF_JEQ, R6, 109540, 1), +- BPF_EXIT_INSN(), +- BPF_ALU64_REG(BPF_ADD, R7, R0), +- BPF_ALU64_REG(BPF_ADD, R7, R1), +- BPF_ALU64_REG(BPF_ADD, R7, R2), +- BPF_ALU64_REG(BPF_ADD, R7, R3), +- BPF_ALU64_REG(BPF_ADD, R7, R4), +- BPF_ALU64_REG(BPF_ADD, R7, R5), +- BPF_ALU64_REG(BPF_ADD, R7, R6), +- BPF_ALU64_REG(BPF_ADD, R7, R7), +- BPF_ALU64_REG(BPF_ADD, R7, R8), +- BPF_ALU64_REG(BPF_ADD, R7, R9), /* R7 == 328605 */ +- BPF_JMP_IMM(BPF_JEQ, R7, 328605, 1), +- BPF_EXIT_INSN(), +- BPF_ALU64_REG(BPF_ADD, R8, R0), +- BPF_ALU64_REG(BPF_ADD, R8, R1), +- BPF_ALU64_REG(BPF_ADD, R8, R2), +- BPF_ALU64_REG(BPF_ADD, R8, R3), +- BPF_ALU64_REG(BPF_ADD, R8, R4), +- BPF_ALU64_REG(BPF_ADD, R8, R5), +- BPF_ALU64_REG(BPF_ADD, R8, R6), +- BPF_ALU64_REG(BPF_ADD, R8, R7), +- BPF_ALU64_REG(BPF_ADD, R8, R8), +- BPF_ALU64_REG(BPF_ADD, R8, R9), /* R8 == 985799 */ +- BPF_JMP_IMM(BPF_JEQ, R8, 985799, 1), +- BPF_EXIT_INSN(), +- BPF_ALU64_REG(BPF_ADD, R9, R0), +- BPF_ALU64_REG(BPF_ADD, R9, R1), +- BPF_ALU64_REG(BPF_ADD, R9, R2), +- BPF_ALU64_REG(BPF_ADD, R9, R3), +- BPF_ALU64_REG(BPF_ADD, R9, R4), +- BPF_ALU64_REG(BPF_ADD, R9, R5), +- BPF_ALU64_REG(BPF_ADD, R9, R6), +- BPF_ALU64_REG(BPF_ADD, R9, R7), +- BPF_ALU64_REG(BPF_ADD, R9, R8), +- BPF_ALU64_REG(BPF_ADD, R9, R9), /* R9 == 2957380 */ +- BPF_ALU64_REG(BPF_MOV, R0, R9), +- BPF_EXIT_INSN(), +- }, +- INTERNAL, +- { }, +- { { 0, 2957380 } } +- }, +- { +- "INT: ADD 32-bit", +- .u.insns_int = { +- BPF_ALU32_IMM(BPF_MOV, R0, 20), +- BPF_ALU32_IMM(BPF_MOV, R1, 1), +- BPF_ALU32_IMM(BPF_MOV, R2, 2), +- BPF_ALU32_IMM(BPF_MOV, R3, 3), +- BPF_ALU32_IMM(BPF_MOV, R4, 4), +- BPF_ALU32_IMM(BPF_MOV, R5, 5), +- BPF_ALU32_IMM(BPF_MOV, R6, 6), +- BPF_ALU32_IMM(BPF_MOV, R7, 7), +- BPF_ALU32_IMM(BPF_MOV, R8, 8), +- BPF_ALU32_IMM(BPF_MOV, R9, 9), +- BPF_ALU64_IMM(BPF_ADD, R1, 10), +- BPF_ALU64_IMM(BPF_ADD, R2, 10), +- BPF_ALU64_IMM(BPF_ADD, R3, 10), +- BPF_ALU64_IMM(BPF_ADD, R4, 10), +- BPF_ALU64_IMM(BPF_ADD, R5, 10), +- BPF_ALU64_IMM(BPF_ADD, R6, 10), +- BPF_ALU64_IMM(BPF_ADD, R7, 10), +- BPF_ALU64_IMM(BPF_ADD, R8, 10), +- BPF_ALU64_IMM(BPF_ADD, R9, 10), +- BPF_ALU32_REG(BPF_ADD, R0, R1), +- BPF_ALU32_REG(BPF_ADD, R0, R2), +- BPF_ALU32_REG(BPF_ADD, R0, R3), +- BPF_ALU32_REG(BPF_ADD, R0, R4), +- BPF_ALU32_REG(BPF_ADD, R0, R5), +- BPF_ALU32_REG(BPF_ADD, R0, R6), +- BPF_ALU32_REG(BPF_ADD, R0, R7), +- BPF_ALU32_REG(BPF_ADD, R0, R8), +- BPF_ALU32_REG(BPF_ADD, R0, R9), /* R0 == 155 */ +- BPF_JMP_IMM(BPF_JEQ, R0, 155, 1), +- BPF_EXIT_INSN(), +- BPF_ALU32_REG(BPF_ADD, R1, R0), +- BPF_ALU32_REG(BPF_ADD, R1, R1), +- BPF_ALU32_REG(BPF_ADD, R1, R2), +- BPF_ALU32_REG(BPF_ADD, R1, R3), +- BPF_ALU32_REG(BPF_ADD, R1, R4), +- BPF_ALU32_REG(BPF_ADD, R1, R5), +- BPF_ALU32_REG(BPF_ADD, R1, R6), +- BPF_ALU32_REG(BPF_ADD, R1, R7), +- BPF_ALU32_REG(BPF_ADD, R1, R8), +- BPF_ALU32_REG(BPF_ADD, R1, R9), /* R1 == 456 */ +- BPF_JMP_IMM(BPF_JEQ, R1, 456, 1), +- BPF_EXIT_INSN(), +- BPF_ALU32_REG(BPF_ADD, R2, R0), +- BPF_ALU32_REG(BPF_ADD, R2, R1), +- BPF_ALU32_REG(BPF_ADD, R2, R2), +- BPF_ALU32_REG(BPF_ADD, R2, R3), +- BPF_ALU32_REG(BPF_ADD, R2, R4), +- BPF_ALU32_REG(BPF_ADD, R2, R5), +- BPF_ALU32_REG(BPF_ADD, R2, R6), +- BPF_ALU32_REG(BPF_ADD, R2, R7), +- BPF_ALU32_REG(BPF_ADD, R2, R8), +- BPF_ALU32_REG(BPF_ADD, R2, R9), /* R2 == 1358 */ +- BPF_JMP_IMM(BPF_JEQ, R2, 1358, 1), +- BPF_EXIT_INSN(), +- BPF_ALU32_REG(BPF_ADD, R3, R0), +- BPF_ALU32_REG(BPF_ADD, R3, R1), +- BPF_ALU32_REG(BPF_ADD, R3, R2), +- BPF_ALU32_REG(BPF_ADD, R3, R3), +- BPF_ALU32_REG(BPF_ADD, R3, R4), +- BPF_ALU32_REG(BPF_ADD, R3, R5), +- BPF_ALU32_REG(BPF_ADD, R3, R6), +- BPF_ALU32_REG(BPF_ADD, R3, R7), +- BPF_ALU32_REG(BPF_ADD, R3, R8), +- BPF_ALU32_REG(BPF_ADD, R3, R9), /* R3 == 4063 */ +- BPF_JMP_IMM(BPF_JEQ, R3, 4063, 1), +- BPF_EXIT_INSN(), +- BPF_ALU32_REG(BPF_ADD, R4, R0), +- BPF_ALU32_REG(BPF_ADD, R4, R1), +- BPF_ALU32_REG(BPF_ADD, R4, R2), +- BPF_ALU32_REG(BPF_ADD, R4, R3), +- BPF_ALU32_REG(BPF_ADD, R4, R4), +- BPF_ALU32_REG(BPF_ADD, R4, R5), +- BPF_ALU32_REG(BPF_ADD, R4, R6), +- BPF_ALU32_REG(BPF_ADD, R4, R7), +- BPF_ALU32_REG(BPF_ADD, R4, R8), +- BPF_ALU32_REG(BPF_ADD, R4, R9), /* R4 == 12177 */ +- BPF_JMP_IMM(BPF_JEQ, R4, 12177, 1), +- BPF_EXIT_INSN(), +- BPF_ALU32_REG(BPF_ADD, R5, R0), +- BPF_ALU32_REG(BPF_ADD, R5, R1), +- BPF_ALU32_REG(BPF_ADD, R5, R2), +- BPF_ALU32_REG(BPF_ADD, R5, R3), +- BPF_ALU32_REG(BPF_ADD, R5, R4), +- BPF_ALU32_REG(BPF_ADD, R5, R5), +- BPF_ALU32_REG(BPF_ADD, R5, R6), +- BPF_ALU32_REG(BPF_ADD, R5, R7), +- BPF_ALU32_REG(BPF_ADD, R5, R8), +- BPF_ALU32_REG(BPF_ADD, R5, R9), /* R5 == 36518 */ +- BPF_JMP_IMM(BPF_JEQ, R5, 36518, 1), +- BPF_EXIT_INSN(), +- BPF_ALU32_REG(BPF_ADD, R6, R0), +- BPF_ALU32_REG(BPF_ADD, R6, R1), +- BPF_ALU32_REG(BPF_ADD, R6, R2), +- BPF_ALU32_REG(BPF_ADD, R6, R3), +- BPF_ALU32_REG(BPF_ADD, R6, R4), +- BPF_ALU32_REG(BPF_ADD, R6, R5), +- BPF_ALU32_REG(BPF_ADD, R6, R6), +- BPF_ALU32_REG(BPF_ADD, R6, R7), +- BPF_ALU32_REG(BPF_ADD, R6, R8), +- BPF_ALU32_REG(BPF_ADD, R6, R9), /* R6 == 109540 */ +- BPF_JMP_IMM(BPF_JEQ, R6, 109540, 1), +- BPF_EXIT_INSN(), +- BPF_ALU32_REG(BPF_ADD, R7, R0), +- BPF_ALU32_REG(BPF_ADD, R7, R1), +- BPF_ALU32_REG(BPF_ADD, R7, R2), +- BPF_ALU32_REG(BPF_ADD, R7, R3), +- BPF_ALU32_REG(BPF_ADD, R7, R4), +- BPF_ALU32_REG(BPF_ADD, R7, R5), +- BPF_ALU32_REG(BPF_ADD, R7, R6), +- BPF_ALU32_REG(BPF_ADD, R7, R7), +- BPF_ALU32_REG(BPF_ADD, R7, R8), +- BPF_ALU32_REG(BPF_ADD, R7, R9), /* R7 == 328605 */ +- BPF_JMP_IMM(BPF_JEQ, R7, 328605, 1), +- BPF_EXIT_INSN(), +- BPF_ALU32_REG(BPF_ADD, R8, R0), +- BPF_ALU32_REG(BPF_ADD, R8, R1), +- BPF_ALU32_REG(BPF_ADD, R8, R2), +- BPF_ALU32_REG(BPF_ADD, R8, R3), +- BPF_ALU32_REG(BPF_ADD, R8, R4), +- BPF_ALU32_REG(BPF_ADD, R8, R5), +- BPF_ALU32_REG(BPF_ADD, R8, R6), +- BPF_ALU32_REG(BPF_ADD, R8, R7), +- BPF_ALU32_REG(BPF_ADD, R8, R8), +- BPF_ALU32_REG(BPF_ADD, R8, R9), /* R8 == 985799 */ +- BPF_JMP_IMM(BPF_JEQ, R8, 985799, 1), +- BPF_EXIT_INSN(), +- BPF_ALU32_REG(BPF_ADD, R9, R0), +- BPF_ALU32_REG(BPF_ADD, R9, R1), +- BPF_ALU32_REG(BPF_ADD, R9, R2), +- BPF_ALU32_REG(BPF_ADD, R9, R3), +- BPF_ALU32_REG(BPF_ADD, R9, R4), +- BPF_ALU32_REG(BPF_ADD, R9, R5), +- BPF_ALU32_REG(BPF_ADD, R9, R6), +- BPF_ALU32_REG(BPF_ADD, R9, R7), +- BPF_ALU32_REG(BPF_ADD, R9, R8), +- BPF_ALU32_REG(BPF_ADD, R9, R9), /* R9 == 2957380 */ +- BPF_ALU32_REG(BPF_MOV, R0, R9), +- BPF_EXIT_INSN(), +- }, +- INTERNAL, +- { }, +- { { 0, 2957380 } } +- }, +- { /* Mainly checking JIT here. */ +- "INT: SUB", +- .u.insns_int = { +- BPF_ALU64_IMM(BPF_MOV, R0, 0), +- BPF_ALU64_IMM(BPF_MOV, R1, 1), +- BPF_ALU64_IMM(BPF_MOV, R2, 2), +- BPF_ALU64_IMM(BPF_MOV, R3, 3), +- BPF_ALU64_IMM(BPF_MOV, R4, 4), +- BPF_ALU64_IMM(BPF_MOV, R5, 5), +- BPF_ALU64_IMM(BPF_MOV, R6, 6), +- BPF_ALU64_IMM(BPF_MOV, R7, 7), +- BPF_ALU64_IMM(BPF_MOV, R8, 8), +- BPF_ALU64_IMM(BPF_MOV, R9, 9), +- BPF_ALU64_REG(BPF_SUB, R0, R0), +- BPF_ALU64_REG(BPF_SUB, R0, R1), +- BPF_ALU64_REG(BPF_SUB, R0, R2), +- BPF_ALU64_REG(BPF_SUB, R0, R3), +- BPF_ALU64_REG(BPF_SUB, R0, R4), +- BPF_ALU64_REG(BPF_SUB, R0, R5), +- BPF_ALU64_REG(BPF_SUB, R0, R6), +- BPF_ALU64_REG(BPF_SUB, R0, R7), +- BPF_ALU64_REG(BPF_SUB, R0, R8), +- BPF_ALU64_REG(BPF_SUB, R0, R9), +- BPF_ALU64_IMM(BPF_SUB, R0, 10), +- BPF_JMP_IMM(BPF_JEQ, R0, -55, 1), +- BPF_EXIT_INSN(), +- BPF_ALU64_REG(BPF_SUB, R1, R0), +- BPF_ALU64_REG(BPF_SUB, R1, R2), +- BPF_ALU64_REG(BPF_SUB, R1, R3), +- BPF_ALU64_REG(BPF_SUB, R1, R4), +- BPF_ALU64_REG(BPF_SUB, R1, R5), +- BPF_ALU64_REG(BPF_SUB, R1, R6), +- BPF_ALU64_REG(BPF_SUB, R1, R7), +- BPF_ALU64_REG(BPF_SUB, R1, R8), +- BPF_ALU64_REG(BPF_SUB, R1, R9), +- BPF_ALU64_IMM(BPF_SUB, R1, 10), +- BPF_ALU64_REG(BPF_SUB, R2, R0), +- BPF_ALU64_REG(BPF_SUB, R2, R1), +- BPF_ALU64_REG(BPF_SUB, R2, R3), +- BPF_ALU64_REG(BPF_SUB, R2, R4), +- BPF_ALU64_REG(BPF_SUB, R2, R5), +- BPF_ALU64_REG(BPF_SUB, R2, R6), +- BPF_ALU64_REG(BPF_SUB, R2, R7), +- BPF_ALU64_REG(BPF_SUB, R2, R8), +- BPF_ALU64_REG(BPF_SUB, R2, R9), +- BPF_ALU64_IMM(BPF_SUB, R2, 10), +- BPF_ALU64_REG(BPF_SUB, R3, R0), +- BPF_ALU64_REG(BPF_SUB, R3, R1), +- BPF_ALU64_REG(BPF_SUB, R3, R2), +- BPF_ALU64_REG(BPF_SUB, R3, R4), +- BPF_ALU64_REG(BPF_SUB, R3, R5), +- BPF_ALU64_REG(BPF_SUB, R3, R6), +- BPF_ALU64_REG(BPF_SUB, R3, R7), +- BPF_ALU64_REG(BPF_SUB, R3, R8), +- BPF_ALU64_REG(BPF_SUB, R3, R9), +- BPF_ALU64_IMM(BPF_SUB, R3, 10), +- BPF_ALU64_REG(BPF_SUB, R4, R0), +- BPF_ALU64_REG(BPF_SUB, R4, R1), +- BPF_ALU64_REG(BPF_SUB, R4, R2), +- BPF_ALU64_REG(BPF_SUB, R4, R3), +- BPF_ALU64_REG(BPF_SUB, R4, R5), +- BPF_ALU64_REG(BPF_SUB, R4, R6), +- BPF_ALU64_REG(BPF_SUB, R4, R7), +- BPF_ALU64_REG(BPF_SUB, R4, R8), +- BPF_ALU64_REG(BPF_SUB, R4, R9), +- BPF_ALU64_IMM(BPF_SUB, R4, 10), +- BPF_ALU64_REG(BPF_SUB, R5, R0), +- BPF_ALU64_REG(BPF_SUB, R5, R1), +- BPF_ALU64_REG(BPF_SUB, R5, R2), +- BPF_ALU64_REG(BPF_SUB, R5, R3), +- BPF_ALU64_REG(BPF_SUB, R5, R4), +- BPF_ALU64_REG(BPF_SUB, R5, R6), +- BPF_ALU64_REG(BPF_SUB, R5, R7), +- BPF_ALU64_REG(BPF_SUB, R5, R8), +- BPF_ALU64_REG(BPF_SUB, R5, R9), +- BPF_ALU64_IMM(BPF_SUB, R5, 10), +- BPF_ALU64_REG(BPF_SUB, R6, R0), +- BPF_ALU64_REG(BPF_SUB, R6, R1), +- BPF_ALU64_REG(BPF_SUB, R6, R2), +- BPF_ALU64_REG(BPF_SUB, R6, R3), +- BPF_ALU64_REG(BPF_SUB, R6, R4), +- BPF_ALU64_REG(BPF_SUB, R6, R5), +- BPF_ALU64_REG(BPF_SUB, R6, R7), +- BPF_ALU64_REG(BPF_SUB, R6, R8), +- BPF_ALU64_REG(BPF_SUB, R6, R9), +- BPF_ALU64_IMM(BPF_SUB, R6, 10), +- BPF_ALU64_REG(BPF_SUB, R7, R0), +- BPF_ALU64_REG(BPF_SUB, R7, R1), +- BPF_ALU64_REG(BPF_SUB, R7, R2), +- BPF_ALU64_REG(BPF_SUB, R7, R3), +- BPF_ALU64_REG(BPF_SUB, R7, R4), +- BPF_ALU64_REG(BPF_SUB, R7, R5), +- BPF_ALU64_REG(BPF_SUB, R7, R6), +- BPF_ALU64_REG(BPF_SUB, R7, R8), +- BPF_ALU64_REG(BPF_SUB, R7, R9), +- BPF_ALU64_IMM(BPF_SUB, R7, 10), +- BPF_ALU64_REG(BPF_SUB, R8, R0), +- BPF_ALU64_REG(BPF_SUB, R8, R1), +- BPF_ALU64_REG(BPF_SUB, R8, R2), +- BPF_ALU64_REG(BPF_SUB, R8, R3), +- BPF_ALU64_REG(BPF_SUB, R8, R4), +- BPF_ALU64_REG(BPF_SUB, R8, R5), +- BPF_ALU64_REG(BPF_SUB, R8, R6), +- BPF_ALU64_REG(BPF_SUB, R8, R7), +- BPF_ALU64_REG(BPF_SUB, R8, R9), +- BPF_ALU64_IMM(BPF_SUB, R8, 10), +- BPF_ALU64_REG(BPF_SUB, R9, R0), +- BPF_ALU64_REG(BPF_SUB, R9, R1), +- BPF_ALU64_REG(BPF_SUB, R9, R2), +- BPF_ALU64_REG(BPF_SUB, R9, R3), +- BPF_ALU64_REG(BPF_SUB, R9, R4), +- BPF_ALU64_REG(BPF_SUB, R9, R5), +- BPF_ALU64_REG(BPF_SUB, R9, R6), +- BPF_ALU64_REG(BPF_SUB, R9, R7), +- BPF_ALU64_REG(BPF_SUB, R9, R8), +- BPF_ALU64_IMM(BPF_SUB, R9, 10), +- BPF_ALU64_IMM(BPF_SUB, R0, 10), +- BPF_ALU64_IMM(BPF_NEG, R0, 0), +- BPF_ALU64_REG(BPF_SUB, R0, R1), +- BPF_ALU64_REG(BPF_SUB, R0, R2), +- BPF_ALU64_REG(BPF_SUB, R0, R3), +- BPF_ALU64_REG(BPF_SUB, R0, R4), +- BPF_ALU64_REG(BPF_SUB, R0, R5), +- BPF_ALU64_REG(BPF_SUB, R0, R6), +- BPF_ALU64_REG(BPF_SUB, R0, R7), +- BPF_ALU64_REG(BPF_SUB, R0, R8), +- BPF_ALU64_REG(BPF_SUB, R0, R9), +- BPF_EXIT_INSN(), +- }, +- INTERNAL, +- { }, +- { { 0, 11 } } +- }, +- { /* Mainly checking JIT here. */ +- "INT: XOR", +- .u.insns_int = { +- BPF_ALU64_REG(BPF_SUB, R0, R0), +- BPF_ALU64_REG(BPF_XOR, R1, R1), +- BPF_JMP_REG(BPF_JEQ, R0, R1, 1), +- BPF_EXIT_INSN(), +- BPF_ALU64_IMM(BPF_MOV, R0, 10), +- BPF_ALU64_IMM(BPF_MOV, R1, -1), +- BPF_ALU64_REG(BPF_SUB, R1, R1), +- BPF_ALU64_REG(BPF_XOR, R2, R2), +- BPF_JMP_REG(BPF_JEQ, R1, R2, 1), +- BPF_EXIT_INSN(), +- BPF_ALU64_REG(BPF_SUB, R2, R2), +- BPF_ALU64_REG(BPF_XOR, R3, R3), +- BPF_ALU64_IMM(BPF_MOV, R0, 10), +- BPF_ALU64_IMM(BPF_MOV, R1, -1), +- BPF_JMP_REG(BPF_JEQ, R2, R3, 1), +- BPF_EXIT_INSN(), +- BPF_ALU64_REG(BPF_SUB, R3, R3), +- BPF_ALU64_REG(BPF_XOR, R4, R4), +- BPF_ALU64_IMM(BPF_MOV, R2, 1), +- BPF_ALU64_IMM(BPF_MOV, R5, -1), +- BPF_JMP_REG(BPF_JEQ, R3, R4, 1), +- BPF_EXIT_INSN(), +- BPF_ALU64_REG(BPF_SUB, R4, R4), +- BPF_ALU64_REG(BPF_XOR, R5, R5), +- BPF_ALU64_IMM(BPF_MOV, R3, 1), +- BPF_ALU64_IMM(BPF_MOV, R7, -1), +- BPF_JMP_REG(BPF_JEQ, R5, R4, 1), +- BPF_EXIT_INSN(), +- BPF_ALU64_IMM(BPF_MOV, R5, 1), +- BPF_ALU64_REG(BPF_SUB, R5, R5), +- BPF_ALU64_REG(BPF_XOR, R6, R6), +- BPF_ALU64_IMM(BPF_MOV, R1, 1), +- BPF_ALU64_IMM(BPF_MOV, R8, -1), +- BPF_JMP_REG(BPF_JEQ, R5, R6, 1), +- BPF_EXIT_INSN(), +- BPF_ALU64_REG(BPF_SUB, R6, R6), +- BPF_ALU64_REG(BPF_XOR, R7, R7), +- BPF_JMP_REG(BPF_JEQ, R7, R6, 1), +- BPF_EXIT_INSN(), +- BPF_ALU64_REG(BPF_SUB, R7, R7), +- BPF_ALU64_REG(BPF_XOR, R8, R8), +- BPF_JMP_REG(BPF_JEQ, R7, R8, 1), +- BPF_EXIT_INSN(), +- BPF_ALU64_REG(BPF_SUB, R8, R8), +- BPF_ALU64_REG(BPF_XOR, R9, R9), +- BPF_JMP_REG(BPF_JEQ, R9, R8, 1), +- BPF_EXIT_INSN(), +- BPF_ALU64_REG(BPF_SUB, R9, R9), +- BPF_ALU64_REG(BPF_XOR, R0, R0), +- BPF_JMP_REG(BPF_JEQ, R9, R0, 1), +- BPF_EXIT_INSN(), +- BPF_ALU64_REG(BPF_SUB, R1, R1), +- BPF_ALU64_REG(BPF_XOR, R0, R0), +- BPF_JMP_REG(BPF_JEQ, R9, R0, 2), +- BPF_ALU64_IMM(BPF_MOV, R0, 0), +- BPF_EXIT_INSN(), +- BPF_ALU64_IMM(BPF_MOV, R0, 1), +- BPF_EXIT_INSN(), +- }, +- INTERNAL, +- { }, +- { { 0, 1 } } +- }, +- { /* Mainly checking JIT here. */ +- "INT: MUL", +- .u.insns_int = { +- BPF_ALU64_IMM(BPF_MOV, R0, 11), +- BPF_ALU64_IMM(BPF_MOV, R1, 1), +- BPF_ALU64_IMM(BPF_MOV, R2, 2), +- BPF_ALU64_IMM(BPF_MOV, R3, 3), +- BPF_ALU64_IMM(BPF_MOV, R4, 4), +- BPF_ALU64_IMM(BPF_MOV, R5, 5), +- BPF_ALU64_IMM(BPF_MOV, R6, 6), +- BPF_ALU64_IMM(BPF_MOV, R7, 7), +- BPF_ALU64_IMM(BPF_MOV, R8, 8), +- BPF_ALU64_IMM(BPF_MOV, R9, 9), +- BPF_ALU64_REG(BPF_MUL, R0, R0), +- BPF_ALU64_REG(BPF_MUL, R0, R1), +- BPF_ALU64_REG(BPF_MUL, R0, R2), +- BPF_ALU64_REG(BPF_MUL, R0, R3), +- BPF_ALU64_REG(BPF_MUL, R0, R4), +- BPF_ALU64_REG(BPF_MUL, R0, R5), +- BPF_ALU64_REG(BPF_MUL, R0, R6), +- BPF_ALU64_REG(BPF_MUL, R0, R7), +- BPF_ALU64_REG(BPF_MUL, R0, R8), +- BPF_ALU64_REG(BPF_MUL, R0, R9), +- BPF_ALU64_IMM(BPF_MUL, R0, 10), +- BPF_JMP_IMM(BPF_JEQ, R0, 439084800, 1), +- BPF_EXIT_INSN(), +- BPF_ALU64_REG(BPF_MUL, R1, R0), +- BPF_ALU64_REG(BPF_MUL, R1, R2), +- BPF_ALU64_REG(BPF_MUL, R1, R3), +- BPF_ALU64_REG(BPF_MUL, R1, R4), +- BPF_ALU64_REG(BPF_MUL, R1, R5), +- BPF_ALU64_REG(BPF_MUL, R1, R6), +- BPF_ALU64_REG(BPF_MUL, R1, R7), +- BPF_ALU64_REG(BPF_MUL, R1, R8), +- BPF_ALU64_REG(BPF_MUL, R1, R9), +- BPF_ALU64_IMM(BPF_MUL, R1, 10), +- BPF_ALU64_REG(BPF_MOV, R2, R1), +- BPF_ALU64_IMM(BPF_RSH, R2, 32), +- BPF_JMP_IMM(BPF_JEQ, R2, 0x5a924, 1), +- BPF_EXIT_INSN(), +- BPF_ALU64_IMM(BPF_LSH, R1, 32), +- BPF_ALU64_IMM(BPF_ARSH, R1, 32), +- BPF_JMP_IMM(BPF_JEQ, R1, 0xebb90000, 1), +- BPF_EXIT_INSN(), +- BPF_ALU64_REG(BPF_MUL, R2, R0), +- BPF_ALU64_REG(BPF_MUL, R2, R1), +- BPF_ALU64_REG(BPF_MUL, R2, R3), +- BPF_ALU64_REG(BPF_MUL, R2, R4), +- BPF_ALU64_REG(BPF_MUL, R2, R5), +- BPF_ALU64_REG(BPF_MUL, R2, R6), +- BPF_ALU64_REG(BPF_MUL, R2, R7), +- BPF_ALU64_REG(BPF_MUL, R2, R8), +- BPF_ALU64_REG(BPF_MUL, R2, R9), +- BPF_ALU64_IMM(BPF_MUL, R2, 10), +- BPF_ALU64_IMM(BPF_RSH, R2, 32), +- BPF_ALU64_REG(BPF_MOV, R0, R2), +- BPF_EXIT_INSN(), +- }, +- INTERNAL, +- { }, +- { { 0, 0x35d97ef2 } } +- }, +- { +- "INT: ALU MIX", +- .u.insns_int = { +- BPF_ALU64_IMM(BPF_MOV, R0, 11), +- BPF_ALU64_IMM(BPF_ADD, R0, -1), +- BPF_ALU64_IMM(BPF_MOV, R2, 2), +- BPF_ALU64_IMM(BPF_XOR, R2, 3), +- BPF_ALU64_REG(BPF_DIV, R0, R2), +- BPF_JMP_IMM(BPF_JEQ, R0, 10, 1), +- BPF_EXIT_INSN(), +- BPF_ALU64_IMM(BPF_MOD, R0, 3), +- BPF_JMP_IMM(BPF_JEQ, R0, 1, 1), +- BPF_EXIT_INSN(), +- BPF_ALU64_IMM(BPF_MOV, R0, -1), +- BPF_EXIT_INSN(), +- }, +- INTERNAL, +- { }, +- { { 0, -1 } } +- }, +- { +- "INT: DIV + ABS", +- .u.insns_int = { +- BPF_ALU64_REG(BPF_MOV, R6, R1), +- BPF_LD_ABS(BPF_B, 3), +- BPF_ALU64_IMM(BPF_MOV, R2, 2), +- BPF_ALU32_REG(BPF_DIV, R0, R2), +- BPF_ALU64_REG(BPF_MOV, R8, R0), +- BPF_LD_ABS(BPF_B, 4), +- BPF_ALU64_REG(BPF_ADD, R8, R0), +- BPF_LD_IND(BPF_B, R8, -70), +- BPF_EXIT_INSN(), +- }, +- INTERNAL, +- { 10, 20, 30, 40, 50 }, +- { { 4, 0 }, { 5, 10 } } +- }, +- { +- "INT: DIV by zero", +- .u.insns_int = { +- BPF_ALU64_REG(BPF_MOV, R6, R1), +- BPF_ALU64_IMM(BPF_MOV, R7, 0), +- BPF_LD_ABS(BPF_B, 3), +- BPF_ALU32_REG(BPF_DIV, R0, R7), +- BPF_EXIT_INSN(), +- }, +- INTERNAL, +- { 10, 20, 30, 40, 50 }, +- { { 3, 0 }, { 4, 0 } } +- }, +- { +- "check: missing ret", +- .u.insns = { +- BPF_STMT(BPF_LD | BPF_IMM, 1), +- }, +- CLASSIC | FLAG_NO_DATA | FLAG_EXPECTED_FAIL, +- { }, +- { } +- }, +- { +- "check: div_k_0", +- .u.insns = { +- BPF_STMT(BPF_ALU | BPF_DIV | BPF_K, 0), +- BPF_STMT(BPF_RET | BPF_K, 0) +- }, +- CLASSIC | FLAG_NO_DATA | FLAG_EXPECTED_FAIL, +- { }, +- { } +- }, +- { +- "check: unknown insn", +- .u.insns = { +- /* seccomp insn, rejected in socket filter */ +- BPF_STMT(BPF_LDX | BPF_W | BPF_ABS, 0), +- BPF_STMT(BPF_RET | BPF_K, 0) +- }, +- CLASSIC | FLAG_EXPECTED_FAIL, +- { }, +- { } +- }, +- { +- "check: out of range spill/fill", +- .u.insns = { +- BPF_STMT(BPF_STX, 16), +- BPF_STMT(BPF_RET | BPF_K, 0) +- }, +- CLASSIC | FLAG_NO_DATA | FLAG_EXPECTED_FAIL, +- { }, +- { } +- }, +- { +- "JUMPS + HOLES", +- .u.insns = { +- BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0), +- BPF_JUMP(BPF_JMP | BPF_JGE, 0, 13, 15), +- BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0), +- BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0), +- BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0), +- BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0), +- BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0), +- BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0), +- BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0), +- BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0), +- BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0), +- BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0), +- BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0), +- BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0), +- BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0), +- BPF_JUMP(BPF_JMP | BPF_JEQ, 0x90c2894d, 3, 4), +- BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0), +- BPF_JUMP(BPF_JMP | BPF_JEQ, 0x90c2894d, 1, 2), +- BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0), +- BPF_JUMP(BPF_JMP | BPF_JGE, 0, 14, 15), +- BPF_JUMP(BPF_JMP | BPF_JGE, 0, 13, 14), +- BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0), +- BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0), +- BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0), +- BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0), +- BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0), +- BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0), +- BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0), +- BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0), +- BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0), +- BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0), +- BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0), +- BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0), +- BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0), +- BPF_JUMP(BPF_JMP | BPF_JEQ, 0x2ac28349, 2, 3), +- BPF_JUMP(BPF_JMP | BPF_JEQ, 0x2ac28349, 1, 2), +- BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0), +- BPF_JUMP(BPF_JMP | BPF_JGE, 0, 14, 15), +- BPF_JUMP(BPF_JMP | BPF_JGE, 0, 13, 14), +- BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0), +- BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0), +- BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0), +- BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0), +- BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0), +- BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0), +- BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0), +- BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0), +- BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0), +- BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0), +- BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0), +- BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0), +- BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0), +- BPF_JUMP(BPF_JMP | BPF_JEQ, 0x90d2ff41, 2, 3), +- BPF_JUMP(BPF_JMP | BPF_JEQ, 0x90d2ff41, 1, 2), +- BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0), +- BPF_STMT(BPF_RET | BPF_A, 0), +- BPF_STMT(BPF_RET | BPF_A, 0), +- }, +- CLASSIC, +- { 0x00, 0x1b, 0x21, 0x3c, 0x9d, 0xf8, +- 0x90, 0xe2, 0xba, 0x0a, 0x56, 0xb4, +- 0x08, 0x00, +- 0x45, 0x00, 0x00, 0x28, 0x00, 0x00, +- 0x20, 0x00, 0x40, 0x11, 0x00, 0x00, /* IP header */ +- 0xc0, 0xa8, 0x33, 0x01, +- 0xc0, 0xa8, 0x33, 0x02, +- 0xbb, 0xb6, +- 0xa9, 0xfa, +- 0x00, 0x14, 0x00, 0x00, +- 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, +- 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, +- 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, +- 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, +- 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, +- 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, +- 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, +- 0xcc, 0xcc, 0xcc, 0xcc }, +- { { 88, 0x001b } } +- }, +- { +- "check: RET X", +- .u.insns = { +- BPF_STMT(BPF_RET | BPF_X, 0), +- }, +- CLASSIC | FLAG_NO_DATA | FLAG_EXPECTED_FAIL, +- { }, +- { }, +- }, +- { +- "check: LDX + RET X", +- .u.insns = { +- BPF_STMT(BPF_LDX | BPF_IMM, 42), +- BPF_STMT(BPF_RET | BPF_X, 0), +- }, +- CLASSIC | FLAG_NO_DATA | FLAG_EXPECTED_FAIL, +- { }, +- { }, +- }, +- { /* Mainly checking JIT here. */ +- "M[]: alt STX + LDX", +- .u.insns = { +- BPF_STMT(BPF_LDX | BPF_IMM, 100), +- BPF_STMT(BPF_STX, 0), +- BPF_STMT(BPF_LDX | BPF_MEM, 0), +- BPF_STMT(BPF_MISC | BPF_TXA, 0), +- BPF_STMT(BPF_ALU | BPF_ADD | BPF_K, 1), +- BPF_STMT(BPF_MISC | BPF_TAX, 0), +- BPF_STMT(BPF_STX, 1), +- BPF_STMT(BPF_LDX | BPF_MEM, 1), +- BPF_STMT(BPF_MISC | BPF_TXA, 0), +- BPF_STMT(BPF_ALU | BPF_ADD | BPF_K, 1), +- BPF_STMT(BPF_MISC | BPF_TAX, 0), +- BPF_STMT(BPF_STX, 2), +- BPF_STMT(BPF_LDX | BPF_MEM, 2), +- BPF_STMT(BPF_MISC | BPF_TXA, 0), +- BPF_STMT(BPF_ALU | BPF_ADD | BPF_K, 1), +- BPF_STMT(BPF_MISC | BPF_TAX, 0), +- BPF_STMT(BPF_STX, 3), +- BPF_STMT(BPF_LDX | BPF_MEM, 3), +- BPF_STMT(BPF_MISC | BPF_TXA, 0), +- BPF_STMT(BPF_ALU | BPF_ADD | BPF_K, 1), +- BPF_STMT(BPF_MISC | BPF_TAX, 0), +- BPF_STMT(BPF_STX, 4), +- BPF_STMT(BPF_LDX | BPF_MEM, 4), +- BPF_STMT(BPF_MISC | BPF_TXA, 0), +- BPF_STMT(BPF_ALU | BPF_ADD | BPF_K, 1), +- BPF_STMT(BPF_MISC | BPF_TAX, 0), +- BPF_STMT(BPF_STX, 5), +- BPF_STMT(BPF_LDX | BPF_MEM, 5), +- BPF_STMT(BPF_MISC | BPF_TXA, 0), +- BPF_STMT(BPF_ALU | BPF_ADD | BPF_K, 1), +- BPF_STMT(BPF_MISC | BPF_TAX, 0), +- BPF_STMT(BPF_STX, 6), +- BPF_STMT(BPF_LDX | BPF_MEM, 6), +- BPF_STMT(BPF_MISC | BPF_TXA, 0), +- BPF_STMT(BPF_ALU | BPF_ADD | BPF_K, 1), +- BPF_STMT(BPF_MISC | BPF_TAX, 0), +- BPF_STMT(BPF_STX, 7), +- BPF_STMT(BPF_LDX | BPF_MEM, 7), +- BPF_STMT(BPF_MISC | BPF_TXA, 0), +- BPF_STMT(BPF_ALU | BPF_ADD | BPF_K, 1), +- BPF_STMT(BPF_MISC | BPF_TAX, 0), +- BPF_STMT(BPF_STX, 8), +- BPF_STMT(BPF_LDX | BPF_MEM, 8), +- BPF_STMT(BPF_MISC | BPF_TXA, 0), +- BPF_STMT(BPF_ALU | BPF_ADD | BPF_K, 1), +- BPF_STMT(BPF_MISC | BPF_TAX, 0), +- BPF_STMT(BPF_STX, 9), +- BPF_STMT(BPF_LDX | BPF_MEM, 9), +- BPF_STMT(BPF_MISC | BPF_TXA, 0), +- BPF_STMT(BPF_ALU | BPF_ADD | BPF_K, 1), +- BPF_STMT(BPF_MISC | BPF_TAX, 0), +- BPF_STMT(BPF_STX, 10), +- BPF_STMT(BPF_LDX | BPF_MEM, 10), +- BPF_STMT(BPF_MISC | BPF_TXA, 0), +- BPF_STMT(BPF_ALU | BPF_ADD | BPF_K, 1), +- BPF_STMT(BPF_MISC | BPF_TAX, 0), +- BPF_STMT(BPF_STX, 11), +- BPF_STMT(BPF_LDX | BPF_MEM, 11), +- BPF_STMT(BPF_MISC | BPF_TXA, 0), +- BPF_STMT(BPF_ALU | BPF_ADD | BPF_K, 1), +- BPF_STMT(BPF_MISC | BPF_TAX, 0), +- BPF_STMT(BPF_STX, 12), +- BPF_STMT(BPF_LDX | BPF_MEM, 12), +- BPF_STMT(BPF_MISC | BPF_TXA, 0), +- BPF_STMT(BPF_ALU | BPF_ADD | BPF_K, 1), +- BPF_STMT(BPF_MISC | BPF_TAX, 0), +- BPF_STMT(BPF_STX, 13), +- BPF_STMT(BPF_LDX | BPF_MEM, 13), +- BPF_STMT(BPF_MISC | BPF_TXA, 0), +- BPF_STMT(BPF_ALU | BPF_ADD | BPF_K, 1), +- BPF_STMT(BPF_MISC | BPF_TAX, 0), +- BPF_STMT(BPF_STX, 14), +- BPF_STMT(BPF_LDX | BPF_MEM, 14), +- BPF_STMT(BPF_MISC | BPF_TXA, 0), +- BPF_STMT(BPF_ALU | BPF_ADD | BPF_K, 1), +- BPF_STMT(BPF_MISC | BPF_TAX, 0), +- BPF_STMT(BPF_STX, 15), +- BPF_STMT(BPF_LDX | BPF_MEM, 15), +- BPF_STMT(BPF_MISC | BPF_TXA, 0), +- BPF_STMT(BPF_ALU | BPF_ADD | BPF_K, 1), +- BPF_STMT(BPF_MISC | BPF_TAX, 0), +- BPF_STMT(BPF_RET | BPF_A, 0), +- }, +- CLASSIC | FLAG_NO_DATA, +- { }, +- { { 0, 116 } }, +- }, +- { /* Mainly checking JIT here. */ +- "M[]: full STX + full LDX", +- .u.insns = { +- BPF_STMT(BPF_LDX | BPF_IMM, 0xbadfeedb), +- BPF_STMT(BPF_STX, 0), +- BPF_STMT(BPF_LDX | BPF_IMM, 0xecabedae), +- BPF_STMT(BPF_STX, 1), +- BPF_STMT(BPF_LDX | BPF_IMM, 0xafccfeaf), +- BPF_STMT(BPF_STX, 2), +- BPF_STMT(BPF_LDX | BPF_IMM, 0xbffdcedc), +- BPF_STMT(BPF_STX, 3), +- BPF_STMT(BPF_LDX | BPF_IMM, 0xfbbbdccb), +- BPF_STMT(BPF_STX, 4), +- BPF_STMT(BPF_LDX | BPF_IMM, 0xfbabcbda), +- BPF_STMT(BPF_STX, 5), +- BPF_STMT(BPF_LDX | BPF_IMM, 0xaedecbdb), +- BPF_STMT(BPF_STX, 6), +- BPF_STMT(BPF_LDX | BPF_IMM, 0xadebbade), +- BPF_STMT(BPF_STX, 7), +- BPF_STMT(BPF_LDX | BPF_IMM, 0xfcfcfaec), +- BPF_STMT(BPF_STX, 8), +- BPF_STMT(BPF_LDX | BPF_IMM, 0xbcdddbdc), +- BPF_STMT(BPF_STX, 9), +- BPF_STMT(BPF_LDX | BPF_IMM, 0xfeefdfac), +- BPF_STMT(BPF_STX, 10), +- BPF_STMT(BPF_LDX | BPF_IMM, 0xcddcdeea), +- BPF_STMT(BPF_STX, 11), +- BPF_STMT(BPF_LDX | BPF_IMM, 0xaccfaebb), +- BPF_STMT(BPF_STX, 12), +- BPF_STMT(BPF_LDX | BPF_IMM, 0xbdcccdcf), +- BPF_STMT(BPF_STX, 13), +- BPF_STMT(BPF_LDX | BPF_IMM, 0xaaedecde), +- BPF_STMT(BPF_STX, 14), +- BPF_STMT(BPF_LDX | BPF_IMM, 0xfaeacdad), +- BPF_STMT(BPF_STX, 15), +- BPF_STMT(BPF_LDX | BPF_MEM, 0), +- BPF_STMT(BPF_MISC | BPF_TXA, 0), +- BPF_STMT(BPF_LDX | BPF_MEM, 1), +- BPF_STMT(BPF_ALU | BPF_ADD | BPF_X, 0), +- BPF_STMT(BPF_LDX | BPF_MEM, 2), +- BPF_STMT(BPF_ALU | BPF_ADD | BPF_X, 0), +- BPF_STMT(BPF_LDX | BPF_MEM, 3), +- BPF_STMT(BPF_ALU | BPF_ADD | BPF_X, 0), +- BPF_STMT(BPF_LDX | BPF_MEM, 4), +- BPF_STMT(BPF_ALU | BPF_ADD | BPF_X, 0), +- BPF_STMT(BPF_LDX | BPF_MEM, 5), +- BPF_STMT(BPF_ALU | BPF_ADD | BPF_X, 0), +- BPF_STMT(BPF_LDX | BPF_MEM, 6), +- BPF_STMT(BPF_ALU | BPF_ADD | BPF_X, 0), +- BPF_STMT(BPF_LDX | BPF_MEM, 7), +- BPF_STMT(BPF_ALU | BPF_ADD | BPF_X, 0), +- BPF_STMT(BPF_LDX | BPF_MEM, 8), +- BPF_STMT(BPF_ALU | BPF_ADD | BPF_X, 0), +- BPF_STMT(BPF_LDX | BPF_MEM, 9), +- BPF_STMT(BPF_ALU | BPF_ADD | BPF_X, 0), +- BPF_STMT(BPF_LDX | BPF_MEM, 10), +- BPF_STMT(BPF_ALU | BPF_ADD | BPF_X, 0), +- BPF_STMT(BPF_LDX | BPF_MEM, 11), +- BPF_STMT(BPF_ALU | BPF_ADD | BPF_X, 0), +- BPF_STMT(BPF_LDX | BPF_MEM, 12), +- BPF_STMT(BPF_ALU | BPF_ADD | BPF_X, 0), +- BPF_STMT(BPF_LDX | BPF_MEM, 13), +- BPF_STMT(BPF_ALU | BPF_ADD | BPF_X, 0), +- BPF_STMT(BPF_LDX | BPF_MEM, 14), +- BPF_STMT(BPF_ALU | BPF_ADD | BPF_X, 0), +- BPF_STMT(BPF_LDX | BPF_MEM, 15), +- BPF_STMT(BPF_ALU | BPF_ADD | BPF_X, 0), +- BPF_STMT(BPF_RET | BPF_A, 0), +- }, +- CLASSIC | FLAG_NO_DATA, +- { }, +- { { 0, 0x2a5a5e5 } }, +- }, +- { +- "check: SKF_AD_MAX", +- .u.insns = { +- BPF_STMT(BPF_LD | BPF_W | BPF_ABS, +- SKF_AD_OFF + SKF_AD_MAX), +- BPF_STMT(BPF_RET | BPF_A, 0), +- }, +- CLASSIC | FLAG_NO_DATA | FLAG_EXPECTED_FAIL, +- { }, +- { }, +- }, +- { /* Passes checker but fails during runtime. */ +- "LD [SKF_AD_OFF-1]", +- .u.insns = { +- BPF_STMT(BPF_LD | BPF_W | BPF_ABS, +- SKF_AD_OFF - 1), +- BPF_STMT(BPF_RET | BPF_K, 1), +- }, +- CLASSIC, +- { }, +- { { 1, 0 } }, +- }, +-}; +- +-static struct net_device dev; +- +-static struct sk_buff *populate_skb(char *buf, int size) +-{ +- struct sk_buff *skb; +- +- if (size >= MAX_DATA) +- return NULL; +- +- skb = alloc_skb(MAX_DATA, GFP_KERNEL); +- if (!skb) +- return NULL; +- +- memcpy(__skb_put(skb, size), buf, size); +- +- /* Initialize a fake skb with test pattern. */ +- skb_reset_mac_header(skb); +- skb->protocol = htons(ETH_P_IP); +- skb->pkt_type = SKB_TYPE; +- skb->mark = SKB_MARK; +- skb->hash = SKB_HASH; +- skb->queue_mapping = SKB_QUEUE_MAP; +- skb->vlan_tci = SKB_VLAN_TCI; +- skb->dev = &dev; +- skb->dev->ifindex = SKB_DEV_IFINDEX; +- skb->dev->type = SKB_DEV_TYPE; +- skb_set_network_header(skb, min(size, ETH_HLEN)); +- +- return skb; +-} +- +-static void *generate_test_data(struct bpf_test *test, int sub) +-{ +- if (test->aux & FLAG_NO_DATA) +- return NULL; +- +- /* Test case expects an skb, so populate one. Various +- * subtests generate skbs of different sizes based on +- * the same data. +- */ +- return populate_skb(test->data, test->test[sub].data_size); +-} +- +-static void release_test_data(const struct bpf_test *test, void *data) +-{ +- if (test->aux & FLAG_NO_DATA) +- return; +- +- kfree_skb(data); +-} +- +-static int probe_filter_length(struct sock_filter *fp) +-{ +- int len = 0; +- +- for (len = MAX_INSNS - 1; len > 0; --len) +- if (fp[len].code != 0 || fp[len].k != 0) +- break; +- +- return len + 1; +-} +- +-static struct sk_filter *generate_filter(int which, int *err) +-{ +- struct sk_filter *fp; +- struct sock_fprog_kern fprog; +- unsigned int flen = probe_filter_length(tests[which].u.insns); +- __u8 test_type = tests[which].aux & TEST_TYPE_MASK; +- +- switch (test_type) { +- case CLASSIC: +- fprog.filter = tests[which].u.insns; +- fprog.len = flen; +- +- *err = sk_unattached_filter_create(&fp, &fprog); +- if (tests[which].aux & FLAG_EXPECTED_FAIL) { +- if (*err == -EINVAL) { +- pr_cont("PASS\n"); +- /* Verifier rejected filter as expected. */ +- *err = 0; +- return NULL; +- } else { +- pr_cont("UNEXPECTED_PASS\n"); +- /* Verifier didn't reject the test that's +- * bad enough, just return! +- */ +- *err = -EINVAL; +- return NULL; +- } +- } +- /* We don't expect to fail. */ +- if (*err) { +- pr_cont("FAIL to attach err=%d len=%d\n", +- *err, fprog.len); +- return NULL; +- } +- break; +- +- case INTERNAL: +- fp = kzalloc(sk_filter_size(flen), GFP_KERNEL); +- if (fp == NULL) { +- pr_cont("UNEXPECTED_FAIL no memory left\n"); +- *err = -ENOMEM; +- return NULL; +- } +- +- fp->len = flen; +- memcpy(fp->insnsi, tests[which].u.insns_int, +- fp->len * sizeof(struct sock_filter_int)); +- +- sk_filter_select_runtime(fp); +- break; +- } +- +- *err = 0; +- return fp; +-} +- +-static void release_filter(struct sk_filter *fp, int which) +-{ +- __u8 test_type = tests[which].aux & TEST_TYPE_MASK; +- +- switch (test_type) { +- case CLASSIC: +- sk_unattached_filter_destroy(fp); +- break; +- case INTERNAL: +- sk_filter_free(fp); +- break; +- } +-} +- +-static int __run_one(const struct sk_filter *fp, const void *data, +- int runs, u64 *duration) +-{ +- u64 start, finish; +- int ret, i; +- +- start = ktime_to_us(ktime_get()); +- +- for (i = 0; i < runs; i++) +- ret = SK_RUN_FILTER(fp, data); +- +- finish = ktime_to_us(ktime_get()); +- +- *duration = (finish - start) * 1000ULL; +- do_div(*duration, runs); +- +- return ret; +-} +- +-static int run_one(const struct sk_filter *fp, struct bpf_test *test) +-{ +- int err_cnt = 0, i, runs = MAX_TESTRUNS; +- +- for (i = 0; i < MAX_SUBTESTS; i++) { +- void *data; +- u64 duration; +- u32 ret; +- +- if (test->test[i].data_size == 0 && +- test->test[i].result == 0) +- break; +- +- data = generate_test_data(test, i); +- ret = __run_one(fp, data, runs, &duration); +- release_test_data(test, data); +- +- if (ret == test->test[i].result) { +- pr_cont("%lld ", duration); +- } else { +- pr_cont("ret %d != %d ", ret, +- test->test[i].result); +- err_cnt++; +- } +- } +- +- return err_cnt; +-} +- +-static __init int test_bpf(void) +-{ +- int i, err_cnt = 0, pass_cnt = 0; +- +- for (i = 0; i < ARRAY_SIZE(tests); i++) { +- struct sk_filter *fp; +- int err; +- +- pr_info("#%d %s ", i, tests[i].descr); +- +- fp = generate_filter(i, &err); +- if (fp == NULL) { +- if (err == 0) { +- pass_cnt++; +- continue; +- } +- +- return err; +- } +- err = run_one(fp, &tests[i]); +- release_filter(fp, i); +- +- if (err) { +- pr_cont("FAIL (%d times)\n", err); +- err_cnt++; +- } else { +- pr_cont("PASS\n"); +- pass_cnt++; +- } +- } +- +- pr_info("Summary: %d PASSED, %d FAILED\n", pass_cnt, err_cnt); +- return err_cnt ? -EINVAL : 0; +-} +- +-static int __init test_bpf_init(void) +-{ +- return test_bpf(); +-} +- +-static void __exit test_bpf_exit(void) +-{ +-} +- +-module_init(test_bpf_init); +-module_exit(test_bpf_exit); +- +-MODULE_LICENSE("GPL"); diff --git a/lib/usercopy.c b/lib/usercopy.c index 4f5b1dd..7cab418 100644 --- a/lib/usercopy.c @@ -92400,7 +98482,7 @@ index 4f5b1dd..7cab418 100644 +} +EXPORT_SYMBOL(copy_to_user_overflow); diff --git a/lib/vsprintf.c b/lib/vsprintf.c -index 0648291..42bf42b 100644 +index 6fe2c84..2fe5ec6 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c @@ -16,6 +16,9 @@ @@ -92413,6 +98495,15 @@ index 0648291..42bf42b 100644 #include #include /* for KSYM_SYMBOL_LEN */ #include +@@ -624,7 +627,7 @@ char *symbol_string(char *buf, char *end, void *ptr, + #ifdef CONFIG_KALLSYMS + if (*fmt == 'B') + sprint_backtrace(sym, value); +- else if (*fmt != 'f' && *fmt != 's') ++ else if (*fmt != 'f' && *fmt != 's' && *fmt != 'X') + sprint_symbol(sym, value); + else + sprint_symbol_no_offset(sym, value); @@ -1183,7 +1186,11 @@ char *address_val(char *buf, char *end, const void *addr, return number(buf, end, num, spec); } @@ -92425,15 +98516,18 @@ index 0648291..42bf42b 100644 /* * Show a '%p' thing. A kernel extension is that the '%p' is followed -@@ -1196,6 +1203,7 @@ int kptr_restrict __read_mostly; +@@ -1194,8 +1201,10 @@ int kptr_restrict __read_mostly; + * + * - 'F' For symbolic function descriptor pointers with offset * - 'f' For simple symbolic function names without offset ++ * - 'X' For simple symbolic function names without offset approved for use with GRKERNSEC_HIDESYM * - 'S' For symbolic direct pointers with offset * - 's' For symbolic direct pointers without offset + * - 'A' For symbolic direct pointers with offset approved for use with GRKERNSEC_HIDESYM * - '[FfSs]R' as above with __builtin_extract_return_addr() translation * - 'B' For backtraced symbolic direct pointers with offset * - 'R' For decoded struct resource, e.g., [mem 0x0-0x1f 64bit pref] -@@ -1263,12 +1271,12 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr, +@@ -1263,12 +1272,12 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr, if (!ptr && *fmt != 'K') { /* @@ -92448,7 +98542,7 @@ index 0648291..42bf42b 100644 } switch (*fmt) { -@@ -1278,6 +1286,12 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr, +@@ -1278,6 +1287,14 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr, /* Fallthrough */ case 'S': case 's': @@ -92457,11 +98551,13 @@ index 0648291..42bf42b 100644 +#else + return symbol_string(buf, end, ptr, spec, fmt); +#endif ++ case 'X': ++ ptr = dereference_function_descriptor(ptr); + case 'A': case 'B': return symbol_string(buf, end, ptr, spec, fmt); case 'R': -@@ -1333,6 +1347,8 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr, +@@ -1333,6 +1350,8 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr, va_end(va); return buf; } @@ -92470,7 +98566,7 @@ index 0648291..42bf42b 100644 case 'K': /* * %pK cannot be used in IRQ context because its test -@@ -1390,6 +1406,21 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr, +@@ -1390,6 +1409,22 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr, ((const struct file *)ptr)->f_path.dentry, spec, fmt); } @@ -92479,10 +98575,11 @@ index 0648291..42bf42b 100644 + /* 'P' = approved pointers to copy to userland, + as in the /proc/kallsyms case, as we make it display nothing + for non-root users, and the real contents for root users ++ 'X' = approved simple symbols + Also ignore 'K' pointers, since we force their NULLing for non-root users + above + */ -+ if ((unsigned long)ptr > TASK_SIZE && *fmt != 'P' && *fmt != 'K' && is_usercopy_object(buf)) { ++ if ((unsigned long)ptr > TASK_SIZE && *fmt != 'P' && *fmt != 'X' && *fmt != 'K' && is_usercopy_object(buf)) { + printk(KERN_ALERT "grsec: kernel infoleak detected! Please report this log to spender@grsecurity.net.\n"); + dump_stack(); + ptr = NULL; @@ -92492,7 +98589,7 @@ index 0648291..42bf42b 100644 spec.flags |= SMALL; if (spec.field_width == -1) { spec.field_width = default_width; -@@ -2089,11 +2120,11 @@ int bstr_printf(char *buf, size_t size, const char *fmt, const u32 *bin_buf) +@@ -2089,11 +2124,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)); \ @@ -92507,7 +98604,7 @@ index 0648291..42bf42b 100644 } \ args += sizeof(type); \ value; \ -@@ -2156,7 +2187,7 @@ int bstr_printf(char *buf, size_t size, const char *fmt, const u32 *bin_buf) +@@ -2156,7 +2191,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; @@ -92524,10 +98621,10 @@ index 0000000..7cd6065 @@ -0,0 +1 @@ +-grsec diff --git a/mm/Kconfig b/mm/Kconfig -index 2f42b9c..6095e14 100644 +index 3e9977a..205074f 100644 --- a/mm/Kconfig +++ b/mm/Kconfig -@@ -330,10 +330,11 @@ config KSM +@@ -333,10 +333,11 @@ config KSM root has set /sys/kernel/mm/ksm/run to 1 (if CONFIG_SYSFS is set). config DEFAULT_MMAP_MIN_ADDR @@ -92542,7 +98639,7 @@ index 2f42b9c..6095e14 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. -@@ -364,7 +365,7 @@ config MEMORY_FAILURE +@@ -367,7 +368,7 @@ config MEMORY_FAILURE config HWPOISON_INJECT tristate "HWPoison pages injector" @@ -92552,7 +98649,7 @@ index 2f42b9c..6095e14 100644 config NOMMU_INITIAL_TRIM_EXCESS diff --git a/mm/backing-dev.c b/mm/backing-dev.c -index 09d9591..165bb75 100644 +index 1706cbb..f89dbca 100644 --- a/mm/backing-dev.c +++ b/mm/backing-dev.c @@ -12,7 +12,7 @@ @@ -92574,10 +98671,10 @@ index 09d9591..165bb75 100644 bdi_destroy(bdi); return err; diff --git a/mm/filemap.c b/mm/filemap.c -index 088358c..bb415bf 100644 +index 900edfa..ff056b1 100644 --- a/mm/filemap.c +++ b/mm/filemap.c -@@ -2125,7 +2125,7 @@ int generic_file_mmap(struct file * file, struct vm_area_struct * vma) +@@ -2074,7 +2074,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) @@ -92586,7 +98683,7 @@ index 088358c..bb415bf 100644 file_accessed(file); vma->vm_ops = &generic_file_vm_ops; return 0; -@@ -2303,6 +2303,7 @@ inline int generic_write_checks(struct file *file, loff_t *pos, size_t *count, i +@@ -2252,6 +2252,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) { @@ -92595,10 +98692,10 @@ index 088358c..bb415bf 100644 send_sig(SIGXFSZ, current, 0); return -EFBIG; diff --git a/mm/fremap.c b/mm/fremap.c -index 34feba6..315fe78 100644 +index 72b8fa3..c5b39f1 100644 --- a/mm/fremap.c +++ b/mm/fremap.c -@@ -179,6 +179,11 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size, +@@ -180,6 +180,11 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size, retry: vma = find_vma(mm, start); @@ -92610,6 +98707,57 @@ index 34feba6..315fe78 100644 /* * Make sure the vma is shared, that it supports prefaulting, * and that the remapped range is valid and fully within +diff --git a/mm/gup.c b/mm/gup.c +index cc5a9e7..d496acf 100644 +--- a/mm/gup.c ++++ b/mm/gup.c +@@ -265,11 +265,6 @@ static int faultin_page(struct task_struct *tsk, struct vm_area_struct *vma, + unsigned int fault_flags = 0; + int ret; + +- /* For mlock, just skip the stack guard page. */ +- if ((*flags & FOLL_MLOCK) && +- (stack_guard_page_start(vma, address) || +- stack_guard_page_end(vma, address + PAGE_SIZE))) +- return -ENOENT; + if (*flags & FOLL_WRITE) + fault_flags |= FAULT_FLAG_WRITE; + if (nonblocking) +@@ -424,14 +419,14 @@ long __get_user_pages(struct task_struct *tsk, struct mm_struct *mm, + if (!(gup_flags & FOLL_FORCE)) + gup_flags |= FOLL_NUMA; + +- do { ++ while (nr_pages) { + struct page *page; + unsigned int foll_flags = gup_flags; + unsigned int page_increm; + + /* first iteration or cross vma bound */ + if (!vma || start >= vma->vm_end) { +- vma = find_extend_vma(mm, start); ++ vma = find_vma(mm, start); + if (!vma && in_gate_area(mm, start)) { + int ret; + ret = get_gate_page(mm, start & PAGE_MASK, +@@ -443,7 +438,7 @@ long __get_user_pages(struct task_struct *tsk, struct mm_struct *mm, + goto next_page; + } + +- if (!vma || check_vma_flags(vma, gup_flags)) ++ if (!vma || start < vma->vm_start || check_vma_flags(vma, gup_flags)) + return i ? : -EFAULT; + if (is_vm_hugetlb_page(vma)) { + i = follow_hugetlb_page(mm, vma, pages, vmas, +@@ -498,7 +493,7 @@ next_page: + i += page_increm; + start += page_increm * PAGE_SIZE; + nr_pages -= page_increm; +- } while (nr_pages); ++ } + return i; + } + EXPORT_SYMBOL(__get_user_pages); diff --git a/mm/highmem.c b/mm/highmem.c index b32b70c..e512eb0 100644 --- a/mm/highmem.c @@ -92639,10 +98787,10 @@ index b32b70c..e512eb0 100644 set_page_address(page, (void *)vaddr); diff --git a/mm/hugetlb.c b/mm/hugetlb.c -index a646f15..f55da4c 100644 +index 7a0a73d..d583cca 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c -@@ -2107,6 +2107,7 @@ static int hugetlb_sysctl_handler_common(bool obey_mempolicy, +@@ -2250,6 +2250,7 @@ static int hugetlb_sysctl_handler_common(bool obey_mempolicy, struct hstate *h = &default_hstate; unsigned long tmp; int ret; @@ -92650,8 +98798,8 @@ index a646f15..f55da4c 100644 if (!hugepages_supported()) return -ENOTSUPP; -@@ -2116,9 +2117,10 @@ static int hugetlb_sysctl_handler_common(bool obey_mempolicy, - if (write && h->order >= MAX_ORDER) +@@ -2259,9 +2260,10 @@ static int hugetlb_sysctl_handler_common(bool obey_mempolicy, + if (write && hstate_is_gigantic(h) && !gigantic_page_supported()) return -EINVAL; - table->data = &tmp; @@ -92664,7 +98812,7 @@ index a646f15..f55da4c 100644 if (ret) goto out; -@@ -2163,6 +2165,7 @@ int hugetlb_overcommit_handler(struct ctl_table *table, int write, +@@ -2306,6 +2308,7 @@ int hugetlb_overcommit_handler(struct ctl_table *table, int write, struct hstate *h = &default_hstate; unsigned long tmp; int ret; @@ -92672,8 +98820,8 @@ index a646f15..f55da4c 100644 if (!hugepages_supported()) return -ENOTSUPP; -@@ -2172,9 +2175,10 @@ int hugetlb_overcommit_handler(struct ctl_table *table, int write, - if (write && h->order >= MAX_ORDER) +@@ -2315,9 +2318,10 @@ int hugetlb_overcommit_handler(struct ctl_table *table, int write, + if (write && hstate_is_gigantic(h)) return -EINVAL; - table->data = &tmp; @@ -92686,7 +98834,7 @@ index a646f15..f55da4c 100644 if (ret) goto out; -@@ -2654,6 +2658,27 @@ static int unmap_ref_private(struct mm_struct *mm, struct vm_area_struct *vma, +@@ -2798,6 +2802,27 @@ static int unmap_ref_private(struct mm_struct *mm, struct vm_area_struct *vma, return 1; } @@ -92714,7 +98862,7 @@ index a646f15..f55da4c 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 -@@ -2771,6 +2796,11 @@ retry_avoidcopy: +@@ -2915,6 +2940,11 @@ retry_avoidcopy: make_huge_pte(vma, new_page, 1)); page_remove_rmap(old_page); hugepage_add_new_anon_rmap(new_page, vma, address); @@ -92726,7 +98874,7 @@ index a646f15..f55da4c 100644 /* Make the old page be freed below */ new_page = old_page; } -@@ -2930,6 +2960,10 @@ retry: +@@ -3074,6 +3104,10 @@ retry: && (vma->vm_flags & VM_SHARED))); set_huge_pte_at(mm, address, ptep, new_pte); @@ -92737,7 +98885,7 @@ index a646f15..f55da4c 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, ptl); -@@ -2996,6 +3030,10 @@ int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma, +@@ -3140,6 +3174,10 @@ int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma, struct hstate *h = hstate_vma(vma); struct address_space *mapping; @@ -92748,7 +98896,7 @@ index a646f15..f55da4c 100644 address &= huge_page_mask(h); ptep = huge_pte_offset(mm, address); -@@ -3009,6 +3047,26 @@ int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma, +@@ -3153,6 +3191,26 @@ int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma, VM_FAULT_SET_HINDEX(hstate_index(h)); } @@ -92776,7 +98924,7 @@ index a646f15..f55da4c 100644 if (!ptep) return VM_FAULT_OOM; diff --git a/mm/internal.h b/mm/internal.h -index 07b6736..ae8da20 100644 +index 7f22a11f..f3c207f 100644 --- a/mm/internal.h +++ b/mm/internal.h @@ -109,6 +109,7 @@ extern pmd_t *mm_find_pmd(struct mm_struct *mm, unsigned long address); @@ -92787,7 +98935,7 @@ index 07b6736..ae8da20 100644 extern void prep_compound_page(struct page *page, unsigned long order); #ifdef CONFIG_MEMORY_FAILURE extern bool is_free_buddy_page(struct page *page); -@@ -367,7 +368,7 @@ extern u32 hwpoison_filter_enable; +@@ -351,7 +352,7 @@ extern u32 hwpoison_filter_enable; extern unsigned long vm_mmap_pgoff(struct file *, unsigned long, unsigned long, unsigned long, @@ -92797,10 +98945,10 @@ index 07b6736..ae8da20 100644 extern void set_pageblock_order(void); unsigned long reclaim_clean_pages_from_list(struct zone *zone, diff --git a/mm/iov_iter.c b/mm/iov_iter.c -index 10e46cd..e3052f6 100644 +index 7b5dbd1..af0e329 100644 --- a/mm/iov_iter.c +++ b/mm/iov_iter.c -@@ -87,7 +87,7 @@ static size_t __iovec_copy_from_user_inatomic(char *vaddr, +@@ -173,7 +173,7 @@ static size_t __iovec_copy_from_user_inatomic(char *vaddr, while (bytes) { char __user *buf = iov->iov_base + base; @@ -92809,7 +98957,7 @@ index 10e46cd..e3052f6 100644 base = 0; left = __copy_from_user_inatomic(vaddr, buf, copy); -@@ -115,7 +115,7 @@ size_t iov_iter_copy_from_user_atomic(struct page *page, +@@ -201,7 +201,7 @@ static size_t copy_from_user_atomic_iovec(struct page *page, kaddr = kmap_atomic(page); if (likely(i->nr_segs == 1)) { @@ -92818,16 +98966,7 @@ index 10e46cd..e3052f6 100644 char __user *buf = i->iov->iov_base + i->iov_offset; left = __copy_from_user_inatomic(kaddr + offset, buf, bytes); copied = bytes - left; -@@ -143,7 +143,7 @@ size_t iov_iter_copy_from_user(struct page *page, - - kaddr = kmap(page); - if (likely(i->nr_segs == 1)) { -- int left; -+ size_t left; - char __user *buf = i->iov->iov_base + i->iov_offset; - left = __copy_from_user(kaddr + offset, buf, bytes); - copied = bytes - left; -@@ -173,7 +173,7 @@ void iov_iter_advance(struct iov_iter *i, size_t bytes) +@@ -231,7 +231,7 @@ static void advance_iovec(struct iov_iter *i, size_t bytes) * zero-length segments (without overruning the iovec). */ while (bytes || unlikely(i->count && !iov->iov_len)) { @@ -92837,7 +98976,7 @@ index 10e46cd..e3052f6 100644 copy = min(bytes, iov->iov_len - base); BUG_ON(!i->count || i->count < copy); diff --git a/mm/kmemleak.c b/mm/kmemleak.c -index 8d2fcdf..6dd9f1a 100644 +index 3cda50c..032ba634 100644 --- a/mm/kmemleak.c +++ b/mm/kmemleak.c @@ -364,7 +364,7 @@ static void print_unreferenced(struct seq_file *seq, @@ -92849,7 +98988,7 @@ index 8d2fcdf..6dd9f1a 100644 } } -@@ -1871,7 +1871,7 @@ static int __init kmemleak_late_init(void) +@@ -1905,7 +1905,7 @@ static int __init kmemleak_late_init(void) return -ENOMEM; } @@ -92961,7 +99100,7 @@ index a402f8f..f5e5daa 100644 if (end == start) return error; diff --git a/mm/memory-failure.c b/mm/memory-failure.c -index eb8fb72..ae36cf3 100644 +index a013bc9..a897a14 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c @@ -61,7 +61,7 @@ int sysctl_memory_failure_early_kill __read_mostly = 0; @@ -92991,7 +99130,7 @@ index eb8fb72..ae36cf3 100644 { reserved, reserved, "reserved kernel", me_kernel }, /* * free pages are specially detected outside this table: -@@ -1091,7 +1091,7 @@ int memory_failure(unsigned long pfn, int trapno, int flags) +@@ -1099,7 +1099,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; @@ -93000,7 +99139,7 @@ index eb8fb72..ae36cf3 100644 /* * We need/can do nothing about count=0 pages. -@@ -1120,7 +1120,7 @@ int memory_failure(unsigned long pfn, int trapno, int flags) +@@ -1128,7 +1128,7 @@ int memory_failure(unsigned long pfn, int trapno, int flags) if (PageHWPoison(hpage)) { if ((hwpoison_filter(p) && TestClearPageHWPoison(p)) || (p != hpage && TestSetPageHWPoison(hpage))) { @@ -93026,7 +99165,7 @@ index eb8fb72..ae36cf3 100644 unlock_page(hpage); put_page(hpage); return 0; -@@ -1415,7 +1415,7 @@ int unpoison_memory(unsigned long pfn) +@@ -1423,7 +1423,7 @@ int unpoison_memory(unsigned long pfn) return 0; } if (TestClearPageHWPoison(p)) @@ -93035,7 +99174,7 @@ index eb8fb72..ae36cf3 100644 pr_info("MCE: Software-unpoisoned free page %#lx\n", pfn); return 0; } -@@ -1429,7 +1429,7 @@ int unpoison_memory(unsigned long pfn) +@@ -1437,7 +1437,7 @@ int unpoison_memory(unsigned long pfn) */ if (TestClearPageHWPoison(page)) { pr_info("MCE: Software-unpoisoned page %#lx\n", pfn); @@ -93044,7 +99183,7 @@ index eb8fb72..ae36cf3 100644 freeit = 1; if (PageHuge(page)) clear_page_hwpoison_huge_page(page); -@@ -1554,11 +1554,11 @@ static int soft_offline_huge_page(struct page *page, int flags) +@@ -1562,11 +1562,11 @@ static int soft_offline_huge_page(struct page *page, int flags) if (PageHuge(page)) { set_page_hwpoison_huge_page(hpage); dequeue_hwpoisoned_huge_page(hpage); @@ -93058,7 +99197,7 @@ index eb8fb72..ae36cf3 100644 } } return ret; -@@ -1597,7 +1597,7 @@ static int __soft_offline_page(struct page *page, int flags) +@@ -1605,7 +1605,7 @@ static int __soft_offline_page(struct page *page, int flags) put_page(page); pr_info("soft_offline: %#lx: invalidated\n", pfn); SetPageHWPoison(page); @@ -93067,7 +99206,7 @@ index eb8fb72..ae36cf3 100644 return 0; } -@@ -1648,7 +1648,7 @@ static int __soft_offline_page(struct page *page, int flags) +@@ -1656,7 +1656,7 @@ static int __soft_offline_page(struct page *page, int flags) if (!is_free_buddy_page(page)) pr_info("soft offline: %#lx: page leaked\n", pfn); @@ -93076,7 +99215,7 @@ index eb8fb72..ae36cf3 100644 } } else { pr_info("soft offline: %#lx: isolation failed: %d, page count %d, type %lx\n", -@@ -1722,11 +1722,11 @@ int soft_offline_page(struct page *page, int flags) +@@ -1726,11 +1726,11 @@ int soft_offline_page(struct page *page, int flags) if (PageHuge(page)) { set_page_hwpoison_huge_page(hpage); dequeue_hwpoisoned_huge_page(hpage); @@ -93091,7 +99230,7 @@ index eb8fb72..ae36cf3 100644 } unset_migratetype_isolate(page, MIGRATE_MOVABLE); diff --git a/mm/memory.c b/mm/memory.c -index e302ae1..779c7ce 100644 +index 0a21f3d..babeaec 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -413,6 +413,7 @@ static inline void free_pmd_range(struct mmu_gather *tlb, pud_t *pud, @@ -93128,63 +99267,7 @@ index e302ae1..779c7ce 100644 } /* -@@ -1652,12 +1658,6 @@ no_page_table: - return page; - } - --static inline int stack_guard_page(struct vm_area_struct *vma, unsigned long addr) --{ -- return stack_guard_page_start(vma, addr) || -- stack_guard_page_end(vma, addr+PAGE_SIZE); --} -- - /** - * __get_user_pages() - pin user pages in memory - * @tsk: task_struct of target task -@@ -1735,10 +1735,10 @@ long __get_user_pages(struct task_struct *tsk, struct mm_struct *mm, - - i = 0; - -- do { -+ while (nr_pages) { - struct vm_area_struct *vma; - -- vma = find_extend_vma(mm, start); -+ vma = find_vma(mm, start); - if (!vma && in_gate_area(mm, start)) { - unsigned long pg = start & PAGE_MASK; - pgd_t *pgd; -@@ -1787,7 +1787,7 @@ long __get_user_pages(struct task_struct *tsk, struct mm_struct *mm, - goto next_page; - } - -- if (!vma) -+ if (!vma || start < vma->vm_start) - goto efault; - vm_flags = vma->vm_flags; - if (vm_flags & (VM_IO | VM_PFNMAP)) -@@ -1848,11 +1848,6 @@ long __get_user_pages(struct task_struct *tsk, struct mm_struct *mm, - int ret; - unsigned int fault_flags = 0; - -- /* For mlock, just skip the stack guard page. */ -- if (foll_flags & FOLL_MLOCK) { -- if (stack_guard_page(vma, start)) -- goto next_page; -- } - if (foll_flags & FOLL_WRITE) - fault_flags |= FAULT_FLAG_WRITE; - if (nonblocking) -@@ -1932,7 +1927,7 @@ next_page: - start += page_increm * PAGE_SIZE; - nr_pages -= page_increm; - } while (nr_pages && start < vma->vm_end); -- } while (nr_pages); -+ } - return i; - efault: - return i ? : -EFAULT; -@@ -2145,6 +2140,10 @@ static int insert_page(struct vm_area_struct *vma, unsigned long addr, +@@ -1500,6 +1506,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)); @@ -93195,7 +99278,7 @@ index e302ae1..779c7ce 100644 retval = 0; pte_unmap_unlock(pte, ptl); return retval; -@@ -2189,9 +2188,21 @@ int vm_insert_page(struct vm_area_struct *vma, unsigned long addr, +@@ -1544,9 +1554,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)) { @@ -93217,7 +99300,7 @@ index e302ae1..779c7ce 100644 } return insert_page(vma, addr, page, vma->vm_page_prot); } -@@ -2274,6 +2285,7 @@ int vm_insert_mixed(struct vm_area_struct *vma, unsigned long addr, +@@ -1629,6 +1651,7 @@ int vm_insert_mixed(struct vm_area_struct *vma, unsigned long addr, unsigned long pfn) { BUG_ON(!(vma->vm_flags & VM_MIXEDMAP)); @@ -93225,7 +99308,7 @@ index e302ae1..779c7ce 100644 if (addr < vma->vm_start || addr >= vma->vm_end) return -EFAULT; -@@ -2521,7 +2533,9 @@ static int apply_to_pmd_range(struct mm_struct *mm, pud_t *pud, +@@ -1876,7 +1899,9 @@ static int apply_to_pmd_range(struct mm_struct *mm, pud_t *pud, BUG_ON(pud_huge(*pud)); @@ -93236,7 +99319,7 @@ index e302ae1..779c7ce 100644 if (!pmd) return -ENOMEM; do { -@@ -2541,7 +2555,9 @@ static int apply_to_pud_range(struct mm_struct *mm, pgd_t *pgd, +@@ -1896,7 +1921,9 @@ static int apply_to_pud_range(struct mm_struct *mm, pgd_t *pgd, unsigned long next; int err; @@ -93247,7 +99330,7 @@ index e302ae1..779c7ce 100644 if (!pud) return -ENOMEM; do { -@@ -2663,6 +2679,186 @@ static int do_page_mkwrite(struct vm_area_struct *vma, struct page *page, +@@ -2018,6 +2045,186 @@ static int do_page_mkwrite(struct vm_area_struct *vma, struct page *page, return ret; } @@ -93434,7 +99517,7 @@ index e302ae1..779c7ce 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 -@@ -2860,6 +3056,12 @@ gotten: +@@ -2215,6 +2422,12 @@ gotten: */ page_table = pte_offset_map_lock(mm, pmd, address, &ptl); if (likely(pte_same(*page_table, orig_pte))) { @@ -93447,7 +99530,7 @@ index e302ae1..779c7ce 100644 if (old_page) { if (!PageAnon(old_page)) { dec_mm_counter_fast(mm, MM_FILEPAGES); -@@ -2911,6 +3113,10 @@ gotten: +@@ -2266,6 +2479,10 @@ gotten: page_remove_rmap(old_page); } @@ -93458,7 +99541,7 @@ index e302ae1..779c7ce 100644 /* Free the old page.. */ new_page = old_page; ret |= VM_FAULT_WRITE; -@@ -3184,6 +3390,11 @@ static int do_swap_page(struct mm_struct *mm, struct vm_area_struct *vma, +@@ -2539,6 +2756,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); @@ -93470,7 +99553,7 @@ index e302ae1..779c7ce 100644 unlock_page(page); if (page != swapcache) { /* -@@ -3207,6 +3418,11 @@ static int do_swap_page(struct mm_struct *mm, struct vm_area_struct *vma, +@@ -2562,6 +2784,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); @@ -93482,7 +99565,7 @@ index e302ae1..779c7ce 100644 unlock: pte_unmap_unlock(page_table, ptl); out: -@@ -3226,40 +3442,6 @@ out_release: +@@ -2581,40 +2808,6 @@ out_release: } /* @@ -93523,7 +99606,7 @@ index e302ae1..779c7ce 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. -@@ -3268,27 +3450,23 @@ static int do_anonymous_page(struct mm_struct *mm, struct vm_area_struct *vma, +@@ -2623,27 +2816,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) { @@ -93556,7 +99639,7 @@ index e302ae1..779c7ce 100644 if (unlikely(anon_vma_prepare(vma))) goto oom; page = alloc_zeroed_user_highpage_movable(vma, address); -@@ -3312,6 +3490,11 @@ static int do_anonymous_page(struct mm_struct *mm, struct vm_area_struct *vma, +@@ -2667,6 +2856,11 @@ static int do_anonymous_page(struct mm_struct *mm, struct vm_area_struct *vma, if (!pte_none(*page_table)) goto release; @@ -93568,7 +99651,7 @@ index e302ae1..779c7ce 100644 inc_mm_counter_fast(mm, MM_ANONPAGES); page_add_new_anon_rmap(page, vma, address); setpte: -@@ -3319,6 +3502,12 @@ setpte: +@@ -2674,6 +2868,12 @@ setpte: /* No need to invalidate - it was non-present before */ update_mmu_cache(vma, address, page_table); @@ -93581,17 +99664,7 @@ index e302ae1..779c7ce 100644 unlock: pte_unmap_unlock(page_table, ptl); return 0; -@@ -3515,7 +3704,8 @@ static int do_read_fault(struct mm_struct *mm, struct vm_area_struct *vma, - * if page by the offset is not ready to be mapped (cold cache or - * something). - */ -- if (vma->vm_ops->map_pages) { -+ if (vma->vm_ops->map_pages && !(flags & FAULT_FLAG_NONLINEAR) && -+ fault_around_pages() > 1) { - pte = pte_offset_map_lock(mm, pmd, address, &ptl); - do_fault_around(vma, address, pte, pgoff, flags); - if (!pte_same(*pte, orig_pte)) -@@ -3535,6 +3725,11 @@ static int do_read_fault(struct mm_struct *mm, struct vm_area_struct *vma, +@@ -2905,6 +3105,11 @@ static int do_read_fault(struct mm_struct *mm, struct vm_area_struct *vma, return ret; } do_set_pte(vma, address, fault_page, pte, false, false); @@ -93603,7 +99676,7 @@ index e302ae1..779c7ce 100644 unlock_page(fault_page); unlock_out: pte_unmap_unlock(pte, ptl); -@@ -3576,7 +3771,18 @@ static int do_cow_fault(struct mm_struct *mm, struct vm_area_struct *vma, +@@ -2946,7 +3151,18 @@ static int do_cow_fault(struct mm_struct *mm, struct vm_area_struct *vma, page_cache_release(fault_page); goto uncharge_out; } @@ -93622,7 +99695,7 @@ index e302ae1..779c7ce 100644 pte_unmap_unlock(pte, ptl); unlock_page(fault_page); page_cache_release(fault_page); -@@ -3624,6 +3830,11 @@ static int do_shared_fault(struct mm_struct *mm, struct vm_area_struct *vma, +@@ -2994,6 +3210,11 @@ static int do_shared_fault(struct mm_struct *mm, struct vm_area_struct *vma, return ret; } do_set_pte(vma, address, fault_page, pte, true, false); @@ -93634,7 +99707,7 @@ index e302ae1..779c7ce 100644 pte_unmap_unlock(pte, ptl); if (set_page_dirty(fault_page)) -@@ -3854,6 +4065,12 @@ static int handle_pte_fault(struct mm_struct *mm, +@@ -3224,6 +3445,12 @@ static int handle_pte_fault(struct mm_struct *mm, if (flags & FAULT_FLAG_WRITE) flush_tlb_fix_spurious_fault(vma, address); } @@ -93647,7 +99720,7 @@ index e302ae1..779c7ce 100644 unlock: pte_unmap_unlock(pte, ptl); return 0; -@@ -3870,9 +4087,41 @@ static int __handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma, +@@ -3240,9 +3467,41 @@ static int __handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma, pmd_t *pmd; pte_t *pte; @@ -93689,7 +99762,7 @@ index e302ae1..779c7ce 100644 pgd = pgd_offset(mm, address); pud = pud_alloc(mm, pgd, address); if (!pud) -@@ -4000,6 +4249,23 @@ int __pud_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long address) +@@ -3370,6 +3629,23 @@ int __pud_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long address) spin_unlock(&mm->page_table_lock); return 0; } @@ -93713,7 +99786,7 @@ index e302ae1..779c7ce 100644 #endif /* __PAGETABLE_PUD_FOLDED */ #ifndef __PAGETABLE_PMD_FOLDED -@@ -4030,6 +4296,30 @@ int __pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long address) +@@ -3400,6 +3676,30 @@ int __pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long address) spin_unlock(&mm->page_table_lock); return 0; } @@ -93744,7 +99817,7 @@ index e302ae1..779c7ce 100644 #endif /* __PAGETABLE_PMD_FOLDED */ #if !defined(__HAVE_ARCH_GATE_AREA) -@@ -4043,7 +4333,7 @@ static int __init gate_vma_init(void) +@@ -3413,7 +3713,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; @@ -93753,7 +99826,7 @@ index e302ae1..779c7ce 100644 return 0; } -@@ -4177,8 +4467,8 @@ out: +@@ -3547,8 +3847,8 @@ out: return ret; } @@ -93764,7 +99837,7 @@ index e302ae1..779c7ce 100644 { resource_size_t phys_addr; unsigned long prot = 0; -@@ -4204,8 +4494,8 @@ EXPORT_SYMBOL_GPL(generic_access_phys); +@@ -3574,8 +3874,8 @@ EXPORT_SYMBOL_GPL(generic_access_phys); * Access another process' address space as given in mm. If non-NULL, use the * given task for page fault accounting. */ @@ -93775,7 +99848,7 @@ index e302ae1..779c7ce 100644 { struct vm_area_struct *vma; void *old_buf = buf; -@@ -4213,7 +4503,7 @@ static int __access_remote_vm(struct task_struct *tsk, struct mm_struct *mm, +@@ -3583,7 +3883,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) { @@ -93784,7 +99857,7 @@ index e302ae1..779c7ce 100644 void *maddr; struct page *page = NULL; -@@ -4272,8 +4562,8 @@ static int __access_remote_vm(struct task_struct *tsk, struct mm_struct *mm, +@@ -3642,8 +3942,8 @@ static int __access_remote_vm(struct task_struct *tsk, struct mm_struct *mm, * * The caller must hold a reference on @mm. */ @@ -93795,7 +99868,7 @@ index e302ae1..779c7ce 100644 { return __access_remote_vm(NULL, mm, addr, buf, len, write); } -@@ -4283,11 +4573,11 @@ int access_remote_vm(struct mm_struct *mm, unsigned long addr, +@@ -3653,11 +3953,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 */ @@ -93811,10 +99884,10 @@ index e302ae1..779c7ce 100644 mm = get_task_mm(tsk); if (!mm) diff --git a/mm/mempolicy.c b/mm/mempolicy.c -index 6b65d10..e6f415a 100644 +index 8f5330d..b41914b 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c -@@ -747,6 +747,10 @@ static int mbind_range(struct mm_struct *mm, unsigned long start, +@@ -750,6 +750,10 @@ static int mbind_range(struct mm_struct *mm, unsigned long start, unsigned long vmstart; unsigned long vmend; @@ -93825,7 +99898,7 @@ index 6b65d10..e6f415a 100644 vma = find_vma(mm, start); if (!vma || vma->vm_start > start) return -EFAULT; -@@ -790,6 +794,16 @@ static int mbind_range(struct mm_struct *mm, unsigned long start, +@@ -793,6 +797,16 @@ static int mbind_range(struct mm_struct *mm, unsigned long start, err = vma_replace_policy(vma, new_pol); if (err) goto out; @@ -93842,7 +99915,7 @@ index 6b65d10..e6f415a 100644 } out: -@@ -1222,6 +1236,17 @@ static long do_mbind(unsigned long start, unsigned long len, +@@ -1225,6 +1239,17 @@ static long do_mbind(unsigned long start, unsigned long len, if (end < start) return -EINVAL; @@ -93860,7 +99933,7 @@ index 6b65d10..e6f415a 100644 if (end == start) return 0; -@@ -1447,8 +1472,7 @@ SYSCALL_DEFINE4(migrate_pages, pid_t, pid, unsigned long, maxnode, +@@ -1450,8 +1475,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) && @@ -93870,7 +99943,7 @@ index 6b65d10..e6f415a 100644 rcu_read_unlock(); err = -EPERM; goto out_put; -@@ -1479,6 +1503,15 @@ SYSCALL_DEFINE4(migrate_pages, pid_t, pid, unsigned long, maxnode, +@@ -1482,6 +1506,15 @@ SYSCALL_DEFINE4(migrate_pages, pid_t, pid, unsigned long, maxnode, goto out; } @@ -93887,10 +99960,10 @@ index 6b65d10..e6f415a 100644 capable(CAP_SYS_NICE) ? MPOL_MF_MOVE_ALL : MPOL_MF_MOVE); diff --git a/mm/migrate.c b/mm/migrate.c -index bed4880..a493f67 100644 +index be6dbf9..febb8ec 100644 --- a/mm/migrate.c +++ b/mm/migrate.c -@@ -1485,8 +1485,7 @@ SYSCALL_DEFINE6(move_pages, pid_t, pid, unsigned long, nr_pages, +@@ -1506,8 +1506,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) && @@ -93976,18 +100049,18 @@ index b1eb536..091d154 100644 capable(CAP_IPC_LOCK)) ret = do_mlockall(flags); diff --git a/mm/mmap.c b/mm/mmap.c -index b1202cf..ee487f8 100644 +index 129b847..fbed804 100644 --- a/mm/mmap.c +++ b/mm/mmap.c -@@ -37,6 +37,7 @@ - #include +@@ -40,6 +40,7 @@ #include #include + #include +#include #include #include -@@ -53,6 +54,16 @@ +@@ -56,6 +57,16 @@ #define arch_rebalance_pgtables(addr, len) (addr) #endif @@ -94004,7 +100077,7 @@ index b1202cf..ee487f8 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); -@@ -72,16 +83,25 @@ static void unmap_region(struct mm_struct *mm, +@@ -75,16 +86,25 @@ static void unmap_region(struct mm_struct *mm, * x: (no) no x: (no) yes x: (no) yes x: (yes) yes * */ @@ -94033,7 +100106,7 @@ index b1202cf..ee487f8 100644 } EXPORT_SYMBOL(vm_get_page_prot); -@@ -91,6 +111,7 @@ unsigned long sysctl_overcommit_kbytes __read_mostly; +@@ -94,6 +114,7 @@ unsigned long sysctl_overcommit_kbytes __read_mostly; int sysctl_max_map_count __read_mostly = DEFAULT_MAX_MAP_COUNT; unsigned long sysctl_user_reserve_kbytes __read_mostly = 1UL << 17; /* 128MB */ unsigned long sysctl_admin_reserve_kbytes __read_mostly = 1UL << 13; /* 8MB */ @@ -94041,7 +100114,7 @@ index b1202cf..ee487f8 100644 /* * Make sure vm_committed_as in one cacheline and not cacheline shared with * other variables. It can be updated by several CPUs frequently. -@@ -247,6 +268,7 @@ static struct vm_area_struct *remove_vma(struct vm_area_struct *vma) +@@ -250,6 +271,7 @@ static struct vm_area_struct *remove_vma(struct vm_area_struct *vma) struct vm_area_struct *next = vma->vm_next; might_sleep(); @@ -94049,15 +100122,20 @@ index b1202cf..ee487f8 100644 if (vma->vm_ops && vma->vm_ops->close) vma->vm_ops->close(vma); if (vma->vm_file) -@@ -291,6 +313,7 @@ SYSCALL_DEFINE1(brk, unsigned long, brk) +@@ -294,6 +316,12 @@ SYSCALL_DEFINE1(brk, unsigned long, brk) * not page aligned -Ram Gupta */ rlim = rlimit(RLIMIT_DATA); ++#ifdef CONFIG_GRKERNSEC_PROC_MEMMAP ++ /* force a minimum 16MB brk heap on setuid/setgid binaries */ ++ if (rlim < PAGE_SIZE && (get_dumpable(mm) != SUID_DUMP_USER) && gr_is_global_nonroot(current_uid())) ++ rlim = 4096 * PAGE_SIZE; ++#endif + gr_learn_resource(current, RLIMIT_DATA, (brk - mm->start_brk) + (mm->end_data - mm->start_data), 1); if (rlim < RLIM_INFINITY && (brk - mm->start_brk) + (mm->end_data - mm->start_data) > rlim) goto out; -@@ -942,6 +965,12 @@ static int +@@ -944,6 +972,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) { @@ -94070,7 +100148,7 @@ index b1202cf..ee487f8 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) -@@ -961,6 +990,12 @@ static int +@@ -963,6 +997,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) { @@ -94083,7 +100161,7 @@ index b1202cf..ee487f8 100644 if (is_mergeable_vma(vma, file, vm_flags) && is_mergeable_anon_vma(anon_vma, vma->anon_vma, vma)) { pgoff_t vm_pglen; -@@ -1003,13 +1038,20 @@ can_vma_merge_after(struct vm_area_struct *vma, unsigned long vm_flags, +@@ -1005,13 +1045,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, @@ -94105,7 +100183,7 @@ index b1202cf..ee487f8 100644 /* * We later require that vma->vm_flags == vm_flags, * so this tests vma->vm_flags & VM_SPECIAL, too. -@@ -1025,6 +1067,15 @@ struct vm_area_struct *vma_merge(struct mm_struct *mm, +@@ -1027,6 +1074,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; @@ -94121,7 +100199,7 @@ index b1202cf..ee487f8 100644 /* * Can it merge with the predecessor? */ -@@ -1044,9 +1095,24 @@ struct vm_area_struct *vma_merge(struct mm_struct *mm, +@@ -1046,9 +1102,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); @@ -94147,7 +100225,7 @@ index b1202cf..ee487f8 100644 if (err) return NULL; khugepaged_enter_vma_merge(prev); -@@ -1060,12 +1126,27 @@ struct vm_area_struct *vma_merge(struct mm_struct *mm, +@@ -1062,12 +1133,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)) { @@ -94177,7 +100255,7 @@ index b1202cf..ee487f8 100644 if (err) return NULL; khugepaged_enter_vma_merge(area); -@@ -1174,8 +1255,10 @@ none: +@@ -1176,8 +1262,10 @@ none: void vm_stat_account(struct mm_struct *mm, unsigned long flags, struct file *file, long pages) { @@ -94190,7 +100268,7 @@ index b1202cf..ee487f8 100644 mm->total_vm += pages; -@@ -1183,7 +1266,7 @@ void vm_stat_account(struct mm_struct *mm, unsigned long flags, +@@ -1185,7 +1273,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; @@ -94199,7 +100277,7 @@ index b1202cf..ee487f8 100644 mm->stack_vm += pages; } #endif /* CONFIG_PROC_FS */ -@@ -1213,6 +1296,7 @@ static inline int mlock_future_check(struct mm_struct *mm, +@@ -1215,6 +1303,7 @@ static inline int mlock_future_check(struct mm_struct *mm, locked += mm->locked_vm; lock_limit = rlimit(RLIMIT_MEMLOCK); lock_limit >>= PAGE_SHIFT; @@ -94207,7 +100285,7 @@ index b1202cf..ee487f8 100644 if (locked > lock_limit && !capable(CAP_IPC_LOCK)) return -EAGAIN; } -@@ -1239,7 +1323,7 @@ unsigned long do_mmap_pgoff(struct file *file, unsigned long addr, +@@ -1241,7 +1330,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.) */ @@ -94216,7 +100294,7 @@ index b1202cf..ee487f8 100644 if (!(file && (file->f_path.mnt->mnt_flags & MNT_NOEXEC))) prot |= PROT_EXEC; -@@ -1265,7 +1349,7 @@ unsigned long do_mmap_pgoff(struct file *file, unsigned long addr, +@@ -1267,7 +1356,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. */ @@ -94225,7 +100303,7 @@ index b1202cf..ee487f8 100644 if (addr & ~PAGE_MASK) return addr; -@@ -1276,6 +1360,43 @@ unsigned long do_mmap_pgoff(struct file *file, unsigned long addr, +@@ -1278,6 +1367,43 @@ 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; @@ -94269,7 +100347,7 @@ index b1202cf..ee487f8 100644 if (flags & MAP_LOCKED) if (!can_do_mlock()) return -EPERM; -@@ -1363,6 +1484,9 @@ unsigned long do_mmap_pgoff(struct file *file, unsigned long addr, +@@ -1365,6 +1491,9 @@ unsigned long do_mmap_pgoff(struct file *file, unsigned long addr, vm_flags |= VM_NORESERVE; } @@ -94279,7 +100357,7 @@ index b1202cf..ee487f8 100644 addr = mmap_region(file, addr, len, vm_flags, pgoff); if (!IS_ERR_VALUE(addr) && ((vm_flags & VM_LOCKED) || -@@ -1456,7 +1580,7 @@ int vma_wants_writenotify(struct vm_area_struct *vma) +@@ -1458,7 +1587,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 */ @@ -94288,7 +100366,7 @@ index b1202cf..ee487f8 100644 return 0; /* The backer wishes to know when pages are first written to? */ -@@ -1502,7 +1626,22 @@ unsigned long mmap_region(struct file *file, unsigned long addr, +@@ -1504,7 +1633,22 @@ unsigned long mmap_region(struct file *file, unsigned long addr, struct rb_node **rb_link, *rb_parent; unsigned long charged = 0; @@ -94311,7 +100389,7 @@ index b1202cf..ee487f8 100644 if (!may_expand_vm(mm, len >> PAGE_SHIFT)) { unsigned long nr_pages; -@@ -1521,11 +1660,10 @@ unsigned long mmap_region(struct file *file, unsigned long addr, +@@ -1523,11 +1667,10 @@ unsigned long mmap_region(struct file *file, unsigned long addr, /* Clear old maps */ error = -ENOMEM; @@ -94324,7 +100402,7 @@ index b1202cf..ee487f8 100644 } /* -@@ -1556,6 +1694,16 @@ munmap_back: +@@ -1558,6 +1701,16 @@ munmap_back: goto unacct_error; } @@ -94341,7 +100419,7 @@ index b1202cf..ee487f8 100644 vma->vm_mm = mm; vma->vm_start = addr; vma->vm_end = addr + len; -@@ -1575,6 +1723,13 @@ munmap_back: +@@ -1577,6 +1730,13 @@ munmap_back: if (error) goto unmap_and_free_vma; @@ -94355,7 +100433,7 @@ index b1202cf..ee487f8 100644 /* Can addr have changed?? * * Answer: Yes, several device drivers can do it in their -@@ -1608,6 +1763,12 @@ munmap_back: +@@ -1610,6 +1770,12 @@ munmap_back: } vma_link(mm, vma, prev, rb_link, rb_parent); @@ -94368,7 +100446,7 @@ index b1202cf..ee487f8 100644 /* Once vma denies write, undo our temporary denial count */ if (vm_flags & VM_DENYWRITE) allow_write_access(file); -@@ -1616,6 +1777,7 @@ out: +@@ -1618,6 +1784,7 @@ out: perf_event_mmap(vma); vm_stat_account(mm, vm_flags, file, len >> PAGE_SHIFT); @@ -94376,7 +100454,7 @@ index b1202cf..ee487f8 100644 if (vm_flags & VM_LOCKED) { if (!((vm_flags & VM_SPECIAL) || is_vm_hugetlb_page(vma) || vma == get_gate_vma(current->mm))) -@@ -1648,6 +1810,12 @@ unmap_and_free_vma: +@@ -1650,6 +1817,12 @@ unmap_and_free_vma: unmap_region(mm, vma, prev, vma->vm_start, vma->vm_end); charged = 0; free_vma: @@ -94389,7 +100467,7 @@ index b1202cf..ee487f8 100644 kmem_cache_free(vm_area_cachep, vma); unacct_error: if (charged) -@@ -1655,7 +1823,63 @@ unacct_error: +@@ -1657,7 +1830,63 @@ unacct_error: return error; } @@ -94454,7 +100532,7 @@ index b1202cf..ee487f8 100644 { /* * We implement the search by looking for an rbtree node that -@@ -1703,11 +1927,29 @@ unsigned long unmapped_area(struct vm_unmapped_area_info *info) +@@ -1705,11 +1934,29 @@ unsigned long unmapped_area(struct vm_unmapped_area_info *info) } } @@ -94485,7 +100563,7 @@ index b1202cf..ee487f8 100644 if (gap_end >= low_limit && gap_end - gap_start >= length) goto found; -@@ -1757,7 +1999,7 @@ found: +@@ -1759,7 +2006,7 @@ found: return gap_start; } @@ -94494,7 +100572,7 @@ index b1202cf..ee487f8 100644 { struct mm_struct *mm = current->mm; struct vm_area_struct *vma; -@@ -1811,6 +2053,24 @@ check_current: +@@ -1813,6 +2060,24 @@ check_current: gap_end = vma->vm_start; if (gap_end < low_limit) return -ENOMEM; @@ -94519,7 +100597,7 @@ index b1202cf..ee487f8 100644 if (gap_start <= high_limit && gap_end - gap_start >= length) goto found; -@@ -1874,6 +2134,7 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr, +@@ -1876,6 +2141,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; @@ -94527,7 +100605,7 @@ index b1202cf..ee487f8 100644 if (len > TASK_SIZE - mmap_min_addr) return -ENOMEM; -@@ -1881,11 +2142,15 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr, +@@ -1883,11 +2149,15 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr, if (flags & MAP_FIXED) return addr; @@ -94544,7 +100622,7 @@ index b1202cf..ee487f8 100644 return addr; } -@@ -1894,6 +2159,7 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr, +@@ -1896,6 +2166,7 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr, info.low_limit = mm->mmap_base; info.high_limit = TASK_SIZE; info.align_mask = 0; @@ -94552,7 +100630,7 @@ index b1202cf..ee487f8 100644 return vm_unmapped_area(&info); } #endif -@@ -1912,6 +2178,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, +@@ -1914,6 +2185,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; @@ -94560,7 +100638,7 @@ index b1202cf..ee487f8 100644 /* requested length too big for entire address space */ if (len > TASK_SIZE - mmap_min_addr) -@@ -1920,12 +2187,16 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, +@@ -1922,12 +2194,16 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, if (flags & MAP_FIXED) return addr; @@ -94578,7 +100656,7 @@ index b1202cf..ee487f8 100644 return addr; } -@@ -1934,6 +2205,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, +@@ -1936,6 +2212,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, info.low_limit = max(PAGE_SIZE, mmap_min_addr); info.high_limit = mm->mmap_base; info.align_mask = 0; @@ -94586,7 +100664,7 @@ index b1202cf..ee487f8 100644 addr = vm_unmapped_area(&info); /* -@@ -1946,6 +2218,12 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, +@@ -1948,6 +2225,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; @@ -94599,7 +100677,7 @@ index b1202cf..ee487f8 100644 info.high_limit = TASK_SIZE; addr = vm_unmapped_area(&info); } -@@ -2046,6 +2324,28 @@ find_vma_prev(struct mm_struct *mm, unsigned long addr, +@@ -2048,6 +2331,28 @@ find_vma_prev(struct mm_struct *mm, unsigned long addr, return vma; } @@ -94628,7 +100706,7 @@ index b1202cf..ee487f8 100644 /* * Verify that the stack growth is acceptable and * update accounting. This is shared with both the -@@ -2062,6 +2362,7 @@ static int acct_stack_growth(struct vm_area_struct *vma, unsigned long size, uns +@@ -2064,6 +2369,7 @@ static int acct_stack_growth(struct vm_area_struct *vma, unsigned long size, uns return -ENOMEM; /* Stack limit test */ @@ -94636,7 +100714,7 @@ index b1202cf..ee487f8 100644 if (size > ACCESS_ONCE(rlim[RLIMIT_STACK].rlim_cur)) return -ENOMEM; -@@ -2072,6 +2373,7 @@ static int acct_stack_growth(struct vm_area_struct *vma, unsigned long size, uns +@@ -2074,6 +2380,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; @@ -94644,7 +100722,7 @@ index b1202cf..ee487f8 100644 if (locked > limit && !capable(CAP_IPC_LOCK)) return -ENOMEM; } -@@ -2101,37 +2403,48 @@ static int acct_stack_growth(struct vm_area_struct *vma, unsigned long size, uns +@@ -2103,37 +2410,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. */ @@ -94702,7 +100780,7 @@ index b1202cf..ee487f8 100644 unsigned long size, grow; size = address - vma->vm_start; -@@ -2166,6 +2479,8 @@ int expand_upwards(struct vm_area_struct *vma, unsigned long address) +@@ -2168,6 +2486,8 @@ int expand_upwards(struct vm_area_struct *vma, unsigned long address) } } } @@ -94711,7 +100789,7 @@ index b1202cf..ee487f8 100644 vma_unlock_anon_vma(vma); khugepaged_enter_vma_merge(vma); validate_mm(vma->vm_mm); -@@ -2180,6 +2495,8 @@ int expand_downwards(struct vm_area_struct *vma, +@@ -2182,6 +2502,8 @@ int expand_downwards(struct vm_area_struct *vma, unsigned long address) { int error; @@ -94720,7 +100798,7 @@ index b1202cf..ee487f8 100644 /* * We must make sure the anon_vma is allocated -@@ -2193,6 +2510,15 @@ int expand_downwards(struct vm_area_struct *vma, +@@ -2195,6 +2517,15 @@ int expand_downwards(struct vm_area_struct *vma, if (error) return error; @@ -94736,7 +100814,7 @@ index b1202cf..ee487f8 100644 vma_lock_anon_vma(vma); /* -@@ -2202,9 +2528,17 @@ int expand_downwards(struct vm_area_struct *vma, +@@ -2204,9 +2535,17 @@ int expand_downwards(struct vm_area_struct *vma, */ /* Somebody else might have raced and expanded it already */ @@ -94755,7 +100833,7 @@ index b1202cf..ee487f8 100644 size = vma->vm_end - address; grow = (vma->vm_start - address) >> PAGE_SHIFT; -@@ -2229,13 +2563,27 @@ int expand_downwards(struct vm_area_struct *vma, +@@ -2231,13 +2570,27 @@ int expand_downwards(struct vm_area_struct *vma, vma->vm_pgoff -= grow; anon_vma_interval_tree_post_update_vma(vma); vma_gap_update(vma); @@ -94783,7 +100861,7 @@ index b1202cf..ee487f8 100644 khugepaged_enter_vma_merge(vma); validate_mm(vma->vm_mm); return error; -@@ -2333,6 +2681,13 @@ static void remove_vma_list(struct mm_struct *mm, struct vm_area_struct *vma) +@@ -2335,6 +2688,13 @@ static void remove_vma_list(struct mm_struct *mm, struct vm_area_struct *vma) do { long nrpages = vma_pages(vma); @@ -94797,7 +100875,7 @@ index b1202cf..ee487f8 100644 if (vma->vm_flags & VM_ACCOUNT) nr_accounted += nrpages; vm_stat_account(mm, vma->vm_flags, vma->vm_file, -nrpages); -@@ -2377,6 +2732,16 @@ detach_vmas_to_be_unmapped(struct mm_struct *mm, struct vm_area_struct *vma, +@@ -2379,6 +2739,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 { @@ -94814,7 +100892,7 @@ index b1202cf..ee487f8 100644 vma_rb_erase(vma, &mm->mm_rb); mm->map_count--; tail_vma = vma; -@@ -2404,14 +2769,33 @@ static int __split_vma(struct mm_struct * mm, struct vm_area_struct * vma, +@@ -2406,14 +2776,33 @@ static int __split_vma(struct mm_struct * mm, struct vm_area_struct * vma, struct vm_area_struct *new; int err = -ENOMEM; @@ -94848,7 +100926,7 @@ index b1202cf..ee487f8 100644 /* most fields are the same, copy all, and then fixup */ *new = *vma; -@@ -2424,6 +2808,22 @@ static int __split_vma(struct mm_struct * mm, struct vm_area_struct * vma, +@@ -2426,6 +2815,22 @@ static int __split_vma(struct mm_struct * mm, struct vm_area_struct * vma, new->vm_pgoff += ((addr - vma->vm_start) >> PAGE_SHIFT); } @@ -94871,7 +100949,7 @@ index b1202cf..ee487f8 100644 err = vma_dup_policy(vma, new); if (err) goto out_free_vma; -@@ -2443,6 +2843,38 @@ static int __split_vma(struct mm_struct * mm, struct vm_area_struct * vma, +@@ -2445,6 +2850,38 @@ 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); @@ -94910,7 +100988,7 @@ index b1202cf..ee487f8 100644 /* Success. */ if (!err) return 0; -@@ -2452,10 +2884,18 @@ static int __split_vma(struct mm_struct * mm, struct vm_area_struct * vma, +@@ -2454,10 +2891,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); @@ -94930,7 +101008,7 @@ index b1202cf..ee487f8 100644 kmem_cache_free(vm_area_cachep, new); out_err: return err; -@@ -2468,6 +2908,15 @@ static int __split_vma(struct mm_struct * mm, struct vm_area_struct * vma, +@@ -2470,6 +2915,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) { @@ -94946,7 +101024,7 @@ index b1202cf..ee487f8 100644 if (mm->map_count >= sysctl_max_map_count) return -ENOMEM; -@@ -2479,11 +2928,30 @@ int split_vma(struct mm_struct *mm, struct vm_area_struct *vma, +@@ -2481,11 +2935,30 @@ int split_vma(struct mm_struct *mm, struct vm_area_struct *vma, * work. This now handles partial unmappings. * Jeremy Fitzhardinge */ @@ -94977,7 +101055,7 @@ index b1202cf..ee487f8 100644 if ((start & ~PAGE_MASK) || start > TASK_SIZE || len > TASK_SIZE-start) return -EINVAL; -@@ -2558,6 +3026,8 @@ int do_munmap(struct mm_struct *mm, unsigned long start, size_t len) +@@ -2560,6 +3033,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); @@ -94986,7 +101064,7 @@ index b1202cf..ee487f8 100644 return 0; } -@@ -2566,6 +3036,13 @@ int vm_munmap(unsigned long start, size_t len) +@@ -2568,6 +3043,13 @@ int vm_munmap(unsigned long start, size_t len) int ret; struct mm_struct *mm = current->mm; @@ -95000,7 +101078,7 @@ index b1202cf..ee487f8 100644 down_write(&mm->mmap_sem); ret = do_munmap(mm, start, len); up_write(&mm->mmap_sem); -@@ -2579,16 +3056,6 @@ SYSCALL_DEFINE2(munmap, unsigned long, addr, size_t, len) +@@ -2581,16 +3063,6 @@ SYSCALL_DEFINE2(munmap, unsigned long, addr, size_t, len) return vm_munmap(addr, len); } @@ -95017,7 +101095,7 @@ index b1202cf..ee487f8 100644 /* * this is really a simplified "do_mmap". it only handles * anonymous maps. eventually we may be able to do some -@@ -2602,6 +3069,7 @@ static unsigned long do_brk(unsigned long addr, unsigned long len) +@@ -2604,6 +3076,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; @@ -95025,7 +101103,7 @@ index b1202cf..ee487f8 100644 len = PAGE_ALIGN(len); if (!len) -@@ -2609,10 +3077,24 @@ static unsigned long do_brk(unsigned long addr, unsigned long len) +@@ -2611,10 +3084,24 @@ static unsigned long do_brk(unsigned long addr, unsigned long len) flags = VM_DATA_DEFAULT_FLAGS | VM_ACCOUNT | mm->def_flags; @@ -95050,7 +101128,7 @@ index b1202cf..ee487f8 100644 error = mlock_future_check(mm, mm->def_flags, len); if (error) return error; -@@ -2626,21 +3108,20 @@ static unsigned long do_brk(unsigned long addr, unsigned long len) +@@ -2628,21 +3115,20 @@ static unsigned long do_brk(unsigned long addr, unsigned long len) /* * Clear old maps. this also does some error checking for us */ @@ -95075,7 +101153,7 @@ index b1202cf..ee487f8 100644 return -ENOMEM; /* Can we just expand an old private anonymous mapping? */ -@@ -2654,7 +3135,7 @@ static unsigned long do_brk(unsigned long addr, unsigned long len) +@@ -2656,7 +3142,7 @@ static unsigned long do_brk(unsigned long addr, unsigned long len) */ vma = kmem_cache_zalloc(vm_area_cachep, GFP_KERNEL); if (!vma) { @@ -95084,7 +101162,7 @@ index b1202cf..ee487f8 100644 return -ENOMEM; } -@@ -2668,10 +3149,11 @@ static unsigned long do_brk(unsigned long addr, unsigned long len) +@@ -2670,10 +3156,11 @@ 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); @@ -95098,7 +101176,7 @@ index b1202cf..ee487f8 100644 return addr; } -@@ -2733,6 +3215,7 @@ void exit_mmap(struct mm_struct *mm) +@@ -2735,6 +3222,7 @@ void exit_mmap(struct mm_struct *mm) while (vma) { if (vma->vm_flags & VM_ACCOUNT) nr_accounted += vma_pages(vma); @@ -95106,7 +101184,7 @@ index b1202cf..ee487f8 100644 vma = remove_vma(vma); } vm_unacct_memory(nr_accounted); -@@ -2750,6 +3233,13 @@ int insert_vm_struct(struct mm_struct *mm, struct vm_area_struct *vma) +@@ -2752,6 +3240,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; @@ -95120,7 +101198,7 @@ index b1202cf..ee487f8 100644 /* * The vm_pgoff of a purely anonymous vma should be irrelevant * until its first write fault, when page's anon_vma and index -@@ -2773,7 +3263,21 @@ int insert_vm_struct(struct mm_struct *mm, struct vm_area_struct *vma) +@@ -2775,7 +3270,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; @@ -95142,7 +101220,7 @@ index b1202cf..ee487f8 100644 return 0; } -@@ -2792,6 +3296,8 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap, +@@ -2794,6 +3303,8 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap, struct rb_node **rb_link, *rb_parent; bool faulted_in_anon_vma = true; @@ -95151,7 +101229,7 @@ index b1202cf..ee487f8 100644 /* * If anonymous vma has not yet been faulted, update new pgoff * to match new location, to increase its chance of merging. -@@ -2856,6 +3362,39 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap, +@@ -2858,6 +3369,39 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap, return NULL; } @@ -95191,7 +101269,7 @@ index b1202cf..ee487f8 100644 /* * Return true if the calling process may expand its vm space by the passed * number of pages -@@ -2867,6 +3406,7 @@ int may_expand_vm(struct mm_struct *mm, unsigned long npages) +@@ -2869,6 +3413,7 @@ int may_expand_vm(struct mm_struct *mm, unsigned long npages) lim = rlimit(RLIMIT_AS) >> PAGE_SHIFT; @@ -95199,7 +101277,7 @@ index b1202cf..ee487f8 100644 if (cur + npages > lim) return 0; return 1; -@@ -2937,6 +3477,22 @@ struct vm_area_struct *_install_special_mapping(struct mm_struct *mm, +@@ -2951,6 +3496,22 @@ static struct vm_area_struct *__install_special_mapping( vma->vm_start = addr; vma->vm_end = addr + len; @@ -95562,10 +101640,10 @@ index 05f1180..c3cde48 100644 out: if (ret & ~PAGE_MASK) diff --git a/mm/nommu.c b/mm/nommu.c -index 431fd7c..8674512 100644 +index 4a852f6..4371a6b 100644 --- a/mm/nommu.c +++ b/mm/nommu.c -@@ -67,7 +67,6 @@ int sysctl_max_map_count = DEFAULT_MAX_MAP_COUNT; +@@ -70,7 +70,6 @@ int sysctl_max_map_count = DEFAULT_MAX_MAP_COUNT; int sysctl_nr_trim_pages = CONFIG_NOMMU_INITIAL_TRIM_EXCESS; unsigned long sysctl_user_reserve_kbytes __read_mostly = 1UL << 17; /* 128MB */ unsigned long sysctl_admin_reserve_kbytes __read_mostly = 1UL << 13; /* 8MB */ @@ -95573,7 +101651,7 @@ index 431fd7c..8674512 100644 atomic_long_t mmap_pages_allocated; -@@ -854,15 +853,6 @@ struct vm_area_struct *find_vma(struct mm_struct *mm, unsigned long addr) +@@ -857,15 +856,6 @@ struct vm_area_struct *find_vma(struct mm_struct *mm, unsigned long addr) EXPORT_SYMBOL(find_vma); /* @@ -95589,7 +101667,7 @@ index 431fd7c..8674512 100644 * expand a stack to a given address * - not supported under NOMMU conditions */ -@@ -1569,6 +1559,7 @@ int split_vma(struct mm_struct *mm, struct vm_area_struct *vma, +@@ -1572,6 +1562,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; @@ -95597,7 +101675,7 @@ index 431fd7c..8674512 100644 *region = *vma->vm_region; new->vm_region = region; -@@ -2004,8 +1995,8 @@ int generic_file_remap_pages(struct vm_area_struct *vma, unsigned long addr, +@@ -2007,8 +1998,8 @@ int generic_file_remap_pages(struct vm_area_struct *vma, unsigned long addr, } EXPORT_SYMBOL(generic_file_remap_pages); @@ -95608,7 +101686,7 @@ index 431fd7c..8674512 100644 { struct vm_area_struct *vma; -@@ -2046,8 +2037,8 @@ static int __access_remote_vm(struct task_struct *tsk, struct mm_struct *mm, +@@ -2049,8 +2040,8 @@ static int __access_remote_vm(struct task_struct *tsk, struct mm_struct *mm, * * The caller must hold a reference on @mm. */ @@ -95619,7 +101697,7 @@ index 431fd7c..8674512 100644 { return __access_remote_vm(NULL, mm, addr, buf, len, write); } -@@ -2056,7 +2047,7 @@ int access_remote_vm(struct mm_struct *mm, unsigned long addr, +@@ -2059,7 +2050,7 @@ int access_remote_vm(struct mm_struct *mm, unsigned long addr, * Access another process' address space. * - source/target buffer must be kernel space */ @@ -95629,10 +101707,10 @@ index 431fd7c..8674512 100644 struct mm_struct *mm; diff --git a/mm/page-writeback.c b/mm/page-writeback.c -index 154af21..86e447f 100644 +index e0c9430..3c6bf79 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c -@@ -685,7 +685,7 @@ static long long pos_ratio_polynom(unsigned long setpoint, +@@ -667,7 +667,7 @@ static long long pos_ratio_polynom(unsigned long setpoint, * 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 */ @@ -95642,7 +101720,7 @@ index 154af21..86e447f 100644 unsigned long bg_thresh, unsigned long dirty, diff --git a/mm/page_alloc.c b/mm/page_alloc.c -index d64f5f9..9005ab5 100644 +index ef44ad7..1056bc7 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -61,6 +61,7 @@ @@ -95653,7 +101731,7 @@ index d64f5f9..9005ab5 100644 #include #include -@@ -356,7 +357,7 @@ out: +@@ -357,7 +358,7 @@ out: * This usage means that zero-order pages may not be compound. */ @@ -95662,7 +101740,7 @@ index d64f5f9..9005ab5 100644 { __free_pages_ok(page, compound_order(page)); } -@@ -730,6 +731,10 @@ static bool free_pages_prepare(struct page *page, unsigned int order) +@@ -745,6 +746,10 @@ static bool free_pages_prepare(struct page *page, unsigned int order) int i; int bad = 0; @@ -95673,7 +101751,7 @@ index d64f5f9..9005ab5 100644 trace_mm_page_free(page, order); kmemcheck_free_shadow(page, order); -@@ -746,6 +751,12 @@ static bool free_pages_prepare(struct page *page, unsigned int order) +@@ -761,6 +766,12 @@ static bool free_pages_prepare(struct page *page, unsigned int order) debug_check_no_obj_freed(page_address(page), PAGE_SIZE << order); } @@ -95686,7 +101764,7 @@ index d64f5f9..9005ab5 100644 arch_free_page(page, order); kernel_map_pages(page, 1 << order, 0); -@@ -768,6 +779,20 @@ static void __free_pages_ok(struct page *page, unsigned int order) +@@ -784,6 +795,20 @@ static void __free_pages_ok(struct page *page, unsigned int order) local_irq_restore(flags); } @@ -95707,7 +101785,7 @@ index d64f5f9..9005ab5 100644 void __init __free_pages_bootmem(struct page *page, unsigned int order) { unsigned int nr_pages = 1 << order; -@@ -783,6 +808,19 @@ void __init __free_pages_bootmem(struct page *page, unsigned int order) +@@ -799,6 +824,19 @@ void __init __free_pages_bootmem(struct page *page, unsigned int order) __ClearPageReserved(p); set_page_count(p, 0); @@ -95727,7 +101805,7 @@ index d64f5f9..9005ab5 100644 page_zone(page)->managed_pages += nr_pages; set_page_refcounted(page); __free_pages(page, order); -@@ -911,8 +949,10 @@ static int prep_new_page(struct page *page, int order, gfp_t gfp_flags) +@@ -927,8 +965,10 @@ static int prep_new_page(struct page *page, unsigned int order, gfp_t gfp_flags) arch_alloc_page(page, order); kernel_map_pages(page, 1 << order, 1); @@ -95738,7 +101816,7 @@ index d64f5f9..9005ab5 100644 if (order && (gfp_flags & __GFP_COMP)) prep_compound_page(page, order); -@@ -2415,7 +2455,7 @@ static void reset_alloc_batches(struct zonelist *zonelist, +@@ -2427,7 +2467,7 @@ static void reset_alloc_batches(struct zonelist *zonelist, continue; mod_zone_page_state(zone, NR_ALLOC_BATCH, high_wmark_pages(zone) - low_wmark_pages(zone) - @@ -95747,19 +101825,6 @@ index d64f5f9..9005ab5 100644 } } -diff --git a/mm/page_io.c b/mm/page_io.c -index 7c59ef6..1358905 100644 ---- a/mm/page_io.c -+++ b/mm/page_io.c -@@ -260,7 +260,7 @@ int __swap_writepage(struct page *page, struct writeback_control *wbc, - struct file *swap_file = sis->swap_file; - struct address_space *mapping = swap_file->f_mapping; - struct iovec iov = { -- .iov_base = kmap(page), -+ .iov_base = (void __force_user *)kmap(page), - .iov_len = PAGE_SIZE, - }; - diff --git a/mm/percpu.c b/mm/percpu.c index 2ddf9a9..f8fc075 100644 --- a/mm/percpu.c @@ -95773,8 +101838,21 @@ index 2ddf9a9..f8fc075 100644 EXPORT_SYMBOL_GPL(pcpu_base_addr); static const int *pcpu_unit_map __read_mostly; /* cpu -> unit */ +diff --git a/mm/pgtable-generic.c b/mm/pgtable-generic.c +index a8b9199..dfb79e0 100644 +--- a/mm/pgtable-generic.c ++++ b/mm/pgtable-generic.c +@@ -195,7 +195,7 @@ void pmdp_invalidate(struct vm_area_struct *vma, unsigned long address, + pmd_t entry = *pmdp; + if (pmd_numa(entry)) + entry = pmd_mknonnuma(entry); +- set_pmd_at(vma->vm_mm, address, pmdp, pmd_mknotpresent(*pmdp)); ++ set_pmd_at(vma->vm_mm, address, pmdp, pmd_mknotpresent(entry)); + flush_tlb_range(vma, address, address + HPAGE_PMD_SIZE); + } + #endif /* CONFIG_TRANSPARENT_HUGEPAGE */ diff --git a/mm/process_vm_access.c b/mm/process_vm_access.c -index 8505c92..946bfc9 100644 +index 5077afc..846c9ef 100644 --- a/mm/process_vm_access.c +++ b/mm/process_vm_access.c @@ -13,6 +13,7 @@ @@ -95785,7 +101863,7 @@ index 8505c92..946bfc9 100644 #include #include #include -@@ -161,19 +162,19 @@ static ssize_t process_vm_rw_core(pid_t pid, struct iov_iter *iter, +@@ -157,19 +158,19 @@ static ssize_t process_vm_rw_core(pid_t pid, struct iov_iter *iter, ssize_t iov_len; size_t total_len = iov_iter_count(iter); @@ -95812,7 +101890,7 @@ index 8505c92..946bfc9 100644 } if (nr_pages == 0) -@@ -201,6 +202,11 @@ static ssize_t process_vm_rw_core(pid_t pid, struct iov_iter *iter, +@@ -197,6 +198,11 @@ static ssize_t process_vm_rw_core(pid_t pid, struct iov_iter *iter, goto free_proc_pages; } @@ -95825,7 +101903,7 @@ index 8505c92..946bfc9 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 14d1e28..3777962 100644 +index 22a4a76..9551288 100644 --- a/mm/rmap.c +++ b/mm/rmap.c @@ -164,6 +164,10 @@ int anon_vma_prepare(struct vm_area_struct *vma) @@ -95928,7 +102006,7 @@ index 14d1e28..3777962 100644 /* diff --git a/mm/shmem.c b/mm/shmem.c -index a2801ba..1e82984 100644 +index af68b15..1227320 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -33,7 +33,7 @@ @@ -95940,7 +102018,7 @@ index a2801ba..1e82984 100644 #ifdef CONFIG_SHMEM /* -@@ -77,14 +77,15 @@ static struct vfsmount *shm_mnt; +@@ -77,7 +77,7 @@ static struct vfsmount *shm_mnt; #define BOGO_DIRENT_SIZE 20 /* Symlink up to this size is kmalloc'ed instead of using a swappable page */ @@ -95948,181 +102026,8 @@ index a2801ba..1e82984 100644 +#define SHORT_SYMLINK_LEN 64 /* -- * shmem_fallocate and shmem_writepage communicate via inode->i_private -- * (with i_mutex making sure that it has only one user at a time): -- * we would prefer not to enlarge the shmem inode just for that. -+ * shmem_fallocate communicates with shmem_fault or shmem_writepage via -+ * inode->i_private (with i_mutex making sure that it has only one user at -+ * a time): we would prefer not to enlarge the shmem inode just for that. - */ - struct shmem_falloc { -+ wait_queue_head_t *waitq; /* faults into hole wait for punch to end */ - pgoff_t start; /* start of range currently being fallocated */ - pgoff_t next; /* the next page offset to be fallocated */ - pgoff_t nr_falloced; /* how many new pages have been fallocated */ -@@ -467,23 +468,20 @@ static void shmem_undo_range(struct inode *inode, loff_t lstart, loff_t lend, - return; - - index = start; -- for ( ; ; ) { -+ while (index < end) { - cond_resched(); - - pvec.nr = find_get_entries(mapping, index, - min(end - index, (pgoff_t)PAGEVEC_SIZE), - pvec.pages, indices); - if (!pvec.nr) { -- if (index == start || unfalloc) -+ /* If all gone or hole-punch or unfalloc, we're done */ -+ if (index == start || end != -1) - break; -+ /* But if truncating, restart to make sure all gone */ - index = start; - continue; - } -- if ((index == start || unfalloc) && indices[0] >= end) { -- pagevec_remove_exceptionals(&pvec); -- pagevec_release(&pvec); -- break; -- } - mem_cgroup_uncharge_start(); - for (i = 0; i < pagevec_count(&pvec); i++) { - struct page *page = pvec.pages[i]; -@@ -495,8 +493,12 @@ static void shmem_undo_range(struct inode *inode, loff_t lstart, loff_t lend, - if (radix_tree_exceptional_entry(page)) { - if (unfalloc) - continue; -- nr_swaps_freed += !shmem_free_swap(mapping, -- index, page); -+ if (shmem_free_swap(mapping, index, page)) { -+ /* Swap was replaced by page: retry */ -+ index--; -+ break; -+ } -+ nr_swaps_freed++; - continue; - } - -@@ -505,6 +507,11 @@ static void shmem_undo_range(struct inode *inode, loff_t lstart, loff_t lend, - if (page->mapping == mapping) { - VM_BUG_ON_PAGE(PageWriteback(page), page); - truncate_inode_page(mapping, page); -+ } else { -+ /* Page was replaced by swap: retry */ -+ unlock_page(page); -+ index--; -+ break; - } - } - unlock_page(page); -@@ -759,6 +766,7 @@ static int shmem_writepage(struct page *page, struct writeback_control *wbc) - spin_lock(&inode->i_lock); - shmem_falloc = inode->i_private; - if (shmem_falloc && -+ !shmem_falloc->waitq && - index >= shmem_falloc->start && - index < shmem_falloc->next) - shmem_falloc->nr_unswapped++; -@@ -1233,6 +1241,64 @@ static int shmem_fault(struct vm_area_struct *vma, struct vm_fault *vmf) - int error; - int ret = VM_FAULT_LOCKED; - -+ /* -+ * Trinity finds that probing a hole which tmpfs is punching can -+ * prevent the hole-punch from ever completing: which in turn -+ * locks writers out with its hold on i_mutex. So refrain from -+ * faulting pages into the hole while it's being punched. Although -+ * shmem_undo_range() does remove the additions, it may be unable to -+ * keep up, as each new page needs its own unmap_mapping_range() call, -+ * and the i_mmap tree grows ever slower to scan if new vmas are added. -+ * -+ * It does not matter if we sometimes reach this check just before the -+ * hole-punch begins, so that one fault then races with the punch: -+ * we just need to make racing faults a rare case. -+ * -+ * The implementation below would be much simpler if we just used a -+ * standard mutex or completion: but we cannot take i_mutex in fault, -+ * and bloating every shmem inode for this unlikely case would be sad. -+ */ -+ if (unlikely(inode->i_private)) { -+ struct shmem_falloc *shmem_falloc; -+ -+ spin_lock(&inode->i_lock); -+ shmem_falloc = inode->i_private; -+ if (shmem_falloc && -+ shmem_falloc->waitq && -+ vmf->pgoff >= shmem_falloc->start && -+ vmf->pgoff < shmem_falloc->next) { -+ wait_queue_head_t *shmem_falloc_waitq; -+ DEFINE_WAIT(shmem_fault_wait); -+ -+ ret = VM_FAULT_NOPAGE; -+ if ((vmf->flags & FAULT_FLAG_ALLOW_RETRY) && -+ !(vmf->flags & FAULT_FLAG_RETRY_NOWAIT)) { -+ /* It's polite to up mmap_sem if we can */ -+ up_read(&vma->vm_mm->mmap_sem); -+ ret = VM_FAULT_RETRY; -+ } -+ -+ shmem_falloc_waitq = shmem_falloc->waitq; -+ prepare_to_wait(shmem_falloc_waitq, &shmem_fault_wait, -+ TASK_UNINTERRUPTIBLE); -+ spin_unlock(&inode->i_lock); -+ schedule(); -+ -+ /* -+ * shmem_falloc_waitq points into the shmem_fallocate() -+ * stack of the hole-punching task: shmem_falloc_waitq -+ * is usually invalid by the time we reach here, but -+ * finish_wait() does not dereference it in that case; -+ * though i_lock needed lest racing with wake_up_all(). -+ */ -+ spin_lock(&inode->i_lock); -+ finish_wait(shmem_falloc_waitq, &shmem_fault_wait); -+ spin_unlock(&inode->i_lock); -+ return ret; -+ } -+ spin_unlock(&inode->i_lock); -+ } -+ - error = shmem_getpage(inode, vmf->pgoff, &vmf->page, SGP_CACHE, &ret); - if (error) - return ((error == -ENOMEM) ? VM_FAULT_OOM : VM_FAULT_SIGBUS); -@@ -1737,12 +1803,25 @@ static long shmem_fallocate(struct file *file, int mode, loff_t offset, - struct address_space *mapping = file->f_mapping; - loff_t unmap_start = round_up(offset, PAGE_SIZE); - loff_t unmap_end = round_down(offset + len, PAGE_SIZE) - 1; -+ DECLARE_WAIT_QUEUE_HEAD_ONSTACK(shmem_falloc_waitq); -+ -+ shmem_falloc.waitq = &shmem_falloc_waitq; -+ shmem_falloc.start = unmap_start >> PAGE_SHIFT; -+ shmem_falloc.next = (unmap_end + 1) >> PAGE_SHIFT; -+ spin_lock(&inode->i_lock); -+ inode->i_private = &shmem_falloc; -+ spin_unlock(&inode->i_lock); - - if ((u64)unmap_end > (u64)unmap_start) - unmap_mapping_range(mapping, unmap_start, - 1 + unmap_end - unmap_start, 0); - shmem_truncate_range(inode, offset, offset + len - 1); - /* No need to unmap again: hole-punching leaves COWed pages */ -+ -+ spin_lock(&inode->i_lock); -+ inode->i_private = NULL; -+ wake_up_all(&shmem_falloc_waitq); -+ spin_unlock(&inode->i_lock); - error = 0; - goto out; - } -@@ -1760,6 +1839,7 @@ static long shmem_fallocate(struct file *file, int mode, loff_t offset, - goto out; - } - -+ shmem_falloc.waitq = NULL; - shmem_falloc.start = start; - shmem_falloc.next = start; - shmem_falloc.nr_falloced = 0; -@@ -2138,6 +2218,11 @@ static const struct xattr_handler *shmem_xattr_handlers[] = { + * shmem_fallocate communicates with shmem_fault or shmem_writepage via +@@ -2219,6 +2219,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[] = { @@ -96134,7 +102039,7 @@ index a2801ba..1e82984 100644 { XATTR_SECURITY_PREFIX, XATTR_SECURITY_PREFIX_LEN }, { XATTR_TRUSTED_PREFIX, XATTR_TRUSTED_PREFIX_LEN } }; -@@ -2193,6 +2278,15 @@ static int shmem_setxattr(struct dentry *dentry, const char *name, +@@ -2274,6 +2279,15 @@ static int shmem_setxattr(struct dentry *dentry, const char *name, if (err) return err; @@ -96150,7 +102055,7 @@ index a2801ba..1e82984 100644 return simple_xattr_set(&info->xattrs, name, value, size, flags); } -@@ -2505,8 +2599,7 @@ int shmem_fill_super(struct super_block *sb, void *data, int silent) +@@ -2586,8 +2600,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 */ @@ -96161,7 +102066,7 @@ index a2801ba..1e82984 100644 return -ENOMEM; diff --git a/mm/slab.c b/mm/slab.c -index 9432556..e0dc685 100644 +index 3070b92..bcfff83 100644 --- a/mm/slab.c +++ b/mm/slab.c @@ -311,10 +311,12 @@ static void kmem_cache_node_init(struct kmem_cache_node *parent) @@ -96214,7 +102119,7 @@ index 9432556..e0dc685 100644 slab_early_init = 0; -@@ -3525,6 +3529,21 @@ static inline void __cache_free(struct kmem_cache *cachep, void *objp, +@@ -3512,6 +3516,21 @@ static inline void __cache_free(struct kmem_cache *cachep, void *objp, struct array_cache *ac = cpu_cache_get(cachep); check_irq_off(); @@ -96236,7 +102141,7 @@ index 9432556..e0dc685 100644 kmemleak_free_recursive(objp, cachep->flags); objp = cache_free_debugcheck(cachep, objp, caller); -@@ -3748,6 +3767,7 @@ void kfree(const void *objp) +@@ -3735,6 +3754,7 @@ void kfree(const void *objp) if (unlikely(ZERO_OR_NULL_PTR(objp))) return; @@ -96244,7 +102149,7 @@ index 9432556..e0dc685 100644 local_irq_save(flags); kfree_debugcheck(objp); c = virt_to_cache(objp); -@@ -4189,14 +4209,22 @@ void slabinfo_show_stats(struct seq_file *m, struct kmem_cache *cachep) +@@ -4176,14 +4196,22 @@ void slabinfo_show_stats(struct seq_file *m, struct kmem_cache *cachep) } /* cpu stats */ { @@ -96271,7 +102176,7 @@ index 9432556..e0dc685 100644 #endif } -@@ -4417,13 +4445,69 @@ static const struct file_operations proc_slabstats_operations = { +@@ -4404,13 +4432,69 @@ static const struct file_operations proc_slabstats_operations = { static int __init slab_proc_init(void) { #ifdef CONFIG_DEBUG_SLAB_LEAK @@ -96343,7 +102248,7 @@ index 9432556..e0dc685 100644 * ksize - get the actual amount of memory allocated for a given object * @objp: Pointer to the object diff --git a/mm/slab.h b/mm/slab.h -index 6bd4c35..97565a1 100644 +index 961a3fb..6b12514 100644 --- a/mm/slab.h +++ b/mm/slab.h @@ -32,6 +32,15 @@ extern struct list_head slab_caches; @@ -96372,7 +102277,7 @@ index 6bd4c35..97565a1 100644 #if defined(CONFIG_DEBUG_SLAB) #define SLAB_DEBUG_FLAGS (SLAB_RED_ZONE | SLAB_POISON | SLAB_STORE_USER) -@@ -245,6 +255,9 @@ static inline struct kmem_cache *cache_from_obj(struct kmem_cache *s, void *x) +@@ -251,6 +261,9 @@ static inline struct kmem_cache *cache_from_obj(struct kmem_cache *s, void *x) return s; page = virt_to_head_page(x); @@ -96383,7 +102288,7 @@ index 6bd4c35..97565a1 100644 if (slab_equal_or_root(cachep, s)) return cachep; diff --git a/mm/slab_common.c b/mm/slab_common.c -index 102cc6f..c7aab3d 100644 +index d31c4ba..1121296 100644 --- a/mm/slab_common.c +++ b/mm/slab_common.c @@ -23,11 +23,22 @@ @@ -96417,10 +102322,10 @@ index 102cc6f..c7aab3d 100644 - s->refcount = 1; + atomic_set(&s->refcount, 1); list_add(&s->list, &slab_caches); - memcg_register_cache(s); out: -@@ -334,8 +345,7 @@ void kmem_cache_destroy(struct kmem_cache *s) - get_online_cpus(); + if (err) +@@ -339,8 +350,7 @@ void kmem_cache_destroy(struct kmem_cache *s) + mutex_lock(&slab_mutex); - s->refcount--; @@ -96428,8 +102333,8 @@ index 102cc6f..c7aab3d 100644 + if (!atomic_dec_and_test(&s->refcount)) goto out_unlock; - if (kmem_cache_destroy_memcg_children(s) != 0) -@@ -358,7 +368,7 @@ void kmem_cache_destroy(struct kmem_cache *s) + if (memcg_cleanup_cache_params(s) != 0) +@@ -360,7 +370,7 @@ void kmem_cache_destroy(struct kmem_cache *s) rcu_barrier(); memcg_free_cache_params(s); @@ -96438,7 +102343,7 @@ index 102cc6f..c7aab3d 100644 sysfs_slab_remove(s); #else slab_kmem_cache_release(s); -@@ -393,7 +403,7 @@ void __init create_boot_cache(struct kmem_cache *s, const char *name, size_t siz +@@ -416,7 +426,7 @@ void __init create_boot_cache(struct kmem_cache *s, const char *name, size_t siz panic("Creation of kmalloc slab %s size=%zu failed. Reason %d\n", name, size, err); @@ -96447,7 +102352,7 @@ index 102cc6f..c7aab3d 100644 } struct kmem_cache *__init create_kmalloc_cache(const char *name, size_t size, -@@ -406,7 +416,7 @@ struct kmem_cache *__init create_kmalloc_cache(const char *name, size_t size, +@@ -429,7 +439,7 @@ struct kmem_cache *__init create_kmalloc_cache(const char *name, size_t size, create_boot_cache(s, name, size, flags); list_add(&s->list, &slab_caches); @@ -96456,7 +102361,7 @@ index 102cc6f..c7aab3d 100644 return s; } -@@ -418,6 +428,11 @@ struct kmem_cache *kmalloc_dma_caches[KMALLOC_SHIFT_HIGH + 1]; +@@ -441,6 +451,11 @@ struct kmem_cache *kmalloc_dma_caches[KMALLOC_SHIFT_HIGH + 1]; EXPORT_SYMBOL(kmalloc_dma_caches); #endif @@ -96468,7 +102373,7 @@ index 102cc6f..c7aab3d 100644 /* * Conversion table for small slabs sizes / 8 to the index in the * kmalloc array. This is necessary for slabs < 192 since we have non power -@@ -482,6 +497,13 @@ struct kmem_cache *kmalloc_slab(size_t size, gfp_t flags) +@@ -505,6 +520,13 @@ struct kmem_cache *kmalloc_slab(size_t size, gfp_t flags) return kmalloc_dma_caches[index]; #endif @@ -96482,7 +102387,7 @@ index 102cc6f..c7aab3d 100644 return kmalloc_caches[index]; } -@@ -538,7 +560,7 @@ void __init create_kmalloc_caches(unsigned long flags) +@@ -561,7 +583,7 @@ void __init create_kmalloc_caches(unsigned long flags) for (i = KMALLOC_SHIFT_LOW; i <= KMALLOC_SHIFT_HIGH; i++) { if (!kmalloc_caches[i]) { kmalloc_caches[i] = create_kmalloc_cache(NULL, @@ -96491,7 +102396,7 @@ index 102cc6f..c7aab3d 100644 } /* -@@ -547,10 +569,10 @@ void __init create_kmalloc_caches(unsigned long flags) +@@ -570,10 +592,10 @@ void __init create_kmalloc_caches(unsigned long flags) * earlier power of two caches */ if (KMALLOC_MIN_SIZE <= 32 && !kmalloc_caches[1] && i == 6) @@ -96504,7 +102409,7 @@ index 102cc6f..c7aab3d 100644 } /* Kmalloc array is now usable */ -@@ -583,6 +605,23 @@ void __init create_kmalloc_caches(unsigned long flags) +@@ -606,6 +628,23 @@ void __init create_kmalloc_caches(unsigned long flags) } } #endif @@ -96528,7 +102433,7 @@ index 102cc6f..c7aab3d 100644 } #endif /* !CONFIG_SLOB */ -@@ -623,6 +662,9 @@ void print_slabinfo_header(struct seq_file *m) +@@ -664,6 +703,9 @@ void print_slabinfo_header(struct seq_file *m) seq_puts(m, " : globalstat " " "); seq_puts(m, " : cpustat "); @@ -96539,7 +102444,7 @@ index 102cc6f..c7aab3d 100644 seq_putc(m, '\n'); } diff --git a/mm/slob.c b/mm/slob.c -index 730cad4..8cfd442 100644 +index 21980e0..ed9a648 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) @@ -96910,7 +102815,7 @@ index 730cad4..8cfd442 100644 EXPORT_SYMBOL(kmem_cache_free); diff --git a/mm/slub.c b/mm/slub.c -index 2b1ce69..4a2193f 100644 +index 7300480..cb92846 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -207,7 +207,7 @@ struct track { @@ -96926,12 +102831,12 @@ index 2b1ce69..4a2193f 100644 if (!t->addr) return; -- printk(KERN_ERR "INFO: %s in %pS age=%lu cpu=%u pid=%d\n", -+ printk(KERN_ERR "INFO: %s in %pA age=%lu cpu=%u pid=%d\n", - s, (void *)t->addr, jiffies - t->when, t->cpu, t->pid); +- pr_err("INFO: %s in %pS age=%lu cpu=%u pid=%d\n", ++ pr_err("INFO: %s in %pA age=%lu cpu=%u pid=%d\n", + s, (void *)t->addr, jiffies - t->when, t->cpu, t->pid); #ifdef CONFIG_STACKTRACE { -@@ -2666,6 +2666,14 @@ static __always_inline void slab_free(struct kmem_cache *s, +@@ -2673,6 +2673,14 @@ static __always_inline void slab_free(struct kmem_cache *s, slab_free_hook(s, x); @@ -96946,7 +102851,7 @@ index 2b1ce69..4a2193f 100644 redo: /* * Determine the currently cpus per cpu slab. -@@ -2733,7 +2741,7 @@ static int slub_min_objects; +@@ -2740,7 +2748,7 @@ static int slub_min_objects; * Merge control. If this is set then no merging of slab caches will occur. * (Could be removed. This was introduced to pacify the merge skeptics.) */ @@ -96955,7 +102860,7 @@ index 2b1ce69..4a2193f 100644 /* * Calculate the order of allocation given an slab object size. -@@ -3014,6 +3022,9 @@ static int calculate_sizes(struct kmem_cache *s, int forced_order) +@@ -3019,6 +3027,9 @@ static int calculate_sizes(struct kmem_cache *s, int forced_order) s->inuse = size; if (((flags & (SLAB_DESTROY_BY_RCU | SLAB_POISON)) || @@ -96965,7 +102870,7 @@ index 2b1ce69..4a2193f 100644 s->ctor)) { /* * Relocate free pointer after the object if it is not -@@ -3343,6 +3354,59 @@ void *__kmalloc_node(size_t size, gfp_t flags, int node) +@@ -3347,6 +3358,59 @@ void *__kmalloc_node(size_t size, gfp_t flags, int node) EXPORT_SYMBOL(__kmalloc_node); #endif @@ -97025,7 +102930,7 @@ index 2b1ce69..4a2193f 100644 size_t ksize(const void *object) { struct page *page; -@@ -3371,6 +3435,7 @@ void kfree(const void *x) +@@ -3375,6 +3439,7 @@ void kfree(const void *x) if (unlikely(ZERO_OR_NULL_PTR(x))) return; @@ -97033,7 +102938,7 @@ index 2b1ce69..4a2193f 100644 page = virt_to_head_page(x); if (unlikely(!PageSlab(page))) { BUG_ON(!PageCompound(page)); -@@ -3679,7 +3744,7 @@ static int slab_unmergeable(struct kmem_cache *s) +@@ -3680,7 +3745,7 @@ static int slab_unmergeable(struct kmem_cache *s) /* * We may have set a slab to be unmergeable during bootstrap. */ @@ -97042,7 +102947,7 @@ index 2b1ce69..4a2193f 100644 return 1; return 0; -@@ -3736,7 +3801,7 @@ __kmem_cache_alias(const char *name, size_t size, size_t align, +@@ -3737,7 +3802,7 @@ __kmem_cache_alias(const char *name, size_t size, size_t align, int i; struct kmem_cache *c; @@ -97051,7 +102956,7 @@ index 2b1ce69..4a2193f 100644 /* * Adjust the object sizes so that we clear -@@ -3755,7 +3820,7 @@ __kmem_cache_alias(const char *name, size_t size, size_t align, +@@ -3756,7 +3821,7 @@ __kmem_cache_alias(const char *name, size_t size, size_t align, } if (sysfs_slab_alias(s, name)) { @@ -97060,7 +102965,7 @@ index 2b1ce69..4a2193f 100644 s = NULL; } } -@@ -3872,7 +3937,7 @@ void *__kmalloc_node_track_caller(size_t size, gfp_t gfpflags, +@@ -3873,7 +3938,7 @@ void *__kmalloc_node_track_caller(size_t size, gfp_t gfpflags, } #endif @@ -97081,7 +102986,7 @@ index 2b1ce69..4a2193f 100644 else len += sprintf(buf + len, ""); -@@ -4261,12 +4330,12 @@ static void resiliency_test(void) +@@ -4258,12 +4327,12 @@ static void resiliency_test(void) validate_slab_cache(kmalloc_caches[9]); } #else @@ -97096,7 +103001,7 @@ index 2b1ce69..4a2193f 100644 enum slab_stat_type { SL_ALL, /* All slabs */ SL_PARTIAL, /* Only partially allocated slabs */ -@@ -4506,13 +4575,17 @@ static ssize_t ctor_show(struct kmem_cache *s, char *buf) +@@ -4503,13 +4572,17 @@ static ssize_t ctor_show(struct kmem_cache *s, char *buf) { if (!s->ctor) return 0; @@ -97115,7 +103020,7 @@ index 2b1ce69..4a2193f 100644 } SLAB_ATTR_RO(aliases); -@@ -4600,6 +4673,14 @@ static ssize_t cache_dma_show(struct kmem_cache *s, char *buf) +@@ -4597,6 +4670,14 @@ static ssize_t cache_dma_show(struct kmem_cache *s, char *buf) SLAB_ATTR_RO(cache_dma); #endif @@ -97130,7 +103035,7 @@ index 2b1ce69..4a2193f 100644 static ssize_t destroy_by_rcu_show(struct kmem_cache *s, char *buf) { return sprintf(buf, "%d\n", !!(s->flags & SLAB_DESTROY_BY_RCU)); -@@ -4934,6 +5015,9 @@ static struct attribute *slab_attrs[] = { +@@ -4931,6 +5012,9 @@ static struct attribute *slab_attrs[] = { #ifdef CONFIG_ZONE_DMA &cache_dma_attr.attr, #endif @@ -97140,7 +103045,7 @@ index 2b1ce69..4a2193f 100644 #ifdef CONFIG_NUMA &remote_node_defrag_ratio_attr.attr, #endif -@@ -5184,6 +5268,7 @@ static char *create_unique_id(struct kmem_cache *s) +@@ -5181,6 +5265,7 @@ static char *create_unique_id(struct kmem_cache *s) return name; } @@ -97148,7 +103053,7 @@ index 2b1ce69..4a2193f 100644 static int sysfs_slab_add(struct kmem_cache *s) { int err; -@@ -5257,6 +5342,7 @@ void sysfs_slab_remove(struct kmem_cache *s) +@@ -5254,6 +5339,7 @@ void sysfs_slab_remove(struct kmem_cache *s) kobject_del(&s->kobj); kobject_put(&s->kobj); } @@ -97156,7 +103061,7 @@ index 2b1ce69..4a2193f 100644 /* * Need to buffer aliases during bootup until sysfs becomes -@@ -5270,6 +5356,7 @@ struct saved_alias { +@@ -5267,6 +5353,7 @@ struct saved_alias { static struct saved_alias *alias_list; @@ -97164,7 +103069,7 @@ index 2b1ce69..4a2193f 100644 static int sysfs_slab_alias(struct kmem_cache *s, const char *name) { struct saved_alias *al; -@@ -5292,6 +5379,7 @@ static int sysfs_slab_alias(struct kmem_cache *s, const char *name) +@@ -5289,6 +5376,7 @@ static int sysfs_slab_alias(struct kmem_cache *s, const char *name) alias_list = al; return 0; } @@ -97208,7 +103113,7 @@ index d1b48b6..6e8590e 100644 } } diff --git a/mm/swap.c b/mm/swap.c -index 9ce43ba..43bdc4c 100644 +index 9e8e347..3c22e0f 100644 --- a/mm/swap.c +++ b/mm/swap.c @@ -31,6 +31,7 @@ @@ -97229,10 +103134,10 @@ index 9ce43ba..43bdc4c 100644 } diff --git a/mm/swapfile.c b/mm/swapfile.c -index 4a7f7e6..22cddf5 100644 +index 4c524f7..f7601f17 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c -@@ -66,7 +66,7 @@ static DEFINE_MUTEX(swapon_mutex); +@@ -84,7 +84,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 */ @@ -97241,7 +103146,7 @@ index 4a7f7e6..22cddf5 100644 static inline unsigned char swap_count(unsigned char ent) { -@@ -1959,7 +1959,7 @@ SYSCALL_DEFINE1(swapoff, const char __user *, specialfile) +@@ -1945,7 +1945,7 @@ SYSCALL_DEFINE1(swapoff, const char __user *, specialfile) spin_unlock(&swap_lock); err = 0; @@ -97250,7 +103155,7 @@ index 4a7f7e6..22cddf5 100644 wake_up_interruptible(&proc_poll_wait); out_dput: -@@ -1976,8 +1976,8 @@ static unsigned swaps_poll(struct file *file, poll_table *wait) +@@ -1962,8 +1962,8 @@ static unsigned swaps_poll(struct file *file, poll_table *wait) poll_wait(file, &proc_poll_wait, wait); @@ -97261,7 +103166,7 @@ index 4a7f7e6..22cddf5 100644 return POLLIN | POLLRDNORM | POLLERR | POLLPRI; } -@@ -2075,7 +2075,7 @@ static int swaps_open(struct inode *inode, struct file *file) +@@ -2061,7 +2061,7 @@ static int swaps_open(struct inode *inode, struct file *file) return ret; seq = file->private_data; @@ -97270,7 +103175,7 @@ index 4a7f7e6..22cddf5 100644 return 0; } -@@ -2534,7 +2534,7 @@ SYSCALL_DEFINE2(swapon, const char __user *, specialfile, int, swap_flags) +@@ -2521,7 +2521,7 @@ SYSCALL_DEFINE2(swapon, const char __user *, specialfile, int, swap_flags) (frontswap_map) ? "FS" : ""); mutex_unlock(&swapon_mutex); @@ -97280,10 +103185,10 @@ index 4a7f7e6..22cddf5 100644 if (S_ISREG(inode->i_mode)) diff --git a/mm/util.c b/mm/util.c -index d5ea733..e8953f9 100644 +index 33e9f44..be026b2 100644 --- a/mm/util.c +++ b/mm/util.c -@@ -299,6 +299,12 @@ done: +@@ -296,6 +296,12 @@ done: void arch_pick_mmap_layout(struct mm_struct *mm) { mm->mmap_base = TASK_UNMAPPED_BASE; @@ -97296,7 +103201,7 @@ index d5ea733..e8953f9 100644 mm->get_unmapped_area = arch_get_unmapped_area; } #endif -@@ -475,6 +481,9 @@ int get_cmdline(struct task_struct *task, char *buffer, int buflen) +@@ -472,6 +478,9 @@ int get_cmdline(struct task_struct *task, char *buffer, int buflen) if (!mm->arg_end) goto out_mm; /* Shh! No looking before we're done */ @@ -97307,7 +103212,7 @@ index d5ea733..e8953f9 100644 if (len > buflen) diff --git a/mm/vmalloc.c b/mm/vmalloc.c -index bf233b2..1dfa1bc 100644 +index f64632b..e8c52e7 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -40,6 +40,21 @@ struct vfree_deferred { @@ -97357,7 +103262,7 @@ index bf233b2..1dfa1bc 100644 + void *lowmem_stack = ACCESS_ONCE(x->lowmem_stack); + llnode = llist_next(llnode); + __vunmap(stack, 0); -+ free_memcg_kmem_pages((unsigned long)lowmem_stack, THREAD_SIZE_ORDER); ++ free_kmem_pages((unsigned long)lowmem_stack, THREAD_SIZE_ORDER); + } +} +#endif @@ -97489,7 +103394,7 @@ index bf233b2..1dfa1bc 100644 } /* Import existing vmlist entries. */ -@@ -1317,6 +1396,16 @@ static struct vm_struct *__get_vm_area_node(unsigned long size, +@@ -1318,6 +1397,16 @@ static struct vm_struct *__get_vm_area_node(unsigned long size, struct vm_struct *area; BUG_ON(in_interrupt()); @@ -97506,7 +103411,7 @@ index bf233b2..1dfa1bc 100644 if (flags & VM_IOREMAP) align = 1ul << clamp(fls(size), PAGE_SHIFT, IOREMAP_MAX_ORDER); -@@ -1522,6 +1611,23 @@ void vunmap(const void *addr) +@@ -1523,6 +1612,23 @@ void vunmap(const void *addr) } EXPORT_SYMBOL(vunmap); @@ -97522,7 +103427,7 @@ index bf233b2..1dfa1bc 100644 + schedule_work(&p->wq); + } else { + __vunmap(task->stack, 0); -+ free_memcg_kmem_pages((unsigned long)task->lowmem_stack, THREAD_SIZE_ORDER); ++ free_kmem_pages((unsigned long)task->lowmem_stack, THREAD_SIZE_ORDER); + } +} +#endif @@ -97530,7 +103435,7 @@ index bf233b2..1dfa1bc 100644 /** * vmap - map an array of pages into virtually contiguous space * @pages: array of page pointers -@@ -1542,6 +1648,11 @@ void *vmap(struct page **pages, unsigned int count, +@@ -1543,6 +1649,11 @@ void *vmap(struct page **pages, unsigned int count, if (count > totalram_pages) return NULL; @@ -97542,7 +103447,7 @@ index bf233b2..1dfa1bc 100644 area = get_vm_area_caller((count << PAGE_SHIFT), flags, __builtin_return_address(0)); if (!area) -@@ -1642,6 +1753,13 @@ void *__vmalloc_node_range(unsigned long size, unsigned long align, +@@ -1643,6 +1754,13 @@ void *__vmalloc_node_range(unsigned long size, unsigned long align, if (!size || (size >> PAGE_SHIFT) > totalram_pages) goto fail; @@ -97556,7 +103461,7 @@ index bf233b2..1dfa1bc 100644 area = __get_vm_area_node(size, align, VM_ALLOC | VM_UNINITIALIZED, start, end, node, gfp_mask, caller); if (!area) -@@ -1818,10 +1936,9 @@ EXPORT_SYMBOL(vzalloc_node); +@@ -1819,10 +1937,9 @@ EXPORT_SYMBOL(vzalloc_node); * For tight control over page level allocator and protection flags * use __vmalloc() instead. */ @@ -97568,7 +103473,7 @@ index bf233b2..1dfa1bc 100644 NUMA_NO_NODE, __builtin_return_address(0)); } -@@ -2128,6 +2245,8 @@ int remap_vmalloc_range_partial(struct vm_area_struct *vma, unsigned long uaddr, +@@ -2129,6 +2246,8 @@ int remap_vmalloc_range_partial(struct vm_area_struct *vma, unsigned long uaddr, { struct vm_struct *area; @@ -97577,7 +103482,7 @@ index bf233b2..1dfa1bc 100644 size = PAGE_ALIGN(size); if (!PAGE_ALIGNED(uaddr) || !PAGE_ALIGNED(kaddr)) -@@ -2610,7 +2729,11 @@ static int s_show(struct seq_file *m, void *p) +@@ -2611,7 +2730,11 @@ static int s_show(struct seq_file *m, void *p) v->addr, v->addr + v->size, v->size); if (v->caller) @@ -97590,7 +103495,7 @@ index bf233b2..1dfa1bc 100644 if (v->nr_pages) seq_printf(m, " pages=%d", v->nr_pages); diff --git a/mm/vmstat.c b/mm/vmstat.c -index 302dd07..3841f1c 100644 +index b37bd49..4d7b3da 100644 --- a/mm/vmstat.c +++ b/mm/vmstat.c @@ -20,6 +20,7 @@ @@ -97610,7 +103515,7 @@ index 302dd07..3841f1c 100644 EXPORT_SYMBOL(vm_stat); #ifdef CONFIG_SMP -@@ -423,7 +424,7 @@ static inline void fold_diff(int *diff) +@@ -425,7 +426,7 @@ static inline void fold_diff(int *diff) for (i = 0; i < NR_VM_ZONE_STAT_ITEMS; i++) if (diff[i]) @@ -97619,7 +103524,7 @@ index 302dd07..3841f1c 100644 } /* -@@ -455,7 +456,7 @@ static void refresh_cpu_vm_stats(void) +@@ -457,7 +458,7 @@ static void refresh_cpu_vm_stats(void) v = this_cpu_xchg(p->vm_stat_diff[i], 0); if (v) { @@ -97628,7 +103533,7 @@ index 302dd07..3841f1c 100644 global_diff[i] += v; #ifdef CONFIG_NUMA /* 3 seconds idle till flush */ -@@ -517,7 +518,7 @@ void cpu_vm_stats_fold(int cpu) +@@ -519,7 +520,7 @@ void cpu_vm_stats_fold(int cpu) v = p->vm_stat_diff[i]; p->vm_stat_diff[i] = 0; @@ -97637,7 +103542,7 @@ index 302dd07..3841f1c 100644 global_diff[i] += v; } } -@@ -537,8 +538,8 @@ void drain_zonestat(struct zone *zone, struct per_cpu_pageset *pset) +@@ -539,8 +540,8 @@ void drain_zonestat(struct zone *zone, struct per_cpu_pageset *pset) if (pset->vm_stat_diff[i]) { int v = pset->vm_stat_diff[i]; pset->vm_stat_diff[i] = 0; @@ -97648,7 +103553,7 @@ index 302dd07..3841f1c 100644 } } #endif -@@ -1156,10 +1157,22 @@ static void *vmstat_start(struct seq_file *m, loff_t *pos) +@@ -1162,10 +1163,22 @@ static void *vmstat_start(struct seq_file *m, loff_t *pos) stat_items_size += sizeof(struct vm_event_state); #endif @@ -97672,7 +103577,7 @@ index 302dd07..3841f1c 100644 for (i = 0; i < NR_VM_ZONE_STAT_ITEMS; i++) v[i] = global_page_state(i); v += NR_VM_ZONE_STAT_ITEMS; -@@ -1308,10 +1321,16 @@ static int __init setup_vmstat(void) +@@ -1314,10 +1327,16 @@ static int __init setup_vmstat(void) cpu_notifier_register_done(); #endif #ifdef CONFIG_PROC_FS @@ -97782,6 +103687,32 @@ index 80d08f6..de63fd1 100644 set_fs(oldfs); if (ret <= 0 && ret != -ERESTARTSYS && ret != -EAGAIN) +diff --git a/net/Kconfig b/net/Kconfig +index d92afe4..ab63892 100644 +--- a/net/Kconfig ++++ b/net/Kconfig +@@ -89,12 +89,8 @@ config NETWORK_SECMARK + to nfmark, but designated for security purposes. + If you are unsure how to answer this question, answer N. + +-config NET_PTP_CLASSIFY +- def_bool n +- + config NETWORK_PHY_TIMESTAMPING + bool "Timestamping in PHY devices" +- select NET_PTP_CLASSIFY + help + This allows timestamping of network packets by PHYs with + hardware timestamping capabilities. This option adds some +@@ -269,7 +265,7 @@ config BQL + config BPF_JIT + bool "enable BPF Just In Time compiler" + depends on HAVE_BPF_JIT +- depends on MODULES ++ depends on MODULES && X86 + ---help--- + Berkeley Packet Filter filtering capabilities are normally handled + by an interpreter. This option allows kernel to generate a native diff --git a/net/appletalk/atalk_proc.c b/net/appletalk/atalk_proc.c index af46bc4..f9adfcd 100644 --- a/net/appletalk/atalk_proc.c @@ -98008,10 +103939,10 @@ index f04224c..f326579 100644 if (ogm_packet->flags & BATADV_DIRECTLINK) has_directlink_flag = true; diff --git a/net/batman-adv/fragmentation.c b/net/batman-adv/fragmentation.c -index f14e54a..66f3e2e 100644 +index 022d18a..919daff 100644 --- a/net/batman-adv/fragmentation.c +++ b/net/batman-adv/fragmentation.c -@@ -446,7 +446,7 @@ bool batadv_frag_send_packet(struct sk_buff *skb, +@@ -450,7 +450,7 @@ bool batadv_frag_send_packet(struct sk_buff *skb, frag_header.packet_type = BATADV_UNICAST_FRAG; frag_header.version = BATADV_COMPAT_VERSION; frag_header.ttl = BATADV_TTL; @@ -98021,7 +103952,7 @@ index f14e54a..66f3e2e 100644 frag_header.no = 0; frag_header.total_size = htons(skb->len); diff --git a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c -index 744a59b..8fd037c 100644 +index cbd677f..b783347 100644 --- a/net/batman-adv/soft-interface.c +++ b/net/batman-adv/soft-interface.c @@ -296,7 +296,7 @@ send: @@ -98033,7 +103964,7 @@ index 744a59b..8fd037c 100644 bcast_packet->seqno = htonl(seqno); batadv_add_bcast_packet_to_list(bat_priv, skb, brd_delay); -@@ -729,7 +729,7 @@ static int batadv_softif_init_late(struct net_device *dev) +@@ -761,7 +761,7 @@ static int batadv_softif_init_late(struct net_device *dev) atomic_set(&bat_priv->batman_queue_left, BATADV_BATMAN_QUEUE_LEN); atomic_set(&bat_priv->mesh_state, BATADV_MESH_INACTIVE); @@ -98042,7 +103973,7 @@ index 744a59b..8fd037c 100644 atomic_set(&bat_priv->tt.vn, 0); atomic_set(&bat_priv->tt.local_changes, 0); atomic_set(&bat_priv->tt.ogm_append_cnt, 0); -@@ -743,7 +743,7 @@ static int batadv_softif_init_late(struct net_device *dev) +@@ -775,7 +775,7 @@ static int batadv_softif_init_late(struct net_device *dev) /* randomize initial seqno to avoid collision */ get_random_bytes(&random_seqno, sizeof(random_seqno)); @@ -98052,7 +103983,7 @@ index 744a59b..8fd037c 100644 bat_priv->primary_if = NULL; bat_priv->num_ifaces = 0; diff --git a/net/batman-adv/types.h b/net/batman-adv/types.h -index 34891a5..3cfece0 100644 +index 8854c05..ee5d5497 100644 --- a/net/batman-adv/types.h +++ b/net/batman-adv/types.h @@ -67,7 +67,7 @@ enum batadv_dhcp_recipient { @@ -98064,7 +103995,7 @@ index 34891a5..3cfece0 100644 }; /** -@@ -766,7 +766,7 @@ struct batadv_priv { +@@ -768,7 +768,7 @@ struct batadv_priv { atomic_t bonding; atomic_t fragmentation; atomic_t packet_size_max; @@ -98073,7 +104004,7 @@ index 34891a5..3cfece0 100644 #ifdef CONFIG_BATMAN_ADV_BLA atomic_t bridge_loop_avoidance; #endif -@@ -785,7 +785,7 @@ struct batadv_priv { +@@ -787,7 +787,7 @@ struct batadv_priv { #endif uint32_t isolation_mark; uint32_t isolation_mark_mask; @@ -98083,10 +104014,10 @@ index 34891a5..3cfece0 100644 atomic_t batman_queue_left; char num_ifaces; diff --git a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c -index b9a418e..2af862a 100644 +index 80d25c1..aa99a98 100644 --- a/net/bluetooth/hci_sock.c +++ b/net/bluetooth/hci_sock.c -@@ -1053,7 +1053,7 @@ static int hci_sock_setsockopt(struct socket *sock, int level, int optname, +@@ -1044,7 +1044,7 @@ static int hci_sock_setsockopt(struct socket *sock, int level, int optname, uf.event_mask[1] = *((u32 *) f->event_mask + 1); } @@ -98096,10 +104027,10 @@ index b9a418e..2af862a 100644 err = -EFAULT; break; diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c -index 1c97b7a..9171d69 100644 +index 323f23c..5e27529 100644 --- a/net/bluetooth/l2cap_core.c +++ b/net/bluetooth/l2cap_core.c -@@ -3542,8 +3542,10 @@ static int l2cap_parse_conf_rsp(struct l2cap_chan *chan, void *rsp, int len, +@@ -3548,8 +3548,10 @@ static int l2cap_parse_conf_rsp(struct l2cap_chan *chan, void *rsp, int len, break; case L2CAP_CONF_RFC: @@ -98186,7 +104117,7 @@ index c603a5e..7f08991 100644 err = -EFAULT; break; diff --git a/net/bluetooth/rfcomm/tty.c b/net/bluetooth/rfcomm/tty.c -index 403ec09..a21a003 100644 +index 8e385a0..a5bdd8e 100644 --- a/net/bluetooth/rfcomm/tty.c +++ b/net/bluetooth/rfcomm/tty.c @@ -752,7 +752,7 @@ static int rfcomm_tty_open(struct tty_struct *tty, struct file *filp) @@ -98282,10 +104213,10 @@ index 0f45522..dab651f 100644 list_del(&p->list); goto out; diff --git a/net/can/af_can.c b/net/can/af_can.c -index a27f8aa..67174a3 100644 +index ce82337..5d17b4d 100644 --- a/net/can/af_can.c +++ b/net/can/af_can.c -@@ -863,7 +863,7 @@ static const struct net_proto_family can_family_ops = { +@@ -884,7 +884,7 @@ static const struct net_proto_family can_family_ops = { }; /* notifier block for netdevice event */ @@ -98339,10 +104270,10 @@ index 050a211..bb9fe33 100644 if (__rtnl_register(PF_CAN, RTM_GETROUTE, NULL, cgw_dump_jobs, NULL)) { diff --git a/net/can/proc.c b/net/can/proc.c -index b543470..d2ddae2 100644 +index 1a19b98..df2b4ec 100644 --- a/net/can/proc.c +++ b/net/can/proc.c -@@ -468,7 +468,7 @@ static void can_remove_proc_readentry(const char *name) +@@ -514,7 +514,7 @@ static void can_remove_proc_readentry(const char *name) void can_init_proc(void) { /* create /proc/net/can directory */ @@ -98374,7 +104305,7 @@ index 1948d59..9e854d5 100644 switch (ss->ss_family) { diff --git a/net/compat.c b/net/compat.c -index 9a76eaf..5b8ccfd 100644 +index bc8aeef..f9c070c 100644 --- a/net/compat.c +++ b/net/compat.c @@ -73,9 +73,9 @@ int get_compat_msghdr(struct msghdr *kmsg, struct compat_msghdr __user *umsg) @@ -98392,15 +104323,15 @@ index 9a76eaf..5b8ccfd 100644 @@ -87,7 +87,7 @@ int verify_compat_iovec(struct msghdr *kern_msg, struct iovec *kern_iov, - if (kern_msg->msg_namelen) { + if (kern_msg->msg_name && kern_msg->msg_namelen) { if (mode == VERIFY_READ) { - int err = move_addr_to_kernel(kern_msg->msg_name, + int err = move_addr_to_kernel((void __force_user *)kern_msg->msg_name, kern_msg->msg_namelen, kern_address); if (err < 0) -@@ -99,7 +99,7 @@ int verify_compat_iovec(struct msghdr *kern_msg, struct iovec *kern_iov, - kern_msg->msg_name = NULL; +@@ -100,7 +100,7 @@ int verify_compat_iovec(struct msghdr *kern_msg, struct iovec *kern_iov, + } tot_len = iov_from_user_compat_to_kern(kern_iov, - (struct compat_iovec __user *)kern_msg->msg_iov, @@ -98408,7 +104339,7 @@ index 9a76eaf..5b8ccfd 100644 kern_msg->msg_iovlen); if (tot_len >= 0) kern_msg->msg_iov = kern_iov; -@@ -119,20 +119,20 @@ int verify_compat_iovec(struct msghdr *kern_msg, struct iovec *kern_iov, +@@ -120,20 +120,20 @@ int verify_compat_iovec(struct msghdr *kern_msg, struct iovec *kern_iov, #define CMSG_COMPAT_FIRSTHDR(msg) \ (((msg)->msg_controllen) >= sizeof(struct compat_cmsghdr) ? \ @@ -98432,7 +104363,7 @@ index 9a76eaf..5b8ccfd 100644 msg->msg_controllen) return NULL; return (struct compat_cmsghdr __user *)ptr; -@@ -222,7 +222,7 @@ Efault: +@@ -223,7 +223,7 @@ Efault: int put_cmsg_compat(struct msghdr *kmsg, int level, int type, int len, void *data) { @@ -98441,7 +104372,7 @@ index 9a76eaf..5b8ccfd 100644 struct compat_cmsghdr cmhdr; struct compat_timeval ctv; struct compat_timespec cts[3]; -@@ -278,7 +278,7 @@ int put_cmsg_compat(struct msghdr *kmsg, int level, int type, int len, void *dat +@@ -279,7 +279,7 @@ int put_cmsg_compat(struct msghdr *kmsg, int level, int type, int len, void *dat void scm_detach_fds_compat(struct msghdr *kmsg, struct scm_cookie *scm) { @@ -98450,7 +104381,7 @@ index 9a76eaf..5b8ccfd 100644 int fdmax = (kmsg->msg_controllen - sizeof(struct compat_cmsghdr)) / sizeof(int); int fdnum = scm->fp->count; struct file **fp = scm->fp->fp; -@@ -366,7 +366,7 @@ static int do_set_sock_timeout(struct socket *sock, int level, +@@ -367,7 +367,7 @@ static int do_set_sock_timeout(struct socket *sock, int level, return -EFAULT; old_fs = get_fs(); set_fs(KERNEL_DS); @@ -98459,7 +104390,7 @@ index 9a76eaf..5b8ccfd 100644 set_fs(old_fs); return err; -@@ -427,7 +427,7 @@ static int do_get_sock_timeout(struct socket *sock, int level, int optname, +@@ -428,7 +428,7 @@ static int do_get_sock_timeout(struct socket *sock, int level, int optname, len = sizeof(ktime); old_fs = get_fs(); set_fs(KERNEL_DS); @@ -98468,7 +104399,7 @@ index 9a76eaf..5b8ccfd 100644 set_fs(old_fs); if (!err) { -@@ -570,7 +570,7 @@ int compat_mc_setsockopt(struct sock *sock, int level, int optname, +@@ -571,7 +571,7 @@ int compat_mc_setsockopt(struct sock *sock, int level, int optname, case MCAST_JOIN_GROUP: case MCAST_LEAVE_GROUP: { @@ -98477,7 +104408,7 @@ index 9a76eaf..5b8ccfd 100644 struct group_req __user *kgr = compat_alloc_user_space(sizeof(struct group_req)); u32 interface; -@@ -591,7 +591,7 @@ int compat_mc_setsockopt(struct sock *sock, int level, int optname, +@@ -592,7 +592,7 @@ int compat_mc_setsockopt(struct sock *sock, int level, int optname, case MCAST_BLOCK_SOURCE: case MCAST_UNBLOCK_SOURCE: { @@ -98486,7 +104417,7 @@ index 9a76eaf..5b8ccfd 100644 struct group_source_req __user *kgsr = compat_alloc_user_space( sizeof(struct group_source_req)); u32 interface; -@@ -612,7 +612,7 @@ int compat_mc_setsockopt(struct sock *sock, int level, int optname, +@@ -613,7 +613,7 @@ int compat_mc_setsockopt(struct sock *sock, int level, int optname, } case MCAST_MSFILTER: { @@ -98495,7 +104426,7 @@ index 9a76eaf..5b8ccfd 100644 struct group_filter __user *kgf; u32 interface, fmode, numsrc; -@@ -650,7 +650,7 @@ int compat_mc_getsockopt(struct sock *sock, int level, int optname, +@@ -651,7 +651,7 @@ int compat_mc_getsockopt(struct sock *sock, int level, int optname, char __user *optval, int __user *optlen, int (*getsockopt)(struct sock *, int, int, char __user *, int __user *)) { @@ -98504,7 +104435,7 @@ index 9a76eaf..5b8ccfd 100644 struct group_filter __user *kgf; int __user *koptlen; u32 interface, fmode, numsrc; -@@ -803,7 +803,7 @@ COMPAT_SYSCALL_DEFINE2(socketcall, int, call, u32 __user *, args) +@@ -804,7 +804,7 @@ COMPAT_SYSCALL_DEFINE2(socketcall, int, call, u32 __user *, args) if (call < SYS_SOCKET || call > SYS_SENDMMSG) return -EINVAL; @@ -98513,8 +104444,19 @@ index 9a76eaf..5b8ccfd 100644 return -EFAULT; a0 = a[0]; a1 = a[1]; +diff --git a/net/core/Makefile b/net/core/Makefile +index 71093d9..a8a035b 100644 +--- a/net/core/Makefile ++++ b/net/core/Makefile +@@ -21,6 +21,5 @@ obj-$(CONFIG_FIB_RULES) += fib_rules.o + obj-$(CONFIG_TRACEPOINTS) += net-traces.o + obj-$(CONFIG_NET_DROP_MONITOR) += drop_monitor.o + obj-$(CONFIG_NETWORK_PHY_TIMESTAMPING) += timestamping.o +-obj-$(CONFIG_NET_PTP_CLASSIFY) += ptp_classifier.o + obj-$(CONFIG_CGROUP_NET_PRIO) += netprio_cgroup.o + obj-$(CONFIG_CGROUP_NET_CLASSID) += netclassid_cgroup.o diff --git a/net/core/datagram.c b/net/core/datagram.c -index a16ed7b..eb44d17 100644 +index 488dd1a..7179f0f 100644 --- a/net/core/datagram.c +++ b/net/core/datagram.c @@ -301,7 +301,7 @@ int skb_kill_datagram(struct sock *sk, struct sk_buff *skb, unsigned int flags) @@ -98527,10 +104469,10 @@ index a16ed7b..eb44d17 100644 return err; diff --git a/net/core/dev.c b/net/core/dev.c -index a30bef1..51d3e33 100644 +index 367a586..ef2fe17 100644 --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -1683,14 +1683,14 @@ int dev_forward_skb(struct net_device *dev, struct sk_buff *skb) +@@ -1672,14 +1672,14 @@ 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)) { @@ -98547,7 +104489,7 @@ index a30bef1..51d3e33 100644 kfree_skb(skb); return NET_RX_DROP; } -@@ -2463,7 +2463,7 @@ static int illegal_highdma(struct net_device *dev, struct sk_buff *skb) +@@ -2476,7 +2476,7 @@ static int illegal_highdma(struct net_device *dev, struct sk_buff *skb) struct dev_gso_cb { void (*destructor)(struct sk_buff *skb); @@ -98556,7 +104498,7 @@ index a30bef1..51d3e33 100644 #define DEV_GSO_CB(skb) ((struct dev_gso_cb *)(skb)->cb) -@@ -2893,7 +2893,7 @@ recursion_alert: +@@ -2932,7 +2932,7 @@ recursion_alert: rc = -ENETDOWN; rcu_read_unlock_bh(); @@ -98565,7 +104507,7 @@ index a30bef1..51d3e33 100644 kfree_skb(skb); return rc; out: -@@ -3237,7 +3237,7 @@ enqueue: +@@ -3276,7 +3276,7 @@ enqueue: local_irq_restore(flags); @@ -98574,7 +104516,7 @@ index a30bef1..51d3e33 100644 kfree_skb(skb); return NET_RX_DROP; } -@@ -3314,7 +3314,7 @@ int netif_rx_ni(struct sk_buff *skb) +@@ -3353,7 +3353,7 @@ int netif_rx_ni(struct sk_buff *skb) } EXPORT_SYMBOL(netif_rx_ni); @@ -98583,7 +104525,7 @@ index a30bef1..51d3e33 100644 { struct softnet_data *sd = &__get_cpu_var(softnet_data); -@@ -3647,7 +3647,7 @@ ncls: +@@ -3686,7 +3686,7 @@ ncls: ret = pt_prev->func(skb, skb->dev, pt_prev, orig_dev); } else { drop: @@ -98592,7 +104534,7 @@ index a30bef1..51d3e33 100644 kfree_skb(skb); /* Jamal, now you will not able to escape explaining * me how you were going to use this. :-) -@@ -4366,7 +4366,7 @@ void netif_napi_del(struct napi_struct *napi) +@@ -4406,7 +4406,7 @@ void netif_napi_del(struct napi_struct *napi) } EXPORT_SYMBOL(netif_napi_del); @@ -98601,7 +104543,7 @@ index a30bef1..51d3e33 100644 { struct softnet_data *sd = &__get_cpu_var(softnet_data); unsigned long time_limit = jiffies + 2; -@@ -6366,8 +6366,8 @@ struct rtnl_link_stats64 *dev_get_stats(struct net_device *dev, +@@ -6403,8 +6403,8 @@ struct rtnl_link_stats64 *dev_get_stats(struct net_device *dev, } else { netdev_stats_to_stats64(storage, &dev->stats); } @@ -98630,75 +104572,2119 @@ index cf999e0..c59a975 100644 } } EXPORT_SYMBOL(dev_load); -diff --git a/net/core/dst.c b/net/core/dst.c -index 80d6286..a028409 100644 ---- a/net/core/dst.c -+++ b/net/core/dst.c -@@ -269,6 +269,15 @@ again: +diff --git a/net/core/filter.c b/net/core/filter.c +index 1dbf646..0f95703 100644 +--- a/net/core/filter.c ++++ b/net/core/filter.c +@@ -1,16 +1,11 @@ + /* + * Linux Socket Filter - Kernel level socket filtering + * +- * Based on the design of the Berkeley Packet Filter. The new +- * internal format has been designed by PLUMgrid: ++ * Author: ++ * Jay Schulist + * +- * Copyright (c) 2011 - 2014 PLUMgrid, http://plumgrid.com +- * +- * Authors: +- * +- * Jay Schulist +- * Alexei Starovoitov +- * Daniel Borkmann ++ * Based on the design of: ++ * - The Berkeley Packet Filter + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License +@@ -45,27 +40,6 @@ + #include + #include + +-/* Registers */ +-#define BPF_R0 regs[BPF_REG_0] +-#define BPF_R1 regs[BPF_REG_1] +-#define BPF_R2 regs[BPF_REG_2] +-#define BPF_R3 regs[BPF_REG_3] +-#define BPF_R4 regs[BPF_REG_4] +-#define BPF_R5 regs[BPF_REG_5] +-#define BPF_R6 regs[BPF_REG_6] +-#define BPF_R7 regs[BPF_REG_7] +-#define BPF_R8 regs[BPF_REG_8] +-#define BPF_R9 regs[BPF_REG_9] +-#define BPF_R10 regs[BPF_REG_10] +- +-/* Named registers */ +-#define DST regs[insn->dst_reg] +-#define SRC regs[insn->src_reg] +-#define FP regs[BPF_REG_FP] +-#define ARG1 regs[BPF_REG_ARG1] +-#define CTX regs[BPF_REG_CTX] +-#define IMM insn->imm +- + /* No hurry in this branch + * + * Exported for the bpf jit load helper. +@@ -78,9 +52,9 @@ void *bpf_internal_load_pointer_neg_helper(const struct sk_buff *skb, int k, uns + ptr = skb_network_header(skb) + k - SKF_NET_OFF; + else if (k >= SKF_LL_OFF) + ptr = skb_mac_header(skb) + k - SKF_LL_OFF; ++ + if (ptr >= skb->head && ptr + size <= skb_tail_pointer(skb)) + return ptr; +- + return NULL; } - EXPORT_SYMBOL(dst_destroy); -+static void dst_destroy_rcu(struct rcu_head *head) -+{ -+ struct dst_entry *dst = container_of(head, struct dst_entry, rcu_head); -+ -+ dst = dst_destroy(dst); -+ if (dst) -+ __dst_free(dst); -+} -+ - void dst_release(struct dst_entry *dst) +@@ -89,7 +63,6 @@ static inline void *load_pointer(const struct sk_buff *skb, int k, { - if (dst) { -@@ -276,11 +285,8 @@ void dst_release(struct dst_entry *dst) + if (k >= 0) + return skb_header_pointer(skb, k, size, buffer); +- + return bpf_internal_load_pointer_neg_helper(skb, k, size); + } - newrefcnt = atomic_dec_return(&dst->__refcnt); - WARN_ON(newrefcnt < 0); -- if (unlikely(dst->flags & DST_NOCACHE) && !newrefcnt) { -- dst = dst_destroy(dst); -- if (dst) -- __dst_free(dst); -- } -+ if (unlikely(dst->flags & DST_NOCACHE) && !newrefcnt) -+ call_rcu(&dst->rcu_head, dst_destroy_rcu); - } +@@ -135,960 +108,309 @@ int sk_filter(struct sock *sk, struct sk_buff *skb) } - EXPORT_SYMBOL(dst_release); -diff --git a/net/core/filter.c b/net/core/filter.c -index 4aec7b9..5cf605c 100644 ---- a/net/core/filter.c -+++ b/net/core/filter.c -@@ -1121,7 +1121,11 @@ do_pass: - break; + EXPORT_SYMBOL(sk_filter); + +-/* Base function for offset calculation. Needs to go into .text section, +- * therefore keeping it non-static as well; will also be used by JITs +- * anyway later on, so do not let the compiler omit it. +- */ +-noinline u64 __bpf_call_base(u64 r1, u64 r2, u64 r3, u64 r4, u64 r5) +-{ +- return 0; +-} +- + /** +- * __sk_run_filter - run a filter on a given context +- * @ctx: buffer to run the filter on +- * @insn: filter to apply ++ * sk_run_filter - run a filter on a socket ++ * @skb: buffer to run the filter on ++ * @fentry: filter to apply + * +- * Decode and apply filter instructions to the skb->data. Return length to +- * keep, 0 for none. @ctx is the data we are operating on, @insn is the +- * array of filter instructions. ++ * Decode and apply filter instructions to the skb->data. ++ * Return length to keep, 0 for none. @skb is the data we are ++ * filtering, @filter is the array of filter instructions. ++ * Because all jumps are guaranteed to be before last instruction, ++ * and last instruction guaranteed to be a RET, we dont need to check ++ * flen. (We used to pass to this function the length of filter) + */ +-static unsigned int __sk_run_filter(void *ctx, const struct sock_filter_int *insn) ++unsigned int sk_run_filter(const struct sk_buff *skb, ++ const struct sock_filter *fentry) + { +- u64 stack[MAX_BPF_STACK / sizeof(u64)]; +- u64 regs[MAX_BPF_REG], tmp; +- static const void *jumptable[256] = { +- [0 ... 255] = &&default_label, +- /* Now overwrite non-defaults ... */ +- /* 32 bit ALU operations */ +- [BPF_ALU | BPF_ADD | BPF_X] = &&ALU_ADD_X, +- [BPF_ALU | BPF_ADD | BPF_K] = &&ALU_ADD_K, +- [BPF_ALU | BPF_SUB | BPF_X] = &&ALU_SUB_X, +- [BPF_ALU | BPF_SUB | BPF_K] = &&ALU_SUB_K, +- [BPF_ALU | BPF_AND | BPF_X] = &&ALU_AND_X, +- [BPF_ALU | BPF_AND | BPF_K] = &&ALU_AND_K, +- [BPF_ALU | BPF_OR | BPF_X] = &&ALU_OR_X, +- [BPF_ALU | BPF_OR | BPF_K] = &&ALU_OR_K, +- [BPF_ALU | BPF_LSH | BPF_X] = &&ALU_LSH_X, +- [BPF_ALU | BPF_LSH | BPF_K] = &&ALU_LSH_K, +- [BPF_ALU | BPF_RSH | BPF_X] = &&ALU_RSH_X, +- [BPF_ALU | BPF_RSH | BPF_K] = &&ALU_RSH_K, +- [BPF_ALU | BPF_XOR | BPF_X] = &&ALU_XOR_X, +- [BPF_ALU | BPF_XOR | BPF_K] = &&ALU_XOR_K, +- [BPF_ALU | BPF_MUL | BPF_X] = &&ALU_MUL_X, +- [BPF_ALU | BPF_MUL | BPF_K] = &&ALU_MUL_K, +- [BPF_ALU | BPF_MOV | BPF_X] = &&ALU_MOV_X, +- [BPF_ALU | BPF_MOV | BPF_K] = &&ALU_MOV_K, +- [BPF_ALU | BPF_DIV | BPF_X] = &&ALU_DIV_X, +- [BPF_ALU | BPF_DIV | BPF_K] = &&ALU_DIV_K, +- [BPF_ALU | BPF_MOD | BPF_X] = &&ALU_MOD_X, +- [BPF_ALU | BPF_MOD | BPF_K] = &&ALU_MOD_K, +- [BPF_ALU | BPF_NEG] = &&ALU_NEG, +- [BPF_ALU | BPF_END | BPF_TO_BE] = &&ALU_END_TO_BE, +- [BPF_ALU | BPF_END | BPF_TO_LE] = &&ALU_END_TO_LE, +- /* 64 bit ALU operations */ +- [BPF_ALU64 | BPF_ADD | BPF_X] = &&ALU64_ADD_X, +- [BPF_ALU64 | BPF_ADD | BPF_K] = &&ALU64_ADD_K, +- [BPF_ALU64 | BPF_SUB | BPF_X] = &&ALU64_SUB_X, +- [BPF_ALU64 | BPF_SUB | BPF_K] = &&ALU64_SUB_K, +- [BPF_ALU64 | BPF_AND | BPF_X] = &&ALU64_AND_X, +- [BPF_ALU64 | BPF_AND | BPF_K] = &&ALU64_AND_K, +- [BPF_ALU64 | BPF_OR | BPF_X] = &&ALU64_OR_X, +- [BPF_ALU64 | BPF_OR | BPF_K] = &&ALU64_OR_K, +- [BPF_ALU64 | BPF_LSH | BPF_X] = &&ALU64_LSH_X, +- [BPF_ALU64 | BPF_LSH | BPF_K] = &&ALU64_LSH_K, +- [BPF_ALU64 | BPF_RSH | BPF_X] = &&ALU64_RSH_X, +- [BPF_ALU64 | BPF_RSH | BPF_K] = &&ALU64_RSH_K, +- [BPF_ALU64 | BPF_XOR | BPF_X] = &&ALU64_XOR_X, +- [BPF_ALU64 | BPF_XOR | BPF_K] = &&ALU64_XOR_K, +- [BPF_ALU64 | BPF_MUL | BPF_X] = &&ALU64_MUL_X, +- [BPF_ALU64 | BPF_MUL | BPF_K] = &&ALU64_MUL_K, +- [BPF_ALU64 | BPF_MOV | BPF_X] = &&ALU64_MOV_X, +- [BPF_ALU64 | BPF_MOV | BPF_K] = &&ALU64_MOV_K, +- [BPF_ALU64 | BPF_ARSH | BPF_X] = &&ALU64_ARSH_X, +- [BPF_ALU64 | BPF_ARSH | BPF_K] = &&ALU64_ARSH_K, +- [BPF_ALU64 | BPF_DIV | BPF_X] = &&ALU64_DIV_X, +- [BPF_ALU64 | BPF_DIV | BPF_K] = &&ALU64_DIV_K, +- [BPF_ALU64 | BPF_MOD | BPF_X] = &&ALU64_MOD_X, +- [BPF_ALU64 | BPF_MOD | BPF_K] = &&ALU64_MOD_K, +- [BPF_ALU64 | BPF_NEG] = &&ALU64_NEG, +- /* Call instruction */ +- [BPF_JMP | BPF_CALL] = &&JMP_CALL, +- /* Jumps */ +- [BPF_JMP | BPF_JA] = &&JMP_JA, +- [BPF_JMP | BPF_JEQ | BPF_X] = &&JMP_JEQ_X, +- [BPF_JMP | BPF_JEQ | BPF_K] = &&JMP_JEQ_K, +- [BPF_JMP | BPF_JNE | BPF_X] = &&JMP_JNE_X, +- [BPF_JMP | BPF_JNE | BPF_K] = &&JMP_JNE_K, +- [BPF_JMP | BPF_JGT | BPF_X] = &&JMP_JGT_X, +- [BPF_JMP | BPF_JGT | BPF_K] = &&JMP_JGT_K, +- [BPF_JMP | BPF_JGE | BPF_X] = &&JMP_JGE_X, +- [BPF_JMP | BPF_JGE | BPF_K] = &&JMP_JGE_K, +- [BPF_JMP | BPF_JSGT | BPF_X] = &&JMP_JSGT_X, +- [BPF_JMP | BPF_JSGT | BPF_K] = &&JMP_JSGT_K, +- [BPF_JMP | BPF_JSGE | BPF_X] = &&JMP_JSGE_X, +- [BPF_JMP | BPF_JSGE | BPF_K] = &&JMP_JSGE_K, +- [BPF_JMP | BPF_JSET | BPF_X] = &&JMP_JSET_X, +- [BPF_JMP | BPF_JSET | BPF_K] = &&JMP_JSET_K, +- /* Program return */ +- [BPF_JMP | BPF_EXIT] = &&JMP_EXIT, +- /* Store instructions */ +- [BPF_STX | BPF_MEM | BPF_B] = &&STX_MEM_B, +- [BPF_STX | BPF_MEM | BPF_H] = &&STX_MEM_H, +- [BPF_STX | BPF_MEM | BPF_W] = &&STX_MEM_W, +- [BPF_STX | BPF_MEM | BPF_DW] = &&STX_MEM_DW, +- [BPF_STX | BPF_XADD | BPF_W] = &&STX_XADD_W, +- [BPF_STX | BPF_XADD | BPF_DW] = &&STX_XADD_DW, +- [BPF_ST | BPF_MEM | BPF_B] = &&ST_MEM_B, +- [BPF_ST | BPF_MEM | BPF_H] = &&ST_MEM_H, +- [BPF_ST | BPF_MEM | BPF_W] = &&ST_MEM_W, +- [BPF_ST | BPF_MEM | BPF_DW] = &&ST_MEM_DW, +- /* Load instructions */ +- [BPF_LDX | BPF_MEM | BPF_B] = &&LDX_MEM_B, +- [BPF_LDX | BPF_MEM | BPF_H] = &&LDX_MEM_H, +- [BPF_LDX | BPF_MEM | BPF_W] = &&LDX_MEM_W, +- [BPF_LDX | BPF_MEM | BPF_DW] = &&LDX_MEM_DW, +- [BPF_LD | BPF_ABS | BPF_W] = &&LD_ABS_W, +- [BPF_LD | BPF_ABS | BPF_H] = &&LD_ABS_H, +- [BPF_LD | BPF_ABS | BPF_B] = &&LD_ABS_B, +- [BPF_LD | BPF_IND | BPF_W] = &&LD_IND_W, +- [BPF_LD | BPF_IND | BPF_H] = &&LD_IND_H, +- [BPF_LD | BPF_IND | BPF_B] = &&LD_IND_B, +- }; + void *ptr; +- int off; +- +-#define CONT ({ insn++; goto select_insn; }) +-#define CONT_JMP ({ insn++; goto select_insn; }) +- +- FP = (u64) (unsigned long) &stack[ARRAY_SIZE(stack)]; +- ARG1 = (u64) (unsigned long) ctx; +- +- /* Registers used in classic BPF programs need to be reset first. */ +- regs[BPF_REG_A] = 0; +- regs[BPF_REG_X] = 0; +- +-select_insn: +- goto *jumptable[insn->code]; +- +- /* ALU */ +-#define ALU(OPCODE, OP) \ +- ALU64_##OPCODE##_X: \ +- DST = DST OP SRC; \ +- CONT; \ +- ALU_##OPCODE##_X: \ +- DST = (u32) DST OP (u32) SRC; \ +- CONT; \ +- ALU64_##OPCODE##_K: \ +- DST = DST OP IMM; \ +- CONT; \ +- ALU_##OPCODE##_K: \ +- DST = (u32) DST OP (u32) IMM; \ +- CONT; +- +- ALU(ADD, +) +- ALU(SUB, -) +- ALU(AND, &) +- ALU(OR, |) +- ALU(LSH, <<) +- ALU(RSH, >>) +- ALU(XOR, ^) +- ALU(MUL, *) +-#undef ALU +- ALU_NEG: +- DST = (u32) -DST; +- CONT; +- ALU64_NEG: +- DST = -DST; +- CONT; +- ALU_MOV_X: +- DST = (u32) SRC; +- CONT; +- ALU_MOV_K: +- DST = (u32) IMM; +- CONT; +- ALU64_MOV_X: +- DST = SRC; +- CONT; +- ALU64_MOV_K: +- DST = IMM; +- CONT; +- ALU64_ARSH_X: +- (*(s64 *) &DST) >>= SRC; +- CONT; +- ALU64_ARSH_K: +- (*(s64 *) &DST) >>= IMM; +- CONT; +- ALU64_MOD_X: +- if (unlikely(SRC == 0)) +- return 0; +- tmp = DST; +- DST = do_div(tmp, SRC); +- CONT; +- ALU_MOD_X: +- if (unlikely(SRC == 0)) +- return 0; +- tmp = (u32) DST; +- DST = do_div(tmp, (u32) SRC); +- CONT; +- ALU64_MOD_K: +- tmp = DST; +- DST = do_div(tmp, IMM); +- CONT; +- ALU_MOD_K: +- tmp = (u32) DST; +- DST = do_div(tmp, (u32) IMM); +- CONT; +- ALU64_DIV_X: +- if (unlikely(SRC == 0)) +- return 0; +- do_div(DST, SRC); +- CONT; +- ALU_DIV_X: +- if (unlikely(SRC == 0)) +- return 0; +- tmp = (u32) DST; +- do_div(tmp, (u32) SRC); +- DST = (u32) tmp; +- CONT; +- ALU64_DIV_K: +- do_div(DST, IMM); +- CONT; +- ALU_DIV_K: +- tmp = (u32) DST; +- do_div(tmp, (u32) IMM); +- DST = (u32) tmp; +- CONT; +- ALU_END_TO_BE: +- switch (IMM) { +- case 16: +- DST = (__force u16) cpu_to_be16(DST); +- break; +- case 32: +- DST = (__force u32) cpu_to_be32(DST); +- break; +- case 64: +- DST = (__force u64) cpu_to_be64(DST); +- break; +- } +- CONT; +- ALU_END_TO_LE: +- switch (IMM) { +- case 16: +- DST = (__force u16) cpu_to_le16(DST); +- break; +- case 32: +- DST = (__force u32) cpu_to_le32(DST); +- break; +- case 64: +- DST = (__force u64) cpu_to_le64(DST); +- break; +- } +- CONT; +- +- /* CALL */ +- JMP_CALL: +- /* Function call scratches BPF_R1-BPF_R5 registers, +- * preserves BPF_R6-BPF_R9, and stores return value +- * into BPF_R0. +- */ +- BPF_R0 = (__bpf_call_base + insn->imm)(BPF_R1, BPF_R2, BPF_R3, +- BPF_R4, BPF_R5); +- CONT; +- +- /* JMP */ +- JMP_JA: +- insn += insn->off; +- CONT; +- JMP_JEQ_X: +- if (DST == SRC) { +- insn += insn->off; +- CONT_JMP; +- } +- CONT; +- JMP_JEQ_K: +- if (DST == IMM) { +- insn += insn->off; +- CONT_JMP; +- } +- CONT; +- JMP_JNE_X: +- if (DST != SRC) { +- insn += insn->off; +- CONT_JMP; +- } +- CONT; +- JMP_JNE_K: +- if (DST != IMM) { +- insn += insn->off; +- CONT_JMP; +- } +- CONT; +- JMP_JGT_X: +- if (DST > SRC) { +- insn += insn->off; +- CONT_JMP; +- } +- CONT; +- JMP_JGT_K: +- if (DST > IMM) { +- insn += insn->off; +- CONT_JMP; +- } +- CONT; +- JMP_JGE_X: +- if (DST >= SRC) { +- insn += insn->off; +- CONT_JMP; +- } +- CONT; +- JMP_JGE_K: +- if (DST >= IMM) { +- insn += insn->off; +- CONT_JMP; +- } +- CONT; +- JMP_JSGT_X: +- if (((s64) DST) > ((s64) SRC)) { +- insn += insn->off; +- CONT_JMP; +- } +- CONT; +- JMP_JSGT_K: +- if (((s64) DST) > ((s64) IMM)) { +- insn += insn->off; +- CONT_JMP; +- } +- CONT; +- JMP_JSGE_X: +- if (((s64) DST) >= ((s64) SRC)) { +- insn += insn->off; +- CONT_JMP; +- } +- CONT; +- JMP_JSGE_K: +- if (((s64) DST) >= ((s64) IMM)) { +- insn += insn->off; +- CONT_JMP; +- } +- CONT; +- JMP_JSET_X: +- if (DST & SRC) { +- insn += insn->off; +- CONT_JMP; +- } +- CONT; +- JMP_JSET_K: +- if (DST & IMM) { +- insn += insn->off; +- CONT_JMP; +- } +- CONT; +- JMP_EXIT: +- return BPF_R0; +- +- /* STX and ST and LDX*/ +-#define LDST(SIZEOP, SIZE) \ +- STX_MEM_##SIZEOP: \ +- *(SIZE *)(unsigned long) (DST + insn->off) = SRC; \ +- CONT; \ +- ST_MEM_##SIZEOP: \ +- *(SIZE *)(unsigned long) (DST + insn->off) = IMM; \ +- CONT; \ +- LDX_MEM_##SIZEOP: \ +- DST = *(SIZE *)(unsigned long) (SRC + insn->off); \ +- CONT; +- +- LDST(B, u8) +- LDST(H, u16) +- LDST(W, u32) +- LDST(DW, u64) +-#undef LDST +- STX_XADD_W: /* lock xadd *(u32 *)(dst_reg + off16) += src_reg */ +- atomic_add((u32) SRC, (atomic_t *)(unsigned long) +- (DST + insn->off)); +- CONT; +- STX_XADD_DW: /* lock xadd *(u64 *)(dst_reg + off16) += src_reg */ +- atomic64_add((u64) SRC, (atomic64_t *)(unsigned long) +- (DST + insn->off)); +- CONT; +- LD_ABS_W: /* BPF_R0 = ntohl(*(u32 *) (skb->data + imm32)) */ +- off = IMM; +-load_word: +- /* BPF_LD + BPD_ABS and BPF_LD + BPF_IND insns are +- * only appearing in the programs where ctx == +- * skb. All programs keep 'ctx' in regs[BPF_REG_CTX] +- * == BPF_R6, sk_convert_filter() saves it in BPF_R6, +- * internal BPF verifier will check that BPF_R6 == +- * ctx. +- * +- * BPF_ABS and BPF_IND are wrappers of function calls, +- * so they scratch BPF_R1-BPF_R5 registers, preserve +- * BPF_R6-BPF_R9, and store return value into BPF_R0. +- * +- * Implicit input: +- * ctx == skb == BPF_R6 == CTX +- * +- * Explicit input: +- * SRC == any register +- * IMM == 32-bit immediate +- * +- * Output: +- * BPF_R0 - 8/16/32-bit skb data converted to cpu endianness +- */ +- +- ptr = load_pointer((struct sk_buff *) (unsigned long) CTX, off, 4, &tmp); +- if (likely(ptr != NULL)) { +- BPF_R0 = get_unaligned_be32(ptr); +- CONT; +- } +- +- return 0; +- LD_ABS_H: /* BPF_R0 = ntohs(*(u16 *) (skb->data + imm32)) */ +- off = IMM; +-load_half: +- ptr = load_pointer((struct sk_buff *) (unsigned long) CTX, off, 2, &tmp); +- if (likely(ptr != NULL)) { +- BPF_R0 = get_unaligned_be16(ptr); +- CONT; +- } +- +- return 0; +- LD_ABS_B: /* BPF_R0 = *(u8 *) (skb->data + imm32) */ +- off = IMM; +-load_byte: +- ptr = load_pointer((struct sk_buff *) (unsigned long) CTX, off, 1, &tmp); +- if (likely(ptr != NULL)) { +- BPF_R0 = *(u8 *)ptr; +- CONT; +- } +- +- return 0; +- LD_IND_W: /* BPF_R0 = ntohl(*(u32 *) (skb->data + src_reg + imm32)) */ +- off = IMM + SRC; +- goto load_word; +- LD_IND_H: /* BPF_R0 = ntohs(*(u16 *) (skb->data + src_reg + imm32)) */ +- off = IMM + SRC; +- goto load_half; +- LD_IND_B: /* BPF_R0 = *(u8 *) (skb->data + src_reg + imm32) */ +- off = IMM + SRC; +- goto load_byte; +- +- default_label: +- /* If we ever reach this, we have a bug somewhere. */ +- WARN_RATELIMIT(1, "unknown opcode %02x\n", insn->code); +- return 0; +-} +- +-/* Helper to find the offset of pkt_type in sk_buff structure. We want +- * to make sure its still a 3bit field starting at a byte boundary; +- * taken from arch/x86/net/bpf_jit_comp.c. +- */ +-#ifdef __BIG_ENDIAN_BITFIELD +-#define PKT_TYPE_MAX (7 << 5) ++ u32 A = 0; /* Accumulator */ ++ u32 X = 0; /* Index Register */ ++ u32 mem[BPF_MEMWORDS] = {}; /* Scratch Memory Store */ ++ u32 tmp; ++ int k; ++ ++ /* ++ * Process array of filter instructions. ++ */ ++ for (;; fentry++) { ++#if defined(CONFIG_X86_32) ++#define K (fentry->k) + #else +-#define PKT_TYPE_MAX 7 ++ const u32 K = fentry->k; + #endif +-static unsigned int pkt_type_offset(void) +-{ +- struct sk_buff skb_probe = { .pkt_type = ~0, }; +- u8 *ct = (u8 *) &skb_probe; +- unsigned int off; +- for (off = 0; off < sizeof(struct sk_buff); off++) { +- if (ct[off] == PKT_TYPE_MAX) +- return off; +- } +- +- pr_err_once("Please fix %s, as pkt_type couldn't be found!\n", __func__); +- return -1; +-} +- +-static u64 __skb_get_pay_offset(u64 ctx, u64 a, u64 x, u64 r4, u64 r5) +-{ +- return __skb_get_poff((struct sk_buff *)(unsigned long) ctx); +-} +- +-static u64 __skb_get_nlattr(u64 ctx, u64 a, u64 x, u64 r4, u64 r5) +-{ +- struct sk_buff *skb = (struct sk_buff *)(unsigned long) ctx; +- struct nlattr *nla; +- +- if (skb_is_nonlinear(skb)) +- return 0; +- +- if (skb->len < sizeof(struct nlattr)) +- return 0; +- +- if (a > skb->len - sizeof(struct nlattr)) +- return 0; +- +- nla = nla_find((struct nlattr *) &skb->data[a], skb->len - a, x); +- if (nla) +- return (void *) nla - (void *) skb->data; +- +- return 0; +-} +- +-static u64 __skb_get_nlattr_nest(u64 ctx, u64 a, u64 x, u64 r4, u64 r5) +-{ +- struct sk_buff *skb = (struct sk_buff *)(unsigned long) ctx; +- struct nlattr *nla; +- +- if (skb_is_nonlinear(skb)) +- return 0; +- +- if (skb->len < sizeof(struct nlattr)) +- return 0; +- +- if (a > skb->len - sizeof(struct nlattr)) +- return 0; +- +- nla = (struct nlattr *) &skb->data[a]; +- if (nla->nla_len > skb->len - a) +- return 0; +- +- nla = nla_find_nested(nla, x); +- if (nla) +- return (void *) nla - (void *) skb->data; +- +- return 0; +-} +- +-static u64 __get_raw_cpu_id(u64 ctx, u64 a, u64 x, u64 r4, u64 r5) +-{ +- return raw_smp_processor_id(); +-} +- +-/* note that this only generates 32-bit random numbers */ +-static u64 __get_random_u32(u64 ctx, u64 a, u64 x, u64 r4, u64 r5) +-{ +- return prandom_u32(); +-} +- +-static bool convert_bpf_extensions(struct sock_filter *fp, +- struct sock_filter_int **insnp) +-{ +- struct sock_filter_int *insn = *insnp; +- +- switch (fp->k) { +- case SKF_AD_OFF + SKF_AD_PROTOCOL: +- BUILD_BUG_ON(FIELD_SIZEOF(struct sk_buff, protocol) != 2); +- +- /* A = *(u16 *) (CTX + offsetof(protocol)) */ +- *insn++ = BPF_LDX_MEM(BPF_H, BPF_REG_A, BPF_REG_CTX, +- offsetof(struct sk_buff, protocol)); +- /* A = ntohs(A) [emitting a nop or swap16] */ +- *insn = BPF_ENDIAN(BPF_FROM_BE, BPF_REG_A, 16); +- break; +- +- case SKF_AD_OFF + SKF_AD_PKTTYPE: +- *insn = BPF_LDX_MEM(BPF_B, BPF_REG_A, BPF_REG_CTX, +- pkt_type_offset()); +- if (insn->off < 0) +- return false; +- insn++; +- *insn = BPF_ALU32_IMM(BPF_AND, BPF_REG_A, PKT_TYPE_MAX); +-#ifdef __BIG_ENDIAN_BITFIELD +- insn++; +- *insn = BPF_ALU32_IMM(BPF_RSH, BPF_REG_A, 5); +-#endif +- break; +- +- case SKF_AD_OFF + SKF_AD_IFINDEX: +- case SKF_AD_OFF + SKF_AD_HATYPE: +- BUILD_BUG_ON(FIELD_SIZEOF(struct net_device, ifindex) != 4); +- BUILD_BUG_ON(FIELD_SIZEOF(struct net_device, type) != 2); +- BUILD_BUG_ON(bytes_to_bpf_size(FIELD_SIZEOF(struct sk_buff, dev)) < 0); +- +- *insn++ = BPF_LDX_MEM(bytes_to_bpf_size(FIELD_SIZEOF(struct sk_buff, dev)), +- BPF_REG_TMP, BPF_REG_CTX, +- offsetof(struct sk_buff, dev)); +- /* if (tmp != 0) goto pc + 1 */ +- *insn++ = BPF_JMP_IMM(BPF_JNE, BPF_REG_TMP, 0, 1); +- *insn++ = BPF_EXIT_INSN(); +- if (fp->k == SKF_AD_OFF + SKF_AD_IFINDEX) +- *insn = BPF_LDX_MEM(BPF_W, BPF_REG_A, BPF_REG_TMP, +- offsetof(struct net_device, ifindex)); +- else +- *insn = BPF_LDX_MEM(BPF_H, BPF_REG_A, BPF_REG_TMP, +- offsetof(struct net_device, type)); +- break; +- +- case SKF_AD_OFF + SKF_AD_MARK: +- BUILD_BUG_ON(FIELD_SIZEOF(struct sk_buff, mark) != 4); +- +- *insn = BPF_LDX_MEM(BPF_W, BPF_REG_A, BPF_REG_CTX, +- offsetof(struct sk_buff, mark)); +- break; +- +- case SKF_AD_OFF + SKF_AD_RXHASH: +- BUILD_BUG_ON(FIELD_SIZEOF(struct sk_buff, hash) != 4); +- +- *insn = BPF_LDX_MEM(BPF_W, BPF_REG_A, BPF_REG_CTX, +- offsetof(struct sk_buff, hash)); +- break; +- +- case SKF_AD_OFF + SKF_AD_QUEUE: +- BUILD_BUG_ON(FIELD_SIZEOF(struct sk_buff, queue_mapping) != 2); +- +- *insn = BPF_LDX_MEM(BPF_H, BPF_REG_A, BPF_REG_CTX, +- offsetof(struct sk_buff, queue_mapping)); +- break; +- +- case SKF_AD_OFF + SKF_AD_VLAN_TAG: +- case SKF_AD_OFF + SKF_AD_VLAN_TAG_PRESENT: +- BUILD_BUG_ON(FIELD_SIZEOF(struct sk_buff, vlan_tci) != 2); +- BUILD_BUG_ON(VLAN_TAG_PRESENT != 0x1000); +- +- /* A = *(u16 *) (CTX + offsetof(vlan_tci)) */ +- *insn++ = BPF_LDX_MEM(BPF_H, BPF_REG_A, BPF_REG_CTX, +- offsetof(struct sk_buff, vlan_tci)); +- if (fp->k == SKF_AD_OFF + SKF_AD_VLAN_TAG) { +- *insn = BPF_ALU32_IMM(BPF_AND, BPF_REG_A, +- ~VLAN_TAG_PRESENT); +- } else { +- /* A >>= 12 */ +- *insn++ = BPF_ALU32_IMM(BPF_RSH, BPF_REG_A, 12); +- /* A &= 1 */ +- *insn = BPF_ALU32_IMM(BPF_AND, BPF_REG_A, 1); +- } +- break; +- +- case SKF_AD_OFF + SKF_AD_PAY_OFFSET: +- case SKF_AD_OFF + SKF_AD_NLATTR: +- case SKF_AD_OFF + SKF_AD_NLATTR_NEST: +- case SKF_AD_OFF + SKF_AD_CPU: +- case SKF_AD_OFF + SKF_AD_RANDOM: +- /* arg1 = CTX */ +- *insn++ = BPF_MOV64_REG(BPF_REG_ARG1, BPF_REG_CTX); +- /* arg2 = A */ +- *insn++ = BPF_MOV64_REG(BPF_REG_ARG2, BPF_REG_A); +- /* arg3 = X */ +- *insn++ = BPF_MOV64_REG(BPF_REG_ARG3, BPF_REG_X); +- /* Emit call(arg1=CTX, arg2=A, arg3=X) */ +- switch (fp->k) { +- case SKF_AD_OFF + SKF_AD_PAY_OFFSET: +- *insn = BPF_EMIT_CALL(__skb_get_pay_offset); +- break; +- case SKF_AD_OFF + SKF_AD_NLATTR: +- *insn = BPF_EMIT_CALL(__skb_get_nlattr); +- break; +- case SKF_AD_OFF + SKF_AD_NLATTR_NEST: +- *insn = BPF_EMIT_CALL(__skb_get_nlattr_nest); +- break; +- case SKF_AD_OFF + SKF_AD_CPU: +- *insn = BPF_EMIT_CALL(__get_raw_cpu_id); +- break; +- case SKF_AD_OFF + SKF_AD_RANDOM: +- *insn = BPF_EMIT_CALL(__get_random_u32); +- break; +- } +- break; +- +- case SKF_AD_OFF + SKF_AD_ALU_XOR_X: +- /* A ^= X */ +- *insn = BPF_ALU32_REG(BPF_XOR, BPF_REG_A, BPF_REG_X); +- break; +- +- default: +- /* This is just a dummy call to avoid letting the compiler +- * evict __bpf_call_base() as an optimization. Placed here +- * where no-one bothers. +- */ +- BUG_ON(__bpf_call_base(0, 0, 0, 0, 0) != 0); +- return false; +- } +- +- *insnp = insn; +- return true; +-} +- +-/** +- * sk_convert_filter - convert filter program +- * @prog: the user passed filter program +- * @len: the length of the user passed filter program +- * @new_prog: buffer where converted program will be stored +- * @new_len: pointer to store length of converted program +- * +- * Remap 'sock_filter' style BPF instruction set to 'sock_filter_ext' style. +- * Conversion workflow: +- * +- * 1) First pass for calculating the new program length: +- * sk_convert_filter(old_prog, old_len, NULL, &new_len) +- * +- * 2) 2nd pass to remap in two passes: 1st pass finds new +- * jump offsets, 2nd pass remapping: +- * new_prog = kmalloc(sizeof(struct sock_filter_int) * new_len); +- * sk_convert_filter(old_prog, old_len, new_prog, &new_len); +- * +- * User BPF's register A is mapped to our BPF register 6, user BPF +- * register X is mapped to BPF register 7; frame pointer is always +- * register 10; Context 'void *ctx' is stored in register 1, that is, +- * for socket filters: ctx == 'struct sk_buff *', for seccomp: +- * ctx == 'struct seccomp_data *'. +- */ +-int sk_convert_filter(struct sock_filter *prog, int len, +- struct sock_filter_int *new_prog, int *new_len) +-{ +- int new_flen = 0, pass = 0, target, i; +- struct sock_filter_int *new_insn; +- struct sock_filter *fp; +- int *addrs = NULL; +- u8 bpf_src; +- +- BUILD_BUG_ON(BPF_MEMWORDS * sizeof(u32) > MAX_BPF_STACK); +- BUILD_BUG_ON(BPF_REG_FP + 1 != MAX_BPF_REG); +- +- if (len <= 0 || len > BPF_MAXINSNS) +- return -EINVAL; +- +- if (new_prog) { +- addrs = kcalloc(len, sizeof(*addrs), GFP_KERNEL); +- if (!addrs) +- return -ENOMEM; +- } +- +-do_pass: +- new_insn = new_prog; +- fp = prog; +- +- if (new_insn) +- *new_insn = BPF_MOV64_REG(BPF_REG_CTX, BPF_REG_ARG1); +- new_insn++; +- +- for (i = 0; i < len; fp++, i++) { +- struct sock_filter_int tmp_insns[6] = { }; +- struct sock_filter_int *insn = tmp_insns; +- +- if (addrs) +- addrs[i] = new_insn - new_prog; +- +- switch (fp->code) { +- /* All arithmetic insns and skb loads map as-is. */ +- case BPF_ALU | BPF_ADD | BPF_X: +- case BPF_ALU | BPF_ADD | BPF_K: +- case BPF_ALU | BPF_SUB | BPF_X: +- case BPF_ALU | BPF_SUB | BPF_K: +- case BPF_ALU | BPF_AND | BPF_X: +- case BPF_ALU | BPF_AND | BPF_K: +- case BPF_ALU | BPF_OR | BPF_X: +- case BPF_ALU | BPF_OR | BPF_K: +- case BPF_ALU | BPF_LSH | BPF_X: +- case BPF_ALU | BPF_LSH | BPF_K: +- case BPF_ALU | BPF_RSH | BPF_X: +- case BPF_ALU | BPF_RSH | BPF_K: +- case BPF_ALU | BPF_XOR | BPF_X: +- case BPF_ALU | BPF_XOR | BPF_K: +- case BPF_ALU | BPF_MUL | BPF_X: +- case BPF_ALU | BPF_MUL | BPF_K: +- case BPF_ALU | BPF_DIV | BPF_X: +- case BPF_ALU | BPF_DIV | BPF_K: +- case BPF_ALU | BPF_MOD | BPF_X: +- case BPF_ALU | BPF_MOD | BPF_K: +- case BPF_ALU | BPF_NEG: +- case BPF_LD | BPF_ABS | BPF_W: +- case BPF_LD | BPF_ABS | BPF_H: +- case BPF_LD | BPF_ABS | BPF_B: +- case BPF_LD | BPF_IND | BPF_W: +- case BPF_LD | BPF_IND | BPF_H: +- case BPF_LD | BPF_IND | BPF_B: +- /* Check for overloaded BPF extension and +- * directly convert it if found, otherwise +- * just move on with mapping. +- */ +- if (BPF_CLASS(fp->code) == BPF_LD && +- BPF_MODE(fp->code) == BPF_ABS && +- convert_bpf_extensions(fp, &insn)) +- break; +- +- *insn = BPF_RAW_INSN(fp->code, BPF_REG_A, BPF_REG_X, 0, fp->k); +- break; +- +- /* Jump transformation cannot use BPF block macros +- * everywhere as offset calculation and target updates +- * require a bit more work than the rest, i.e. jump +- * opcodes map as-is, but offsets need adjustment. +- */ +- +-#define BPF_EMIT_JMP \ +- do { \ +- if (target >= len || target < 0) \ +- goto err; \ +- insn->off = addrs ? addrs[target] - addrs[i] - 1 : 0; \ +- /* Adjust pc relative offset for 2nd or 3rd insn. */ \ +- insn->off -= insn - tmp_insns; \ +- } while (0) +- +- case BPF_JMP | BPF_JA: +- target = i + fp->k + 1; +- insn->code = fp->code; +- BPF_EMIT_JMP; +- break; +- +- case BPF_JMP | BPF_JEQ | BPF_K: +- case BPF_JMP | BPF_JEQ | BPF_X: +- case BPF_JMP | BPF_JSET | BPF_K: +- case BPF_JMP | BPF_JSET | BPF_X: +- case BPF_JMP | BPF_JGT | BPF_K: +- case BPF_JMP | BPF_JGT | BPF_X: +- case BPF_JMP | BPF_JGE | BPF_K: +- case BPF_JMP | BPF_JGE | BPF_X: +- if (BPF_SRC(fp->code) == BPF_K && (int) fp->k < 0) { +- /* BPF immediates are signed, zero extend +- * immediate into tmp register and use it +- * in compare insn. +- */ +- *insn++ = BPF_MOV32_IMM(BPF_REG_TMP, fp->k); +- +- insn->dst_reg = BPF_REG_A; +- insn->src_reg = BPF_REG_TMP; +- bpf_src = BPF_X; +- } else { +- insn->dst_reg = BPF_REG_A; +- insn->src_reg = BPF_REG_X; +- insn->imm = fp->k; +- bpf_src = BPF_SRC(fp->code); ++ switch (fentry->code) { ++ case BPF_S_ALU_ADD_X: ++ A += X; ++ continue; ++ case BPF_S_ALU_ADD_K: ++ A += K; ++ continue; ++ case BPF_S_ALU_SUB_X: ++ A -= X; ++ continue; ++ case BPF_S_ALU_SUB_K: ++ A -= K; ++ continue; ++ case BPF_S_ALU_MUL_X: ++ A *= X; ++ continue; ++ case BPF_S_ALU_MUL_K: ++ A *= K; ++ continue; ++ case BPF_S_ALU_DIV_X: ++ if (X == 0) ++ return 0; ++ A /= X; ++ continue; ++ case BPF_S_ALU_DIV_K: ++ A /= K; ++ continue; ++ case BPF_S_ALU_MOD_X: ++ if (X == 0) ++ return 0; ++ A %= X; ++ continue; ++ case BPF_S_ALU_MOD_K: ++ A %= K; ++ continue; ++ case BPF_S_ALU_AND_X: ++ A &= X; ++ continue; ++ case BPF_S_ALU_AND_K: ++ A &= K; ++ continue; ++ case BPF_S_ALU_OR_X: ++ A |= X; ++ continue; ++ case BPF_S_ALU_OR_K: ++ A |= K; ++ continue; ++ case BPF_S_ANC_ALU_XOR_X: ++ case BPF_S_ALU_XOR_X: ++ A ^= X; ++ continue; ++ case BPF_S_ALU_XOR_K: ++ A ^= K; ++ continue; ++ case BPF_S_ALU_LSH_X: ++ A <<= X; ++ continue; ++ case BPF_S_ALU_LSH_K: ++ A <<= K; ++ continue; ++ case BPF_S_ALU_RSH_X: ++ A >>= X; ++ continue; ++ case BPF_S_ALU_RSH_K: ++ A >>= K; ++ continue; ++ case BPF_S_ALU_NEG: ++ A = -A; ++ continue; ++ case BPF_S_JMP_JA: ++ fentry += K; ++ continue; ++ case BPF_S_JMP_JGT_K: ++ fentry += (A > K) ? fentry->jt : fentry->jf; ++ continue; ++ case BPF_S_JMP_JGE_K: ++ fentry += (A >= K) ? fentry->jt : fentry->jf; ++ continue; ++ case BPF_S_JMP_JEQ_K: ++ fentry += (A == K) ? fentry->jt : fentry->jf; ++ continue; ++ case BPF_S_JMP_JSET_K: ++ fentry += (A & K) ? fentry->jt : fentry->jf; ++ continue; ++ case BPF_S_JMP_JGT_X: ++ fentry += (A > X) ? fentry->jt : fentry->jf; ++ continue; ++ case BPF_S_JMP_JGE_X: ++ fentry += (A >= X) ? fentry->jt : fentry->jf; ++ continue; ++ case BPF_S_JMP_JEQ_X: ++ fentry += (A == X) ? fentry->jt : fentry->jf; ++ continue; ++ case BPF_S_JMP_JSET_X: ++ fentry += (A & X) ? fentry->jt : fentry->jf; ++ continue; ++ case BPF_S_LD_W_ABS: ++ k = K; ++load_w: ++ ptr = load_pointer(skb, k, 4, &tmp); ++ if (ptr != NULL) { ++ A = get_unaligned_be32(ptr); ++ continue; + } +- +- /* Common case where 'jump_false' is next insn. */ +- if (fp->jf == 0) { +- insn->code = BPF_JMP | BPF_OP(fp->code) | bpf_src; +- target = i + fp->jt + 1; +- BPF_EMIT_JMP; +- break; ++ return 0; ++ case BPF_S_LD_H_ABS: ++ k = K; ++load_h: ++ ptr = load_pointer(skb, k, 2, &tmp); ++ if (ptr != NULL) { ++ A = get_unaligned_be16(ptr); ++ continue; + } +- +- /* Convert JEQ into JNE when 'jump_true' is next insn. */ +- if (fp->jt == 0 && BPF_OP(fp->code) == BPF_JEQ) { +- insn->code = BPF_JMP | BPF_JNE | bpf_src; +- target = i + fp->jf + 1; +- BPF_EMIT_JMP; +- break; ++ return 0; ++ case BPF_S_LD_B_ABS: ++ k = K; ++load_b: ++ ptr = load_pointer(skb, k, 1, &tmp); ++ if (ptr != NULL) { ++ A = *(u8 *)ptr; ++ continue; + } +- +- /* Other jumps are mapped into two insns: Jxx and JA. */ +- target = i + fp->jt + 1; +- insn->code = BPF_JMP | BPF_OP(fp->code) | bpf_src; +- BPF_EMIT_JMP; +- insn++; +- +- insn->code = BPF_JMP | BPF_JA; +- target = i + fp->jf + 1; +- BPF_EMIT_JMP; +- break; +- +- /* ldxb 4 * ([14] & 0xf) is remaped into 6 insns. */ +- case BPF_LDX | BPF_MSH | BPF_B: +- /* tmp = A */ +- *insn++ = BPF_MOV64_REG(BPF_REG_TMP, BPF_REG_A); +- /* A = BPF_R0 = *(u8 *) (skb->data + K) */ +- *insn++ = BPF_LD_ABS(BPF_B, fp->k); +- /* A &= 0xf */ +- *insn++ = BPF_ALU32_IMM(BPF_AND, BPF_REG_A, 0xf); +- /* A <<= 2 */ +- *insn++ = BPF_ALU32_IMM(BPF_LSH, BPF_REG_A, 2); +- /* X = A */ +- *insn++ = BPF_MOV64_REG(BPF_REG_X, BPF_REG_A); +- /* A = tmp */ +- *insn = BPF_MOV64_REG(BPF_REG_A, BPF_REG_TMP); +- break; +- +- /* RET_K, RET_A are remaped into 2 insns. */ +- case BPF_RET | BPF_A: +- case BPF_RET | BPF_K: +- *insn++ = BPF_MOV32_RAW(BPF_RVAL(fp->code) == BPF_K ? +- BPF_K : BPF_X, BPF_REG_0, +- BPF_REG_A, fp->k); +- *insn = BPF_EXIT_INSN(); +- break; +- +- /* Store to stack. */ +- case BPF_ST: +- case BPF_STX: +- *insn = BPF_STX_MEM(BPF_W, BPF_REG_FP, BPF_CLASS(fp->code) == +- BPF_ST ? BPF_REG_A : BPF_REG_X, +- -(BPF_MEMWORDS - fp->k) * 4); +- break; +- +- /* Load from stack. */ +- case BPF_LD | BPF_MEM: +- case BPF_LDX | BPF_MEM: +- *insn = BPF_LDX_MEM(BPF_W, BPF_CLASS(fp->code) == BPF_LD ? +- BPF_REG_A : BPF_REG_X, BPF_REG_FP, +- -(BPF_MEMWORDS - fp->k) * 4); +- break; +- +- /* A = K or X = K */ +- case BPF_LD | BPF_IMM: +- case BPF_LDX | BPF_IMM: +- *insn = BPF_MOV32_IMM(BPF_CLASS(fp->code) == BPF_LD ? +- BPF_REG_A : BPF_REG_X, fp->k); +- break; +- +- /* X = A */ +- case BPF_MISC | BPF_TAX: +- *insn = BPF_MOV64_REG(BPF_REG_X, BPF_REG_A); +- break; +- +- /* A = X */ +- case BPF_MISC | BPF_TXA: +- *insn = BPF_MOV64_REG(BPF_REG_A, BPF_REG_X); +- break; +- +- /* A = skb->len or X = skb->len */ +- case BPF_LD | BPF_W | BPF_LEN: +- case BPF_LDX | BPF_W | BPF_LEN: +- *insn = BPF_LDX_MEM(BPF_W, BPF_CLASS(fp->code) == BPF_LD ? +- BPF_REG_A : BPF_REG_X, BPF_REG_CTX, +- offsetof(struct sk_buff, len)); +- break; +- +- /* Access seccomp_data fields. */ +- case BPF_LDX | BPF_ABS | BPF_W: +- /* A = *(u32 *) (ctx + K) */ +- *insn = BPF_LDX_MEM(BPF_W, BPF_REG_A, BPF_REG_CTX, fp->k); +- break; +- +- /* Unkown instruction. */ ++ return 0; ++ case BPF_S_LD_W_LEN: ++ A = skb->len; ++ continue; ++ case BPF_S_LDX_W_LEN: ++ X = skb->len; ++ continue; ++ case BPF_S_LD_W_IND: ++ k = X + K; ++ goto load_w; ++ case BPF_S_LD_H_IND: ++ k = X + K; ++ goto load_h; ++ case BPF_S_LD_B_IND: ++ k = X + K; ++ goto load_b; ++ case BPF_S_LDX_B_MSH: ++ ptr = load_pointer(skb, K, 1, &tmp); ++ if (ptr != NULL) { ++ X = (*(u8 *)ptr & 0xf) << 2; ++ continue; ++ } ++ return 0; ++ case BPF_S_LD_IMM: ++ A = K; ++ continue; ++ case BPF_S_LDX_IMM: ++ X = K; ++ continue; ++ case BPF_S_LD_MEM: ++ A = mem[K&15]; ++ continue; ++ case BPF_S_LDX_MEM: ++ X = mem[K&15]; ++ continue; ++ case BPF_S_MISC_TAX: ++ X = A; ++ continue; ++ case BPF_S_MISC_TXA: ++ A = X; ++ continue; ++ case BPF_S_RET_K: ++ return K; ++ case BPF_S_RET_A: ++ return A; ++ case BPF_S_ST: ++ mem[K&15] = A; ++ continue; ++ case BPF_S_STX: ++ mem[K&15] = X; ++ continue; ++ case BPF_S_ANC_PROTOCOL: ++ A = ntohs(skb->protocol); ++ continue; ++ case BPF_S_ANC_PKTTYPE: ++ A = skb->pkt_type; ++ continue; ++ case BPF_S_ANC_IFINDEX: ++ if (!skb->dev) ++ return 0; ++ A = skb->dev->ifindex; ++ continue; ++ case BPF_S_ANC_MARK: ++ A = skb->mark; ++ continue; ++ case BPF_S_ANC_QUEUE: ++ A = skb->queue_mapping; ++ continue; ++ case BPF_S_ANC_HATYPE: ++ if (!skb->dev) ++ return 0; ++ A = skb->dev->type; ++ continue; ++ case BPF_S_ANC_RXHASH: ++ A = skb->hash; ++ continue; ++ case BPF_S_ANC_CPU: ++ A = raw_smp_processor_id(); ++ continue; ++ case BPF_S_ANC_VLAN_TAG: ++ A = vlan_tx_tag_get(skb); ++ continue; ++ case BPF_S_ANC_VLAN_TAG_PRESENT: ++ A = !!vlan_tx_tag_present(skb); ++ continue; ++ case BPF_S_ANC_PAY_OFFSET: ++ A = __skb_get_poff(skb); ++ continue; ++ case BPF_S_ANC_NLATTR: { ++ struct nlattr *nla; ++ ++ if (skb_is_nonlinear(skb)) ++ return 0; ++ if (skb->len < sizeof(struct nlattr)) ++ return 0; ++ if (A > skb->len - sizeof(struct nlattr)) ++ return 0; ++ ++ nla = nla_find((struct nlattr *)&skb->data[A], ++ skb->len - A, X); ++ if (nla) ++ A = (void *)nla - (void *)skb->data; ++ else ++ A = 0; ++ continue; ++ } ++ case BPF_S_ANC_NLATTR_NEST: { ++ struct nlattr *nla; ++ ++ if (skb_is_nonlinear(skb)) ++ return 0; ++ if (skb->len < sizeof(struct nlattr)) ++ return 0; ++ if (A > skb->len - sizeof(struct nlattr)) ++ return 0; ++ ++ nla = (struct nlattr *)&skb->data[A]; ++ if (nla->nla_len > skb->len - A) ++ return 0; ++ ++ nla = nla_find_nested(nla, X); ++ if (nla) ++ A = (void *)nla - (void *)skb->data; ++ else ++ A = 0; ++ continue; ++ } ++#ifdef CONFIG_SECCOMP_FILTER ++ case BPF_S_ANC_SECCOMP_LD_W: ++ A = seccomp_bpf_load(fentry->k); ++ continue; ++#endif default: - goto err; + WARN(1, KERN_ALERT "Unknown sock filter code:%u jt:%u tf:%u k:%u\n", -+ fp->code, fp->jt, fp->jf, fp->k); -+ kfree(addrs); ++ fentry->code, fentry->jt, ++ fentry->jf, fentry->k); + BUG(); -+ return -EINVAL; ++ return 0; } +- +- insn++; +- if (new_prog) +- memcpy(new_insn, tmp_insns, +- sizeof(*insn) * (insn - tmp_insns)); +- new_insn += insn - tmp_insns; +- } +- +- if (!new_prog) { +- /* Only calculating new length. */ +- *new_len = new_insn - new_prog; +- return 0; +- } +- +- pass++; +- if (new_flen != new_insn - new_prog) { +- new_flen = new_insn - new_prog; +- if (pass > 2) +- goto err; +- goto do_pass; + } - insn++; -@@ -1170,7 +1174,7 @@ static int check_load_and_stores(struct sock_filter *filter, int flen) - u16 *masks, memvalid = 0; /* one bit per cell, 16 cells */ +- kfree(addrs); +- BUG_ON(*new_len != new_flen); + return 0; +-err: +- kfree(addrs); +- return -EINVAL; + } ++EXPORT_SYMBOL(sk_run_filter); + +-/* Security: +- * ++/* ++ * Security : + * A BPF program is able to use 16 cells of memory to store intermediate +- * values (check u32 mem[BPF_MEMWORDS] in sk_run_filter()). +- * ++ * values (check u32 mem[BPF_MEMWORDS] in sk_run_filter()) + * As we dont want to clear mem[] array for each packet going through + * sk_run_filter(), we check that filter loaded by user never try to read + * a cell if not previously written, and we check all branches to be sure +@@ -1096,46 +418,44 @@ err: + */ + static int check_load_and_stores(struct sock_filter *filter, int flen) + { +- u16 *masks, memvalid = 0; /* One bit per cell, 16 cells */ ++ u16 *masks, memvalid = 0; /* one bit per cell, 16 cells */ int pc, ret = 0; - BUILD_BUG_ON(BPF_MEMWORDS > 16); +- +- masks = kmalloc_array(flen, sizeof(*masks), GFP_KERNEL); + BUILD_BUG_ON(BPF_MEMWORDS != 16); - masks = kmalloc(flen * sizeof(*masks), GFP_KERNEL); ++ masks = kmalloc(flen * sizeof(*masks), GFP_KERNEL); if (!masks) return -ENOMEM; -@@ -1605,7 +1609,7 @@ int sk_unattached_filter_create(struct sk_filter **pfp, +- + memset(masks, 0xff, flen * sizeof(*masks)); + + for (pc = 0; pc < flen; pc++) { + memvalid &= masks[pc]; + + switch (filter[pc].code) { +- case BPF_ST: +- case BPF_STX: ++ case BPF_S_ST: ++ case BPF_S_STX: + memvalid |= (1 << filter[pc].k); + break; +- case BPF_LD | BPF_MEM: +- case BPF_LDX | BPF_MEM: ++ case BPF_S_LD_MEM: ++ case BPF_S_LDX_MEM: + if (!(memvalid & (1 << filter[pc].k))) { + ret = -EINVAL; + goto error; + } + break; +- case BPF_JMP | BPF_JA: +- /* A jump must set masks on target */ ++ case BPF_S_JMP_JA: ++ /* a jump must set masks on target */ + masks[pc + 1 + filter[pc].k] &= memvalid; + memvalid = ~0; + break; +- case BPF_JMP | BPF_JEQ | BPF_K: +- case BPF_JMP | BPF_JEQ | BPF_X: +- case BPF_JMP | BPF_JGE | BPF_K: +- case BPF_JMP | BPF_JGE | BPF_X: +- case BPF_JMP | BPF_JGT | BPF_K: +- case BPF_JMP | BPF_JGT | BPF_X: +- case BPF_JMP | BPF_JSET | BPF_K: +- case BPF_JMP | BPF_JSET | BPF_X: +- /* A jump must set masks on targets */ ++ case BPF_S_JMP_JEQ_K: ++ case BPF_S_JMP_JEQ_X: ++ case BPF_S_JMP_JGE_K: ++ case BPF_S_JMP_JGE_X: ++ case BPF_S_JMP_JGT_K: ++ case BPF_S_JMP_JGT_X: ++ case BPF_S_JMP_JSET_X: ++ case BPF_S_JMP_JSET_K: ++ /* a jump must set masks on targets */ + masks[pc + 1 + filter[pc].jt] &= memvalid; + masks[pc + 1 + filter[pc].jf] &= memvalid; + memvalid = ~0; +@@ -1147,72 +467,6 @@ error: + return ret; + } + +-static bool chk_code_allowed(u16 code_to_probe) +-{ +- static const bool codes[] = { +- /* 32 bit ALU operations */ +- [BPF_ALU | BPF_ADD | BPF_K] = true, +- [BPF_ALU | BPF_ADD | BPF_X] = true, +- [BPF_ALU | BPF_SUB | BPF_K] = true, +- [BPF_ALU | BPF_SUB | BPF_X] = true, +- [BPF_ALU | BPF_MUL | BPF_K] = true, +- [BPF_ALU | BPF_MUL | BPF_X] = true, +- [BPF_ALU | BPF_DIV | BPF_K] = true, +- [BPF_ALU | BPF_DIV | BPF_X] = true, +- [BPF_ALU | BPF_MOD | BPF_K] = true, +- [BPF_ALU | BPF_MOD | BPF_X] = true, +- [BPF_ALU | BPF_AND | BPF_K] = true, +- [BPF_ALU | BPF_AND | BPF_X] = true, +- [BPF_ALU | BPF_OR | BPF_K] = true, +- [BPF_ALU | BPF_OR | BPF_X] = true, +- [BPF_ALU | BPF_XOR | BPF_K] = true, +- [BPF_ALU | BPF_XOR | BPF_X] = true, +- [BPF_ALU | BPF_LSH | BPF_K] = true, +- [BPF_ALU | BPF_LSH | BPF_X] = true, +- [BPF_ALU | BPF_RSH | BPF_K] = true, +- [BPF_ALU | BPF_RSH | BPF_X] = true, +- [BPF_ALU | BPF_NEG] = true, +- /* Load instructions */ +- [BPF_LD | BPF_W | BPF_ABS] = true, +- [BPF_LD | BPF_H | BPF_ABS] = true, +- [BPF_LD | BPF_B | BPF_ABS] = true, +- [BPF_LD | BPF_W | BPF_LEN] = true, +- [BPF_LD | BPF_W | BPF_IND] = true, +- [BPF_LD | BPF_H | BPF_IND] = true, +- [BPF_LD | BPF_B | BPF_IND] = true, +- [BPF_LD | BPF_IMM] = true, +- [BPF_LD | BPF_MEM] = true, +- [BPF_LDX | BPF_W | BPF_LEN] = true, +- [BPF_LDX | BPF_B | BPF_MSH] = true, +- [BPF_LDX | BPF_IMM] = true, +- [BPF_LDX | BPF_MEM] = true, +- /* Store instructions */ +- [BPF_ST] = true, +- [BPF_STX] = true, +- /* Misc instructions */ +- [BPF_MISC | BPF_TAX] = true, +- [BPF_MISC | BPF_TXA] = true, +- /* Return instructions */ +- [BPF_RET | BPF_K] = true, +- [BPF_RET | BPF_A] = true, +- /* Jump instructions */ +- [BPF_JMP | BPF_JA] = true, +- [BPF_JMP | BPF_JEQ | BPF_K] = true, +- [BPF_JMP | BPF_JEQ | BPF_X] = true, +- [BPF_JMP | BPF_JGE | BPF_K] = true, +- [BPF_JMP | BPF_JGE | BPF_X] = true, +- [BPF_JMP | BPF_JGT | BPF_K] = true, +- [BPF_JMP | BPF_JGT | BPF_X] = true, +- [BPF_JMP | BPF_JSET | BPF_K] = true, +- [BPF_JMP | BPF_JSET | BPF_X] = true, +- }; +- +- if (code_to_probe >= ARRAY_SIZE(codes)) +- return false; +- +- return codes[code_to_probe]; +-} +- + /** + * sk_chk_filter - verify socket filter code + * @filter: filter to verify +@@ -1229,303 +483,187 @@ static bool chk_code_allowed(u16 code_to_probe) + */ + int sk_chk_filter(struct sock_filter *filter, unsigned int flen) + { +- bool anc_found; ++ /* ++ * Valid instructions are initialized to non-0. ++ * Invalid instructions are initialized to 0. ++ */ ++ static const u8 codes[] = { ++ [BPF_ALU|BPF_ADD|BPF_K] = BPF_S_ALU_ADD_K, ++ [BPF_ALU|BPF_ADD|BPF_X] = BPF_S_ALU_ADD_X, ++ [BPF_ALU|BPF_SUB|BPF_K] = BPF_S_ALU_SUB_K, ++ [BPF_ALU|BPF_SUB|BPF_X] = BPF_S_ALU_SUB_X, ++ [BPF_ALU|BPF_MUL|BPF_K] = BPF_S_ALU_MUL_K, ++ [BPF_ALU|BPF_MUL|BPF_X] = BPF_S_ALU_MUL_X, ++ [BPF_ALU|BPF_DIV|BPF_X] = BPF_S_ALU_DIV_X, ++ [BPF_ALU|BPF_MOD|BPF_K] = BPF_S_ALU_MOD_K, ++ [BPF_ALU|BPF_MOD|BPF_X] = BPF_S_ALU_MOD_X, ++ [BPF_ALU|BPF_AND|BPF_K] = BPF_S_ALU_AND_K, ++ [BPF_ALU|BPF_AND|BPF_X] = BPF_S_ALU_AND_X, ++ [BPF_ALU|BPF_OR|BPF_K] = BPF_S_ALU_OR_K, ++ [BPF_ALU|BPF_OR|BPF_X] = BPF_S_ALU_OR_X, ++ [BPF_ALU|BPF_XOR|BPF_K] = BPF_S_ALU_XOR_K, ++ [BPF_ALU|BPF_XOR|BPF_X] = BPF_S_ALU_XOR_X, ++ [BPF_ALU|BPF_LSH|BPF_K] = BPF_S_ALU_LSH_K, ++ [BPF_ALU|BPF_LSH|BPF_X] = BPF_S_ALU_LSH_X, ++ [BPF_ALU|BPF_RSH|BPF_K] = BPF_S_ALU_RSH_K, ++ [BPF_ALU|BPF_RSH|BPF_X] = BPF_S_ALU_RSH_X, ++ [BPF_ALU|BPF_NEG] = BPF_S_ALU_NEG, ++ [BPF_LD|BPF_W|BPF_ABS] = BPF_S_LD_W_ABS, ++ [BPF_LD|BPF_H|BPF_ABS] = BPF_S_LD_H_ABS, ++ [BPF_LD|BPF_B|BPF_ABS] = BPF_S_LD_B_ABS, ++ [BPF_LD|BPF_W|BPF_LEN] = BPF_S_LD_W_LEN, ++ [BPF_LD|BPF_W|BPF_IND] = BPF_S_LD_W_IND, ++ [BPF_LD|BPF_H|BPF_IND] = BPF_S_LD_H_IND, ++ [BPF_LD|BPF_B|BPF_IND] = BPF_S_LD_B_IND, ++ [BPF_LD|BPF_IMM] = BPF_S_LD_IMM, ++ [BPF_LDX|BPF_W|BPF_LEN] = BPF_S_LDX_W_LEN, ++ [BPF_LDX|BPF_B|BPF_MSH] = BPF_S_LDX_B_MSH, ++ [BPF_LDX|BPF_IMM] = BPF_S_LDX_IMM, ++ [BPF_MISC|BPF_TAX] = BPF_S_MISC_TAX, ++ [BPF_MISC|BPF_TXA] = BPF_S_MISC_TXA, ++ [BPF_RET|BPF_K] = BPF_S_RET_K, ++ [BPF_RET|BPF_A] = BPF_S_RET_A, ++ [BPF_ALU|BPF_DIV|BPF_K] = BPF_S_ALU_DIV_K, ++ [BPF_LD|BPF_MEM] = BPF_S_LD_MEM, ++ [BPF_LDX|BPF_MEM] = BPF_S_LDX_MEM, ++ [BPF_ST] = BPF_S_ST, ++ [BPF_STX] = BPF_S_STX, ++ [BPF_JMP|BPF_JA] = BPF_S_JMP_JA, ++ [BPF_JMP|BPF_JEQ|BPF_K] = BPF_S_JMP_JEQ_K, ++ [BPF_JMP|BPF_JEQ|BPF_X] = BPF_S_JMP_JEQ_X, ++ [BPF_JMP|BPF_JGE|BPF_K] = BPF_S_JMP_JGE_K, ++ [BPF_JMP|BPF_JGE|BPF_X] = BPF_S_JMP_JGE_X, ++ [BPF_JMP|BPF_JGT|BPF_K] = BPF_S_JMP_JGT_K, ++ [BPF_JMP|BPF_JGT|BPF_X] = BPF_S_JMP_JGT_X, ++ [BPF_JMP|BPF_JSET|BPF_K] = BPF_S_JMP_JSET_K, ++ [BPF_JMP|BPF_JSET|BPF_X] = BPF_S_JMP_JSET_X, ++ }; + int pc; ++ bool anc_found; + + if (flen == 0 || flen > BPF_MAXINSNS) + return -EINVAL; + +- /* Check the filter code now */ ++ /* check the filter code now */ + for (pc = 0; pc < flen; pc++) { + struct sock_filter *ftest = &filter[pc]; ++ u16 code = ftest->code; + +- /* May we actually operate on this code? */ +- if (!chk_code_allowed(ftest->code)) ++ if (code >= ARRAY_SIZE(codes)) ++ return -EINVAL; ++ code = codes[code]; ++ if (!code) + return -EINVAL; +- + /* Some instructions need special checks */ +- switch (ftest->code) { +- case BPF_ALU | BPF_DIV | BPF_K: +- case BPF_ALU | BPF_MOD | BPF_K: +- /* Check for division by zero */ ++ switch (code) { ++ case BPF_S_ALU_DIV_K: ++ case BPF_S_ALU_MOD_K: ++ /* check for division by zero */ + if (ftest->k == 0) + return -EINVAL; + break; +- case BPF_LD | BPF_MEM: +- case BPF_LDX | BPF_MEM: +- case BPF_ST: +- case BPF_STX: +- /* Check for invalid memory addresses */ ++ case BPF_S_LD_MEM: ++ case BPF_S_LDX_MEM: ++ case BPF_S_ST: ++ case BPF_S_STX: ++ /* check for invalid memory addresses */ + if (ftest->k >= BPF_MEMWORDS) + return -EINVAL; + break; +- case BPF_JMP | BPF_JA: +- /* Note, the large ftest->k might cause loops. ++ case BPF_S_JMP_JA: ++ /* ++ * Note, the large ftest->k might cause loops. + * Compare this with conditional jumps below, + * where offsets are limited. --ANK (981016) + */ +- if (ftest->k >= (unsigned int)(flen - pc - 1)) ++ if (ftest->k >= (unsigned int)(flen-pc-1)) + return -EINVAL; + break; +- case BPF_JMP | BPF_JEQ | BPF_K: +- case BPF_JMP | BPF_JEQ | BPF_X: +- case BPF_JMP | BPF_JGE | BPF_K: +- case BPF_JMP | BPF_JGE | BPF_X: +- case BPF_JMP | BPF_JGT | BPF_K: +- case BPF_JMP | BPF_JGT | BPF_X: +- case BPF_JMP | BPF_JSET | BPF_K: +- case BPF_JMP | BPF_JSET | BPF_X: +- /* Both conditionals must be safe */ ++ case BPF_S_JMP_JEQ_K: ++ case BPF_S_JMP_JEQ_X: ++ case BPF_S_JMP_JGE_K: ++ case BPF_S_JMP_JGE_X: ++ case BPF_S_JMP_JGT_K: ++ case BPF_S_JMP_JGT_X: ++ case BPF_S_JMP_JSET_X: ++ case BPF_S_JMP_JSET_K: ++ /* for conditionals both must be safe */ + if (pc + ftest->jt + 1 >= flen || + pc + ftest->jf + 1 >= flen) + return -EINVAL; + break; +- case BPF_LD | BPF_W | BPF_ABS: +- case BPF_LD | BPF_H | BPF_ABS: +- case BPF_LD | BPF_B | BPF_ABS: ++ case BPF_S_LD_W_ABS: ++ case BPF_S_LD_H_ABS: ++ case BPF_S_LD_B_ABS: + anc_found = false; +- if (bpf_anc_helper(ftest) & BPF_ANC) +- anc_found = true; +- /* Ancillary operation unknown or unsupported */ ++#define ANCILLARY(CODE) case SKF_AD_OFF + SKF_AD_##CODE: \ ++ code = BPF_S_ANC_##CODE; \ ++ anc_found = true; \ ++ break ++ switch (ftest->k) { ++ ANCILLARY(PROTOCOL); ++ ANCILLARY(PKTTYPE); ++ ANCILLARY(IFINDEX); ++ ANCILLARY(NLATTR); ++ ANCILLARY(NLATTR_NEST); ++ ANCILLARY(MARK); ++ ANCILLARY(QUEUE); ++ ANCILLARY(HATYPE); ++ ANCILLARY(RXHASH); ++ ANCILLARY(CPU); ++ ANCILLARY(ALU_XOR_X); ++ ANCILLARY(VLAN_TAG); ++ ANCILLARY(VLAN_TAG_PRESENT); ++ ANCILLARY(PAY_OFFSET); ++ } ++ ++ /* ancillary operation unknown or unsupported */ + if (anc_found == false && ftest->k >= SKF_AD_OFF) + return -EINVAL; + } ++ ftest->code = code; + } + +- /* Last instruction must be a RET code */ ++ /* last instruction must be a RET code */ + switch (filter[flen - 1].code) { +- case BPF_RET | BPF_K: +- case BPF_RET | BPF_A: ++ case BPF_S_RET_K: ++ case BPF_S_RET_A: + return check_load_and_stores(filter, flen); + } +- + return -EINVAL; + } + EXPORT_SYMBOL(sk_chk_filter); + +-static int sk_store_orig_filter(struct sk_filter *fp, +- const struct sock_fprog *fprog) +-{ +- unsigned int fsize = sk_filter_proglen(fprog); +- struct sock_fprog_kern *fkprog; +- +- fp->orig_prog = kmalloc(sizeof(*fkprog), GFP_KERNEL); +- if (!fp->orig_prog) +- return -ENOMEM; +- +- fkprog = fp->orig_prog; +- fkprog->len = fprog->len; +- fkprog->filter = kmemdup(fp->insns, fsize, GFP_KERNEL); +- if (!fkprog->filter) { +- kfree(fp->orig_prog); +- return -ENOMEM; +- } +- +- return 0; +-} +- +-static void sk_release_orig_filter(struct sk_filter *fp) +-{ +- struct sock_fprog_kern *fprog = fp->orig_prog; +- +- if (fprog) { +- kfree(fprog->filter); +- kfree(fprog); +- } +-} +- + /** + * sk_filter_release_rcu - Release a socket filter by rcu_head + * @rcu: rcu_head that contains the sk_filter to free + */ +-static void sk_filter_release_rcu(struct rcu_head *rcu) ++void sk_filter_release_rcu(struct rcu_head *rcu) + { + struct sk_filter *fp = container_of(rcu, struct sk_filter, rcu); + +- sk_release_orig_filter(fp); +- sk_filter_free(fp); +-} +- +-/** +- * sk_filter_release - release a socket filter +- * @fp: filter to remove +- * +- * Remove a filter from a socket and release its resources. +- */ +-static void sk_filter_release(struct sk_filter *fp) +-{ +- if (atomic_dec_and_test(&fp->refcnt)) +- call_rcu(&fp->rcu, sk_filter_release_rcu); +-} +- +-void sk_filter_uncharge(struct sock *sk, struct sk_filter *fp) +-{ +- atomic_sub(sk_filter_size(fp->len), &sk->sk_omem_alloc); +- sk_filter_release(fp); +-} +- +-void sk_filter_charge(struct sock *sk, struct sk_filter *fp) +-{ +- atomic_inc(&fp->refcnt); +- atomic_add(sk_filter_size(fp->len), &sk->sk_omem_alloc); +-} +- +-static struct sk_filter *__sk_migrate_realloc(struct sk_filter *fp, +- struct sock *sk, +- unsigned int len) +-{ +- struct sk_filter *fp_new; +- +- if (sk == NULL) +- return krealloc(fp, len, GFP_KERNEL); +- +- fp_new = sock_kmalloc(sk, len, GFP_KERNEL); +- if (fp_new) { +- *fp_new = *fp; +- /* As we're keeping orig_prog in fp_new along, +- * we need to make sure we're not evicting it +- * from the old fp. +- */ +- fp->orig_prog = NULL; +- sk_filter_uncharge(sk, fp); +- } +- +- return fp_new; +-} +- +-static struct sk_filter *__sk_migrate_filter(struct sk_filter *fp, +- struct sock *sk) +-{ +- struct sock_filter *old_prog; +- struct sk_filter *old_fp; +- int err, new_len, old_len = fp->len; +- +- /* We are free to overwrite insns et al right here as it +- * won't be used at this point in time anymore internally +- * after the migration to the internal BPF instruction +- * representation. +- */ +- BUILD_BUG_ON(sizeof(struct sock_filter) != +- sizeof(struct sock_filter_int)); +- +- /* Conversion cannot happen on overlapping memory areas, +- * so we need to keep the user BPF around until the 2nd +- * pass. At this time, the user BPF is stored in fp->insns. +- */ +- old_prog = kmemdup(fp->insns, old_len * sizeof(struct sock_filter), +- GFP_KERNEL); +- if (!old_prog) { +- err = -ENOMEM; +- goto out_err; +- } +- +- /* 1st pass: calculate the new program length. */ +- err = sk_convert_filter(old_prog, old_len, NULL, &new_len); +- if (err) +- goto out_err_free; +- +- /* Expand fp for appending the new filter representation. */ +- old_fp = fp; +- fp = __sk_migrate_realloc(old_fp, sk, sk_filter_size(new_len)); +- if (!fp) { +- /* The old_fp is still around in case we couldn't +- * allocate new memory, so uncharge on that one. +- */ +- fp = old_fp; +- err = -ENOMEM; +- goto out_err_free; +- } +- +- fp->len = new_len; +- +- /* 2nd pass: remap sock_filter insns into sock_filter_int insns. */ +- err = sk_convert_filter(old_prog, old_len, fp->insnsi, &new_len); +- if (err) +- /* 2nd sk_convert_filter() can fail only if it fails +- * to allocate memory, remapping must succeed. Note, +- * that at this time old_fp has already been released +- * by __sk_migrate_realloc(). +- */ +- goto out_err_free; +- +- sk_filter_select_runtime(fp); +- +- kfree(old_prog); +- return fp; +- +-out_err_free: +- kfree(old_prog); +-out_err: +- /* Rollback filter setup. */ +- if (sk != NULL) +- sk_filter_uncharge(sk, fp); +- else +- kfree(fp); +- return ERR_PTR(err); +-} +- +-void __weak bpf_int_jit_compile(struct sk_filter *prog) +-{ +-} +- +-/** +- * sk_filter_select_runtime - select execution runtime for BPF program +- * @fp: sk_filter populated with internal BPF program +- * +- * try to JIT internal BPF program, if JIT is not available select interpreter +- * BPF program will be executed via SK_RUN_FILTER() macro +- */ +-void sk_filter_select_runtime(struct sk_filter *fp) +-{ +- fp->bpf_func = (void *) __sk_run_filter; +- +- /* Probe if internal BPF can be JITed */ +- bpf_int_jit_compile(fp); +-} +-EXPORT_SYMBOL_GPL(sk_filter_select_runtime); +- +-/* free internal BPF program */ +-void sk_filter_free(struct sk_filter *fp) +-{ + bpf_jit_free(fp); + } +-EXPORT_SYMBOL_GPL(sk_filter_free); ++EXPORT_SYMBOL(sk_filter_release_rcu); + +-static struct sk_filter *__sk_prepare_filter(struct sk_filter *fp, +- struct sock *sk) ++static int __sk_prepare_filter(struct sk_filter *fp) + { + int err; + +- fp->bpf_func = NULL; +- fp->jited = 0; ++ fp->bpf_func = sk_run_filter; + + err = sk_chk_filter(fp->insns, fp->len); +- if (err) { +- if (sk != NULL) +- sk_filter_uncharge(sk, fp); +- else +- kfree(fp); +- return ERR_PTR(err); +- } ++ if (err) ++ return err; + +- /* Probe if we can JIT compile the filter and if so, do +- * the compilation of the filter. +- */ + bpf_jit_compile(fp); +- +- /* JIT compiler couldn't process this filter, so do the +- * internal BPF translation for the optimized interpreter. +- */ +- if (!fp->jited) +- fp = __sk_migrate_filter(fp, sk); +- +- return fp; ++ return 0; + } + + /** + * sk_unattached_filter_create - create an unattached filter ++ * @fprog: the filter program + * @pfp: the unattached filter that is created +- * @fprog: the filter program + * + * Create a filter independent of any socket. We first run some + * sanity checks on it to make sure it does not explode on us later. +@@ -1533,10 +671,11 @@ static struct sk_filter *__sk_prepare_filter(struct sk_filter *fp, + * a negative errno code is returned. On success the return is zero. + */ + int sk_unattached_filter_create(struct sk_filter **pfp, +- struct sock_fprog_kern *fprog) ++ struct sock_fprog *fprog) + { +- unsigned int fsize = sk_filter_proglen(fprog); + struct sk_filter *fp; ++ unsigned int fsize = sizeof(struct sock_filter) * fprog->len; ++ int err; + + /* Make sure new filter is there and in the right amounts. */ + if (fprog->filter == NULL) +@@ -1545,26 +684,20 @@ int sk_unattached_filter_create(struct sk_filter **pfp, + fp = kmalloc(sk_filter_size(fprog->len), GFP_KERNEL); if (!fp) return -ENOMEM; - +- - memcpy(fp->insns, fprog->filter, fsize); + memcpy(fp->insns, (void __force_kernel *)fprog->filter, fsize); atomic_set(&fp->refcnt, 1); fp->len = fprog->len; +- /* Since unattached filters are not copied back to user +- * space through sk_get_filter(), we do not need to hold +- * a copy here, and can spare us the work. +- */ +- fp->orig_prog = NULL; + +- /* __sk_prepare_filter() already takes care of uncharging +- * memory in case something goes wrong. +- */ +- fp = __sk_prepare_filter(fp, NULL); +- if (IS_ERR(fp)) +- return PTR_ERR(fp); ++ err = __sk_prepare_filter(fp); ++ if (err) ++ goto free_mem; + + *pfp = fp; + return 0; ++free_mem: ++ kfree(fp); ++ return err; + } + EXPORT_SYMBOL_GPL(sk_unattached_filter_create); + +@@ -1587,7 +720,7 @@ EXPORT_SYMBOL_GPL(sk_unattached_filter_destroy); + int sk_attach_filter(struct sock_fprog *fprog, struct sock *sk) + { + struct sk_filter *fp, *old_fp; +- unsigned int fsize = sk_filter_proglen(fprog); ++ unsigned int fsize = sizeof(struct sock_filter) * fprog->len; + unsigned int sk_fsize = sk_filter_size(fprog->len); + int err; + +@@ -1601,7 +734,6 @@ int sk_attach_filter(struct sock_fprog *fprog, struct sock *sk) + fp = sock_kmalloc(sk, sk_fsize, GFP_KERNEL); + if (!fp) + return -ENOMEM; +- + if (copy_from_user(fp->insns, fprog->filter, fsize)) { + sock_kfree_s(sk, fp, sk_fsize); + return -EFAULT; +@@ -1610,26 +742,18 @@ int sk_attach_filter(struct sock_fprog *fprog, struct sock *sk) + atomic_set(&fp->refcnt, 1); + fp->len = fprog->len; + +- err = sk_store_orig_filter(fp, fprog); ++ err = __sk_prepare_filter(fp); + if (err) { + sk_filter_uncharge(sk, fp); +- return -ENOMEM; ++ return err; + } + +- /* __sk_prepare_filter() already takes care of uncharging +- * memory in case something goes wrong. +- */ +- fp = __sk_prepare_filter(fp, sk); +- if (IS_ERR(fp)) +- return PTR_ERR(fp); +- + old_fp = rcu_dereference_protected(sk->sk_filter, + sock_owned_by_user(sk)); + rcu_assign_pointer(sk->sk_filter, fp); + + if (old_fp) + sk_filter_uncharge(sk, old_fp); +- + return 0; + } + EXPORT_SYMBOL_GPL(sk_attach_filter); +@@ -1649,46 +773,116 @@ int sk_detach_filter(struct sock *sk) + sk_filter_uncharge(sk, filter); + ret = 0; + } +- + return ret; + } + EXPORT_SYMBOL_GPL(sk_detach_filter); + +-int sk_get_filter(struct sock *sk, struct sock_filter __user *ubuf, +- unsigned int len) ++void sk_decode_filter(struct sock_filter *filt, struct sock_filter *to) ++{ ++ static const u16 decodes[] = { ++ [BPF_S_ALU_ADD_K] = BPF_ALU|BPF_ADD|BPF_K, ++ [BPF_S_ALU_ADD_X] = BPF_ALU|BPF_ADD|BPF_X, ++ [BPF_S_ALU_SUB_K] = BPF_ALU|BPF_SUB|BPF_K, ++ [BPF_S_ALU_SUB_X] = BPF_ALU|BPF_SUB|BPF_X, ++ [BPF_S_ALU_MUL_K] = BPF_ALU|BPF_MUL|BPF_K, ++ [BPF_S_ALU_MUL_X] = BPF_ALU|BPF_MUL|BPF_X, ++ [BPF_S_ALU_DIV_X] = BPF_ALU|BPF_DIV|BPF_X, ++ [BPF_S_ALU_MOD_K] = BPF_ALU|BPF_MOD|BPF_K, ++ [BPF_S_ALU_MOD_X] = BPF_ALU|BPF_MOD|BPF_X, ++ [BPF_S_ALU_AND_K] = BPF_ALU|BPF_AND|BPF_K, ++ [BPF_S_ALU_AND_X] = BPF_ALU|BPF_AND|BPF_X, ++ [BPF_S_ALU_OR_K] = BPF_ALU|BPF_OR|BPF_K, ++ [BPF_S_ALU_OR_X] = BPF_ALU|BPF_OR|BPF_X, ++ [BPF_S_ALU_XOR_K] = BPF_ALU|BPF_XOR|BPF_K, ++ [BPF_S_ALU_XOR_X] = BPF_ALU|BPF_XOR|BPF_X, ++ [BPF_S_ALU_LSH_K] = BPF_ALU|BPF_LSH|BPF_K, ++ [BPF_S_ALU_LSH_X] = BPF_ALU|BPF_LSH|BPF_X, ++ [BPF_S_ALU_RSH_K] = BPF_ALU|BPF_RSH|BPF_K, ++ [BPF_S_ALU_RSH_X] = BPF_ALU|BPF_RSH|BPF_X, ++ [BPF_S_ALU_NEG] = BPF_ALU|BPF_NEG, ++ [BPF_S_LD_W_ABS] = BPF_LD|BPF_W|BPF_ABS, ++ [BPF_S_LD_H_ABS] = BPF_LD|BPF_H|BPF_ABS, ++ [BPF_S_LD_B_ABS] = BPF_LD|BPF_B|BPF_ABS, ++ [BPF_S_ANC_PROTOCOL] = BPF_LD|BPF_B|BPF_ABS, ++ [BPF_S_ANC_PKTTYPE] = BPF_LD|BPF_B|BPF_ABS, ++ [BPF_S_ANC_IFINDEX] = BPF_LD|BPF_B|BPF_ABS, ++ [BPF_S_ANC_NLATTR] = BPF_LD|BPF_B|BPF_ABS, ++ [BPF_S_ANC_NLATTR_NEST] = BPF_LD|BPF_B|BPF_ABS, ++ [BPF_S_ANC_MARK] = BPF_LD|BPF_B|BPF_ABS, ++ [BPF_S_ANC_QUEUE] = BPF_LD|BPF_B|BPF_ABS, ++ [BPF_S_ANC_HATYPE] = BPF_LD|BPF_B|BPF_ABS, ++ [BPF_S_ANC_RXHASH] = BPF_LD|BPF_B|BPF_ABS, ++ [BPF_S_ANC_CPU] = BPF_LD|BPF_B|BPF_ABS, ++ [BPF_S_ANC_ALU_XOR_X] = BPF_LD|BPF_B|BPF_ABS, ++ [BPF_S_ANC_SECCOMP_LD_W] = BPF_LD|BPF_B|BPF_ABS, ++ [BPF_S_ANC_VLAN_TAG] = BPF_LD|BPF_B|BPF_ABS, ++ [BPF_S_ANC_VLAN_TAG_PRESENT] = BPF_LD|BPF_B|BPF_ABS, ++ [BPF_S_ANC_PAY_OFFSET] = BPF_LD|BPF_B|BPF_ABS, ++ [BPF_S_LD_W_LEN] = BPF_LD|BPF_W|BPF_LEN, ++ [BPF_S_LD_W_IND] = BPF_LD|BPF_W|BPF_IND, ++ [BPF_S_LD_H_IND] = BPF_LD|BPF_H|BPF_IND, ++ [BPF_S_LD_B_IND] = BPF_LD|BPF_B|BPF_IND, ++ [BPF_S_LD_IMM] = BPF_LD|BPF_IMM, ++ [BPF_S_LDX_W_LEN] = BPF_LDX|BPF_W|BPF_LEN, ++ [BPF_S_LDX_B_MSH] = BPF_LDX|BPF_B|BPF_MSH, ++ [BPF_S_LDX_IMM] = BPF_LDX|BPF_IMM, ++ [BPF_S_MISC_TAX] = BPF_MISC|BPF_TAX, ++ [BPF_S_MISC_TXA] = BPF_MISC|BPF_TXA, ++ [BPF_S_RET_K] = BPF_RET|BPF_K, ++ [BPF_S_RET_A] = BPF_RET|BPF_A, ++ [BPF_S_ALU_DIV_K] = BPF_ALU|BPF_DIV|BPF_K, ++ [BPF_S_LD_MEM] = BPF_LD|BPF_MEM, ++ [BPF_S_LDX_MEM] = BPF_LDX|BPF_MEM, ++ [BPF_S_ST] = BPF_ST, ++ [BPF_S_STX] = BPF_STX, ++ [BPF_S_JMP_JA] = BPF_JMP|BPF_JA, ++ [BPF_S_JMP_JEQ_K] = BPF_JMP|BPF_JEQ|BPF_K, ++ [BPF_S_JMP_JEQ_X] = BPF_JMP|BPF_JEQ|BPF_X, ++ [BPF_S_JMP_JGE_K] = BPF_JMP|BPF_JGE|BPF_K, ++ [BPF_S_JMP_JGE_X] = BPF_JMP|BPF_JGE|BPF_X, ++ [BPF_S_JMP_JGT_K] = BPF_JMP|BPF_JGT|BPF_K, ++ [BPF_S_JMP_JGT_X] = BPF_JMP|BPF_JGT|BPF_X, ++ [BPF_S_JMP_JSET_K] = BPF_JMP|BPF_JSET|BPF_K, ++ [BPF_S_JMP_JSET_X] = BPF_JMP|BPF_JSET|BPF_X, ++ }; ++ u16 code; ++ ++ code = filt->code; ++ ++ to->code = decodes[code]; ++ to->jt = filt->jt; ++ to->jf = filt->jf; ++ to->k = filt->k; ++} ++ ++int sk_get_filter(struct sock *sk, struct sock_filter __user *ubuf, unsigned int len) + { +- struct sock_fprog_kern *fprog; + struct sk_filter *filter; +- int ret = 0; ++ int i, ret; + + lock_sock(sk); + filter = rcu_dereference_protected(sk->sk_filter, +- sock_owned_by_user(sk)); ++ sock_owned_by_user(sk)); ++ ret = 0; + if (!filter) + goto out; +- +- /* We're copying the filter that has been originally attached, +- * so no conversion/decode needed anymore. +- */ +- fprog = filter->orig_prog; +- +- ret = fprog->len; ++ ret = filter->len; + if (!len) +- /* User space only enquires number of filter blocks. */ + goto out; +- + ret = -EINVAL; +- if (len < fprog->len) ++ if (len < filter->len) + goto out; + + ret = -EFAULT; +- if (copy_to_user(ubuf, fprog->filter, sk_filter_proglen(fprog))) +- goto out; ++ for (i = 0; i < filter->len; i++) { ++ struct sock_filter fb; + +- /* Instead of bytes, the API requests to return the number +- * of filter blocks. +- */ +- ret = fprog->len; ++ sk_decode_filter(&filter->insns[i], &fb); ++ if (copy_to_user(&ubuf[i], &fb, sizeof(fb))) ++ goto out; ++ } ++ ++ ret = filter->len; + out: + release_sock(sk); + return ret; diff --git a/net/core/flow.c b/net/core/flow.c index a0348fd..6951c76 100644 --- a/net/core/flow.c @@ -98731,11 +106717,11 @@ index a0348fd..6951c76 100644 fle->object = flo; else diff --git a/net/core/iovec.c b/net/core/iovec.c -index b618694..192bbba 100644 +index e1ec45a..e5c6f16 100644 --- a/net/core/iovec.c +++ b/net/core/iovec.c @@ -42,7 +42,7 @@ int verify_iovec(struct msghdr *m, struct iovec *iov, struct sockaddr_storage *a - if (m->msg_namelen) { + if (m->msg_name && m->msg_namelen) { if (mode == VERIFY_READ) { void __user *namep; - namep = (void __user __force *) m->msg_name; @@ -98753,7 +106739,7 @@ index b618694..192bbba 100644 m->msg_iov = iov; diff --git a/net/core/neighbour.c b/net/core/neighbour.c -index 32d872e..487e769 100644 +index ef31fef..8be66d9 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c @@ -2825,7 +2825,7 @@ static int proc_unres_qlen(struct ctl_table *ctl, int write, @@ -98774,23 +106760,6 @@ index 32d872e..487e769 100644 int ret; tmp.extra1 = &zero; -@@ -3059,11 +3059,12 @@ int neigh_sysctl_register(struct net_device *dev, struct neigh_parms *p, - memset(&t->neigh_vars[NEIGH_VAR_GC_INTERVAL], 0, - sizeof(t->neigh_vars[NEIGH_VAR_GC_INTERVAL])); - } else { -+ struct neigh_table *ntable = container_of(p, struct neigh_table, parms); - dev_name_source = "default"; -- t->neigh_vars[NEIGH_VAR_GC_INTERVAL].data = (int *)(p + 1); -- t->neigh_vars[NEIGH_VAR_GC_THRESH1].data = (int *)(p + 1) + 1; -- t->neigh_vars[NEIGH_VAR_GC_THRESH2].data = (int *)(p + 1) + 2; -- t->neigh_vars[NEIGH_VAR_GC_THRESH3].data = (int *)(p + 1) + 3; -+ t->neigh_vars[NEIGH_VAR_GC_INTERVAL].data = &ntable->gc_interval; -+ t->neigh_vars[NEIGH_VAR_GC_THRESH1].data = &ntable->gc_thresh1; -+ t->neigh_vars[NEIGH_VAR_GC_THRESH2].data = &ntable->gc_thresh2; -+ t->neigh_vars[NEIGH_VAR_GC_THRESH3].data = &ntable->gc_thresh3; - } - - if (handler) { diff --git a/net/core/net-procfs.c b/net/core/net-procfs.c index 2bf8329..2eb1423 100644 --- a/net/core/net-procfs.c @@ -98856,7 +106825,7 @@ index 1cac29e..fb482f3 100644 static DEVICE_ATTR_RO(carrier_changes); diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c -index 7c8ffd9..0cb3687 100644 +index 85b6269..fc77ea0 100644 --- a/net/core/net_namespace.c +++ b/net/core/net_namespace.c @@ -443,7 +443,7 @@ static int __register_pernet_operations(struct list_head *list, @@ -98918,7 +106887,7 @@ index e33937f..b2b4981 100644 iph->ttl = 64; iph->protocol = IPPROTO_UDP; diff --git a/net/core/pktgen.c b/net/core/pktgen.c -index 0304f98..ddfead6 100644 +index fc17a9d..d4a3d88 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c @@ -3725,7 +3725,7 @@ static int __net_init pg_net_init(struct net *net) @@ -98930,8 +106899,155 @@ index 0304f98..ddfead6 100644 if (!pn->proc_dir) { pr_warn("cannot create /proc/net/%s\n", PG_PROC_DIR); return -ENODEV; +diff --git a/net/core/ptp_classifier.c b/net/core/ptp_classifier.c +deleted file mode 100644 +index d3027a7..0000000 +--- a/net/core/ptp_classifier.c ++++ /dev/null +@@ -1,141 +0,0 @@ +-/* PTP classifier +- * +- * This program is free software; you can redistribute it and/or +- * modify it under the terms of version 2 of the GNU General Public +- * License as published by the Free Software Foundation. +- * +- * This program is distributed in the hope that it will be useful, but +- * WITHOUT ANY WARRANTY; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +- * General Public License for more details. +- */ +- +-/* The below program is the bpf_asm (tools/net/) representation of +- * the opcode array in the ptp_filter structure. +- * +- * For convenience, this can easily be altered and reviewed with +- * bpf_asm and bpf_dbg, e.g. `./bpf_asm -c prog` where prog is a +- * simple file containing the below program: +- * +- * ldh [12] ; load ethertype +- * +- * ; PTP over UDP over IPv4 over Ethernet +- * test_ipv4: +- * jneq #0x800, test_ipv6 ; ETH_P_IP ? +- * ldb [23] ; load proto +- * jneq #17, drop_ipv4 ; IPPROTO_UDP ? +- * ldh [20] ; load frag offset field +- * jset #0x1fff, drop_ipv4 ; don't allow fragments +- * ldxb 4*([14]&0xf) ; load IP header len +- * ldh [x + 16] ; load UDP dst port +- * jneq #319, drop_ipv4 ; is port PTP_EV_PORT ? +- * ldh [x + 22] ; load payload +- * and #0xf ; mask PTP_CLASS_VMASK +- * or #0x10 ; PTP_CLASS_IPV4 +- * ret a ; return PTP class +- * drop_ipv4: ret #0x0 ; PTP_CLASS_NONE +- * +- * ; PTP over UDP over IPv6 over Ethernet +- * test_ipv6: +- * jneq #0x86dd, test_8021q ; ETH_P_IPV6 ? +- * ldb [20] ; load proto +- * jneq #17, drop_ipv6 ; IPPROTO_UDP ? +- * ldh [56] ; load UDP dst port +- * jneq #319, drop_ipv6 ; is port PTP_EV_PORT ? +- * ldh [62] ; load payload +- * and #0xf ; mask PTP_CLASS_VMASK +- * or #0x20 ; PTP_CLASS_IPV6 +- * ret a ; return PTP class +- * drop_ipv6: ret #0x0 ; PTP_CLASS_NONE +- * +- * ; PTP over 802.1Q over Ethernet +- * test_8021q: +- * jneq #0x8100, test_ieee1588 ; ETH_P_8021Q ? +- * ldh [16] ; load inner type +- * jneq #0x88f7, drop_ieee1588 ; ETH_P_1588 ? +- * ldb [18] ; load payload +- * and #0x8 ; as we don't have ports here, test +- * jneq #0x0, drop_ieee1588 ; for PTP_GEN_BIT and drop these +- * ldh [18] ; reload payload +- * and #0xf ; mask PTP_CLASS_VMASK +- * or #0x40 ; PTP_CLASS_V2_VLAN +- * ret a ; return PTP class +- * +- * ; PTP over Ethernet +- * test_ieee1588: +- * jneq #0x88f7, drop_ieee1588 ; ETH_P_1588 ? +- * ldb [14] ; load payload +- * and #0x8 ; as we don't have ports here, test +- * jneq #0x0, drop_ieee1588 ; for PTP_GEN_BIT and drop these +- * ldh [14] ; reload payload +- * and #0xf ; mask PTP_CLASS_VMASK +- * or #0x30 ; PTP_CLASS_L2 +- * ret a ; return PTP class +- * drop_ieee1588: ret #0x0 ; PTP_CLASS_NONE +- */ +- +-#include +-#include +-#include +- +-static struct sk_filter *ptp_insns __read_mostly; +- +-unsigned int ptp_classify_raw(const struct sk_buff *skb) +-{ +- return SK_RUN_FILTER(ptp_insns, skb); +-} +-EXPORT_SYMBOL_GPL(ptp_classify_raw); +- +-void __init ptp_classifier_init(void) +-{ +- static struct sock_filter ptp_filter[] __initdata = { +- { 0x28, 0, 0, 0x0000000c }, +- { 0x15, 0, 12, 0x00000800 }, +- { 0x30, 0, 0, 0x00000017 }, +- { 0x15, 0, 9, 0x00000011 }, +- { 0x28, 0, 0, 0x00000014 }, +- { 0x45, 7, 0, 0x00001fff }, +- { 0xb1, 0, 0, 0x0000000e }, +- { 0x48, 0, 0, 0x00000010 }, +- { 0x15, 0, 4, 0x0000013f }, +- { 0x48, 0, 0, 0x00000016 }, +- { 0x54, 0, 0, 0x0000000f }, +- { 0x44, 0, 0, 0x00000010 }, +- { 0x16, 0, 0, 0x00000000 }, +- { 0x06, 0, 0, 0x00000000 }, +- { 0x15, 0, 9, 0x000086dd }, +- { 0x30, 0, 0, 0x00000014 }, +- { 0x15, 0, 6, 0x00000011 }, +- { 0x28, 0, 0, 0x00000038 }, +- { 0x15, 0, 4, 0x0000013f }, +- { 0x28, 0, 0, 0x0000003e }, +- { 0x54, 0, 0, 0x0000000f }, +- { 0x44, 0, 0, 0x00000020 }, +- { 0x16, 0, 0, 0x00000000 }, +- { 0x06, 0, 0, 0x00000000 }, +- { 0x15, 0, 9, 0x00008100 }, +- { 0x28, 0, 0, 0x00000010 }, +- { 0x15, 0, 15, 0x000088f7 }, +- { 0x30, 0, 0, 0x00000012 }, +- { 0x54, 0, 0, 0x00000008 }, +- { 0x15, 0, 12, 0x00000000 }, +- { 0x28, 0, 0, 0x00000012 }, +- { 0x54, 0, 0, 0x0000000f }, +- { 0x44, 0, 0, 0x00000040 }, +- { 0x16, 0, 0, 0x00000000 }, +- { 0x15, 0, 7, 0x000088f7 }, +- { 0x30, 0, 0, 0x0000000e }, +- { 0x54, 0, 0, 0x00000008 }, +- { 0x15, 0, 4, 0x00000000 }, +- { 0x28, 0, 0, 0x0000000e }, +- { 0x54, 0, 0, 0x0000000f }, +- { 0x44, 0, 0, 0x00000030 }, +- { 0x16, 0, 0, 0x00000000 }, +- { 0x06, 0, 0, 0x00000000 }, +- }; +- struct sock_fprog_kern ptp_prog = { +- .len = ARRAY_SIZE(ptp_filter), .filter = ptp_filter, +- }; +- +- BUG_ON(sk_unattached_filter_create(&ptp_insns, &ptp_prog)); +-} diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c -index 1999ed8..1e6e58a 100644 +index 1063996..0729c19 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c @@ -58,7 +58,7 @@ struct rtnl_link { @@ -99019,10 +107135,10 @@ index b442e7e..6f5b5a2 100644 { struct socket *sock; diff --git a/net/core/skbuff.c b/net/core/skbuff.c -index 8383b2b..6397efb 100644 +index 58ff88e..af9b458 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c -@@ -2003,7 +2003,7 @@ EXPORT_SYMBOL(__skb_checksum); +@@ -2010,7 +2010,7 @@ EXPORT_SYMBOL(__skb_checksum); __wsum skb_checksum(const struct sk_buff *skb, int offset, int len, __wsum csum) { @@ -99031,7 +107147,7 @@ index 8383b2b..6397efb 100644 .update = csum_partial_ext, .combine = csum_block_add_ext, }; -@@ -3220,13 +3220,15 @@ void __init skb_init(void) +@@ -3233,13 +3233,15 @@ void __init skb_init(void) skbuff_head_cache = kmem_cache_create("skbuff_head_cache", sizeof(struct sk_buff), 0, @@ -99050,7 +107166,7 @@ index 8383b2b..6397efb 100644 } diff --git a/net/core/sock.c b/net/core/sock.c -index 664ee42..aaf9e6e 100644 +index 026e01f..f54f908 100644 --- a/net/core/sock.c +++ b/net/core/sock.c @@ -442,7 +442,7 @@ int sock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb) @@ -99165,7 +107281,7 @@ index 664ee42..aaf9e6e 100644 msg->msg_flags |= MSG_ERRQUEUE; err = copied; diff --git a/net/core/sock_diag.c b/net/core/sock_diag.c -index a4216a4..1c07687 100644 +index a4216a4..773e3d7 100644 --- a/net/core/sock_diag.c +++ b/net/core/sock_diag.c @@ -9,26 +9,33 @@ @@ -99203,7 +107319,52 @@ index a4216a4..1c07687 100644 } EXPORT_SYMBOL_GPL(sock_diag_save_cookie); -@@ -110,8 +117,11 @@ int sock_diag_register(const struct sock_diag_handler *hndl) +@@ -52,10 +59,9 @@ EXPORT_SYMBOL_GPL(sock_diag_put_meminfo); + int sock_diag_put_filterinfo(bool may_report_filterinfo, struct sock *sk, + struct sk_buff *skb, int attrtype) + { +- struct sock_fprog_kern *fprog; +- struct sk_filter *filter; + struct nlattr *attr; +- unsigned int flen; ++ struct sk_filter *filter; ++ unsigned int len; + int err = 0; + + if (!may_report_filterinfo) { +@@ -64,20 +70,24 @@ int sock_diag_put_filterinfo(bool may_report_filterinfo, struct sock *sk, + } + + rcu_read_lock(); ++ + filter = rcu_dereference(sk->sk_filter); +- if (!filter) +- goto out; ++ len = filter ? filter->len * sizeof(struct sock_filter) : 0; + +- fprog = filter->orig_prog; +- flen = sk_filter_proglen(fprog); +- +- attr = nla_reserve(skb, attrtype, flen); ++ attr = nla_reserve(skb, attrtype, len); + if (attr == NULL) { + err = -EMSGSIZE; + goto out; + } + +- memcpy(nla_data(attr), fprog->filter, flen); ++ if (filter) { ++ struct sock_filter *fb = (struct sock_filter *)nla_data(attr); ++ int i; ++ ++ for (i = 0; i < filter->len; i++, fb++) ++ sk_decode_filter(&filter->insns[i], fb); ++ } ++ + out: + rcu_read_unlock(); + return err; +@@ -110,8 +120,11 @@ int sock_diag_register(const struct sock_diag_handler *hndl) mutex_lock(&sock_diag_table_mutex); if (sock_diag_handlers[hndl->family]) err = -EBUSY; @@ -99216,7 +107377,7 @@ index a4216a4..1c07687 100644 mutex_unlock(&sock_diag_table_mutex); return err; -@@ -127,7 +137,9 @@ void sock_diag_unregister(const struct sock_diag_handler *hnld) +@@ -127,7 +140,9 @@ void sock_diag_unregister(const struct sock_diag_handler *hnld) mutex_lock(&sock_diag_table_mutex); BUG_ON(sock_diag_handlers[family] != hnld); @@ -99295,8 +107456,70 @@ index cf9cd13..8b56af3 100644 .init = sysctl_core_net_init, .exit = sysctl_core_net_exit, }; +diff --git a/net/core/timestamping.c b/net/core/timestamping.c +index 6521dfd..661b5a4 100644 +--- a/net/core/timestamping.c ++++ b/net/core/timestamping.c +@@ -23,11 +23,16 @@ + #include + #include + ++static struct sock_filter ptp_filter[] = { ++ PTP_FILTER ++}; ++ + static unsigned int classify(const struct sk_buff *skb) + { +- if (likely(skb->dev && skb->dev->phydev && ++ if (likely(skb->dev && ++ skb->dev->phydev && + skb->dev->phydev->drv)) +- return ptp_classify_raw(skb); ++ return sk_run_filter(skb, ptp_filter); + else + return PTP_CLASS_NONE; + } +@@ -55,13 +60,11 @@ void skb_clone_tx_timestamp(struct sk_buff *skb) + if (likely(phydev->drv->txtstamp)) { + if (!atomic_inc_not_zero(&sk->sk_refcnt)) + return; +- + clone = skb_clone(skb, GFP_ATOMIC); + if (!clone) { + sock_put(sk); + return; + } +- + clone->sk = sk; + phydev->drv->txtstamp(phydev, clone, type); + } +@@ -86,15 +89,12 @@ void skb_complete_tx_timestamp(struct sk_buff *skb, + } + + *skb_hwtstamps(skb) = *hwtstamps; +- + serr = SKB_EXT_ERR(skb); + memset(serr, 0, sizeof(*serr)); + serr->ee.ee_errno = ENOMSG; + serr->ee.ee_origin = SO_EE_ORIGIN_TIMESTAMPING; + skb->sk = NULL; +- + err = sock_queue_err_skb(sk, skb); +- + sock_put(sk); + if (err) + kfree_skb(skb); +@@ -132,3 +132,8 @@ bool skb_defer_rx_timestamp(struct sk_buff *skb) + return false; + } + EXPORT_SYMBOL_GPL(skb_defer_rx_timestamp); ++ ++void __init skb_timestamping_init(void) ++{ ++ BUG_ON(sk_chk_filter(ptp_filter, ARRAY_SIZE(ptp_filter))); ++} diff --git a/net/decnet/af_decnet.c b/net/decnet/af_decnet.c -index 4c04848..f575934 100644 +index ae011b4..d2d18bf 100644 --- a/net/decnet/af_decnet.c +++ b/net/decnet/af_decnet.c @@ -465,6 +465,7 @@ static struct proto dn_proto = { @@ -99342,32 +107565,19 @@ index 5325b54..a0d4d69 100644 return -EFAULT; *lenp = len; -diff --git a/net/dns_resolver/dns_query.c b/net/dns_resolver/dns_query.c -index e7b6d53..f005cc7 100644 ---- a/net/dns_resolver/dns_query.c -+++ b/net/dns_resolver/dns_query.c -@@ -149,7 +149,9 @@ int dns_query(const char *type, const char *name, size_t namelen, - if (!*_result) - goto put; - -- memcpy(*_result, upayload->data, len + 1); -+ memcpy(*_result, upayload->data, len); -+ (*_result)[len] = '\0'; -+ - if (_expiry) - *_expiry = rkey->expiry; - diff --git a/net/ieee802154/reassembly.c b/net/ieee802154/reassembly.c -index ef2d543..5b9b73f 100644 +index 6f1428c..9586b83 100644 --- a/net/ieee802154/reassembly.c +++ b/net/ieee802154/reassembly.c -@@ -434,12 +434,11 @@ static struct ctl_table lowpan_frags_ctl_table[] = { +@@ -438,14 +438,13 @@ static struct ctl_table lowpan_frags_ctl_table[] = { static int __net_init lowpan_frags_ns_sysctl_register(struct net *net) { - struct ctl_table *table; + ctl_table_no_const *table = NULL; struct ctl_table_header *hdr; + struct netns_ieee802154_lowpan *ieee802154_lowpan = + net_ieee802154_lowpan(net); - table = lowpan_frags_ns_ctl_table; if (!net_eq(net, &init_net)) { @@ -99376,7 +107586,7 @@ index ef2d543..5b9b73f 100644 GFP_KERNEL); if (table == NULL) goto err_alloc; -@@ -452,9 +451,9 @@ static int __net_init lowpan_frags_ns_sysctl_register(struct net *net) +@@ -458,9 +457,9 @@ static int __net_init lowpan_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; @@ -99389,7 +107599,7 @@ index ef2d543..5b9b73f 100644 if (hdr == NULL) goto err_reg; -@@ -462,8 +461,7 @@ static int __net_init lowpan_frags_ns_sysctl_register(struct net *net) +@@ -468,8 +467,7 @@ static int __net_init lowpan_frags_ns_sysctl_register(struct net *net) return 0; err_reg: @@ -99399,39 +107609,11 @@ index ef2d543..5b9b73f 100644 err_alloc: return -ENOMEM; } -diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c -index 6d6dd34..e5c9bec 100644 ---- a/net/ipv4/af_inet.c -+++ b/net/ipv4/af_inet.c -@@ -1736,13 +1736,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) -- goto out; -- - rc = proto_register(&tcp_prot, 1); - if (rc) -- goto out_free_reserved_ports; -+ goto out; - - rc = proto_register(&udp_prot, 1); - if (rc) -@@ -1852,8 +1848,6 @@ out_unregister_udp_proto: - proto_unregister(&udp_prot); - out_unregister_tcp_proto: - proto_unregister(&tcp_prot); --out_free_reserved_ports: -- kfree(sysctl_local_reserved_ports); - goto out; - } - diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c -index bdbf68b..deb4759 100644 +index e944937..368fe78 100644 --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c -@@ -1543,7 +1543,7 @@ static int inet_dump_ifaddr(struct sk_buff *skb, struct netlink_callback *cb) +@@ -1540,7 +1540,7 @@ static int inet_dump_ifaddr(struct sk_buff *skb, struct netlink_callback *cb) idx = 0; head = &net->dev_index_head[h]; rcu_read_lock(); @@ -99440,7 +107622,7 @@ index bdbf68b..deb4759 100644 net->dev_base_seq; hlist_for_each_entry_rcu(dev, head, index_hlist) { if (idx < s_idx) -@@ -1861,7 +1861,7 @@ static int inet_netconf_dump_devconf(struct sk_buff *skb, +@@ -1858,7 +1858,7 @@ static int inet_netconf_dump_devconf(struct sk_buff *skb, idx = 0; head = &net->dev_index_head[h]; rcu_read_lock(); @@ -99449,7 +107631,7 @@ index bdbf68b..deb4759 100644 net->dev_base_seq; hlist_for_each_entry_rcu(dev, head, index_hlist) { if (idx < s_idx) -@@ -2096,7 +2096,7 @@ static int ipv4_doint_and_flush(struct ctl_table *ctl, int write, +@@ -2093,7 +2093,7 @@ static int ipv4_doint_and_flush(struct ctl_table *ctl, int write, #define DEVINET_SYSCTL_FLUSHING_ENTRY(attr, name) \ DEVINET_SYSCTL_COMPLEX_ENTRY(attr, name, ipv4_doint_and_flush) @@ -99458,7 +107640,7 @@ index bdbf68b..deb4759 100644 struct ctl_table_header *sysctl_header; struct ctl_table devinet_vars[__IPV4_DEVCONF_MAX]; } devinet_sysctl = { -@@ -2218,7 +2218,7 @@ static __net_init int devinet_init_net(struct net *net) +@@ -2215,7 +2215,7 @@ static __net_init int devinet_init_net(struct net *net) int err; struct ipv4_devconf *all, *dflt; #ifdef CONFIG_SYSCTL @@ -99467,7 +107649,7 @@ index bdbf68b..deb4759 100644 struct ctl_table_header *forw_hdr; #endif -@@ -2236,7 +2236,7 @@ static __net_init int devinet_init_net(struct net *net) +@@ -2233,7 +2233,7 @@ static __net_init int devinet_init_net(struct net *net) goto err_alloc_dflt; #ifdef CONFIG_SYSCTL @@ -99476,7 +107658,7 @@ index bdbf68b..deb4759 100644 if (tbl == NULL) goto err_alloc_ctl; -@@ -2256,7 +2256,10 @@ static __net_init int devinet_init_net(struct net *net) +@@ -2253,7 +2253,10 @@ static __net_init int devinet_init_net(struct net *net) goto err_reg_dflt; err = -ENOMEM; @@ -99488,7 +107670,7 @@ index bdbf68b..deb4759 100644 if (forw_hdr == NULL) goto err_reg_ctl; net->ipv4.forw_hdr = forw_hdr; -@@ -2272,8 +2275,7 @@ err_reg_ctl: +@@ -2269,8 +2272,7 @@ err_reg_ctl: err_reg_dflt: __devinet_sysctl_unregister(all); err_reg_all: @@ -99539,21 +107721,8 @@ index b10cd43a..22327f9 100644 return nh->nh_saddr; } -diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c -index a56b8e6..5be2a30 100644 ---- a/net/ipv4/inet_connection_sock.c -+++ b/net/ipv4/inet_connection_sock.c -@@ -29,7 +29,7 @@ const char inet_csk_timer_bug_msg[] = "inet_csk BUG: unknown timer value\n"; - EXPORT_SYMBOL(inet_csk_timer_bug_msg); - #endif - --unsigned long *sysctl_local_reserved_ports; -+unsigned long sysctl_local_reserved_ports[65536 / 8 / sizeof(unsigned long)]; - EXPORT_SYMBOL(sysctl_local_reserved_ports); - - void inet_get_local_port_range(struct net *net, int *low, int *high) diff --git a/net/ipv4/inet_hashtables.c b/net/ipv4/inet_hashtables.c -index 8b9cf27..0d8d592 100644 +index 43116e8..e3e6159 100644 --- a/net/ipv4/inet_hashtables.c +++ b/net/ipv4/inet_hashtables.c @@ -18,6 +18,7 @@ @@ -99583,20 +107752,18 @@ index 8b9cf27..0d8d592 100644 inet_twsk_deschedule(tw, death_row); while (twrefcnt) { diff --git a/net/ipv4/inetpeer.c b/net/ipv4/inetpeer.c -index 48f4244..f56d83a 100644 +index bd5f592..e80e605 100644 --- a/net/ipv4/inetpeer.c +++ b/net/ipv4/inetpeer.c -@@ -496,8 +496,8 @@ relookup: +@@ -482,7 +482,7 @@ relookup: if (p) { p->daddr = *daddr; atomic_set(&p->refcnt, 1); - atomic_set(&p->rid, 0); -- atomic_set(&p->ip_id_count, + atomic_set_unchecked(&p->rid, 0); -+ atomic_set_unchecked(&p->ip_id_count, - (daddr->family == AF_INET) ? - secure_ip_id(daddr->addr.a4) : - secure_ipv6_id(daddr->addr.a6)); + p->metrics[RTAX_LOCK-1] = INETPEER_METRICS_NEW; + p->rate_tokens = 0; + /* 60*HZ is arbitrary, but chosen enough high so that the first diff --git a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c index ed32313..3762abe 100644 --- a/net/ipv4/ip_fragment.c @@ -99649,7 +107816,7 @@ index ed32313..3762abe 100644 return -ENOMEM; } diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c -index 94213c8..8bdb342 100644 +index 9b84254..c776611 100644 --- a/net/ipv4/ip_gre.c +++ b/net/ipv4/ip_gre.c @@ -115,7 +115,7 @@ static bool log_ecn_error = true; @@ -99661,7 +107828,7 @@ index 94213c8..8bdb342 100644 static int ipgre_tunnel_init(struct net_device *dev); static int ipgre_net_id __read_mostly; -@@ -732,7 +732,7 @@ static const struct nla_policy ipgre_policy[IFLA_GRE_MAX + 1] = { +@@ -733,7 +733,7 @@ static const struct nla_policy ipgre_policy[IFLA_GRE_MAX + 1] = { [IFLA_GRE_PMTUDISC] = { .type = NLA_U8 }, }; @@ -99670,7 +107837,7 @@ index 94213c8..8bdb342 100644 .kind = "gre", .maxtype = IFLA_GRE_MAX, .policy = ipgre_policy, -@@ -746,7 +746,7 @@ static struct rtnl_link_ops ipgre_link_ops __read_mostly = { +@@ -747,7 +747,7 @@ static struct rtnl_link_ops ipgre_link_ops __read_mostly = { .fill_info = ipgre_fill_info, }; @@ -99702,44 +107869,8 @@ index 64741b9..6f334a2 100644 msg.msg_controllen = len; msg.msg_flags = flags; -diff --git a/net/ipv4/ip_tunnel.c b/net/ipv4/ip_tunnel.c -index 2acc233..b93143f 100644 ---- a/net/ipv4/ip_tunnel.c -+++ b/net/ipv4/ip_tunnel.c -@@ -73,12 +73,7 @@ static void __tunnel_dst_set(struct ip_tunnel_dst *idst, - { - struct dst_entry *old_dst; - -- if (dst) { -- if (dst->flags & DST_NOCACHE) -- dst = NULL; -- else -- dst_clone(dst); -- } -+ dst_clone(dst); - old_dst = xchg((__force struct dst_entry **)&idst->dst, dst); - dst_release(old_dst); - } -@@ -108,13 +103,14 @@ static struct rtable *tunnel_rtable_get(struct ip_tunnel *t, u32 cookie) - - rcu_read_lock(); - dst = rcu_dereference(this_cpu_ptr(t->dst_cache)->dst); -+ if (dst && !atomic_inc_not_zero(&dst->__refcnt)) -+ dst = NULL; - if (dst) { - if (dst->obsolete && dst->ops->check(dst, cookie) == NULL) { -- rcu_read_unlock(); - tunnel_dst_reset(t); -- return NULL; -+ dst_release(dst); -+ dst = NULL; - } -- dst_hold(dst); - } - rcu_read_unlock(); - return (struct rtable *)dst; diff --git a/net/ipv4/ip_vti.c b/net/ipv4/ip_vti.c -index 13ef00f..8ffca25 100644 +index b8960f3..0f025db 100644 --- a/net/ipv4/ip_vti.c +++ b/net/ipv4/ip_vti.c @@ -45,7 +45,7 @@ @@ -99751,7 +107882,7 @@ index 13ef00f..8ffca25 100644 static int vti_net_id __read_mostly; static int vti_tunnel_init(struct net_device *dev); -@@ -513,7 +513,7 @@ static const struct nla_policy vti_policy[IFLA_VTI_MAX + 1] = { +@@ -519,7 +519,7 @@ static const struct nla_policy vti_policy[IFLA_VTI_MAX + 1] = { [IFLA_VTI_REMOTE] = { .len = FIELD_SIZEOF(struct iphdr, daddr) }, }; @@ -99925,7 +108056,7 @@ index 2510c02..cfb34fa 100644 pr_err("Unable to proc dir entry\n"); return -ENOMEM; diff --git a/net/ipv4/ping.c b/net/ipv4/ping.c -index 044a0dd..e0c1971 100644 +index 044a0dd..3399751 100644 --- a/net/ipv4/ping.c +++ b/net/ipv4/ping.c @@ -59,7 +59,7 @@ struct ping_table { @@ -99964,28 +108095,7 @@ index 044a0dd..e0c1971 100644 info, (u8 *)icmph); #endif } -@@ -844,6 +844,8 @@ int ping_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, - { - struct inet_sock *isk = inet_sk(sk); - int family = sk->sk_family; -+ struct sockaddr_in *sin; -+ struct sockaddr_in6 *sin6; - struct sk_buff *skb; - int copied, err; - -@@ -853,12 +855,19 @@ int ping_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, - if (flags & MSG_OOB) - goto out; - -+ if (addr_len) { -+ if (family == AF_INET) -+ *addr_len = sizeof(*sin); -+ else if (family == AF_INET6 && addr_len) -+ *addr_len = sizeof(*sin6); -+ } -+ - if (flags & MSG_ERRQUEUE) { - if (family == AF_INET) { +@@ -858,7 +858,7 @@ int ping_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, return ip_recv_error(sk, msg, len, addr_len); #if IS_ENABLED(CONFIG_IPV6) } else if (family == AF_INET6) { @@ -99994,19 +108104,7 @@ index 044a0dd..e0c1971 100644 addr_len); #endif } -@@ -890,7 +899,6 @@ int ping_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, - sin->sin_port = 0 /* skb->h.uh->source */; - sin->sin_addr.s_addr = ip_hdr(skb)->saddr; - memset(sin->sin_zero, 0, sizeof(sin->sin_zero)); -- *addr_len = sizeof(*sin); - } - - if (isk->cmsg_flags) -@@ -912,14 +920,13 @@ int ping_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, - sin6->sin6_scope_id = - ipv6_iface_scope_id(&sin6->sin6_addr, - IP6CB(skb)->iif); -- *addr_len = sizeof(*sin6); +@@ -916,10 +916,10 @@ int ping_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, } if (inet6_sk(sk)->rxopt.all) @@ -100019,7 +108117,7 @@ index 044a0dd..e0c1971 100644 else if (skb->protocol == htons(ETH_P_IP) && isk->cmsg_flags) ip_cmsg_recv(msg, skb); #endif -@@ -1111,7 +1118,7 @@ static void ping_v4_format_sock(struct sock *sp, struct seq_file *f, +@@ -1111,7 +1111,7 @@ static void ping_v4_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, @@ -100029,7 +108127,7 @@ index 044a0dd..e0c1971 100644 static int ping_v4_seq_show(struct seq_file *seq, void *v) diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c -index a9dbe58..46f577f 100644 +index 2c65160..213ecdf 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) @@ -100041,25 +108139,7 @@ index a9dbe58..46f577f 100644 kfree_skb(skb); return NET_RX_DROP; } -@@ -696,6 +696,9 @@ static int raw_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, - if (flags & MSG_OOB) - goto out; - -+ if (addr_len) -+ *addr_len = sizeof(*sin); -+ - if (flags & MSG_ERRQUEUE) { - err = ip_recv_error(sk, msg, len, addr_len); - goto out; -@@ -723,7 +726,6 @@ static int raw_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, - sin->sin_addr.s_addr = ip_hdr(skb)->saddr; - sin->sin_port = 0; - memset(&sin->sin_zero, 0, sizeof(sin->sin_zero)); -- *addr_len = sizeof(*sin); - } - if (inet->cmsg_flags) - ip_cmsg_recv(msg, skb); -@@ -748,16 +750,20 @@ static int raw_init(struct sock *sk) +@@ -748,16 +748,20 @@ static int raw_init(struct sock *sk) static int raw_seticmpfilter(struct sock *sk, char __user *optval, int optlen) { @@ -100081,7 +108161,7 @@ index a9dbe58..46f577f 100644 if (get_user(len, optlen)) goto out; -@@ -767,8 +773,8 @@ static int raw_geticmpfilter(struct sock *sk, char __user *optval, int __user *o +@@ -767,8 +771,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; @@ -100092,7 +108172,7 @@ index a9dbe58..46f577f 100644 goto out; ret = 0; out: return ret; -@@ -997,7 +1003,7 @@ static void raw_sock_seq_show(struct seq_file *seq, struct sock *sp, int i) +@@ -997,7 +1001,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), @@ -100102,10 +108182,10 @@ index a9dbe58..46f577f 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 5e676be..f6c62f1 100644 +index 1901998..a9a850a 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c -@@ -227,7 +227,7 @@ static const struct seq_operations rt_cache_seq_ops = { +@@ -228,7 +228,7 @@ static const struct seq_operations rt_cache_seq_ops = { static int rt_cache_seq_open(struct inode *inode, struct file *file) { @@ -100114,7 +108194,7 @@ index 5e676be..f6c62f1 100644 } static const struct file_operations rt_cache_seq_fops = { -@@ -318,7 +318,7 @@ static const struct seq_operations rt_cpu_seq_ops = { +@@ -319,7 +319,7 @@ static const struct seq_operations rt_cpu_seq_ops = { static int rt_cpu_seq_open(struct inode *inode, struct file *file) { @@ -100123,7 +108203,7 @@ index 5e676be..f6c62f1 100644 } static const struct file_operations rt_cpu_seq_fops = { -@@ -356,7 +356,7 @@ static int rt_acct_proc_show(struct seq_file *m, void *v) +@@ -357,7 +357,7 @@ static int rt_acct_proc_show(struct seq_file *m, void *v) static int rt_acct_proc_open(struct inode *inode, struct file *file) { @@ -100132,7 +108212,30 @@ index 5e676be..f6c62f1 100644 } static const struct file_operations rt_acct_proc_fops = { -@@ -2610,34 +2610,34 @@ static struct ctl_table ipv4_route_flush_table[] = { +@@ -459,11 +459,11 @@ static struct neighbour *ipv4_neigh_lookup(const struct dst_entry *dst, + + #define IP_IDENTS_SZ 2048u + struct ip_ident_bucket { +- atomic_t id; ++ atomic_unchecked_t id; + u32 stamp32; + }; + +-static struct ip_ident_bucket *ip_idents __read_mostly; ++static struct ip_ident_bucket ip_idents[IP_IDENTS_SZ] __read_mostly; + + /* In order to protect privacy, we add a perturbation to identifiers + * if one generator is seldom used. This makes hard for an attacker +@@ -479,7 +479,7 @@ u32 ip_idents_reserve(u32 hash, int segs) + if (old != now && cmpxchg(&bucket->stamp32, old, now) == old) + delta = prandom_u32_max(now - old); + +- return atomic_add_return(segs + delta, &bucket->id) - segs; ++ return atomic_add_return_unchecked(segs + delta, &bucket->id) - segs; + } + EXPORT_SYMBOL(ip_idents_reserve); + +@@ -2625,34 +2625,34 @@ static struct ctl_table ipv4_route_flush_table[] = { .maxlen = sizeof(int), .mode = 0200, .proc_handler = ipv4_sysctl_rtcache_flush, @@ -100175,7 +108278,7 @@ index 5e676be..f6c62f1 100644 err_dup: return -ENOMEM; } -@@ -2660,8 +2660,8 @@ static __net_initdata struct pernet_operations sysctl_route_ops = { +@@ -2675,8 +2675,8 @@ static __net_initdata struct pernet_operations sysctl_route_ops = { static __net_init int rt_genid_init(struct net *net) { @@ -100186,8 +108289,21 @@ index 5e676be..f6c62f1 100644 get_random_bytes(&net->ipv4.dev_addr_genid, sizeof(net->ipv4.dev_addr_genid)); return 0; +@@ -2719,11 +2719,7 @@ int __init ip_rt_init(void) + { + int rc = 0; + +- ip_idents = kmalloc(IP_IDENTS_SZ * sizeof(*ip_idents), GFP_KERNEL); +- if (!ip_idents) +- panic("IP: failed to allocate ip_idents\n"); +- +- prandom_bytes(ip_idents, IP_IDENTS_SZ * sizeof(*ip_idents)); ++ prandom_bytes(ip_idents, sizeof(ip_idents)); + + #ifdef CONFIG_IP_ROUTE_CLASSID + ip_rt_acct = __alloc_percpu(256 * sizeof(struct ip_rt_acct), __alignof__(struct ip_rt_acct)); diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c -index 5cde8f2..5f5684e 100644 +index 79a007c..5023029 100644 --- a/net/ipv4/sysctl_net_ipv4.c +++ b/net/ipv4/sysctl_net_ipv4.c @@ -60,7 +60,7 @@ static int ipv4_local_port_range(struct ctl_table *table, int write, @@ -100244,16 +108360,7 @@ index 5cde8f2..5f5684e 100644 struct tcp_fastopen_context *ctxt; int ret; u32 user_key[4]; /* 16 bytes, matching TCP_FASTOPEN_KEY_LENGTH */ -@@ -438,7 +438,7 @@ static struct ctl_table ipv4_table[] = { - }, - { - .procname = "ip_local_reserved_ports", -- .data = NULL, /* initialized in sysctl_ipv4_init */ -+ .data = sysctl_local_reserved_ports, - .maxlen = 65536, - .mode = 0644, - .proc_handler = proc_do_large_bitmap, -@@ -843,13 +843,12 @@ static struct ctl_table ipv4_net_table[] = { +@@ -857,13 +857,12 @@ static struct ctl_table ipv4_net_table[] = { static __net_init int ipv4_sysctl_init_net(struct net *net) { @@ -100269,7 +108376,7 @@ index 5cde8f2..5f5684e 100644 if (table == NULL) goto err_alloc; -@@ -858,15 +857,17 @@ static __net_init int ipv4_sysctl_init_net(struct net *net) +@@ -872,7 +871,10 @@ static __net_init int ipv4_sysctl_init_net(struct net *net) table[i].data += (void *)net - (void *)&init_net; } @@ -100281,34 +108388,8 @@ index 5cde8f2..5f5684e 100644 if (net->ipv4.ipv4_hdr == NULL) goto err_reg; - return 0; - - err_reg: -- if (!net_eq(net, &init_net)) -- kfree(table); -+ kfree(table); - err_alloc: - return -ENOMEM; - } -@@ -888,16 +889,6 @@ static __net_initdata struct pernet_operations ipv4_sysctl_ops = { - static __init int sysctl_ipv4_init(void) - { - struct ctl_table_header *hdr; -- struct ctl_table *i; -- -- for (i = ipv4_table; i->procname; i++) { -- if (strcmp(i->procname, "ip_local_reserved_ports") == 0) { -- i->data = sysctl_local_reserved_ports; -- break; -- } -- } -- if (!i->procname) -- return -EINVAL; - - 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 3a26b3b..8bbe4ae 100644 +index 40639c2..dfc86b2 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c @@ -754,7 +754,7 @@ static void tcp_update_pacing_rate(struct sock *sk) @@ -100329,7 +108410,7 @@ index 3a26b3b..8bbe4ae 100644 struct sk_buff *head, struct sk_buff *tail, u32 start, u32 end) { -@@ -5558,6 +5558,7 @@ discard: +@@ -5536,6 +5536,7 @@ discard: tcp_paws_reject(&tp->rx_opt, 0)) goto discard_and_undo; @@ -100337,7 +108418,7 @@ index 3a26b3b..8bbe4ae 100644 if (th->syn) { /* We see SYN without ACK. It is attempt of * simultaneous connect with crossed SYNs. -@@ -5608,6 +5609,7 @@ discard: +@@ -5586,6 +5587,7 @@ discard: goto discard; #endif } @@ -100345,7 +108426,7 @@ index 3a26b3b..8bbe4ae 100644 /* "fifth, if neither of the SYN or RST bits is set then * drop the segment and return." */ -@@ -5654,7 +5656,7 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb, +@@ -5632,7 +5634,7 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb, goto discard; if (th->syn) { @@ -100355,7 +108436,7 @@ index 3a26b3b..8bbe4ae 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 438f3b9..bc9e1ad 100644 +index 77cccda..10122c4 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c @@ -91,6 +91,10 @@ int sysctl_tcp_low_latency __read_mostly; @@ -100369,7 +108450,7 @@ index 438f3b9..bc9e1ad 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); -@@ -1829,6 +1833,9 @@ int tcp_v4_do_rcv(struct sock *sk, struct sk_buff *skb) +@@ -1591,6 +1595,9 @@ int tcp_v4_do_rcv(struct sock *sk, struct sk_buff *skb) return 0; reset: @@ -100379,7 +108460,7 @@ index 438f3b9..bc9e1ad 100644 tcp_v4_send_reset(rsk, skb); discard: kfree_skb(skb); -@@ -1974,12 +1981,19 @@ int tcp_v4_rcv(struct sk_buff *skb) +@@ -1737,12 +1744,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); @@ -100402,7 +108483,7 @@ index 438f3b9..bc9e1ad 100644 if (unlikely(iph->ttl < inet_sk(sk)->min_ttl)) { NET_INC_STATS_BH(net, LINUX_MIB_TCPMINTTLDROP); -@@ -2033,6 +2047,10 @@ csum_error: +@@ -1796,6 +1810,10 @@ csum_error: bad_packet: TCP_INC_STATS_BH(net, TCP_MIB_INERRS); } else { @@ -100414,7 +108495,7 @@ index 438f3b9..bc9e1ad 100644 } diff --git a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c -index 05c1b15..3e9344b 100644 +index e68e0d4..0334263 100644 --- a/net/ipv4/tcp_minisocks.c +++ b/net/ipv4/tcp_minisocks.c @@ -27,6 +27,10 @@ @@ -100428,7 +108509,7 @@ index 05c1b15..3e9344b 100644 int sysctl_tcp_syncookies __read_mostly = 1; EXPORT_SYMBOL(sysctl_tcp_syncookies); -@@ -709,7 +713,10 @@ embryonic_reset: +@@ -740,7 +744,10 @@ embryonic_reset: * avoid becoming vulnerable to outside attack aiming at * resetting legit local connections. */ @@ -100483,7 +108564,7 @@ index 286227a..c495a76 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 54a5fe9..78fea00 100644 +index 7d5a866..4874211 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c @@ -87,6 +87,7 @@ @@ -100515,7 +108596,7 @@ index 54a5fe9..78fea00 100644 /* * This routine is called by the ICMP module when it gets some * sort of error condition. If err < 0 then the socket should -@@ -914,9 +922,18 @@ int udp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, +@@ -952,9 +960,18 @@ int udp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, dport = usin->sin_port; if (dport == 0) return -EINVAL; @@ -100534,7 +108615,7 @@ index 54a5fe9..78fea00 100644 daddr = inet->inet_daddr; dport = inet->inet_dport; /* Open fast path for connected socket. -@@ -1164,7 +1181,7 @@ static unsigned int first_packet_length(struct sock *sk) +@@ -1202,7 +1219,7 @@ static unsigned int first_packet_length(struct sock *sk) IS_UDPLITE(sk)); UDP_INC_STATS_BH(sock_net(sk), UDP_MIB_INERRORS, IS_UDPLITE(sk)); @@ -100543,20 +108624,7 @@ index 54a5fe9..78fea00 100644 __skb_unlink(skb, rcvq); __skb_queue_tail(&list_kill, skb); } -@@ -1235,6 +1252,12 @@ int udp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, - int is_udplite = IS_UDPLITE(sk); - bool slow; - -+ /* -+ * Check any passed addresses -+ */ -+ if (addr_len) -+ *addr_len = sizeof(*sin); -+ - if (flags & MSG_ERRQUEUE) - return ip_recv_error(sk, msg, len, addr_len); - -@@ -1244,6 +1267,10 @@ try_again: +@@ -1282,6 +1299,10 @@ try_again: if (!skb) goto out; @@ -100567,7 +108635,7 @@ index 54a5fe9..78fea00 100644 ulen = skb->len - sizeof(struct udphdr); copied = len; if (copied > ulen) -@@ -1277,7 +1304,7 @@ try_again: +@@ -1315,7 +1336,7 @@ try_again: if (unlikely(err)) { trace_kfree_skb(skb, udp_recvmsg); if (!peeked) { @@ -100576,15 +108644,7 @@ index 54a5fe9..78fea00 100644 UDP_INC_STATS_USER(sock_net(sk), UDP_MIB_INERRORS, is_udplite); } -@@ -1296,7 +1323,6 @@ try_again: - sin->sin_port = udp_hdr(skb)->source; - sin->sin_addr.s_addr = ip_hdr(skb)->saddr; - memset(sin->sin_zero, 0, sizeof(sin->sin_zero)); -- *addr_len = sizeof(*sin); - } - if (inet->cmsg_flags) - ip_cmsg_recv(msg, skb); -@@ -1567,7 +1593,7 @@ csum_error: +@@ -1612,7 +1633,7 @@ csum_error: UDP_INC_STATS_BH(sock_net(sk), UDP_MIB_CSUMERRORS, is_udplite); drop: UDP_INC_STATS_BH(sock_net(sk), UDP_MIB_INERRORS, is_udplite); @@ -100593,7 +108653,7 @@ index 54a5fe9..78fea00 100644 kfree_skb(skb); return -1; } -@@ -1586,7 +1612,7 @@ static void flush_stack(struct sock **stack, unsigned int count, +@@ -1631,7 +1652,7 @@ static void flush_stack(struct sock **stack, unsigned int count, skb1 = (i == final) ? skb : skb_clone(skb, GFP_ATOMIC); if (!skb1) { @@ -100602,7 +108662,7 @@ index 54a5fe9..78fea00 100644 UDP_INC_STATS_BH(sock_net(sk), UDP_MIB_RCVBUFERRORS, IS_UDPLITE(sk)); UDP_INC_STATS_BH(sock_net(sk), UDP_MIB_INERRORS, -@@ -1787,6 +1813,9 @@ int __udp4_lib_rcv(struct sk_buff *skb, struct udp_table *udptable, +@@ -1817,6 +1838,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); @@ -100612,7 +108672,7 @@ index 54a5fe9..78fea00 100644 icmp_send(skb, ICMP_DEST_UNREACH, ICMP_PORT_UNREACH, 0); /* -@@ -2355,7 +2384,7 @@ static void udp4_format_sock(struct sock *sp, struct seq_file *f, +@@ -2403,7 +2427,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, @@ -100675,10 +108735,10 @@ index 6156f68..d6ab46d 100644 return -ENOMEM; } diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c -index 6c7fa08..8a31430 100644 +index 5667b30..2044f61 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c -@@ -598,7 +598,7 @@ static int inet6_netconf_dump_devconf(struct sk_buff *skb, +@@ -593,7 +593,7 @@ static int inet6_netconf_dump_devconf(struct sk_buff *skb, idx = 0; head = &net->dev_index_head[h]; rcu_read_lock(); @@ -100687,7 +108747,7 @@ index 6c7fa08..8a31430 100644 net->dev_base_seq; hlist_for_each_entry_rcu(dev, head, index_hlist) { if (idx < s_idx) -@@ -2395,7 +2395,7 @@ int addrconf_set_dstaddr(struct net *net, void __user *arg) +@@ -2390,7 +2390,7 @@ int addrconf_set_dstaddr(struct net *net, void __user *arg) p.iph.ihl = 5; p.iph.protocol = IPPROTO_IPV6; p.iph.ttl = 64; @@ -100696,7 +108756,7 @@ index 6c7fa08..8a31430 100644 if (ops->ndo_do_ioctl) { mm_segment_t oldfs = get_fs(); -@@ -3528,16 +3528,23 @@ static const struct file_operations if6_fops = { +@@ -3516,16 +3516,23 @@ static const struct file_operations if6_fops = { .release = seq_release_net, }; @@ -100721,7 +108781,7 @@ index 6c7fa08..8a31430 100644 } static struct pernet_operations if6_proc_net_ops = { -@@ -4146,7 +4153,7 @@ static int inet6_dump_addr(struct sk_buff *skb, struct netlink_callback *cb, +@@ -4141,7 +4148,7 @@ static int inet6_dump_addr(struct sk_buff *skb, struct netlink_callback *cb, s_ip_idx = ip_idx = cb->args[2]; rcu_read_lock(); @@ -100730,7 +108790,21 @@ index 6c7fa08..8a31430 100644 for (h = s_h; h < NETDEV_HASHENTRIES; h++, s_idx = 0) { idx = 0; head = &net->dev_index_head[h]; -@@ -4758,7 +4765,7 @@ static void __ipv6_ifa_notify(int event, struct inet6_ifaddr *ifp) +@@ -4741,11 +4748,8 @@ static void __ipv6_ifa_notify(int event, struct inet6_ifaddr *ifp) + + rt = rt6_lookup(dev_net(dev), &ifp->peer_addr, NULL, + dev->ifindex, 1); +- if (rt) { +- dst_hold(&rt->dst); +- if (ip6_del_rt(rt)) +- dst_free(&rt->dst); +- } ++ if (rt && ip6_del_rt(rt)) ++ dst_free(&rt->dst); + } + dst_hold(&ifp->rt->dst); + +@@ -4753,7 +4757,7 @@ static void __ipv6_ifa_notify(int event, struct inet6_ifaddr *ifp) dst_free(&ifp->rt->dst); break; } @@ -100739,7 +108813,7 @@ index 6c7fa08..8a31430 100644 rt_genid_bump_ipv6(net); } -@@ -4779,7 +4786,7 @@ int addrconf_sysctl_forward(struct ctl_table *ctl, int write, +@@ -4774,7 +4778,7 @@ int addrconf_sysctl_forward(struct ctl_table *ctl, int write, int *valp = ctl->data; int val = *valp; loff_t pos = *ppos; @@ -100748,7 +108822,7 @@ index 6c7fa08..8a31430 100644 int ret; /* -@@ -4864,7 +4871,7 @@ int addrconf_sysctl_disable(struct ctl_table *ctl, int write, +@@ -4859,7 +4863,7 @@ int addrconf_sysctl_disable(struct ctl_table *ctl, int write, int *valp = ctl->data; int val = *valp; loff_t pos = *ppos; @@ -100758,10 +108832,10 @@ index 6c7fa08..8a31430 100644 /* diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c -index d935889..2f64330 100644 +index 7cb4392..dc96d28 100644 --- a/net/ipv6/af_inet6.c +++ b/net/ipv6/af_inet6.c -@@ -776,7 +776,7 @@ static int __net_init inet6_net_init(struct net *net) +@@ -765,7 +765,7 @@ static int __net_init inet6_net_init(struct net *net) net->ipv6.sysctl.bindv6only = 0; net->ipv6.sysctl.icmpv6_time = 1*HZ; net->ipv6.sysctl.flowlabel_consistency = 1; @@ -100782,10 +108856,10 @@ index c3bf2d2..1f00573 100644 + atomic_read_unchecked(&sp->sk_drops)); } diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c -index 7b32652..0bc348b 100644 +index f6c84a6..9f2084e 100644 --- a/net/ipv6/icmp.c +++ b/net/ipv6/icmp.c -@@ -1005,7 +1005,7 @@ static struct ctl_table ipv6_icmp_table_template[] = { +@@ -990,7 +990,7 @@ static struct ctl_table ipv6_icmp_table_template[] = { struct ctl_table * __net_init ipv6_icmp_sysctl_init(struct net *net) { @@ -100795,19 +108869,21 @@ index 7b32652..0bc348b 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 9d92146..d986c6a 100644 +index 3873181..220ad3f 100644 --- a/net/ipv6/ip6_gre.c +++ b/net/ipv6/ip6_gre.c -@@ -71,7 +71,7 @@ struct ip6gre_net { +@@ -71,8 +71,8 @@ struct ip6gre_net { struct net_device *fb_tunnel_dev; }; -static struct rtnl_link_ops ip6gre_link_ops __read_mostly; +-static struct rtnl_link_ops ip6gre_tap_ops __read_mostly; +static struct rtnl_link_ops ip6gre_link_ops; ++static struct rtnl_link_ops ip6gre_tap_ops; static int ip6gre_tunnel_init(struct net_device *dev); static void ip6gre_tunnel_setup(struct net_device *dev); static void ip6gre_tunnel_link(struct ip6gre_net *ign, struct ip6_tnl *t); -@@ -1291,7 +1291,7 @@ static void ip6gre_fb_tunnel_init(struct net_device *dev) +@@ -1280,7 +1280,7 @@ static void ip6gre_fb_tunnel_init(struct net_device *dev) } @@ -100816,7 +108892,7 @@ index 9d92146..d986c6a 100644 .handler = ip6gre_rcv, .err_handler = ip6gre_err, .flags = INET6_PROTO_NOPOLICY|INET6_PROTO_FINAL, -@@ -1636,7 +1636,7 @@ static const struct nla_policy ip6gre_policy[IFLA_GRE_MAX + 1] = { +@@ -1638,7 +1638,7 @@ static const struct nla_policy ip6gre_policy[IFLA_GRE_MAX + 1] = { [IFLA_GRE_FLAGS] = { .type = NLA_U32 }, }; @@ -100825,7 +108901,7 @@ index 9d92146..d986c6a 100644 .kind = "ip6gre", .maxtype = IFLA_GRE_MAX, .policy = ip6gre_policy, -@@ -1650,7 +1650,7 @@ static struct rtnl_link_ops ip6gre_link_ops __read_mostly = { +@@ -1652,7 +1652,7 @@ static struct rtnl_link_ops ip6gre_link_ops __read_mostly = { .fill_info = ip6gre_fill_info, }; @@ -100857,7 +108933,7 @@ index afa0824..04ba530 100644 .maxtype = IFLA_IPTUN_MAX, .policy = ip6_tnl_policy, diff --git a/net/ipv6/ip6_vti.c b/net/ipv6/ip6_vti.c -index 6cc9f93..6e5bb7c 100644 +index 9aaa6bb..5c13e57 100644 --- a/net/ipv6/ip6_vti.c +++ b/net/ipv6/ip6_vti.c @@ -62,7 +62,7 @@ static u32 HASH(const struct in6_addr *addr1, const struct in6_addr *addr2) @@ -100869,7 +108945,7 @@ index 6cc9f93..6e5bb7c 100644 static int vti6_net_id __read_mostly; struct vti6_net { -@@ -980,7 +980,7 @@ static const struct nla_policy vti6_policy[IFLA_VTI_MAX + 1] = { +@@ -977,7 +977,7 @@ static const struct nla_policy vti6_policy[IFLA_VTI_MAX + 1] = { [IFLA_VTI_OKEY] = { .type = NLA_U32 }, }; @@ -100941,7 +109017,7 @@ index e080fbb..412b3cf 100644 case IP6T_SO_GET_ENTRIES: diff --git a/net/ipv6/netfilter/nf_conntrack_reasm.c b/net/ipv6/netfilter/nf_conntrack_reasm.c -index 767ab8d..c5ec70a 100644 +index 0d5279f..89d9f6f 100644 --- a/net/ipv6/netfilter/nf_conntrack_reasm.c +++ b/net/ipv6/netfilter/nf_conntrack_reasm.c @@ -90,12 +90,11 @@ static struct ctl_table nf_ct_frag6_sysctl_table[] = { @@ -100982,33 +109058,11 @@ index 767ab8d..c5ec70a 100644 err_alloc: return -ENOMEM; } -diff --git a/net/ipv6/output_core.c b/net/ipv6/output_core.c -index 56596ce..c734618 100644 ---- a/net/ipv6/output_core.c -+++ b/net/ipv6/output_core.c -@@ -10,7 +10,7 @@ - - void ipv6_select_ident(struct frag_hdr *fhdr, struct rt6_info *rt) - { -- static atomic_t ipv6_fragmentation_id; -+ static atomic_unchecked_t ipv6_fragmentation_id; - struct in6_addr addr; - int ident; - -@@ -26,7 +26,7 @@ void ipv6_select_ident(struct frag_hdr *fhdr, struct rt6_info *rt) - return; - } - #endif -- ident = atomic_inc_return(&ipv6_fragmentation_id); -+ ident = atomic_inc_return_unchecked(&ipv6_fragmentation_id); - - addr = rt->rt6i_dst.addr; - addr.s6_addr32[0] ^= (__force __be32)ident; diff --git a/net/ipv6/ping.c b/net/ipv6/ping.c -index bda7429..469b26b 100644 +index 5b7a1ed..d9da205 100644 --- a/net/ipv6/ping.c +++ b/net/ipv6/ping.c -@@ -246,6 +246,24 @@ static struct pernet_operations ping_v6_net_ops = { +@@ -240,6 +240,24 @@ static struct pernet_operations ping_v6_net_ops = { }; #endif @@ -101033,7 +109087,7 @@ index bda7429..469b26b 100644 int __init pingv6_init(void) { #ifdef CONFIG_PROC_FS -@@ -253,13 +271,7 @@ int __init pingv6_init(void) +@@ -247,13 +265,7 @@ int __init pingv6_init(void) if (ret) return ret; #endif @@ -101048,7 +109102,7 @@ index bda7429..469b26b 100644 return inet6_register_protosw(&pingv6_protosw); } -@@ -268,14 +280,9 @@ int __init pingv6_init(void) +@@ -262,14 +274,9 @@ int __init pingv6_init(void) */ void pingv6_exit(void) { @@ -101065,7 +109119,7 @@ index bda7429..469b26b 100644 inet6_unregister_protosw(&pingv6_protosw); } diff --git a/net/ipv6/proc.c b/net/ipv6/proc.c -index 091d066..139d410 100644 +index 3317440..201764e 100644 --- a/net/ipv6/proc.c +++ b/net/ipv6/proc.c @@ -309,7 +309,7 @@ static int __net_init ipv6_proc_init_net(struct net *net) @@ -101078,7 +109132,7 @@ index 091d066..139d410 100644 goto proc_dev_snmp6_fail; return 0; diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c -index 1f29996..46fe0c7 100644 +index b2dc60b..a6b6c10 100644 --- a/net/ipv6/raw.c +++ b/net/ipv6/raw.c @@ -388,7 +388,7 @@ static inline int rawv6_rcv_skb(struct sock *sk, struct sk_buff *skb) @@ -101108,25 +109162,7 @@ index 1f29996..46fe0c7 100644 kfree_skb(skb); return NET_RX_DROP; } -@@ -469,6 +469,9 @@ static int rawv6_recvmsg(struct kiocb *iocb, struct sock *sk, - if (flags & MSG_OOB) - return -EOPNOTSUPP; - -+ if (addr_len) -+ *addr_len=sizeof(*sin6); -+ - if (flags & MSG_ERRQUEUE) - return ipv6_recv_error(sk, msg, len, addr_len); - -@@ -507,7 +510,6 @@ static int rawv6_recvmsg(struct kiocb *iocb, struct sock *sk, - sin6->sin6_flowinfo = 0; - sin6->sin6_scope_id = ipv6_iface_scope_id(&sin6->sin6_addr, - IP6CB(skb)->iif); -- *addr_len = sizeof(*sin6); - } - - sock_recv_ts_and_drops(msg, sk, skb); -@@ -610,7 +612,7 @@ out: +@@ -610,7 +610,7 @@ out: return err; } @@ -101135,7 +109171,7 @@ index 1f29996..46fe0c7 100644 struct flowi6 *fl6, struct dst_entry **dstp, unsigned int flags) { -@@ -922,12 +924,15 @@ do_confirm: +@@ -916,12 +916,15 @@ do_confirm: static int rawv6_seticmpfilter(struct sock *sk, int level, int optname, char __user *optval, int optlen) { @@ -101152,7 +109188,7 @@ index 1f29996..46fe0c7 100644 return 0; default: return -ENOPROTOOPT; -@@ -940,6 +945,7 @@ static int rawv6_geticmpfilter(struct sock *sk, int level, int optname, +@@ -934,6 +937,7 @@ static int rawv6_geticmpfilter(struct sock *sk, int level, int optname, char __user *optval, int __user *optlen) { int len; @@ -101160,7 +109196,7 @@ index 1f29996..46fe0c7 100644 switch (optname) { case ICMPV6_FILTER: -@@ -951,7 +957,8 @@ static int rawv6_geticmpfilter(struct sock *sk, int level, int optname, +@@ -945,7 +949,8 @@ static int rawv6_geticmpfilter(struct sock *sk, int level, int optname, len = sizeof(struct icmp6_filter); if (put_user(len, optlen)) return -EFAULT; @@ -101213,7 +109249,7 @@ index cc85a9b..526a133 100644 return -ENOMEM; } diff --git a/net/ipv6/route.c b/net/ipv6/route.c -index 6ebdb7b6..f225ab1 100644 +index f23fbd2..7868241 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -2971,7 +2971,7 @@ struct ctl_table ipv6_route_table_template[] = { @@ -101248,10 +109284,10 @@ index 4f40817..54dcbef 100644 .maxtype = IFLA_IPTUN_MAX, .policy = ipip6_policy, diff --git a/net/ipv6/sysctl_net_ipv6.c b/net/ipv6/sysctl_net_ipv6.c -index 7f405a1..eabef92 100644 +index 058f3ec..dec973d 100644 --- a/net/ipv6/sysctl_net_ipv6.c +++ b/net/ipv6/sysctl_net_ipv6.c -@@ -54,7 +54,7 @@ static struct ctl_table ipv6_rotable[] = { +@@ -61,7 +61,7 @@ static struct ctl_table ipv6_rotable[] = { static int __net_init ipv6_sysctl_net_init(struct net *net) { @@ -101261,7 +109297,7 @@ index 7f405a1..eabef92 100644 struct ctl_table *ipv6_icmp_table; int err; diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c -index e289830..79a5718 100644 +index 229239ad..ee2802f 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c @@ -102,6 +102,10 @@ static void inet6_sk_rx_dst_set(struct sock *sk, const struct sk_buff *skb) @@ -101275,7 +109311,7 @@ index e289830..79a5718 100644 static void tcp_v6_hash(struct sock *sk) { if (sk->sk_state != TCP_CLOSE) { -@@ -1416,6 +1420,9 @@ static int tcp_v6_do_rcv(struct sock *sk, struct sk_buff *skb) +@@ -1424,6 +1428,9 @@ static int tcp_v6_do_rcv(struct sock *sk, struct sk_buff *skb) return 0; reset: @@ -101285,7 +109321,7 @@ index e289830..79a5718 100644 tcp_v6_send_reset(sk, skb); discard: if (opt_skb) -@@ -1500,12 +1507,20 @@ static int tcp_v6_rcv(struct sk_buff *skb) +@@ -1508,12 +1515,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); @@ -101308,7 +109344,7 @@ index e289830..79a5718 100644 if (hdr->hop_limit < inet6_sk(sk)->min_hopcount) { NET_INC_STATS_BH(net, LINUX_MIB_TCPMINTTLDROP); -@@ -1557,6 +1572,10 @@ csum_error: +@@ -1565,6 +1580,10 @@ csum_error: bad_packet: TCP_INC_STATS_BH(net, TCP_MIB_INERRS); } else { @@ -101320,7 +109356,7 @@ index e289830..79a5718 100644 } diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c -index 20b63d2..13be908 100644 +index 7092ff7..3fd0eb4 100644 --- a/net/ipv6/udp.c +++ b/net/ipv6/udp.c @@ -76,6 +76,10 @@ static unsigned int udp6_ehashfn(struct net *net, @@ -101334,17 +109370,7 @@ index 20b63d2..13be908 100644 int ipv6_rcv_saddr_equal(const struct sock *sk, const struct sock *sk2) { const struct in6_addr *sk2_rcv_saddr6 = inet6_rcv_saddr(sk2); -@@ -392,6 +396,9 @@ int udpv6_recvmsg(struct kiocb *iocb, struct sock *sk, - int is_udp4; - bool slow; - -+ if (addr_len) -+ *addr_len = sizeof(struct sockaddr_in6); -+ - if (flags & MSG_ERRQUEUE) - return ipv6_recv_error(sk, msg, len, addr_len); - -@@ -435,7 +442,7 @@ try_again: +@@ -435,7 +439,7 @@ try_again: if (unlikely(err)) { trace_kfree_skb(skb, udpv6_recvmsg); if (!peeked) { @@ -101353,16 +109379,7 @@ index 20b63d2..13be908 100644 if (is_udp4) UDP_INC_STATS_USER(sock_net(sk), UDP_MIB_INERRORS, -@@ -475,7 +482,7 @@ try_again: - ipv6_iface_scope_id(&sin6->sin6_addr, - IP6CB(skb)->iif); - } -- *addr_len = sizeof(*sin6); -+ - } - - if (np->rxopt.all) -@@ -690,7 +697,7 @@ csum_error: +@@ -698,7 +702,7 @@ csum_error: UDP6_INC_STATS_BH(sock_net(sk), UDP_MIB_CSUMERRORS, is_udplite); drop: UDP6_INC_STATS_BH(sock_net(sk), UDP_MIB_INERRORS, is_udplite); @@ -101371,7 +109388,7 @@ index 20b63d2..13be908 100644 kfree_skb(skb); return -1; } -@@ -747,7 +754,7 @@ static void flush_stack(struct sock **stack, unsigned int count, +@@ -754,7 +758,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) { @@ -101380,7 +109397,7 @@ index 20b63d2..13be908 100644 UDP6_INC_STATS_BH(sock_net(sk), UDP_MIB_RCVBUFERRORS, IS_UDPLITE(sk)); UDP6_INC_STATS_BH(sock_net(sk), UDP_MIB_INERRORS, -@@ -886,6 +893,9 @@ int __udp6_lib_rcv(struct sk_buff *skb, struct udp_table *udptable, +@@ -920,6 +924,9 @@ int __udp6_lib_rcv(struct sk_buff *skb, struct udp_table *udptable, goto csum_error; UDP6_INC_STATS_BH(net, UDP_MIB_NOPORTS, proto == IPPROTO_UDPLITE); @@ -101545,12 +109562,12 @@ index b9ac598..f88cc56 100644 return; diff --git a/net/iucv/af_iucv.c b/net/iucv/af_iucv.c -index 8c9d730..66c6305 100644 +index 7a95fa4..57be196 100644 --- a/net/iucv/af_iucv.c +++ b/net/iucv/af_iucv.c -@@ -773,10 +773,10 @@ static int iucv_sock_autobind(struct sock *sk) - - write_lock_bh(&iucv_sk_list.lock); +@@ -686,10 +686,10 @@ static void __iucv_auto_name(struct iucv_sock *iucv) + { + char name[12]; - sprintf(name, "%08x", atomic_inc_return(&iucv_sk_list.autobind_name)); + sprintf(name, "%08x", atomic_inc_return_unchecked(&iucv_sk_list.autobind_name)); @@ -101559,8 +109576,8 @@ index 8c9d730..66c6305 100644 - atomic_inc_return(&iucv_sk_list.autobind_name)); + atomic_inc_return_unchecked(&iucv_sk_list.autobind_name)); } - - write_unlock_bh(&iucv_sk_list.lock); + memcpy(iucv->src_name, name, 8); + } diff --git a/net/iucv/iucv.c b/net/iucv/iucv.c index da78793..bdd78cf 100644 --- a/net/iucv/iucv.c @@ -101575,10 +109592,10 @@ index da78793..bdd78cf 100644 }; diff --git a/net/key/af_key.c b/net/key/af_key.c -index f3c8307..7127791 100644 +index ba2a2f9..b658bc3 100644 --- a/net/key/af_key.c +++ b/net/key/af_key.c -@@ -3070,10 +3070,10 @@ static int pfkey_send_policy_notify(struct xfrm_policy *xp, int dir, const struc +@@ -3052,10 +3052,10 @@ static int pfkey_send_policy_notify(struct xfrm_policy *xp, int dir, const struc static u32 get_acqseq(void) { u32 res; @@ -101667,50 +109684,20 @@ index 76125c5..e474828 100644 kfree_skb(skb); } -diff --git a/net/l2tp/l2tp_ip.c b/net/l2tp/l2tp_ip.c -index 3397fe6..861fd1a 100644 ---- a/net/l2tp/l2tp_ip.c -+++ b/net/l2tp/l2tp_ip.c -@@ -518,6 +518,9 @@ static int l2tp_ip_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *m - if (flags & MSG_OOB) - goto out; - -+ if (addr_len) -+ *addr_len = sizeof(*sin); -+ - skb = skb_recv_datagram(sk, flags, noblock, &err); - if (!skb) - goto out; -@@ -540,7 +543,6 @@ static int l2tp_ip_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *m - sin->sin_addr.s_addr = ip_hdr(skb)->saddr; - sin->sin_port = 0; - memset(&sin->sin_zero, 0, sizeof(sin->sin_zero)); -- *addr_len = sizeof(*sin); - } - if (inet->cmsg_flags) - ip_cmsg_recv(msg, skb); diff --git a/net/l2tp/l2tp_ppp.c b/net/l2tp/l2tp_ppp.c -index 950909f..13752d9 100644 +index 13752d9..b704a93 100644 --- a/net/l2tp/l2tp_ppp.c +++ b/net/l2tp/l2tp_ppp.c -@@ -1365,7 +1365,7 @@ static int pppol2tp_setsockopt(struct socket *sock, int level, int optname, - int err; - - if (level != SOL_PPPOL2TP) -- return udp_prot.setsockopt(sk, level, optname, optval, optlen); -+ return -EINVAL; - - if (optlen < sizeof(int)) - return -EINVAL; -@@ -1491,7 +1491,7 @@ static int pppol2tp_getsockopt(struct socket *sock, int level, int optname, - struct pppol2tp_session *ps; - - if (level != SOL_PPPOL2TP) -- return udp_prot.getsockopt(sk, level, optname, optval, optlen); -+ return -EINVAL; - - if (get_user(len, optlen)) - return -EFAULT; +@@ -755,7 +755,8 @@ static int pppol2tp_connect(struct socket *sock, struct sockaddr *uservaddr, + /* If PMTU discovery was enabled, use the MTU that was discovered */ + dst = sk_dst_get(tunnel->sock); + if (dst != NULL) { +- u32 pmtu = dst_mtu(__sk_dst_get(tunnel->sock)); ++ u32 pmtu = dst_mtu(dst); ++ + if (pmtu != 0) + session->mtu = session->mru = pmtu - + PPPOL2TP_HEADER_OVERHEAD; diff --git a/net/llc/llc_proc.c b/net/llc/llc_proc.c index 1a3c7e0..80f8b0c 100644 --- a/net/llc/llc_proc.c @@ -101725,10 +109712,10 @@ index 1a3c7e0..80f8b0c 100644 goto out; diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c -index aaa59d7..21a2c4a 100644 +index 592f4b1..efa7aa9 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c -@@ -839,7 +839,7 @@ static int ieee80211_set_monitor_channel(struct wiphy *wiphy, +@@ -864,7 +864,7 @@ static int ieee80211_set_monitor_channel(struct wiphy *wiphy, ret = ieee80211_vif_use_channel(sdata, chandef, IEEE80211_CHANCTX_EXCLUSIVE); } @@ -101737,7 +109724,7 @@ index aaa59d7..21a2c4a 100644 local->_oper_chandef = *chandef; ieee80211_hw_config(local, 0); } -@@ -3440,7 +3440,7 @@ static void ieee80211_mgmt_frame_register(struct wiphy *wiphy, +@@ -3574,7 +3574,7 @@ static void ieee80211_mgmt_frame_register(struct wiphy *wiphy, else local->probe_req_reg--; @@ -101746,7 +109733,7 @@ index aaa59d7..21a2c4a 100644 break; ieee80211_queue_work(&local->hw, &local->reconfig_filter); -@@ -3903,8 +3903,8 @@ static int ieee80211_cfg_get_channel(struct wiphy *wiphy, +@@ -3723,8 +3723,8 @@ static int ieee80211_cfg_get_channel(struct wiphy *wiphy, if (chanctx_conf) { *chandef = chanctx_conf->def; ret = 0; @@ -101758,7 +109745,7 @@ index aaa59d7..21a2c4a 100644 if (local->use_chanctx) *chandef = local->monitor_chandef; diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h -index f169b6e..a5dc4eb 100644 +index ac9836e..32613c1 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h @@ -28,6 +28,7 @@ @@ -101769,7 +109756,7 @@ index f169b6e..a5dc4eb 100644 #include "key.h" #include "sta_info.h" #include "debug.h" -@@ -999,7 +1000,7 @@ struct ieee80211_local { +@@ -1011,7 +1012,7 @@ struct ieee80211_local { /* also used to protect ampdu_ac_queue and amdpu_ac_stop_refcnt */ spinlock_t queue_stop_reason_lock; @@ -101779,10 +109766,10 @@ index f169b6e..a5dc4eb 100644 /* number of interfaces with corresponding FIF_ flags */ int fif_fcsfail, fif_plcpfail, fif_control, fif_other_bss, fif_pspoll, diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c -index 34799e0..b411290 100644 +index 388b863..6575b55 100644 --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c -@@ -524,7 +524,7 @@ int ieee80211_do_open(struct wireless_dev *wdev, bool coming_up) +@@ -531,7 +531,7 @@ int ieee80211_do_open(struct wireless_dev *wdev, bool coming_up) break; } @@ -101791,7 +109778,7 @@ index 34799e0..b411290 100644 res = drv_start(local); if (res) goto err_del_bss; -@@ -571,7 +571,7 @@ int ieee80211_do_open(struct wireless_dev *wdev, bool coming_up) +@@ -578,7 +578,7 @@ int ieee80211_do_open(struct wireless_dev *wdev, bool coming_up) res = drv_add_interface(local, sdata); if (res) goto err_stop; @@ -101800,7 +109787,7 @@ index 34799e0..b411290 100644 res = ieee80211_add_virtual_monitor(local); if (res) goto err_stop; -@@ -680,7 +680,7 @@ int ieee80211_do_open(struct wireless_dev *wdev, bool coming_up) +@@ -687,7 +687,7 @@ int ieee80211_do_open(struct wireless_dev *wdev, bool coming_up) atomic_inc(&local->iff_promiscs); if (coming_up) @@ -101809,7 +109796,7 @@ index 34799e0..b411290 100644 if (hw_reconf_flags) ieee80211_hw_config(local, hw_reconf_flags); -@@ -718,7 +718,7 @@ int ieee80211_do_open(struct wireless_dev *wdev, bool coming_up) +@@ -725,7 +725,7 @@ int ieee80211_do_open(struct wireless_dev *wdev, bool coming_up) err_del_interface: drv_remove_interface(local, sdata); err_stop: @@ -101818,7 +109805,7 @@ index 34799e0..b411290 100644 drv_stop(local); err_del_bss: sdata->bss = NULL; -@@ -871,7 +871,7 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata, +@@ -888,7 +888,7 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata, } if (going_down) @@ -101827,7 +109814,7 @@ index 34799e0..b411290 100644 switch (sdata->vif.type) { case NL80211_IFTYPE_AP_VLAN: -@@ -930,7 +930,7 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata, +@@ -949,7 +949,7 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata, } spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags); @@ -101836,7 +109823,7 @@ index 34799e0..b411290 100644 ieee80211_clear_tx_pending(local); /* -@@ -970,7 +970,7 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata, +@@ -989,7 +989,7 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata, ieee80211_recalc_ps(local, -1); @@ -101845,7 +109832,7 @@ index 34799e0..b411290 100644 ieee80211_stop_device(local); /* no reconfiguring after stop! */ -@@ -981,7 +981,7 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata, +@@ -1000,7 +1000,7 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata, ieee80211_configure_filter(local); ieee80211_hw_config(local, hw_reconf_flags); @@ -101855,7 +109842,7 @@ index 34799e0..b411290 100644 } diff --git a/net/mac80211/main.c b/net/mac80211/main.c -index 4c1bf61..00b449b 100644 +index d17c26d..43d6bfb 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c @@ -174,7 +174,7 @@ int ieee80211_hw_config(struct ieee80211_local *local, u32 changed) @@ -101925,10 +109912,10 @@ index 6ff1346..936ca9a 100644 return p; diff --git a/net/mac80211/util.c b/net/mac80211/util.c -index 3c36583..12887fe 100644 +index a6cda52..f3b6776 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c -@@ -1509,7 +1509,7 @@ int ieee80211_reconfig(struct ieee80211_local *local) +@@ -1548,7 +1548,7 @@ int ieee80211_reconfig(struct ieee80211_local *local) } #endif /* everything else happens only if HW was up & running */ @@ -101937,7 +109924,7 @@ index 3c36583..12887fe 100644 goto wake_up; /* -@@ -1734,7 +1734,7 @@ int ieee80211_reconfig(struct ieee80211_local *local) +@@ -1772,7 +1772,7 @@ int ieee80211_reconfig(struct ieee80211_local *local) local->in_reconfig = false; barrier(); @@ -101980,10 +109967,10 @@ index bffdad7..f9317d1 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 1172083..986f1c1 100644 +index ec8114f..6b2bfba 100644 --- a/net/netfilter/ipset/ip_set_core.c +++ b/net/netfilter/ipset/ip_set_core.c -@@ -1924,7 +1924,7 @@ done: +@@ -1921,7 +1921,7 @@ done: return ret; } @@ -101993,7 +109980,7 @@ index 1172083..986f1c1 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 a8eb0a8..86f2de4 100644 +index 610e19c..08d0c3f 100644 --- a/net/netfilter/ipvs/ip_vs_conn.c +++ b/net/netfilter/ipvs/ip_vs_conn.c @@ -556,7 +556,7 @@ ip_vs_bind_dest(struct ip_vs_conn *cp, struct ip_vs_dest *dest) @@ -102005,7 +109992,7 @@ index a8eb0a8..86f2de4 100644 if (cp->protocol != IPPROTO_UDP) conn_flags &= ~IP_VS_CONN_F_ONE_PACKET; flags = cp->flags; -@@ -900,7 +900,7 @@ ip_vs_conn_new(const struct ip_vs_conn_param *p, +@@ -899,7 +899,7 @@ ip_vs_conn_new(const struct ip_vs_conn_param *p, cp->control = NULL; atomic_set(&cp->n_control, 0); @@ -102014,7 +110001,7 @@ index a8eb0a8..86f2de4 100644 cp->packet_xmit = NULL; cp->app = NULL; -@@ -1188,7 +1188,7 @@ static inline int todrop_entry(struct ip_vs_conn *cp) +@@ -1187,7 +1187,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] */ @@ -102024,7 +110011,7 @@ index a8eb0a8..86f2de4 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 3d2d2c8..c87e4d3 100644 +index e683675..67cb16b 100644 --- a/net/netfilter/ipvs/ip_vs_core.c +++ b/net/netfilter/ipvs/ip_vs_core.c @@ -567,7 +567,7 @@ int ip_vs_leave(struct ip_vs_service *svc, struct sk_buff *skb, @@ -102046,7 +110033,7 @@ index 3d2d2c8..c87e4d3 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 c42e83d..a6a3f8b 100644 +index 581a658..910e112 100644 --- a/net/netfilter/ipvs/ip_vs_ctl.c +++ b/net/netfilter/ipvs/ip_vs_ctl.c @@ -794,7 +794,7 @@ __ip_vs_update_dest(struct ip_vs_service *svc, struct ip_vs_dest *dest, @@ -102170,7 +110157,7 @@ index db80126..ef7110e 100644 cp->old_state = cp->state; /* diff --git a/net/netfilter/ipvs/ip_vs_xmit.c b/net/netfilter/ipvs/ip_vs_xmit.c -index c47444e..b0961c6 100644 +index 73ba1cc..1adfc7a 100644 --- a/net/netfilter/ipvs/ip_vs_xmit.c +++ b/net/netfilter/ipvs/ip_vs_xmit.c @@ -1102,7 +1102,7 @@ ip_vs_icmp_xmit(struct sk_buff *skb, struct ip_vs_conn *cp, @@ -102205,7 +110192,7 @@ index a4b5e2a..13b1de3 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 75421f2..0e69621 100644 +index 1f4f954..e364ad7 100644 --- a/net/netfilter/nf_conntrack_core.c +++ b/net/netfilter/nf_conntrack_core.c @@ -1789,6 +1789,10 @@ void nf_conntrack_init_end(void) @@ -102374,10 +110361,10 @@ index d292c8d..9f1e166 100644 if (data_len) { diff --git a/net/netfilter/nft_compat.c b/net/netfilter/nft_compat.c -index 8a779be..1551d4c 100644 +index 1840989..6895744 100644 --- a/net/netfilter/nft_compat.c +++ b/net/netfilter/nft_compat.c -@@ -216,7 +216,7 @@ target_dump_info(struct sk_buff *skb, const struct xt_target *t, const void *in) +@@ -225,7 +225,7 @@ target_dump_info(struct sk_buff *skb, const struct xt_target *t, const void *in) /* We want to reuse existing compat_to_user */ old_fs = get_fs(); set_fs(KERNEL_DS); @@ -102386,7 +110373,7 @@ index 8a779be..1551d4c 100644 set_fs(old_fs); ret = nla_put(skb, NFTA_TARGET_INFO, XT_ALIGN(t->targetsize), out); kfree(out); -@@ -403,7 +403,7 @@ match_dump_info(struct sk_buff *skb, const struct xt_match *m, const void *in) +@@ -421,7 +421,7 @@ match_dump_info(struct sk_buff *skb, const struct xt_match *m, const void *in) /* We want to reuse existing compat_to_user */ old_fs = get_fs(); set_fs(KERNEL_DS); @@ -102395,6 +110382,24 @@ index 8a779be..1551d4c 100644 set_fs(old_fs); ret = nla_put(skb, NFTA_MATCH_INFO, XT_ALIGN(m->matchsize), out); kfree(out); +diff --git a/net/netfilter/xt_bpf.c b/net/netfilter/xt_bpf.c +index bbffdbda..12d4da8 100644 +--- a/net/netfilter/xt_bpf.c ++++ b/net/netfilter/xt_bpf.c +@@ -23,11 +23,10 @@ MODULE_ALIAS("ip6t_bpf"); + static int bpf_mt_check(const struct xt_mtchk_param *par) + { + struct xt_bpf_info *info = par->matchinfo; +- struct sock_fprog_kern program; ++ struct sock_fprog program; + + program.len = info->bpf_program_num_elem; +- program.filter = info->bpf_program; +- ++ program.filter = (struct sock_filter __user *) info->bpf_program; + if (sk_unattached_filter_create(&info->filter, &program)) { + pr_info("bpf: check failed: parse error\n"); + return -EINVAL; diff --git a/net/netfilter/xt_gradm.c b/net/netfilter/xt_gradm.c new file mode 100644 index 0000000..c566332 @@ -102471,10 +110476,10 @@ index a3910fc..2d2ba14 100644 remove_proc_entry("ipt_hashlimit", net->proc_net); return -ENOMEM; diff --git a/net/netfilter/xt_recent.c b/net/netfilter/xt_recent.c -index 1e657cf..1eb1c34 100644 +index a9faae8..1ea30e0 100644 --- a/net/netfilter/xt_recent.c +++ b/net/netfilter/xt_recent.c -@@ -618,7 +618,7 @@ static int __net_init recent_proc_net_init(struct net *net) +@@ -615,7 +615,7 @@ static int __net_init recent_proc_net_init(struct net *net) { struct recent_net *recent_net = recent_pernet(net); @@ -102518,7 +110523,7 @@ index 11de55e..f25e448 100644 return 0; } diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c -index f22757a..daf62a2 100644 +index e6fac7e..cdcd25e 100644 --- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c @@ -257,7 +257,7 @@ static void netlink_overrun(struct sock *sk) @@ -102530,7 +110535,7 @@ index f22757a..daf62a2 100644 } static void netlink_rcv_wake(struct sock *sk) -@@ -3028,7 +3028,7 @@ static int netlink_seq_show(struct seq_file *seq, void *v) +@@ -3058,7 +3058,7 @@ static int netlink_seq_show(struct seq_file *seq, void *v) sk_wmem_alloc_get(s), nlk->cb_running, atomic_read(&s->sk_refcnt), @@ -102539,20 +110544,8 @@ index f22757a..daf62a2 100644 sock_i_ino(s) ); -diff --git a/net/netrom/af_netrom.c b/net/netrom/af_netrom.c -index ede50d1..d2468e6 100644 ---- a/net/netrom/af_netrom.c -+++ b/net/netrom/af_netrom.c -@@ -850,7 +850,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; -- sax->fsa_ax25.sax25_ndigis = 0; - sax->fsa_ax25.sax25_call = nr->source_addr; - *uaddr_len = sizeof(struct sockaddr_ax25); - } diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c -index b85c67c..27c3368 100644 +index b85c67c..09705b7 100644 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c @@ -275,7 +275,7 @@ static int packet_direct_xmit(struct sk_buff *skb) @@ -102564,7 +110557,15 @@ index b85c67c..27c3368 100644 kfree_skb(skb); return NET_XMIT_DROP; } -@@ -1845,7 +1845,7 @@ static int packet_rcv(struct sk_buff *skb, struct net_device *dev, +@@ -636,6 +636,7 @@ static void init_prb_bdqc(struct packet_sock *po, + p1->tov_in_jiffies = msecs_to_jiffies(p1->retire_blk_tov); + p1->blk_sizeof_priv = req_u->req3.tp_sizeof_priv; + ++ p1->max_frame_len = p1->kblk_size - BLK_PLUS_PRIV(p1->blk_sizeof_priv); + prb_init_ft_ops(p1, req_u); + prb_setup_retire_blk_timer(po, tx_ring); + prb_open_block(p1, pbd); +@@ -1845,7 +1846,7 @@ static int packet_rcv(struct sk_buff *skb, struct net_device *dev, spin_lock(&sk->sk_receive_queue.lock); po->stats.stats1.tp_packets++; @@ -102573,7 +110574,7 @@ index b85c67c..27c3368 100644 __skb_queue_tail(&sk->sk_receive_queue, skb); spin_unlock(&sk->sk_receive_queue.lock); sk->sk_data_ready(sk); -@@ -1854,7 +1854,7 @@ static int packet_rcv(struct sk_buff *skb, struct net_device *dev, +@@ -1854,7 +1855,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.stats1.tp_drops++; @@ -102582,7 +110583,26 @@ index b85c67c..27c3368 100644 spin_unlock(&sk->sk_receive_queue.lock); drop_n_restore: -@@ -3459,7 +3459,7 @@ static int packet_getsockopt(struct socket *sock, int level, int optname, +@@ -1946,6 +1947,18 @@ static int tpacket_rcv(struct sk_buff *skb, struct net_device *dev, + if ((int)snaplen < 0) + snaplen = 0; + } ++ } else if (unlikely(macoff + snaplen > ++ GET_PBDQC_FROM_RB(&po->rx_ring)->max_frame_len)) { ++ u32 nval; ++ ++ nval = GET_PBDQC_FROM_RB(&po->rx_ring)->max_frame_len - macoff; ++ pr_err_once("tpacket_rcv: packet too big, clamped from %u to %u. macoff=%u\n", ++ snaplen, nval, macoff); ++ snaplen = nval; ++ if (unlikely((int)snaplen < 0)) { ++ snaplen = 0; ++ macoff = GET_PBDQC_FROM_RB(&po->rx_ring)->max_frame_len; ++ } + } + spin_lock(&sk->sk_receive_queue.lock); + h.raw = packet_current_rx_frame(po, skb, +@@ -3459,7 +3472,7 @@ static int packet_getsockopt(struct socket *sock, int level, int optname, case PACKET_HDRLEN: if (len > sizeof(int)) len = sizeof(int); @@ -102591,7 +110611,7 @@ index b85c67c..27c3368 100644 return -EFAULT; switch (val) { case TPACKET_V1: -@@ -3505,7 +3505,7 @@ static int packet_getsockopt(struct socket *sock, int level, int optname, +@@ -3505,7 +3518,7 @@ static int packet_getsockopt(struct socket *sock, int level, int optname, len = lv; if (put_user(len, optlen)) return -EFAULT; @@ -102600,6 +110620,29 @@ index b85c67c..27c3368 100644 return -EFAULT; return 0; } +@@ -3789,6 +3802,10 @@ static int packet_set_ring(struct sock *sk, union tpacket_req_u *req_u, + goto out; + if (unlikely(req->tp_block_size & (PAGE_SIZE - 1))) + goto out; ++ if (po->tp_version >= TPACKET_V3 && ++ (int)(req->tp_block_size - ++ BLK_PLUS_PRIV(req_u->req3.tp_sizeof_priv)) <= 0) ++ goto out; + if (unlikely(req->tp_frame_size < po->tp_hdrlen + + po->tp_reserve)) + goto out; +diff --git a/net/packet/internal.h b/net/packet/internal.h +index eb9580a..cdddf6a 100644 +--- a/net/packet/internal.h ++++ b/net/packet/internal.h +@@ -29,6 +29,7 @@ struct tpacket_kbdq_core { + char *pkblk_start; + char *pkblk_end; + int kblk_size; ++ unsigned int max_frame_len; + unsigned int knum_blocks; + uint64_t knxt_seq_num; + char *prev; diff --git a/net/phonet/pep.c b/net/phonet/pep.c index 70a547e..23477fe 100644 --- a/net/phonet/pep.c @@ -102715,7 +110758,7 @@ index 31b74f5..dc1fbfa 100644 ic->i_ack_next = 0; #endif diff --git a/net/rds/ib_recv.c b/net/rds/ib_recv.c -index b7ebe23..b6352f6 100644 +index d67de45..73dbf51 100644 --- a/net/rds/ib_recv.c +++ b/net/rds/ib_recv.c @@ -596,7 +596,7 @@ static u64 rds_ib_get_ack(struct rds_ib_connection *ic) @@ -102725,11 +110768,11 @@ index b7ebe23..b6352f6 100644 - atomic64_set(&ic->i_ack_next, seq); + atomic64_set_unchecked(&ic->i_ack_next, seq); if (ack_required) { - smp_mb__before_clear_bit(); + smp_mb__before_atomic(); set_bit(IB_ACK_REQUESTED, &ic->i_ack_flags); @@ -608,7 +608,7 @@ static u64 rds_ib_get_ack(struct rds_ib_connection *ic) clear_bit(IB_ACK_REQUESTED, &ic->i_ack_flags); - smp_mb__after_clear_bit(); + smp_mb__after_atomic(); - return atomic64_read(&ic->i_ack_next); + return atomic64_read_unchecked(&ic->i_ack_next); @@ -102763,7 +110806,7 @@ index a91e1db..cf3053f 100644 ic->i_ack_next = 0; #endif diff --git a/net/rds/iw_recv.c b/net/rds/iw_recv.c -index 4503335..db566b4 100644 +index aa8bf67..b70133c 100644 --- a/net/rds/iw_recv.c +++ b/net/rds/iw_recv.c @@ -427,7 +427,7 @@ static u64 rds_iw_get_ack(struct rds_iw_connection *ic) @@ -102773,11 +110816,11 @@ index 4503335..db566b4 100644 - atomic64_set(&ic->i_ack_next, seq); + atomic64_set_unchecked(&ic->i_ack_next, seq); if (ack_required) { - smp_mb__before_clear_bit(); + smp_mb__before_atomic(); set_bit(IB_ACK_REQUESTED, &ic->i_ack_flags); @@ -439,7 +439,7 @@ static u64 rds_iw_get_ack(struct rds_iw_connection *ic) clear_bit(IB_ACK_REQUESTED, &ic->i_ack_flags); - smp_mb__after_clear_bit(); + smp_mb__after_atomic(); - return atomic64_read(&ic->i_ack_next); + return atomic64_read_unchecked(&ic->i_ack_next); @@ -102811,7 +110854,7 @@ index edac9ef..16bcb98 100644 set_fs(oldfs); } diff --git a/net/rds/tcp_send.c b/net/rds/tcp_send.c -index 81cf5a4..b5826ff 100644 +index 53b17ca..45463e7 100644 --- a/net/rds/tcp_send.c +++ b/net/rds/tcp_send.c @@ -43,7 +43,7 @@ static void rds_tcp_cork(struct socket *sock, int val) @@ -103088,6 +111131,28 @@ index f226709..0e735a8 100644 _proto("Tx RESPONSE %%%u", ntohl(hdr->serial)); ret = kernel_sendmsg(conn->trans->local->socket, &msg, iov, 3, len); +diff --git a/net/sched/cls_bpf.c b/net/sched/cls_bpf.c +index 13f64df..1618696 100644 +--- a/net/sched/cls_bpf.c ++++ b/net/sched/cls_bpf.c +@@ -160,7 +160,7 @@ static int cls_bpf_modify_existing(struct net *net, struct tcf_proto *tp, + { + struct sock_filter *bpf_ops, *bpf_old; + struct tcf_exts exts; +- struct sock_fprog_kern tmp; ++ struct sock_fprog tmp; + struct sk_filter *fp, *fp_old; + u16 bpf_size, bpf_len; + u32 classid; +@@ -191,7 +191,7 @@ static int cls_bpf_modify_existing(struct net *net, struct tcf_proto *tp, + memcpy(bpf_ops, nla_data(tb[TCA_BPF_OPS]), bpf_size); + + tmp.len = bpf_len; +- tmp.filter = bpf_ops; ++ tmp.filter = (struct sock_filter __user *) bpf_ops; + + ret = sk_unattached_filter_create(&fp, &tmp); + if (ret) diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c index e1543b0..7ce8bd0 100644 --- a/net/sched/sch_generic.c @@ -103110,23 +111175,11 @@ index e1543b0..7ce8bd0 100644 linkwatch_fire_event(dev); } } -diff --git a/net/sctp/associola.c b/net/sctp/associola.c -index 0b99998..a6953b0 100644 ---- a/net/sctp/associola.c -+++ b/net/sctp/associola.c -@@ -1151,6 +1151,7 @@ void sctp_assoc_update(struct sctp_association *asoc, - asoc->c = new->c; - asoc->peer.rwnd = new->peer.rwnd; - asoc->peer.sack_needed = new->peer.sack_needed; -+ asoc->peer.auth_capable = new->peer.auth_capable; - asoc->peer.i = new->peer.i; - sctp_tsnmap_init(&asoc->peer.tsn_map, SCTP_TSN_MAP_INITIAL, - asoc->peer.i.initial_tsn, GFP_ATOMIC); diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c -index 2b1738e..a9d0fc9 100644 +index 1999592..6684af6 100644 --- a/net/sctp/ipv6.c +++ b/net/sctp/ipv6.c -@@ -966,7 +966,7 @@ static const struct inet6_protocol sctpv6_protocol = { +@@ -964,7 +964,7 @@ static const struct inet6_protocol sctpv6_protocol = { .flags = INET6_PROTO_NOPOLICY | INET6_PROTO_FINAL, }; @@ -103135,7 +111188,7 @@ index 2b1738e..a9d0fc9 100644 .sa_family = AF_INET6, .sctp_xmit = sctp_v6_xmit, .setsockopt = ipv6_setsockopt, -@@ -998,7 +998,7 @@ static struct sctp_af sctp_af_inet6 = { +@@ -996,7 +996,7 @@ static struct sctp_af sctp_af_inet6 = { #endif }; @@ -103144,7 +111197,7 @@ index 2b1738e..a9d0fc9 100644 .event_msgname = sctp_inet6_event_msgname, .skb_msgname = sctp_inet6_skb_msgname, .af_supported = sctp_inet6_af_supported, -@@ -1023,7 +1023,7 @@ void sctp_v6_pf_init(void) +@@ -1021,7 +1021,7 @@ void sctp_v6_pf_init(void) void sctp_v6_pf_exit(void) { @@ -103154,7 +111207,7 @@ index 2b1738e..a9d0fc9 100644 /* Initialize IPv6 support and register with socket layer. */ diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c -index 44cbb54..4c5dce6 100644 +index 6789d785..0798d76 100644 --- a/net/sctp/protocol.c +++ b/net/sctp/protocol.c @@ -836,8 +836,10 @@ int sctp_register_af(struct sctp_af *af) @@ -103178,7 +111231,7 @@ index 44cbb54..4c5dce6 100644 .event_msgname = sctp_inet_event_msgname, .skb_msgname = sctp_inet_skb_msgname, .af_supported = sctp_inet_af_supported, -@@ -1039,7 +1041,7 @@ static const struct net_protocol sctp_protocol = { +@@ -1037,7 +1039,7 @@ static const struct net_protocol sctp_protocol = { }; /* IPv4 address related functions. */ @@ -103187,7 +111240,7 @@ index 44cbb54..4c5dce6 100644 .sa_family = AF_INET, .sctp_xmit = sctp_v4_xmit, .setsockopt = ip_setsockopt, -@@ -1124,7 +1126,7 @@ static void sctp_v4_pf_init(void) +@@ -1123,7 +1125,7 @@ static void sctp_v4_pf_init(void) static void sctp_v4_pf_exit(void) { @@ -103210,10 +111263,10 @@ index fef2acd..c705c4f 100644 sctp_generate_t1_cookie_event, sctp_generate_t1_init_event, diff --git a/net/sctp/socket.c b/net/sctp/socket.c -index fee06b9..eabc613 100644 +index 4298996..fa5f636 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c -@@ -2175,11 +2175,13 @@ static int sctp_setsockopt_events(struct sock *sk, char __user *optval, +@@ -2176,11 +2176,13 @@ static int sctp_setsockopt_events(struct sock *sk, char __user *optval, { struct sctp_association *asoc; struct sctp_ulpevent *event; @@ -103228,7 +111281,7 @@ index fee06b9..eabc613 100644 /* * At the time when a user app subscribes to SCTP_SENDER_DRY_EVENT, -@@ -4259,13 +4261,16 @@ static int sctp_getsockopt_disable_fragments(struct sock *sk, int len, +@@ -4260,13 +4262,16 @@ static int sctp_getsockopt_disable_fragments(struct sock *sk, int len, static int sctp_getsockopt_events(struct sock *sk, int len, char __user *optval, int __user *optlen) { @@ -103246,7 +111299,7 @@ index fee06b9..eabc613 100644 return -EFAULT; return 0; } -@@ -4283,6 +4288,8 @@ static int sctp_getsockopt_events(struct sock *sk, int len, char __user *optval, +@@ -4284,6 +4289,8 @@ static int sctp_getsockopt_events(struct sock *sk, int len, char __user *optval, */ static int sctp_getsockopt_autoclose(struct sock *sk, int len, char __user *optval, int __user *optlen) { @@ -103255,7 +111308,7 @@ index fee06b9..eabc613 100644 /* Applicable to UDP-style socket only */ if (sctp_style(sk, TCP)) return -EOPNOTSUPP; -@@ -4291,7 +4298,8 @@ static int sctp_getsockopt_autoclose(struct sock *sk, int len, char __user *optv +@@ -4292,7 +4299,8 @@ static int sctp_getsockopt_autoclose(struct sock *sk, int len, char __user *optv len = sizeof(int); if (put_user(len, optlen)) return -EFAULT; @@ -103265,7 +111318,7 @@ index fee06b9..eabc613 100644 return -EFAULT; return 0; } -@@ -4666,12 +4674,15 @@ static int sctp_getsockopt_delayed_ack(struct sock *sk, int len, +@@ -4667,12 +4675,15 @@ static int sctp_getsockopt_delayed_ack(struct sock *sk, int len, */ static int sctp_getsockopt_initmsg(struct sock *sk, int len, char __user *optval, int __user *optlen) { @@ -103282,7 +111335,7 @@ index fee06b9..eabc613 100644 return -EFAULT; return 0; } -@@ -4712,6 +4723,8 @@ static int sctp_getsockopt_peer_addrs(struct sock *sk, int len, +@@ -4713,6 +4724,8 @@ static int sctp_getsockopt_peer_addrs(struct sock *sk, int len, addrlen = sctp_get_af_specific(temp.sa.sa_family)->sockaddr_len; if (space_left < addrlen) return -ENOMEM; @@ -103292,37 +111345,37 @@ index fee06b9..eabc613 100644 return -EFAULT; to += addrlen; diff --git a/net/sctp/sysctl.c b/net/sctp/sysctl.c -index c82fdc1..4ca1f95 100644 +index 12c7e01..a755b3e 100644 --- a/net/sctp/sysctl.c +++ b/net/sctp/sysctl.c -@@ -308,7 +308,7 @@ static int proc_sctp_do_hmac_alg(struct ctl_table *ctl, int write, +@@ -321,7 +321,7 @@ static int proc_sctp_do_hmac_alg(struct ctl_table *ctl, int write, + loff_t *ppos) { struct net *net = current->nsproxy->net_ns; - char tmp[8]; - struct ctl_table tbl; + ctl_table_no_const tbl; - int ret; - int changed = 0; + bool changed = false; char *none = "none"; -@@ -355,7 +355,7 @@ static int proc_sctp_do_rto_min(struct ctl_table *ctl, int write, - { + char tmp[8]; +@@ -369,7 +369,7 @@ static int proc_sctp_do_rto_min(struct ctl_table *ctl, int write, struct net *net = current->nsproxy->net_ns; - int new_value; -- struct ctl_table tbl; -+ ctl_table_no_const tbl; unsigned int min = *(unsigned int *) ctl->extra1; unsigned int max = *(unsigned int *) ctl->extra2; - int ret; -@@ -382,7 +382,7 @@ static int proc_sctp_do_rto_max(struct ctl_table *ctl, int write, - { - struct net *net = current->nsproxy->net_ns; - int new_value; - struct ctl_table tbl; + ctl_table_no_const tbl; + int ret, new_value; + + memset(&tbl, 0, sizeof(struct ctl_table)); +@@ -398,7 +398,7 @@ static int proc_sctp_do_rto_max(struct ctl_table *ctl, int write, + struct net *net = current->nsproxy->net_ns; unsigned int min = *(unsigned int *) ctl->extra1; unsigned int max = *(unsigned int *) ctl->extra2; - int ret; -@@ -408,7 +408,7 @@ static int proc_sctp_do_auth(struct ctl_table *ctl, int write, +- struct ctl_table tbl; ++ ctl_table_no_const tbl; + int ret, new_value; + + memset(&tbl, 0, sizeof(struct ctl_table)); +@@ -435,7 +435,7 @@ static int proc_sctp_do_auth(struct ctl_table *ctl, int write, loff_t *ppos) { struct net *net = current->nsproxy->net_ns; @@ -103331,52 +111384,28 @@ index c82fdc1..4ca1f95 100644 int new_value, ret; memset(&tbl, 0, sizeof(struct ctl_table)); -@@ -436,7 +436,7 @@ static int proc_sctp_do_auth(struct ctl_table *ctl, int write, +@@ -462,7 +462,7 @@ static int proc_sctp_do_auth(struct ctl_table *ctl, int write, int sctp_sysctl_net_register(struct net *net) { -- struct ctl_table *table = sctp_net_table; -+ ctl_table_no_const *table = NULL; - - if (!net_eq(net, &init_net)) { - int i; -@@ -449,7 +449,10 @@ int sctp_sysctl_net_register(struct net *net) - table[i].data += (char *)(&net->sctp) - (char *)&init_net.sctp; - } - -- net->sctp.sysctl_header = register_net_sysctl(net, "net/sctp", table); -+ if (!net_eq(net, &init_net)) -+ net->sctp.sysctl_header = register_net_sysctl(net, "net/sctp", table); -+ else -+ net->sctp.sysctl_header = register_net_sysctl(net, "net/sctp", sctp_net_table); - return 0; - } - -diff --git a/net/sctp/ulpevent.c b/net/sctp/ulpevent.c -index 85c6465..879f3cd 100644 ---- a/net/sctp/ulpevent.c -+++ b/net/sctp/ulpevent.c -@@ -411,6 +411,7 @@ struct sctp_ulpevent *sctp_ulpevent_make_remote_error( - * sre_type: - * It should be SCTP_REMOTE_ERROR. - */ -+ memset(sre, 0, sizeof(*sre)); - sre->sre_type = SCTP_REMOTE_ERROR; +- struct ctl_table *table; ++ ctl_table_no_const *table; + int i; - /* -@@ -916,6 +917,7 @@ void sctp_ulpevent_read_sndrcvinfo(const struct sctp_ulpevent *event, - * For recvmsg() the SCTP stack places the message's stream number in - * this value. - */ -+ memset(&sinfo, 0, sizeof(sinfo)); - sinfo.sinfo_stream = event->stream; - /* sinfo_ssn: 16 bits (unsigned integer) - * + table = kmemdup(sctp_net_table, sizeof(sctp_net_table), GFP_KERNEL); diff --git a/net/socket.c b/net/socket.c -index abf56b2..b8998bc 100644 +index abf56b2..4cac767 100644 --- a/net/socket.c +++ b/net/socket.c -@@ -89,6 +89,7 @@ +@@ -72,7 +72,6 @@ + #include + #include + #include +-#include + #include + #include + #include +@@ -89,6 +88,7 @@ #include #include #include @@ -103384,7 +111413,7 @@ index abf56b2..b8998bc 100644 #include #include -@@ -112,6 +113,8 @@ unsigned int sysctl_net_busy_read __read_mostly; +@@ -112,6 +112,8 @@ unsigned int sysctl_net_busy_read __read_mostly; unsigned int sysctl_net_busy_poll __read_mostly; #endif @@ -103393,7 +111422,7 @@ index abf56b2..b8998bc 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); -@@ -163,7 +166,7 @@ static const struct file_operations socket_file_ops = { +@@ -163,7 +165,7 @@ static const struct file_operations socket_file_ops = { */ static DEFINE_SPINLOCK(net_family_lock); @@ -103402,7 +111431,7 @@ index abf56b2..b8998bc 100644 /* * Statistics counters of the socket lists -@@ -329,7 +332,7 @@ static struct dentry *sockfs_mount(struct file_system_type *fs_type, +@@ -329,7 +331,7 @@ static struct dentry *sockfs_mount(struct file_system_type *fs_type, &sockfs_dentry_operations, SOCKFS_MAGIC); } @@ -103411,7 +111440,7 @@ index abf56b2..b8998bc 100644 static struct file_system_type sock_fs_type = { .name = "sockfs", -@@ -1257,6 +1260,8 @@ int __sock_create(struct net *net, int family, int type, int protocol, +@@ -1257,6 +1259,8 @@ int __sock_create(struct net *net, int family, int type, int protocol, return -EAFNOSUPPORT; if (type < 0 || type >= SOCK_MAX) return -EINVAL; @@ -103420,7 +111449,7 @@ index abf56b2..b8998bc 100644 /* Compatibility. -@@ -1277,6 +1282,20 @@ int __sock_create(struct net *net, int family, int type, int protocol, +@@ -1277,6 +1281,20 @@ int __sock_create(struct net *net, int family, int type, int protocol, if (err) return err; @@ -103441,7 +111470,7 @@ index abf56b2..b8998bc 100644 /* * Allocate the socket and allow the family to set things up. if * the protocol is 0, the family is instructed to select an appropriate -@@ -1528,6 +1547,14 @@ SYSCALL_DEFINE3(bind, int, fd, struct sockaddr __user *, umyaddr, int, addrlen) +@@ -1528,6 +1546,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) { @@ -103456,7 +111485,7 @@ index abf56b2..b8998bc 100644 err = security_socket_bind(sock, (struct sockaddr *)&address, addrlen); -@@ -1536,6 +1563,7 @@ SYSCALL_DEFINE3(bind, int, fd, struct sockaddr __user *, umyaddr, int, addrlen) +@@ -1536,6 +1562,7 @@ SYSCALL_DEFINE3(bind, int, fd, struct sockaddr __user *, umyaddr, int, addrlen) (struct sockaddr *) &address, addrlen); } @@ -103464,7 +111493,7 @@ index abf56b2..b8998bc 100644 fput_light(sock->file, fput_needed); } return err; -@@ -1559,10 +1587,20 @@ SYSCALL_DEFINE2(listen, int, fd, int, backlog) +@@ -1559,10 +1586,20 @@ SYSCALL_DEFINE2(listen, int, fd, int, backlog) if ((unsigned int)backlog > somaxconn) backlog = somaxconn; @@ -103485,7 +111514,7 @@ index abf56b2..b8998bc 100644 fput_light(sock->file, fput_needed); } return err; -@@ -1606,6 +1644,18 @@ SYSCALL_DEFINE4(accept4, int, fd, struct sockaddr __user *, upeer_sockaddr, +@@ -1606,6 +1643,18 @@ SYSCALL_DEFINE4(accept4, int, fd, struct sockaddr __user *, upeer_sockaddr, newsock->type = sock->type; newsock->ops = sock->ops; @@ -103504,7 +111533,7 @@ index abf56b2..b8998bc 100644 /* * We don't need try_module_get here, as the listening socket (sock) * has the protocol module (sock->ops->owner) held. -@@ -1651,6 +1701,8 @@ SYSCALL_DEFINE4(accept4, int, fd, struct sockaddr __user *, upeer_sockaddr, +@@ -1651,6 +1700,8 @@ SYSCALL_DEFINE4(accept4, int, fd, struct sockaddr __user *, upeer_sockaddr, fd_install(newfd, newfile); err = newfd; @@ -103513,7 +111542,7 @@ index abf56b2..b8998bc 100644 out_put: fput_light(sock->file, fput_needed); out: -@@ -1683,6 +1735,7 @@ SYSCALL_DEFINE3(connect, int, fd, struct sockaddr __user *, uservaddr, +@@ -1683,6 +1734,7 @@ SYSCALL_DEFINE3(connect, int, fd, struct sockaddr __user *, uservaddr, int, addrlen) { struct socket *sock; @@ -103521,7 +111550,7 @@ index abf56b2..b8998bc 100644 struct sockaddr_storage address; int err, fput_needed; -@@ -1693,6 +1746,17 @@ SYSCALL_DEFINE3(connect, int, fd, struct sockaddr __user *, uservaddr, +@@ -1693,6 +1745,17 @@ SYSCALL_DEFINE3(connect, int, fd, struct sockaddr __user *, uservaddr, if (err < 0) goto out_put; @@ -103539,7 +111568,7 @@ index abf56b2..b8998bc 100644 err = security_socket_connect(sock, (struct sockaddr *)&address, addrlen); if (err) -@@ -1774,6 +1838,8 @@ SYSCALL_DEFINE3(getpeername, int, fd, struct sockaddr __user *, usockaddr, +@@ -1774,6 +1837,8 @@ SYSCALL_DEFINE3(getpeername, int, fd, struct sockaddr __user *, usockaddr, * the protocol. */ @@ -103548,7 +111577,7 @@ index abf56b2..b8998bc 100644 SYSCALL_DEFINE6(sendto, int, fd, void __user *, buff, size_t, len, unsigned int, flags, struct sockaddr __user *, addr, int, addr_len) -@@ -1840,7 +1906,7 @@ SYSCALL_DEFINE6(recvfrom, int, fd, void __user *, ubuf, size_t, size, +@@ -1840,7 +1905,7 @@ SYSCALL_DEFINE6(recvfrom, int, fd, void __user *, ubuf, size_t, size, struct socket *sock; struct iovec iov; struct msghdr msg; @@ -103557,7 +111586,7 @@ index abf56b2..b8998bc 100644 int err, err2; int fput_needed; -@@ -2066,7 +2132,7 @@ static int ___sys_sendmsg(struct socket *sock, struct msghdr __user *msg, +@@ -2066,7 +2131,7 @@ static int ___sys_sendmsg(struct socket *sock, struct msghdr __user *msg, * checking falls down on this. */ if (copy_from_user(ctl_buf, @@ -103566,7 +111595,7 @@ index abf56b2..b8998bc 100644 ctl_len)) goto out_freectl; msg_sys->msg_control = ctl_buf; -@@ -2217,7 +2283,7 @@ static int ___sys_recvmsg(struct socket *sock, struct msghdr __user *msg, +@@ -2217,7 +2282,7 @@ static int ___sys_recvmsg(struct socket *sock, struct msghdr __user *msg, int err, total_len, len; /* kernel mode address */ @@ -103575,7 +111604,7 @@ index abf56b2..b8998bc 100644 /* user mode address pointers */ struct sockaddr __user *uaddr; -@@ -2246,7 +2312,7 @@ static int ___sys_recvmsg(struct socket *sock, struct msghdr __user *msg, +@@ -2246,7 +2311,7 @@ static int ___sys_recvmsg(struct socket *sock, struct msghdr __user *msg, /* Save the user-mode address (verify_iovec will change the * kernel msghdr to use the kernel address space) */ @@ -103584,7 +111613,18 @@ index abf56b2..b8998bc 100644 uaddr_len = COMPAT_NAMELEN(msg); if (MSG_CMSG_COMPAT & flags) err = verify_compat_iovec(msg_sys, iov, &addr, VERIFY_WRITE); -@@ -2887,7 +2953,7 @@ static int ethtool_ioctl(struct net *net, struct compat_ifreq __user *ifr32) +@@ -2686,7 +2751,9 @@ static int __init sock_init(void) + goto out; + #endif + +- ptp_classifier_init(); ++#ifdef CONFIG_NETWORK_PHY_TIMESTAMPING ++ skb_timestamping_init(); ++#endif + + out: + return err; +@@ -2887,7 +2954,7 @@ static int ethtool_ioctl(struct net *net, struct compat_ifreq __user *ifr32) ifr = compat_alloc_user_space(buf_size); rxnfc = (void __user *)ifr + ALIGN(sizeof(struct ifreq), 8); @@ -103593,7 +111633,7 @@ index abf56b2..b8998bc 100644 return -EFAULT; if (put_user(convert_in ? rxnfc : compat_ptr(data), -@@ -2998,7 +3064,7 @@ static int bond_ioctl(struct net *net, unsigned int cmd, +@@ -2998,7 +3065,7 @@ static int bond_ioctl(struct net *net, unsigned int cmd, old_fs = get_fs(); set_fs(KERNEL_DS); err = dev_ioctl(net, cmd, @@ -103602,7 +111642,7 @@ index abf56b2..b8998bc 100644 set_fs(old_fs); return err; -@@ -3091,7 +3157,7 @@ static int compat_sioc_ifmap(struct net *net, unsigned int cmd, +@@ -3091,7 +3158,7 @@ static int compat_sioc_ifmap(struct net *net, unsigned int cmd, old_fs = get_fs(); set_fs(KERNEL_DS); @@ -103611,7 +111651,7 @@ index abf56b2..b8998bc 100644 set_fs(old_fs); if (cmd == SIOCGIFMAP && !err) { -@@ -3175,7 +3241,7 @@ static int routing_ioctl(struct net *net, struct socket *sock, +@@ -3175,7 +3242,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); @@ -103620,7 +111660,7 @@ index abf56b2..b8998bc 100644 devname[15] = 0; } else r4.rt_dev = NULL; -@@ -3402,8 +3468,8 @@ int kernel_getsockopt(struct socket *sock, int level, int optname, +@@ -3402,8 +3469,8 @@ int kernel_getsockopt(struct socket *sock, int level, int optname, int __user *uoptlen; int err; @@ -103631,7 +111671,7 @@ index abf56b2..b8998bc 100644 set_fs(KERNEL_DS); if (level == SOL_SOCKET) -@@ -3423,7 +3489,7 @@ int kernel_setsockopt(struct socket *sock, int level, int optname, +@@ -3423,7 +3490,7 @@ int kernel_setsockopt(struct socket *sock, int level, int optname, char __user *uoptval; int err; @@ -103641,7 +111681,7 @@ index abf56b2..b8998bc 100644 set_fs(KERNEL_DS); if (level == SOL_SOCKET) diff --git a/net/sunrpc/auth_gss/svcauth_gss.c b/net/sunrpc/auth_gss/svcauth_gss.c -index 0f73f45..a96aa52 100644 +index 4ce5ecce..7bef300 100644 --- a/net/sunrpc/auth_gss/svcauth_gss.c +++ b/net/sunrpc/auth_gss/svcauth_gss.c @@ -1140,7 +1140,7 @@ static int gss_proxy_save_rsc(struct cache_detail *cd, @@ -103663,7 +111703,7 @@ index 0f73f45..a96aa52 100644 /* make a copy for the caller */ *handle = ctxh; diff --git a/net/sunrpc/cache.c b/net/sunrpc/cache.c -index ae333c1..18521f0 100644 +index 0663621..c4928d4 100644 --- a/net/sunrpc/cache.c +++ b/net/sunrpc/cache.c @@ -1609,7 +1609,7 @@ static int create_cache_proc_entries(struct cache_detail *cd, struct net *net) @@ -103691,7 +111731,7 @@ index 2e6ab10..3170800 100644 task->tk_action = call_reserve; } diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c -index 25578af..a29298d 100644 +index c0365c1..b7f02b3 100644 --- a/net/sunrpc/sched.c +++ b/net/sunrpc/sched.c @@ -261,9 +261,9 @@ static int rpc_wait_bit_killable(void *word) @@ -103868,19 +111908,28 @@ index c1b6270..05089c1 100644 .proc_handler = read_reset_stat, }, diff --git a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c -index 8d904e4..b2fc727 100644 +index 8f92a61..eb13b74 100644 --- a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c +++ b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c -@@ -504,7 +504,7 @@ next_sge: - svc_rdma_put_context(ctxt, 0); - goto out; - } -- atomic_inc(&rdma_stat_read); -+ atomic_inc_unchecked(&rdma_stat_read); - - if (read_wr.num_sge < chl_map->ch[ch_no].count) { - chl_map->ch[ch_no].count -= read_wr.num_sge; -@@ -607,7 +607,7 @@ int svc_rdma_recvfrom(struct svc_rqst *rqstp) +@@ -219,7 +219,7 @@ static int rdma_read_chunk_lcl(struct svcxprt_rdma *xprt, + *page_no = pg_no; + *page_offset = pg_off; + ret = read; +- atomic_inc(&rdma_stat_read); ++ atomic_inc_unchecked(&rdma_stat_read); + return ret; + err: + svc_rdma_unmap_dma(ctxt); +@@ -355,7 +355,7 @@ static int rdma_read_chunk_frmr(struct svcxprt_rdma *xprt, + *page_no = pg_no; + *page_offset = pg_off; + ret = read; +- atomic_inc(&rdma_stat_read); ++ atomic_inc_unchecked(&rdma_stat_read); + return ret; + err: + svc_rdma_unmap_dma(ctxt); +@@ -512,7 +512,7 @@ int svc_rdma_recvfrom(struct svc_rqst *rqstp) dto_q); list_del_init(&ctxt->dto_q); } else { @@ -103889,7 +111938,7 @@ index 8d904e4..b2fc727 100644 clear_bit(XPT_DATA, &xprt->xpt_flags); ctxt = NULL; } -@@ -627,7 +627,7 @@ int svc_rdma_recvfrom(struct svc_rqst *rqstp) +@@ -531,7 +531,7 @@ int svc_rdma_recvfrom(struct svc_rqst *rqstp) dprintk("svcrdma: processing ctxt=%p on xprt=%p, rqstp=%p, status=%d\n", ctxt, rdma_xprt, rqstp, ctxt->wc_status); BUG_ON(ctxt->wc_status != IB_WC_SUCCESS); @@ -103899,10 +111948,10 @@ index 8d904e4..b2fc727 100644 /* Build up the XDR from the receive buffers. */ rdma_build_arg_xdr(rqstp, ctxt, ctxt->byte_len); diff --git a/net/sunrpc/xprtrdma/svc_rdma_sendto.c b/net/sunrpc/xprtrdma/svc_rdma_sendto.c -index 7e024a5..17f13d3 100644 +index 49fd21a..4bc455b 100644 --- a/net/sunrpc/xprtrdma/svc_rdma_sendto.c +++ b/net/sunrpc/xprtrdma/svc_rdma_sendto.c -@@ -363,7 +363,7 @@ static int send_write(struct svcxprt_rdma *xprt, struct svc_rqst *rqstp, +@@ -206,7 +206,7 @@ static int send_write(struct svcxprt_rdma *xprt, struct svc_rqst *rqstp, write_wr.wr.rdma.remote_addr = to; /* Post It */ @@ -103912,10 +111961,10 @@ index 7e024a5..17f13d3 100644 goto err; return 0; diff --git a/net/sunrpc/xprtrdma/svc_rdma_transport.c b/net/sunrpc/xprtrdma/svc_rdma_transport.c -index 25688fa..dc72003 100644 +index 06a5d92..c2fa21a 100644 --- a/net/sunrpc/xprtrdma/svc_rdma_transport.c +++ b/net/sunrpc/xprtrdma/svc_rdma_transport.c -@@ -292,7 +292,7 @@ static void rq_cq_reap(struct svcxprt_rdma *xprt) +@@ -295,7 +295,7 @@ static void rq_cq_reap(struct svcxprt_rdma *xprt) return; ib_req_notify_cq(xprt->sc_rq_cq, IB_CQ_NEXT_COMP); @@ -103924,7 +111973,7 @@ index 25688fa..dc72003 100644 while ((ret = ib_poll_cq(xprt->sc_rq_cq, 1, &wc)) > 0) { ctxt = (struct svc_rdma_op_ctxt *)(unsigned long)wc.wr_id; -@@ -314,7 +314,7 @@ static void rq_cq_reap(struct svcxprt_rdma *xprt) +@@ -317,7 +317,7 @@ static void rq_cq_reap(struct svcxprt_rdma *xprt) } if (ctxt) @@ -103933,16 +111982,16 @@ index 25688fa..dc72003 100644 set_bit(XPT_DATA, &xprt->sc_xprt.xpt_flags); /* -@@ -386,7 +386,7 @@ static void sq_cq_reap(struct svcxprt_rdma *xprt) +@@ -392,7 +392,7 @@ static void sq_cq_reap(struct svcxprt_rdma *xprt) return; ib_req_notify_cq(xprt->sc_sq_cq, IB_CQ_NEXT_COMP); - atomic_inc(&rdma_stat_sq_poll); + atomic_inc_unchecked(&rdma_stat_sq_poll); - while ((ret = ib_poll_cq(cq, 1, &wc)) > 0) { - if (wc.status != IB_WC_SUCCESS) - /* Close the transport */ -@@ -404,7 +404,7 @@ static void sq_cq_reap(struct svcxprt_rdma *xprt) + while ((ret = ib_poll_cq(cq, ARRAY_SIZE(wc_a), wc_a)) > 0) { + int i; + +@@ -420,7 +420,7 @@ static void sq_cq_reap(struct svcxprt_rdma *xprt) } if (ctxt) @@ -103951,7 +112000,7 @@ index 25688fa..dc72003 100644 } static void sq_comp_handler(struct ib_cq *cq, void *cq_context) -@@ -1261,7 +1261,7 @@ int svc_rdma_send(struct svcxprt_rdma *xprt, struct ib_send_wr *wr) +@@ -1279,7 +1279,7 @@ int svc_rdma_send(struct svcxprt_rdma *xprt, struct ib_send_wr *wr) spin_lock_bh(&xprt->sc_lock); if (xprt->sc_sq_depth < atomic_read(&xprt->sc_sq_count) + wr_count) { spin_unlock_bh(&xprt->sc_lock); @@ -103987,7 +112036,7 @@ index 6424372..afd36e9 100644 sub->evt.event = htohl(event, sub->swap); sub->evt.found_lower = htohl(found_lower, sub->swap); diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c -index bb7e8ba..9f444c6 100644 +index e968843..bc95776 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c @@ -791,6 +791,12 @@ static struct sock *unix_find_other(struct net *net, @@ -104036,7 +112085,7 @@ index bb7e8ba..9f444c6 100644 done_path_create(&path, dentry); return err; } -@@ -2344,9 +2363,13 @@ static int unix_seq_show(struct seq_file *seq, void *v) +@@ -2350,9 +2369,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 { @@ -104051,7 +112100,7 @@ index bb7e8ba..9f444c6 100644 seq_printf(seq, "%pK: %08X %08X %08X %04X %02X %5lu", s, -@@ -2373,8 +2396,10 @@ static int unix_seq_show(struct seq_file *seq, void *v) +@@ -2379,8 +2402,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]); @@ -104219,7 +112268,7 @@ index 0917f04..f4e3d8c 100644 if (!proc_create("x25/route", S_IRUGO, init_net.proc_net, diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c -index c08fbd1..3d99e85 100644 +index 0525d78..cccf7fd 100644 --- a/net/xfrm/xfrm_policy.c +++ b/net/xfrm/xfrm_policy.c @@ -325,7 +325,7 @@ static void xfrm_policy_kill(struct xfrm_policy *policy) @@ -104240,7 +112289,7 @@ index c08fbd1..3d99e85 100644 /* After previous checking, family can either be AF_INET or AF_INET6 */ if (policy->family == AF_INET) -@@ -1759,7 +1759,7 @@ xfrm_resolve_and_create_bundle(struct xfrm_policy **pols, int num_pols, +@@ -1749,7 +1749,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); @@ -104249,7 +112298,7 @@ index c08fbd1..3d99e85 100644 return xdst; } -@@ -2546,10 +2546,11 @@ void xfrm_garbage_collect(struct net *net) +@@ -2538,10 +2538,11 @@ void xfrm_garbage_collect(struct net *net) } EXPORT_SYMBOL(xfrm_garbage_collect); @@ -104262,7 +112311,7 @@ index c08fbd1..3d99e85 100644 static void xfrm_init_pmtu(struct dst_entry *dst) { -@@ -2599,7 +2600,7 @@ static int xfrm_bundle_ok(struct xfrm_dst *first) +@@ -2591,7 +2592,7 @@ static int xfrm_bundle_ok(struct xfrm_dst *first) if (xdst->xfrm_genid != dst->xfrm->genid) return 0; if (xdst->num_pols > 0 && @@ -104271,7 +112320,7 @@ index c08fbd1..3d99e85 100644 return 0; mtu = dst_mtu(dst->child); -@@ -2687,8 +2688,6 @@ int xfrm_policy_register_afinfo(struct xfrm_policy_afinfo *afinfo) +@@ -2679,8 +2680,6 @@ 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; @@ -104280,7 +112329,7 @@ index c08fbd1..3d99e85 100644 rcu_assign_pointer(xfrm_policy_afinfo[afinfo->family], afinfo); } spin_unlock(&xfrm_policy_afinfo_lock); -@@ -2742,7 +2741,6 @@ int xfrm_policy_unregister_afinfo(struct xfrm_policy_afinfo *afinfo) +@@ -2734,7 +2733,6 @@ int xfrm_policy_unregister_afinfo(struct xfrm_policy_afinfo *afinfo) dst_ops->check = NULL; dst_ops->negative_advice = NULL; dst_ops->link_failure = NULL; @@ -104288,7 +112337,7 @@ index c08fbd1..3d99e85 100644 } return err; } -@@ -3137,7 +3135,7 @@ static int xfrm_policy_migrate(struct xfrm_policy *pol, +@@ -3119,7 +3117,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 */ @@ -104298,7 +112347,7 @@ index c08fbd1..3d99e85 100644 } diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c -index 8e9c781..3972135 100644 +index 0ab5413..73dd2cf 100644 --- a/net/xfrm/xfrm_state.c +++ b/net/xfrm/xfrm_state.c @@ -173,12 +173,14 @@ int xfrm_register_type(const struct xfrm_type *type, unsigned short family) @@ -104392,7 +112441,7 @@ index 8e9c781..3972135 100644 module_put(mode->afinfo->owner); err = 0; } -@@ -1519,10 +1526,10 @@ EXPORT_SYMBOL(xfrm_find_acq_byseq); +@@ -1512,10 +1519,10 @@ EXPORT_SYMBOL(xfrm_find_acq_byseq); u32 xfrm_get_acqseq(void) { u32 res; @@ -104418,21 +112467,11 @@ index 05a6e3d..6716ec9 100644 __xfrm_sysctl_init(net); -diff --git a/scripts/Makefile b/scripts/Makefile -index 1d07860..f16fc22 100644 ---- a/scripts/Makefile -+++ b/scripts/Makefile -@@ -40,3 +40,5 @@ subdir-$(CONFIG_DTC) += dtc - - # Let clean descend into subdirs - subdir- += basic kconfig package selinux -+ -+clean-files := randstruct.seed diff --git a/scripts/Makefile.build b/scripts/Makefile.build -index 003bc26..d5f02b0 100644 +index bf3e677..c7d426e 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build -@@ -121,7 +121,7 @@ endif +@@ -60,7 +60,7 @@ endif endif # Do not include host rules unless needed @@ -104456,7 +112495,7 @@ index 686cb0d..9d653bf 100644 __clean-files := $(filter-out $(no-clean-files), $(__clean-files)) diff --git a/scripts/Makefile.host b/scripts/Makefile.host -index 1ac414f..38575f7 100644 +index 6689364..e56dc6a 100644 --- a/scripts/Makefile.host +++ b/scripts/Makefile.host @@ -31,6 +31,8 @@ @@ -104509,7 +112548,7 @@ index 1ac414f..38575f7 100644 # Link a shared library, based on position independent .o files # *.o -> .so shared library (host-cshlib) quiet_cmd_host-cshlib = HOSTLLD -shared $@ -@@ -165,6 +180,15 @@ quiet_cmd_host-cshlib = HOSTLLD -shared $@ +@@ -165,5 +180,14 @@ quiet_cmd_host-cshlib = HOSTLLD -shared $@ $(host-cshlib): $(obj)/%: $(host-cshobjs) FORCE $(call if_changed,host-cshlib) @@ -104523,11 +112562,10 @@ index 1ac414f..38575f7 100644 + $(call if_changed,host-cxxshlib) + targets += $(host-csingle) $(host-cmulti) $(host-cobjs)\ -- $(host-cxxmulti) $(host-cxxobjs) $(host-cshlib) $(host-cshobjs) +- $(host-cxxmulti) $(host-cxxobjs) $(host-cshlib) $(host-cshobjs) + $(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 078fe1d..fbdb363 100644 +index b304068..462d24e 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) @@ -104648,7 +112686,7 @@ index 86a4fe7..99e91f9 100644 kallsymso="" kallsyms_vmlinux="" diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c -index 1924990..3de7363 100644 +index e614ef6..d9d2b01 100644 --- a/scripts/mod/file2alias.c +++ b/scripts/mod/file2alias.c @@ -142,7 +142,7 @@ static void device_id_check(const char *modname, const char *device_id, @@ -104705,7 +112743,7 @@ index 1924990..3de7363 100644 buf_printf(&mod->dev_table_buf, "MODULE_ALIAS(\"pnp:d%s*\");\n", id); -@@ -941,7 +941,7 @@ static void dmi_ascii_filter(char *d, const char *s) +@@ -939,7 +939,7 @@ static void dmi_ascii_filter(char *d, const char *s) static int do_dmi_entry(const char *filename, void *symval, char *alias) { @@ -104715,7 +112753,7 @@ index 1924990..3de7363 100644 sprintf(alias, "dmi*"); diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c -index 0663556..d9494f0 100644 +index 9d9c5b9..a3af177 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -949,6 +949,7 @@ enum mismatch { @@ -104769,7 +112807,7 @@ index 0663556..d9494f0 100644 } @@ -1687,7 +1702,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) + struct elf_info *elf) { - int i; + unsigned int i; @@ -104818,7 +112856,7 @@ index 168b43d..77914bf 100644 struct module { struct module *next; diff --git a/scripts/mod/sumversion.c b/scripts/mod/sumversion.c -index deb2994..af4f63e 100644 +index 944418d..15291e4 100644 --- a/scripts/mod/sumversion.c +++ b/scripts/mod/sumversion.c @@ -470,7 +470,7 @@ static void write_version(const char *filename, const char *sum, @@ -104846,19 +112884,19 @@ index 0865b3e..7235dd4 100644 __ksymtab_gpl : { *(SORT(___ksymtab_gpl+*)) } __ksymtab_unused : { *(SORT(___ksymtab_unused+*)) } diff --git a/scripts/package/builddeb b/scripts/package/builddeb -index 152d4d2..791684c 100644 +index 35d5a58..9e04789 100644 --- a/scripts/package/builddeb +++ b/scripts/package/builddeb -@@ -291,6 +291,7 @@ fi - (cd $srctree; find . -name Makefile\* -o -name Kconfig\* -o -name \*.pl > "$objtree/debian/hdrsrcfiles") - (cd $srctree; find arch/$SRCARCH/include include scripts -type f >> "$objtree/debian/hdrsrcfiles") - (cd $objtree; find arch/$SRCARCH/include Module.symvers include scripts -type f >> "$objtree/debian/hdrobjfiles") +@@ -295,6 +295,7 @@ fi + (cd $srctree; find arch/$SRCARCH -name module.lds -o -name Kbuild.platforms -o -name Platform) >> "$objtree/debian/hdrsrcfiles" + (cd $srctree; find $(find arch/$SRCARCH -name include -o -name scripts -type d) -type f) >> "$objtree/debian/hdrsrcfiles" + (cd $objtree; find arch/$SRCARCH/include Module.symvers include scripts -type f) >> "$objtree/debian/hdrobjfiles" +(cd $objtree; find tools/gcc -name \*.so >> "$objtree/debian/hdrobjfiles") destdir=$kernel_headers_dir/usr/src/linux-headers-$version mkdir -p "$destdir" - (cd $srctree; tar -c -f - -T "$objtree/debian/hdrsrcfiles") | (cd $destdir; tar -xf -) + (cd $srctree; tar -c -f - -T -) < "$objtree/debian/hdrsrcfiles" | (cd $destdir; tar -xf -) diff --git a/scripts/pnmtologo.c b/scripts/pnmtologo.c -index 68bb4ef..2f419e1 100644 +index 4718d78..9220d58 100644 --- a/scripts/pnmtologo.c +++ b/scripts/pnmtologo.c @@ -244,14 +244,14 @@ static void write_header(void) @@ -106053,10 +114091,10 @@ index 3478965..ec7bb9e 100644 if (iov != iovstack) kfree(iov); diff --git a/security/keys/internal.h b/security/keys/internal.h -index 80b2aac..bb7ee65 100644 +index 5f20da0..444ccf1 100644 --- a/security/keys/internal.h +++ b/security/keys/internal.h -@@ -253,7 +253,7 @@ extern long keyctl_instantiate_key_iov(key_serial_t, +@@ -244,7 +244,7 @@ extern long keyctl_instantiate_key_iov(key_serial_t, extern long keyctl_invalidate_key(key_serial_t); extern long keyctl_instantiate_key_common(key_serial_t, @@ -106066,7 +114104,7 @@ index 80b2aac..bb7ee65 100644 #ifdef CONFIG_PERSISTENT_KEYRINGS extern long keyctl_get_persistent(uid_t, key_serial_t); diff --git a/security/keys/key.c b/security/keys/key.c -index 6e21c11..9ed67ca 100644 +index 2048a11..101df4c 100644 --- a/security/keys/key.c +++ b/security/keys/key.c @@ -285,7 +285,7 @@ struct key *key_alloc(struct key_type *type, const char *desc, @@ -106123,7 +114161,7 @@ index 6e21c11..9ed67ca 100644 /* record the root user tracking */ rb_link_node(&root_key_user.node, diff --git a/security/keys/keyctl.c b/security/keys/keyctl.c -index cee72ce..e46074a 100644 +index cd5bd0c..acd0d5c 100644 --- a/security/keys/keyctl.c +++ b/security/keys/keyctl.c @@ -987,7 +987,7 @@ static int keyctl_change_reqkey_auth(struct key *key) @@ -106183,7 +114221,7 @@ index f728728..6457a0c 100644 /* diff --git a/security/security.c b/security/security.c -index 8b774f3..a396233 100644 +index 31614e9..8b86b12 100644 --- a/security/security.c +++ b/security/security.c @@ -33,8 +33,8 @@ @@ -106210,7 +114248,7 @@ index 8b774f3..a396233 100644 static int __init choose_lsm(char *str) { diff --git a/security/selinux/avc.c b/security/selinux/avc.c -index fc3e662..7844c60 100644 +index a18f1fa..c9b9fc4 100644 --- a/security/selinux/avc.c +++ b/security/selinux/avc.c @@ -59,7 +59,7 @@ struct avc_node { @@ -106241,7 +114279,7 @@ index fc3e662..7844c60 100644 lock = &avc_cache.slots_lock[hvalue]; diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c -index 2c7341d..1da068e 100644 +index 83d06db..d4d6861 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c @@ -95,8 +95,6 @@ @@ -106253,7 +114291,7 @@ index 2c7341d..1da068e 100644 /* SECMARK reference count */ static atomic_t selinux_secmark_refcount = ATOMIC_INIT(0); -@@ -5758,7 +5756,7 @@ static int selinux_key_getsecurity(struct key *key, char **_buffer) +@@ -5761,7 +5759,7 @@ static int selinux_key_getsecurity(struct key *key, char **_buffer) #endif @@ -106262,7 +114300,7 @@ index 2c7341d..1da068e 100644 .name = "selinux", .ptrace_access_check = selinux_ptrace_access_check, -@@ -6111,6 +6109,9 @@ static void selinux_nf_ip_exit(void) +@@ -6114,6 +6112,9 @@ static void selinux_nf_ip_exit(void) #ifdef CONFIG_SECURITY_SELINUX_DISABLE static int selinux_disabled; @@ -106272,7 +114310,7 @@ index 2c7341d..1da068e 100644 int selinux_disable(void) { if (ss_initialized) { -@@ -6128,7 +6129,9 @@ int selinux_disable(void) +@@ -6131,7 +6132,9 @@ int selinux_disable(void) selinux_disabled = 1; selinux_enabled = 0; @@ -106297,10 +114335,10 @@ index 1450f85..a91e0bc 100644 } rtnl_unlock(); diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c -index 14f52be..7352368 100644 +index f2c3080..813c85e 100644 --- a/security/smack/smack_lsm.c +++ b/security/smack/smack_lsm.c -@@ -3726,7 +3726,7 @@ static int smack_inode_getsecctx(struct inode *inode, void **ctx, u32 *ctxlen) +@@ -3849,7 +3849,7 @@ static int smack_inode_getsecctx(struct inode *inode, void **ctx, u32 *ctxlen) return 0; } @@ -106536,7 +114574,7 @@ index 13c88fbc..f8c115e 100644 { .procname = "kernel", }, { .procname = "yama", }, diff --git a/sound/aoa/codecs/onyx.c b/sound/aoa/codecs/onyx.c -index f01bffb..bdda392 100644 +index 401107b..b9c47c6 100644 --- a/sound/aoa/codecs/onyx.c +++ b/sound/aoa/codecs/onyx.c @@ -54,7 +54,7 @@ struct onyx { @@ -106741,7 +114779,7 @@ index 91a786a..4c07ed4 100644 dev->driver_data = NULL; ops->num_init_devices--; diff --git a/sound/core/seq/seq_midi.c b/sound/core/seq/seq_midi.c -index 3e05c55..0f02efc 100644 +index a1fd77a..69cd659 100644 --- a/sound/core/seq/seq_midi.c +++ b/sound/core/seq/seq_midi.c @@ -462,8 +462,8 @@ snd_seq_midisynth_unregister_port(struct snd_seq_device *dev) @@ -106893,39 +114931,48 @@ index 78ccfa4..7a0857b 100644 struct snd_rawmidi_substream *midi_input[PORTMAN_NUM_INPUT_PORTS]; }; diff --git a/sound/firewire/amdtp.c b/sound/firewire/amdtp.c -index 9048777..2d8b1fc 100644 +index f96bf4c..f3bd1e0 100644 --- a/sound/firewire/amdtp.c +++ b/sound/firewire/amdtp.c -@@ -488,7 +488,7 @@ static void queue_out_packet(struct amdtp_out_stream *s, unsigned int cycle) - ptr = s->pcm_buffer_pointer + data_blocks; - if (ptr >= pcm->runtime->buffer_size) - ptr -= pcm->runtime->buffer_size; -- ACCESS_ONCE(s->pcm_buffer_pointer) = ptr; -+ ACCESS_ONCE_RW(s->pcm_buffer_pointer) = ptr; - - s->pcm_period_pointer += data_blocks; - if (s->pcm_period_pointer >= pcm->runtime->period_size) { -@@ -655,7 +655,7 @@ EXPORT_SYMBOL(amdtp_out_stream_pcm_pointer); +@@ -512,7 +512,7 @@ static void update_pcm_pointers(struct amdtp_stream *s, + ptr = s->pcm_buffer_pointer + frames; + if (ptr >= pcm->runtime->buffer_size) + ptr -= pcm->runtime->buffer_size; +- ACCESS_ONCE(s->pcm_buffer_pointer) = ptr; ++ ACCESS_ONCE_RW(s->pcm_buffer_pointer) = ptr; + + s->pcm_period_pointer += frames; + if (s->pcm_period_pointer >= pcm->runtime->period_size) { +@@ -952,7 +952,7 @@ EXPORT_SYMBOL(amdtp_stream_pcm_pointer); */ - void amdtp_out_stream_update(struct amdtp_out_stream *s) + void amdtp_stream_update(struct amdtp_stream *s) { - ACCESS_ONCE(s->source_node_id_field) = + ACCESS_ONCE_RW(s->source_node_id_field) = (fw_parent_device(s->unit)->card->node_id & 0x3f) << 24; } - EXPORT_SYMBOL(amdtp_out_stream_update); + EXPORT_SYMBOL(amdtp_stream_update); diff --git a/sound/firewire/amdtp.h b/sound/firewire/amdtp.h -index 2746ecd..c35dedd 100644 +index d8ee7b0..79dfa2a 100644 --- a/sound/firewire/amdtp.h +++ b/sound/firewire/amdtp.h -@@ -135,7 +135,7 @@ static inline bool amdtp_out_streaming_error(struct amdtp_out_stream *s) - static inline void amdtp_out_stream_pcm_trigger(struct amdtp_out_stream *s, - struct snd_pcm_substream *pcm) +@@ -211,7 +211,7 @@ static inline bool amdtp_stream_pcm_running(struct amdtp_stream *s) + static inline void amdtp_stream_pcm_trigger(struct amdtp_stream *s, + struct snd_pcm_substream *pcm) { - ACCESS_ONCE(s->pcm) = pcm; + ACCESS_ONCE_RW(s->pcm) = pcm; } + /** +@@ -229,7 +229,7 @@ static inline void amdtp_stream_midi_trigger(struct amdtp_stream *s, + struct snd_rawmidi_substream *midi) + { + if (port < s->midi_ports) +- ACCESS_ONCE(s->midi[port]) = midi; ++ ACCESS_ONCE_RW(s->midi[port]) = midi; + } + static inline bool cip_sfc_is_base_44100(enum cip_sfc sfc) diff --git a/sound/firewire/isight.c b/sound/firewire/isight.c index 7ac9443..0ec6274 100644 @@ -107033,7 +115080,7 @@ index 048439a..3be9f6f 100644 userbuf+useroffs + p, locallen)) diff --git a/sound/oss/swarm_cs4297a.c b/sound/oss/swarm_cs4297a.c -index f851fd0..92576fb 100644 +index a33e8ce..2262303 100644 --- a/sound/oss/swarm_cs4297a.c +++ b/sound/oss/swarm_cs4297a.c @@ -2623,7 +2623,6 @@ static int __init cs4297a_init(void) @@ -107042,9 +115089,9 @@ index f851fd0..92576fb 100644 u32 pwr, id; - mm_segment_t fs; int rval; - #ifndef CONFIG_BCM_CS4297A_CSWARM u64 cfg; -@@ -2713,22 +2712,23 @@ static int __init cs4297a_init(void) + int mdio_val; +@@ -2709,22 +2708,23 @@ static int __init cs4297a_init(void) if (!rval) { char *sb1250_duart_present; @@ -107172,42 +115219,11 @@ index 81c916a..516f0bf 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 5428a1f..474f651 100644 ---- a/sound/soc/fsl/fsl_ssi.c -+++ b/sound/soc/fsl/fsl_ssi.c -@@ -1255,7 +1255,6 @@ static int fsl_ssi_probe(struct platform_device *pdev) - { - struct fsl_ssi_private *ssi_private; - int ret = 0; -- struct device_attribute *dev_attr = NULL; - struct device_node *np = pdev->dev.of_node; - const struct of_device_id *of_id; - enum fsl_ssi_type hw_type; -@@ -1481,7 +1480,7 @@ static int fsl_ssi_probe(struct platform_device *pdev) - &ssi_private->cpu_dai_drv, 1); - if (ret) { - dev_err(&pdev->dev, "failed to register DAI: %d\n", ret); -- goto error_dev; -+ goto error_clk; - } - - ret = fsl_ssi_debugfs_create(ssi_private, &pdev->dev); -@@ -1562,9 +1561,6 @@ error_pcm: - error_dbgfs: - snd_soc_unregister_component(&pdev->dev); - --error_dev: -- device_remove_file(&pdev->dev, dev_attr); -- - error_clk: - if (ssi_private->ssi_on_imx) { - if (!IS_ERR(ssi_private->baudclk)) diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c -index 051c006..70598e8 100644 +index b87d7d8..0ccaac3 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c -@@ -2255,8 +2255,10 @@ int snd_soc_set_ac97_ops_of_reset(struct snd_ac97_bus_ops *ops, +@@ -2279,8 +2279,10 @@ int snd_soc_set_ac97_ops_of_reset(struct snd_ac97_bus_ops *ops, if (ret) return ret; @@ -109747,10 +117763,10 @@ index 0000000..39d7cc7 +} diff --git a/tools/gcc/randomize_layout_plugin.c b/tools/gcc/randomize_layout_plugin.c new file mode 100644 -index 0000000..8dafb22 +index 0000000..a5cb46b --- /dev/null +++ b/tools/gcc/randomize_layout_plugin.c -@@ -0,0 +1,910 @@ +@@ -0,0 +1,915 @@ +/* + * Copyright 2014 by Open Source Security, Inc., Brad Spengler + * and PaX Team @@ -110069,6 +118085,11 @@ index 0000000..8dafb22 + lookup_attribute("no_randomize_layout", TYPE_ATTRIBUTES(TYPE_MAIN_VARIANT(type)))) + return 0; + ++ /* Workaround for 3rd-party VirtualBox source that we can't modify ourselves */ ++ if (!strcmp((const char *)ORIG_TYPE_NAME(type), "INTNETTRUNKFACTORY") || ++ !strcmp((const char *)ORIG_TYPE_NAME(type), "RAWPCIFACTORY")) ++ return 0; ++ + /* throw out any structs in uapi */ + xloc = expand_location(DECL_SOURCE_LOCATION(TYPE_FIELDS(type))); + @@ -110806,10 +118827,10 @@ index 0000000..12b1e3b +exit 0 diff --git a/tools/gcc/size_overflow_plugin/insert_size_overflow_asm.c b/tools/gcc/size_overflow_plugin/insert_size_overflow_asm.c new file mode 100644 -index 0000000..3e8148c +index 0000000..c43901f --- /dev/null +++ b/tools/gcc/size_overflow_plugin/insert_size_overflow_asm.c -@@ -0,0 +1,790 @@ +@@ -0,0 +1,748 @@ +/* + * Copyright 2011-2014 by Emese Revfy + * Licensed under the GPL v2, or (at your option) v3 @@ -111289,45 +119310,6 @@ index 0000000..3e8148c + return true; +} + -+static bool is_from_cast(const_tree node) -+{ -+ gimple def_stmt = get_def_stmt(node); -+ -+ if (!def_stmt) -+ return false; -+ -+ if (gimple_assign_cast_p(def_stmt)) -+ return true; -+ -+ return false; -+} -+ -+// Skip duplication when there is a minus expr and the type of rhs1 or rhs2 is a pointer_type. -+static bool skip_ptr_minus(gimple stmt) -+{ -+ const_tree rhs1, rhs2, ptr1_rhs, ptr2_rhs; -+ -+ if (gimple_assign_rhs_code(stmt) != MINUS_EXPR) -+ return false; -+ -+ rhs1 = gimple_assign_rhs1(stmt); -+ if (!is_from_cast(rhs1)) -+ return false; -+ -+ rhs2 = gimple_assign_rhs2(stmt); -+ if (!is_from_cast(rhs2)) -+ return false; -+ -+ ptr1_rhs = gimple_assign_rhs1(get_def_stmt(rhs1)); -+ ptr2_rhs = gimple_assign_rhs1(get_def_stmt(rhs2)); -+ -+ if (TREE_CODE(TREE_TYPE(ptr1_rhs)) != POINTER_TYPE && TREE_CODE(TREE_TYPE(ptr2_rhs)) != POINTER_TYPE) -+ return false; -+ -+ create_mark_asm(stmt, MARK_YES); -+ return true; -+} -+ +static void walk_use_def_ptr(struct pointer_set_t *visited, const_tree lhs) +{ + gimple def_stmt; @@ -111361,9 +119343,6 @@ index 0000000..3e8148c + walk_use_def_ptr(visited, gimple_assign_rhs1(def_stmt)); + return; + case 3: -+ if (skip_ptr_minus(def_stmt)) -+ return; -+ + walk_use_def_ptr(visited, gimple_assign_rhs1(def_stmt)); + walk_use_def_ptr(visited, gimple_assign_rhs2(def_stmt)); + return; @@ -111602,10 +119581,10 @@ index 0000000..3e8148c +} diff --git a/tools/gcc/size_overflow_plugin/insert_size_overflow_check_core.c b/tools/gcc/size_overflow_plugin/insert_size_overflow_check_core.c new file mode 100644 -index 0000000..88469e9 +index 0000000..73f0a12 --- /dev/null +++ b/tools/gcc/size_overflow_plugin/insert_size_overflow_check_core.c -@@ -0,0 +1,902 @@ +@@ -0,0 +1,943 @@ +/* + * Copyright 2011-2014 by Emese Revfy + * Licensed under the GPL v2, or (at your option) v3 @@ -112329,6 +120308,44 @@ index 0000000..88469e9 + inform(loc, "Integer size_overflow check applied here."); +} + ++static bool is_from_cast(const_tree node) ++{ ++ gimple def_stmt = get_def_stmt(node); ++ ++ if (!def_stmt) ++ return false; ++ ++ if (gimple_assign_cast_p(def_stmt)) ++ return true; ++ ++ return false; ++} ++ ++// Skip duplication when there is a minus expr and the type of rhs1 or rhs2 is a pointer_type. ++static bool is_a_ptr_minus(gimple stmt) ++{ ++ const_tree rhs1, rhs2, ptr1_rhs, ptr2_rhs; ++ ++ if (gimple_assign_rhs_code(stmt) != MINUS_EXPR) ++ return false; ++ ++ rhs1 = gimple_assign_rhs1(stmt); ++ if (!is_from_cast(rhs1)) ++ return false; ++ ++ rhs2 = gimple_assign_rhs2(stmt); ++ if (!is_from_cast(rhs2)) ++ return false; ++ ++ ptr1_rhs = gimple_assign_rhs1(get_def_stmt(rhs1)); ++ ptr2_rhs = gimple_assign_rhs1(get_def_stmt(rhs2)); ++ ++ if (TREE_CODE(TREE_TYPE(ptr1_rhs)) != POINTER_TYPE && TREE_CODE(TREE_TYPE(ptr2_rhs)) != POINTER_TYPE) ++ return false; ++ ++ return true; ++} ++ +static tree handle_binary_ops(struct visited *visited, struct cgraph_node *caller_node, tree lhs) +{ + enum intentional_overflow_type res; @@ -112337,6 +120354,9 @@ index 0000000..88469e9 + tree new_rhs1 = NULL_TREE; + tree new_rhs2 = NULL_TREE; + ++ if (is_a_ptr_minus(def_stmt)) ++ return create_assign(visited, def_stmt, lhs, AFTER_STMT); ++ + rhs1 = gimple_assign_rhs1(def_stmt); + rhs2 = gimple_assign_rhs2(def_stmt); + @@ -112510,7 +120530,7 @@ index 0000000..88469e9 + diff --git a/tools/gcc/size_overflow_plugin/insert_size_overflow_check_ipa.c b/tools/gcc/size_overflow_plugin/insert_size_overflow_check_ipa.c new file mode 100644 -index 0000000..715a590 +index 0000000..df50164 --- /dev/null +++ b/tools/gcc/size_overflow_plugin/insert_size_overflow_check_ipa.c @@ -0,0 +1,1141 @@ @@ -112749,7 +120769,7 @@ index 0000000..715a590 + + switch (gimple_code(def_stmt)) { + case GIMPLE_CALL: -+ if (lhs == gimple_return_retval(def_stmt)) ++ if (lhs == gimple_call_lhs(def_stmt)) + interesting_conditions[RET] = true; + return; + case GIMPLE_NOP: @@ -113657,10 +121677,10 @@ index 0000000..715a590 + diff --git a/tools/gcc/size_overflow_plugin/intentional_overflow.c b/tools/gcc/size_overflow_plugin/intentional_overflow.c new file mode 100644 -index 0000000..38904bc +index 0000000..d71d72a --- /dev/null +++ b/tools/gcc/size_overflow_plugin/intentional_overflow.c -@@ -0,0 +1,733 @@ +@@ -0,0 +1,736 @@ +/* + * Copyright 2011-2014 by Emese Revfy + * Licensed under the GPL v2, or (at your option) v3 @@ -114265,6 +122285,9 @@ index 0000000..38904bc + } else + return false; + ++ if (!is_gimple_assign(def_stmt)) ++ return false; ++ + if (gimple_assign_rhs_code(def_stmt) != PLUS_EXPR && gimple_assign_rhs_code(def_stmt) != MINUS_EXPR) + return false; + @@ -115004,10 +123027,10 @@ index 0000000..4378111 +} diff --git a/tools/gcc/size_overflow_plugin/size_overflow_hash.data b/tools/gcc/size_overflow_plugin/size_overflow_hash.data new file mode 100644 -index 0000000..386792a +index 0000000..37dbdb1 --- /dev/null +++ b/tools/gcc/size_overflow_plugin/size_overflow_hash.data -@@ -0,0 +1,5808 @@ +@@ -0,0 +1,5511 @@ +intel_fake_agp_alloc_by_type_1 intel_fake_agp_alloc_by_type 1 1 NULL +storvsc_connect_to_vsp_22 storvsc_connect_to_vsp 2 22 NULL +compat_sock_setsockopt_23 compat_sock_setsockopt 5 23 NULL @@ -115022,12 +123045,11 @@ index 0000000..386792a +init_q_132 init_q 4 132 NULL +memstick_alloc_host_142 memstick_alloc_host 1 142 NULL +hva_to_gfn_memslot_149 hva_to_gfn_memslot 0-1 149 NULL -+ping_v6_sendmsg_152 ping_v6_sendmsg 4 152 NULL +tracing_trace_options_write_153 tracing_trace_options_write 3 153 NULL nohasharray +ext4_ext_get_actual_len_153 ext4_ext_get_actual_len 0 153 &tracing_trace_options_write_153 -+pci_request_selected_regions_169 pci_request_selected_regions 0 169 NULL +xfs_buf_item_get_format_189 xfs_buf_item_get_format 2 189 NULL +iscsi_session_setup_196 iscsi_session_setup 4-5 196 NULL ++obd_proc_jobid_var_seq_write_199 obd_proc_jobid_var_seq_write 3 199 NULL +ll_xattr_cache_seq_write_250 ll_xattr_cache_seq_write 3 250 NULL +br_port_info_size_268 br_port_info_size 0 268 NULL +read_file_war_stats_292 read_file_war_stats 3 292 NULL @@ -115046,10 +123068,9 @@ index 0000000..386792a +zlib_deflate_workspacesize_537 zlib_deflate_workspacesize 0-1-2 537 NULL +iwl_dbgfs_wowlan_sram_read_540 iwl_dbgfs_wowlan_sram_read 3 540 NULL +sco_sock_setsockopt_552 sco_sock_setsockopt 5 552 NULL -+lpfc_nlp_state_name_556 lpfc_nlp_state_name 2 556 NULL +snd_aw2_saa7146_get_hw_ptr_playback_558 snd_aw2_saa7146_get_hw_ptr_playback 0 558 NULL -+start_isoc_chain_565 start_isoc_chain 2 565 NULL nohasharray -+dev_hard_header_565 dev_hard_header 0 565 &start_isoc_chain_565 ++dev_hard_header_565 dev_hard_header 0 565 NULL nohasharray ++start_isoc_chain_565 start_isoc_chain 2 565 &dev_hard_header_565 +smk_write_load_self2_591 smk_write_load_self2 3 591 NULL +btrfs_stack_file_extent_offset_607 btrfs_stack_file_extent_offset 0 607 NULL +ni_gpct_device_construct_610 ni_gpct_device_construct 5 610 NULL @@ -115066,7 +123087,6 @@ index 0000000..386792a +dvb_video_write_754 dvb_video_write 3 754 NULL +cfs_trace_allocate_string_buffer_781 cfs_trace_allocate_string_buffer 2 781 NULL +ath6kl_disconnect_timeout_write_794 ath6kl_disconnect_timeout_write 3 794 NULL -+snd_pcm_drain_811 snd_pcm_drain 0 811 NULL +if_writecmd_815 if_writecmd 2 815 NULL +aac_change_queue_depth_825 aac_change_queue_depth 2 825 NULL +error_state_read_859 error_state_read 6 859 NULL @@ -115075,10 +123095,7 @@ index 0000000..386792a +snd_pcm_action_single_905 snd_pcm_action_single 0 905 NULL +carl9170_cmd_buf_950 carl9170_cmd_buf 3 950 NULL +__nodes_weight_956 __nodes_weight 0 956 NULL -+bnx2x_fill_fw_str_968 bnx2x_fill_fw_str 3 968 NULL -+mnt_want_write_975 mnt_want_write 0 975 NULL +usnic_ib_qp_grp_dump_hdr_989 usnic_ib_qp_grp_dump_hdr 2 989 NULL -+memcmp_990 memcmp 0 990 NULL +smk_write_cipso2_1021 smk_write_cipso2 3 1021 NULL +gigaset_initdriver_1060 gigaset_initdriver 2 1060 NULL +mce_request_packet_1073 mce_request_packet 3 1073 NULL @@ -115095,7 +123112,6 @@ index 0000000..386792a +dgrp_dpa_read_1204 dgrp_dpa_read 3 1204 NULL +i2cdev_read_1206 i2cdev_read 3 1206 NULL +lov_ost_pool_init_1215 lov_ost_pool_init 2 1215 NULL -+fsync_buffers_list_1219 fsync_buffers_list 0 1219 NULL +kernfs_file_direct_read_1238 kernfs_file_direct_read 3 1238 NULL +acpi_battery_write_alarm_1240 acpi_battery_write_alarm 3 1240 NULL +drm_primary_helper_create_plane_1262 drm_primary_helper_create_plane 3 1262 NULL @@ -115112,6 +123128,7 @@ index 0000000..386792a +ipx_sendmsg_1362 ipx_sendmsg 4 1362 NULL +fw_stats_raw_read_1369 fw_stats_raw_read 3 1369 NULL +ocfs2_prepare_inode_for_write_1372 ocfs2_prepare_inode_for_write 3 1372 NULL ++xpcs_reg_addr_read_1381 xpcs_reg_addr_read 3 1381 NULL +sctp_setsockopt_initmsg_1383 sctp_setsockopt_initmsg 3 1383 NULL +do_msgsnd_1387 do_msgsnd 4 1387 NULL +SYSC_io_getevents_1392 SYSC_io_getevents 3 1392 NULL @@ -115127,7 +123144,6 @@ index 0000000..386792a +alloc_perm_bits_1532 alloc_perm_bits 2 1532 NULL +ath6kl_init_get_fwcaps_1557 ath6kl_init_get_fwcaps 3 1557 NULL +ieee80211_if_read_dot11MeshHWMPnetDiameterTraversalTime_1589 ieee80211_if_read_dot11MeshHWMPnetDiameterTraversalTime 3 1589 NULL -+ipath_ht_handle_hwerrors_1592 ipath_ht_handle_hwerrors 3 1592 NULL +packet_buffer_init_1607 packet_buffer_init 2 1607 NULL +btmrvl_hscmd_read_1614 btmrvl_hscmd_read 3 1614 NULL +v9fs_fid_xattr_get_1618 v9fs_fid_xattr_get 0 1618 NULL @@ -115139,13 +123155,12 @@ index 0000000..386792a +pdu_write_u_1710 pdu_write_u 3 1710 NULL +coda_psdev_write_1711 coda_psdev_write 3 1711 NULL +btrfs_dir_data_len_1714 btrfs_dir_data_len 0 1714 NULL -+internal_create_group_1733 internal_create_group 0 1733 NULL +dev_irnet_read_1741 dev_irnet_read 3 1741 NULL +usb_ep_align_maybe_1743 usb_ep_align_maybe 0-3 1743 NULL +tx_frag_called_read_1748 tx_frag_called_read 3 1748 NULL +cosa_write_1774 cosa_write 3 1774 NULL +fcoe_ctlr_device_add_1793 fcoe_ctlr_device_add 3 1793 NULL -+__nodelist_scnprintf_1815 __nodelist_scnprintf 2-0 1815 NULL ++__nodelist_scnprintf_1815 __nodelist_scnprintf 2 1815 NULL +sb_issue_zeroout_1884 sb_issue_zeroout 3 1884 NULL +rx_defrag_called_read_1897 rx_defrag_called_read 3 1897 NULL +nfs_parse_server_name_1899 nfs_parse_server_name 2 1899 NULL @@ -115156,7 +123171,6 @@ index 0000000..386792a +ext3_fiemap_1936 ext3_fiemap 4 1936 NULL +cyttsp_probe_1940 cyttsp_probe 4 1940 NULL +ieee80211_if_fmt_dot11MeshConfirmTimeout_1945 ieee80211_if_fmt_dot11MeshConfirmTimeout 3 1945 NULL -+__assign_irq_vector_1961 __assign_irq_vector 0 1961 NULL +ivtv_v4l2_read_1964 ivtv_v4l2_read 3 1964 NULL +sel_read_avc_hash_stats_1984 sel_read_avc_hash_stats 3 1984 NULL +gpio_power_write_1991 gpio_power_write 3 1991 NULL @@ -115170,6 +123184,7 @@ index 0000000..386792a +__generic_copy_from_user_intel_2073 __generic_copy_from_user_intel 0-3 2073 NULL +diva_set_driver_dbg_mask_2077 diva_set_driver_dbg_mask 0 2077 NULL +iwl_dbgfs_current_sleep_command_read_2081 iwl_dbgfs_current_sleep_command_read 3 2081 NULL ++xgmac_reg_value_read_2095 xgmac_reg_value_read 3 2095 NULL +idetape_chrdev_read_2097 idetape_chrdev_read 3 2097 NULL +__set_print_fmt_2106 __set_print_fmt 0 2106 NULL +iwl_dbgfs_log_event_read_2107 iwl_dbgfs_log_event_read 3 2107 NULL @@ -115194,19 +123209,18 @@ index 0000000..386792a +sr_read_cmd_2299 sr_read_cmd 5 2299 NULL +kvm_clear_guest_page_2308 kvm_clear_guest_page 4 2308 NULL +intel_sdvo_set_value_2311 intel_sdvo_set_value 4 2311 NULL -+picolcd_fb_write_2318 picolcd_fb_write 3 2318 NULL nohasharray -+hfsplus_find_init_2318 hfsplus_find_init 0 2318 &picolcd_fb_write_2318 ++hfsplus_find_init_2318 hfsplus_find_init 0 2318 NULL nohasharray ++picolcd_fb_write_2318 picolcd_fb_write 3 2318 &hfsplus_find_init_2318 +dice_hwdep_read_2326 dice_hwdep_read 3 2326 NULL +__erst_read_to_erange_2341 __erst_read_to_erange 0 2341 NULL +zr364xx_read_2354 zr364xx_read 3 2354 NULL +viafb_iga2_odev_proc_write_2363 viafb_iga2_odev_proc_write 3 2363 NULL -+xfs_buf_map_from_irec_2368 xfs_buf_map_from_irec 5 2368 NULL nohasharray -+rose_recvmsg_2368 rose_recvmsg 4 2368 &xfs_buf_map_from_irec_2368 ++rose_recvmsg_2368 rose_recvmsg 4 2368 NULL nohasharray ++xfs_buf_map_from_irec_2368 xfs_buf_map_from_irec 5 2368 &rose_recvmsg_2368 +il_dbgfs_sensitivity_read_2370 il_dbgfs_sensitivity_read 3 2370 NULL +rxpipe_rx_prep_beacon_drop_read_2403 rxpipe_rx_prep_beacon_drop_read 3 2403 NULL +isdn_v110_open_2418 isdn_v110_open 3 2418 NULL +raid1_size_2419 raid1_size 0-2 2419 NULL -+arch_msi_check_device_2449 arch_msi_check_device 0 2449 NULL +b43legacy_debugfs_read_2473 b43legacy_debugfs_read 3 2473 NULL +wiphy_new_2482 wiphy_new 2 2482 NULL +bio_alloc_bioset_2484 bio_alloc_bioset 2 2484 NULL @@ -115222,6 +123236,7 @@ index 0000000..386792a +slot_bytes_2609 slot_bytes 0 2609 NULL +smk_write_logging_2618 smk_write_logging 3 2618 NULL +switch_status_2629 switch_status 5 2629 NULL ++_proc_do_string_2632 _proc_do_string 2 2632 NULL +tcp_xmit_size_goal_2661 tcp_xmit_size_goal 2 2661 NULL +osc_build_ppga_2670 osc_build_ppga 2 2670 NULL +ffs_ep0_read_2672 ffs_ep0_read 3 2672 NULL @@ -115233,11 +123248,10 @@ index 0000000..386792a +fsl_edma_alloc_desc_2769 fsl_edma_alloc_desc 2 2769 NULL +mon_bin_ioctl_2771 mon_bin_ioctl 3 2771 NULL +set_msr_hyperv_pw_2785 set_msr_hyperv_pw 3 2785 NULL -+device_add_attrs_2789 device_add_attrs 0 2789 NULL +iwl_dbgfs_clear_ucode_statistics_write_2804 iwl_dbgfs_clear_ucode_statistics_write 3 2804 NULL +sel_read_enforce_2828 sel_read_enforce 3 2828 NULL -+vb2_dc_get_userptr_2829 vb2_dc_get_userptr 2-3 2829 NULL nohasharray -+snd_pcm_reset_2829 snd_pcm_reset 0 2829 &vb2_dc_get_userptr_2829 ++vb2_dc_get_userptr_2829 vb2_dc_get_userptr 2-3 2829 NULL ++sock_create_2838 sock_create 0 2838 NULL +wait_for_avail_2847 wait_for_avail 0 2847 NULL +sfq_alloc_2861 sfq_alloc 1 2861 NULL +irnet_ctrl_read_2863 irnet_ctrl_read 4 2863 NULL @@ -115267,11 +123281,12 @@ index 0000000..386792a +il3945_ucode_rx_stats_read_3048 il3945_ucode_rx_stats_read 3 3048 NULL +qp_alloc_ppn_set_3068 qp_alloc_ppn_set 2-4 3068 NULL +__blk_end_bidi_request_3070 __blk_end_bidi_request 3-4 3070 NULL -+dac960_user_command_proc_write_3071 dac960_user_command_proc_write 3 3071 NULL ++dac960_user_command_proc_write_3071 dac960_user_command_proc_write 3 3071 NULL nohasharray ++hfsplus_asc2uni_3071 hfsplus_asc2uni 0 3071 &dac960_user_command_proc_write_3071 +read_file_antenna_diversity_3077 read_file_antenna_diversity 3 3077 NULL +ttusb2_msg_3100 ttusb2_msg 4 3100 NULL +rb_alloc_3102 rb_alloc 1 3102 NULL -+simple_write_to_buffer_3122 simple_write_to_buffer 5-2 3122 NULL ++simple_write_to_buffer_3122 simple_write_to_buffer 2-5 3122 NULL +print_time_3132 print_time 0 3132 NULL +fill_write_buffer_3142 fill_write_buffer 3 3142 NULL +CIFSSMBSetPosixACL_3154 CIFSSMBSetPosixACL 5 3154 NULL @@ -115285,19 +123300,14 @@ index 0000000..386792a +codec_reg_write_file_3204 codec_reg_write_file 3 3204 NULL +SyS_sendto_3219 SyS_sendto 6 3219 NULL +btrfs_prealloc_file_range_3227 btrfs_prealloc_file_range 3 3227 NULL -+kimage_crash_alloc_3233 kimage_crash_alloc 3 3233 NULL +do_read_log_to_user_3236 do_read_log_to_user 4 3236 NULL +ext3_xattr_find_entry_3237 ext3_xattr_find_entry 0 3237 NULL +key_key_read_3241 key_key_read 3 3241 NULL +__ilog2_u64_3284 __ilog2_u64 0 3284 NULL +ieee80211_if_write_beacon_loss_3296 ieee80211_if_write_beacon_loss 3 3296 NULL -+cgroup_name_3300 cgroup_name 3 3300 NULL -+__set_extent_bit_3305 __set_extent_bit 0 3305 NULL -+__iovec_copy_from_user_inatomic_3314 __iovec_copy_from_user_inatomic 4-3-0 3314 NULL ++__iovec_copy_from_user_inatomic_3314 __iovec_copy_from_user_inatomic 0-4-3 3314 NULL +_iwl_dbgfs_d3_sram_write_3315 _iwl_dbgfs_d3_sram_write 3 3315 NULL +dbDiscardAG_3322 dbDiscardAG 3 3322 NULL -+read_from_oldmem_3337 read_from_oldmem 2 3337 NULL -+sysfs_create_group_3339 sysfs_create_group 0 3339 NULL +tty_port_register_device_attr_3341 tty_port_register_device_attr 3 3341 NULL +il_dbgfs_interrupt_read_3351 il_dbgfs_interrupt_read 3 3351 NULL +gsm_control_rls_3353 gsm_control_rls 3 3353 NULL @@ -115331,10 +123341,10 @@ index 0000000..386792a +_iwl_dbgfs_tx_flush_write_3675 _iwl_dbgfs_tx_flush_write 3 3675 NULL +snd_m3_assp_read_3703 snd_m3_assp_read 0 3703 NULL +ci_ll_write_3740 ci_ll_write 4 3740 NULL ++msm_otg_mode_write_3788 msm_otg_mode_write 3 3788 NULL +sctp_setsockopt_auth_key_3793 sctp_setsockopt_auth_key 3 3793 NULL +ncp_file_write_3813 ncp_file_write 3 3813 NULL +llc_ui_recvmsg_3826 llc_ui_recvmsg 4 3826 NULL -+hfsplus_direct_IO_3835 hfsplus_direct_IO 4 3835 NULL +create_one_cdev_3852 create_one_cdev 2 3852 NULL +smk_read_onlycap_3855 smk_read_onlycap 3 3855 NULL +get_fd_set_3866 get_fd_set 1 3866 NULL @@ -115346,9 +123356,8 @@ index 0000000..386792a +vcs_write_3910 vcs_write 3 3910 NULL +SyS_move_pages_3920 SyS_move_pages 2 3920 NULL +brcmf_debugfs_fws_stats_read_3947 brcmf_debugfs_fws_stats_read 3 3947 NULL -+mite_bytes_written_to_memory_lb_3987 mite_bytes_written_to_memory_lb 0 3987 NULL ++copy_from_user_atomic_iovec_3990 copy_from_user_atomic_iovec 0-4 3990 NULL +do_add_counters_3992 do_add_counters 3 3992 NULL -+obd_alloc_memmd_4002 obd_alloc_memmd 0 4002 NULL +userspace_status_4004 userspace_status 4 4004 NULL +mei_write_4005 mei_write 3 4005 NULL nohasharray +xfs_check_block_4005 xfs_check_block 4 4005 &mei_write_4005 @@ -115376,10 +123385,10 @@ index 0000000..386792a +nouveau_fifo_create__4327 nouveau_fifo_create_ 5-6 4327 NULL +snd_rawmidi_kernel_read_4328 snd_rawmidi_kernel_read 3 4328 NULL +ima_eventdigest_init_common_4338 ima_eventdigest_init_common 2 4338 NULL -+__copy_from_user_inatomic_4365 __copy_from_user_inatomic 3-0 4365 NULL ++__copy_from_user_inatomic_4365 __copy_from_user_inatomic 0-3 4365 NULL +irda_sendmsg_4388 irda_sendmsg 4 4388 NULL -+cxacru_cm_get_array_4412 cxacru_cm_get_array 4 4412 NULL nohasharray -+access_process_vm_4412 access_process_vm 0 4412 &cxacru_cm_get_array_4412 ++access_process_vm_4412 access_process_vm 0 4412 NULL nohasharray ++cxacru_cm_get_array_4412 cxacru_cm_get_array 4 4412 &access_process_vm_4412 +libfc_vport_create_4415 libfc_vport_create 2 4415 NULL +rtw_android_get_rssi_4421 rtw_android_get_rssi 0 4421 NULL +do_pages_stat_4437 do_pages_stat 2 4437 NULL @@ -115411,7 +123420,6 @@ index 0000000..386792a +ncp__vol2io_4804 ncp__vol2io 5 4804 NULL +C_SYSC_setsockopt_4806 C_SYSC_setsockopt 5 4806 NULL +repair_io_failure_4815 repair_io_failure 4-3 4815 NULL -+comedi_buf_write_free_4847 comedi_buf_write_free 2 4847 NULL +gigaset_if_receive_4861 gigaset_if_receive 3 4861 NULL +key_tx_spec_read_4862 key_tx_spec_read 3 4862 NULL +ocfs2_defrag_extent_4873 ocfs2_defrag_extent 2 4873 NULL @@ -115424,17 +123432,15 @@ index 0000000..386792a +ieee80211_if_fmt_dot11MeshHWMPconfirmationInterval_4976 ieee80211_if_fmt_dot11MeshHWMPconfirmationInterval 3 4976 NULL +compat_SyS_ipc_5000 compat_SyS_ipc 3 5000 NULL +do_mincore_5018 do_mincore 0-2-1 5018 NULL -+btrfs_punch_hole_5041 btrfs_punch_hole 2 5041 NULL +cfg80211_rx_mgmt_5056 cfg80211_rx_mgmt 5 5056 NULL +ocfs2_check_range_for_holes_5066 ocfs2_check_range_for_holes 2-3 5066 NULL +snd_mixart_BA1_read_5082 snd_mixart_BA1_read 5 5082 NULL +snd_emu10k1_ptr20_read_5087 snd_emu10k1_ptr20_read 0 5087 NULL -+kfifo_copy_from_user_5091 kfifo_copy_from_user 3-4-0 5091 NULL nohasharray ++kfifo_copy_from_user_5091 kfifo_copy_from_user 4-3-0 5091 NULL nohasharray +get_random_bytes_5091 get_random_bytes 2 5091 &kfifo_copy_from_user_5091 nohasharray +blk_rq_sectors_5091 blk_rq_sectors 0 5091 &get_random_bytes_5091 +sound_write_5102 sound_write 3 5102 NULL +i40e_dbg_netdev_ops_write_5117 i40e_dbg_netdev_ops_write 3 5117 NULL -+qib_7220_handle_hwerrors_5142 qib_7220_handle_hwerrors 3 5142 NULL +__uwb_addr_print_5161 __uwb_addr_print 2 5161 NULL +iwl_dbgfs_status_read_5171 iwl_dbgfs_status_read 3 5171 NULL +acpi_pcc_get_sqty_5176 acpi_pcc_get_sqty 0 5176 NULL @@ -115442,6 +123448,7 @@ index 0000000..386792a +ppp_cp_parse_cr_5214 ppp_cp_parse_cr 4 5214 NULL +dwc2_hcd_urb_alloc_5217 dwc2_hcd_urb_alloc 2 5217 NULL +ath6kl_debug_roam_tbl_event_5224 ath6kl_debug_roam_tbl_event 3 5224 NULL ++xgmac_reg_addr_read_5278 xgmac_reg_addr_read 3 5278 NULL +r592_write_fifo_pio_5315 r592_write_fifo_pio 3 5315 NULL +sbc_get_write_same_sectors_5317 sbc_get_write_same_sectors 0 5317 NULL +pwr_elp_enter_read_5324 pwr_elp_enter_read 3 5324 NULL @@ -115453,11 +123460,10 @@ index 0000000..386792a +ll_xattr_cache_refill_5468 ll_xattr_cache_refill 0 5468 NULL +kernfs_fop_write_5471 kernfs_fop_write 3 5471 NULL +xfs_efi_init_5476 xfs_efi_init 2 5476 NULL -+pci_enable_msix_exact_5482 pci_enable_msix_exact 3-0 5482 NULL +cifs_security_flags_proc_write_5484 cifs_security_flags_proc_write 3 5484 NULL +tty_write_5494 tty_write 3 5494 NULL -+tomoyo_update_domain_5498 tomoyo_update_domain 2 5498 NULL nohasharray -+ieee80211_if_fmt_last_beacon_5498 ieee80211_if_fmt_last_beacon 3 5498 &tomoyo_update_domain_5498 ++ieee80211_if_fmt_last_beacon_5498 ieee80211_if_fmt_last_beacon 3 5498 NULL nohasharray ++tomoyo_update_domain_5498 tomoyo_update_domain 2 5498 &ieee80211_if_fmt_last_beacon_5498 +__max_nr_grant_frames_5505 __max_nr_grant_frames 0 5505 NULL +ieee80211_if_fmt_auto_open_plinks_5534 ieee80211_if_fmt_auto_open_plinks 3 5534 NULL +get_entry_msg_len_5552 get_entry_msg_len 0 5552 NULL @@ -115465,14 +123471,12 @@ index 0000000..386792a +inw_5558 inw 0 5558 NULL +bioset_create_5580 bioset_create 1 5580 NULL +oz_ep_alloc_5587 oz_ep_alloc 1 5587 NULL -+__remove_suid_5618 __remove_suid 0 5618 NULL +SYSC_fsetxattr_5639 SYSC_fsetxattr 4 5639 NULL +ext4_xattr_get_5661 ext4_xattr_get 0 5661 NULL +posix_clock_register_5662 posix_clock_register 2 5662 NULL +get_arg_5694 get_arg 3 5694 NULL +subbuf_read_actor_5708 subbuf_read_actor 3 5708 NULL +vmw_kms_readback_5727 vmw_kms_readback 6 5727 NULL -+rts51x_transfer_data_partial_5735 rts51x_transfer_data_partial 6 5735 NULL +sctp_setsockopt_autoclose_5775 sctp_setsockopt_autoclose 3 5775 NULL +__vxge_hw_blockpool_malloc_5786 __vxge_hw_blockpool_malloc 2 5786 NULL +nvme_trans_bdev_char_page_5797 nvme_trans_bdev_char_page 3 5797 NULL @@ -115494,13 +123498,11 @@ index 0000000..386792a +ll_statahead_one_5962 ll_statahead_one 3 5962 NULL +__apu_get_register_5967 __apu_get_register 0 5967 NULL +ieee80211_if_fmt_rc_rateidx_mask_5ghz_5971 ieee80211_if_fmt_rc_rateidx_mask_5ghz 3 5971 NULL -+SyS_semop_5980 SyS_semop 3 5980 NULL ++btrfs_item_offset_6019 btrfs_item_offset 0 6019 NULL +alloc_msg_6072 alloc_msg 1 6072 NULL +sctp_setsockopt_connectx_6073 sctp_setsockopt_connectx 3 6073 NULL -+rts51x_ms_rw_multi_sector_6076 rts51x_ms_rw_multi_sector 3-4 6076 NULL -+__mnt_want_write_6091 __mnt_want_write 0 6091 NULL -+ipmi_addr_length_6110 ipmi_addr_length 0 6110 NULL nohasharray -+force_static_address_read_6110 force_static_address_read 3 6110 &ipmi_addr_length_6110 ++force_static_address_read_6110 force_static_address_read 3 6110 NULL nohasharray ++ipmi_addr_length_6110 ipmi_addr_length 0 6110 &force_static_address_read_6110 +dfs_global_file_write_6112 dfs_global_file_write 3 6112 NULL +nouveau_parent_create__6131 nouveau_parent_create_ 7 6131 NULL +ieee80211_if_fmt_beacon_timeout_6153 ieee80211_if_fmt_beacon_timeout 3 6153 NULL @@ -115508,6 +123510,7 @@ index 0000000..386792a +maybe_insert_hole_6167 maybe_insert_hole 3 6167 NULL +wl1251_cmd_template_set_6172 wl1251_cmd_template_set 4 6172 NULL +SyS_setgroups_6182 SyS_setgroups 1 6182 NULL ++snd_efw_command_get_phys_meters_6190 snd_efw_command_get_phys_meters 3 6190 NULL +mxt_show_instance_6207 mxt_show_instance 2-0 6207 NULL +v4l2_ctrl_new_std_menu_6221 v4l2_ctrl_new_std_menu 4 6221 NULL +mqueue_read_file_6228 mqueue_read_file 3 6228 NULL @@ -115520,13 +123523,14 @@ index 0000000..386792a +posix_acl_fix_xattr_to_user_6283 posix_acl_fix_xattr_to_user 2 6283 NULL +serial_port_in_6291 serial_port_in 0 6291 NULL +qlcnic_sriov_alloc_bc_msg_6309 qlcnic_sriov_alloc_bc_msg 2 6309 NULL ++hfsplus_direct_IO_6313 hfsplus_direct_IO 4 6313 NULL +hfa384x_inw_6329 hfa384x_inw 0 6329 NULL nohasharray +SyS_mincore_6329 SyS_mincore 1-2 6329 &hfa384x_inw_6329 +fuse_get_req_for_background_6337 fuse_get_req_for_background 2 6337 NULL +ucs2_strnlen_6342 ucs2_strnlen 0 6342 NULL +regcache_sync_block_raw_6350 regcache_sync_block_raw 5-4 6350 NULL +mei_dbgfs_read_devstate_6352 mei_dbgfs_read_devstate 3 6352 NULL -+_proc_do_string_6376 _proc_do_string 2 6376 NULL ++arch_gnttab_valloc_6372 arch_gnttab_valloc 2 6372 NULL +osd_req_read_sg_kern_6378 osd_req_read_sg_kern 5 6378 NULL +posix_acl_fix_xattr_userns_6420 posix_acl_fix_xattr_userns 4 6420 NULL +add_transaction_credits_6422 add_transaction_credits 2-3 6422 NULL @@ -115542,18 +123546,16 @@ index 0000000..386792a +dm_stats_create_6551 dm_stats_create 4-2-3 6551 NULL +fb_alloc_cmap_6554 fb_alloc_cmap 2 6554 NULL +SyS_semtimedop_6563 SyS_semtimedop 3 6563 NULL -+snd_pcm_hw_refine_old_user_6586 snd_pcm_hw_refine_old_user 0 6586 NULL +ecryptfs_filldir_6622 ecryptfs_filldir 3 6622 NULL +process_rcvd_data_6679 process_rcvd_data 3 6679 NULL -+pvscsi_allocate_rings_6689 pvscsi_allocate_rings 0 6689 NULL +btrfs_lookup_csums_range_6696 btrfs_lookup_csums_range 2-3 6696 NULL +ps_pspoll_max_apturn_read_6699 ps_pspoll_max_apturn_read 3 6699 NULL +bnad_debugfs_write_regrd_6706 bnad_debugfs_write_regrd 3 6706 NULL +mpeg_read_6708 mpeg_read 3 6708 NULL +ibmpex_query_sensor_count_6709 ibmpex_query_sensor_count 0 6709 NULL ++check_clk_sync_6717 check_clk_sync 2 6717 NULL +video_proc_write_6724 video_proc_write 3 6724 NULL +posix_acl_xattr_count_6725 posix_acl_xattr_count 0-1 6725 NULL -+kobject_add_varg_6781 kobject_add_varg 0 6781 NULL +iwl_dbgfs_channels_read_6784 iwl_dbgfs_channels_read 3 6784 NULL +ieee80211_if_read_6785 ieee80211_if_read 3 6785 NULL +zone_spanned_pages_in_node_6787 zone_spanned_pages_in_node 0-3-4 6787 NULL @@ -115582,7 +123584,6 @@ index 0000000..386792a +rsa_extract_mpi_6973 rsa_extract_mpi 5 6973 &i40e_dbg_dump_write_6973 +request_key_async_6990 request_key_async 4 6990 NULL +tpl_write_6998 tpl_write 3 6998 NULL -+r871x_set_wpa_ie_7000 r871x_set_wpa_ie 3 7000 NULL +cipso_v4_gentag_enum_7006 cipso_v4_gentag_enum 0 7006 NULL +tracing_cpumask_read_7010 tracing_cpumask_read 3 7010 NULL +ld_usb_write_7022 ld_usb_write 3 7022 NULL @@ -115593,16 +123594,13 @@ index 0000000..386792a +nouveau_device_create__7063 nouveau_device_create_ 7 7063 NULL +hci_sock_recvmsg_7072 hci_sock_recvmsg 4 7072 NULL +event_enable_read_7074 event_enable_read 3 7074 NULL -+tipc_send_packet_7091 tipc_send_packet 4 7091 NULL nohasharray -+beacon_interval_read_7091 beacon_interval_read 3 7091 &tipc_send_packet_7091 ++beacon_interval_read_7091 beacon_interval_read 3 7091 NULL nohasharray ++tipc_send_packet_7091 tipc_send_packet 4 7091 &beacon_interval_read_7091 +pipeline_enc_rx_stat_fifo_int_read_7107 pipeline_enc_rx_stat_fifo_int_read 3 7107 NULL +osc_resend_count_seq_write_7120 osc_resend_count_seq_write 3 7120 NULL -+qib_format_hwerrors_7133 qib_format_hwerrors 5 7133 NULL +kvm_mmu_notifier_test_young_7139 kvm_mmu_notifier_test_young 3 7139 NULL -+qlcnic_enable_msix_7144 qlcnic_enable_msix 2 7144 NULL +__alloc_objio_seg_7203 __alloc_objio_seg 1 7203 NULL +rx_rate_rx_frames_per_rates_read_7282 rx_rate_rx_frames_per_rates_read 3 7282 NULL -+security_inode_need_killpriv_7322 security_inode_need_killpriv 0 7322 NULL +pci_vpd_info_field_size_7324 pci_vpd_info_field_size 0 7324 NULL +mgmt_control_7349 mgmt_control 3 7349 NULL +at_est2timeout_7365 at_est2timeout 0-1 7365 NULL @@ -115619,45 +123617,41 @@ index 0000000..386792a +ip_options_get_alloc_7448 ip_options_get_alloc 1 7448 NULL +SYSC_setgroups_7454 SYSC_setgroups 1 7454 NULL +rt2x00debug_read_queue_stats_7455 rt2x00debug_read_queue_stats 3 7455 NULL -+l2tp_ip6_sendmsg_7461 l2tp_ip6_sendmsg 4 7461 NULL +garp_request_join_7471 garp_request_join 4 7471 NULL +snd_pcm_lib_read1_7491 snd_pcm_lib_read1 0-3 7491 NULL +ahash_instance_headroom_7509 ahash_instance_headroom 0 7509 NULL nohasharray +sdhci_alloc_host_7509 sdhci_alloc_host 2 7509 &ahash_instance_headroom_7509 +array_zalloc_7519 array_zalloc 1-2 7519 NULL -+sk_convert_filter_7541 sk_convert_filter 2 7541 NULL +ath10k_read_htt_stats_mask_7557 ath10k_read_htt_stats_mask 3 7557 NULL +smk_read_mapped_7562 smk_read_mapped 3 7562 NULL +netvsc_get_slots_7565 netvsc_get_slots 0 7565 NULL +cfs_cpt_num_estimate_7571 cfs_cpt_num_estimate 0 7571 NULL -+groups_alloc_7614 groups_alloc 1 7614 NULL nohasharray -+create_dir_7614 create_dir 0 7614 &groups_alloc_7614 ++groups_alloc_7614 groups_alloc 1 7614 NULL +_rtw_zmalloc_7636 _rtw_zmalloc 1 7636 NULL +fault_inject_write_7662 fault_inject_write 3 7662 NULL +acpi_ex_allocate_name_string_7685 acpi_ex_allocate_name_string 2-1 7685 NULL +acpi_ns_get_pathname_length_7699 acpi_ns_get_pathname_length 0 7699 NULL +dev_write_7708 dev_write 3 7708 NULL -+pci_raw_set_power_state_7729 pci_raw_set_power_state 0 7729 NULL +vxge_device_register_7752 vxge_device_register 4 7752 NULL +ubi_io_read_vid_hdr_7766 ubi_io_read_vid_hdr 0 7766 NULL +iwl_dbgfs_bt_cmd_read_7770 iwl_dbgfs_bt_cmd_read 3 7770 NULL +alloc_candev_7776 alloc_candev 1-2 7776 NULL +dfs_global_file_read_7787 dfs_global_file_read 3 7787 NULL +bnx2_nvram_write_7790 bnx2_nvram_write 4-2 7790 NULL -+lustre_packed_msg_size_7792 lustre_packed_msg_size 0 7792 NULL nohasharray -+diva_os_copy_from_user_7792 diva_os_copy_from_user 4 7792 &lustre_packed_msg_size_7792 ++diva_os_copy_from_user_7792 diva_os_copy_from_user 4 7792 NULL nohasharray ++lustre_packed_msg_size_7792 lustre_packed_msg_size 0 7792 &diva_os_copy_from_user_7792 ++seq_buf_alloc_7828 seq_buf_alloc 1 7828 NULL +cfs_trace_dump_debug_buffer_usrstr_7861 cfs_trace_dump_debug_buffer_usrstr 2 7861 NULL +tipc_alloc_entry_7875 tipc_alloc_entry 2 7875 NULL +dvb_dmxdev_read_sec_7892 dvb_dmxdev_read_sec 4 7892 NULL +xfs_trans_get_efi_7898 xfs_trans_get_efi 2 7898 NULL +libfc_host_alloc_7917 libfc_host_alloc 2 7917 NULL +f_hidg_write_7932 f_hidg_write 3 7932 NULL -+integrity_digsig_verify_7956 integrity_digsig_verify 3-0 7956 NULL ++integrity_digsig_verify_7956 integrity_digsig_verify 3 7956 NULL +smk_write_load_self_7958 smk_write_load_self 3 7958 NULL +tt3650_ci_msg_locked_8013 tt3650_ci_msg_locked 4 8013 NULL +vcs_read_8017 vcs_read 3 8017 NULL +vhost_add_used_and_signal_n_8038 vhost_add_used_and_signal_n 4 8038 NULL -+ms_read_multiple_pages_8052 ms_read_multiple_pages 5-4 8052 NULL +dgrp_mon_read_8065 dgrp_mon_read 3 8065 NULL +spi_write_then_read_8073 spi_write_then_read 5-3 8073 NULL +qla4xxx_post_ping_evt_work_8074 qla4xxx_post_ping_evt_work 4 8074 NULL @@ -115676,7 +123670,6 @@ index 0000000..386792a +init_cdev_8274 init_cdev 1 8274 NULL +rproc_recovery_write_8281 rproc_recovery_write 3 8281 NULL +qib_decode_7220_err_8315 qib_decode_7220_err 3 8315 NULL -+snd_pcm_update_state_8320 snd_pcm_update_state 0 8320 NULL +ipwireless_send_packet_8328 ipwireless_send_packet 4 8328 NULL +rtw_cfg80211_rx_action_8329 rtw_cfg80211_rx_action 3 8329 NULL +tracing_entries_read_8345 tracing_entries_read 3 8345 NULL @@ -115697,8 +123690,7 @@ index 0000000..386792a +opticon_process_data_packet_8524 opticon_process_data_packet 3 8524 NULL +user_on_off_8552 user_on_off 2 8552 NULL +profile_remove_8556 profile_remove 3 8556 NULL -+cache_slow_downcall_8570 cache_slow_downcall 2 8570 NULL nohasharray -+pci_msi_check_device_8570 pci_msi_check_device 0 8570 &cache_slow_downcall_8570 ++cache_slow_downcall_8570 cache_slow_downcall 2 8570 NULL +isr_dma0_done_read_8574 isr_dma0_done_read 3 8574 NULL +tower_write_8580 tower_write 3 8580 NULL +cfs_cpt_number_8618 cfs_cpt_number 0 8618 NULL @@ -115712,23 +123704,20 @@ index 0000000..386792a +rproc_trace_read_8686 rproc_trace_read 3 8686 NULL +skb_frag_size_8695 skb_frag_size 0 8695 NULL +arcfb_write_8702 arcfb_write 3 8702 NULL -+i_size_read_8703 i_size_read 0 8703 NULL nohasharray -+init_header_8703 init_header 0 8703 &i_size_read_8703 ++i_size_read_8703 i_size_read 0 8703 NULL +ctrl_out_8712 ctrl_out 3-5 8712 NULL +tracing_max_lat_write_8728 tracing_max_lat_write 3 8728 NULL +jffs2_acl_count_8729 jffs2_acl_count 0-1 8729 NULL -+__create_irqs_8733 __create_irqs 2 8733 NULL +tx_tx_exch_expiry_read_8749 tx_tx_exch_expiry_read 3 8749 NULL +compound_order_8750 compound_order 0 8750 NULL +yurex_write_8761 yurex_write 3 8761 NULL +joydev_compat_ioctl_8765 joydev_compat_ioctl 2 8765 NULL +kstrtoint_from_user_8778 kstrtoint_from_user 2 8778 NULL +paging32_prefetch_gpte_8783 paging32_prefetch_gpte 4 8783 NULL -+ext4_try_to_write_inline_data_8785 ext4_try_to_write_inline_data 3-4 8785 NULL ++ext4_try_to_write_inline_data_8785 ext4_try_to_write_inline_data 4-3 8785 NULL +__bitmap_weight_8796 __bitmap_weight 0 8796 NULL +metronomefb_write_8823 metronomefb_write 3 8823 NULL +SyS_llistxattr_8824 SyS_llistxattr 3 8824 NULL -+extent_read_full_page_8826 extent_read_full_page 0 8826 NULL +ll_xattr_cache_get_8829 ll_xattr_cache_get 0 8829 NULL +get_queue_depth_8833 get_queue_depth 0 8833 NULL +dvb_ringbuffer_pkt_next_8834 dvb_ringbuffer_pkt_next 0-2 8834 NULL @@ -115736,12 +123725,12 @@ index 0000000..386792a +iwl_rx_packet_len_8854 iwl_rx_packet_len 0 8854 NULL +debug_debug1_read_8856 debug_debug1_read 3 8856 NULL +wa_nep_queue_8858 wa_nep_queue 2 8858 NULL ++xgmac_reg_value_write_8860 xgmac_reg_value_write 3 8860 NULL +radeon_drm_ioctl_8875 radeon_drm_ioctl 2 8875 NULL +compressed_bio_size_8887 compressed_bio_size 0-2 8887 NULL -+ab3100_get_set_reg_8890 ab3100_get_set_reg 3 8890 NULL nohasharray -+tracing_max_lat_read_8890 tracing_max_lat_read 3 8890 &ab3100_get_set_reg_8890 ++tracing_max_lat_read_8890 tracing_max_lat_read 3 8890 NULL nohasharray ++ab3100_get_set_reg_8890 ab3100_get_set_reg 3 8890 &tracing_max_lat_read_8890 +sdio_max_byte_size_8907 sdio_max_byte_size 0 8907 NULL -+sysfs_merge_group_8917 sysfs_merge_group 0 8917 NULL +write_file_ani_8918 write_file_ani 3 8918 NULL +layout_commit_8926 layout_commit 3 8926 NULL +cp2112_hid_get_8933 cp2112_hid_get 4 8933 NULL @@ -115759,16 +123748,16 @@ index 0000000..386792a +il_dbgfs_clear_ucode_stats_write_9016 il_dbgfs_clear_ucode_stats_write 3 9016 NULL +snd_emu10k1_ptr_read_9026 snd_emu10k1_ptr_read 0-2 9026 NULL +nla_put_9042 nla_put 3 9042 NULL -+sta_tx_latency_stat_header_9050 sta_tx_latency_stat_header 0-3-4 9050 NULL ++sta_tx_latency_stat_header_9050 sta_tx_latency_stat_header 4-3-0 9050 NULL +snd_emu10k1_synth_copy_from_user_9061 snd_emu10k1_synth_copy_from_user 3-5 9061 NULL +snd_gus_dram_peek_9062 snd_gus_dram_peek 4 9062 NULL +fib_info_hash_alloc_9075 fib_info_hash_alloc 1 9075 NULL +create_queues_9088 create_queues 2-3 9088 NULL ++nvkm_output_create__9091 nvkm_output_create_ 6 9091 NULL +ftdi_prepare_write_buffer_9093 ftdi_prepare_write_buffer 3 9093 NULL +adxl34x_spi_read_block_9108 adxl34x_spi_read_block 3 9108 NULL -+caif_stream_sendmsg_9110 caif_stream_sendmsg 4 9110 NULL nohasharray -+gfn_to_rmap_9110 gfn_to_rmap 2-3 9110 &caif_stream_sendmsg_9110 -+udf_direct_IO_9111 udf_direct_IO 4 9111 NULL ++gfn_to_rmap_9110 gfn_to_rmap 3-2 9110 NULL nohasharray ++caif_stream_sendmsg_9110 caif_stream_sendmsg 4 9110 &gfn_to_rmap_9110 +pmcraid_change_queue_depth_9116 pmcraid_change_queue_depth 2 9116 NULL +vb2_dma_sg_alloc_9157 vb2_dma_sg_alloc 2 9157 NULL +dbg_command_buf_9165 dbg_command_buf 2 9165 NULL @@ -115785,6 +123774,7 @@ index 0000000..386792a +flakey_status_9274 flakey_status 5 9274 NULL +iwl_dbgfs_stations_read_9309 iwl_dbgfs_stations_read 3 9309 NULL +ceph_sync_setxattr_9310 ceph_sync_setxattr 4 9310 NULL ++__blockdev_direct_IO_9321 __blockdev_direct_IO 0-6 9321 NULL +ieee80211_if_fmt_txpower_9334 ieee80211_if_fmt_txpower 3 9334 NULL +nvme_trans_fmt_get_parm_header_9340 nvme_trans_fmt_get_parm_header 2 9340 NULL +ocfs2_orphan_for_truncate_9342 ocfs2_orphan_for_truncate 4 9342 NULL @@ -115797,12 +123787,11 @@ index 0000000..386792a +bm_realloc_pages_9431 bm_realloc_pages 2 9431 NULL +ffs_ep0_write_9438 ffs_ep0_write 3 9438 NULL +ieee80211_if_fmt_fwded_unicast_9454 ieee80211_if_fmt_fwded_unicast 3 9454 NULL -+get_registers_9470 get_registers 4 9470 NULL nohasharray -+agp_generic_alloc_user_9470 agp_generic_alloc_user 1 9470 &get_registers_9470 ++agp_generic_alloc_user_9470 agp_generic_alloc_user 1 9470 NULL nohasharray ++get_registers_9470 get_registers 4 9470 &agp_generic_alloc_user_9470 +crypt_status_9492 crypt_status 5 9492 NULL +lbs_threshold_write_9502 lbs_threshold_write 5 9502 NULL +lp_write_9511 lp_write 3 9511 NULL -+mext_calc_swap_extents_9517 mext_calc_swap_extents 4 9517 NULL +scsi_tgt_kspace_exec_9522 scsi_tgt_kspace_exec 8 9522 NULL +ll_max_read_ahead_whole_mb_seq_write_9528 ll_max_read_ahead_whole_mb_seq_write 3 9528 NULL +read_file_dma_9530 read_file_dma 3 9530 NULL @@ -115838,19 +123827,19 @@ index 0000000..386792a +regmap_multi_reg_write_bypassed_9751 regmap_multi_reg_write_bypassed 3 9751 NULL nohasharray +sta_last_ack_signal_read_9751 sta_last_ack_signal_read 3 9751 ®map_multi_reg_write_bypassed_9751 +btrfs_super_root_9763 btrfs_super_root 0 9763 NULL ++copy_page_from_iter_bvec_9767 copy_page_from_iter_bvec 0-3 9767 NULL +__blk_queue_init_tags_9778 __blk_queue_init_tags 2 9778 NULL +kvm_age_hva_9795 kvm_age_hva 2 9795 NULL ++bio_alloc_map_data_9798 bio_alloc_map_data 1 9798 NULL +udpv6_recvmsg_9813 udpv6_recvmsg 4 9813 NULL nohasharray +ieee80211_if_read_state_9813 ieee80211_if_read_state 3 9813 &udpv6_recvmsg_9813 +pmcraid_alloc_sglist_9864 pmcraid_alloc_sglist 1 9864 NULL -+btrfs_free_reserved_extent_9867 btrfs_free_reserved_extent 2 9867 NULL +wil_read_file_ioblob_9878 wil_read_file_ioblob 3 9878 NULL -+snd_midi_event_new_9893 snd_midi_event_new 1 9893 NULL nohasharray -+bm_register_write_9893 bm_register_write 3 9893 &snd_midi_event_new_9893 ++bm_register_write_9893 bm_register_write 3 9893 NULL nohasharray ++snd_midi_event_new_9893 snd_midi_event_new 1 9893 &bm_register_write_9893 +snd_gf1_pcm_playback_copy_9895 snd_gf1_pcm_playback_copy 3-5 9895 NULL +nonpaging_page_fault_9908 nonpaging_page_fault 2 9908 NULL +iwl_dbgfs_prph_reg_read_9928 iwl_dbgfs_prph_reg_read 3 9928 NULL -+root_nfs_parse_options_9937 root_nfs_parse_options 3 9937 NULL +pstore_ftrace_knob_read_9947 pstore_ftrace_knob_read 3 9947 NULL +read_file_misc_9948 read_file_misc 3 9948 NULL +csum_partial_copy_fromiovecend_9957 csum_partial_copy_fromiovecend 3-4 9957 NULL @@ -115882,10 +123871,8 @@ index 0000000..386792a +ufx_alloc_urb_list_10349 ufx_alloc_urb_list 3 10349 NULL +dbAllocAny_10354 dbAllocAny 0 10354 NULL +ath6kl_listen_int_read_10355 ath6kl_listen_int_read 3 10355 NULL -+ms_write_multiple_pages_10362 ms_write_multiple_pages 6-5 10362 NULL +sta_ht_capa_read_10366 sta_ht_capa_read 3 10366 NULL +ecryptfs_decode_and_decrypt_filename_10379 ecryptfs_decode_and_decrypt_filename 5 10379 NULL -+led_classdev_register_10384 led_classdev_register 0 10384 NULL +do_compat_pselect_10398 do_compat_pselect 1 10398 NULL +fwtty_rx_10434 fwtty_rx 3 10434 NULL +event_phy_transmit_error_read_10471 event_phy_transmit_error_read 3 10471 NULL @@ -115897,7 +123884,6 @@ index 0000000..386792a +osd_req_write_sg_kern_10514 osd_req_write_sg_kern 5 10514 NULL +rds_message_alloc_10517 rds_message_alloc 1 10517 NULL +qlcnic_pci_sriov_enable_10519 qlcnic_pci_sriov_enable 2 10519 NULL -+snd_pcm_hw_params_user_10520 snd_pcm_hw_params_user 0 10520 NULL +kstrtouint_from_user_10536 kstrtouint_from_user 2 10536 NULL nohasharray +snd_pcm_lib_read_10536 snd_pcm_lib_read 0-3 10536 &kstrtouint_from_user_10536 +ext4_write_begin_10576 ext4_write_begin 3-4 10576 NULL @@ -115926,6 +123912,7 @@ index 0000000..386792a +__qp_memcpy_to_queue_10779 __qp_memcpy_to_queue 2-4 10779 NULL +diva_set_trace_filter_10820 diva_set_trace_filter 0-1 10820 NULL +lbs_sleepparams_read_10840 lbs_sleepparams_read 3 10840 NULL ++ext4_direct_IO_10843 ext4_direct_IO 4 10843 NULL +ida_get_new_above_10853 ida_get_new_above 0 10853 NULL +fuse_conn_max_background_read_10855 fuse_conn_max_background_read 3 10855 NULL +snd_pcm_oss_write1_10872 snd_pcm_oss_write1 3 10872 NULL @@ -115933,8 +123920,7 @@ index 0000000..386792a +get_scq_10897 get_scq 2 10897 NULL +tifm_alloc_adapter_10903 tifm_alloc_adapter 1 10903 NULL +lprocfs_wr_atomic_10912 lprocfs_wr_atomic 3 10912 NULL -+__copy_from_user_10918 __copy_from_user 0-3 10918 NULL -+kobject_add_10919 kobject_add 0 10919 NULL ++__copy_from_user_10918 __copy_from_user 3-0 10918 NULL +ar9003_dump_modal_eeprom_10959 ar9003_dump_modal_eeprom 3-2-0 10959 NULL +ci_port_test_write_10962 ci_port_test_write 3 10962 NULL +bm_entry_read_10976 bm_entry_read 3 10976 NULL @@ -115942,19 +123928,15 @@ index 0000000..386792a +xfrm_hash_alloc_10997 xfrm_hash_alloc 1 10997 NULL +rx_filter_accum_arp_pend_requests_read_11003 rx_filter_accum_arp_pend_requests_read 3 11003 NULL +SetLineNumber_11023 SetLineNumber 0 11023 NULL -+pci_msi_vec_count_11046 pci_msi_vec_count 0 11046 NULL ++nouveau_gpio_create__11048 nouveau_gpio_create_ 4 11048 NULL +tda10048_writeregbulk_11050 tda10048_writeregbulk 4 11050 NULL -+qlcnic_83xx_calculate_msix_vector_11063 qlcnic_83xx_calculate_msix_vector 0 11063 NULL nohasharray -+insert_inline_extent_backref_11063 insert_inline_extent_backref 8 11063 &qlcnic_83xx_calculate_msix_vector_11063 ++insert_inline_extent_backref_11063 insert_inline_extent_backref 8 11063 NULL +tcp_send_mss_11079 tcp_send_mss 0 11079 NULL -+snd_pcm_delay_11081 snd_pcm_delay 0 11081 NULL +count_argc_11083 count_argc 0 11083 NULL +kvm_write_guest_cached_11106 kvm_write_guest_cached 4 11106 NULL +tw_change_queue_depth_11116 tw_change_queue_depth 2 11116 NULL +page_offset_11120 page_offset 0 11120 NULL -+cea_db_payload_len_11124 cea_db_payload_len 0 11124 NULL nohasharray -+tracing_buffers_read_11124 tracing_buffers_read 3 11124 &cea_db_payload_len_11124 -+alloc_alien_cache_11127 alloc_alien_cache 2 11127 NULL ++tracing_buffers_read_11124 tracing_buffers_read 3 11124 NULL +snd_gf1_pcm_playback_silence_11172 snd_gf1_pcm_playback_silence 3-4 11172 NULL +il_dbgfs_rx_queue_read_11221 il_dbgfs_rx_queue_read 3 11221 NULL +comedi_alloc_spriv_11234 comedi_alloc_spriv 2 11234 NULL @@ -115975,8 +123957,8 @@ index 0000000..386792a +nl80211_send_mgmt_11353 nl80211_send_mgmt 7 11353 &sel_write_create_11353 +of_get_available_child_count_11361 of_get_available_child_count 0 11361 NULL +qib_get_base_info_11369 qib_get_base_info 3 11369 NULL -+tcf_register_action_11381 tcf_register_action 2 11381 NULL nohasharray -+nft_value_dump_11381 nft_value_dump 3 11381 &tcf_register_action_11381 ++nft_value_dump_11381 nft_value_dump 3 11381 NULL nohasharray ++tcf_register_action_11381 tcf_register_action 2 11381 &nft_value_dump_11381 +isku_sysfs_read_keys_capslock_11392 isku_sysfs_read_keys_capslock 6 11392 NULL +dev_irnet_write_11398 dev_irnet_write 3 11398 NULL +lprocfs_wr_evict_client_11402 lprocfs_wr_evict_client 3 11402 NULL @@ -115987,13 +123969,9 @@ index 0000000..386792a +adis16480_show_firmware_revision_11417 adis16480_show_firmware_revision 3 11417 NULL +trace_options_read_11419 trace_options_read 3 11419 NULL +i40e_dbg_command_write_11421 i40e_dbg_command_write 3 11421 NULL -+xd_read_multiple_pages_11422 xd_read_multiple_pages 5-4 11422 NULL +bttv_read_11432 bttv_read 3 11432 NULL +create_zero_mask_11453 create_zero_mask 0-1 11453 NULL -+do_blockdev_direct_IO_11455 do_blockdev_direct_IO 0-6 11455 NULL -+sca3000_read_first_n_hw_rb_11479 sca3000_read_first_n_hw_rb 2 11479 NULL nohasharray -+pci_set_power_state_11479 pci_set_power_state 0 11479 &sca3000_read_first_n_hw_rb_11479 -+xfs_file_buffered_aio_write_11492 xfs_file_buffered_aio_write 4 11492 NULL ++sca3000_read_first_n_hw_rb_11479 sca3000_read_first_n_hw_rb 2 11479 NULL +sd_do_mode_sense_11507 sd_do_mode_sense 5 11507 NULL +kmem_zalloc_11510 kmem_zalloc 1 11510 NULL +ll_direct_IO_26_seg_11518 ll_direct_IO_26_seg 0 11518 NULL @@ -116008,7 +123986,7 @@ index 0000000..386792a +SYSC_mq_timedsend_11607 SYSC_mq_timedsend 3 11607 NULL +C_SYSC_migrate_pages_11618 C_SYSC_migrate_pages 2 11618 NULL +sisusb_send_bridge_packet_11649 sisusb_send_bridge_packet 2 11649 NULL -+nla_total_size_11658 nla_total_size 1-0 11658 NULL ++nla_total_size_11658 nla_total_size 0-1 11658 NULL +slab_ksize_11664 slab_ksize 0 11664 NULL +ide_queue_pc_tail_11673 ide_queue_pc_tail 5 11673 NULL +compat_SyS_msgsnd_11675 compat_SyS_msgsnd 3 11675 NULL @@ -116029,7 +124007,6 @@ index 0000000..386792a +sctp_setsockopt_maxseg_11829 sctp_setsockopt_maxseg 3 11829 NULL +rts51x_read_status_11830 rts51x_read_status 4 11830 NULL +unix_stream_connect_11844 unix_stream_connect 3 11844 NULL -+pci_enable_msix_range_11852 pci_enable_msix_range 0-4 11852 NULL +ecryptfs_copy_filename_11868 ecryptfs_copy_filename 4 11868 NULL +ieee80211_rx_bss_info_11887 ieee80211_rx_bss_info 3 11887 NULL +mdc_rename_11899 mdc_rename 4-6 11899 NULL @@ -116067,7 +124044,6 @@ index 0000000..386792a +ib_uverbs_unmarshall_recv_12251 ib_uverbs_unmarshall_recv 5 12251 NULL +shash_compat_setkey_12267 shash_compat_setkey 3 12267 NULL +add_sctp_bind_addr_12269 add_sctp_bind_addr 3 12269 NULL -+SYSC_vm86_12279 SYSC_vm86 2 12279 NULL +note_last_dentry_12285 note_last_dentry 3 12285 NULL +roundup_to_multiple_of_64_12288 roundup_to_multiple_of_64 0-1 12288 NULL nohasharray +il_dbgfs_nvm_read_12288 il_dbgfs_nvm_read 3 12288 &roundup_to_multiple_of_64_12288 @@ -116077,8 +124053,8 @@ index 0000000..386792a +mptctl_ioctl_12355 mptctl_ioctl 2 12355 NULL +__nf_ct_ext_add_length_12364 __nf_ct_ext_add_length 3 12364 NULL +xfs_iext_inline_to_direct_12384 xfs_iext_inline_to_direct 2 12384 NULL -+write_file_dump_12391 write_file_dump 3 12391 NULL nohasharray -+populate_dir_12391 populate_dir 0 12391 &write_file_dump_12391 ++btrfs_file_extent_ram_bytes_12391 btrfs_file_extent_ram_bytes 0 12391 NULL nohasharray ++write_file_dump_12391 write_file_dump 3 12391 &btrfs_file_extent_ram_bytes_12391 +hbucket_elem_add_12416 hbucket_elem_add 3 12416 NULL +ieee80211_if_read_num_mcast_sta_12419 ieee80211_if_read_num_mcast_sta 3 12419 NULL +cfs_array_alloc_12441 cfs_array_alloc 2 12441 NULL @@ -116086,7 +124062,6 @@ index 0000000..386792a +x25_sendmsg_12487 x25_sendmsg 4 12487 NULL +fnic_trace_ctrl_read_12497 fnic_trace_ctrl_read 3 12497 NULL +qib_alloc_fast_reg_mr_12526 qib_alloc_fast_reg_mr 2 12526 NULL -+write_inode_now_12565 write_inode_now 0 12565 NULL +hvc_alloc_12579 hvc_alloc 4 12579 NULL +pcpu_extend_area_map_12589 pcpu_extend_area_map 2 12589 NULL +_iwl_dbgfs_prph_reg_write_12597 _iwl_dbgfs_prph_reg_write 3 12597 NULL @@ -116099,8 +124074,8 @@ index 0000000..386792a +nr_recvmsg_12649 nr_recvmsg 4 12649 NULL +rtw_android_get_link_speed_12655 rtw_android_get_link_speed 0 12655 NULL +ocfs2_read_block_12659 ocfs2_read_block 0 12659 NULL -+sel_read_class_12669 sel_read_class 3 12669 NULL nohasharray -+sparse_mem_maps_populate_node_12669 sparse_mem_maps_populate_node 4 12669 &sel_read_class_12669 ++sparse_mem_maps_populate_node_12669 sparse_mem_maps_populate_node 4 12669 NULL nohasharray ++sel_read_class_12669 sel_read_class 3 12669 &sparse_mem_maps_populate_node_12669 +ext4_writepage_trans_blocks_12674 ext4_writepage_trans_blocks 0 12674 NULL +iwl_dbgfs_calib_disabled_write_12707 iwl_dbgfs_calib_disabled_write 3 12707 NULL +ieee80211_if_read_num_buffered_multicast_12716 ieee80211_if_read_num_buffered_multicast 3 12716 NULL @@ -116125,14 +124100,11 @@ index 0000000..386792a +raid56_parity_recover_12987 raid56_parity_recover 5 12987 NULL +TransmitTcb_12989 TransmitTcb 4 12989 NULL +sk_peek_offset_12991 sk_peek_offset 0 12991 NULL -+__btrfs_direct_write_13007 __btrfs_direct_write 4-0 13007 NULL +bset_prev_bytes_13020 bset_prev_bytes 0 13020 NULL +subsystem_filter_write_13022 subsystem_filter_write 3 13022 NULL -+generic_segment_checks_13041 generic_segment_checks 0 13041 NULL +ocfs2_write_begin_13045 ocfs2_write_begin 3-4 13045 NULL +__dn_setsockopt_13060 __dn_setsockopt 5 13060 NULL nohasharray +ptlrpc_lprocfs_threads_min_seq_write_13060 ptlrpc_lprocfs_threads_min_seq_write 3 13060 &__dn_setsockopt_13060 -+biovec_create_pool_13079 biovec_create_pool 2 13079 NULL +xattr_getsecurity_13090 xattr_getsecurity 0 13090 NULL +ttm_dma_pool_alloc_new_pages_13105 ttm_dma_pool_alloc_new_pages 3 13105 NULL +snd_rme96_playback_copy_13111 snd_rme96_playback_copy 5 13111 NULL @@ -116154,8 +124126,9 @@ index 0000000..386792a +bio_integrity_trim_13259 bio_integrity_trim 3-2 13259 NULL +simple_attr_write_13260 simple_attr_write 3 13260 NULL +pmcraid_notify_aen_13274 pmcraid_notify_aen 3 13274 NULL -+il4965_stats_flag_13281 il4965_stats_flag 0-3 13281 NULL ++il4965_stats_flag_13281 il4965_stats_flag 3-0 13281 NULL +lpfc_idiag_mbxacc_get_setup_13282 lpfc_idiag_mbxacc_get_setup 0 13282 NULL ++nvkm_i2c_pad_create__13292 nvkm_i2c_pad_create_ 5 13292 NULL +sd_major_13294 sd_major 0-1 13294 NULL +read_file_phy_err_13318 read_file_phy_err 3 13318 NULL +kvm_read_nested_guest_page_13337 kvm_read_nested_guest_page 5 13337 NULL @@ -116169,16 +124142,14 @@ index 0000000..386792a +sctp_setsockopt_peer_primary_addr_13440 sctp_setsockopt_peer_primary_addr 3 13440 NULL +ath6kl_cfg80211_connect_event_13443 ath6kl_cfg80211_connect_event 7-8-9 13443 NULL +sb_init_dio_done_wq_13482 sb_init_dio_done_wq 0 13482 NULL -+data_read_13494 data_read 3 13494 NULL ++data_read_13494 data_read 3 13494 NULL nohasharray ++ext_prop_data_store_13494 ext_prop_data_store 3 13494 &data_read_13494 +core_status_13515 core_status 4 13515 NULL +smk_write_mapped_13519 smk_write_mapped 3 13519 NULL +bm_init_13529 bm_init 2 13529 NULL -+request_any_context_irq_13530 request_any_context_irq 0 13530 NULL +llcp_sock_recvmsg_13556 llcp_sock_recvmsg 4 13556 NULL -+SyS_vm86_13557 SyS_vm86 2 13557 NULL +ieee80211_if_read_ap_power_level_13558 ieee80211_if_read_ap_power_level 3 13558 NULL +hash_net4_expire_13559 hash_net4_expire 4 13559 NULL -+ubifs_get_idx_gc_leb_13566 ubifs_get_idx_gc_leb 0 13566 NULL +read_file_antenna_13574 read_file_antenna 3 13574 NULL +cache_write_13589 cache_write 3 13589 NULL +Rd_Indx_13602 Rd_Indx 3-2 13602 NULL @@ -116187,9 +124158,9 @@ index 0000000..386792a +packet_snd_13634 packet_snd 3 13634 NULL +blk_msg_write_13655 blk_msg_write 3 13655 NULL +cache_downcall_13666 cache_downcall 3 13666 NULL -+ext3_xattr_list_entries_13682 ext3_xattr_list_entries 0 13682 NULL +fw_iso_buffer_alloc_13704 fw_iso_buffer_alloc 2 13704 NULL +audit_unpack_string_13748 audit_unpack_string 3 13748 NULL ++udf_direct_IO_13765 udf_direct_IO 4 13765 NULL +ieee802154_alloc_device_13767 ieee802154_alloc_device 1 13767 NULL +fb_sys_read_13778 fb_sys_read 3 13778 NULL +ath6kl_mgmt_powersave_ap_13791 ath6kl_mgmt_powersave_ap 6 13791 NULL @@ -116208,8 +124179,7 @@ index 0000000..386792a +ocfs2_xa_value_truncate_13940 ocfs2_xa_value_truncate 2 13940 &ieee80211_if_read_dot11MeshForwarding_13940 +iwl_dbgfs_protection_mode_read_13943 iwl_dbgfs_protection_mode_read 3 13943 NULL +ieee80211_if_read_min_discovery_timeout_13946 ieee80211_if_read_min_discovery_timeout 3 13946 NULL -+lpfc_idiag_queacc_read_13950 lpfc_idiag_queacc_read 3 13950 NULL nohasharray -+pagecache_write_end_13950 pagecache_write_end 0 13950 &lpfc_idiag_queacc_read_13950 ++lpfc_idiag_queacc_read_13950 lpfc_idiag_queacc_read 3 13950 NULL +osc_grant_shrink_interval_seq_write_13952 osc_grant_shrink_interval_seq_write 3 13952 NULL +snd_pcm_plug_slave_size_13967 snd_pcm_plug_slave_size 0-2 13967 NULL +qcam_read_13977 qcam_read 3 13977 NULL @@ -116221,7 +124191,6 @@ index 0000000..386792a +iscsi_create_flashnode_conn_14022 iscsi_create_flashnode_conn 4 14022 NULL +pci_add_ext_cap_save_buffer_14032 pci_add_ext_cap_save_buffer 3 14032 NULL +dvb_usercopy_14036 dvb_usercopy 2 14036 NULL -+read_def_modal_eeprom_14041 read_def_modal_eeprom 3 14041 NULL +ieee80211_if_fmt_aid_14055 ieee80211_if_fmt_aid 3 14055 NULL +ovs_nla_alloc_flow_actions_14056 ovs_nla_alloc_flow_actions 1 14056 NULL +sta_agg_status_read_14058 sta_agg_status_read 3 14058 NULL @@ -116245,7 +124214,6 @@ index 0000000..386792a +rr_status_14293 rr_status 5 14293 NULL +read_default_ldt_14302 read_default_ldt 2 14302 NULL +oo_objects_14319 oo_objects 0 14319 NULL -+ll_get_user_pages_14328 ll_get_user_pages 3-2-0 14328 NULL +p9_client_zc_rpc_14345 p9_client_zc_rpc 7 14345 NULL +alloc_tx_struct_14349 alloc_tx_struct 1 14349 NULL +hash_ipportnet4_expire_14354 hash_ipportnet4_expire 4 14354 NULL @@ -116254,17 +124222,14 @@ index 0000000..386792a +ath6kl_regdump_read_14393 ath6kl_regdump_read 3 14393 NULL +smk_write_onlycap_14400 smk_write_onlycap 3 14400 NULL +mtd_concat_create_14416 mtd_concat_create 2 14416 NULL -+get_kcore_size_14425 get_kcore_size 0 14425 NULL +_iwl_dbgfs_sram_write_14439 _iwl_dbgfs_sram_write 3 14439 NULL +block_size_14443 block_size 0 14443 NULL +lmv_user_md_size_14456 lmv_user_md_size 0-1 14456 NULL +snd_emu10k1_proc_spdif_status_14457 snd_emu10k1_proc_spdif_status 4-5 14457 NULL +ath10k_write_htt_stats_mask_14458 ath10k_write_htt_stats_mask 3 14458 NULL +lustre_msg_size_v2_14470 lustre_msg_size_v2 0 14470 NULL -+dma_transfer_size_14473 dma_transfer_size 0 14473 NULL +udplite_getfrag_14479 udplite_getfrag 3-4 14479 NULL +ieee80211_if_read_dot11MeshGateAnnouncementProtocol_14486 ieee80211_if_read_dot11MeshGateAnnouncementProtocol 3 14486 NULL -+split_state_14491 split_state 0 14491 NULL +ocfs2_debug_read_14507 ocfs2_debug_read 3 14507 NULL +dataflash_read_user_otp_14536 dataflash_read_user_otp 3-2 14536 NULL nohasharray +ep0_write_14536 ep0_write 3 14536 &dataflash_read_user_otp_14536 @@ -116297,11 +124262,9 @@ index 0000000..386792a +__kfifo_in_14797 __kfifo_in 3-0 14797 NULL +hpet_readl_14801 hpet_readl 0 14801 NULL nohasharray +snd_als300_gcr_read_14801 snd_als300_gcr_read 0 14801 &hpet_readl_14801 -+do_tune_cpucache_14828 do_tune_cpucache 2 14828 NULL +mrp_attr_create_14853 mrp_attr_create 3 14853 NULL +lcd_write_14857 lcd_write 3 14857 NULL +get_user_cpu_mask_14861 get_user_cpu_mask 2 14861 NULL -+gmux_index_read8_14890 gmux_index_read8 0 14890 NULL +acpi_os_allocate_14892 acpi_os_allocate 1 14892 NULL +SYSC_readv_14901 SYSC_readv 3 14901 NULL +__arch_hweight64_14923 __arch_hweight64 0 14923 NULL nohasharray @@ -116318,10 +124281,9 @@ index 0000000..386792a +cld_pipe_downcall_15058 cld_pipe_downcall 3 15058 NULL +ieee80211_if_read_uapsd_max_sp_len_15067 ieee80211_if_read_uapsd_max_sp_len 3 15067 NULL +nfs4_write_cached_acl_15070 nfs4_write_cached_acl 4 15070 NULL -+ntfs_copy_from_user_15072 ntfs_copy_from_user 0-5-3 15072 NULL ++ntfs_copy_from_user_15072 ntfs_copy_from_user 3-5-0 15072 NULL +pppoe_recvmsg_15073 pppoe_recvmsg 4 15073 NULL +smscore_load_firmware_family2_15086 smscore_load_firmware_family2 3 15086 NULL -+btrfs_readpage_15094 btrfs_readpage 0 15094 NULL +compat_SyS_pwritev_15118 compat_SyS_pwritev 3 15118 NULL +hex_dump_to_buffer_15121 hex_dump_to_buffer 6 15121 NULL +start_port_15124 start_port 0 15124 NULL @@ -116339,23 +124301,20 @@ index 0000000..386792a +ioread16_15342 ioread16 0 15342 NULL +ept_prefetch_gpte_15348 ept_prefetch_gpte 4 15348 NULL +acpi_ut_create_string_object_15360 acpi_ut_create_string_object 1 15360 NULL -+ext4_direct_IO_15369 ext4_direct_IO 4 15369 NULL +graph_depth_read_15371 graph_depth_read 3 15371 NULL +fq_codel_zalloc_15378 fq_codel_zalloc 1 15378 NULL +alloc_fddidev_15382 alloc_fddidev 1 15382 NULL +pipeline_csum_to_rx_xfer_swi_read_15403 pipeline_csum_to_rx_xfer_swi_read 3 15403 NULL +get_modalias_15406 get_modalias 2 15406 NULL -+blockdev_direct_IO_15408 blockdev_direct_IO 5 15408 NULL +__videobuf_copy_to_user_15423 __videobuf_copy_to_user 4-0 15423 NULL -+rtw_cfg80211_rx_action_p2p_15432 rtw_cfg80211_rx_action_p2p 3 15432 NULL -+tcp_mtu_to_mss_15438 tcp_mtu_to_mss 2-0 15438 NULL ++tcp_mtu_to_mss_15438 tcp_mtu_to_mss 0-2 15438 NULL +hpsa_change_queue_depth_15449 hpsa_change_queue_depth 2 15449 NULL ++__clone_and_map_data_bio_15498 __clone_and_map_data_bio 3 15498 NULL +insert_old_idx_znode_15500 insert_old_idx_znode 0 15500 NULL +zd_chip_is_zd1211b_15518 zd_chip_is_zd1211b 0 15518 NULL +ifx_spi_write_15531 ifx_spi_write 3 15531 NULL +p9_check_zc_errors_15534 p9_check_zc_errors 4 15534 NULL +xfrm_state_mtu_15548 xfrm_state_mtu 0-2 15548 NULL -+snd_pcm_channel_info_15572 snd_pcm_channel_info 0 15572 NULL +persistent_status_15574 persistent_status 4 15574 NULL +bnx2fc_process_unsol_compl_15576 bnx2fc_process_unsol_compl 2 15576 NULL +vme_user_write_15587 vme_user_write 3 15587 NULL @@ -116366,11 +124325,10 @@ index 0000000..386792a +sk_memory_allocated_add_15642 sk_memory_allocated_add 2 15642 &pipeline_hs_tx_stat_fifo_int_read_15642 +joydev_handle_JSIOCSBTNMAP_15643 joydev_handle_JSIOCSBTNMAP 3 15643 NULL +fs_path_add_15648 fs_path_add 3 15648 NULL -+__do_readpage_15652 __do_readpage 0 15652 NULL +xsd_read_15653 xsd_read 3 15653 NULL +unix_bind_15668 unix_bind 3 15668 NULL -+dm_read_15674 dm_read 3 15674 NULL nohasharray -+SyS_connect_15674 SyS_connect 3 15674 &dm_read_15674 ++SyS_connect_15674 SyS_connect 3 15674 NULL nohasharray ++dm_read_15674 dm_read 3 15674 &SyS_connect_15674 +uinput_str_to_user_15695 uinput_str_to_user 3 15695 NULL +__sk_migrate_realloc_15709 __sk_migrate_realloc 3 15709 NULL +tracing_snapshot_write_15719 tracing_snapshot_write 3 15719 NULL @@ -116389,6 +124347,7 @@ index 0000000..386792a +lpfc_idiag_drbacc_read_15948 lpfc_idiag_drbacc_read 3 15948 NULL +snd_pcm_lib_read_transfer_15952 snd_pcm_lib_read_transfer 5-2-4 15952 NULL +memblock_virt_alloc_try_nid_15954 memblock_virt_alloc_try_nid 1 15954 NULL ++smk_read_ptrace_15974 smk_read_ptrace 3 15974 NULL +viafb_vt1636_proc_write_16018 viafb_vt1636_proc_write 3 16018 NULL +dccp_recvmsg_16056 dccp_recvmsg 4 16056 NULL +read_file_spectral_period_16057 read_file_spectral_period 3 16057 NULL @@ -116400,7 +124359,7 @@ index 0000000..386792a +fsm_init_16134 fsm_init 2 16134 NULL +ext4_xattr_block_get_16148 ext4_xattr_block_get 0 16148 NULL +optimal_reclaimed_pages_16172 optimal_reclaimed_pages 0 16172 NULL -+mapping_level_16188 mapping_level 2-0 16188 NULL ++mapping_level_16188 mapping_level 0-2 16188 NULL +i40e_allocate_virt_mem_d_16191 i40e_allocate_virt_mem_d 3 16191 NULL +ath10k_htt_rx_ring_size_16201 ath10k_htt_rx_ring_size 0 16201 NULL +cipso_v4_map_cat_rng_hton_16203 cipso_v4_map_cat_rng_hton 0 16203 NULL @@ -116415,8 +124374,8 @@ index 0000000..386792a +SyS_fgetxattr_16254 SyS_fgetxattr 4 16254 NULL +reiserfs_acl_count_16265 reiserfs_acl_count 0-1 16265 NULL +ocfs2_xattr_bucket_value_truncate_16279 ocfs2_xattr_bucket_value_truncate 4 16279 NULL -+nand_bch_init_16280 nand_bch_init 3-2 16280 NULL nohasharray -+drbd_setsockopt_16280 drbd_setsockopt 5 16280 &nand_bch_init_16280 ++drbd_setsockopt_16280 drbd_setsockopt 5 16280 NULL nohasharray ++nand_bch_init_16280 nand_bch_init 3-2 16280 &drbd_setsockopt_16280 +account_16283 account 0-4-2 16283 NULL nohasharray +mirror_status_16283 mirror_status 5 16283 &account_16283 +jumpshot_read_data_16287 jumpshot_read_data 4 16287 NULL @@ -116425,14 +124384,13 @@ index 0000000..386792a +rbd_segment_offset_16293 rbd_segment_offset 0-2 16293 NULL +rsc_mgr_init_16299 rsc_mgr_init 3 16299 NULL +kvm_handle_hva_range_16312 kvm_handle_hva_range 3-2 16312 NULL -+sysfs_create_groups_16360 sysfs_create_groups 0 16360 NULL +total_ps_buffered_read_16365 total_ps_buffered_read 3 16365 NULL +iscsi_tcp_conn_setup_16376 iscsi_tcp_conn_setup 2 16376 NULL -+i8042_create_kbd_port_16379 i8042_create_kbd_port 0 16379 NULL +ieee80211_if_read_tsf_16420 ieee80211_if_read_tsf 3 16420 NULL +rxrpc_server_keyring_16431 rxrpc_server_keyring 3 16431 NULL +__bio_add_page_16435 __bio_add_page 0-4 16435 NULL +cmdline_store_16442 cmdline_store 4 16442 NULL ++copy_from_user_bvec_16447 copy_from_user_bvec 0-4 16447 NULL +btrfs_truncate_inode_items_16452 btrfs_truncate_inode_items 4 16452 NULL +netlink_change_ngroups_16457 netlink_change_ngroups 2 16457 NULL +req_capsule_get_size_16467 req_capsule_get_size 0 16467 NULL @@ -116443,7 +124401,6 @@ index 0000000..386792a +lpfc_debugfs_read_16566 lpfc_debugfs_read 3 16566 NULL +agp_allocate_memory_wrap_16576 agp_allocate_memory_wrap 1 16576 NULL +lustre_msg_hdr_size_v2_16589 lustre_msg_hdr_size_v2 0 16589 NULL -+gmux_index_read32_16604 gmux_index_read32 0 16604 NULL +compat_SyS_migrate_pages_16618 compat_SyS_migrate_pages 2 16618 NULL +rtw_set_wpa_ie_16633 rtw_set_wpa_ie 3 16633 NULL +btrfs_get_token_32_16651 btrfs_get_token_32 0 16651 NULL @@ -116478,6 +124435,7 @@ index 0000000..386792a +entry_length_17093 entry_length 0 17093 NULL +write_mem_17114 write_mem 3 17114 NULL +pvr2_hdw_state_report_17121 pvr2_hdw_state_report 3 17121 NULL ++do_blockdev_direct_IO_17143 do_blockdev_direct_IO 0-6 17143 NULL +nouveau_instobj_create__17144 nouveau_instobj_create_ 4 17144 NULL +jumpshot_write_data_17151 jumpshot_write_data 4 17151 NULL +sep_read_17161 sep_read 3 17161 NULL @@ -116486,8 +124444,8 @@ index 0000000..386792a +UniStrnlen_17169 UniStrnlen 0 17169 NULL +access_remote_vm_17189 access_remote_vm 0 17189 NULL nohasharray +iwl_dbgfs_txfifo_flush_write_17189 iwl_dbgfs_txfifo_flush_write 3 17189 &access_remote_vm_17189 -+iscsit_find_cmd_from_itt_or_dump_17194 iscsit_find_cmd_from_itt_or_dump 3 17194 NULL nohasharray -+driver_state_read_17194 driver_state_read 3 17194 &iscsit_find_cmd_from_itt_or_dump_17194 ++driver_state_read_17194 driver_state_read 3 17194 NULL nohasharray ++iscsit_find_cmd_from_itt_or_dump_17194 iscsit_find_cmd_from_itt_or_dump 3 17194 &driver_state_read_17194 +sync_request_17208 sync_request 2 17208 NULL +dn_recvmsg_17213 dn_recvmsg 4 17213 NULL +lprocfs_read_frac_helper_17261 lprocfs_read_frac_helper 0 17261 NULL @@ -116511,11 +124469,12 @@ index 0000000..386792a +__ref_totlen_17461 __ref_totlen 0 17461 NULL +probe_kernel_write_17481 probe_kernel_write 3 17481 NULL +TSS_rawhmac_17486 TSS_rawhmac 3 17486 NULL ++copy_page_from_iter_17512 copy_page_from_iter 3-0 17512 NULL ++reiserfs_direct_IO_17513 reiserfs_direct_IO 4 17513 NULL +lbs_highrssi_write_17515 lbs_highrssi_write 3 17515 NULL +qp_free_res_17541 qp_free_res 5 17541 NULL +__copy_to_user_17551 __copy_to_user 0-3 17551 NULL +copy_from_user_17559 copy_from_user 3-0 17559 NULL -+snd_pcm_action_lock_irq_17569 snd_pcm_action_lock_irq 0 17569 NULL +hash_netport4_expire_17573 hash_netport4_expire 4 17573 NULL +acpi_ut_create_package_object_17594 acpi_ut_create_package_object 1 17594 NULL +neigh_hash_alloc_17595 neigh_hash_alloc 1 17595 NULL @@ -116527,7 +124486,6 @@ index 0000000..386792a +packet_setsockopt_17662 packet_setsockopt 5 17662 NULL nohasharray +ubi_io_read_data_17662 ubi_io_read_data 0 17662 &packet_setsockopt_17662 +pwr_enable_ps_read_17686 pwr_enable_ps_read 3 17686 NULL -+filemap_fdatawait_17688 filemap_fdatawait 0 17688 NULL +venus_rename_17707 venus_rename 4-5 17707 NULL +exofs_read_lookup_dev_table_17733 exofs_read_lookup_dev_table 3 17733 NULL +sctpprobe_read_17741 sctpprobe_read 3 17741 NULL @@ -116558,7 +124516,6 @@ index 0000000..386792a +smk_write_cipso_17989 smk_write_cipso 3 17989 NULL +gnttab_max_grant_frames_17993 gnttab_max_grant_frames 0 17993 NULL +pvr2_v4l2_read_18006 pvr2_v4l2_read 3 18006 NULL -+cpufreq_add_dev_symlink_18028 cpufreq_add_dev_symlink 0 18028 NULL +o2hb_highest_node_18034 o2hb_highest_node 0 18034 NULL +cryptd_alloc_instance_18048 cryptd_alloc_instance 2-3 18048 NULL +__btrfs_drop_extents_18049 __btrfs_drop_extents 5 18049 NULL @@ -116569,14 +124526,12 @@ index 0000000..386792a +SYSC_pselect6_18076 SYSC_pselect6 1 18076 NULL +SYSC_semtimedop_18091 SYSC_semtimedop 3 18091 NULL +mpi_alloc_18094 mpi_alloc 1 18094 NULL -+hfs_direct_IO_18104 hfs_direct_IO 4 18104 NULL +dfs_file_read_18116 dfs_file_read 3 18116 NULL +svc_getnl_18120 svc_getnl 0 18120 NULL +paging32_gpte_to_gfn_lvl_18131 paging32_gpte_to_gfn_lvl 0-2-1 18131 NULL +selinux_inode_setsecurity_18148 selinux_inode_setsecurity 4 18148 NULL +is_idx_node_in_use_18165 is_idx_node_in_use 0 18165 NULL +pccard_store_cis_18176 pccard_store_cis 6 18176 NULL -+snd_pcm_hw_refine_user_18204 snd_pcm_hw_refine_user 0 18204 NULL +orinoco_add_extscan_result_18207 orinoco_add_extscan_result 3 18207 NULL +gsm_control_message_18209 gsm_control_message 4 18209 NULL +do_ipv6_setsockopt_18215 do_ipv6_setsockopt 5 18215 NULL @@ -116593,7 +124548,6 @@ index 0000000..386792a +mmc_send_bus_test_18285 mmc_send_bus_test 4 18285 NULL +um_idi_write_18293 um_idi_write 3 18293 NULL +nouveau_disp_create__18305 nouveau_disp_create_ 4-7 18305 NULL -+vga_r_18310 vga_r 0 18310 NULL +class_add_profile_18315 class_add_profile 1-3-5 18315 NULL +csio_mem_read_18319 csio_mem_read 3 18319 NULL +alloc_and_copy_string_18321 alloc_and_copy_string 2 18321 NULL @@ -116608,14 +124562,12 @@ index 0000000..386792a +__ceph_getxattr_18386 __ceph_getxattr 0 18386 NULL +ci_role_write_18388 ci_role_write 3 18388 NULL +adis16136_show_serial_18402 adis16136_show_serial 3 18402 NULL -+rtl8169_rx_fill_18416 rtl8169_rx_fill 0 18416 NULL +memblock_virt_alloc_node_nopanic_18431 memblock_virt_alloc_node_nopanic 1 18431 NULL +iscsi_create_flashnode_sess_18433 iscsi_create_flashnode_sess 4 18433 NULL +snd_hda_get_connections_18437 snd_hda_get_connections 0 18437 NULL +fuse_perform_write_18457 fuse_perform_write 4 18457 NULL +regset_tls_set_18459 regset_tls_set 4 18459 NULL -+pci_vpd_lrdt_size_18479 pci_vpd_lrdt_size 0 18479 NULL nohasharray -+mite_bytes_in_transit_18479 mite_bytes_in_transit 0 18479 &pci_vpd_lrdt_size_18479 ++pci_vpd_lrdt_size_18479 pci_vpd_lrdt_size 0 18479 NULL +udpv6_setsockopt_18487 udpv6_setsockopt 5 18487 NULL +btrfs_fiemap_18501 btrfs_fiemap 3 18501 NULL +__copy_user_zeroing_intel_18510 __copy_user_zeroing_intel 0-3 18510 NULL @@ -116627,8 +124579,7 @@ index 0000000..386792a +sas_change_queue_depth_18555 sas_change_queue_depth 2 18555 NULL +smk_write_rules_list_18565 smk_write_rules_list 3 18565 NULL +debug_output_18575 debug_output 3 18575 NULL -+filemap_fdatawait_range_18600 filemap_fdatawait_range 0 18600 NULL nohasharray -+slabinfo_write_18600 slabinfo_write 3 18600 &filemap_fdatawait_range_18600 ++filemap_fdatawait_range_18600 filemap_fdatawait_range 0 18600 NULL +iowarrior_write_18604 iowarrior_write 3 18604 NULL +from_buffer_18625 from_buffer 3 18625 NULL +snd_pcm_oss_write3_18657 snd_pcm_oss_write3 0-3 18657 NULL @@ -116653,20 +124604,17 @@ index 0000000..386792a +sctp_setsockopt_events_18862 sctp_setsockopt_events 3 18862 NULL +ieee80211_if_read_element_ttl_18869 ieee80211_if_read_element_ttl 3 18869 NULL +xlog_find_verify_log_record_18870 xlog_find_verify_log_record 2 18870 NULL ++devm_mdiobus_alloc_size_18902 devm_mdiobus_alloc_size 2 18902 NULL +ceph_setxattr_18913 ceph_setxattr 4 18913 NULL +ieee80211_rx_mgmt_disassoc_18927 ieee80211_rx_mgmt_disassoc 3 18927 NULL -+snapshot_write_next_18937 snapshot_write_next 0 18937 NULL +__nla_reserve_18974 __nla_reserve 3 18974 NULL -+__blockdev_direct_IO_18977 __blockdev_direct_IO 0-6 18977 NULL +find_dirtiest_idx_leb_19001 find_dirtiest_idx_leb 0 19001 NULL +layout_in_gaps_19006 layout_in_gaps 2 19006 NULL +huge_page_size_19008 huge_page_size 0 19008 NULL +hash_netport6_expire_19013 hash_netport6_expire 4 19013 NULL -+sysfs_create_dir_ns_19033 sysfs_create_dir_ns 0 19033 NULL +revalidate_19043 revalidate 2 19043 NULL +afs_vnode_store_data_19048 afs_vnode_store_data 2-3-4-5 19048 NULL -+osc_pinger_recov_seq_write_19056 osc_pinger_recov_seq_write 3 19056 NULL nohasharray -+do_vm86_irq_handling_19056 do_vm86_irq_handling 2 19056 &osc_pinger_recov_seq_write_19056 ++osc_pinger_recov_seq_write_19056 osc_pinger_recov_seq_write 3 19056 NULL +create_gpadl_header_19064 create_gpadl_header 2 19064 NULL +ceph_create_snap_context_19082 ceph_create_snap_context 1 19082 NULL +sta_last_seq_ctrl_read_19106 sta_last_seq_ctrl_read 3 19106 NULL @@ -116676,12 +124624,12 @@ index 0000000..386792a +alloc_irdadev_19140 alloc_irdadev 1 19140 NULL +sleep_auth_read_19159 sleep_auth_read 3 19159 NULL +smk_write_access2_19170 smk_write_access2 3 19170 NULL ++read_extent_buffer_to_user_19189 read_extent_buffer_to_user 4-3 19189 NULL +iwl_dbgfs_reply_tx_error_read_19205 iwl_dbgfs_reply_tx_error_read 3 19205 NULL -+__copy_to_user_inatomic_19214 __copy_to_user_inatomic 3-0 19214 NULL ++__copy_to_user_inatomic_19214 __copy_to_user_inatomic 0-3 19214 NULL +dev_counters_read_19216 dev_counters_read 3 19216 NULL +wbcir_tx_19219 wbcir_tx 3 19219 NULL +snd_mask_max_19224 snd_mask_max 0 19224 NULL -+snd_pcm_capture_rewind_19229 snd_pcm_capture_rewind 0-2 19229 NULL +bio_alloc_mddev_19238 bio_alloc_mddev 2 19238 NULL +ucma_query_19260 ucma_query 4 19260 NULL +il_dbgfs_rxon_filter_flags_read_19281 il_dbgfs_rxon_filter_flags_read 3 19281 NULL @@ -116691,8 +124639,8 @@ index 0000000..386792a +ocfs2_prepare_inode_for_refcount_19303 ocfs2_prepare_inode_for_refcount 3-4 19303 NULL +event_tx_stuck_read_19305 event_tx_stuck_read 3 19305 NULL +debug_read_19322 debug_read 3 19322 NULL -+cfg80211_inform_bss_19332 cfg80211_inform_bss 8 19332 NULL nohasharray -+lbs_host_sleep_write_19332 lbs_host_sleep_write 3 19332 &cfg80211_inform_bss_19332 ++lbs_host_sleep_write_19332 lbs_host_sleep_write 3 19332 NULL nohasharray ++cfg80211_inform_bss_19332 cfg80211_inform_bss 8 19332 &lbs_host_sleep_write_19332 +closure_sub_19359 closure_sub 2 19359 NULL +firmware_data_write_19360 firmware_data_write 6-5 19360 NULL +read_zero_19366 read_zero 3 19366 NULL @@ -116709,19 +124657,16 @@ index 0000000..386792a +kstrtoll_from_user_19500 kstrtoll_from_user 2 19500 NULL +ext4_add_new_descs_19509 ext4_add_new_descs 3 19509 NULL +batadv_tvlv_container_register_19520 batadv_tvlv_container_register 5 19520 NULL -+cfc_write_array_to_buffer_19529 cfc_write_array_to_buffer 3 19529 NULL +nfc_llcp_build_tlv_19536 nfc_llcp_build_tlv 3 19536 NULL +gfn_to_index_19558 gfn_to_index 0-1-3-2 19558 NULL +ocfs2_control_message_19564 ocfs2_control_message 3 19564 NULL +nfsd_read_19568 nfsd_read 5 19568 NULL +ieee80211_key_alloc_19575 ieee80211_key_alloc 3 19575 NULL -+mnt_want_write_file_19579 mnt_want_write_file 0 19579 NULL +bm_status_read_19583 bm_status_read 3 19583 NULL +load_xattr_datum_19594 load_xattr_datum 0 19594 NULL +__mei_cl_recv_19636 __mei_cl_recv 3 19636 NULL +LoadBitmap_19658 LoadBitmap 2 19658 NULL +memblock_virt_alloc_low_nopanic_19714 memblock_virt_alloc_low_nopanic 1 19714 NULL -+ocfs2_control_get_this_node_19721 ocfs2_control_get_this_node 0 19721 NULL +read_reg_19723 read_reg 0 19723 NULL +wm8350_block_write_19727 wm8350_block_write 2-3 19727 NULL +memcpy_toiovecend_19736 memcpy_toiovecend 4-3 19736 NULL @@ -116744,26 +124689,23 @@ index 0000000..386792a +iwl_dbgfs_rx_queue_read_19943 iwl_dbgfs_rx_queue_read 3 19943 NULL +cfg80211_rx_assoc_resp_19944 cfg80211_rx_assoc_resp 4 19944 NULL +ll_xattr_cache_list_19954 ll_xattr_cache_list 0 19954 NULL -+get_jack_mode_name_19976 get_jack_mode_name 4 19976 NULL +attach_hdlc_protocol_19986 attach_hdlc_protocol 3 19986 NULL -+rtw_set_wps_probe_resp_19989 rtw_set_wps_probe_resp 3 19989 NULL nohasharray -+i40e_reserve_msix_vectors_19989 i40e_reserve_msix_vectors 2 19989 &rtw_set_wps_probe_resp_19989 ++rtw_set_wps_probe_resp_19989 rtw_set_wps_probe_resp 3 19989 NULL +diva_um_idi_read_20003 diva_um_idi_read 0 20003 NULL -+lov_stripe_md_size_20009 lov_stripe_md_size 0-1 20009 NULL nohasharray -+event_trigger_write_20009 event_trigger_write 3 20009 &lov_stripe_md_size_20009 ++event_trigger_write_20009 event_trigger_write 3 20009 NULL nohasharray ++lov_stripe_md_size_20009 lov_stripe_md_size 0-1 20009 &event_trigger_write_20009 +tree_mod_log_eb_move_20011 tree_mod_log_eb_move 5 20011 NULL +SYSC_fgetxattr_20027 SYSC_fgetxattr 4 20027 NULL +split_scan_timeout_read_20029 split_scan_timeout_read 3 20029 NULL -+iwl_mvm_power_mac_dbgfs_read_20067 iwl_mvm_power_mac_dbgfs_read 0-4 20067 NULL -+target_message_20072 target_message 2 20072 NULL ++iwl_mvm_power_mac_dbgfs_read_20067 iwl_mvm_power_mac_dbgfs_read 4-0 20067 NULL +rawv6_sendmsg_20080 rawv6_sendmsg 4 20080 NULL +fuse_conn_limit_read_20084 fuse_conn_limit_read 3 20084 NULL +aat2870_reg_write_file_20086 aat2870_reg_write_file 3 20086 NULL +team_options_register_20091 team_options_register 3 20091 NULL +qla2x00_adjust_sdev_qdepth_up_20097 qla2x00_adjust_sdev_qdepth_up 2 20097 NULL -+root_nfs_copy_20111 root_nfs_copy 3 20111 NULL +hptiop_adjust_disk_queue_depth_20122 hptiop_adjust_disk_queue_depth 2 20122 NULL +self_check_vid_hdr_20131 self_check_vid_hdr 0 20131 NULL ++ext4_ext_direct_IO_20165 ext4_ext_direct_IO 4 20165 NULL +tomoyo_commit_ok_20167 tomoyo_commit_ok 2 20167 NULL +read_flush_pipefs_20171 read_flush_pipefs 3 20171 NULL +wep_addr_key_count_read_20174 wep_addr_key_count_read 3 20174 NULL @@ -116779,11 +124721,10 @@ index 0000000..386792a +snd_cs4281_BA1_read_20323 snd_cs4281_BA1_read 5 20323 NULL +gfs2_glock_nq_m_20347 gfs2_glock_nq_m 1 20347 NULL +handle_arr_calc_size_20355 handle_arr_calc_size 0-1 20355 NULL -+snd_pcm_stop_20376 snd_pcm_stop 0 20376 NULL +smk_set_cipso_20379 smk_set_cipso 3 20379 NULL +snd_nm256_readl_20394 snd_nm256_readl 0 20394 NULL -+SyS_get_mempolicy_20399 SyS_get_mempolicy 3 20399 NULL nohasharray -+__kfifo_from_user_20399 __kfifo_from_user 3 20399 &SyS_get_mempolicy_20399 ++__kfifo_from_user_20399 __kfifo_from_user 3 20399 NULL nohasharray ++SyS_get_mempolicy_20399 SyS_get_mempolicy 3 20399 &__kfifo_from_user_20399 +compat_ipv6_setsockopt_20468 compat_ipv6_setsockopt 5 20468 NULL +read_buf_20469 read_buf 2 20469 NULL +bio_trim_20472 bio_trim 2 20472 NULL @@ -116799,29 +124740,29 @@ index 0000000..386792a +set_secure_conn_20596 set_secure_conn 4 20596 NULL +sync_timeline_create_20601 sync_timeline_create 2 20601 NULL +lirc_write_20604 lirc_write 3 20604 NULL -+qib_qsfp_write_20614 qib_qsfp_write 0-2-4 20614 NULL ++qib_qsfp_write_20614 qib_qsfp_write 0-4-2 20614 NULL +snd_pcm_oss_prepare_20641 snd_pcm_oss_prepare 0 20641 NULL +get_extent_skip_holes_20642 get_extent_skip_holes 2 20642 NULL -+kfifo_copy_to_user_20646 kfifo_copy_to_user 3-4 20646 NULL -+cpulist_scnprintf_20648 cpulist_scnprintf 2-0 20648 NULL ++kfifo_copy_to_user_20646 kfifo_copy_to_user 4-3 20646 NULL ++cpulist_scnprintf_20648 cpulist_scnprintf 2 20648 NULL +oz_add_farewell_20652 oz_add_farewell 5 20652 NULL +oz_cdev_read_20659 oz_cdev_read 3 20659 NULL -+snd_hdsp_playback_copy_20676 snd_hdsp_playback_copy 5 20676 NULL nohasharray -+btrfs_qgroup_reserve_20676 btrfs_qgroup_reserve 0 20676 &snd_hdsp_playback_copy_20676 ++snd_hdsp_playback_copy_20676 snd_hdsp_playback_copy 5 20676 NULL +dvb_dmxdev_buffer_read_20682 dvb_dmxdev_buffer_read 0-4 20682 NULL +cpumask_size_20683 cpumask_size 0 20683 NULL +btrfs_node_blockptr_20685 btrfs_node_blockptr 0 20685 NULL ++xpcs_reg_addr_write_20694 xpcs_reg_addr_write 3 20694 NULL +read_file_tgt_int_stats_20697 read_file_tgt_int_stats 3 20697 NULL +__maestro_read_20700 __maestro_read 0 20700 NULL +cipso_v4_gentag_rng_20703 cipso_v4_gentag_rng 0 20703 NULL +pcpu_page_first_chunk_20712 pcpu_page_first_chunk 1 20712 NULL ++hfs_direct_IO_20714 hfs_direct_IO 4 20714 NULL +ocfs2_read_xattr_bucket_20722 ocfs2_read_xattr_bucket 0 20722 NULL +security_context_to_sid_force_20724 security_context_to_sid_force 2 20724 NULL +fb_prepare_logo_20743 fb_prepare_logo 0 20743 NULL +vol_cdev_direct_write_20751 vol_cdev_direct_write 3 20751 NULL +ocfs2_align_bytes_to_clusters_20754 ocfs2_align_bytes_to_clusters 2 20754 NULL -+brcmf_p2p_escan_20763 brcmf_p2p_escan 2 20763 NULL nohasharray -+mnt_clone_write_20763 mnt_clone_write 0 20763 &brcmf_p2p_escan_20763 ++brcmf_p2p_escan_20763 brcmf_p2p_escan 2 20763 NULL +ubi_io_read_20767 ubi_io_read 0 20767 NULL +fb_alloc_cmap_gfp_20792 fb_alloc_cmap_gfp 2 20792 NULL +iwl_dbgfs_rxon_flags_read_20795 iwl_dbgfs_rxon_flags_read 3 20795 NULL @@ -116832,7 +124773,6 @@ index 0000000..386792a +uvc_alloc_entity_20836 uvc_alloc_entity 4-3 20836 NULL +p9_tag_alloc_20845 p9_tag_alloc 3 20845 NULL +nvme_trans_supported_vpd_pages_20847 nvme_trans_supported_vpd_pages 4 20847 NULL -+get_name_20855 get_name 4 20855 NULL +iwl_dbgfs_pm_params_read_20866 iwl_dbgfs_pm_params_read 3 20866 NULL +snd_pcm_capture_avail_20867 snd_pcm_capture_avail 0 20867 NULL +srq_free_res_20868 srq_free_res 5 20868 NULL @@ -116850,15 +124790,12 @@ index 0000000..386792a +snd_rme9652_playback_copy_20970 snd_rme9652_playback_copy 5 20970 NULL +alg_setsockopt_20985 alg_setsockopt 5 20985 NULL +qib_verbs_send_20999 qib_verbs_send 5-3 20999 NULL -+btrfs_dirty_pages_21019 btrfs_dirty_pages 0 21019 NULL +btrfs_inode_ref_name_len_21024 btrfs_inode_ref_name_len 0 21024 NULL +rx_defrag_tkip_called_read_21031 rx_defrag_tkip_called_read 3 21031 NULL +srp_change_queue_depth_21038 srp_change_queue_depth 2 21038 NULL +fsl_edma_prep_dma_cyclic_21042 fsl_edma_prep_dma_cyclic 4-3 21042 NULL +lbs_threshold_read_21046 lbs_threshold_read 5 21046 NULL -+reiserfs_direct_IO_21051 reiserfs_direct_IO 4 21051 NULL +proc_fault_inject_write_21058 proc_fault_inject_write 3 21058 NULL -+qdisc_get_default_21072 qdisc_get_default 2 21072 NULL +event_calibration_read_21083 event_calibration_read 3 21083 NULL +bl_add_page_to_bio_21094 bl_add_page_to_bio 2 21094 NULL nohasharray +multipath_status_21094 multipath_status 5 21094 &bl_add_page_to_bio_21094 @@ -116868,10 +124805,9 @@ index 0000000..386792a +i2400m_rx_trace_21127 i2400m_rx_trace 3 21127 NULL +mei_dbgfs_read_active_21172 mei_dbgfs_read_active 3 21172 NULL +cx18_v4l2_read_21196 cx18_v4l2_read 3 21196 NULL -+__generic_file_aio_write_21201 __generic_file_aio_write 0 21201 NULL +ipc_rcu_alloc_21208 ipc_rcu_alloc 1 21208 NULL +scsi_execute_req_flags_21215 scsi_execute_req_flags 5 21215 NULL -+get_numpages_21227 get_numpages 0-2-1 21227 NULL ++get_numpages_21227 get_numpages 0-1-2 21227 NULL +input_ff_create_21240 input_ff_create 2 21240 NULL +cfg80211_notify_new_peer_candidate_21242 cfg80211_notify_new_peer_candidate 4 21242 NULL +fru_length_21257 fru_length 0 21257 NULL @@ -116883,23 +124819,20 @@ index 0000000..386792a +ftrace_profile_read_21327 ftrace_profile_read 3 21327 NULL +read_file_bool_bmps_21344 read_file_bool_bmps 3 21344 NULL +gfs2_ea_get_copy_21353 gfs2_ea_get_copy 0 21353 NULL ++allocate_cmdlines_buffer_21355 allocate_cmdlines_buffer 1 21355 NULL +alloc_orinocodev_21371 alloc_orinocodev 1 21371 NULL +SYSC_rt_sigpending_21379 SYSC_rt_sigpending 2 21379 NULL +video_ioctl2_21380 video_ioctl2 2 21380 NULL +insert_ptr_21386 insert_ptr 6 21386 NULL +diva_get_driver_dbg_mask_21399 diva_get_driver_dbg_mask 0 21399 NULL -+__clone_and_map_simple_bio_21404 __clone_and_map_simple_bio 4 21404 NULL +snd_m3_inw_21406 snd_m3_inw 0 21406 NULL +usnic_ib_dump_vf_hdr_21423 usnic_ib_dump_vf_hdr 3 21423 NULL -+snapshot_read_next_21426 snapshot_read_next 0 21426 NULL +tcp_bound_to_half_wnd_21429 tcp_bound_to_half_wnd 0-2 21429 NULL -+tracing_saved_cmdlines_read_21434 tracing_saved_cmdlines_read 3 21434 NULL +aggr_size_tx_agg_vs_rate_read_21438 aggr_size_tx_agg_vs_rate_read 3 21438 NULL +__ertm_hdr_size_21450 __ertm_hdr_size 0 21450 NULL +mei_nfc_send_21477 mei_nfc_send 3 21477 NULL +read_file_xmit_21487 read_file_xmit 3 21487 NULL +mmc_alloc_sg_21504 mmc_alloc_sg 1 21504 NULL -+btrfs_file_aio_write_21520 btrfs_file_aio_write 4 21520 NULL +il_dbgfs_stations_read_21532 il_dbgfs_stations_read 3 21532 NULL +cipso_v4_map_cat_enum_hton_21540 cipso_v4_map_cat_enum_hton 0 21540 NULL +rxrpc_send_data_21553 rxrpc_send_data 5 21553 NULL @@ -116914,7 +124847,6 @@ index 0000000..386792a +regmap_register_patch_21681 regmap_register_patch 3 21681 NULL +rtllib_alloc_txb_21687 rtllib_alloc_txb 1 21687 NULL +evdev_ioctl_handler_21705 evdev_ioctl_handler 2 21705 NULL -+update_time_21719 update_time 0 21719 NULL +unix_skb_len_21722 unix_skb_len 0 21722 NULL +lprocfs_wr_import_21728 lprocfs_wr_import 3 21728 NULL +mthca_alloc_init_21754 mthca_alloc_init 2 21754 NULL @@ -116926,9 +124858,9 @@ index 0000000..386792a +oom_adj_read_21847 oom_adj_read 3 21847 NULL +lpfc_idiag_extacc_avail_get_21865 lpfc_idiag_extacc_avail_get 0-3 21865 NULL +brcms_debugfs_hardware_read_21867 brcms_debugfs_hardware_read 3 21867 NULL -+msix_capability_init_21870 msix_capability_init 0 21870 NULL +sisusbcon_bmove_21873 sisusbcon_bmove 6-5-7 21873 NULL +ldlm_lock_create_21888 ldlm_lock_create 7 21888 NULL ++__btrfs_direct_write_21894 __btrfs_direct_write 3 21894 NULL +dbAllocCtl_21911 dbAllocCtl 0 21911 NULL +qsfp_1_read_21915 qsfp_1_read 3 21915 NULL +twl_i2c_write_u16_21953 twl_i2c_write_u16 3 21953 NULL @@ -116944,12 +124876,10 @@ index 0000000..386792a +btrfs_reloc_clone_csums_22077 btrfs_reloc_clone_csums 2-3 22077 NULL +mem_rw_22085 mem_rw 3 22085 NULL +kstrtos32_from_user_22087 kstrtos32_from_user 2 22087 NULL -+snd_pcm_xrun_22088 snd_pcm_xrun 0 22088 NULL +rt2x00debug_read_crypto_stats_22109 rt2x00debug_read_crypto_stats 3 22109 NULL +snd_hda_codec_read_22130 snd_hda_codec_read 0 22130 NULL +SyS_sched_setaffinity_22148 SyS_sched_setaffinity 2 22148 NULL +do_tcp_sendpages_22155 do_tcp_sendpages 4 22155 NULL -+pci_request_region_22164 pci_request_region 0 22164 NULL +__kfifo_alloc_22173 __kfifo_alloc 3 22173 NULL +rfcomm_sock_recvmsg_22227 rfcomm_sock_recvmsg 4 22227 NULL +mem_write_22232 mem_write 3 22232 NULL @@ -116959,11 +124889,10 @@ index 0000000..386792a +ping_common_sendmsg_22261 ping_common_sendmsg 5 22261 NULL +add_res_tree_22263 add_res_tree 7 22263 NULL +queue_max_sectors_22280 queue_max_sectors 0 22280 NULL -+pci_vpd_srdt_size_22300 pci_vpd_srdt_size 0 22300 NULL nohasharray -+__tun_chr_ioctl_22300 __tun_chr_ioctl 4 22300 &pci_vpd_srdt_size_22300 ++__tun_chr_ioctl_22300 __tun_chr_ioctl 4 22300 NULL nohasharray ++pci_vpd_srdt_size_22300 pci_vpd_srdt_size 0 22300 &__tun_chr_ioctl_22300 +mesh_table_alloc_22305 mesh_table_alloc 1 22305 NULL +lov_setstripe_22307 lov_setstripe 2 22307 NULL -+udpv6_sendmsg_22316 udpv6_sendmsg 4 22316 NULL +atomic_read_22342 atomic_read 0 22342 NULL +ll_lazystatfs_seq_write_22353 ll_lazystatfs_seq_write 3 22353 NULL +snd_pcm_alsa_frames_22363 snd_pcm_alsa_frames 2 22363 NULL @@ -116978,42 +124907,37 @@ index 0000000..386792a +qib_user_sdma_alloc_header_22490 qib_user_sdma_alloc_header 2 22490 NULL +cache_write_procfs_22491 cache_write_procfs 3 22491 NULL +trim_no_bitmap_22524 trim_no_bitmap 4-3 22524 NULL -+ntb_setup_bwd_msix_22549 ntb_setup_bwd_msix 2-0 22549 NULL +ocfs2_read_extent_block_22550 ocfs2_read_extent_block 0 22550 NULL +agp_alloc_page_array_22554 agp_alloc_page_array 1 22554 NULL +dbFindCtl_22587 dbFindCtl 0 22587 NULL -+snapshot_read_22601 snapshot_read 3 22601 NULL +sctp_setsockopt_connectx_old_22631 sctp_setsockopt_connectx_old 3 22631 NULL +ide_core_cp_entry_22636 ide_core_cp_entry 3 22636 NULL +wl1271_rx_filter_get_fields_size_22638 wl1271_rx_filter_get_fields_size 0 22638 NULL +pwr_wake_on_timer_exp_read_22640 pwr_wake_on_timer_exp_read 3 22640 NULL +iwl_dbgfs_calib_disabled_read_22649 iwl_dbgfs_calib_disabled_read 3 22649 NULL -+ext4_ext_direct_IO_22679 ext4_ext_direct_IO 4 22679 NULL -+fill_gap_22681 fill_gap 0 22681 NULL nohasharray -+l2tp_ip_recvmsg_22681 l2tp_ip_recvmsg 4 22681 &fill_gap_22681 ++l2tp_ip_recvmsg_22681 l2tp_ip_recvmsg 4 22681 NULL nohasharray ++fill_gap_22681 fill_gap 0 22681 &l2tp_ip_recvmsg_22681 +bch_dump_read_22685 bch_dump_read 3 22685 NULL +reg_umr_22686 reg_umr 5 22686 NULL +SYSC_vmsplice_22697 SYSC_vmsplice 3 22697 NULL ++nr_cpusets_22705 nr_cpusets 0 22705 NULL +alloc_libipw_22708 alloc_libipw 1 22708 NULL +cx18_copy_buf_to_user_22735 cx18_copy_buf_to_user 4-0 22735 NULL +ceph_decode_32_22738 ceph_decode_32 0 22738 NULL nohasharray +__mei_cl_send_22738 __mei_cl_send 3 22738 &ceph_decode_32_22738 -+__writeback_single_inode_22739 __writeback_single_inode 0 22739 NULL +iio_debugfs_write_reg_22742 iio_debugfs_write_reg 3 22742 NULL +qlcnic_sriov_init_22762 qlcnic_sriov_init 2 22762 NULL +print_frame_22769 print_frame 0 22769 NULL +ftrace_arch_read_dyn_info_22773 ftrace_arch_read_dyn_info 0 22773 NULL -+__break_lease_22777 __break_lease 0 22777 NULL +vnic_dev_get_res_count_22791 vnic_dev_get_res_count 0 22791 NULL -+pla_ocp_write_22802 pla_ocp_write 4 22802 NULL +__generic_copy_to_user_intel_22806 __generic_copy_to_user_intel 0-3 22806 NULL +create_attr_set_22861 create_attr_set 1 22861 NULL +hash_ip6_expire_22867 hash_ip6_expire 4 22867 NULL +vmw_execbuf_process_22885 vmw_execbuf_process 5 22885 NULL +usblp_new_writeurb_22894 usblp_new_writeurb 2 22894 NULL +mdc800_device_read_22896 mdc800_device_read 3 22896 NULL -+ion_handle_test_kernel_22900 ion_handle_test_kernel 4-3 22900 NULL nohasharray -+policy_emit_config_values_22900 policy_emit_config_values 3 22900 &ion_handle_test_kernel_22900 ++policy_emit_config_values_22900 policy_emit_config_values 3 22900 NULL nohasharray ++ion_handle_test_kernel_22900 ion_handle_test_kernel 4-3 22900 &policy_emit_config_values_22900 +__set_xattr_22923 __set_xattr 0 22923 NULL +xstateregs_set_22932 xstateregs_set 4 22932 NULL +pcpu_mem_zalloc_22948 pcpu_mem_zalloc 1 22948 NULL @@ -117028,17 +124952,14 @@ index 0000000..386792a +cifs_local_to_utf16_bytes_23025 cifs_local_to_utf16_bytes 0 23025 NULL +st_status_23032 st_status 5 23032 NULL +nv50_disp_chan_create__23056 nv50_disp_chan_create_ 5 23056 NULL -+comedi_buf_write_n_available_23057 comedi_buf_write_n_available 0 23057 NULL -+security_inode_killpriv_23060 security_inode_killpriv 0 23060 NULL -+reiserfs_add_entry_23062 reiserfs_add_entry 4 23062 NULL nohasharray -+unix_seqpacket_recvmsg_23062 unix_seqpacket_recvmsg 4 23062 &reiserfs_add_entry_23062 ++unix_seqpacket_recvmsg_23062 unix_seqpacket_recvmsg 4 23062 NULL nohasharray ++reiserfs_add_entry_23062 reiserfs_add_entry 4 23062 &unix_seqpacket_recvmsg_23062 +mei_cl_send_23068 mei_cl_send 3 23068 NULL +raw_sendmsg_23078 raw_sendmsg 4 23078 NULL +get_user_hdr_len_23079 get_user_hdr_len 0 23079 NULL +isr_tx_procs_read_23084 isr_tx_procs_read 3 23084 NULL +rt2x00debug_write_eeprom_23091 rt2x00debug_write_eeprom 3 23091 NULL +ntfs_ucstonls_23097 ntfs_ucstonls 3-5 23097 NULL -+pipe_iov_copy_from_user_23102 pipe_iov_copy_from_user 3 23102 NULL +dgram_recvmsg_23104 dgram_recvmsg 4 23104 NULL +mwl8k_cmd_set_beacon_23110 mwl8k_cmd_set_beacon 4 23110 NULL +bset_tree_bytes_23111 bset_tree_bytes 0 23111 NULL nohasharray @@ -117059,21 +124980,19 @@ index 0000000..386792a +nv50_ram_create__23241 nv50_ram_create_ 4 23241 NULL +sctp_recvmsg_23265 sctp_recvmsg 4 23265 NULL +uwb_dev_addr_print_23282 uwb_dev_addr_print 2 23282 NULL ++ec_i2c_count_message_23285 ec_i2c_count_message 0-2 23285 NULL +diva_get_trace_filter_23286 diva_get_trace_filter 0 23286 NULL +i2cdev_write_23310 i2cdev_write 3 23310 NULL +__aa_kvmalloc_23320 __aa_kvmalloc 1 23320 NULL +page_readlink_23346 page_readlink 3 23346 NULL +kmem_zalloc_large_23351 kmem_zalloc_large 1 23351 NULL -+get_dst_timing_23358 get_dst_timing 0 23358 NULL nohasharray -+write_inode_23358 write_inode 0 23358 &get_dst_timing_23358 ++get_dst_timing_23358 get_dst_timing 0 23358 NULL +fd_setup_write_same_buf_23369 fd_setup_write_same_buf 3 23369 NULL +iscsi_change_queue_depth_23416 iscsi_change_queue_depth 2 23416 NULL -+vga_mm_r_23419 vga_mm_r 0 23419 NULL +ocfs2_zero_tail_23447 ocfs2_zero_tail 3 23447 NULL +hidraw_send_report_23449 hidraw_send_report 3 23449 NULL +__ata_change_queue_depth_23484 __ata_change_queue_depth 3 23484 NULL -+linear_conf_23485 linear_conf 2 23485 NULL nohasharray -+sync_mapping_buffers_23485 sync_mapping_buffers 0 23485 &linear_conf_23485 ++linear_conf_23485 linear_conf 2 23485 NULL +event_filter_read_23494 event_filter_read 3 23494 NULL +lustre_acl_xattr_merge2ext_23502 lustre_acl_xattr_merge2ext 2 23502 NULL +devm_iio_device_alloc_23511 devm_iio_device_alloc 2 23511 NULL @@ -117093,9 +125012,10 @@ index 0000000..386792a +SyS_connect_23669 SyS_connect 3 23669 NULL +cx18_read_23699 cx18_read 3 23699 NULL +at_get_23708 at_get 0 23708 NULL ++get_conn_info_23723 get_conn_info 4 23723 NULL +rx_rx_dropped_frame_read_23748 rx_rx_dropped_frame_read 3 23748 NULL +__kfifo_max_r_23768 __kfifo_max_r 0-2-1 23768 NULL -+__build_packet_message_23778 __build_packet_message 4-10 23778 NULL ++__build_packet_message_23778 __build_packet_message 10-4 23778 NULL +security_inode_getxattr_23781 security_inode_getxattr 0 23781 NULL +cfg80211_inform_bss_width_frame_23782 cfg80211_inform_bss_width_frame 5 23782 NULL +mpt_free_res_23793 mpt_free_res 5 23793 NULL @@ -117103,16 +125023,14 @@ index 0000000..386792a +rx_path_reset_read_23801 rx_path_reset_read 3 23801 NULL +__earlyonly_bootmem_alloc_23824 __earlyonly_bootmem_alloc 2 23824 NULL +lustre_msg_buflen_23827 lustre_msg_buflen 0 23827 NULL -+ceph_copy_page_vector_to_user_23829 ceph_copy_page_vector_to_user 0-3-4 23829 NULL +pgdat_end_pfn_23842 pgdat_end_pfn 0 23842 NULL +iwl_dbgfs_nvm_read_23845 iwl_dbgfs_nvm_read 3 23845 NULL +p54_init_common_23850 p54_init_common 1 23850 NULL +bin_to_hex_dup_23853 bin_to_hex_dup 2 23853 NULL +ocfs2_xattr_get_clusters_23857 ocfs2_xattr_get_clusters 0 23857 NULL +ieee80211_if_read_dot11MeshMaxPeerLinks_23878 ieee80211_if_read_dot11MeshMaxPeerLinks 3 23878 NULL -+nouveau_clock_create__23881 nouveau_clock_create_ 5 23881 NULL nohasharray -+writeback_single_inode_23881 writeback_single_inode 0 23881 &nouveau_clock_create__23881 +tipc_snprintf_23893 tipc_snprintf 2-0 23893 NULL ++iov_iter_get_pages_alloc_23903 iov_iter_get_pages_alloc 3-0 23903 NULL +add_new_gdb_meta_bg_23911 add_new_gdb_meta_bg 3 23911 NULL nohasharray +ieee80211_if_read_hw_queues_23911 ieee80211_if_read_hw_queues 3 23911 &add_new_gdb_meta_bg_23911 +f2fs_getxattr_23917 f2fs_getxattr 0 23917 NULL @@ -117142,12 +125060,10 @@ index 0000000..386792a +trim_bitmaps_24158 trim_bitmaps 3 24158 NULL +adu_read_24177 adu_read 3 24177 NULL +safe_prepare_write_buffer_24187 safe_prepare_write_buffer 3 24187 NULL -+irq_remapping_setup_msi_irqs_24194 irq_remapping_setup_msi_irqs 2 24194 NULL +ieee80211_if_read_dot11MeshHWMPpreqMinInterval_24208 ieee80211_if_read_dot11MeshHWMPpreqMinInterval 3 24208 NULL -+efx_vf_size_24213 efx_vf_size 0 24213 NULL -+tcpprobe_sprint_24222 tcpprobe_sprint 0-2 24222 NULL -+mei_amthif_read_24224 mei_amthif_read 4 24224 NULL nohasharray -+pcpu_embed_first_chunk_24224 pcpu_embed_first_chunk 3-2-1 24224 &mei_amthif_read_24224 ++tcpprobe_sprint_24222 tcpprobe_sprint 2-0 24222 NULL ++pcpu_embed_first_chunk_24224 pcpu_embed_first_chunk 3-2-1 24224 NULL nohasharray ++mei_amthif_read_24224 mei_amthif_read 4 24224 &pcpu_embed_first_chunk_24224 +pci_num_vf_24235 pci_num_vf 0 24235 NULL +sel_read_bool_24236 sel_read_bool 3 24236 NULL +em28xx_alloc_urbs_24260 em28xx_alloc_urbs 4-6 24260 NULL @@ -117155,23 +125071,18 @@ index 0000000..386792a +thin_status_24278 thin_status 5 24278 NULL +msg_size_24288 msg_size 0 24288 NULL +btmrvl_pscmd_read_24308 btmrvl_pscmd_read 3 24308 NULL -+reserve_metadata_bytes_24313 reserve_metadata_bytes 0 24313 NULL +ath6kl_add_bss_if_needed_24317 ath6kl_add_bss_if_needed 6 24317 NULL +si476x_radio_read_acf_blob_24336 si476x_radio_read_acf_blob 3 24336 NULL +C_SYSC_pwritev_24345 C_SYSC_pwritev 3 24345 NULL -+prepare_pages_24349 prepare_pages 0 24349 NULL +kzalloc_node_24352 kzalloc_node 1 24352 NULL +qla2x00_handle_queue_full_24365 qla2x00_handle_queue_full 2 24365 NULL +cfi_read_pri_24366 cfi_read_pri 3 24366 NULL +btrfs_item_size_nr_24367 btrfs_item_size_nr 0 24367 NULL -+igetword_24373 igetword 0 24373 NULL nohasharray -+break_deleg_24373 break_deleg 0 24373 &igetword_24373 -+max_io_len_24384 max_io_len 0-1 24384 NULL ++igetword_24373 igetword 0 24373 NULL +mpt_alloc_res_24387 mpt_alloc_res 5 24387 NULL +osc_cur_grant_bytes_seq_write_24396 osc_cur_grant_bytes_seq_write 3 24396 NULL +getxattr_24398 getxattr 4 24398 NULL nohasharray +pvr2_v4l2_ioctl_24398 pvr2_v4l2_ioctl 2 24398 &getxattr_24398 -+populate_msi_sysfs_24399 populate_msi_sysfs 0 24399 NULL +blk_update_bidi_request_24415 blk_update_bidi_request 3-4 24415 NULL +nvme_trans_log_supp_pages_24418 nvme_trans_log_supp_pages 3 24418 NULL +b43_debugfs_read_24425 b43_debugfs_read 3 24425 NULL @@ -117179,8 +125090,8 @@ index 0000000..386792a +ieee80211_rx_mgmt_beacon_24430 ieee80211_rx_mgmt_beacon 3 24430 NULL +copy_and_ioctl_24434 copy_and_ioctl 4 24434 NULL +ixgbe_alloc_q_vector_24439 ixgbe_alloc_q_vector 4-6 24439 NULL -+rtw_set_wps_assoc_resp_24440 rtw_set_wps_assoc_resp 3 24440 NULL nohasharray -+smk_user_access_24440 smk_user_access 3 24440 &rtw_set_wps_assoc_resp_24440 ++smk_user_access_24440 smk_user_access 3 24440 NULL nohasharray ++rtw_set_wps_assoc_resp_24440 rtw_set_wps_assoc_resp 3 24440 &smk_user_access_24440 +evdev_do_ioctl_24459 evdev_do_ioctl 2 24459 NULL +lbs_highsnr_write_24460 lbs_highsnr_write 3 24460 NULL +skb_copy_and_csum_datagram_iovec_24466 skb_copy_and_csum_datagram_iovec 2 24466 NULL @@ -117198,7 +125109,6 @@ index 0000000..386792a +SyS_poll_24620 SyS_poll 2 24620 NULL +context_alloc_24645 context_alloc 3 24645 NULL +blk_rq_err_bytes_24650 blk_rq_err_bytes 0 24650 NULL -+btrfs_check_data_free_space_24692 btrfs_check_data_free_space 0 24692 NULL +datafab_write_data_24696 datafab_write_data 4 24696 NULL +intelfbhw_get_p1p2_24703 intelfbhw_get_p1p2 2 24703 NULL +simple_attr_read_24738 simple_attr_read 3 24738 NULL @@ -117216,12 +125126,12 @@ index 0000000..386792a +pnp_alloc_24869 pnp_alloc 1 24869 NULL nohasharray +l2cap_create_basic_pdu_24869 l2cap_create_basic_pdu 3 24869 &pnp_alloc_24869 +queues_read_24877 queues_read 3 24877 NULL ++iov_iter_npages_bvec_24905 iov_iter_npages_bvec 0-2 24905 NULL +codec_list_read_file_24910 codec_list_read_file 3 24910 NULL -+v4l2_ctrl_new_24927 v4l2_ctrl_new 7 24927 NULL nohasharray -+__btrfs_free_extent_24927 __btrfs_free_extent 7 24927 &v4l2_ctrl_new_24927 ++xpcs_reg_value_write_24922 xpcs_reg_value_write 3 24922 NULL ++v4l2_ctrl_new_24927 v4l2_ctrl_new 7 24927 NULL +ocfs2_fiemap_24949 ocfs2_fiemap 3-4 24949 NULL +packet_sendmsg_24954 packet_sendmsg 4 24954 NULL -+security_inode_rename_24971 security_inode_rename 0 24971 NULL +twl_i2c_write_u8_24976 twl_i2c_write_u8 3 24976 NULL +llc_ui_sendmsg_24987 llc_ui_sendmsg 4 24987 NULL +key_conf_hw_key_idx_read_25003 key_conf_hw_key_idx_read 3 25003 NULL @@ -117235,9 +125145,9 @@ index 0000000..386792a +ima_appraise_measurement_25093 ima_appraise_measurement 6 25093 NULL +snd_rawmidi_kernel_write_25106 snd_rawmidi_kernel_write 3 25106 NULL +ipath_init_qp_table_25167 ipath_init_qp_table 2 25167 NULL -+_iwl_dbgfs_reduced_txp_write_25169 _iwl_dbgfs_reduced_txp_write 3 25169 NULL nohasharray -+kvm_mmu_notifier_change_pte_25169 kvm_mmu_notifier_change_pte 3 25169 &_iwl_dbgfs_reduced_txp_write_25169 ++kvm_mmu_notifier_change_pte_25169 kvm_mmu_notifier_change_pte 3 25169 NULL +sctp_getsockopt_local_addrs_25178 sctp_getsockopt_local_addrs 2 25178 NULL ++security_socket_post_create_25221 security_socket_post_create 0 25221 NULL +mon_stat_read_25238 mon_stat_read 3 25238 NULL +stripe_status_25259 stripe_status 5 25259 NULL +snd_pcm_start_25273 snd_pcm_start 0 25273 NULL @@ -117246,27 +125156,27 @@ index 0000000..386792a +l2tp_session_create_25286 l2tp_session_create 1 25286 NULL +ath9k_debugfs_read_buf_25316 ath9k_debugfs_read_buf 3 25316 NULL +rng_buffer_size_25348 rng_buffer_size 0 25348 NULL -+SYSC_kexec_load_25361 SYSC_kexec_load 2 25361 NULL +unix_mkname_25368 unix_mkname 0-2 25368 NULL +sel_read_mls_25369 sel_read_mls 3 25369 NULL +vsp1_entity_init_25407 vsp1_entity_init 3 25407 NULL ++mcp795_rtcc_read_25415 mcp795_rtcc_read 4 25415 NULL +dai_list_read_file_25421 dai_list_read_file 3 25421 NULL -+ipath_decode_err_25468 ipath_decode_err 3 25468 NULL +crypto_hash_digestsize_25469 crypto_hash_digestsize 0 25469 NULL +ivtv_buf_copy_from_user_25502 ivtv_buf_copy_from_user 4-0 25502 NULL +snd_pcm_plugin_build_25505 snd_pcm_plugin_build 5 25505 NULL ++mxt_obj_size_25510 mxt_obj_size 0 25510 NULL +sb_permission_25523 sb_permission 0 25523 NULL +ext3_get_inode_loc_25542 ext3_get_inode_loc 0 25542 NULL +ieee80211_if_read_path_refresh_time_25545 ieee80211_if_read_path_refresh_time 3 25545 NULL +wimax_addr_scnprint_25548 wimax_addr_scnprint 2 25548 NULL -+ht_print_chan_25556 ht_print_chan 0-3-4 25556 NULL ++ht_print_chan_25556 ht_print_chan 3-4-0 25556 NULL +skb_tailroom_25567 skb_tailroom 0 25567 NULL +ping_recvmsg_25597 ping_recvmsg 4 25597 NULL +copy_user_generic_25611 copy_user_generic 0 25611 NULL +proc_coredump_filter_write_25625 proc_coredump_filter_write 3 25625 NULL +befs_utf2nls_25628 befs_utf2nls 3 25628 NULL nohasharray +__get_user_pages_25628 __get_user_pages 0 25628 &befs_utf2nls_25628 -+__direct_map_25647 __direct_map 5-6 25647 NULL ++__direct_map_25647 __direct_map 6-5 25647 NULL +aircable_prepare_write_buffer_25669 aircable_prepare_write_buffer 3 25669 NULL +lpfc_idiag_cmd_get_25672 lpfc_idiag_cmd_get 2 25672 NULL +sta_inactive_ms_read_25690 sta_inactive_ms_read 3 25690 NULL @@ -117275,6 +125185,7 @@ index 0000000..386792a +ibmasm_new_command_25714 ibmasm_new_command 2 25714 NULL +__alloc_bootmem_low_node_25726 __alloc_bootmem_low_node 2 25726 NULL nohasharray +sel_write_context_25726 sel_write_context 3 25726 &__alloc_bootmem_low_node_25726 ++xgbe_common_read_25743 xgbe_common_read 2 25743 NULL +cxgbi_device_portmap_create_25747 cxgbi_device_portmap_create 3 25747 NULL +event_rx_pool_read_25792 event_rx_pool_read 3 25792 NULL +sg_read_25799 sg_read 3 25799 NULL @@ -117304,7 +125215,6 @@ index 0000000..386792a +keyctl_update_key_26061 keyctl_update_key 3 26061 NULL +pri_wm_latency_write_26063 pri_wm_latency_write 3 26063 NULL +rx_rx_wa_density_dropped_frame_read_26095 rx_rx_wa_density_dropped_frame_read 3 26095 NULL -+i8042_pnp_id_to_string_26108 i8042_pnp_id_to_string 3 26108 NULL +read_sb_page_26119 read_sb_page 5 26119 NULL +ath9k_hw_name_26146 ath9k_hw_name 3 26146 NULL +copy_oldmem_page_26164 copy_oldmem_page 3 26164 NULL @@ -117317,7 +125227,6 @@ index 0000000..386792a +mwifiex_regrdwr_write_26225 mwifiex_regrdwr_write 3 26225 NULL +_scsih_change_queue_depth_26230 _scsih_change_queue_depth 2 26230 NULL +rxrpc_recvmsg_26233 rxrpc_recvmsg 4 26233 NULL -+simple_setattr_26234 simple_setattr 0 26234 NULL +genwqe_ffdc_buff_size_26263 genwqe_ffdc_buff_size 0 26263 NULL +crypto_ctxsize_26278 crypto_ctxsize 0 26278 NULL +wacom_set_device_mode_26280 wacom_set_device_mode 3 26280 NULL @@ -117330,13 +125239,11 @@ index 0000000..386792a +invalidate_inode_pages2_range_26403 invalidate_inode_pages2_range 0 26403 NULL +ntty_write_26404 ntty_write 3 26404 NULL +firmware_store_26408 firmware_store 4 26408 NULL -+pagemap_read_26441 pagemap_read 3 26441 NULL -+enc_pools_add_pages_26461 enc_pools_add_pages 1 26461 NULL nohasharray -+tower_read_26461 tower_read 3 26461 &enc_pools_add_pages_26461 ++tower_read_26461 tower_read 3 26461 NULL nohasharray ++enc_pools_add_pages_26461 enc_pools_add_pages 1 26461 &tower_read_26461 +ib_alloc_device_26483 ib_alloc_device 1 26483 NULL +ulong_write_file_26485 ulong_write_file 3 26485 NULL +dvb_ca_en50221_io_ioctl_26490 dvb_ca_en50221_io_ioctl 2 26490 NULL -+read_vmcore_26501 read_vmcore 3 26501 NULL +uhid_char_write_26502 uhid_char_write 3 26502 NULL +vfio_pci_set_msi_trigger_26507 vfio_pci_set_msi_trigger 4-3 26507 NULL +iwl_dbgfs_rf_reset_read_26512 iwl_dbgfs_rf_reset_read 3 26512 NULL @@ -117345,14 +125252,12 @@ index 0000000..386792a +__vhost_add_used_n_26554 __vhost_add_used_n 3 26554 NULL +dio_new_bio_26562 dio_new_bio 0 26562 NULL +rts51x_read_mem_26577 rts51x_read_mem 4 26577 NULL -+kernfs_name_locked_26617 kernfs_name_locked 3 26617 NULL +pwr_fix_tsf_ps_read_26627 pwr_fix_tsf_ps_read 3 26627 NULL -+irq_alloc_generic_chip_26650 irq_alloc_generic_chip 2 26650 NULL nohasharray -+inb_p_26650 inb_p 0 26650 &irq_alloc_generic_chip_26650 ++amdtp_stream_get_max_payload_26645 amdtp_stream_get_max_payload 0 26645 NULL ++irq_alloc_generic_chip_26650 irq_alloc_generic_chip 2 26650 NULL +nouveau_volt_create__26654 nouveau_volt_create_ 4 26654 NULL +cipso_v4_map_cat_rbm_hton_26680 cipso_v4_map_cat_rbm_hton 0 26680 NULL +flowinfo_read_26683 flowinfo_read 3 26683 NULL -+sysfs_add_file_26716 sysfs_add_file 0 26716 NULL +nouveau_namedb_create__26732 nouveau_namedb_create_ 7 26732 NULL +pipeline_tcp_rx_stat_fifo_int_read_26745 pipeline_tcp_rx_stat_fifo_int_read 3 26745 NULL +snd_hda_get_raw_connections_26762 snd_hda_get_raw_connections 0 26762 NULL @@ -117375,28 +125280,28 @@ index 0000000..386792a +sctp_setsockopt_adaptation_layer_26935 sctp_setsockopt_adaptation_layer 3 26935 NULL nohasharray +pwr_ps_enter_read_26935 pwr_ps_enter_read 3 26935 &sctp_setsockopt_adaptation_layer_26935 +hecubafb_write_26942 hecubafb_write 3 26942 NULL -+extract_entropy_user_26952 extract_entropy_user 3 26952 NULL nohasharray -+do_trimming_26952 do_trimming 3 26952 &extract_entropy_user_26952 ++do_trimming_26952 do_trimming 3 26952 NULL nohasharray ++extract_entropy_user_26952 extract_entropy_user 3 26952 &do_trimming_26952 +do_direct_IO_26979 do_direct_IO 0 26979 NULL ++sc16is7xx_port_read_27051 sc16is7xx_port_read 0 27051 NULL +__videobuf_alloc_vb_27062 __videobuf_alloc_vb 1 27062 NULL -+ext4_convert_unwritten_extents_27064 ext4_convert_unwritten_extents 4-3-0 27064 NULL ++ext4_convert_unwritten_extents_27064 ext4_convert_unwritten_extents 4-3 27064 NULL +snd_pcm_lib_period_bytes_27071 snd_pcm_lib_period_bytes 0 27071 NULL +paravirt_read_msr_27077 paravirt_read_msr 0 27077 NULL +alloc_fdmem_27083 alloc_fdmem 1 27083 NULL +btmrvl_hscmd_write_27089 btmrvl_hscmd_write 3 27089 NULL nohasharray +ath9k_hw_4k_dump_eeprom_27089 ath9k_hw_4k_dump_eeprom 5-4 27089 &btmrvl_hscmd_write_27089 +__devcgroup_inode_permission_27108 __devcgroup_inode_permission 0 27108 NULL -+get_kernel_page_27133 get_kernel_page 0 27133 NULL +drbd_get_capacity_27141 drbd_get_capacity 0 27141 NULL +pms_capture_27142 pms_capture 4 27142 NULL +btmrvl_hscfgcmd_write_27143 btmrvl_hscfgcmd_write 3 27143 NULL +snd_compr_calc_avail_27165 snd_compr_calc_avail 0 27165 NULL +ieee80211_if_read_rc_rateidx_mask_5ghz_27183 ieee80211_if_read_rc_rateidx_mask_5ghz 3 27183 NULL -+write_kmem_27225 write_kmem 3 27225 NULL +dbAllocAG_27228 dbAllocAG 0 27228 NULL +rxrpc_request_key_27235 rxrpc_request_key 3 27235 NULL +ll_track_gid_seq_write_27267 ll_track_gid_seq_write 3 27267 NULL +comedi_alloc_devpriv_27272 comedi_alloc_devpriv 2 27272 NULL ++get_rx_fifo_content_27283 get_rx_fifo_content 0 27283 NULL +copy_from_buf_27308 copy_from_buf 4-2 27308 NULL +virtqueue_add_inbuf_27312 virtqueue_add_inbuf 3 27312 NULL +snd_pcm_oss_write2_27332 snd_pcm_oss_write2 3-0 27332 NULL @@ -117420,10 +125325,9 @@ index 0000000..386792a +sco_sock_recvmsg_27572 sco_sock_recvmsg 4 27572 NULL +libipw_alloc_txb_27579 libipw_alloc_txb 1 27579 NULL +C_SYSC_mbind_27636 C_SYSC_mbind 5 27636 NULL -+ocfs2_xattr_ibody_get_27642 ocfs2_xattr_ibody_get 0 27642 NULL nohasharray -+read_flush_procfs_27642 read_flush_procfs 3 27642 &ocfs2_xattr_ibody_get_27642 nohasharray ++read_flush_procfs_27642 read_flush_procfs 3 27642 NULL nohasharray +nl80211_send_connect_result_27642 nl80211_send_connect_result 5-7 27642 &read_flush_procfs_27642 nohasharray -+ocfs2_direct_IO_27642 ocfs2_direct_IO 4 27642 &nl80211_send_connect_result_27642 ++ocfs2_xattr_ibody_get_27642 ocfs2_xattr_ibody_get 0 27642 &nl80211_send_connect_result_27642 +add_new_gdb_27643 add_new_gdb 3 27643 NULL +btrfs_fallocate_27647 btrfs_fallocate 3-4 27647 NULL +qnx6_readpages_27657 qnx6_readpages 4 27657 NULL @@ -117440,27 +125344,21 @@ index 0000000..386792a +SyS_readv_27804 SyS_readv 3 27804 NULL +mpihelp_mul_27805 mpihelp_mul 5-3 27805 NULL +hpt374_read_freq_27828 hpt374_read_freq 0 27828 NULL -+init_header_complete_27833 init_header_complete 0 27833 NULL +read_profile_27859 read_profile 3 27859 NULL +sky2_pci_read16_27863 sky2_pci_read16 0 27863 NULL +ieee80211_if_read_dot11MeshHWMProotInterval_27873 ieee80211_if_read_dot11MeshHWMProotInterval 3 27873 NULL +unix_seqpacket_sendmsg_27893 unix_seqpacket_sendmsg 4 27893 NULL +i915_error_object_create_sized_27919 i915_error_object_create_sized 4 27919 NULL -+check_mapped_name_27943 check_mapped_name 3 27943 NULL +tracing_clock_write_27961 tracing_clock_write 3 27961 NULL nohasharray +bio_next_split_27961 bio_next_split 2 27961 &tracing_clock_write_27961 -+security_path_chown_27966 security_path_chown 0 27966 NULL +tipc_media_addr_printf_27971 tipc_media_addr_printf 2 27971 NULL -+mic_rx_pkts_read_27972 mic_rx_pkts_read 3 27972 NULL nohasharray -+device_register_27972 device_register 0 27972 &mic_rx_pkts_read_27972 ++mic_rx_pkts_read_27972 mic_rx_pkts_read 3 27972 NULL +compat_SyS_set_mempolicy_27975 compat_SyS_set_mempolicy 3 27975 NULL -+pci_enable_device_flags_27977 pci_enable_device_flags 0 27977 NULL +edt_ft5x06_debugfs_raw_data_read_28002 edt_ft5x06_debugfs_raw_data_read 3 28002 NULL +seq_get_buf_28006 seq_get_buf 0 28006 NULL +snd_rawmidi_write_28008 snd_rawmidi_write 3 28008 NULL +powercap_register_zone_28028 powercap_register_zone 6 28028 NULL +sctp_setsockopt_maxburst_28041 sctp_setsockopt_maxburst 3 28041 NULL -+rts51x_xd_rw_28046 rts51x_xd_rw 3-4 28046 NULL +cx231xx_init_vbi_isoc_28053 cx231xx_init_vbi_isoc 3-2-4 28053 NULL +pool_status_28055 pool_status 5 28055 NULL +init_rs_non_canonical_28059 init_rs_non_canonical 1 28059 NULL @@ -117469,18 +125367,18 @@ index 0000000..386792a +mmc_test_alloc_mem_28102 mmc_test_alloc_mem 3-2 28102 NULL +rx_defrag_need_defrag_read_28117 rx_defrag_need_defrag_read 3 28117 NULL +vgacon_adjust_height_28124 vgacon_adjust_height 2 28124 NULL ++m25p80_read_reg_28132 m25p80_read_reg 4 28132 NULL +video_read_28148 video_read 3 28148 NULL +snd_midi_channel_alloc_set_28153 snd_midi_channel_alloc_set 1 28153 NULL +stats_dot11FCSErrorCount_read_28154 stats_dot11FCSErrorCount_read 3 28154 NULL -+vread_28173 vread 0-3 28173 NULL +macvtap_get_user_28185 macvtap_get_user 4 28185 NULL +counter_free_res_28187 counter_free_res 5 28187 NULL +read_disk_sb_28188 read_disk_sb 2 28188 NULL ++nvkm_output_dp_create__28192 nvkm_output_dp_create_ 6 28192 NULL +nouveau_mxm_create__28200 nouveau_mxm_create_ 4 28200 NULL +__qp_memcpy_from_queue_28220 __qp_memcpy_from_queue 3-4 28220 NULL +line6_alloc_sysex_buffer_28225 line6_alloc_sysex_buffer 4 28225 NULL +amd_nb_num_28228 amd_nb_num 0 28228 NULL -+fuse_direct_IO_28275 fuse_direct_IO 4 28275 NULL +usemap_size_28281 usemap_size 0 28281 NULL +inline_xattr_size_28285 inline_xattr_size 0 28285 NULL +dma_map_sg_attrs_28289 dma_map_sg_attrs 0 28289 NULL @@ -117488,11 +125386,9 @@ index 0000000..386792a +kstrtos16_from_user_28300 kstrtos16_from_user 2 28300 NULL +nouveau_compat_ioctl_28305 nouveau_compat_ioctl 2 28305 NULL +snd_pcm_oss_read_28317 snd_pcm_oss_read 3 28317 NULL -+security_inode_link_28327 security_inode_link 0 28327 NULL -+generic_write_checks_28329 generic_write_checks 0 28329 NULL ++xpcs_mmd_read_28331 xpcs_mmd_read 3 28331 NULL +bm_entry_write_28338 bm_entry_write 3 28338 NULL +tcp_copy_to_iovec_28344 tcp_copy_to_iovec 3 28344 NULL -+snapshot_write_28351 snapshot_write 3 28351 NULL +xfs_iomap_write_unwritten_28365 xfs_iomap_write_unwritten 3-2 28365 NULL +batadv_handle_tt_response_28370 batadv_handle_tt_response 4 28370 NULL +dlmfs_file_read_28385 dlmfs_file_read 3 28385 NULL @@ -117505,24 +125401,22 @@ index 0000000..386792a +key_mic_failures_read_28457 key_mic_failures_read 3 28457 NULL +alloc_irq_cpu_rmap_28459 alloc_irq_cpu_rmap 1 28459 NULL +ps_poll_upsd_utilization_read_28519 ps_poll_upsd_utilization_read 3 28519 NULL -+i2400m_tx_stats_read_28527 i2400m_tx_stats_read 3 28527 NULL ++sh_irda_init_iobuf_28527 sh_irda_init_iobuf 2 28527 NULL nohasharray ++i2400m_tx_stats_read_28527 i2400m_tx_stats_read 3 28527 &sh_irda_init_iobuf_28527 +early_init_dt_alloc_memory_arch_28528 early_init_dt_alloc_memory_arch 1 28528 NULL +sel_read_policycap_28544 sel_read_policycap 3 28544 NULL +mptctl_getiocinfo_28545 mptctl_getiocinfo 2 28545 NULL nohasharray -+aio_read_events_28545 aio_read_events 3 28545 &mptctl_getiocinfo_28545 nohasharray -+run_delalloc_range_28545 run_delalloc_range 3-4 28545 &aio_read_events_28545 -+sysfs_create_bin_file_28551 sysfs_create_bin_file 0 28551 NULL ++run_delalloc_range_28545 run_delalloc_range 3-4 28545 &mptctl_getiocinfo_28545 nohasharray ++aio_read_events_28545 aio_read_events 3 28545 &run_delalloc_range_28545 +b43legacy_debugfs_write_28556 b43legacy_debugfs_write 3 28556 NULL +asymmetric_verify_28567 asymmetric_verify 3 28567 NULL +oxygen_read32_28582 oxygen_read32 0 28582 NULL -+task_cgroup_path_28599 task_cgroup_path 3 28599 NULL +extract_entropy_28604 extract_entropy 5-3 28604 NULL ++xgbe_common_write_28609 xgbe_common_write 2 28609 NULL +kfifo_unused_28612 kfifo_unused 0 28612 NULL +snd_nm256_capture_copy_28622 snd_nm256_capture_copy 3-5 28622 NULL +setup_usemap_28636 setup_usemap 3-4 28636 NULL -+qib_handle_6120_hwerrors_28642 qib_handle_6120_hwerrors 3 28642 NULL +p9_fcall_alloc_28652 p9_fcall_alloc 1 28652 NULL -+read_nic_io_byte_28654 read_nic_io_byte 0 28654 NULL +blk_queue_resize_tags_28670 blk_queue_resize_tags 2 28670 NULL +SyS_setgroups16_28686 SyS_setgroups16 1 28686 NULL +kvm_mmu_get_page_28692 kvm_mmu_get_page 2 28692 NULL @@ -117538,7 +125432,6 @@ index 0000000..386792a +kernel_tree_alloc_28833 kernel_tree_alloc 1 28833 NULL +vp_request_msix_vectors_28849 vp_request_msix_vectors 2 28849 NULL +ipv6_renew_options_28867 ipv6_renew_options 5 28867 NULL -+max_io_len_target_boundary_28879 max_io_len_target_boundary 0-1 28879 NULL +packet_sendmsg_spkt_28885 packet_sendmsg_spkt 4 28885 NULL +da9055_group_write_28904 da9055_group_write 2-3 28904 NULL +ps_upsd_timeouts_read_28924 ps_upsd_timeouts_read 3 28924 NULL @@ -117580,6 +125473,7 @@ index 0000000..386792a +__fuse_get_req_29315 __fuse_get_req 2 29315 NULL +lprocfs_write_helper_29323 lprocfs_write_helper 2 29323 NULL +kvm_handle_hva_29326 kvm_handle_hva 2 29326 NULL ++obd_proc_jobid_name_seq_write_29332 obd_proc_jobid_name_seq_write 3 29332 NULL +tun_put_user_29337 tun_put_user 5 29337 NULL +__alloc_ei_netdev_29338 __alloc_ei_netdev 1 29338 NULL +l2cap_sock_setsockopt_old_29346 l2cap_sock_setsockopt_old 4 29346 NULL @@ -117593,17 +125487,14 @@ index 0000000..386792a +simple_strtoul_29480 simple_strtoul 0 29480 NULL +btmrvl_pscmd_write_29504 btmrvl_pscmd_write 3 29504 NULL +btrfs_file_extent_disk_bytenr_29505 btrfs_file_extent_disk_bytenr 0 29505 NULL -+i2c_add_adapter_29507 i2c_add_adapter 0 29507 NULL +usnic_vnic_spec_dump_29508 usnic_vnic_spec_dump 2 29508 NULL +write_file_regidx_29517 write_file_regidx 3 29517 NULL +atk_debugfs_ggrp_read_29522 atk_debugfs_ggrp_read 3 29522 NULL -+pci_enable_msix_29524 pci_enable_msix 0 29524 NULL +ftrace_write_29551 ftrace_write 3 29551 NULL +idetape_queue_rw_tail_29562 idetape_queue_rw_tail 3 29562 NULL +leaf_dealloc_29566 leaf_dealloc 3 29566 NULL +kvm_read_guest_virt_system_29569 kvm_read_guest_virt_system 4-2 29569 NULL +lbs_lowsnr_read_29571 lbs_lowsnr_read 3 29571 NULL -+security_path_chmod_29578 security_path_chmod 0 29578 NULL +iwl_dbgfs_missed_beacon_write_29586 iwl_dbgfs_missed_beacon_write 3 29586 NULL +pvr2_hdw_report_unlocked_29589 pvr2_hdw_report_unlocked 4-0 29589 NULL +dio_set_defer_completion_29599 dio_set_defer_completion 0 29599 NULL @@ -117620,65 +125511,51 @@ index 0000000..386792a +read_cis_cache_29735 read_cis_cache 4 29735 NULL +xfs_new_eof_29737 xfs_new_eof 2 29737 NULL +std_nic_write_29752 std_nic_write 3 29752 NULL -+tg3_irq_count_29786 tg3_irq_count 0 29786 NULL ++static_key_count_29771 static_key_count 0 29771 NULL +dbAlloc_29794 dbAlloc 0 29794 NULL +tcp_sendpage_29829 tcp_sendpage 4 29829 NULL +__probe_kernel_write_29842 __probe_kernel_write 3 29842 NULL +kvm_read_hva_atomic_29848 kvm_read_hva_atomic 3 29848 NULL -+count_partial_29850 count_partial 0 29850 NULL +write_file_bool_bmps_29870 write_file_bool_bmps 3 29870 NULL +ipv6_setsockopt_29871 ipv6_setsockopt 5 29871 NULL -+scsi_end_request_29876 scsi_end_request 3 29876 NULL +crypto_aead_alignmask_29885 crypto_aead_alignmask 0 29885 NULL +rtw_cfg80211_indicate_sta_assoc_29897 rtw_cfg80211_indicate_sta_assoc 3 29897 NULL +lov_ost_pool_extend_29914 lov_ost_pool_extend 2 29914 NULL +write_file_queue_29922 write_file_queue 3 29922 NULL +__btrfs_getxattr_29947 __btrfs_getxattr 0 29947 NULL nohasharray +ipv6_recv_error_29947 ipv6_recv_error 3 29947 &__btrfs_getxattr_29947 -+arch_setup_dmar_msi_29992 arch_setup_dmar_msi 0 29992 NULL +dev_mem_write_30028 dev_mem_write 3 30028 NULL +alloc_netdev_mqs_30030 alloc_netdev_mqs 1 30030 NULL -+sysfs_add_file_mode_ns_30038 sysfs_add_file_mode_ns 0 30038 NULL +scsi_vpd_inquiry_30040 scsi_vpd_inquiry 0-4 30040 NULL +drp_wmove_30043 drp_wmove 4 30043 NULL -+__pci_request_selected_regions_30058 __pci_request_selected_regions 0 30058 NULL +cxgbi_ddp_reserve_30091 cxgbi_ddp_reserve 4 30091 NULL +snd_midi_channel_init_set_30092 snd_midi_channel_init_set 1 30092 NULL +rx_filter_data_filter_read_30098 rx_filter_data_filter_read 3 30098 NULL -+defragment_dma_buffer_30113 defragment_dma_buffer 0 30113 NULL +spi_async_locked_30117 spi_async_locked 0 30117 NULL +u_memcpya_30139 u_memcpya 3-2 30139 NULL +dbg_port_buf_30145 dbg_port_buf 2 30145 NULL -+elfcorehdr_read_30159 elfcorehdr_read 2 30159 NULL +alloc_switch_ctx_30165 alloc_switch_ctx 2 30165 NULL +expand_inode_data_30169 expand_inode_data 3-2 30169 NULL +mempool_create_page_pool_30189 mempool_create_page_pool 1 30189 NULL +drm_property_create_bitmask_30195 drm_property_create_bitmask 5 30195 NULL +__genwqe_readq_30197 __genwqe_readq 0 30197 NULL -+snd_pcm_playback_forward_30201 snd_pcm_playback_forward 0-2 30201 NULL +usblp_ioctl_30203 usblp_ioctl 2 30203 NULL -+read_4k_modal_eeprom_30212 read_4k_modal_eeprom 3 30212 NULL -+SyS_semop_30227 SyS_semop 3 30227 NULL +bitmap_file_set_bit_30228 bitmap_file_set_bit 2 30228 NULL +rawv6_recvmsg_30265 rawv6_recvmsg 4 30265 NULL -+isr_pci_pm_read_30271 isr_pci_pm_read 3 30271 NULL nohasharray -+try_break_deleg_30271 try_break_deleg 0 30271 &isr_pci_pm_read_30271 ++isr_pci_pm_read_30271 isr_pci_pm_read 3 30271 NULL +compat_readv_30273 compat_readv 3 30273 NULL +skcipher_sendmsg_30290 skcipher_sendmsg 4 30290 NULL +pipeline_sec_frag_swi_read_30294 pipeline_sec_frag_swi_read 3 30294 NULL +tcp_sendmsg_30296 tcp_sendmsg 4 30296 NULL +osc_contention_seconds_seq_write_30305 osc_contention_seconds_seq_write 3 30305 NULL +ext4_acl_from_disk_30320 ext4_acl_from_disk 2 30320 NULL -+i8254_read_30330 i8254_read 0 30330 NULL +resource_from_user_30341 resource_from_user 3 30341 NULL +o2nm_this_node_30342 o2nm_this_node 0 30342 NULL +kstrtou32_from_user_30361 kstrtou32_from_user 2 30361 NULL -+pagecache_write_begin_30364 pagecache_write_begin 0 30364 NULL +pvscsi_change_queue_depth_30365 pvscsi_change_queue_depth 2 30365 NULL +C_SYSC_readv_30369 C_SYSC_readv 3 30369 NULL +blkdev_issue_zeroout_30392 blkdev_issue_zeroout 3 30392 NULL +c4iw_init_resource_30393 c4iw_init_resource 2-3 30393 NULL -+get_kernel_pages_30397 get_kernel_pages 0 30397 NULL +vb2_fop_write_30420 vb2_fop_write 3 30420 NULL +tx_tx_template_prepared_read_30424 tx_tx_template_prepared_read 3 30424 NULL +lstcon_session_info_30425 lstcon_session_info 6 30425 NULL @@ -117686,15 +125563,12 @@ index 0000000..386792a +tx_tx_template_programmed_read_30461 tx_tx_template_programmed_read 3 30461 NULL +urandom_read_30462 urandom_read 3 30462 NULL +zoran_ioctl_30465 zoran_ioctl 2 30465 NULL -+i2c_ctrl_read_30467 i2c_ctrl_read 0 30467 NULL +adu_write_30487 adu_write 3 30487 NULL +dtim_interval_write_30489 dtim_interval_write 3 30489 NULL +batadv_send_tt_request_30493 batadv_send_tt_request 5 30493 NULL -+__send_duplicate_bios_30498 __send_duplicate_bios 4 30498 NULL +memblock_virt_alloc_node_30515 memblock_virt_alloc_node 1 30515 NULL +dwc3_testmode_write_30516 dwc3_testmode_write 3 30516 NULL +debug_debug2_read_30526 debug_debug2_read 3 30526 NULL -+ixgbevf_acquire_msix_vectors_30559 ixgbevf_acquire_msix_vectors 2 30559 NULL +disk_expand_part_tbl_30561 disk_expand_part_tbl 2 30561 NULL +set_le_30581 set_le 4 30581 NULL +blk_init_tags_30592 blk_init_tags 1 30592 NULL @@ -117705,13 +125579,14 @@ index 0000000..386792a +mlx5_ib_alloc_fast_reg_page_list_30638 mlx5_ib_alloc_fast_reg_page_list 2 30638 NULL +SyS_listxattr_30647 SyS_listxattr 3 30647 NULL +jffs2_flash_read_30667 jffs2_flash_read 0 30667 NULL -+ni_ai_fifo_read_30681 ni_ai_fifo_read 3 30681 NULL +sst_hsw_get_dsp_position_30691 sst_hsw_get_dsp_position 0 30691 NULL ++get_pages_alloc_iovec_30699 get_pages_alloc_iovec 3-0 30699 NULL +dccp_setsockopt_ccid_30701 dccp_setsockopt_ccid 4 30701 NULL +lbs_wrbbp_write_30712 lbs_wrbbp_write 3 30712 NULL +lbs_debugfs_read_30721 lbs_debugfs_read 3 30721 NULL +snd_nm256_playback_silence_30727 snd_nm256_playback_silence 3-4 30727 NULL +snapshot_status_30744 snapshot_status 5 30744 NULL ++fuse_direct_IO_30753 fuse_direct_IO 4 30753 NULL +fuse_conn_limit_write_30777 fuse_conn_limit_write 3 30777 NULL +__bio_alloc_30787 __bio_alloc 3 30787 NULL +smk_read_doi_30813 smk_read_doi 3 30813 NULL @@ -117730,20 +125605,17 @@ index 0000000..386792a +lbs_host_sleep_read_31013 lbs_host_sleep_read 3 31013 NULL +ima_eventsig_init_31022 ima_eventsig_init 5 31022 NULL +template_fmt_size_31033 template_fmt_size 0 31033 NULL -+do_setup_msi_irqs_31043 do_setup_msi_irqs 2 31043 NULL +stride_pg_count_31053 stride_pg_count 0-3-2-1-4-5 31053 NULL +lbs_failcount_read_31063 lbs_failcount_read 3 31063 NULL +sctp_setsockopt_context_31091 sctp_setsockopt_context 3 31091 NULL +proc_gid_map_write_31093 proc_gid_map_write 3 31093 NULL +depth_read_31112 depth_read 3 31112 NULL +hash_ipportnet6_expire_31118 hash_ipportnet6_expire 4 31118 NULL -+kimage_normal_alloc_31140 kimage_normal_alloc 3 31140 NULL +size_inside_page_31141 size_inside_page 0 31141 NULL +w9966_v4l_read_31148 w9966_v4l_read 3 31148 NULL +ch_do_scsi_31171 ch_do_scsi 4 31171 NULL +r592_read_fifo_pio_31198 r592_read_fifo_pio 3 31198 NULL +mtdchar_readoob_31200 mtdchar_readoob 4 31200 NULL -+__btrfs_free_reserved_extent_31207 __btrfs_free_reserved_extent 2 31207 NULL +cpumask_weight_31215 cpumask_weight 0 31215 NULL +__read_reg_31216 __read_reg 0 31216 NULL +atm_get_addr_31221 atm_get_addr 3 31221 NULL @@ -117755,7 +125627,6 @@ index 0000000..386792a +uvc_simplify_fraction_31303 uvc_simplify_fraction 3 31303 NULL +sisusbcon_scroll_31315 sisusbcon_scroll 5-2-3 31315 NULL +command_file_write_31318 command_file_write 3 31318 NULL -+hwerr_crcbits_31334 hwerr_crcbits 4 31334 NULL +_regmap_raw_multi_reg_write_31336 _regmap_raw_multi_reg_write 3 31336 NULL +em28xx_init_usb_xfer_31337 em28xx_init_usb_xfer 4-6 31337 NULL +outlen_write_31358 outlen_write 3 31358 NULL @@ -117782,8 +125653,8 @@ index 0000000..386792a +osst_write_31581 osst_write 3 31581 NULL +snd_compr_get_avail_31584 snd_compr_get_avail 0 31584 NULL +iwl_dbgfs_ucode_tx_stats_read_31611 iwl_dbgfs_ucode_tx_stats_read 3 31611 NULL -+arvo_sysfs_read_31617 arvo_sysfs_read 6 31617 NULL nohasharray -+memblock_virt_alloc_nopanic_31617 memblock_virt_alloc_nopanic 1 31617 &arvo_sysfs_read_31617 ++memblock_virt_alloc_nopanic_31617 memblock_virt_alloc_nopanic 1 31617 NULL nohasharray ++arvo_sysfs_read_31617 arvo_sysfs_read 6 31617 &memblock_virt_alloc_nopanic_31617 +usnic_ib_dump_vf_31623 usnic_ib_dump_vf 3 31623 NULL +videobuf_read_one_31637 videobuf_read_one 3 31637 NULL +pod_alloc_sysex_buffer_31651 pod_alloc_sysex_buffer 3 31651 NULL @@ -117793,16 +125664,16 @@ index 0000000..386792a +forced_ps_read_31685 forced_ps_read 3 31685 NULL +fst_recover_rx_error_31687 fst_recover_rx_error 3 31687 NULL +rs_pretty_print_rate_31727 rs_pretty_print_rate 0 31727 NULL -+lu_buf_check_and_grow_31735 lu_buf_check_and_grow 2 31735 NULL nohasharray -+utf16s_to_utf8s_31735 utf16s_to_utf8s 0 31735 &lu_buf_check_and_grow_31735 ++utf16s_to_utf8s_31735 utf16s_to_utf8s 0 31735 NULL nohasharray ++lu_buf_check_and_grow_31735 lu_buf_check_and_grow 2 31735 &utf16s_to_utf8s_31735 +shmem_pwrite_slow_31741 shmem_pwrite_slow 3-2 31741 NULL +input_abs_get_max_31742 input_abs_get_max 0 31742 NULL nohasharray +NCR_700_change_queue_depth_31742 NCR_700_change_queue_depth 2 31742 &input_abs_get_max_31742 +bcm_char_read_31750 bcm_char_read 3 31750 NULL +snd_seq_device_new_31753 snd_seq_device_new 4 31753 NULL +SyS_lsetxattr_31766 SyS_lsetxattr 4 31766 NULL -+osync_buffers_list_31789 osync_buffers_list 0 31789 NULL +usblp_cache_device_id_string_31790 usblp_cache_device_id_string 0 31790 NULL ++get_count_order_31800 get_count_order 0 31800 NULL +ecryptfs_send_message_locked_31801 ecryptfs_send_message_locked 2 31801 NULL +isr_rx_procs_read_31804 isr_rx_procs_read 3 31804 NULL +data_write_31805 data_write 3 31805 NULL @@ -117820,8 +125691,7 @@ index 0000000..386792a +kmem_alloc_31920 kmem_alloc 1 31920 NULL +era_status_31934 era_status 5 31934 NULL +SYSC_sethostname_31940 SYSC_sethostname 2 31940 NULL -+read_mem_31942 read_mem 3 31942 NULL nohasharray -+iov_iter_copy_from_user_31942 iov_iter_copy_from_user 4-0 31942 &read_mem_31942 ++read_mem_31942 read_mem 3 31942 NULL +ext4_zero_range_31944 ext4_zero_range 3-2 31944 NULL +vb2_write_31948 vb2_write 3 31948 NULL +pvr2_ctrl_get_valname_31951 pvr2_ctrl_get_valname 4 31951 NULL @@ -117832,10 +125702,9 @@ index 0000000..386792a +vx_read_status_31982 vx_read_status 0 31982 &iblock_execute_rw_31982 +find_next_zero_bit_31990 find_next_zero_bit 0 31990 NULL +lustre_acl_xattr_merge2posix_31992 lustre_acl_xattr_merge2posix 2 31992 NULL -+sysfs_create_file_31996 sysfs_create_file 0 31996 NULL +calc_hmac_32010 calc_hmac 3 32010 NULL -+aead_len_32021 aead_len 0 32021 NULL nohasharray -+aer_init_32021 aer_init 0 32021 &aead_len_32021 ++aead_len_32021 aead_len 0 32021 NULL ++sci_dma_rx_push_32029 sci_dma_rx_push 2 32029 NULL +stk_read_32038 stk_read 3 32038 NULL +SYSC_llistxattr_32061 SYSC_llistxattr 3 32061 NULL +proc_scsi_devinfo_write_32064 proc_scsi_devinfo_write 3 32064 NULL @@ -117843,8 +125712,8 @@ index 0000000..386792a +bio_alloc_32095 bio_alloc 2 32095 NULL +ath6kl_fwlog_read_32101 ath6kl_fwlog_read 3 32101 NULL +disk_status_32120 disk_status 4 32120 NULL -+kobject_add_internal_32133 kobject_add_internal 0 32133 NULL +venus_link_32165 venus_link 5 32165 NULL ++ocfs2_direct_IO_32168 ocfs2_direct_IO 4 32168 NULL +do_writepages_32173 do_writepages 0 32173 NULL +del_ptr_32197 del_ptr 4 32197 NULL +wusb_ccm_mac_32199 wusb_ccm_mac 7 32199 NULL @@ -117864,7 +125733,6 @@ index 0000000..386792a +ll_setxattr_common_32398 ll_setxattr_common 4 32398 NULL +xfs_iext_add_indirect_multi_32400 xfs_iext_add_indirect_multi 3 32400 NULL +vmci_qp_alloc_32405 vmci_qp_alloc 5-3 32405 NULL -+snd_pcm_sync_ptr_32461 snd_pcm_sync_ptr 0 32461 NULL +cache_status_32462 cache_status 5 32462 NULL +fill_readbuf_32464 fill_readbuf 3 32464 NULL +ide_driver_proc_write_32493 ide_driver_proc_write 3 32493 NULL @@ -117882,9 +125750,9 @@ index 0000000..386792a +pipeline_tcp_tx_stat_fifo_int_read_32589 pipeline_tcp_tx_stat_fifo_int_read 3 32589 NULL +read_file_beacon_32595 read_file_beacon 3 32595 NULL +ieee80211_if_read_dropped_frames_congestion_32603 ieee80211_if_read_dropped_frames_congestion 3 32603 NULL -+__pci_request_region_32618 __pci_request_region 0 32618 NULL +irda_recvmsg_dgram_32631 irda_recvmsg_dgram 4 32631 NULL +cfg80211_roamed_32632 cfg80211_roamed 5-7 32632 NULL ++xpcs_reg_value_read_32644 xpcs_reg_value_read 3 32644 NULL +kvmalloc_32646 kvmalloc 1 32646 NULL +ib_sg_dma_len_32649 ib_sg_dma_len 0 32649 NULL +generic_readlink_32654 generic_readlink 3 32654 NULL @@ -117892,6 +125760,7 @@ index 0000000..386792a +compat_SyS_preadv_32679 compat_SyS_preadv 3 32679 NULL +jfs_readpages_32702 jfs_readpages 4 32702 NULL +rt2x00debug_read_queue_dump_32712 rt2x00debug_read_queue_dump 3 32712 NULL ++_xfs_buf_get_pages_32715 _xfs_buf_get_pages 2 32715 NULL +megasas_change_queue_depth_32747 megasas_change_queue_depth 2 32747 NULL +stats_read_ul_32751 stats_read_ul 3 32751 NULL +vmci_transport_dgram_dequeue_32775 vmci_transport_dgram_dequeue 4 32775 NULL @@ -117899,8 +125768,8 @@ index 0000000..386792a +rproc_name_read_32805 rproc_name_read 3 32805 NULL +sta_tx_latency_stat_read_32862 sta_tx_latency_stat_read 3 32862 NULL +new_tape_buffer_32866 new_tape_buffer 2 32866 NULL -+ath6kl_usb_submit_ctrl_in_32880 ath6kl_usb_submit_ctrl_in 6 32880 NULL nohasharray -+cifs_writedata_alloc_32880 cifs_writedata_alloc 1 32880 &ath6kl_usb_submit_ctrl_in_32880 ++cifs_writedata_alloc_32880 cifs_writedata_alloc 1 32880 NULL nohasharray ++ath6kl_usb_submit_ctrl_in_32880 ath6kl_usb_submit_ctrl_in 6 32880 &cifs_writedata_alloc_32880 +vp702x_usb_inout_cmd_32884 vp702x_usb_inout_cmd 4-6 32884 NULL +tipc_link_iovec_xmit_fast_32913 tipc_link_iovec_xmit_fast 3 32913 NULL nohasharray +il_dbgfs_tx_stats_read_32913 il_dbgfs_tx_stats_read 3 32913 &tipc_link_iovec_xmit_fast_32913 @@ -117910,7 +125779,6 @@ index 0000000..386792a +SyS_syslog_33007 SyS_syslog 3 33007 NULL +br_multicast_set_hash_max_33012 br_multicast_set_hash_max 2 33012 NULL +write_file_bt_ant_diversity_33019 write_file_bt_ant_diversity 3 33019 NULL -+snd_pcm_prepare_33036 snd_pcm_prepare 0 33036 NULL +mic_virtio_copy_to_user_33048 mic_virtio_copy_to_user 3 33048 NULL +SYSC_lgetxattr_33049 SYSC_lgetxattr 4 33049 NULL +pipeline_dec_packet_in_fifo_full_read_33052 pipeline_dec_packet_in_fifo_full_read 3 33052 NULL @@ -117920,14 +125788,13 @@ index 0000000..386792a +sel_read_checkreqprot_33068 sel_read_checkreqprot 3 33068 NULL +alloc_tio_33077 alloc_tio 3 33077 NULL +acl_permission_check_33083 acl_permission_check 0 33083 NULL ++f2fs_llseek_33098 f2fs_llseek 2 33098 NULL +fb_sys_write_33130 fb_sys_write 3 33130 NULL -+notify_change_33143 notify_change 0 33143 NULL +SyS_poll_33152 SyS_poll 2 33152 NULL +_pci_add_cap_save_buffer_33153 _pci_add_cap_save_buffer 4 33153 NULL +debug_debug6_read_33168 debug_debug6_read 3 33168 NULL +dataflash_read_fact_otp_33204 dataflash_read_fact_otp 3-2 33204 NULL +pp_read_33210 pp_read 3 33210 NULL -+xfs_file_aio_write_33234 xfs_file_aio_write 4 33234 NULL +snd_pcm_plug_client_size_33267 snd_pcm_plug_client_size 0-2 33267 NULL +cachefiles_cook_key_33274 cachefiles_cook_key 2 33274 NULL +sync_pt_create_33282 sync_pt_create 2 33282 NULL @@ -117938,7 +125805,6 @@ index 0000000..386792a +lov_stripesize_seq_write_33353 lov_stripesize_seq_write 3 33353 NULL +create_xattr_datum_33356 create_xattr_datum 5 33356 NULL nohasharray +irq_pkt_threshold_read_33356 irq_pkt_threshold_read 3 33356 &create_xattr_datum_33356 -+pvscsi_allocate_sg_33357 pvscsi_allocate_sg 0 33357 NULL +read_file_regidx_33370 read_file_regidx 3 33370 NULL +ieee80211_if_read_dropped_frames_no_route_33383 ieee80211_if_read_dropped_frames_no_route 3 33383 NULL +scsi_varlen_cdb_length_33385 scsi_varlen_cdb_length 0 33385 NULL @@ -117965,30 +125831,27 @@ index 0000000..386792a +scsi_execute_33596 scsi_execute 5 33596 NULL +comedi_buf_write_n_allocated_33604 comedi_buf_write_n_allocated 0 33604 NULL +xt_compat_target_offset_33608 xt_compat_target_offset 0 33608 NULL -+usb_gstrings_attach_33615 usb_gstrings_attach 3 33615 NULL nohasharray -+il_dbgfs_qos_read_33615 il_dbgfs_qos_read 3 33615 &usb_gstrings_attach_33615 ++il_dbgfs_qos_read_33615 il_dbgfs_qos_read 3 33615 NULL nohasharray ++usb_gstrings_attach_33615 usb_gstrings_attach 3 33615 &il_dbgfs_qos_read_33615 +stride_page_count_33641 stride_page_count 2 33641 NULL +irq_blk_threshold_read_33666 irq_blk_threshold_read 3 33666 NULL +inw_p_33668 inw_p 0 33668 NULL +arp_hdr_len_33671 arp_hdr_len 0 33671 NULL +i2c_hid_alloc_buffers_33673 i2c_hid_alloc_buffers 2 33673 NULL -+submit_one_bio_33683 submit_one_bio 0 33683 NULL +nv50_disp_dmac_create__33696 nv50_disp_dmac_create_ 6 33696 NULL +netlink_sendmsg_33708 netlink_sendmsg 4 33708 NULL +tipc_link_stats_33716 tipc_link_stats 3 33716 NULL +pvr2_stream_buffer_count_33719 pvr2_stream_buffer_count 2 33719 NULL +write_file_spectral_count_33723 write_file_spectral_count 3 33723 NULL +read_file_node_recv_33729 read_file_node_recv 3 33729 NULL -+rtw_cbuf_alloc23a_33740 rtw_cbuf_alloc23a 1 33740 NULL +vifs_state_read_33762 vifs_state_read 3 33762 NULL +hashtab_create_33769 hashtab_create 3 33769 NULL -+i8042_create_aux_port_33777 i8042_create_aux_port 0 33777 NULL ++__btrfs_free_reserved_extent_33782 __btrfs_free_reserved_extent 2 33782 NULL +if_sdio_read_rx_len_33800 if_sdio_read_rx_len 0 33800 NULL +filter_write_33819 filter_write 3 33819 NULL +sep_create_msgarea_context_33829 sep_create_msgarea_context 4 33829 NULL +scrub_setup_recheck_block_33831 scrub_setup_recheck_block 5-4 33831 NULL +ext4_journal_extend_33835 ext4_journal_extend 2 33835 NULL -+snd_pcm_action_nonatomic_33844 snd_pcm_action_nonatomic 0 33844 NULL +oz_cdev_write_33852 oz_cdev_write 3 33852 NULL +get_user_pages_33908 get_user_pages 0 33908 NULL +sg_nents_33909 sg_nents 0 33909 NULL @@ -117997,8 +125860,8 @@ index 0000000..386792a +sel_read_avc_cache_threshold_33942 sel_read_avc_cache_threshold 3 33942 NULL +lpfc_idiag_ctlacc_read_33943 lpfc_idiag_ctlacc_read 3 33943 NULL +read_file_tgt_rx_stats_33944 read_file_tgt_rx_stats 3 33944 NULL ++rs_sta_dbgfs_drv_tx_stats_read_33946 rs_sta_dbgfs_drv_tx_stats_read 3 33946 NULL +__proc_dump_kernel_33954 __proc_dump_kernel 5 33954 NULL -+btrfs_delalloc_reserve_metadata_33963 btrfs_delalloc_reserve_metadata 0 33963 NULL +vga_switcheroo_debugfs_write_33984 vga_switcheroo_debugfs_write 3 33984 NULL +lbs_lowrssi_write_34025 lbs_lowrssi_write 3 34025 NULL +ppp_write_34034 ppp_write 3 34034 NULL @@ -118016,7 +125879,7 @@ index 0000000..386792a +rsi_debug_zone_write_34206 rsi_debug_zone_write 3 34206 NULL +ext4_da_write_begin_34215 ext4_da_write_begin 3-4 34215 NULL +bl_pipe_downcall_34264 bl_pipe_downcall 3 34264 NULL -+device_private_init_34279 device_private_init 0 34279 NULL ++xgmac_reg_addr_write_34284 xgmac_reg_addr_write 3 34284 NULL +ext4_get_groups_count_34324 ext4_get_groups_count 0 34324 NULL +pcpu_need_to_extend_34326 pcpu_need_to_extend 0 34326 NULL nohasharray +iov_iter_single_seg_count_34326 iov_iter_single_seg_count 0 34326 &pcpu_need_to_extend_34326 @@ -118025,15 +125888,15 @@ index 0000000..386792a +rngapi_reset_34366 rngapi_reset 3 34366 NULL +_iwl_dbgfs_low_latency_write_34378 _iwl_dbgfs_low_latency_write 3 34378 NULL nohasharray +ea_read_34378 ea_read 0 34378 &_iwl_dbgfs_low_latency_write_34378 -+fuse_send_read_34379 fuse_send_read 4 34379 NULL ++fuse_send_read_34379 fuse_send_read 4-0 34379 NULL +av7110_vbi_write_34384 av7110_vbi_write 3 34384 NULL +usbvision_v4l2_read_34386 usbvision_v4l2_read 3 34386 NULL +read_rbu_image_type_34387 read_rbu_image_type 6 34387 NULL -+iwl_calib_set_34400 iwl_calib_set 3 34400 NULL nohasharray -+ivtv_read_pos_34400 ivtv_read_pos 3 34400 &iwl_calib_set_34400 ++ivtv_read_pos_34400 ivtv_read_pos 3 34400 NULL nohasharray ++iwl_calib_set_34400 iwl_calib_set 3 34400 &ivtv_read_pos_34400 +wd_exp_mode_write_34407 wd_exp_mode_write 3 34407 NULL +nl80211_send_disassoc_34424 nl80211_send_disassoc 4 34424 NULL -+__extent_read_full_page_34437 __extent_read_full_page 0 34437 NULL ++security_socket_create_34439 security_socket_create 0 34439 NULL +usbtest_alloc_urb_34446 usbtest_alloc_urb 3-5 34446 NULL +mwifiex_regrdwr_read_34472 mwifiex_regrdwr_read 3 34472 NULL +skcipher_sndbuf_34476 skcipher_sndbuf 0 34476 NULL @@ -118048,6 +125911,7 @@ index 0000000..386792a +dbBackSplit_34561 dbBackSplit 0 34561 NULL +alloc_ieee80211_rsl_34564 alloc_ieee80211_rsl 1 34564 NULL nohasharray +self_check_peb_ec_hdr_34564 self_check_peb_ec_hdr 0 34564 &alloc_ieee80211_rsl_34564 ++ext4_ind_direct_IO_34574 ext4_ind_direct_IO 4 34574 NULL +lov_stripecount_seq_write_34582 lov_stripecount_seq_write 3 34582 NULL +init_send_hfcd_34586 init_send_hfcd 1 34586 NULL +inet6_ifla6_size_34591 inet6_ifla6_size 0 34591 NULL @@ -118060,6 +125924,7 @@ index 0000000..386792a +cnic_alloc_dma_34641 cnic_alloc_dma 3 34641 NULL +kvm_set_spte_hva_34671 kvm_set_spte_hva 2 34671 NULL +sleep_auth_write_34676 sleep_auth_write 3 34676 NULL ++f2fs_direct_IO_34685 f2fs_direct_IO 4 34685 NULL +isr_fiqs_read_34687 isr_fiqs_read 3 34687 NULL +batadv_tvlv_realloc_packet_buff_34688 batadv_tvlv_realloc_packet_buff 3-4 34688 NULL +port_print_34704 port_print 3 34704 NULL @@ -118068,8 +125933,8 @@ index 0000000..386792a +reg_w_ixbuf_34736 reg_w_ixbuf 4 34736 NULL +lsm_alloc_plain_34755 lsm_alloc_plain 1 34755 NULL +bootmode_store_34762 bootmode_store 4 34762 NULL -+device_add_34766 device_add 0 34766 NULL +qib_cdev_init_34778 qib_cdev_init 1 34778 NULL ++ext3_direct_IO_34798 ext3_direct_IO 4 34798 NULL +SYSC_keyctl_34800 SYSC_keyctl 4 34800 NULL +can_nocow_extent_34801 can_nocow_extent 2 34801 NULL +drbd_get_max_capacity_34804 drbd_get_max_capacity 0 34804 NULL @@ -118086,21 +125951,20 @@ index 0000000..386792a +si476x_radio_read_rsq_primary_blob_34916 si476x_radio_read_rsq_primary_blob 3 34916 NULL +__inode_permission_34925 __inode_permission 0 34925 NULL nohasharray +btrfs_super_chunk_root_34925 btrfs_super_chunk_root 0 34925 &__inode_permission_34925 -+ceph_aio_write_34930 ceph_aio_write 4 34930 NULL -+sec_flags2str_34933 sec_flags2str 3 34933 NULL +snd_info_entry_read_34938 snd_info_entry_read 3 34938 NULL -+do_add_page_to_bio_34974 do_add_page_to_bio 2-10 34974 NULL ++do_add_page_to_bio_34974 do_add_page_to_bio 10-2 34974 NULL +schedule_erase_34996 schedule_erase 0 34996 NULL +rx_rx_hdr_overflow_read_35002 rx_rx_hdr_overflow_read 3 35002 NULL +l2cap_skbuff_fromiovec_35003 l2cap_skbuff_fromiovec 4-3 35003 NULL -+rtw_cfg80211_rx_p2p_action_public_35010 rtw_cfg80211_rx_p2p_action_public 3 35010 NULL +sisusb_copy_memory_35016 sisusb_copy_memory 4 35016 NULL +coda_psdev_read_35029 coda_psdev_read 3 35029 NULL ++hwdep_read_locked_35037 hwdep_read_locked 3 35037 NULL +pwr_connection_out_of_sync_read_35061 pwr_connection_out_of_sync_read 3 35061 NULL +__kfifo_uint_must_check_helper_35097 __kfifo_uint_must_check_helper 0-1 35097 NULL +capi_write_35104 capi_write 3 35104 NULL nohasharray +tx_tx_done_template_read_35104 tx_tx_done_template_read 3 35104 &capi_write_35104 +ide_settings_proc_write_35110 ide_settings_proc_write 3 35110 NULL ++addrs_per_inode_35151 addrs_per_inode 0 35151 NULL +message_stats_print_35158 message_stats_print 6 35158 NULL +iscsi_conn_setup_35159 iscsi_conn_setup 2 35159 NULL +ieee80211_if_read_bssid_35161 ieee80211_if_read_bssid 3 35161 NULL @@ -118116,7 +125980,7 @@ index 0000000..386792a +irda_recvmsg_stream_35280 irda_recvmsg_stream 4 35280 NULL +i2o_block_end_request_35282 i2o_block_end_request 3 35282 NULL +isr_rx_rdys_read_35283 isr_rx_rdys_read 3 35283 NULL -+__btrfs_buffered_write_35311 __btrfs_buffered_write 3-0 35311 NULL nohasharray ++__btrfs_buffered_write_35311 __btrfs_buffered_write 3 35311 NULL nohasharray +brcmf_sdio_forensic_read_35311 brcmf_sdio_forensic_read 3 35311 &__btrfs_buffered_write_35311 +tracing_read_pipe_35312 tracing_read_pipe 3 35312 NULL +sta_tx_latency_stat_write_35323 sta_tx_latency_stat_write 3 35323 NULL @@ -118124,7 +125988,6 @@ index 0000000..386792a +nouveau_devinit_create__35348 nouveau_devinit_create_ 4 35348 NULL +ieee80211_rx_mgmt_deauth_35351 ieee80211_rx_mgmt_deauth 3 35351 NULL +compat_filldir64_35354 compat_filldir64 3 35354 NULL -+read_kmem_35372 read_kmem 3 35372 NULL +SyS_getxattr_35408 SyS_getxattr 4 35408 NULL +rawv6_send_hdrinc_35425 rawv6_send_hdrinc 3 35425 NULL +iwl_dbgfs_drv_rx_stats_read_35430 iwl_dbgfs_drv_rx_stats_read 3 35430 NULL @@ -118146,7 +126009,6 @@ index 0000000..386792a +spk_msg_set_35586 spk_msg_set 3 35586 NULL +kernel_readv_35617 kernel_readv 3 35617 NULL +reiserfs_readpages_35629 reiserfs_readpages 4 35629 NULL -+pci_request_regions_35635 pci_request_regions 0 35635 NULL +ptlrpcd_steal_rqset_35637 ptlrpcd_steal_rqset 0 35637 NULL +spi_register_board_info_35651 spi_register_board_info 2 35651 NULL +rdmaltWithLock_35669 rdmaltWithLock 0 35669 NULL @@ -118159,7 +126021,6 @@ index 0000000..386792a +tx_tx_cmplt_read_35854 tx_tx_cmplt_read 3 35854 NULL +vx_query_hbuffer_size_35859 vx_query_hbuffer_size 0 35859 NULL +mthca_buf_alloc_35861 mthca_buf_alloc 2 35861 NULL -+fls64_35862 fls64 0 35862 NULL +kvm_dirty_bitmap_bytes_35886 kvm_dirty_bitmap_bytes 0 35886 NULL +ieee80211_if_fmt_dot11MeshRetryTimeout_35890 ieee80211_if_fmt_dot11MeshRetryTimeout 3 35890 NULL +uwb_rc_cmd_done_35892 uwb_rc_cmd_done 4 35892 NULL @@ -118168,20 +126029,17 @@ index 0000000..386792a +sctp_tsnmap_mark_35929 sctp_tsnmap_mark 2 35929 NULL +rx_defrag_init_called_read_35935 rx_defrag_init_called_read 3 35935 NULL +put_cmsg_compat_35937 put_cmsg_compat 4 35937 NULL -+ext_rts51x_sd_execute_write_data_35971 ext_rts51x_sd_execute_write_data 9 35971 NULL +generic_ocp_read_35974 generic_ocp_read 3 35974 NULL nohasharray +ceph_buffer_new_35974 ceph_buffer_new 1 35974 &generic_ocp_read_35974 +acl_alloc_35979 acl_alloc 1 35979 NULL -+device_add_class_symlinks_35985 device_add_class_symlinks 0 35985 NULL -+kuc_alloc_35998 kuc_alloc 1 35998 NULL nohasharray -+write_file_antenna_35998 write_file_antenna 3 35998 &kuc_alloc_35998 -+scsi_transfer_length_36011 scsi_transfer_length 0 36011 NULL ++write_file_antenna_35998 write_file_antenna 3 35998 NULL nohasharray ++kuc_alloc_35998 kuc_alloc 1 35998 &write_file_antenna_35998 ++lov_mds_md_max_stripe_count_36008 lov_mds_md_max_stripe_count 0-1 36008 NULL +il3945_ucode_tx_stats_read_36016 il3945_ucode_tx_stats_read 3 36016 NULL +ubi_eba_write_leb_36029 ubi_eba_write_leb 0 36029 NULL +__videobuf_alloc_36031 __videobuf_alloc 1 36031 NULL +account_shadowed_36048 account_shadowed 2 36048 NULL +gpio_power_read_36059 gpio_power_read 3 36059 NULL -+snd_pcm_playback_hw_avail_36061 snd_pcm_playback_hw_avail 0 36061 NULL +write_emulate_36065 write_emulate 2-4 36065 NULL +stack_max_size_write_36068 stack_max_size_write 3 36068 NULL +radeon_vm_num_pdes_36070 radeon_vm_num_pdes 0 36070 NULL @@ -118195,18 +126053,15 @@ index 0000000..386792a +twl_set_36154 twl_set 2 36154 NULL +b1_alloc_card_36155 b1_alloc_card 1 36155 NULL +snd_korg1212_copy_from_36169 snd_korg1212_copy_from 6 36169 NULL -+SyS_kexec_load_36176 SyS_kexec_load 2 36176 NULL +ramoops_init_przs_36199 ramoops_init_przs 4 36199 NULL +SYSC_sched_getaffinity_36208 SYSC_sched_getaffinity 2 36208 NULL +SYSC_process_vm_readv_36216 SYSC_process_vm_readv 3-5 36216 NULL +atomic_stats_read_36228 atomic_stats_read 3 36228 NULL -+rtw_cfg80211_set_wpa_ie_36236 rtw_cfg80211_set_wpa_ie 3 36236 NULL +viafb_iga1_odev_proc_write_36241 viafb_iga1_odev_proc_write 3 36241 NULL +SYSC_getxattr_36242 SYSC_getxattr 4 36242 NULL +vmsplice_to_user_36245 vmsplice_to_user 3 36245 NULL nohasharray +rproc_recovery_read_36245 rproc_recovery_read 3 36245 &vmsplice_to_user_36245 -+cfs_hash_buckets_realloc_36276 cfs_hash_buckets_realloc 4 36276 NULL nohasharray -+usb_buffer_alloc_36276 usb_buffer_alloc 2 36276 &cfs_hash_buckets_realloc_36276 ++cfs_hash_buckets_realloc_36276 cfs_hash_buckets_realloc 4 36276 NULL +codec_reg_read_file_36280 codec_reg_read_file 3 36280 NULL +crypto_shash_digestsize_36284 crypto_shash_digestsize 0 36284 NULL +lpfc_debugfs_dif_err_read_36303 lpfc_debugfs_dif_err_read 3 36303 NULL @@ -118227,10 +126082,8 @@ index 0000000..386792a +sctp_tsnmap_init_36446 sctp_tsnmap_init 2 36446 NULL +alloc_etherdev_mqs_36450 alloc_etherdev_mqs 1 36450 NULL +SyS_process_vm_writev_36476 SyS_process_vm_writev 3-5 36476 NULL -+lock_and_cleanup_extent_if_need_36480 lock_and_cleanup_extent_if_need 0 36480 NULL +b43_nphy_load_samples_36481 b43_nphy_load_samples 3 36481 NULL -+tx_tx_checksum_result_read_36490 tx_tx_checksum_result_read 3 36490 NULL nohasharray -+ip6_append_data_36490 ip6_append_data 4 36490 &tx_tx_checksum_result_read_36490 ++tx_tx_checksum_result_read_36490 tx_tx_checksum_result_read 3 36490 NULL +__hwahc_op_set_ptk_36510 __hwahc_op_set_ptk 5 36510 NULL +mcam_v4l_read_36513 mcam_v4l_read 3 36513 NULL +_iwl_dbgfs_fw_nmi_write_36515 _iwl_dbgfs_fw_nmi_write 3 36515 NULL @@ -118254,13 +126107,13 @@ index 0000000..386792a +snd_rawmidi_kernel_read1_36740 snd_rawmidi_kernel_read1 4-0 36740 NULL +cxgbi_device_register_36746 cxgbi_device_register 1-2 36746 NULL +ps_poll_upsd_timeouts_read_36755 ps_poll_upsd_timeouts_read 3 36755 NULL ++ptp_filter_init_36780 ptp_filter_init 2 36780 NULL +i40e_init_lan_hmc_36796 i40e_init_lan_hmc 5-4-3-2 36796 NULL +proc_fault_inject_read_36802 proc_fault_inject_read 3 36802 NULL +hiddev_ioctl_36816 hiddev_ioctl 2 36816 NULL +int_hardware_entry_36833 int_hardware_entry 3 36833 NULL +fc_change_queue_depth_36841 fc_change_queue_depth 2 36841 NULL +keyctl_describe_key_36853 keyctl_describe_key 3 36853 NULL -+cm_write_36858 cm_write 3 36858 NULL +tipc_link_iovec_long_xmit_36871 tipc_link_iovec_long_xmit 3 36871 NULL nohasharray +tx_tx_data_programmed_read_36871 tx_tx_data_programmed_read 3 36871 &tipc_link_iovec_long_xmit_36871 +svc_setsockopt_36876 svc_setsockopt 5 36876 NULL @@ -118268,11 +126121,11 @@ index 0000000..386792a +__btrfs_map_block_36883 __btrfs_map_block 3 36883 NULL +ib_ucm_alloc_data_36885 ib_ucm_alloc_data 3 36885 NULL +selinux_inode_notifysecctx_36896 selinux_inode_notifysecctx 3 36896 NULL -+OS_kmalloc_36909 OS_kmalloc 1 36909 NULL +il4965_rs_sta_dbgfs_scale_table_write_36979 il4965_rs_sta_dbgfs_scale_table_write 3 36979 NULL +drbd_new_dev_size_36998 drbd_new_dev_size 0-3 36998 NULL +auok190xfb_write_37001 auok190xfb_write 3 37001 NULL +setxattr_37006 setxattr 4 37006 NULL ++ec_i2c_xfer_37029 ec_i2c_xfer 3 37029 NULL +command_file_read_37038 command_file_read 3 37038 NULL +figure_loop_size_37051 figure_loop_size 2-3 37051 NULL +qp_broker_create_37053 qp_broker_create 6-5 37053 NULL nohasharray @@ -118282,36 +126135,33 @@ index 0000000..386792a +parse_command_37079 parse_command 2 37079 NULL +pipeline_cs_rx_packet_in_read_37089 pipeline_cs_rx_packet_in_read 3 37089 NULL +tun_get_user_37094 tun_get_user 5 37094 NULL -+has_wrprotected_page_37123 has_wrprotected_page 2-3 37123 NULL ++has_wrprotected_page_37123 has_wrprotected_page 3-2 37123 NULL +snd_hda_get_conn_list_37132 snd_hda_get_conn_list 0 37132 NULL +mtt_free_res_37144 mtt_free_res 5 37144 NULL +msg_word_37164 msg_word 0 37164 NULL -+f2fs_direct_IO_37167 f2fs_direct_IO 4 37167 NULL +vcc_recvmsg_37198 vcc_recvmsg 4 37198 NULL +forced_ps_write_37209 forced_ps_write 3 37209 NULL -+crypto_shash_descsize_37212 crypto_shash_descsize 0 37212 NULL nohasharray -+ext4_ind_direct_IO_37212 ext4_ind_direct_IO 4-0 37212 &crypto_shash_descsize_37212 ++crypto_shash_descsize_37212 crypto_shash_descsize 0 37212 NULL +regmap_access_read_file_37223 regmap_access_read_file 3 37223 NULL +__do_replace_37227 __do_replace 5 37227 NULL +iwl_dbgfs_d3_sram_read_37237 iwl_dbgfs_d3_sram_read 3 37237 NULL -+rx_filter_dup_filter_read_37238 rx_filter_dup_filter_read 3 37238 NULL ++__btrfs_inc_extent_ref_37238 __btrfs_inc_extent_ref 7 37238 NULL nohasharray ++rx_filter_dup_filter_read_37238 rx_filter_dup_filter_read 3 37238 &__btrfs_inc_extent_ref_37238 +prot_queue_del_37258 prot_queue_del 0 37258 NULL +exofs_max_io_pages_37263 exofs_max_io_pages 0-2 37263 NULL +_iwl_dbgfs_fw_restart_write_37270 _iwl_dbgfs_fw_restart_write 3 37270 NULL -+request_threaded_irq_37303 request_threaded_irq 0 37303 NULL +ieee80211_if_read_power_mode_37305 ieee80211_if_read_power_mode 3 37305 NULL -+ext3_direct_IO_37308 ext3_direct_IO 4 37308 NULL +jffs2_write_dirent_37311 jffs2_write_dirent 5 37311 NULL +tipc_send_37315 tipc_send 3 37315 NULL -+l2cap_create_connless_pdu_37327 l2cap_create_connless_pdu 3 37327 NULL nohasharray -+bnx2x_vf_fill_fw_str_37327 bnx2x_vf_fill_fw_str 3 37327 &l2cap_create_connless_pdu_37327 ++l2cap_create_connless_pdu_37327 l2cap_create_connless_pdu 3 37327 NULL +scsi_mode_select_37330 scsi_mode_select 6 37330 NULL +rxrpc_server_sendmsg_37331 rxrpc_server_sendmsg 4 37331 NULL +security_inode_getsecurity_37354 security_inode_getsecurity 0 37354 NULL +hci_sock_sendmsg_37420 hci_sock_sendmsg 4 37420 NULL -+acpi_os_allocate_zeroed_37422 acpi_os_allocate_zeroed 1 37422 NULL ++acpi_os_allocate_zeroed_37422 acpi_os_allocate_zeroed 1 37422 NULL nohasharray ++find_next_bit_37422 find_next_bit 0 37422 &acpi_os_allocate_zeroed_37422 +tty_insert_flip_string_fixed_flag_37428 tty_insert_flip_string_fixed_flag 4-0 37428 NULL -+iwl_print_last_event_logs_37433 iwl_print_last_event_logs 0-7-9 37433 NULL ++iwl_print_last_event_logs_37433 iwl_print_last_event_logs 7-9-0 37433 NULL +fru_alloc_37442 fru_alloc 1 37442 NULL +tcp_established_options_37450 tcp_established_options 0 37450 NULL +brcmf_sdio_dump_console_37455 brcmf_sdio_dump_console 4 37455 NULL @@ -118325,19 +126175,18 @@ index 0000000..386792a +hdr_size_37536 hdr_size 0 37536 NULL +extent_map_end_37550 extent_map_end 0 37550 NULL +sep_create_dcb_dmatables_context_37551 sep_create_dcb_dmatables_context 6 37551 NULL -+fat_cont_expand_37552 fat_cont_expand 0 37552 NULL +xhci_alloc_streams_37586 xhci_alloc_streams 5 37586 NULL +qla2x00_debounce_register_37597 qla2x00_debounce_register 0 37597 NULL +kvm_read_guest_page_mmu_37611 kvm_read_guest_page_mmu 6 37611 NULL +SYSC_mbind_37622 SYSC_mbind 5 37622 NULL +SyS_mbind_37638 SyS_mbind 5 37638 NULL -+may_delete_37656 may_delete 0 37656 NULL +bio_copy_user_iov_37660 bio_copy_user_iov 4 37660 NULL -+vmw_framebuffer_dmabuf_dirty_37661 vmw_framebuffer_dmabuf_dirty 6 37661 NULL nohasharray -+rfcomm_sock_sendmsg_37661 rfcomm_sock_sendmsg 4 37661 &vmw_framebuffer_dmabuf_dirty_37661 ++rfcomm_sock_sendmsg_37661 rfcomm_sock_sendmsg 4 37661 NULL nohasharray ++vmw_framebuffer_dmabuf_dirty_37661 vmw_framebuffer_dmabuf_dirty 6 37661 &rfcomm_sock_sendmsg_37661 +SYSC_get_mempolicy_37664 SYSC_get_mempolicy 3 37664 NULL +__wa_seg_calculate_isoc_frame_count_37672 __wa_seg_calculate_isoc_frame_count 0 37672 NULL +ieee80211_if_read_rc_rateidx_mcs_mask_2ghz_37675 ieee80211_if_read_rc_rateidx_mcs_mask_2ghz 3 37675 NULL ++tracing_saved_cmdlines_size_write_37684 tracing_saved_cmdlines_size_write 3 37684 NULL +regmap_map_read_file_37685 regmap_map_read_file 3 37685 NULL +nametbl_header_37698 nametbl_header 2-0 37698 NULL +__le32_to_cpup_37702 __le32_to_cpup 0 37702 NULL @@ -118353,10 +126202,10 @@ index 0000000..386792a +android_get_p2p_addr_37832 android_get_p2p_addr 0 37832 NULL +o2hb_debug_read_37851 o2hb_debug_read 3 37851 NULL +xfs_dir2_block_to_sf_37868 xfs_dir2_block_to_sf 3 37868 NULL -+set_registers_37883 set_registers 4 37883 NULL ++btrfs_leaf_data_37869 btrfs_leaf_data 0 37869 NULL +btrfs_stack_file_extent_disk_bytenr_37888 btrfs_stack_file_extent_disk_bytenr 0 37888 NULL -+_rtw_malloc_37928 _rtw_malloc 1 37928 NULL nohasharray -+pkt_alloc_packet_data_37928 pkt_alloc_packet_data 1 37928 &_rtw_malloc_37928 ++pkt_alloc_packet_data_37928 pkt_alloc_packet_data 1 37928 NULL nohasharray ++_rtw_malloc_37928 _rtw_malloc 1 37928 &pkt_alloc_packet_data_37928 +read_rbu_packet_size_37939 read_rbu_packet_size 6 37939 NULL +write_file_bool_37957 write_file_bool 3 37957 NULL +fifo_alloc_37961 fifo_alloc 1 37961 NULL @@ -118367,12 +126216,10 @@ index 0000000..386792a +il_dbgfs_chain_noise_read_38044 il_dbgfs_chain_noise_read 3 38044 NULL nohasharray +klsi_105_prepare_write_buffer_38044 klsi_105_prepare_write_buffer 3 38044 &il_dbgfs_chain_noise_read_38044 +SyS_llistxattr_38048 SyS_llistxattr 3 38048 NULL -+sysfs_do_create_link_38051 sysfs_do_create_link 0 38051 NULL +_xfs_buf_alloc_38058 _xfs_buf_alloc 3 38058 NULL +nsm_create_handle_38060 nsm_create_handle 4 38060 NULL +alloc_ltalkdev_38071 alloc_ltalkdev 1 38071 NULL -+wcn36xx_smd_rsp_process_38081 wcn36xx_smd_rsp_process 3 38081 NULL nohasharray -+xfs_buf_readahead_map_38081 xfs_buf_readahead_map 3 38081 &wcn36xx_smd_rsp_process_38081 ++xfs_buf_readahead_map_38081 xfs_buf_readahead_map 3 38081 NULL +uwb_mac_addr_print_38085 uwb_mac_addr_print 2 38085 NULL +request_key_auth_new_38092 request_key_auth_new 3 38092 NULL +proc_self_readlink_38094 proc_self_readlink 3 38094 NULL @@ -118382,8 +126229,8 @@ index 0000000..386792a +o2hb_read_slots_38105 o2hb_read_slots 2 38105 NULL +snd_pcm_oss_write_38108 snd_pcm_oss_write 3 38108 NULL +vmw_kms_present_38130 vmw_kms_present 9 38130 NULL -+__ntfs_copy_from_user_iovec_inatomic_38153 __ntfs_copy_from_user_iovec_inatomic 4-3-0 38153 NULL -+btrfs_extent_same_38163 btrfs_extent_same 3-2 38163 NULL ++__ntfs_copy_from_user_iovec_inatomic_38153 __ntfs_copy_from_user_iovec_inatomic 3-4-0 38153 NULL ++btrfs_extent_same_38163 btrfs_extent_same 3-2-5 38163 NULL +kvm_clear_guest_38164 kvm_clear_guest 3-2 38164 NULL +cdev_add_38176 cdev_add 2-3 38176 NULL +rt2x00debug_write_rf_38195 rt2x00debug_write_rf 3 38195 NULL @@ -118391,11 +126238,10 @@ index 0000000..386792a +osd_req_list_partition_collections_38223 osd_req_list_partition_collections 5 38223 NULL +ceph_decode_16_38239 ceph_decode_16 0 38239 NULL +_ipw_read_reg32_38245 _ipw_read_reg32 0 38245 NULL -+snd_pcm_playback_rewind_38249 snd_pcm_playback_rewind 0-2 38249 NULL +mthca_alloc_icm_table_38268 mthca_alloc_icm_table 4-3 38268 NULL nohasharray +ieee80211_if_read_auto_open_plinks_38268 ieee80211_if_read_auto_open_plinks 3 38268 &mthca_alloc_icm_table_38268 -+xfs_bmbt_to_bmdr_38275 xfs_bmbt_to_bmdr 3 38275 NULL nohasharray -+xfs_bmdr_to_bmbt_38275 xfs_bmdr_to_bmbt 5 38275 &xfs_bmbt_to_bmdr_38275 ++xfs_bmdr_to_bmbt_38275 xfs_bmdr_to_bmbt 5 38275 NULL nohasharray ++xfs_bmbt_to_bmdr_38275 xfs_bmbt_to_bmdr 3 38275 &xfs_bmdr_to_bmbt_38275 +ftdi_process_packet_38281 ftdi_process_packet 4 38281 NULL +C_SYSC_pselect6_38296 C_SYSC_pselect6 1 38296 NULL +ucma_query_path_38305 ucma_query_path 3 38305 NULL @@ -118406,13 +126252,13 @@ index 0000000..386792a +dn_sendmsg_38390 dn_sendmsg 4 38390 NULL +ieee80211_if_read_dtim_count_38419 ieee80211_if_read_dtim_count 3 38419 NULL +pmcraid_copy_sglist_38431 pmcraid_copy_sglist 3 38431 NULL ++iov_iter_npages_iovec_38448 iov_iter_npages_iovec 0-2 38448 NULL +kvm_write_guest_38454 kvm_write_guest 4-2 38454 NULL +_iwl_dbgfs_scan_ant_rxchain_write_38479 _iwl_dbgfs_scan_ant_rxchain_write 3 38479 NULL +blk_end_bidi_request_38482 blk_end_bidi_request 3-4 38482 NULL +dev_names_read_38509 dev_names_read 3 38509 NULL +iscsi_create_iface_38510 iscsi_create_iface 5 38510 NULL +event_rx_mismatch_read_38518 event_rx_mismatch_read 3 38518 NULL -+set_queue_count_38519 set_queue_count 0 38519 NULL +ubifs_idx_node_sz_38546 ubifs_idx_node_sz 0-2 38546 NULL +btrfs_discard_extent_38547 btrfs_discard_extent 2 38547 NULL +kuc_len_38557 kuc_len 0-1 38557 NULL @@ -118429,7 +126275,6 @@ index 0000000..386792a +qp_broker_alloc_38646 qp_broker_alloc 6-5 38646 NULL +mmc_send_cxd_data_38655 mmc_send_cxd_data 5 38655 NULL +nouveau_instmem_create__38664 nouveau_instmem_create_ 4 38664 NULL -+snd_es1371_wait_src_ready_38673 snd_es1371_wait_src_ready 0 38673 NULL +iscsit_dump_data_payload_38683 iscsit_dump_data_payload 2 38683 NULL +validate_vid_hdr_38699 validate_vid_hdr 0 38699 NULL +rbio_add_io_page_38700 rbio_add_io_page 6 38700 NULL @@ -118437,18 +126282,16 @@ index 0000000..386792a +iwl_dbgfs_thermal_throttling_read_38779 iwl_dbgfs_thermal_throttling_read 3 38779 NULL +bcache_device_init_38781 bcache_device_init 3 38781 NULL +snd_gus_dram_write_38784 snd_gus_dram_write 4 38784 NULL -+do_pci_enable_device_38802 do_pci_enable_device 0 38802 NULL +err_decode_38804 err_decode 2 38804 NULL +ipv6_renew_option_38813 ipv6_renew_option 3 38813 NULL +direct_entry_38836 direct_entry 3 38836 NULL +compat_udp_setsockopt_38840 compat_udp_setsockopt 5 38840 NULL -+read_nic_io_word_38853 read_nic_io_word 0 38853 NULL +interfaces_38859 interfaces 2 38859 NULL +dbgfs_state_38894 dbgfs_state 3 38894 NULL +il_dbgfs_sram_write_38942 il_dbgfs_sram_write 3 38942 NULL +__ath6kl_wmi_send_mgmt_cmd_38971 __ath6kl_wmi_send_mgmt_cmd 7 38971 NULL -+usb_maxpacket_38977 usb_maxpacket 0 38977 NULL nohasharray -+C_SYSC_preadv64_38977 C_SYSC_preadv64 3 38977 &usb_maxpacket_38977 ++C_SYSC_preadv64_38977 C_SYSC_preadv64 3 38977 NULL nohasharray ++usb_maxpacket_38977 usb_maxpacket 0 38977 &C_SYSC_preadv64_38977 +OSDSetBlock_38986 OSDSetBlock 2-4 38986 NULL +bio_clone_range_38997 bio_clone_range 2 38997 NULL +lpfc_idiag_extacc_write_38998 lpfc_idiag_extacc_write 3 38998 NULL @@ -118457,7 +126300,6 @@ index 0000000..386792a +force_sc_support_read_39014 force_sc_support_read 3 39014 NULL +__blkdev_issue_zeroout_39020 __blkdev_issue_zeroout 3 39020 NULL +_zd_iowrite32v_async_locked_39034 _zd_iowrite32v_async_locked 3 39034 NULL -+do_write_kmem_39051 do_write_kmem 0-1-3 39051 NULL +tomoyo_truncate_39105 tomoyo_truncate 0 39105 NULL +leb_write_lock_39111 leb_write_lock 0 39111 NULL +__kfifo_to_user_r_39123 __kfifo_to_user_r 5-3 39123 NULL @@ -118471,7 +126313,6 @@ index 0000000..386792a +qcam_read_bytes_39205 qcam_read_bytes 0 39205 NULL +ivtv_v4l2_write_39226 ivtv_v4l2_write 3 39226 NULL +posix_acl_to_xattr_39237 posix_acl_to_xattr 0 39237 NULL -+snd_pcm_capture_forward_39248 snd_pcm_capture_forward 0-2 39248 NULL +r128_compat_ioctl_39250 r128_compat_ioctl 2 39250 NULL nohasharray +pwr_cont_miss_bcns_spread_read_39250 pwr_cont_miss_bcns_spread_read 3 39250 &r128_compat_ioctl_39250 +i915_error_state_read_39254 i915_error_state_read 3 39254 NULL @@ -118504,7 +126345,6 @@ index 0000000..386792a +batadv_tt_tvlv_generate_39615 batadv_tt_tvlv_generate 4 39615 NULL +nfs_idmap_get_key_39616 nfs_idmap_get_key 2 39616 NULL +sdio_readb_39618 sdio_readb 0 39618 NULL -+prepare_uptodate_page_39622 prepare_uptodate_page 0 39622 NULL +set_dev_class_39645 set_dev_class 4 39645 NULL +snd_rme32_capture_copy_39653 snd_rme32_capture_copy 5 39653 NULL +tcp_try_rmem_schedule_39657 tcp_try_rmem_schedule 3 39657 NULL @@ -118512,7 +126352,6 @@ index 0000000..386792a +v4l_stk_read_39672 v4l_stk_read 3 39672 NULL +hsc_msg_len_get_39673 hsc_msg_len_get 0 39673 NULL +do_surface_dirty_sou_39678 do_surface_dirty_sou 7 39678 NULL -+sd_completed_bytes_39705 sd_completed_bytes 0 39705 NULL +ftrace_pid_write_39710 ftrace_pid_write 3 39710 NULL +adt7316_spi_multi_read_39765 adt7316_spi_multi_read 3 39765 NULL +security_inode_listsecurity_39812 security_inode_listsecurity 0 39812 NULL @@ -118522,10 +126361,9 @@ index 0000000..386792a +read_file_modal_eeprom_39909 read_file_modal_eeprom 3 39909 NULL +gen_pool_add_virt_39913 gen_pool_add_virt 4 39913 NULL +dw210x_op_rw_39915 dw210x_op_rw 6 39915 NULL -+__mnt_want_write_file_39917 __mnt_want_write_file 0 39917 NULL +aes_encrypt_interrupt_read_39919 aes_encrypt_interrupt_read 3 39919 NULL -+exofs_read_kern_39921 exofs_read_kern 6 39921 NULL nohasharray -+oom_score_adj_read_39921 oom_score_adj_read 3 39921 &exofs_read_kern_39921 ++oom_score_adj_read_39921 oom_score_adj_read 3 39921 NULL nohasharray ++exofs_read_kern_39921 exofs_read_kern 6 39921 &oom_score_adj_read_39921 +__spi_async_39932 __spi_async 0 39932 NULL +__get_order_39935 __get_order 0 39935 NULL +error_error_frame_read_39947 error_error_frame_read 3 39947 NULL @@ -118536,7 +126374,6 @@ index 0000000..386792a +broadsheetfb_write_39976 broadsheetfb_write 3 39976 NULL +mthca_array_init_39987 mthca_array_init 2 39987 NULL +fw_device_op_read_39990 fw_device_op_read 3 39990 NULL -+server_name2svname_39998 server_name2svname 4 39998 NULL +xen_hvm_config_40018 xen_hvm_config 2 40018 NULL +ivtvfb_write_40023 ivtvfb_write 3 40023 NULL +disc_pwup_write_40027 disc_pwup_write 3 40027 NULL @@ -118545,7 +126382,6 @@ index 0000000..386792a +l2cap_create_iframe_pdu_40055 l2cap_create_iframe_pdu 3 40055 NULL nohasharray +add_tty_40055 add_tty 1 40055 &l2cap_create_iframe_pdu_40055 +atomic_xchg_40070 atomic_xchg 0 40070 NULL -+snd_pcm_sw_params_user_40095 snd_pcm_sw_params_user 0 40095 NULL +sctp_setsockopt_delayed_ack_40129 sctp_setsockopt_delayed_ack 3 40129 NULL +dwc2_max_desc_num_40132 dwc2_max_desc_num 0 40132 NULL +rx_rx_frame_checksum_read_40140 rx_rx_frame_checksum_read 3 40140 NULL @@ -118588,7 +126424,6 @@ index 0000000..386792a +ima_write_policy_40548 ima_write_policy 3 40548 NULL +esp_alloc_tmp_40558 esp_alloc_tmp 3-2 40558 NULL +get_priv_descr_and_size_40612 get_priv_descr_and_size 0 40612 NULL -+i2c_register_adapter_40660 i2c_register_adapter 0 40660 NULL +twl4030_kpwrite_u8_40665 twl4030_kpwrite_u8 3 40665 NULL +__cfg80211_roamed_40668 __cfg80211_roamed 4-6 40668 NULL +pipeline_rx_complete_stat_fifo_int_read_40671 pipeline_rx_complete_stat_fifo_int_read 3 40671 NULL @@ -118596,10 +126431,8 @@ index 0000000..386792a +idr_get_empty_slot_40674 idr_get_empty_slot 0 40674 NULL +alloc_rbio_40676 alloc_rbio 4 40676 NULL +videobuf_dma_init_user_locked_40678 videobuf_dma_init_user_locked 4-3 40678 NULL -+pci_enable_resources_40680 pci_enable_resources 0 40680 NULL +nfc_hci_set_param_40697 nfc_hci_set_param 5 40697 NULL +__seq_open_private_40715 __seq_open_private 3 40715 NULL -+set_extent_bit_40719 set_extent_bit 0 40719 NULL +of_pdt_build_one_prop_40735 of_pdt_build_one_prop 5 40735 NULL +fuse_readpages_40737 fuse_readpages 4 40737 NULL +xfs_iext_remove_direct_40744 xfs_iext_remove_direct 3 40744 NULL @@ -118628,6 +126461,7 @@ index 0000000..386792a +il_dbgfs_fh_reg_read_40993 il_dbgfs_fh_reg_read 3 40993 NULL +iwl_dbgfs_scan_ant_rxchain_read_40999 iwl_dbgfs_scan_ant_rxchain_read 3 40999 NULL +mac80211_format_buffer_41010 mac80211_format_buffer 2 41010 NULL ++get_pages_alloc_bvec_41012 get_pages_alloc_bvec 0-3 41012 NULL +mtd_block_isbad_41015 mtd_block_isbad 0 41015 NULL +__proc_dobitmasks_41029 __proc_dobitmasks 5 41029 NULL +_req_append_segment_41031 _req_append_segment 2 41031 NULL @@ -118647,8 +126481,6 @@ index 0000000..386792a +v4l2_ctrl_new_int_menu_41151 v4l2_ctrl_new_int_menu 4 41151 NULL +tx_frag_mpdu_alloc_failed_read_41167 tx_frag_mpdu_alloc_failed_read 3 41167 NULL +dvb_ca_write_41171 dvb_ca_write 3 41171 NULL -+netif_get_num_default_rss_queues_41187 netif_get_num_default_rss_queues 0 41187 NULL -+request_irq_41192 request_irq 0 41192 NULL +dfs_file_write_41196 dfs_file_write 3 41196 NULL +nfs_page_array_len_41219 nfs_page_array_len 0-2-1 41219 NULL +cfg80211_process_disassoc_41231 cfg80211_process_disassoc 3 41231 NULL @@ -118672,7 +126504,6 @@ index 0000000..386792a +pcpu_build_alloc_info_41443 pcpu_build_alloc_info 1-2-3 41443 NULL +se_io_cb_41461 se_io_cb 3 41461 NULL +layout_leb_in_gaps_41470 layout_leb_in_gaps 0 41470 NULL -+snd_pcm_status_41472 snd_pcm_status 0 41472 NULL +rt2x00debug_write_rfcsr_41473 rt2x00debug_write_rfcsr 3 41473 NULL +bl_alloc_init_bio_41478 bl_alloc_init_bio 1 41478 NULL +kvm_unmap_hva_range_41484 kvm_unmap_hva_range 3-2 41484 NULL @@ -118683,11 +126514,11 @@ index 0000000..386792a +dm_get_reserved_rq_based_ios_41529 dm_get_reserved_rq_based_ios 0 41529 NULL +tx_tx_frame_checksum_read_41553 tx_tx_frame_checksum_read 3 41553 NULL +ath6kl_endpoint_stats_read_41554 ath6kl_endpoint_stats_read 3 41554 NULL -+nr_status_frames_41559 nr_status_frames 0-1 41559 NULL nohasharray -+si476x_radio_fops_read_41559 si476x_radio_fops_read 3 41559 &nr_status_frames_41559 ++si476x_radio_fops_read_41559 si476x_radio_fops_read 3 41559 NULL nohasharray ++nr_status_frames_41559 nr_status_frames 0-1 41559 &si476x_radio_fops_read_41559 +rng_dev_read_41581 rng_dev_read 3 41581 NULL ++nfsd_readv_41585 nfsd_readv 4 41585 NULL +batadv_tvlv_container_ogm_append_41588 batadv_tvlv_container_ogm_append 4 41588 NULL -+vga_io_r_41609 vga_io_r 0 41609 NULL +tcp_hdrlen_41610 tcp_hdrlen 0 41610 NULL +usb_endpoint_maxp_41613 usb_endpoint_maxp 0 41613 NULL nohasharray +lbs_bcnmiss_write_41613 lbs_bcnmiss_write 3 41613 &usb_endpoint_maxp_41613 @@ -118697,20 +126528,19 @@ index 0000000..386792a +rx_rx_pre_complt_read_41653 rx_rx_pre_complt_read 3 41653 NULL +get_std_timing_41654 get_std_timing 0 41654 NULL +ieee80211_if_fmt_bssid_41677 ieee80211_if_fmt_bssid 3 41677 NULL -+fill_pcm_stream_name_41685 fill_pcm_stream_name 2 41685 NULL +lov_unpackmd_41701 lov_unpackmd 4 41701 NULL +fillonedir_41746 fillonedir 3 41746 NULL +iwl_dbgfs_bt_notif_read_41794 iwl_dbgfs_bt_notif_read 3 41794 NULL +hsi_alloc_controller_41802 hsi_alloc_controller 1 41802 NULL +rtw_android_get_macaddr_41812 rtw_android_get_macaddr 0 41812 NULL +sco_send_frame_41815 sco_send_frame 3 41815 NULL ++copy_page_to_iter_bvec_41830 copy_page_to_iter_bvec 0-3 41830 NULL +ixgbe_dbg_netdev_ops_read_41839 ixgbe_dbg_netdev_ops_read 3 41839 NULL +do_ip_setsockopt_41852 do_ip_setsockopt 5 41852 NULL +keyctl_instantiate_key_41855 keyctl_instantiate_key 3 41855 NULL +pci_map_single_41869 pci_map_single 0 41869 NULL -+v_APCI3120_InterruptDmaMoveBlock16bit_41914 v_APCI3120_InterruptDmaMoveBlock16bit 4 41914 NULL +get_fdb_entries_41916 get_fdb_entries 3 41916 NULL -+ext4_da_write_inline_data_begin_41935 ext4_da_write_inline_data_begin 3-4 41935 NULL ++ext4_da_write_inline_data_begin_41935 ext4_da_write_inline_data_begin 4-3 41935 NULL +sci_rxfill_41945 sci_rxfill 0 41945 NULL +read_gssp_41947 read_gssp 3 41947 NULL +ocfs2_xattr_bucket_get_name_value_41949 ocfs2_xattr_bucket_get_name_value 0 41949 NULL @@ -118739,7 +126569,8 @@ index 0000000..386792a +oprofilefs_str_to_user_42182 oprofilefs_str_to_user 3 42182 NULL +write_file_beacon_42185 write_file_beacon 3 42185 NULL +get_znodes_to_commit_42201 get_znodes_to_commit 0 42201 NULL -+pla_ocp_read_42235 pla_ocp_read 3 42235 NULL ++pla_ocp_read_42235 pla_ocp_read 3 42235 NULL nohasharray ++blockdev_direct_IO_42235 blockdev_direct_IO 5 42235 &pla_ocp_read_42235 +rx_defrag_need_decrypt_read_42253 rx_defrag_need_decrypt_read 3 42253 NULL +find_last_bit_42260 find_last_bit 0 42260 NULL +__pcpu_size_to_slot_42271 __pcpu_size_to_slot 0 42271 NULL @@ -118751,7 +126582,7 @@ index 0000000..386792a +ulong_read_file_42304 ulong_read_file 3 42304 &sctp_setsockopt_del_key_42304 +xfs_vm_readpages_42308 xfs_vm_readpages 4 42308 NULL +hysdn_conf_read_42324 hysdn_conf_read 3 42324 NULL -+tcp_sync_mss_42330 tcp_sync_mss 2-0 42330 NULL ++tcp_sync_mss_42330 tcp_sync_mss 0-2 42330 NULL +ide_raw_taskfile_42355 ide_raw_taskfile 4 42355 NULL +drbd_md_last_sector_42378 drbd_md_last_sector 0 42378 NULL +il_dbgfs_disable_ht40_read_42386 il_dbgfs_disable_ht40_read 3 42386 NULL @@ -118786,12 +126617,10 @@ index 0000000..386792a +dvb_demux_ioctl_42733 dvb_demux_ioctl 2 42733 NULL +set_aoe_iflist_42737 set_aoe_iflist 2 42737 NULL +ax25_setsockopt_42740 ax25_setsockopt 5 42740 NULL -+dpm_sysfs_add_42756 dpm_sysfs_add 0 42756 NULL +x25_recvmsg_42777 x25_recvmsg 4 42777 NULL +snd_midi_event_decode_42780 snd_midi_event_decode 0 42780 NULL +cryptd_hash_setkey_42781 cryptd_hash_setkey 3 42781 NULL nohasharray +isku_sysfs_read_info_42781 isku_sysfs_read_info 6 42781 &cryptd_hash_setkey_42781 -+elfcorehdr_read_notes_42786 elfcorehdr_read_notes 2 42786 NULL +koneplus_sysfs_read_42792 koneplus_sysfs_read 6 42792 NULL +ntfs_attr_extend_allocation_42796 ntfs_attr_extend_allocation 0 42796 NULL +fw_device_op_compat_ioctl_42804 fw_device_op_compat_ioctl 2 42804 NULL @@ -118806,8 +126635,6 @@ index 0000000..386792a +sta_last_rx_rate_read_42909 sta_last_rx_rate_read 3 42909 NULL +sctp_getsockopt_maxburst_42941 sctp_getsockopt_maxburst 2 42941 NULL +vx_reset_chk_42946 vx_reset_chk 0 42946 NULL -+blkdev_direct_IO_42962 blkdev_direct_IO 4 42962 NULL -+ntb_setup_snb_msix_42971 ntb_setup_snb_msix 2-0 42971 NULL +compat_udpv6_setsockopt_42981 compat_udpv6_setsockopt 5 42981 NULL +nfs_idmap_get_desc_42990 nfs_idmap_get_desc 4-2 42990 NULL nohasharray +rtw_os_xmit_resource_alloc_42990 rtw_os_xmit_resource_alloc 3 42990 &nfs_idmap_get_desc_42990 @@ -118816,10 +126643,8 @@ index 0000000..386792a +nouveau_gpuobj_create__43072 nouveau_gpuobj_create_ 9 43072 NULL +nfs_map_group_to_gid_43082 nfs_map_group_to_gid 3 43082 NULL +_xfer_secondary_pool_43089 _xfer_secondary_pool 2 43089 NULL -+sysfs_create_file_ns_43103 sysfs_create_file_ns 0 43103 NULL +ieee80211_if_fmt_drop_unencrypted_43107 ieee80211_if_fmt_drop_unencrypted 3 43107 NULL +calculate_node_totalpages_43118 calculate_node_totalpages 2-3 43118 NULL -+e1000_request_msix_43134 e1000_request_msix 0 43134 NULL +read_file_dfs_43145 read_file_dfs 3 43145 NULL +cfs_cpt_table_alloc_43159 cfs_cpt_table_alloc 1 43159 NULL +usb_string_sub_43164 usb_string_sub 0 43164 NULL @@ -118830,19 +126655,18 @@ index 0000000..386792a +iso_callback_43208 iso_callback 3 43208 NULL +ath10k_p2p_calc_noa_ie_len_43209 ath10k_p2p_calc_noa_ie_len 0 43209 NULL +f2fs_acl_from_disk_43210 f2fs_acl_from_disk 2 43210 NULL -+atomic_long_add_return_43217 atomic_long_add_return 1-0 43217 NULL ++atomic_long_add_return_43217 atomic_long_add_return 1 43217 NULL ++gfs2_direct_IO_43220 gfs2_direct_IO 4 43220 NULL +batadv_tt_tvlv_unicast_handler_v1_43239 batadv_tt_tvlv_unicast_handler_v1 5 43239 NULL +vmemmap_alloc_block_43245 vmemmap_alloc_block 1 43245 NULL +ide_end_rq_43269 ide_end_rq 4 43269 NULL -+nilfs_direct_IO_43271 nilfs_direct_IO 4 43271 NULL +evtchn_write_43278 evtchn_write 3 43278 NULL +filemap_write_and_wait_range_43279 filemap_write_and_wait_range 0 43279 NULL +mpage_alloc_43299 mpage_alloc 3 43299 NULL -+mmu_set_spte_43327 mmu_set_spte 6-7 43327 NULL ++mmu_set_spte_43327 mmu_set_spte 7-6 43327 NULL +__ext4_get_inode_loc_43332 __ext4_get_inode_loc 0 43332 NULL +xenfb_write_43412 xenfb_write 3 43412 NULL -+__alloc_bootmem_low_43423 __alloc_bootmem_low 1 43423 NULL nohasharray -+msi_capability_init_43423 msi_capability_init 0 43423 &__alloc_bootmem_low_43423 ++__alloc_bootmem_low_43423 __alloc_bootmem_low 1 43423 NULL +usb_alloc_urb_43436 usb_alloc_urb 1 43436 NULL +ath6kl_wmi_roam_tbl_event_rx_43440 ath6kl_wmi_roam_tbl_event_rx 3 43440 NULL +usb_string_43443 usb_string 0 43443 NULL nohasharray @@ -118852,15 +126676,14 @@ index 0000000..386792a +nvme_trans_device_id_page_43466 nvme_trans_device_id_page 4 43466 NULL +tx_tx_data_prepared_read_43497 tx_tx_data_prepared_read 3 43497 NULL +ieee80211_if_fmt_dot11MeshHWMPnetDiameterTraversalTime_43505 ieee80211_if_fmt_dot11MeshHWMPnetDiameterTraversalTime 3 43505 NULL ++ll_direct_IO_26_43530 ll_direct_IO_26 4 43530 NULL +dvb_ca_en50221_io_write_43533 dvb_ca_en50221_io_write 3 43533 NULL +read_events_43534 read_events 3 43534 NULL +cachefiles_daemon_write_43535 cachefiles_daemon_write 3 43535 NULL +tx_frag_failed_read_43540 tx_frag_failed_read 3 43540 NULL +rpc_malloc_43573 rpc_malloc 2 43573 NULL -+handle_frequent_errors_43599 handle_frequent_errors 4 43599 NULL +lpfc_idiag_drbacc_read_reg_43606 lpfc_idiag_drbacc_read_reg 0-3 43606 NULL +proc_read_43614 proc_read 3 43614 NULL -+disable_dma_on_even_43618 disable_dma_on_even 0 43618 NULL +alloc_thread_groups_43625 alloc_thread_groups 2 43625 NULL +random_write_43656 random_write 3 43656 NULL +bio_integrity_tag_43658 bio_integrity_tag 3 43658 NULL @@ -118868,15 +126691,15 @@ index 0000000..386792a +write_file_tx99_power_43670 write_file_tx99_power 3 43670 NULL +dmam_declare_coherent_memory_43679 dmam_declare_coherent_memory 4 43679 NULL +max77693_bulk_write_43698 max77693_bulk_write 2-3 43698 NULL ++nvkm_connector_create__43711 nvkm_connector_create_ 6 43711 NULL +drbd_md_first_sector_43729 drbd_md_first_sector 0 43729 NULL +snd_rme32_playback_copy_43732 snd_rme32_playback_copy 5 43732 NULL +fuse_conn_congestion_threshold_write_43736 fuse_conn_congestion_threshold_write 3 43736 NULL +gigaset_initcs_43753 gigaset_initcs 2 43753 NULL +sctp_setsockopt_active_key_43755 sctp_setsockopt_active_key 3 43755 NULL -+generic_file_direct_write_43770 generic_file_direct_write 0 43770 NULL +ocfs2_xattr_get_value_outside_43787 ocfs2_xattr_get_value_outside 0 43787 NULL nohasharray +byte_pos_43787 byte_pos 0 43787 &ocfs2_xattr_get_value_outside_43787 -+btrfs_copy_from_user_43806 btrfs_copy_from_user 3-1-0 43806 NULL ++btrfs_copy_from_user_43806 btrfs_copy_from_user 0-3-1 43806 NULL +ieee80211_if_fmt_element_ttl_43825 ieee80211_if_fmt_element_ttl 3 43825 NULL +ieee80211_alloc_hw_43829 ieee80211_alloc_hw 1 43829 NULL +read_flush_43851 read_flush 3 43851 NULL @@ -118887,10 +126710,9 @@ index 0000000..386792a +__get_required_blob_size_43980 __get_required_blob_size 0-3-2 43980 NULL +nla_reserve_43984 nla_reserve 3 43984 NULL +__clkdev_alloc_43990 __clkdev_alloc 1 43990 NULL -+scsi_command_size_43992 scsi_command_size 0 43992 NULL nohasharray -+bcm_recvmsg_43992 bcm_recvmsg 4 43992 &scsi_command_size_43992 nohasharray -+kvm_read_guest_virt_43992 kvm_read_guest_virt 4-2 43992 &bcm_recvmsg_43992 -+ulist_add_43994 ulist_add 0 43994 NULL ++kvm_read_guest_virt_43992 kvm_read_guest_virt 4-2 43992 NULL nohasharray ++bcm_recvmsg_43992 bcm_recvmsg 4 43992 &kvm_read_guest_virt_43992 nohasharray ++scsi_command_size_43992 scsi_command_size 0 43992 &bcm_recvmsg_43992 +emit_flags_44006 emit_flags 4-3 44006 NULL +write_flush_procfs_44011 write_flush_procfs 3 44011 NULL +fru_strlen_44046 fru_strlen 0 44046 NULL @@ -118899,19 +126721,20 @@ index 0000000..386792a +pci_msix_vec_count_44093 pci_msix_vec_count 0 44093 NULL +xlog_recover_add_to_cont_trans_44102 xlog_recover_add_to_cont_trans 4 44102 NULL +skb_frag_dma_map_44112 skb_frag_dma_map 0 44112 NULL -+tracing_set_trace_read_44122 tracing_set_trace_read 3 44122 NULL nohasharray -+file_remove_suid_44122 file_remove_suid 0 44122 &tracing_set_trace_read_44122 ++nouveau_clock_create__44116 nouveau_clock_create_ 6 44116 NULL ++tracing_set_trace_read_44122 tracing_set_trace_read 3 44122 NULL +SyS_process_vm_writev_44129 SyS_process_vm_writev 3-5 44129 NULL ++tracing_resize_saved_cmdlines_44140 tracing_resize_saved_cmdlines 1 44140 NULL +ttm_get_pages_44142 ttm_get_pages 2 44142 NULL +scsi_get_resid_44147 scsi_get_resid 0 44147 NULL +ubifs_find_dirty_idx_leb_44169 ubifs_find_dirty_idx_leb 0 44169 NULL +ocfs2_xattr_bucket_find_44174 ocfs2_xattr_bucket_find 0 44174 NULL +SYSC_set_mempolicy_44176 SYSC_set_mempolicy 3 44176 NULL +handle_eviocgbit_44193 handle_eviocgbit 3 44193 NULL ++btrfs_item_offset_nr_44220 btrfs_item_offset_nr 0 44220 NULL +srp_alloc_iu_44227 srp_alloc_iu 2 44227 NULL +scsi_track_queue_full_44239 scsi_track_queue_full 2 44239 NULL +sigma_action_write_regmap_44240 sigma_action_write_regmap 3 44240 NULL -+device_create_file_44285 device_create_file 0 44285 NULL +ath6kl_keepalive_read_44303 ath6kl_keepalive_read 3 44303 NULL +bitmap_scnprintf_44318 bitmap_scnprintf 0-2 44318 NULL +dispatch_proc_write_44320 dispatch_proc_write 3 44320 NULL @@ -118922,7 +126745,6 @@ index 0000000..386792a +rts_threshold_read_44384 rts_threshold_read 3 44384 NULL +mtip_hw_read_flags_44396 mtip_hw_read_flags 3 44396 NULL +aoedev_flush_44398 aoedev_flush 2 44398 NULL -+strlcpy_44400 strlcpy 3 44400 NULL +drm_buffer_alloc_44405 drm_buffer_alloc 2 44405 NULL +osst_do_scsi_44410 osst_do_scsi 4 44410 NULL +ieee80211_if_read_rc_rateidx_mcs_mask_5ghz_44423 ieee80211_if_read_rc_rateidx_mcs_mask_5ghz 3 44423 NULL @@ -118938,22 +126760,20 @@ index 0000000..386792a +SyS_io_getevents_44519 SyS_io_getevents 3 44519 NULL +ieee80211_rx_mgmt_assoc_resp_44525 ieee80211_rx_mgmt_assoc_resp 3 44525 NULL +comm_write_44537 comm_write 3 44537 NULL -+snd_pcm_drop_44542 snd_pcm_drop 0 44542 NULL +dgrp_config_proc_write_44571 dgrp_config_proc_write 3 44571 NULL -+btrfs_set_extent_delalloc_44587 btrfs_set_extent_delalloc 0 44587 NULL +nouveau_perfmon_create__44602 nouveau_perfmon_create_ 4 44602 NULL ++xpcs_mmd_write_44633 xpcs_mmd_write 3 44633 NULL +alloc_ctrl_packet_44667 alloc_ctrl_packet 1 44667 NULL +mpi_resize_44674 mpi_resize 2 44674 NULL -+sysfs_create_link_44685 sysfs_create_link 0 44685 NULL +ts_read_44687 ts_read 3 44687 NULL +lov_emerg_alloc_44698 lov_emerg_alloc 1 44698 NULL +C_SYSC_select_44701 C_SYSC_select 1 44701 NULL +__generic_block_fiemap_44713 __generic_block_fiemap 4 44713 NULL nohasharray +xfer_to_user_44713 xfer_to_user 3 44713 &__generic_block_fiemap_44713 ++nft_hash_tbl_size_44724 nft_hash_tbl_size 0 44724 NULL +_zd_iowrite32v_locked_44725 _zd_iowrite32v_locked 3 44725 NULL +clusterip_proc_write_44729 clusterip_proc_write 3 44729 NULL +fib_count_nexthops_44730 fib_count_nexthops 0 44730 NULL -+efx_wanted_parallelism_44732 efx_wanted_parallelism 0 44732 NULL +key_tx_rx_count_read_44742 key_tx_rx_count_read 3 44742 NULL +bch_bio_max_sectors_44755 bch_bio_max_sectors 0 44755 NULL +tnode_new_44757 tnode_new 3 44757 NULL nohasharray @@ -118980,7 +126800,6 @@ index 0000000..386792a +bytepos_delta_45017 bytepos_delta 0 45017 NULL +ptrace_writedata_45021 ptrace_writedata 4 45021 NULL +dm_kvzalloc_45025 dm_kvzalloc 1 45025 NULL -+sysfs_do_create_link_sd_45057 sysfs_do_create_link_sd 0 45057 NULL +sel_write_user_45060 sel_write_user 3 45060 NULL +snd_mixart_BA0_read_45069 snd_mixart_BA0_read 5 45069 NULL +snd_card_new_45104 snd_card_new 5 45104 NULL @@ -119013,9 +126832,9 @@ index 0000000..386792a +ieee80211_if_fmt_dot11MeshHWMProotInterval_45421 ieee80211_if_fmt_dot11MeshHWMProotInterval 3 45421 NULL +ll_iocontrol_register_45430 ll_iocontrol_register 2 45430 NULL +tty_buffer_alloc_45437 tty_buffer_alloc 2 45437 NULL ++blkdev_direct_IO_45440 blkdev_direct_IO 4 45440 NULL +rds_ib_set_wr_signal_state_45463 rds_ib_set_wr_signal_state 0 45463 NULL +tracing_read_dyn_info_45468 tracing_read_dyn_info 3 45468 NULL -+snd_pcm_hwsync_45479 snd_pcm_hwsync 0 45479 NULL +rds_message_copy_from_user_45510 rds_message_copy_from_user 3 45510 NULL +copy_macs_45534 copy_macs 4 45534 NULL +nla_attr_size_45545 nla_attr_size 0-1 45545 NULL @@ -119046,7 +126865,6 @@ index 0000000..386792a +ll_max_readahead_mb_seq_write_45815 ll_max_readahead_mb_seq_write 3 45815 NULL +memcg_update_cache_size_45828 memcg_update_cache_size 2 45828 NULL +ipv6_recv_rxpmtu_45830 ipv6_recv_rxpmtu 3 45830 NULL -+insert_state_45848 insert_state 0 45848 NULL +x509_process_extension_45854 x509_process_extension 5 45854 NULL +efx_tx_queue_insert_45859 efx_tx_queue_insert 2 45859 NULL +isdn_write_45863 isdn_write 3 45863 NULL @@ -119057,17 +126875,15 @@ index 0000000..386792a +dbgfs_frame_45917 dbgfs_frame 3 45917 NULL +btree_keys_cachelines_45928 btree_keys_cachelines 0 45928 NULL +alloc_mr_45935 alloc_mr 1 45935 NULL -+copy_to_45969 copy_to 3 45969 NULL +rb_simple_read_45972 rb_simple_read 3 45972 NULL +ioat2_dca_count_dca_slots_45984 ioat2_dca_count_dca_slots 0 45984 NULL -+kobject_init_and_add_46003 kobject_init_and_add 0 46003 NULL +sierra_setup_urb_46029 sierra_setup_urb 5 46029 NULL -+get_free_entries_46030 get_free_entries 1 46030 NULL nohasharray -+fnic_reset_stats_read_46030 fnic_reset_stats_read 3 46030 &get_free_entries_46030 ++fnic_reset_stats_read_46030 fnic_reset_stats_read 3 46030 NULL nohasharray ++get_free_entries_46030 get_free_entries 1 46030 &fnic_reset_stats_read_46030 +__access_remote_vm_46031 __access_remote_vm 0 46031 NULL +snd_emu10k1x_ptr_read_46049 snd_emu10k1x_ptr_read 0 46049 NULL -+__ocfs2_move_extent_46060 __ocfs2_move_extent 3-4 46060 NULL nohasharray -+dma_tx_errors_read_46060 dma_tx_errors_read 3 46060 &__ocfs2_move_extent_46060 ++dma_tx_errors_read_46060 dma_tx_errors_read 3 46060 NULL nohasharray ++__ocfs2_move_extent_46060 __ocfs2_move_extent 3-4 46060 &dma_tx_errors_read_46060 +sel_commit_bools_write_46077 sel_commit_bools_write 3 46077 NULL +memcg_update_array_size_46111 memcg_update_array_size 1 46111 NULL nohasharray +il3945_ucode_general_stats_read_46111 il3945_ucode_general_stats_read 3 46111 &memcg_update_array_size_46111 @@ -119092,7 +126908,6 @@ index 0000000..386792a +__hwahc_dev_set_key_46328 __hwahc_dev_set_key 5 46328 &compat_SyS_readv_46328 +iwl_dbgfs_chain_noise_read_46355 iwl_dbgfs_chain_noise_read 3 46355 NULL +smk_write_direct_46363 smk_write_direct 3 46363 NULL -+fuse_file_aio_write_46399 fuse_file_aio_write 4 46399 NULL +crypto_ablkcipher_reqsize_46411 crypto_ablkcipher_reqsize 0 46411 NULL +ttm_page_pool_get_pages_46431 ttm_page_pool_get_pages 0-5 46431 NULL +cfs_power2_roundup_46433 cfs_power2_roundup 0-1 46433 NULL @@ -119102,17 +126917,17 @@ index 0000000..386792a +fill_in_write_vector_46498 fill_in_write_vector 0 46498 NULL +pin_code_reply_46510 pin_code_reply 4 46510 NULL +mthca_alloc_cq_buf_46512 mthca_alloc_cq_buf 3 46512 NULL -+nouveau_drm_ioctl_46514 nouveau_drm_ioctl 2 46514 NULL nohasharray -+kmsg_read_46514 kmsg_read 3 46514 &nouveau_drm_ioctl_46514 ++kmsg_read_46514 kmsg_read 3 46514 NULL nohasharray ++nouveau_drm_ioctl_46514 nouveau_drm_ioctl 2 46514 &kmsg_read_46514 +nl80211_send_rx_assoc_46538 nl80211_send_rx_assoc 4 46538 NULL ++__btrfs_free_extent_46573 __btrfs_free_extent 7 46573 NULL +dn_current_mss_46574 dn_current_mss 0 46574 NULL +serverworks_create_gatt_pages_46582 serverworks_create_gatt_pages 1 46582 NULL +snd_compr_write_data_46592 snd_compr_write_data 3 46592 NULL -+il3945_stats_flag_46606 il3945_stats_flag 0-3 46606 NULL ++il3945_stats_flag_46606 il3945_stats_flag 3-0 46606 NULL +vscnprintf_46617 vscnprintf 0-2 46617 NULL +__kfifo_out_r_46623 __kfifo_out_r 0-3 46623 NULL +request_key_async_with_auxdata_46624 request_key_async_with_auxdata 4 46624 NULL -+pci_enable_device_46642 pci_enable_device 0 46642 NULL +vfs_getxattr_alloc_46649 vfs_getxattr_alloc 0 46649 NULL +e1000_tx_map_46672 e1000_tx_map 4 46672 NULL +l2cap_create_le_flowctl_pdu_46682 l2cap_create_le_flowctl_pdu 3 46682 NULL @@ -119124,7 +126939,6 @@ index 0000000..386792a +read_file_tx99_46741 read_file_tx99 3 46741 NULL +hest_ghes_dev_register_46766 hest_ghes_dev_register 1 46766 NULL +int_hw_irq_en_46776 int_hw_irq_en 3 46776 NULL -+_xfs_buf_get_pages_46811 _xfs_buf_get_pages 2 46811 NULL +xfs_iroot_realloc_46826 xfs_iroot_realloc 2 46826 NULL +shmem_pwrite_fast_46842 shmem_pwrite_fast 3 46842 NULL +spi_async_46857 spi_async 0 46857 NULL @@ -119135,21 +126949,19 @@ index 0000000..386792a +ixgbe_dbg_reg_ops_write_46895 ixgbe_dbg_reg_ops_write 3 46895 NULL +sk_mem_pages_46896 sk_mem_pages 0-1 46896 NULL +ieee80211_if_fmt_power_mode_46906 ieee80211_if_fmt_power_mode 3 46906 NULL -+wlcore_alloc_hw_46917 wlcore_alloc_hw 3-1 46917 NULL ++wlcore_alloc_hw_46917 wlcore_alloc_hw 1-3 46917 NULL +fb_write_46924 fb_write 3 46924 NULL +__sctp_setsockopt_connectx_46949 __sctp_setsockopt_connectx 3 46949 NULL +qla4xxx_post_aen_work_46953 qla4xxx_post_aen_work 3 46953 NULL +SYSC_poll_46965 SYSC_poll 2 46965 NULL +crypto_tfm_alg_alignmask_46971 crypto_tfm_alg_alignmask 0 46971 NULL +mgmt_pending_add_46976 mgmt_pending_add 5 46976 NULL -+strlcat_46985 strlcat 3 46985 NULL +bitmap_file_clear_bit_46990 bitmap_file_clear_bit 2 46990 NULL +sel_write_bool_46996 sel_write_bool 3 46996 NULL +blk_rq_map_kern_47004 blk_rq_map_kern 4 47004 NULL +cx231xx_init_bulk_47024 cx231xx_init_bulk 3-2-4 47024 NULL +fs_path_len_47060 fs_path_len 0 47060 NULL +event_trigger_regex_write_47067 event_trigger_regex_write 3 47067 NULL -+ext4_xattr_list_entries_47070 ext4_xattr_list_entries 0 47070 NULL +pipeline_dec_packet_in_read_47076 pipeline_dec_packet_in_read 3 47076 NULL +scsi_deactivate_tcq_47086 scsi_deactivate_tcq 2 47086 NULL +iwl_dump_nic_event_log_47089 iwl_dump_nic_event_log 0 47089 NULL @@ -119160,13 +126972,11 @@ index 0000000..386792a +ses_recv_diag_47143 ses_recv_diag 4 47143 &acpi_ut_initialize_buffer_47143 +mxms_headerlen_47161 mxms_headerlen 0 47161 NULL +rs_sta_dbgfs_rate_scale_data_read_47165 rs_sta_dbgfs_rate_scale_data_read 3 47165 NULL -+rts51x_ms_rw_47171 rts51x_ms_rw 3-4 47171 NULL +options_write_47243 options_write 3 47243 NULL +portcntrs_1_read_47253 portcntrs_1_read 3 47253 NULL +ablkcipher_next_slow_47274 ablkcipher_next_slow 4-3 47274 NULL +gfs2_readpages_47285 gfs2_readpages 4 47285 NULL +vsnprintf_47291 vsnprintf 0 47291 NULL -+SYSC_semop_47292 SYSC_semop 3 47292 NULL +tx_internal_desc_overflow_read_47300 tx_internal_desc_overflow_read 3 47300 NULL +nouveau_fb_create__47316 nouveau_fb_create_ 4 47316 NULL +ieee80211_if_read_dot11MeshHoldingTimeout_47356 ieee80211_if_read_dot11MeshHoldingTimeout 3 47356 NULL @@ -119174,8 +126984,8 @@ index 0000000..386792a +kvm_arch_create_memslot_47364 kvm_arch_create_memslot 3 47364 NULL nohasharray +__output_copy_user_47364 __output_copy_user 3 47364 &kvm_arch_create_memslot_47364 +__bio_map_kern_47379 __bio_map_kern 3 47379 NULL -+nv_rd32_47390 nv_rd32 0 47390 NULL nohasharray -+trace_options_core_read_47390 trace_options_core_read 3 47390 &nv_rd32_47390 ++trace_options_core_read_47390 trace_options_core_read 3 47390 NULL nohasharray ++nv_rd32_47390 nv_rd32 0 47390 &trace_options_core_read_47390 +nametbl_list_47391 nametbl_list 2 47391 NULL +dgrp_net_write_47392 dgrp_net_write 3 47392 NULL +pfkey_sendmsg_47394 pfkey_sendmsg 4 47394 NULL @@ -119184,20 +126994,19 @@ index 0000000..386792a +crypto_ablkcipher_alignmask_47410 crypto_ablkcipher_alignmask 0 47410 NULL +lbs_wrrf_write_47418 lbs_wrrf_write 3 47418 NULL +C_SYSC_set_mempolicy_47466 C_SYSC_set_mempolicy 3 47466 NULL ++lprocfs_fid_write_common_47471 lprocfs_fid_write_common 2 47471 NULL +nvme_trans_send_fw_cmd_47479 nvme_trans_send_fw_cmd 4 47479 NULL +newpart_47485 newpart 6-4 47485 NULL +mcp23s17_read_regs_47491 mcp23s17_read_regs 4 47491 NULL +core_sys_select_47494 core_sys_select 1 47494 NULL +as3722_block_write_47503 as3722_block_write 2-3 47503 NULL -+alloc_arraycache_47505 alloc_arraycache 2 47505 NULL +unlink_simple_47506 unlink_simple 3 47506 NULL +pstore_decompress_47510 pstore_decompress 0 47510 NULL ++ec_i2c_count_response_47518 ec_i2c_count_response 0 47518 NULL +__proc_lnet_portal_rotor_47529 __proc_lnet_portal_rotor 5 47529 NULL -+snd_pcm_resume_47530 snd_pcm_resume 0 47530 NULL +process_vm_rw_47533 process_vm_rw 3-5 47533 NULL nohasharray +vscnprintf_47533 vscnprintf 0-2 47533 &process_vm_rw_47533 +ieee80211_if_fmt_min_discovery_timeout_47539 ieee80211_if_fmt_min_discovery_timeout 3 47539 NULL -+rtw_cfg80211_set_assoc_resp_wpsp2pie_47558 rtw_cfg80211_set_assoc_resp_wpsp2pie 3 47558 NULL +read_ldt_47570 read_ldt 2 47570 NULL +isku_sysfs_read_last_set_47572 isku_sysfs_read_last_set 6 47572 NULL +btrfs_stack_header_bytenr_47589 btrfs_stack_header_bytenr 0 47589 NULL @@ -119207,9 +127016,7 @@ index 0000000..386792a +twl4030_clear_set_47624 twl4030_clear_set 4 47624 NULL +ccp_sha_setkey_47633 ccp_sha_setkey 3 47633 NULL +get_size_47644 get_size 1-2 47644 NULL -+snd_pcm_info_47699 snd_pcm_info 0 47699 NULL -+packet_recvmsg_47700 packet_recvmsg 4 47700 NULL nohasharray -+ipath_format_hwmsg_47700 ipath_format_hwmsg 2 47700 &packet_recvmsg_47700 ++packet_recvmsg_47700 packet_recvmsg 4 47700 NULL +save_microcode_47717 save_microcode 3 47717 NULL +bits_to_user_47733 bits_to_user 2-3 47733 NULL +carl9170_debugfs_read_47738 carl9170_debugfs_read 3 47738 NULL @@ -119230,8 +127037,6 @@ index 0000000..386792a +cfs_percpt_alloc_47918 cfs_percpt_alloc 2 47918 NULL +comedi_write_47926 comedi_write 3 47926 NULL +nvme_trans_get_blk_desc_len_47946 nvme_trans_get_blk_desc_len 0-2 47946 NULL -+arch_setup_msi_irq_47959 arch_setup_msi_irq 0 47959 NULL -+gether_get_ifname_47972 gether_get_ifname 3 47972 NULL +mempool_resize_47983 mempool_resize 2 47983 NULL nohasharray +iwl_dbgfs_ucode_tracing_read_47983 iwl_dbgfs_ucode_tracing_read 3 47983 &mempool_resize_47983 +dbg_port_buf_47990 dbg_port_buf 2 47990 NULL @@ -119260,7 +127065,6 @@ index 0000000..386792a +cfg80211_process_deauth_48200 cfg80211_process_deauth 3 48200 NULL +ext4_index_trans_blocks_48205 ext4_index_trans_blocks 0-2 48205 NULL +snd_seq_dump_var_event_48209 snd_seq_dump_var_event 0 48209 NULL -+ll_direct_IO_26_48216 ll_direct_IO_26 4 48216 NULL +uv_blade_nr_possible_cpus_48226 uv_blade_nr_possible_cpus 0 48226 NULL +nilfs_readpages_48229 nilfs_readpages 4 48229 NULL +read_file_recv_48232 read_file_recv 3 48232 NULL @@ -119279,13 +127083,12 @@ index 0000000..386792a +lbs_debugfs_write_48413 lbs_debugfs_write 3 48413 NULL +uhid_event_from_user_48417 uhid_event_from_user 2 48417 NULL +div64_u64_rem_48418 div64_u64_rem 0-1-2 48418 NULL -+snd_power_wait_48422 snd_power_wait 0 48422 NULL +pwr_tx_without_ps_read_48423 pwr_tx_without_ps_read 3 48423 NULL +print_filtered_48442 print_filtered 2-0 48442 NULL +tun_recvmsg_48463 tun_recvmsg 4 48463 NULL ++copy_page_from_iter_iovec_48466 copy_page_from_iter_iovec 3-0 48466 NULL +compat_SyS_preadv64_48469 compat_SyS_preadv64 3 48469 NULL +_iwl_dbgfs_bt_tx_prio_write_48473 _iwl_dbgfs_bt_tx_prio_write 3 48473 NULL -+ipath_format_hwerrors_48487 ipath_format_hwerrors 5 48487 NULL +r8712_usbctrl_vendorreq_48489 r8712_usbctrl_vendorreq 6 48489 NULL +send_control_msg_48498 send_control_msg 6 48498 NULL +count_masked_bytes_48507 count_masked_bytes 0-1 48507 NULL @@ -119296,12 +127099,12 @@ index 0000000..386792a +raid10_size_48571 raid10_size 0-2-3 48571 NULL +llog_data_len_48607 llog_data_len 1 48607 NULL +do_ip_vs_set_ctl_48641 do_ip_vs_set_ctl 4 48641 NULL ++kernel_sock_ioctl_48644 kernel_sock_ioctl 0 48644 NULL +ll_rw_extents_stats_pp_seq_write_48651 ll_rw_extents_stats_pp_seq_write 3 48651 NULL +mtd_read_48655 mtd_read 0 48655 NULL +aes_encrypt_packets_read_48666 aes_encrypt_packets_read 3 48666 NULL +sm501_create_subdev_48668 sm501_create_subdev 3-4 48668 NULL +ubi_eba_unmap_leb_48671 ubi_eba_unmap_leb 0 48671 NULL -+security_inode_setattr_48689 security_inode_setattr 0 48689 NULL +hysdn_log_write_48694 hysdn_log_write 3 48694 NULL +altera_drscan_48698 altera_drscan 2 48698 NULL +kvm_set_irq_routing_48704 kvm_set_irq_routing 3 48704 NULL @@ -119310,13 +127113,11 @@ index 0000000..386792a +ath6kl_usb_bmi_read_48745 ath6kl_usb_bmi_read 3 48745 NULL +ath6kl_regwrite_read_48747 ath6kl_regwrite_read 3 48747 NULL +l2cap_segment_sdu_48772 l2cap_segment_sdu 4 48772 NULL -+gfs2_direct_IO_48774 gfs2_direct_IO 4 48774 NULL +il3945_sta_dbgfs_stats_table_read_48802 il3945_sta_dbgfs_stats_table_read 3 48802 NULL +twa_change_queue_depth_48808 twa_change_queue_depth 2 48808 NULL +atomic_counters_read_48827 atomic_counters_read 3 48827 NULL +azx_get_position_48841 azx_get_position 0 48841 NULL +vc_do_resize_48842 vc_do_resize 3-4 48842 NULL -+comedi_buf_write_alloc_48846 comedi_buf_write_alloc 0-2 48846 NULL +suspend_dtim_interval_write_48854 suspend_dtim_interval_write 3 48854 NULL +C_SYSC_pwritev64_48864 C_SYSC_pwritev64 3 48864 NULL nohasharray +viafb_dvp1_proc_write_48864 viafb_dvp1_proc_write 3 48864 &C_SYSC_pwritev64_48864 @@ -119325,12 +127126,12 @@ index 0000000..386792a +joydev_handle_JSIOCSAXMAP_48898 joydev_handle_JSIOCSAXMAP 3 48898 NULL +xdi_copy_to_user_48900 xdi_copy_to_user 4 48900 NULL +msg_hdr_sz_48908 msg_hdr_sz 0 48908 NULL -+snd_pcm_update_hw_ptr_48925 snd_pcm_update_hw_ptr 0 48925 NULL +sep_crypto_dma_48937 sep_crypto_dma 0 48937 NULL +si5351_write_parameters_48940 si5351_write_parameters 2 48940 NULL +event_heart_beat_read_48961 event_heart_beat_read 3 48961 NULL +nand_ecc_test_run_48966 nand_ecc_test_run 1 48966 NULL +vmci_handle_arr_create_48971 vmci_handle_arr_create 1 48971 NULL ++nilfs_direct_IO_48981 nilfs_direct_IO 4 48981 NULL +rds_rm_size_48996 rds_rm_size 0-2 48996 NULL +sel_write_enforce_48998 sel_write_enforce 3 48998 NULL +null_alloc_rs_49019 null_alloc_rs 2 49019 NULL @@ -119341,16 +127142,14 @@ index 0000000..386792a +compat_do_readv_writev_49102 compat_do_readv_writev 4 49102 NULL +xfrm_replay_state_esn_len_49119 xfrm_replay_state_esn_len 0 49119 NULL +ll_max_cached_mb_seq_write_49122 ll_max_cached_mb_seq_write 3 49122 NULL -+pt_read_49136 pt_read 3 49136 NULL nohasharray -+netxen_setup_msi_interrupts_49136 netxen_setup_msi_interrupts 2 49136 &pt_read_49136 ++pt_read_49136 pt_read 3 49136 NULL +ipwireless_tty_received_49154 ipwireless_tty_received 3 49154 NULL +f2fs_acl_count_49155 f2fs_acl_count 0-1 49155 NULL +ipw_queue_tx_init_49161 ipw_queue_tx_init 3 49161 NULL +__jfs_setxattr_49175 __jfs_setxattr 5 49175 NULL +ath6kl_bgscan_int_write_49178 ath6kl_bgscan_int_write 3 49178 NULL +dvb_dvr_ioctl_49182 dvb_dvr_ioctl 2 49182 NULL -+print_queue_49191 print_queue 0-4 49191 NULL -+root_nfs_cat_49192 root_nfs_cat 3 49192 NULL ++print_queue_49191 print_queue 4-0 49191 NULL +iwl_dbgfs_ucode_general_stats_read_49199 iwl_dbgfs_ucode_general_stats_read 3 49199 NULL +il4965_rs_sta_dbgfs_stats_table_read_49206 il4965_rs_sta_dbgfs_stats_table_read 3 49206 NULL +do_jffs2_getxattr_49210 do_jffs2_getxattr 0 49210 NULL @@ -119362,7 +127161,7 @@ index 0000000..386792a +viafb_dfph_proc_write_49288 viafb_dfph_proc_write 3 49288 NULL +uio_read_49300 uio_read 3 49300 NULL +isku_sysfs_read_keys_macro_49312 isku_sysfs_read_keys_macro 6 49312 NULL -+SYSC_mincore_49319 SYSC_mincore 2-1 49319 NULL ++SYSC_mincore_49319 SYSC_mincore 1-2 49319 NULL +fwtty_port_handler_49327 fwtty_port_handler 9 49327 NULL +srpt_alloc_ioctx_ring_49330 srpt_alloc_ioctx_ring 2-4-3 49330 NULL +joydev_ioctl_common_49359 joydev_ioctl_common 2 49359 NULL @@ -119382,7 +127181,6 @@ index 0000000..386792a +smk_write_access_49561 smk_write_access 3 49561 NULL +alloc_chunk_49575 alloc_chunk 1 49575 NULL +sctp_setsockopt_default_send_param_49578 sctp_setsockopt_default_send_param 3 49578 NULL -+evm_inode_setattr_49594 evm_inode_setattr 0 49594 NULL +tap_write_49595 tap_write 3 49595 NULL +isr_wakeups_read_49607 isr_wakeups_read 3 49607 NULL +btrfs_mksubvol_49616 btrfs_mksubvol 3 49616 NULL @@ -119390,9 +127188,9 @@ index 0000000..386792a +smk_write_doi_49621 smk_write_doi 3 49621 NULL +port_fops_read_49626 port_fops_read 3 49626 NULL +btrfsic_cmp_log_and_dev_bytenr_49628 btrfsic_cmp_log_and_dev_bytenr 2 49628 NULL -+aa_simple_write_to_buffer_49683 aa_simple_write_to_buffer 3-4 49683 NULL ++__swab32p_49657 __swab32p 0 49657 NULL ++aa_simple_write_to_buffer_49683 aa_simple_write_to_buffer 4-3 49683 NULL +SyS_pwritev_49688 SyS_pwritev 3 49688 NULL -+__setup_irq_49696 __setup_irq 0 49696 NULL +__copy_from_user_nocheck_49699 __copy_from_user_nocheck 0-3 49699 NULL +cx2341x_ctrl_new_menu_49700 cx2341x_ctrl_new_menu 3 49700 NULL +write_pool_49718 write_pool 3 49718 NULL @@ -119400,7 +127198,7 @@ index 0000000..386792a +sep_create_dcb_dmatables_context_kernel_49728 sep_create_dcb_dmatables_context_kernel 6 49728 NULL +zd_usb_iowrite16v_49744 zd_usb_iowrite16v 3 49744 NULL +btrfs_chunk_num_stripes_49751 btrfs_chunk_num_stripes 0 49751 NULL -+fuse_wr_pages_49753 fuse_wr_pages 0-2-1 49753 NULL ++fuse_wr_pages_49753 fuse_wr_pages 0-1-2 49753 NULL +key_conf_keylen_read_49758 key_conf_keylen_read 3 49758 NULL +fuse_conn_waiting_read_49762 fuse_conn_waiting_read 3 49762 NULL +ceph_osdc_readpages_49789 ceph_osdc_readpages 0 49789 NULL @@ -119425,22 +127223,20 @@ index 0000000..386792a +ioread8_50049 ioread8 0 50049 NULL +fuse_conn_max_background_write_50061 fuse_conn_max_background_write 3 50061 NULL +__kfifo_dma_in_prepare_50081 __kfifo_dma_in_prepare 4 50081 NULL -+dev_set_alias_50084 dev_set_alias 3 50084 NULL +libcfs_ioctl_popdata_50087 libcfs_ioctl_popdata 3 50087 NULL +sock_setsockopt_50088 sock_setsockopt 5 50088 NULL +altera_swap_dr_50090 altera_swap_dr 2 50090 NULL +android_set_cntry_50100 android_set_cntry 0 50100 NULL +read_file_slot_50111 read_file_slot 3 50111 NULL +rx_streaming_interval_write_50120 rx_streaming_interval_write 3 50120 NULL -+jfs_direct_IO_50125 jfs_direct_IO 4 50125 NULL +SYSC_preadv_50134 SYSC_preadv 3 50134 NULL +tx_frag_need_fragmentation_read_50153 tx_frag_need_fragmentation_read 3 50153 NULL +kmalloc_node_50163 kmalloc_node 1 50163 NULL +rx_filter_ibss_filter_read_50167 rx_filter_ibss_filter_read 3 50167 NULL +ahd_probe_stack_size_50168 ahd_probe_stack_size 0 50168 NULL +odev_update_50169 odev_update 2 50169 NULL -+ubi_resize_volume_50172 ubi_resize_volume 2 50172 NULL nohasharray -+ieee80211_if_fmt_dot11MeshHWMPRannInterval_50172 ieee80211_if_fmt_dot11MeshHWMPRannInterval 3 50172 &ubi_resize_volume_50172 ++ieee80211_if_fmt_dot11MeshHWMPRannInterval_50172 ieee80211_if_fmt_dot11MeshHWMPRannInterval 3 50172 NULL nohasharray ++ubi_resize_volume_50172 ubi_resize_volume 2 50172 &ieee80211_if_fmt_dot11MeshHWMPRannInterval_50172 +cfg80211_roamed_bss_50198 cfg80211_roamed_bss 4-6 50198 NULL +cyttsp4_probe_50201 cyttsp4_probe 4 50201 NULL +rx_rx_timeout_wa_read_50204 rx_rx_timeout_wa_read 3 50204 NULL @@ -119467,7 +127263,6 @@ index 0000000..386792a +validate_acl_mac_addrs_50429 validate_acl_mac_addrs 0 50429 NULL +btrfs_error_discard_extent_50444 btrfs_error_discard_extent 2 50444 NULL +pgctrl_write_50453 pgctrl_write 3 50453 NULL -+device_create_sys_dev_entry_50458 device_create_sys_dev_entry 0 50458 NULL +cfs_size_round_50472 cfs_size_round 0-1 50472 NULL +cdrom_read_cdda_50478 cdrom_read_cdda 4 50478 NULL +mei_io_cb_alloc_req_buf_50493 mei_io_cb_alloc_req_buf 2 50493 NULL @@ -119490,8 +127285,6 @@ index 0000000..386792a +__ext3_get_inode_loc_50744 __ext3_get_inode_loc 0 50744 NULL +ocfs2_xattr_block_get_50773 ocfs2_xattr_block_get 0 50773 NULL +tm6000_read_write_usb_50774 tm6000_read_write_usb 7 50774 NULL -+bio_alloc_map_data_50782 bio_alloc_map_data 2 50782 NULL -+ixgbe_acquire_msix_vectors_50789 ixgbe_acquire_msix_vectors 2 50789 NULL +tpm_write_50798 tpm_write 3 50798 NULL +tun_do_read_50800 tun_do_read 4 50800 NULL +write_flush_50803 write_flush 3 50803 NULL @@ -119499,6 +127292,7 @@ index 0000000..386792a +btrfs_stack_file_extent_disk_num_bytes_50825 btrfs_stack_file_extent_disk_num_bytes 0 50825 NULL +dpcm_show_state_50827 dpcm_show_state 0 50827 NULL +SetArea_50835 SetArea 4 50835 NULL ++nft_trans_alloc_50836 nft_trans_alloc 3 50836 NULL +videobuf_dma_init_user_50839 videobuf_dma_init_user 4-3 50839 NULL +self_check_write_50856 self_check_write 0 50856 NULL +carl9170_debugfs_write_50857 carl9170_debugfs_write 3 50857 NULL @@ -119514,8 +127308,7 @@ index 0000000..386792a +virtio_cread16_50951 virtio_cread16 0 50951 NULL +sdio_uart_write_50954 sdio_uart_write 3 50954 NULL +SyS_setxattr_50957 SyS_setxattr 4 50957 NULL -+of_modalias_node_50975 of_modalias_node 3 50975 NULL -+iwl_statistics_flag_50981 iwl_statistics_flag 0-3 50981 NULL ++iwl_statistics_flag_50981 iwl_statistics_flag 3-0 50981 NULL +timeout_write_50991 timeout_write 3 50991 NULL +proc_write_51003 proc_write 3 51003 NULL +jbd2_journal_extend_51012 jbd2_journal_extend 2 51012 NULL @@ -119533,7 +127326,6 @@ index 0000000..386792a +alloc_rtllib_51136 alloc_rtllib 1 51136 NULL +simple_xattr_set_51140 simple_xattr_set 4 51140 NULL +xfs_trans_get_efd_51148 xfs_trans_get_efd 3 51148 NULL -+snd_pcm_unlink_51210 snd_pcm_unlink 0 51210 NULL +iwl_dbgfs_bcast_filters_macs_read_51231 iwl_dbgfs_bcast_filters_macs_read 3 51231 NULL +nf_ct_ext_create_51232 nf_ct_ext_create 3 51232 NULL +snd_pcm_write_51235 snd_pcm_write 3 51235 NULL @@ -119548,6 +127340,7 @@ index 0000000..386792a +init_map_ipmac_51317 init_map_ipmac 5 51317 NULL +alloc_hippi_dev_51320 alloc_hippi_dev 1 51320 NULL +ext2_xattr_get_51327 ext2_xattr_get 0 51327 NULL ++smk_write_ptrace_51333 smk_write_ptrace 3 51333 NULL +alloc_smp_req_51337 alloc_smp_req 1 51337 NULL +ipw_get_event_log_len_51341 ipw_get_event_log_len 0 51341 NULL +ieee80211_if_fmt_estab_plinks_51370 ieee80211_if_fmt_estab_plinks 3 51370 NULL @@ -119557,7 +127350,6 @@ index 0000000..386792a +hfsplus_brec_read_51436 hfsplus_brec_read 0 51436 NULL +ieee80211_if_read_dot11MeshHWMPRootMode_51441 ieee80211_if_read_dot11MeshHWMPRootMode 3 51441 NULL +print_devstats_dot11ACKFailureCount_51443 print_devstats_dot11ACKFailureCount 3 51443 NULL -+vmxnet3_acquire_msix_vectors_51462 vmxnet3_acquire_msix_vectors 2 51462 NULL +____alloc_ei_netdev_51475 ____alloc_ei_netdev 1 51475 NULL +xfs_buf_get_uncached_51477 xfs_buf_get_uncached 2 51477 NULL +kvm_fetch_guest_virt_51493 kvm_fetch_guest_virt 4-2 51493 NULL @@ -119602,11 +127394,9 @@ index 0000000..386792a +xfrm_alg_len_51940 xfrm_alg_len 0 51940 NULL +scsi_get_vpd_page_51951 scsi_get_vpd_page 4 51951 NULL +snd_mask_min_51969 snd_mask_min 0 51969 NULL -+__blkdev_get_51972 __blkdev_get 0 51972 NULL +get_zone_51981 get_zone 0-1 51981 NULL +ath6kl_sdio_alloc_prep_scat_req_51986 ath6kl_sdio_alloc_prep_scat_req 2 51986 NULL +dwc3_mode_write_51997 dwc3_mode_write 3 51997 NULL -+scsi_sysfs_add_host_52010 scsi_sysfs_add_host 0 52010 NULL +skb_copy_datagram_from_iovec_52014 skb_copy_datagram_from_iovec 4-2-5 52014 NULL +rdmalt_52022 rdmalt 0 52022 NULL +override_release_52032 override_release 2 52032 NULL @@ -119618,11 +127408,9 @@ index 0000000..386792a +isofs_readpages_52067 isofs_readpages 4 52067 NULL +mxuport_process_read_urb_data_52072 mxuport_process_read_urb_data 3 52072 NULL +nsm_get_handle_52089 nsm_get_handle 4 52089 NULL -+ulist_add_merge_52096 ulist_add_merge 0 52096 NULL +o2net_debug_read_52105 o2net_debug_read 3 52105 NULL +split_scan_timeout_write_52128 split_scan_timeout_write 3 52128 NULL +retry_count_read_52129 retry_count_read 3 52129 NULL -+snd_pcm_channel_info_user_52135 snd_pcm_channel_info_user 0 52135 NULL +gdm_usb_hci_send_52138 gdm_usb_hci_send 3 52138 NULL +sub_alloc_52140 sub_alloc 0 52140 NULL +hysdn_conf_write_52145 hysdn_conf_write 3 52145 NULL @@ -119633,22 +127421,20 @@ index 0000000..386792a +print_prefix_52176 print_prefix 0 52176 NULL +proc_pid_readlink_52186 proc_pid_readlink 3 52186 NULL +reiserfs_posix_acl_from_disk_52191 reiserfs_posix_acl_from_disk 2 52191 NULL ++f2fs_seek_block_52194 f2fs_seek_block 2 52194 NULL +vmci_qp_broker_alloc_52216 vmci_qp_broker_alloc 6-5 52216 NULL +fuse_request_alloc_52243 fuse_request_alloc 1 52243 NULL +mdiobus_alloc_size_52259 mdiobus_alloc_size 1 52259 NULL +shrink_slab_52261 shrink_slab 2 52261 NULL ++ext2_direct_IO_52270 ext2_direct_IO 4 52270 NULL +sisusbcon_do_font_op_52271 sisusbcon_do_font_op 9 52271 NULL -+handle_supp_msgs_52284 handle_supp_msgs 4 52284 NULL -+kobject_set_name_vargs_52309 kobject_set_name_vargs 0 52309 NULL +read_file_reset_52310 read_file_reset 3 52310 NULL +ssd1307fb_write_52315 ssd1307fb_write 3 52315 NULL +request_asymmetric_key_52317 request_asymmetric_key 2-4 52317 NULL +hwflags_read_52318 hwflags_read 3 52318 NULL -+snd_pcm_hw_free_52327 snd_pcm_hw_free 0 52327 NULL +test_unaligned_bulk_52333 test_unaligned_bulk 3 52333 NULL +hur_len_52339 hur_len 0 52339 NULL -+bytes_to_frames_52362 bytes_to_frames 0-2 52362 NULL nohasharray -+cap_inode_killpriv_52362 cap_inode_killpriv 0 52362 &bytes_to_frames_52362 ++bytes_to_frames_52362 bytes_to_frames 0-2 52362 NULL +copy_entries_to_user_52367 copy_entries_to_user 1 52367 NULL +iwl_dump_fh_52371 iwl_dump_fh 0 52371 NULL +hfsplus_find_attr_52374 hfsplus_find_attr 0 52374 NULL @@ -119662,6 +127448,7 @@ index 0000000..386792a +ath6kl_delete_qos_write_52435 ath6kl_delete_qos_write 3 52435 NULL +ieee80211_if_fmt_num_sta_ps_52438 ieee80211_if_fmt_num_sta_ps 3 52438 NULL +alauda_read_data_52452 alauda_read_data 3 52452 NULL ++bt_alloc_52457 bt_alloc 2 52457 NULL +ieee80211_alloc_txb_52477 ieee80211_alloc_txb 1 52477 NULL +usb_tranzport_write_52479 usb_tranzport_write 3 52479 NULL +ocfs2_extend_no_holes_52483 ocfs2_extend_no_holes 3-4 52483 NULL @@ -119676,7 +127463,6 @@ index 0000000..386792a +dccpprobe_read_52549 dccpprobe_read 3 52549 NULL +debug_level_proc_write_52572 debug_level_proc_write 3 52572 NULL +isku_sysfs_read_macro_52587 isku_sysfs_read_macro 6 52587 NULL -+snd_pcm_sw_params_52594 snd_pcm_sw_params 0 52594 NULL +SyS_setsockopt_52610 SyS_setsockopt 5 52610 NULL +ll_sa_entry_alloc_52611 ll_sa_entry_alloc 4 52611 NULL +tps80031_writes_52638 tps80031_writes 3-4 52638 NULL @@ -119696,7 +127482,6 @@ index 0000000..386792a +lb_alloc_ep_req_52837 lb_alloc_ep_req 2 52837 NULL +mon_bin_get_event_52863 mon_bin_get_event 4-6 52863 NULL +twl6030_gpadc_write_52867 twl6030_gpadc_write 1 52867 NULL -+qib_decode_6120_err_52876 qib_decode_6120_err 3 52876 NULL +twlreg_write_52880 twlreg_write 3 52880 NULL +pvr2_ctrl_value_to_sym_internal_52881 pvr2_ctrl_value_to_sym_internal 5 52881 NULL +cache_read_procfs_52882 cache_read_procfs 3 52882 NULL @@ -119707,7 +127492,6 @@ index 0000000..386792a +ieee80211_if_fmt_fwded_mcast_52961 ieee80211_if_fmt_fwded_mcast 3 52961 NULL +tx_tx_exch_read_52986 tx_tx_exch_read 3 52986 NULL +num_node_state_52989 num_node_state 0 52989 NULL -+efivarfs_file_write_53000 efivarfs_file_write 3 53000 NULL +btrfs_free_and_pin_reserved_extent_53016 btrfs_free_and_pin_reserved_extent 2 53016 NULL +tx_tx_exch_pending_read_53018 tx_tx_exch_pending_read 3 53018 NULL +bio_cur_bytes_53037 bio_cur_bytes 0 53037 NULL @@ -119715,12 +127499,10 @@ index 0000000..386792a +cfi_read_query_53066 cfi_read_query 0 53066 NULL +iwl_dbgfs_interrupt_write_53069 iwl_dbgfs_interrupt_write 3 53069 NULL +mwifiex_debug_read_53074 mwifiex_debug_read 3 53074 NULL -+vmci_check_host_caps_53087 vmci_check_host_caps 0 53087 NULL +mic_virtio_copy_from_user_53107 mic_virtio_copy_from_user 3 53107 NULL +verity_status_53120 verity_status 5 53120 NULL +brcmf_usb_dl_cmd_53130 brcmf_usb_dl_cmd 4 53130 NULL -+ps_poll_ps_poll_max_ap_turn_read_53140 ps_poll_ps_poll_max_ap_turn_read 3 53140 NULL nohasharray -+inode_newsize_ok_53140 inode_newsize_ok 0 53140 &ps_poll_ps_poll_max_ap_turn_read_53140 ++ps_poll_ps_poll_max_ap_turn_read_53140 ps_poll_ps_poll_max_ap_turn_read 3 53140 NULL +ieee80211_bss_info_update_53170 ieee80211_bss_info_update 4 53170 NULL +btrfs_io_bio_alloc_53179 btrfs_io_bio_alloc 2 53179 NULL +clear_capture_buf_53192 clear_capture_buf 2 53192 NULL @@ -119729,6 +127511,7 @@ index 0000000..386792a +xfs_trans_read_buf_map_53258 xfs_trans_read_buf_map 5 53258 NULL +wil_write_file_ssid_53266 wil_write_file_ssid 3 53266 NULL +btrfs_file_extent_num_bytes_53269 btrfs_file_extent_num_bytes 0 53269 NULL ++f2fs_fiemap_53310 f2fs_fiemap 4 53310 NULL +ftrace_profile_write_53327 ftrace_profile_write 3 53327 NULL +find_nr_power_limit_53330 find_nr_power_limit 0 53330 NULL +gsm_control_reply_53333 gsm_control_reply 4 53333 NULL @@ -119746,26 +127529,24 @@ index 0000000..386792a +do_verify_xattr_datum_53499 do_verify_xattr_datum 0 53499 NULL +snd_pcm_format_physical_width_53505 snd_pcm_format_physical_width 0 53505 NULL +dbAllocNext_53506 dbAllocNext 0 53506 NULL -+force_sc_support_write_53512 force_sc_support_write 3 53512 NULL nohasharray -+check_acl_53512 check_acl 0 53512 &force_sc_support_write_53512 ++check_acl_53512 check_acl 0 53512 NULL nohasharray ++force_sc_support_write_53512 force_sc_support_write 3 53512 &check_acl_53512 +nft_data_dump_53549 nft_data_dump 5 53549 NULL +SYSC_bind_53582 SYSC_bind 3 53582 NULL +cifs_utf16_bytes_53593 cifs_utf16_bytes 0 53593 NULL +proc_uid_map_write_53596 proc_uid_map_write 3 53596 NULL +pfkey_recvmsg_53604 pfkey_recvmsg 4 53604 NULL +___alloc_bootmem_nopanic_53626 ___alloc_bootmem_nopanic 1 53626 NULL -+xd_write_multiple_pages_53633 xd_write_multiple_pages 6-5 53633 NULL +ccid_getsockopt_builtin_ccids_53634 ccid_getsockopt_builtin_ccids 2 53634 NULL +nr_sendmsg_53656 nr_sendmsg 4 53656 NULL -+fuse_fill_write_pages_53682 fuse_fill_write_pages 4-0 53682 NULL ++fuse_fill_write_pages_53682 fuse_fill_write_pages 0-4 53682 NULL +v4l2_event_subscribe_53687 v4l2_event_subscribe 3 53687 NULL +bdev_logical_block_size_53690 bdev_logical_block_size 0 53690 NULL nohasharray +igb_alloc_q_vector_53690 igb_alloc_q_vector 4-6 53690 &bdev_logical_block_size_53690 +find_overflow_devnum_53711 find_overflow_devnum 0 53711 NULL +__proc_debug_mb_53732 __proc_debug_mb 5 53732 NULL +wdm_write_53735 wdm_write 3 53735 NULL -+lpfc_idiag_queacc_read_qe_53755 lpfc_idiag_queacc_read_qe 0-2 53755 NULL nohasharray -+amdtp_out_stream_get_max_payload_53755 amdtp_out_stream_get_max_payload 0 53755 &lpfc_idiag_queacc_read_qe_53755 ++lpfc_idiag_queacc_read_qe_53755 lpfc_idiag_queacc_read_qe 0-2 53755 NULL +wa_populate_buf_in_urb_53758 wa_populate_buf_in_urb 3-4 53758 NULL +ext2_acl_count_53773 ext2_acl_count 0-1 53773 NULL +__kfifo_dma_in_prepare_r_53792 __kfifo_dma_in_prepare_r 4-5 53792 NULL @@ -119774,7 +127555,8 @@ index 0000000..386792a +lpfc_idiag_ctlacc_read_reg_53809 lpfc_idiag_ctlacc_read_reg 0-3 53809 NULL +nls_nullsize_53815 nls_nullsize 0 53815 NULL +setup_data_read_53822 setup_data_read 3 53822 NULL -+pms_read_53873 pms_read 3 53873 NULL ++btrfs_free_reserved_extent_53873 btrfs_free_reserved_extent 2 53873 NULL nohasharray ++pms_read_53873 pms_read 3 53873 &btrfs_free_reserved_extent_53873 +ieee80211_if_fmt_dropped_frames_congestion_53883 ieee80211_if_fmt_dropped_frames_congestion 3 53883 NULL +SyS_setgroups_53900 SyS_setgroups 1 53900 NULL +batadv_tt_tvlv_ogm_handler_v1_53909 batadv_tt_tvlv_ogm_handler_v1 5 53909 NULL @@ -119791,10 +127573,8 @@ index 0000000..386792a +pipeline_dec_packet_out_read_54052 pipeline_dec_packet_out_read 3 54052 NULL +nl80211_send_disconnected_54056 nl80211_send_disconnected 5 54056 NULL +rproc_state_read_54057 rproc_state_read 3 54057 NULL -+_malloc_54077 _malloc 1 54077 NULL -+lustre_posix_acl_xattr_filter_54103 lustre_posix_acl_xattr_filter 2 54103 NULL nohasharray -+altera_set_ir_pre_54103 altera_set_ir_pre 2 54103 &lustre_posix_acl_xattr_filter_54103 -+__comedi_buf_write_alloc_54112 __comedi_buf_write_alloc 0-2 54112 NULL ++altera_set_ir_pre_54103 altera_set_ir_pre 2 54103 NULL nohasharray ++lustre_posix_acl_xattr_filter_54103 lustre_posix_acl_xattr_filter 2 54103 &altera_set_ir_pre_54103 +strn_len_54122 strn_len 0 54122 NULL +isku_receive_54130 isku_receive 4 54130 NULL +isr_host_acknowledges_read_54136 isr_host_acknowledges_read 3 54136 NULL @@ -119813,6 +127593,7 @@ index 0000000..386792a +wusb_prf_54261 wusb_prf 7 54261 &audio_write_54261 +mwifiex_getlog_read_54269 mwifiex_getlog_read 3 54269 NULL +kstrtou16_from_user_54274 kstrtou16_from_user 2 54274 NULL ++sizeof_long_54276 sizeof_long 0 54276 NULL +altera_set_dr_post_54291 altera_set_dr_post 2 54291 NULL +dlm_alloc_pagevec_54296 dlm_alloc_pagevec 1 54296 NULL +reclaim_pages_54301 reclaim_pages 3 54301 NULL @@ -119833,7 +127614,6 @@ index 0000000..386792a +sparse_early_mem_maps_alloc_node_54485 sparse_early_mem_maps_alloc_node 4 54485 NULL +simple_strtoull_54493 simple_strtoull 0 54493 NULL +btrfs_ordered_sum_size_54509 btrfs_ordered_sum_size 0-2 54509 NULL -+sst_byt_get_dsp_position_54513 sst_byt_get_dsp_position 0-3 54513 NULL +rfc4106_set_key_54519 rfc4106_set_key 3 54519 NULL +vmci_transport_dgram_enqueue_54525 vmci_transport_dgram_enqueue 4 54525 NULL +viacam_read_54526 viacam_read 3 54526 NULL @@ -119851,11 +127631,10 @@ index 0000000..386792a +dns_resolver_read_54658 dns_resolver_read 3 54658 NULL +twl6030_interrupt_mask_54659 twl6030_interrupt_mask 2 54659 NULL +tdp_page_fault_54663 tdp_page_fault 2 54663 NULL -+bus_add_device_54665 bus_add_device 0 54665 NULL +cw1200_queue_stats_init_54670 cw1200_queue_stats_init 2 54670 NULL +bio_kmalloc_54672 bio_kmalloc 2 54672 NULL +evm_read_key_54674 evm_read_key 3 54674 NULL -+__btrfs_inc_extent_ref_54706 __btrfs_inc_extent_ref 7 54706 NULL ++jfs_direct_IO_54687 jfs_direct_IO 4 54687 NULL +rfkill_fop_read_54711 rfkill_fop_read 3 54711 NULL +ocfs2_control_write_54737 ocfs2_control_write 3 54737 NULL +kzalloc_54740 kzalloc 1 54740 NULL @@ -119869,33 +127648,31 @@ index 0000000..386792a +nfsd_write_54809 nfsd_write 6 54809 NULL +ar9287_dump_modal_eeprom_54814 ar9287_dump_modal_eeprom 3-2 54814 NULL +crypto_tfm_ctx_alignment_54815 crypto_tfm_ctx_alignment 0 54815 NULL nohasharray -+kvzalloc_54815 kvzalloc 1 54815 &crypto_tfm_ctx_alignment_54815 nohasharray -+aes_decrypt_fail_read_54815 aes_decrypt_fail_read 3 54815 &kvzalloc_54815 -+generic_perform_write_54832 generic_perform_write 3-0 54832 NULL ++aes_decrypt_fail_read_54815 aes_decrypt_fail_read 3 54815 &crypto_tfm_ctx_alignment_54815 nohasharray ++kvzalloc_54815 kvzalloc 1 54815 &aes_decrypt_fail_read_54815 ++generic_perform_write_54832 generic_perform_write 3 54832 NULL +write_rio_54837 write_rio 3 54837 NULL +ext3_acl_from_disk_54839 ext3_acl_from_disk 2 54839 NULL nohasharray +nouveau_engctx_create__54839 nouveau_engctx_create_ 8 54839 &ext3_acl_from_disk_54839 +ufx_ops_write_54848 ufx_ops_write 3 54848 NULL +printer_read_54851 printer_read 3 54851 NULL -+assign_irq_vector_54852 assign_irq_vector 0 54852 NULL +broadsheet_spiflash_rewrite_sector_54864 broadsheet_spiflash_rewrite_sector 2 54864 NULL +prism_build_supp_rates_54865 prism_build_supp_rates 0 54865 NULL -+iscsi_pool_init_54913 iscsi_pool_init 2-4 54913 NULL nohasharray -+kobject_set_name_vargs_54913 kobject_set_name_vargs 0 54913 &iscsi_pool_init_54913 ++iscsi_pool_init_54913 iscsi_pool_init 2-4 54913 NULL +btrfs_stack_chunk_num_stripes_54923 btrfs_stack_chunk_num_stripes 0 54923 NULL +bio_add_page_54933 bio_add_page 0-3 54933 NULL +mxms_structlen_54939 mxms_structlen 0 54939 NULL +add_port_54941 add_port 2 54941 NULL +tipc_send2name_54946 tipc_send2name 5 54946 NULL -+ath9k_dump_btcoex_54949 ath9k_dump_btcoex 0-3 54949 NULL ++ath9k_dump_btcoex_54949 ath9k_dump_btcoex 3-0 54949 NULL +alauda_write_data_54967 alauda_write_data 3 54967 NULL +c4_add_card_54968 c4_add_card 3 54968 NULL +ext3_xattr_get_54989 ext3_xattr_get 0 54989 NULL +cx231xx_v4l2_read_55014 cx231xx_v4l2_read 3 55014 NULL +error_error_null_Frame_tx_start_read_55024 error_error_null_Frame_tx_start_read 3 55024 NULL ++efw_transaction_55052 efw_transaction 5-7 55052 NULL +apei_exec_run_55075 apei_exec_run 0 55075 NULL +bitmap_storage_alloc_55077 bitmap_storage_alloc 2 55077 NULL -+snd_pcm_capture_hw_avail_55086 snd_pcm_capture_hw_avail 0 55086 NULL +rxpipe_beacon_buffer_thres_host_int_trig_rx_data_read_55106 rxpipe_beacon_buffer_thres_host_int_trig_rx_data_read 3 55106 NULL +crypto_ahash_setkey_55134 crypto_ahash_setkey 3 55134 NULL +filldir_55137 filldir 3 55137 NULL @@ -119917,12 +127694,12 @@ index 0000000..386792a +rx_streaming_interval_read_55291 rx_streaming_interval_read 3 55291 NULL +lov_get_stripecnt_55297 lov_get_stripecnt 0-3 55297 NULL +gsm_control_modem_55303 gsm_control_modem 3 55303 NULL -+qp_alloc_guest_work_55305 qp_alloc_guest_work 5-3 55305 NULL nohasharray -+compat_SyS_process_vm_readv_55305 compat_SyS_process_vm_readv 3-5 55305 &qp_alloc_guest_work_55305 ++compat_SyS_process_vm_readv_55305 compat_SyS_process_vm_readv 3-5 55305 NULL nohasharray ++qp_alloc_guest_work_55305 qp_alloc_guest_work 5-3 55305 &compat_SyS_process_vm_readv_55305 +compat_SyS_mbind_55329 compat_SyS_mbind 5 55329 NULL +vme_user_read_55338 vme_user_read 3 55338 NULL -+__wa_xfer_setup_sizes_55342 __wa_xfer_setup_sizes 0 55342 NULL nohasharray -+sctp_datamsg_from_user_55342 sctp_datamsg_from_user 4 55342 &__wa_xfer_setup_sizes_55342 ++sctp_datamsg_from_user_55342 sctp_datamsg_from_user 4 55342 NULL nohasharray ++__wa_xfer_setup_sizes_55342 __wa_xfer_setup_sizes 0 55342 &sctp_datamsg_from_user_55342 +cw1200_sdio_align_size_55391 cw1200_sdio_align_size 2 55391 NULL +iwl_dbgfs_plcp_delta_read_55407 iwl_dbgfs_plcp_delta_read 3 55407 NULL +nouveau_cli_create_55425 nouveau_cli_create 3 55425 NULL @@ -119947,24 +127724,26 @@ index 0000000..386792a +macvtap_put_user_55609 macvtap_put_user 4 55609 NULL +selinux_setprocattr_55611 selinux_setprocattr 4 55611 NULL +edge_tty_recv_55622 edge_tty_recv 3 55622 NULL -+reiserfs_xattr_get_55628 reiserfs_xattr_get 0 55628 NULL nohasharray -+pktgen_if_write_55628 pktgen_if_write 3 55628 &reiserfs_xattr_get_55628 ++pktgen_if_write_55628 pktgen_if_write 3 55628 NULL nohasharray ++reiserfs_xattr_get_55628 reiserfs_xattr_get 0 55628 &pktgen_if_write_55628 +osc_obd_max_pages_per_rpc_seq_write_55636 osc_obd_max_pages_per_rpc_seq_write 3 55636 NULL +xfs_bmbt_maxrecs_55649 xfs_bmbt_maxrecs 0-2 55649 NULL +lpfc_idiag_queinfo_read_55662 lpfc_idiag_queinfo_read 3 55662 NULL +il_dbgfs_tx_queue_read_55668 il_dbgfs_tx_queue_read 3 55668 NULL +get_info_55681 get_info 3 55681 NULL +iwl_dbgfs_plcp_delta_write_55682 iwl_dbgfs_plcp_delta_write 3 55682 NULL ++ext4_alloc_file_blocks_55689 ext4_alloc_file_blocks 3 55689 NULL +genl_allocate_reserve_groups_55705 genl_allocate_reserve_groups 1 55705 NULL +pm8001_store_update_fw_55716 pm8001_store_update_fw 4 55716 NULL +tap_pwup_write_55723 tap_pwup_write 3 55723 NULL +__iio_allocate_kfifo_55738 __iio_allocate_kfifo 2 55738 NULL +set_local_name_55757 set_local_name 4 55757 NULL ++ethtool_copy_validate_indir_55769 ethtool_copy_validate_indir 4 55769 NULL +strlen_55778 strlen 0 55778 NULL nohasharray +is_idx_node_in_tnc_55778 is_idx_node_in_tnc 0 55778 &strlen_55778 -+set_spte_55783 set_spte 5-4 55783 NULL -+req_bio_endio_55786 req_bio_endio 3 55786 NULL nohasharray -+conf_read_55786 conf_read 3 55786 &req_bio_endio_55786 ++set_spte_55783 set_spte 4-5 55783 NULL ++conf_read_55786 conf_read 3 55786 NULL nohasharray ++req_bio_endio_55786 req_bio_endio 3 55786 &conf_read_55786 +uwb_rc_neh_grok_event_55799 uwb_rc_neh_grok_event 3 55799 NULL +sb16_copy_from_user_55836 sb16_copy_from_user 10-6-7 55836 NULL +ip_hdrlen_55849 ip_hdrlen 0 55849 NULL @@ -119975,17 +127754,15 @@ index 0000000..386792a +pm_qos_power_read_55891 pm_qos_power_read 3 55891 NULL +hash_ip4_expire_55911 hash_ip4_expire 4 55911 NULL +snd_pcm_hw_param_value_min_55917 snd_pcm_hw_param_value_min 0 55917 NULL -+ext2_direct_IO_55932 ext2_direct_IO 4 55932 NULL +kvm_write_guest_virt_system_55944 kvm_write_guest_virt_system 4-2 55944 NULL +sel_read_policy_55947 sel_read_policy 3 55947 NULL +ceph_get_direct_page_vector_55956 ceph_get_direct_page_vector 2 55956 NULL -+simple_read_from_buffer_55957 simple_read_from_buffer 2-5 55957 NULL ++simple_read_from_buffer_55957 simple_read_from_buffer 5-2 55957 NULL +tx_tx_imm_resp_read_55964 tx_tx_imm_resp_read 3 55964 NULL -+btrfs_clone_55977 btrfs_clone 5-3 55977 NULL ++btrfs_clone_55977 btrfs_clone 5-3-6 55977 NULL +wa_xfer_create_subset_sg_55992 wa_xfer_create_subset_sg 3-2 55992 NULL +nvme_alloc_iod_56027 nvme_alloc_iod 1-2 56027 NULL -+rtl8169_init_ring_56028 rtl8169_init_ring 0 56028 NULL -+usb_ocp_write_56047 usb_ocp_write 4 56047 NULL ++iwl_trans_read_prph_56052 iwl_trans_read_prph 0 56052 NULL +dccp_sendmsg_56058 dccp_sendmsg 4 56058 NULL +pscsi_get_bio_56103 pscsi_get_bio 1 56103 NULL +usb_alloc_stream_buffers_56123 usb_alloc_stream_buffers 3 56123 NULL @@ -120009,17 +127786,16 @@ index 0000000..386792a +journal_init_revoke_table_56331 journal_init_revoke_table 1 56331 NULL +snd_rawmidi_read_56337 snd_rawmidi_read 3 56337 NULL +vxge_os_dma_malloc_async_56348 vxge_os_dma_malloc_async 3 56348 NULL -+mite_device_bytes_transferred_56355 mite_device_bytes_transferred 0 56355 NULL -+iov_iter_copy_from_user_atomic_56368 iov_iter_copy_from_user_atomic 4-0 56368 NULL ++iov_iter_copy_from_user_atomic_56368 iov_iter_copy_from_user_atomic 0-4 56368 NULL +dev_read_56369 dev_read 3 56369 NULL +ath10k_read_simulate_fw_crash_56371 ath10k_read_simulate_fw_crash 3 56371 NULL -+snd_pcm_common_ioctl1_56382 snd_pcm_common_ioctl1 0 56382 NULL +write_gssp_56404 write_gssp 3 56404 NULL +ocfs2_control_read_56405 ocfs2_control_read 3 56405 NULL +store_msg_56417 store_msg 3 56417 NULL +pppol2tp_sendmsg_56420 pppol2tp_sendmsg 4 56420 NULL +l2cap_segment_le_sdu_56426 l2cap_segment_le_sdu 4 56426 NULL -+ec_dbgfs_cmd_read_56431 ec_dbgfs_cmd_read 3 56431 NULL ++lprocfs_fid_space_seq_write_56431 lprocfs_fid_space_seq_write 3 56431 NULL nohasharray ++ec_dbgfs_cmd_read_56431 ec_dbgfs_cmd_read 3 56431 &lprocfs_fid_space_seq_write_56431 +fl_create_56435 fl_create 5 56435 NULL +gnttab_map_56439 gnttab_map 2 56439 NULL +cx231xx_init_isoc_56453 cx231xx_init_isoc 3-2-4 56453 NULL @@ -120060,32 +127836,28 @@ index 0000000..386792a +mtdchar_write_56831 mtdchar_write 3 56831 NULL +snd_rawmidi_kernel_write1_56847 snd_rawmidi_kernel_write1 4-0 56847 NULL +si476x_radio_read_agc_blob_56849 si476x_radio_read_agc_blob 3 56849 NULL ++gk20a_ram_get_56863 gk20a_ram_get 2 56863 NULL +ext3_xattr_ibody_get_56880 ext3_xattr_ibody_get 0 56880 NULL +pvr2_debugifc_print_status_56890 pvr2_debugifc_print_status 3 56890 NULL +debug_debug3_read_56894 debug_debug3_read 3 56894 NULL +batadv_tt_update_changes_56895 batadv_tt_update_changes 3 56895 NULL nohasharray +le_auto_conn_write_56895 le_auto_conn_write 3 56895 &batadv_tt_update_changes_56895 +hfsplus_find_cat_56899 hfsplus_find_cat 0 56899 NULL -+strcspn_56913 strcspn 0 56913 NULL +__kfifo_out_56927 __kfifo_out 0-3 56927 NULL +journal_init_revoke_56933 journal_init_revoke 2 56933 NULL +nouveau_xtensa_create__56952 nouveau_xtensa_create_ 8 56952 NULL +diva_get_driver_info_56967 diva_get_driver_info 0 56967 NULL -+sptlrpc_secflags2str_56995 sptlrpc_secflags2str 3 56995 NULL +vlsi_alloc_ring_57003 vlsi_alloc_ring 3-4 57003 NULL +btrfs_super_csum_size_57004 btrfs_super_csum_size 0 57004 NULL +aircable_process_packet_57027 aircable_process_packet 4 57027 NULL -+ieee80211_if_fmt_state_57043 ieee80211_if_fmt_state 3 57043 NULL nohasharray -+skb_network_offset_57043 skb_network_offset 0 57043 &ieee80211_if_fmt_state_57043 ++ieee80211_if_fmt_state_57043 ieee80211_if_fmt_state 3 57043 NULL +bytes_to_samples_57049 bytes_to_samples 0-2 57049 NULL +xfs_buf_read_map_57053 xfs_buf_read_map 3 57053 NULL +cx2341x_ctrl_new_std_57061 cx2341x_ctrl_new_std 4 57061 NULL +sca3000_read_data_57064 sca3000_read_data 4 57064 NULL +pcmcia_replace_cis_57066 pcmcia_replace_cis 3 57066 NULL +tracing_set_trace_write_57096 tracing_set_trace_write 3 57096 NULL -+altera_get_note_57099 altera_get_note 6 57099 NULL +hpfs_readpages_57106 hpfs_readpages 4 57106 NULL -+snd_pcm_hw_params_old_user_57108 snd_pcm_hw_params_old_user 0 57108 NULL +crypto_compress_ctxsize_57109 crypto_compress_ctxsize 0 57109 NULL +cipso_v4_gentag_loc_57119 cipso_v4_gentag_loc 0 57119 NULL +ima_show_htable_value_57136 ima_show_htable_value 2 57136 NULL nohasharray @@ -120099,7 +127871,6 @@ index 0000000..386792a +hash_netnet6_expire_57191 hash_netnet6_expire 4 57191 NULL +tt3650_ci_msg_57219 tt3650_ci_msg 4 57219 NULL +dma_fifo_alloc_57236 dma_fifo_alloc 2-3-5 57236 NULL -+flush_space_57241 flush_space 0 57241 NULL +rsxx_cram_write_57244 rsxx_cram_write 3 57244 NULL +ieee80211_if_fmt_tsf_57249 ieee80211_if_fmt_tsf 3 57249 NULL +oprofilefs_ulong_from_user_57251 oprofilefs_ulong_from_user 3 57251 NULL @@ -120122,6 +127893,7 @@ index 0000000..386792a +__roundup_pow_of_two_57461 __roundup_pow_of_two 0 57461 NULL +sisusb_clear_vram_57466 sisusb_clear_vram 2-3 57466 NULL +ieee80211_if_read_flags_57470 ieee80211_if_read_flags 3 57470 NULL ++read_file_skb_rx_57490 read_file_skb_rx 3 57490 NULL +bnad_debugfs_write_regwr_57500 bnad_debugfs_write_regwr 3 57500 NULL +skb_headlen_57501 skb_headlen 0 57501 NULL +copy_in_user_57502 copy_in_user 3 57502 NULL @@ -120134,7 +127906,6 @@ index 0000000..386792a +acpi_dev_get_resources_57534 acpi_dev_get_resources 0 57534 NULL +ptlrpc_lprocfs_hp_ratio_seq_write_57537 ptlrpc_lprocfs_hp_ratio_seq_write 3 57537 NULL +compat_SyS_process_vm_writev_57542 compat_SyS_process_vm_writev 3-5 57542 NULL -+obd_unpackmd_57563 obd_unpackmd 0 57563 NULL +snd_pcm_playback_ioctl1_57569 snd_pcm_playback_ioctl1 0 57569 NULL +get_bridge_ifindices_57579 get_bridge_ifindices 0 57579 NULL +ldlm_cli_enqueue_local_57582 ldlm_cli_enqueue_local 11 57582 NULL @@ -120143,24 +127914,19 @@ index 0000000..386792a +tx_tx_retry_template_read_57623 tx_tx_retry_template_read 3 57623 NULL +sisusbcon_putcs_57630 sisusbcon_putcs 3 57630 NULL +mem_read_57631 mem_read 3 57631 NULL -+pci_enable_msi_block_57632 pci_enable_msi_block 0 57632 NULL -+msi_compose_msg_57637 msi_compose_msg 0 57637 NULL +r3964_write_57662 r3964_write 4 57662 NULL +proc_ns_readlink_57664 proc_ns_readlink 3 57664 NULL +__lgwrite_57669 __lgwrite 4 57669 NULL +i2400m_rx_stats_read_57706 i2400m_rx_stats_read 3 57706 NULL +ieee80211_if_read_dot11MeshHWMPconfirmationInterval_57722 ieee80211_if_read_dot11MeshHWMPconfirmationInterval 3 57722 NULL -+vm_find_vqs_57729 vm_find_vqs 0 57729 NULL -+nouveau_gpio_create__57735 nouveau_gpio_create_ 4-5 57735 NULL +pppol2tp_recvmsg_57742 pppol2tp_recvmsg 4 57742 NULL +ieee80211_if_fmt_dot11MeshHWMPpreqMinInterval_57762 ieee80211_if_fmt_dot11MeshHWMPpreqMinInterval 3 57762 NULL +SYSC_process_vm_writev_57776 SYSC_process_vm_writev 3-5 57776 NULL -+security_inode_unlink_57791 security_inode_unlink 0 57791 NULL +ld2_57794 ld2 0 57794 NULL +ivtv_read_57796 ivtv_read 3 57796 NULL +ion_test_ioctl_57799 ion_test_ioctl 2 57799 NULL +bfad_debugfs_read_regrd_57830 bfad_debugfs_read_regrd 3 57830 NULL -+copy_to_user_57835 copy_to_user 0-3 57835 NULL ++copy_to_user_57835 copy_to_user 3-0 57835 NULL +flash_read_57843 flash_read 3 57843 NULL +kiblnd_create_tx_pool_57846 kiblnd_create_tx_pool 2 57846 NULL +radeon_ttm_gtt_read_57879 radeon_ttm_gtt_read 3 57879 NULL @@ -120173,8 +127939,10 @@ index 0000000..386792a +sel_read_handle_unknown_57933 sel_read_handle_unknown 3 57933 NULL +xfs_mru_cache_create_57943 xfs_mru_cache_create 3 57943 NULL +key_algorithm_read_57946 key_algorithm_read 3 57946 NULL ++arch_gnttab_init_57948 arch_gnttab_init 2-1 57948 NULL +ip_set_alloc_57953 ip_set_alloc 1 57953 NULL nohasharray +ioat3_dca_count_dca_slots_57953 ioat3_dca_count_dca_slots 0 57953 &ip_set_alloc_57953 ++iov_iter_npages_57979 iov_iter_npages 0-2 57979 NULL +rx_reset_counter_read_58001 rx_reset_counter_read 3 58001 NULL +iwl_dbgfs_ucode_rx_stats_read_58023 iwl_dbgfs_ucode_rx_stats_read 3 58023 NULL +io_playback_transfer_58030 io_playback_transfer 4 58030 NULL @@ -120202,36 +127970,34 @@ index 0000000..386792a +brcmf_debugfs_sdio_counter_read_58369 brcmf_debugfs_sdio_counter_read 3 58369 NULL +il_dbgfs_status_read_58388 il_dbgfs_status_read 3 58388 NULL +_drbd_md_sync_page_io_58403 _drbd_md_sync_page_io 6 58403 NULL -+idetape_pad_zeros_58406 idetape_pad_zeros 2 58406 NULL ++kvm_mmu_write_protect_pt_masked_58406 kvm_mmu_write_protect_pt_masked 3 58406 NULL nohasharray ++idetape_pad_zeros_58406 idetape_pad_zeros 2 58406 &kvm_mmu_write_protect_pt_masked_58406 +i2400m_pld_size_58415 i2400m_pld_size 0 58415 NULL +capabilities_read_58457 capabilities_read 3 58457 NULL +usnic_vnic_get_resources_58462 usnic_vnic_get_resources 3 58462 NULL +compat_do_ipt_set_ctl_58466 compat_do_ipt_set_ctl 4 58466 NULL nohasharray +lpfc_idiag_baracc_read_58466 lpfc_idiag_baracc_read 3 58466 &compat_do_ipt_set_ctl_58466 +nv_rd08_58472 nv_rd08 0 58472 NULL -+acpi_tables_sysfs_init_58477 acpi_tables_sysfs_init 0 58477 NULL +snd_gf1_read_addr_58483 snd_gf1_read_addr 0 58483 NULL +snd_rme96_capture_copy_58484 snd_rme96_capture_copy 5 58484 NULL -+btrfs_cont_expand_58498 btrfs_cont_expand 2-3-0 58498 NULL ++btrfs_cont_expand_58498 btrfs_cont_expand 2-3 58498 NULL +tcf_hash_create_58507 tcf_hash_create 4 58507 NULL +rndis_add_response_58544 rndis_add_response 2 58544 NULL +wep_decrypt_fail_read_58567 wep_decrypt_fail_read 3 58567 NULL +scnprint_mac_oui_58578 scnprint_mac_oui 3-0 58578 NULL +cur_wm_latency_write_58581 cur_wm_latency_write 3 58581 NULL -+get_rhf_errstring_58582 get_rhf_errstring 3 58582 NULL +ea_read_inline_58589 ea_read_inline 0 58589 NULL +isku_sysfs_read_keys_thumbster_58590 isku_sysfs_read_keys_thumbster 6 58590 NULL +xip_file_read_58592 xip_file_read 3 58592 NULL +ecryptfs_write_end_58594 ecryptfs_write_end 5-3 58594 NULL +radeon_bo_size_58606 radeon_bo_size 0 58606 NULL ++btrfs_direct_IO_58608 btrfs_direct_IO 4 58608 NULL +skb_copy_to_page_nocache_58624 skb_copy_to_page_nocache 6 58624 NULL -+filemap_fdatawrite_range_58630 filemap_fdatawrite_range 0 58630 NULL +tx_tx_start_fw_gen_read_58648 tx_tx_start_fw_gen_read 3 58648 NULL +iwl_dbgfs_rx_handlers_write_58655 iwl_dbgfs_rx_handlers_write 3 58655 NULL +find_zero_58685 find_zero 0-1 58685 NULL +uwb_bce_print_IEs_58686 uwb_bce_print_IEs 4 58686 NULL +tps6586x_writes_58689 tps6586x_writes 2-3 58689 NULL -+scsi_setup_command_freelist_58703 scsi_setup_command_freelist 0 58703 NULL +vx_send_msg_58711 vx_send_msg 0 58711 NULL +csum_exist_in_range_58730 csum_exist_in_range 2-3 58730 NULL +frames_to_bytes_58741 frames_to_bytes 0-2 58741 NULL @@ -120258,10 +128024,9 @@ index 0000000..386792a +init_pci_cap_msi_perm_59033 init_pci_cap_msi_perm 2 59033 NULL +selinux_transaction_write_59038 selinux_transaction_write 3 59038 NULL +crypto_aead_reqsize_59039 crypto_aead_reqsize 0 59039 NULL -+regmap_bulk_write_59049 regmap_bulk_write 2-4 59049 NULL nohasharray -+i8042_enable_kbd_port_59049 i8042_enable_kbd_port 0 59049 ®map_bulk_write_59049 ++regmap_bulk_write_59049 regmap_bulk_write 2-4 59049 NULL +mmc_sd_num_wr_blocks_59112 mmc_sd_num_wr_blocks 0 59112 NULL -+sta_tx_latency_stat_table_59122 sta_tx_latency_stat_table 0-4-5 59122 NULL nohasharray ++sta_tx_latency_stat_table_59122 sta_tx_latency_stat_table 5-4-0 59122 NULL nohasharray +scsi_io_completion_59122 scsi_io_completion 2 59122 &sta_tx_latency_stat_table_59122 +nfc_llcp_send_i_frame_59130 nfc_llcp_send_i_frame 3 59130 NULL +framebuffer_alloc_59145 framebuffer_alloc 1 59145 NULL nohasharray @@ -120272,15 +128037,12 @@ index 0000000..386792a +setup_window_59178 setup_window 4-2-5-7 59178 NULL +ocfs2_move_extent_59187 ocfs2_move_extent 2-5 59187 NULL +xfs_iext_realloc_indirect_59211 xfs_iext_realloc_indirect 2 59211 NULL -+check_mapped_selector_name_59216 check_mapped_selector_name 5 59216 NULL +dt3155_read_59226 dt3155_read 3 59226 NULL +paging64_gpte_to_gfn_lvl_59229 paging64_gpte_to_gfn_lvl 0-2-1 59229 NULL +nla_len_59258 nla_len 0 59258 NULL +drbd_bm_write_page_59290 drbd_bm_write_page 2 59290 NULL +btrfs_insert_dir_item_59304 btrfs_insert_dir_item 4 59304 NULL +fd_copyout_59323 fd_copyout 3 59323 NULL -+read_9287_modal_eeprom_59327 read_9287_modal_eeprom 3 59327 NULL -+set_state_private_59336 set_state_private 0 59336 NULL +rx_defrag_in_process_called_read_59338 rx_defrag_in_process_called_read 3 59338 NULL +xfs_attrmulti_attr_set_59346 xfs_attrmulti_attr_set 4 59346 NULL +f2fs_fallocate_59377 f2fs_fallocate 4-3 59377 NULL @@ -120288,31 +128050,25 @@ index 0000000..386792a +journal_init_dev_59384 journal_init_dev 5 59384 NULL +__net_get_random_once_59389 __net_get_random_once 2 59389 NULL +isku_sysfs_read_keys_function_59412 isku_sysfs_read_keys_function 6 59412 NULL -+pci_ctrl_read_59424 pci_ctrl_read 0 59424 NULL +vxge_hw_ring_rxds_per_block_get_59425 vxge_hw_ring_rxds_per_block_get 0 59425 NULL -+snd_pcm_tstamp_59431 snd_pcm_tstamp 0 59431 NULL +SyS_sched_setaffinity_59442 SyS_sched_setaffinity 2 59442 NULL +fs_path_ensure_buf_59445 fs_path_ensure_buf 2 59445 NULL +tipc_recv_stream_59456 tipc_recv_stream 4 59456 NULL +_iwl_dbgfs_bcast_filters_write_59491 _iwl_dbgfs_bcast_filters_write 3 59491 NULL -+rtw_cfg80211_set_mgnt_wpsp2pie_59497 rtw_cfg80211_set_mgnt_wpsp2pie 3 59497 NULL +ib_copy_from_udata_59502 ib_copy_from_udata 3 59502 NULL +C_SYSC_get_mempolicy_59516 C_SYSC_get_mempolicy 3 59516 NULL +mic_vringh_copy_59523 mic_vringh_copy 4 59523 NULL -+msix_setup_entries_59545 msix_setup_entries 0 59545 NULL nohasharray -+idr_alloc_59545 idr_alloc 0 59545 &msix_setup_entries_59545 +mpi_get_nbits_59551 mpi_get_nbits 0 59551 NULL +tunables_write_59563 tunables_write 3 59563 NULL +bio_split_59564 bio_split 2 59564 NULL +__copy_from_user_ll_nozero_59571 __copy_from_user_ll_nozero 0-3 59571 NULL +memdup_user_59590 memdup_user 2 59590 NULL -+xrcdn_free_res_59616 xrcdn_free_res 5 59616 NULL nohasharray -+mem_fwlog_free_mem_blks_read_59616 mem_fwlog_free_mem_blks_read 3 59616 &xrcdn_free_res_59616 ++mem_fwlog_free_mem_blks_read_59616 mem_fwlog_free_mem_blks_read 3 59616 NULL nohasharray ++xrcdn_free_res_59616 xrcdn_free_res 5 59616 &mem_fwlog_free_mem_blks_read_59616 +ath6kl_endpoint_stats_write_59621 ath6kl_endpoint_stats_write 3 59621 NULL +mtrr_write_59622 mtrr_write 3 59622 NULL +find_first_zero_bit_59636 find_first_zero_bit 0 59636 NULL +SyS_setdomainname_59646 SyS_setdomainname 2 59646 NULL -+file_update_time_59647 file_update_time 0 59647 NULL +hidraw_read_59650 hidraw_read 3 59650 NULL +v9fs_xattr_set_acl_59651 v9fs_xattr_set_acl 4 59651 NULL +__devcgroup_check_permission_59665 __devcgroup_check_permission 0 59665 NULL @@ -120320,15 +128076,12 @@ index 0000000..386792a +alloc_dca_provider_59670 alloc_dca_provider 2 59670 NULL +mic_calc_failure_read_59700 mic_calc_failure_read 3 59700 NULL +ioperm_get_59701 ioperm_get 4-3 59701 NULL -+snd_pcm_info_user_59711 snd_pcm_info_user 0 59711 NULL +prism2_info_scanresults_59729 prism2_info_scanresults 3 59729 NULL +ieee80211_if_read_fwded_unicast_59740 ieee80211_if_read_fwded_unicast 3 59740 NULL -+fat_direct_IO_59741 fat_direct_IO 4 59741 NULL +qib_decode_7220_sdma_errs_59745 qib_decode_7220_sdma_errs 4 59745 NULL +strnlen_59746 strnlen 0 59746 NULL +ext3_acl_count_59754 ext3_acl_count 0-1 59754 NULL -+long_retry_limit_read_59766 long_retry_limit_read 3 59766 NULL nohasharray -+cap_inode_need_killpriv_59766 cap_inode_need_killpriv 0 59766 &long_retry_limit_read_59766 ++long_retry_limit_read_59766 long_retry_limit_read 3 59766 NULL +venus_remove_59781 venus_remove 4 59781 NULL +mei_nfc_recv_59784 mei_nfc_recv 3 59784 NULL +C_SYSC_preadv_59801 C_SYSC_preadv 3 59801 NULL @@ -120337,6 +128090,7 @@ index 0000000..386792a +ieee80211_if_read_dot11MeshHWMPmaxPREQretries_59829 ieee80211_if_read_dot11MeshHWMPmaxPREQretries 3 59829 NULL +gspca_dev_probe2_59833 gspca_dev_probe2 4 59833 NULL +regmap_raw_write_async_59849 regmap_raw_write_async 2-4 59849 NULL ++biovec_create_pool_59878 biovec_create_pool 1 59878 NULL +pvr2_ioread_set_sync_key_59882 pvr2_ioread_set_sync_key 3 59882 NULL +l2cap_sock_recvmsg_59886 l2cap_sock_recvmsg 4 59886 NULL +ffs_prepare_buffer_59892 ffs_prepare_buffer 2 59892 NULL @@ -120361,6 +128115,7 @@ index 0000000..386792a +compat_writev_60063 compat_writev 3 60063 NULL +ath6kl_listen_int_write_60066 ath6kl_listen_int_write 3 60066 NULL +c4iw_num_stags_60073 c4iw_num_stags 0 60073 NULL ++usb_os_desc_prepare_interf_dir_60075 usb_os_desc_prepare_interf_dir 2 60075 NULL +rxrpc_kernel_send_data_60083 rxrpc_kernel_send_data 3 60083 NULL +ieee80211_if_fmt_fwded_frames_60103 ieee80211_if_fmt_fwded_frames 3 60103 NULL +SYSC_msgsnd_60113 SYSC_msgsnd 3 60113 NULL @@ -120369,11 +128124,10 @@ index 0000000..386792a +ld_usb_read_60156 ld_usb_read 3 60156 NULL +jmb38x_ms_count_slots_60164 jmb38x_ms_count_slots 0 60164 NULL +init_state_60165 init_state 2 60165 NULL -+jffs2_alloc_full_dirent_60179 jffs2_alloc_full_dirent 1 60179 NULL nohasharray -+sg_build_sgat_60179 sg_build_sgat 3 60179 &jffs2_alloc_full_dirent_60179 ++sg_build_sgat_60179 sg_build_sgat 3 60179 NULL nohasharray ++jffs2_alloc_full_dirent_60179 jffs2_alloc_full_dirent 1 60179 &sg_build_sgat_60179 +fuse_async_req_send_60183 fuse_async_req_send 0-3 60183 NULL -+arch_setup_msi_irqs_60193 arch_setup_msi_irqs 0 60193 NULL nohasharray -+rx_rx_tkip_replays_read_60193 rx_rx_tkip_replays_read 3 60193 &arch_setup_msi_irqs_60193 ++rx_rx_tkip_replays_read_60193 rx_rx_tkip_replays_read 3 60193 NULL +qib_reg_phys_mr_60202 qib_reg_phys_mr 3 60202 NULL +btrfs_get_token_16_60220 btrfs_get_token_16 0 60220 NULL +irq_alloc_domain_generic_chips_60264 irq_alloc_domain_generic_chips 2-3 60264 NULL @@ -120400,16 +128154,15 @@ index 0000000..386792a +v9fs_fid_readn_60544 v9fs_fid_readn 4 60544 NULL +nonpaging_map_60551 nonpaging_map 4 60551 NULL +osc_lockless_truncate_seq_write_60553 osc_lockless_truncate_seq_write 3 60553 NULL ++xfs_vm_direct_IO_60557 xfs_vm_direct_IO 4 60557 NULL +tracing_entries_write_60563 tracing_entries_write 3 60563 NULL +memblock_virt_alloc_try_nid_nopanic_60604 memblock_virt_alloc_try_nid_nopanic 1 60604 NULL -+inode_change_ok_60614 inode_change_ok 0 60614 NULL +skb_transport_offset_60619 skb_transport_offset 0 60619 NULL +wl1273_fm_fops_write_60621 wl1273_fm_fops_write 3 60621 NULL +acl_alloc_stack_init_60630 acl_alloc_stack_init 1 60630 NULL +__proc_lnet_stats_60647 __proc_lnet_stats 5 60647 NULL +if_sdio_host_to_card_60666 if_sdio_host_to_card 4 60666 NULL +ieee80211_if_read_dot11MeshConfirmTimeout_60670 ieee80211_if_read_dot11MeshConfirmTimeout 3 60670 NULL -+vga_rcrt_60731 vga_rcrt 0 60731 NULL +snd_ice1712_ds_read_60754 snd_ice1712_ds_read 0 60754 NULL +raid_status_60755 raid_status 5 60755 NULL +sel_write_checkreqprot_60774 sel_write_checkreqprot 3 60774 NULL @@ -120417,7 +128170,6 @@ index 0000000..386792a +acl_alloc_num_60778 acl_alloc_num 1-2 60778 NULL +snd_pcm_oss_readv3_60792 snd_pcm_oss_readv3 3 60792 NULL +pwr_tx_with_ps_read_60851 pwr_tx_with_ps_read 3 60851 NULL -+__clone_and_map_data_bio_60861 __clone_and_map_data_bio 3-4 60861 NULL +alloc_buf_60864 alloc_buf 3-2 60864 NULL +generic_writepages_60871 generic_writepages 0 60871 NULL +ubifs_read_one_lp_60882 ubifs_read_one_lp 0 60882 NULL @@ -120430,16 +128182,15 @@ index 0000000..386792a +mwifiex_alloc_sdio_mpa_buffers_60961 mwifiex_alloc_sdio_mpa_buffers 2-3 60961 NULL +__a2mp_build_60987 __a2mp_build 3 60987 NULL +hsc_msg_alloc_60990 hsc_msg_alloc 1 60990 NULL ++generic_file_direct_write_60995 generic_file_direct_write 0 60995 NULL +ath6kl_lrssi_roam_read_61022 ath6kl_lrssi_roam_read 3 61022 NULL +graph_depth_write_61024 graph_depth_write 3 61024 NULL +sdhci_pltfm_register_61031 sdhci_pltfm_register 3 61031 NULL +lpfc_idiag_queacc_write_61043 lpfc_idiag_queacc_write 3 61043 NULL +symtab_init_61050 symtab_init 2 61050 NULL +fuse_send_write_61053 fuse_send_write 0-4 61053 NULL -+snd_pcm_pause_61054 snd_pcm_pause 0 61054 NULL +bitmap_scnlistprintf_61062 bitmap_scnlistprintf 2-0 61062 NULL +ahash_align_buffer_size_61070 ahash_align_buffer_size 0-1-2 61070 NULL -+snd_pcm_update_hw_ptr0_61084 snd_pcm_update_hw_ptr0 0 61084 NULL +get_derived_key_61100 get_derived_key 4 61100 NULL +i40e_calculate_l2fpm_size_61104 i40e_calculate_l2fpm_size 0-4-3-2-1 61104 NULL +alloc_chrdev_region_61112 alloc_chrdev_region 0 61112 NULL @@ -120450,20 +128201,19 @@ index 0000000..386792a +event_oom_late_read_61175 event_oom_late_read 3 61175 &pair_device_61175 +dio_bio_add_page_61178 dio_bio_add_page 0 61178 NULL +SyS_prctl_61202 SyS_prctl 4 61202 NULL -+arch_hibernation_header_save_61212 arch_hibernation_header_save 0 61212 NULL ++srp_create_fr_pool_61207 srp_create_fr_pool 3 61207 NULL +smk_read_ambient_61220 smk_read_ambient 3 61220 NULL +v9fs_mmap_file_read_61262 v9fs_mmap_file_read 3 61262 NULL +btrfs_bio_alloc_61270 btrfs_bio_alloc 3 61270 NULL nohasharray -+find_get_pages_tag_61270 find_get_pages_tag 0 61270 &btrfs_bio_alloc_61270 nohasharray -+ifalias_store_61270 ifalias_store 4 61270 &find_get_pages_tag_61270 -+vortex_adbdma_getlinearpos_61283 vortex_adbdma_getlinearpos 0 61283 NULL nohasharray -+hfsplus_getxattr_finder_info_61283 hfsplus_getxattr_finder_info 0 61283 &vortex_adbdma_getlinearpos_61283 ++find_get_pages_tag_61270 find_get_pages_tag 0 61270 &btrfs_bio_alloc_61270 ++hfsplus_getxattr_finder_info_61283 hfsplus_getxattr_finder_info 0 61283 NULL nohasharray ++vortex_adbdma_getlinearpos_61283 vortex_adbdma_getlinearpos 0 61283 &hfsplus_getxattr_finder_info_61283 +nvme_trans_copy_to_user_61288 nvme_trans_copy_to_user 3 61288 NULL +xfer_from_user_61307 xfer_from_user 3 61307 NULL +xfrm_user_sec_ctx_size_61320 xfrm_user_sec_ctx_size 0 61320 NULL +C_SYSC_msgsnd_61330 C_SYSC_msgsnd 3 61330 NULL +write_file_spectral_short_repeat_61335 write_file_spectral_short_repeat 3 61335 NULL -+st5481_setup_isocpipes_61340 st5481_setup_isocpipes 6-4 61340 NULL ++st5481_setup_isocpipes_61340 st5481_setup_isocpipes 4-6 61340 NULL +rx_rx_wa_ba_not_expected_read_61341 rx_rx_wa_ba_not_expected_read 3 61341 NULL +__dm_get_reserved_ios_61342 __dm_get_reserved_ios 0-3-2 61342 NULL +debug_debug4_read_61367 debug_debug4_read 3 61367 NULL @@ -120490,10 +128240,7 @@ index 0000000..386792a +resize_stripes_61650 resize_stripes 2 61650 NULL +ttm_page_pool_free_61661 ttm_page_pool_free 2-0 61661 NULL +insert_one_name_61668 insert_one_name 7 61668 NULL -+snd_pcm_playback_avail_61671 snd_pcm_playback_avail 0 61671 NULL -+qib_format_hwmsg_61679 qib_format_hwmsg 2 61679 NULL +lock_loop_61681 lock_loop 1 61681 NULL -+__do_tune_cpucache_61684 __do_tune_cpucache 2 61684 NULL +filter_read_61692 filter_read 3 61692 NULL +iov_length_61716 iov_length 0 61716 NULL +fragmentation_threshold_read_61718 fragmentation_threshold_read 3 61718 NULL @@ -120510,18 +128257,13 @@ index 0000000..386792a +get_fw_name_61874 get_fw_name 3 61874 NULL +btrfs_ioctl_clone_61886 btrfs_ioctl_clone 3-4-5 61886 NULL +lprocfs_write_frac_u64_helper_61897 lprocfs_write_frac_u64_helper 2 61897 NULL -+lov_mds_md_stripecnt_61899 lov_mds_md_stripecnt 0-1 61899 NULL -+clear_refs_write_61904 clear_refs_write 3 61904 NULL -+kernfs_name_61910 kernfs_name 3 61910 NULL +rx_filter_arp_filter_read_61914 rx_filter_arp_filter_read 3 61914 NULL +au0828_init_isoc_61917 au0828_init_isoc 3-2-4 61917 NULL +sctp_sendmsg_61919 sctp_sendmsg 4 61919 NULL -+SyS_kexec_load_61946 SyS_kexec_load 2 61946 NULL +il4965_ucode_rx_stats_read_61948 il4965_ucode_rx_stats_read 3 61948 NULL +squashfs_read_id_index_table_61961 squashfs_read_id_index_table 4 61961 NULL +fix_read_error_61965 fix_read_error 4 61965 NULL +cow_file_range_61979 cow_file_range 3 61979 NULL -+set_extent_delalloc_61982 set_extent_delalloc 0 61982 NULL +dequeue_event_62000 dequeue_event 3 62000 NULL +xt_compat_match_offset_62011 xt_compat_match_offset 0 62011 NULL +SyS_setxattr_62019 SyS_setxattr 4 62019 NULL @@ -120531,16 +128273,12 @@ index 0000000..386792a +sctp_user_addto_chunk_62047 sctp_user_addto_chunk 2-3 62047 NULL +do_pselect_62061 do_pselect 1 62061 NULL +pcpu_alloc_bootmem_62074 pcpu_alloc_bootmem 2 62074 NULL -+fat_setattr_62084 fat_setattr 0 62084 NULL +jffs2_security_setxattr_62107 jffs2_security_setxattr 4 62107 NULL -+btrfs_direct_IO_62114 btrfs_direct_IO 4 62114 NULL +ip_recv_error_62117 ip_recv_error 3 62117 NULL +generic_block_fiemap_62122 generic_block_fiemap 4 62122 NULL +llc_ui_header_len_62131 llc_ui_header_len 0 62131 NULL -+qib_diag_write_62133 qib_diag_write 3 62133 NULL nohasharray -+kobject_add_varg_62133 kobject_add_varg 0 62133 &qib_diag_write_62133 -+ql_status_62135 ql_status 5 62135 NULL nohasharray -+device_add_attrs_62135 device_add_attrs 0 62135 &ql_status_62135 ++qib_diag_write_62133 qib_diag_write 3 62133 NULL ++ql_status_62135 ql_status 5 62135 NULL +video_usercopy_62151 video_usercopy 2 62151 NULL +SyS_getxattr_62166 SyS_getxattr 4 62166 NULL +prism54_wpa_bss_ie_get_62173 prism54_wpa_bss_ie_get 0 62173 NULL @@ -120549,7 +128287,6 @@ index 0000000..386792a +sock_kmalloc_62205 sock_kmalloc 2 62205 NULL +smk_read_syslog_62227 smk_read_syslog 3 62227 NULL +SYSC_setgroups16_62232 SYSC_setgroups16 1 62232 NULL -+nfsd_read_file_62241 nfsd_read_file 6 62241 NULL +ion_handle_test_dma_62262 ion_handle_test_dma 4-5 62262 NULL +il_dbgfs_sram_read_62296 il_dbgfs_sram_read 3 62296 NULL +sparse_early_usemaps_alloc_pgdat_section_62304 sparse_early_usemaps_alloc_pgdat_section 2 62304 NULL @@ -120562,8 +128299,7 @@ index 0000000..386792a +rx_rx_timeout_read_62389 rx_rx_timeout_read 3 62389 NULL +altera_irscan_62396 altera_irscan 2 62396 NULL +set_ssp_62411 set_ssp 4 62411 NULL -+udf_expand_file_adinicb_62470 udf_expand_file_adinicb 0 62470 NULL -+ext_rts51x_sd_execute_read_data_62501 ext_rts51x_sd_execute_read_data 9 62501 NULL ++tracing_saved_cmdlines_size_read_62491 tracing_saved_cmdlines_size_read 3 62491 NULL +pep_sendmsg_62524 pep_sendmsg 4 62524 NULL +test_iso_queue_62534 test_iso_queue 5 62534 NULL +debugfs_read_62535 debugfs_read 3 62535 NULL @@ -120571,7 +128307,6 @@ index 0000000..386792a +qib_refresh_qsfp_cache_62547 qib_refresh_qsfp_cache 0 62547 NULL +xfrm_user_policy_62573 xfrm_user_policy 4 62573 NULL +get_subdir_62581 get_subdir 3 62581 NULL -+nfsd_vfs_read_62605 nfsd_vfs_read 6 62605 NULL +dut_mode_write_62630 dut_mode_write 3 62630 NULL +vfs_fsync_range_62635 vfs_fsync_range 0 62635 NULL +lpfc_sli4_queue_alloc_62646 lpfc_sli4_queue_alloc 3 62646 NULL @@ -120583,7 +128318,9 @@ index 0000000..386792a +key_replays_read_62746 key_replays_read 3 62746 NULL +lov_verify_lmm_62747 lov_verify_lmm 2 62747 NULL +mwifiex_rdeeprom_write_62754 mwifiex_rdeeprom_write 3 62754 NULL -+ax25_sendmsg_62770 ax25_sendmsg 4 62770 NULL ++mxt_obj_instances_62764 mxt_obj_instances 0 62764 NULL ++copy_page_to_iter_iovec_62770 copy_page_to_iter_iovec 3-0 62770 NULL nohasharray ++ax25_sendmsg_62770 ax25_sendmsg 4 62770 ©_page_to_iter_iovec_62770 +C_SYSC_ipc_62776 C_SYSC_ipc 3 62776 NULL +SyS_sched_getaffinity_62786 SyS_sched_getaffinity 2 62786 NULL +dm_stats_account_io_62787 dm_stats_account_io 3 62787 NULL @@ -120592,7 +128329,6 @@ index 0000000..386792a +bio_get_nr_vecs_62838 bio_get_nr_vecs 0 62838 NULL +xlog_recover_add_to_trans_62839 xlog_recover_add_to_trans 4 62839 NULL +rx_fcs_err_read_62844 rx_fcs_err_read 3 62844 NULL -+read_nic_io_dword_62859 read_nic_io_dword 0 62859 NULL +l2tp_ip6_recvmsg_62874 l2tp_ip6_recvmsg 4 62874 NULL +aoechr_write_62883 aoechr_write 3 62883 NULL +if_spi_host_to_card_62890 if_spi_host_to_card 4 62890 NULL @@ -120600,6 +128336,7 @@ index 0000000..386792a +getdqbuf_62908 getdqbuf 1 62908 NULL +ll_statahead_agl_seq_write_62928 ll_statahead_agl_seq_write 3 62928 NULL +agp_create_user_memory_62955 agp_create_user_memory 1 62955 NULL ++hwdep_read_62992 hwdep_read 3 62992 NULL +kstrtoull_from_user_63026 kstrtoull_from_user 2 63026 NULL +__vb2_perform_fileio_63033 __vb2_perform_fileio 3 63033 NULL +pipeline_defrag_to_csum_swi_read_63037 pipeline_defrag_to_csum_swi_read 3 63037 NULL @@ -120610,7 +128347,6 @@ index 0000000..386792a +sep_prepare_input_output_dma_table_in_dcb_63087 sep_prepare_input_output_dma_table_in_dcb 4-5 63087 NULL +iwl_dbgfs_sensitivity_read_63116 iwl_dbgfs_sensitivity_read 3 63116 NULL +ext4_chunk_trans_blocks_63123 ext4_chunk_trans_blocks 0-2 63123 NULL -+snd_pcm_status_user_63140 snd_pcm_status_user 0 63140 NULL +ubifs_change_one_lp_63157 ubifs_change_one_lp 0 63157 NULL +smk_write_revoke_subj_63173 smk_write_revoke_subj 3 63173 NULL +SyS_syslog_63178 SyS_syslog 3 63178 NULL @@ -120620,25 +128356,23 @@ index 0000000..386792a +xfs_dir2_leaf_getdents_63262 xfs_dir2_leaf_getdents 3 63262 NULL +iwl_dbgfs_fw_error_dump_read_63263 iwl_dbgfs_fw_error_dump_read 3 63263 NULL +raid5_resize_63306 raid5_resize 2 63306 NULL ++nfsd_vfs_read_63307 nfsd_vfs_read 5 63307 NULL +ath10k_read_fw_dbglog_63323 ath10k_read_fw_dbglog 3 63323 NULL +proc_info_read_63344 proc_info_read 3 63344 NULL +ps_upsd_max_sptime_read_63362 ps_upsd_max_sptime_read 3 63362 NULL +idmouse_read_63374 idmouse_read 3 63374 NULL -+usbnet_read_cmd_nopm_63388 usbnet_read_cmd_nopm 7 63388 NULL nohasharray -+edac_pci_alloc_ctl_info_63388 edac_pci_alloc_ctl_info 1 63388 &usbnet_read_cmd_nopm_63388 ++edac_pci_alloc_ctl_info_63388 edac_pci_alloc_ctl_info 1 63388 NULL nohasharray ++usbnet_read_cmd_nopm_63388 usbnet_read_cmd_nopm 7 63388 &edac_pci_alloc_ctl_info_63388 +rxpipe_missed_beacon_host_int_trig_rx_data_read_63405 rxpipe_missed_beacon_host_int_trig_rx_data_read 3 63405 NULL -+nouveau_event_create_63411 nouveau_event_create 1 63411 NULL +l2cap_sock_sendmsg_63427 l2cap_sock_sendmsg 4 63427 NULL +nfsd_symlink_63442 nfsd_symlink 6 63442 NULL +si5351_bulk_write_63468 si5351_bulk_write 2-3 63468 NULL +snd_info_entry_write_63474 snd_info_entry_write 3 63474 NULL +reada_find_extent_63486 reada_find_extent 2 63486 NULL -+read_kcore_63488 read_kcore 3 63488 NULL +iwl_dbgfs_bcast_filters_read_63489 iwl_dbgfs_bcast_filters_read 3 63489 NULL +snd_pcm_plug_write_transfer_63503 snd_pcm_plug_write_transfer 0-3 63503 NULL +efx_mcdi_rpc_async_63529 efx_mcdi_rpc_async 4-5 63529 NULL -+ubi_more_leb_change_data_63534 ubi_more_leb_change_data 4 63534 NULL nohasharray -+generic_cont_expand_simple_63534 generic_cont_expand_simple 0 63534 &ubi_more_leb_change_data_63534 ++ubi_more_leb_change_data_63534 ubi_more_leb_change_data 4 63534 NULL +write_file_spectral_period_63536 write_file_spectral_period 3 63536 NULL +if_sdio_read_scratch_63540 if_sdio_read_scratch 0 63540 NULL +append_to_buffer_63550 append_to_buffer 3 63550 NULL @@ -120658,7 +128392,6 @@ index 0000000..386792a +btrfs_insert_delayed_dir_index_63720 btrfs_insert_delayed_dir_index 4 63720 NULL +selinux_secctx_to_secid_63744 selinux_secctx_to_secid 2 63744 NULL +snd_pcm_oss_read1_63771 snd_pcm_oss_read1 3 63771 NULL -+snd_pcm_link_63772 snd_pcm_link 0 63772 NULL +snd_opl4_mem_proc_read_63774 snd_opl4_mem_proc_read 5 63774 NULL +spidev_compat_ioctl_63778 spidev_compat_ioctl 2 63778 NULL +mwifiex_11n_create_rx_reorder_tbl_63806 mwifiex_11n_create_rx_reorder_tbl 4 63806 NULL @@ -120680,6 +128413,7 @@ index 0000000..386792a +SyS_rt_sigpending_64018 SyS_rt_sigpending 2 64018 NULL +dbAllocDmapLev_64030 dbAllocDmapLev 0 64030 NULL +SyS_fsetxattr_64039 SyS_fsetxattr 4 64039 NULL ++__sock_create_64069 __sock_create 0 64069 NULL +get_u8_64076 get_u8 0 64076 NULL +xilly_malloc_64077 xilly_malloc 2 64077 NULL +sl_realloc_bufs_64086 sl_realloc_bufs 2 64086 NULL @@ -120698,25 +128432,22 @@ index 0000000..386792a +bnx2x_vf_mcast_64166 bnx2x_vf_mcast 4 64166 NULL +cpumask_scnprintf_64170 cpumask_scnprintf 0-2 64170 NULL +kernfs_iop_setxattr_64220 kernfs_iop_setxattr 4 64220 NULL -+xfs_vm_direct_IO_64223 xfs_vm_direct_IO 4 64223 NULL +read_pulse_64227 read_pulse 0-3 64227 NULL +ea_len_64229 ea_len 0 64229 NULL +io_capture_transfer_64276 io_capture_transfer 4 64276 NULL +btrfs_file_extent_offset_64278 btrfs_file_extent_offset 0 64278 NULL +sta_current_tx_rate_read_64286 sta_current_tx_rate_read 3 64286 NULL -+xfs_dir_cilookup_result_64288 xfs_dir_cilookup_result 3 64288 NULL nohasharray -+event_id_read_64288 event_id_read 3 64288 &xfs_dir_cilookup_result_64288 ++event_id_read_64288 event_id_read 3 64288 NULL nohasharray ++xfs_dir_cilookup_result_64288 xfs_dir_cilookup_result 3 64288 &event_id_read_64288 +ocfs2_block_check_validate_bhs_64302 ocfs2_block_check_validate_bhs 0 64302 NULL +snd_hda_get_sub_nodes_64304 snd_hda_get_sub_nodes 0 64304 NULL +error_error_bar_retry_read_64305 error_error_bar_retry_read 3 64305 NULL +sisusbcon_clear_64329 sisusbcon_clear 4-3-5 64329 NULL +ts_write_64336 ts_write 3 64336 NULL +usbtmc_write_64340 usbtmc_write 3 64340 NULL -+qlcnic_82xx_calculate_msix_vector_64354 qlcnic_82xx_calculate_msix_vector 0 64354 NULL +user_regset_copyin_64360 user_regset_copyin 7 64360 NULL +wlc_phy_loadsampletable_nphy_64367 wlc_phy_loadsampletable_nphy 3 64367 NULL -+reg_create_64372 reg_create 5 64372 NULL nohasharray -+bnx2_enable_msix_64372 bnx2_enable_msix 2 64372 ®_create_64372 ++reg_create_64372 reg_create 5 64372 NULL +ilo_write_64378 ilo_write 3 64378 NULL +btrfs_map_block_64379 btrfs_map_block 3 64379 NULL +vmcs_readl_64381 vmcs_readl 0 64381 NULL @@ -120728,7 +128459,6 @@ index 0000000..386792a +oom_adj_write_64428 oom_adj_write 3 64428 NULL +read_file_spectral_short_repeat_64431 read_file_spectral_short_repeat 3 64431 NULL +ax25_recvmsg_64441 ax25_recvmsg 4 64441 NULL -+__i2c_add_numbered_adapter_64445 __i2c_add_numbered_adapter 0 64445 NULL +single_open_size_64483 single_open_size 4 64483 NULL +p54_parse_rssical_64493 p54_parse_rssical 3 64493 NULL +msg_data_sz_64503 msg_data_sz 0 64503 NULL @@ -120760,6 +128490,7 @@ index 0000000..386792a +squashfs_read_inode_lookup_table_64739 squashfs_read_inode_lookup_table 4 64739 NULL +bio_map_kern_64751 bio_map_kern 3 64751 NULL +rt2x00debug_write_csr_64753 rt2x00debug_write_csr 3 64753 NULL ++hwdep_write_64776 hwdep_write 3 64776 NULL +message_for_md_64777 message_for_md 5 64777 NULL +isr_low_rssi_read_64789 isr_low_rssi_read 3 64789 NULL +regmap_reg_ranges_read_file_64798 regmap_reg_ranges_read_file 3 64798 NULL @@ -120768,7 +128499,6 @@ index 0000000..386792a +proc_projid_map_write_64810 proc_projid_map_write 3 64810 NULL +megaraid_change_queue_depth_64815 megaraid_change_queue_depth 2 64815 NULL +ecryptfs_send_miscdev_64816 ecryptfs_send_miscdev 2 64816 NULL -+do_kimage_alloc_64827 do_kimage_alloc 3 64827 NULL +altera_set_dr_pre_64862 altera_set_dr_pre 2 64862 NULL +pci_vc_do_save_buffer_64876 pci_vc_do_save_buffer 0 64876 NULL +lprocfs_write_u64_helper_64880 lprocfs_write_u64_helper 2 64880 NULL @@ -120779,22 +128509,20 @@ index 0000000..386792a +suspend_dtim_interval_read_64971 suspend_dtim_interval_read 3 64971 NULL +crypto_ahash_digestsize_65014 crypto_ahash_digestsize 0 65014 NULL +insert_dent_65034 insert_dent 7 65034 NULL -+snd_hda_get_pin_label_65035 snd_hda_get_pin_label 5 65035 NULL +ext4_ind_trans_blocks_65053 ext4_ind_trans_blocks 0-2 65053 NULL -+pcibios_enable_device_65059 pcibios_enable_device 0 65059 NULL +make_idx_node_65068 make_idx_node 0 65068 NULL +__alloc_bootmem_node_high_65076 __alloc_bootmem_node_high 2 65076 NULL +batadv_socket_write_65083 batadv_socket_write 3 65083 NULL +ocfs2_truncate_cluster_pages_65086 ocfs2_truncate_cluster_pages 2 65086 NULL +ath9k_dump_mci_btcoex_65090 ath9k_dump_mci_btcoex 3-0 65090 NULL -+scsi_add_host_with_dma_65093 scsi_add_host_with_dma 0 65093 NULL -+generic_ocp_write_65107 generic_ocp_write 4 65107 NULL +rx_rx_done_read_65217 rx_rx_done_read 3 65217 NULL -+print_endpoint_stat_65232 print_endpoint_stat 0-3-4 65232 NULL ++nouveau_event_create_65229 nouveau_event_create 2-1 65229 NULL ++print_endpoint_stat_65232 print_endpoint_stat 3-4-0 65232 NULL +whci_n_caps_65247 whci_n_caps 0 65247 NULL +kmalloc_parameter_65279 kmalloc_parameter 1 65279 NULL +compat_core_sys_select_65285 compat_core_sys_select 1 65285 NULL +mpi_set_buffer_65294 mpi_set_buffer 3 65294 NULL ++fat_direct_IO_65295 fat_direct_IO 4 65295 NULL +redirected_tty_write_65297 redirected_tty_write 3 65297 NULL +get_var_len_65304 get_var_len 0 65304 NULL +unpack_array_65318 unpack_array 0 65318 NULL @@ -120805,9 +128533,7 @@ index 0000000..386792a +SyS_writev_65372 SyS_writev 3 65372 NULL +__alloc_bootmem_nopanic_65397 __alloc_bootmem_nopanic 1 65397 NULL +trace_seq_to_user_65398 trace_seq_to_user 3 65398 NULL -+__read_vmcore_65402 __read_vmcore 2 65402 NULL +ocfs2_write_begin_nolock_65410 ocfs2_write_begin_nolock 3-4 65410 NULL -+device_add_groups_65423 device_add_groups 0 65423 NULL +xpc_kzalloc_cacheline_aligned_65433 xpc_kzalloc_cacheline_aligned 1 65433 NULL +usb_alloc_coherent_65444 usb_alloc_coherent 2 65444 NULL +il_dbgfs_wd_timeout_write_65464 il_dbgfs_wd_timeout_write 3 65464 NULL @@ -120916,7 +128642,7 @@ index 0000000..560cd7b +zpios_read_64734 zpios_read 3 64734 NULL diff --git a/tools/gcc/size_overflow_plugin/size_overflow_plugin.c b/tools/gcc/size_overflow_plugin/size_overflow_plugin.c new file mode 100644 -index 0000000..a15328d +index 0000000..95f7abd --- /dev/null +++ b/tools/gcc/size_overflow_plugin/size_overflow_plugin.c @@ -0,0 +1,259 @@ @@ -120952,7 +128678,7 @@ index 0000000..a15328d +tree size_overflow_type_TI; + +static struct plugin_info size_overflow_plugin_info = { -+ .version = "20140713", ++ .version = "20140725", + .help = "no-size-overflow\tturn off size overflow checking\n", +}; + @@ -121551,10 +129277,10 @@ index 0000000..0888f6c + diff --git a/tools/gcc/stackleak_plugin.c b/tools/gcc/stackleak_plugin.c new file mode 100644 -index 0000000..dd94983 +index 0000000..924652b --- /dev/null +++ b/tools/gcc/stackleak_plugin.c -@@ -0,0 +1,376 @@ +@@ -0,0 +1,395 @@ +/* + * Copyright 2011-2014 by the PaX Team + * Licensed under the GPL v2 @@ -121586,7 +129312,7 @@ index 0000000..dd94983 +static bool init_locals; + +static struct plugin_info stackleak_plugin_info = { -+ .version = "201402131920", ++ .version = "201408011900", + .help = "track-lowest-sp=nn\ttrack sp in functions whose frame size is at least nn bytes\n" +// "initialize-locals\t\tforcibly initialize all stack frames\n" +}; @@ -121732,6 +129458,25 @@ index 0000000..dd94983 + +static bool gate_stackleak_track_stack(void) +{ ++ tree section; ++ ++ if (ix86_cmodel != CM_KERNEL) ++ return false; ++ ++ section = lookup_attribute("section", DECL_ATTRIBUTES(current_function_decl)); ++ if (section && TREE_VALUE(section)) { ++ section = TREE_VALUE(TREE_VALUE(section)); ++ ++ if (!strncmp(TREE_STRING_POINTER(section), ".init.text", 10)) ++ return false; ++ if (!strncmp(TREE_STRING_POINTER(section), ".devinit.text", 13)) ++ return false; ++ if (!strncmp(TREE_STRING_POINTER(section), ".cpuinit.text", 13)) ++ return false; ++ if (!strncmp(TREE_STRING_POINTER(section), ".meminit.text", 13)) ++ return false; ++ } ++ + return track_frame_size >= 0; +} + @@ -122212,10 +129957,10 @@ index 0000000..4ee2231 + return 0; +} diff --git a/tools/include/linux/compiler.h b/tools/include/linux/compiler.h -index fbc6665..5e9ce79 100644 +index 88461f0..6fb70a0 100644 --- a/tools/include/linux/compiler.h +++ b/tools/include/linux/compiler.h -@@ -35,4 +35,12 @@ +@@ -35,6 +35,14 @@ # define unlikely(x) __builtin_expect(!!(x), 0) #endif @@ -122227,6 +129972,8 @@ index fbc6665..5e9ce79 100644 +# define __intentional_overflow(...) +#endif + + #define ACCESS_ONCE(x) (*(volatile typeof(x) *)&(x)) + #endif /* _TOOLS_LINUX_COMPILER_H */ diff --git a/tools/lib/api/Makefile b/tools/lib/api/Makefile index ce00f7e..0aca5e4 100644 @@ -122267,7 +130014,7 @@ index 0a578fe..b81f62d 100644 }) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c -index 56baae8..2c889c2 100644 +index 4b6c01b..16eb755 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -76,12 +76,17 @@ LIST_HEAD(vm_list); @@ -122290,7 +130037,7 @@ index 56baae8..2c889c2 100644 struct dentry *kvm_debugfs_dir; -@@ -755,7 +760,7 @@ int __kvm_set_memory_region(struct kvm *kvm, +@@ -761,7 +766,7 @@ int __kvm_set_memory_region(struct kvm *kvm, /* We can read the guest memory with __xxx_user() later on. */ if ((mem->slot < KVM_USER_MEM_SLOTS) && ((mem->userspace_addr & (PAGE_SIZE - 1)) || @@ -122299,7 +130046,7 @@ index 56baae8..2c889c2 100644 (void __user *)(unsigned long)mem->userspace_addr, mem->memory_size))) goto out; -@@ -1612,9 +1617,17 @@ EXPORT_SYMBOL_GPL(kvm_read_guest_cached); +@@ -1618,9 +1623,17 @@ EXPORT_SYMBOL_GPL(kvm_read_guest_cached); int kvm_clear_guest_page(struct kvm *kvm, gfn_t gfn, int offset, int len) { @@ -122319,7 +130066,7 @@ index 56baae8..2c889c2 100644 } EXPORT_SYMBOL_GPL(kvm_clear_guest_page); -@@ -1864,7 +1877,7 @@ static int kvm_vcpu_release(struct inode *inode, struct file *filp) +@@ -1870,7 +1883,7 @@ static int kvm_vcpu_release(struct inode *inode, struct file *filp) return 0; } @@ -122328,7 +130075,7 @@ index 56baae8..2c889c2 100644 .release = kvm_vcpu_release, .unlocked_ioctl = kvm_vcpu_ioctl, #ifdef CONFIG_COMPAT -@@ -2534,7 +2547,7 @@ out: +@@ -2540,7 +2553,7 @@ out: } #endif @@ -122337,7 +130084,7 @@ index 56baae8..2c889c2 100644 .release = kvm_vm_release, .unlocked_ioctl = kvm_vm_ioctl, #ifdef CONFIG_COMPAT -@@ -2634,7 +2647,7 @@ out: +@@ -2640,7 +2653,7 @@ out: return r; } @@ -122346,7 +130093,7 @@ index 56baae8..2c889c2 100644 .unlocked_ioctl = kvm_dev_ioctl, .compat_ioctl = kvm_dev_ioctl, .llseek = noop_llseek, -@@ -2660,7 +2673,7 @@ static void hardware_enable_nolock(void *junk) +@@ -2666,7 +2679,7 @@ static void hardware_enable_nolock(void *junk) if (r) { cpumask_clear_cpu(cpu, cpus_hardware_enabled); @@ -122355,7 +130102,7 @@ index 56baae8..2c889c2 100644 printk(KERN_INFO "kvm: enabling virtualization on " "CPU%d failed\n", cpu); } -@@ -2716,10 +2729,10 @@ static int hardware_enable_all(void) +@@ -2722,10 +2735,10 @@ static int hardware_enable_all(void) kvm_usage_count++; if (kvm_usage_count == 1) { @@ -122368,7 +130115,7 @@ index 56baae8..2c889c2 100644 hardware_disable_all_nolock(); r = -EBUSY; } -@@ -3123,7 +3136,7 @@ static void kvm_sched_out(struct preempt_notifier *pn, +@@ -3130,7 +3143,7 @@ static void kvm_sched_out(struct preempt_notifier *pn, kvm_arch_vcpu_put(vcpu); } @@ -122377,7 +130124,7 @@ index 56baae8..2c889c2 100644 struct module *module) { int r; -@@ -3170,7 +3183,7 @@ int kvm_init(void *opaque, unsigned vcpu_size, unsigned vcpu_align, +@@ -3177,7 +3190,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, @@ -122386,7 +130133,7 @@ index 56baae8..2c889c2 100644 if (!kvm_vcpu_cache) { r = -ENOMEM; goto out_free_3; -@@ -3180,9 +3193,11 @@ int kvm_init(void *opaque, unsigned vcpu_size, unsigned vcpu_align, +@@ -3187,9 +3200,11 @@ int kvm_init(void *opaque, unsigned vcpu_size, unsigned vcpu_align, if (r) goto out_free; @@ -122398,7 +130145,7 @@ index 56baae8..2c889c2 100644 r = misc_register(&kvm_dev); if (r) { -@@ -3192,9 +3207,6 @@ int kvm_init(void *opaque, unsigned vcpu_size, unsigned vcpu_align, +@@ -3199,9 +3214,6 @@ int kvm_init(void *opaque, unsigned vcpu_size, unsigned vcpu_align, register_syscore_ops(&kvm_syscore_ops); diff --git a/kernel/patches/grsecurity-3.15.4-arm-kvm_arch_init.patch b/kernel/patches/grsecurity-3.15.4-arm-kvm_arch_init.patch deleted file mode 100644 index 378f782f7..000000000 --- a/kernel/patches/grsecurity-3.15.4-arm-kvm_arch_init.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c -index 3c82b37..ee73109 100644 ---- a/arch/arm/kvm/arm.c -+++ b/arch/arm/kvm/arm.c -@@ -1034,7 +1034,7 @@ static void check_kvm_target_cpu(void *ret) - /** - * Initialize Hyp-mode and memory mappings on all CPUs. - */ --int kvm_arch_init(void *opaque) -+int kvm_arch_init(const void *opaque) - { - int err; - int ret, cpu; -- 2.39.2